snipe-it/public/build/assets/js/all.js.map
Daniel Meltzer ad9470b6f8 Assorted fixed (#3332)
* Better error handling of failed file uploads.  Also improve formatting of modal dialog

* Readd app.js to the js build, fixes collapsing sidebar

* Update JS

* Fix font size.  We need to explicitly set the font size for the table because everywhere else that comes from bootstrap-tables
2017-02-22 22:49:06 -08:00

1 line
6.2 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"sources":["tether.js","vue-dist.js","jquery-ui.js","jquery.slimscroll.js","jquery.iframe-transport.js","jquery.fileupload.js","fastclick.js","bootstrap-colorpicker.js","bootstrap-datepicker.js","icheck.js","select2.full.js","ekko-lightbox.js","snipeit.js","app.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACnxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjxkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC18CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACz0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AChjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7fA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACpyMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1lBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"all.js","sourcesContent":["/*! tether 1.4.0 */\n\n(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require, exports, module);\n } else {\n root.Tether = factory();\n }\n}(this, function(require, exports, module) {\n\n'use strict';\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar TetherBase = undefined;\nif (typeof TetherBase === 'undefined') {\n TetherBase = { modules: [] };\n}\n\nvar zeroElement = null;\n\n// Same as native getBoundingClientRect, except it takes into account parent <frame> offsets\n// if the element lies within a nested document (<frame> or <iframe>-like).\nfunction getActualBoundingClientRect(node) {\n var boundingRect = node.getBoundingClientRect();\n\n // The original object returned by getBoundingClientRect is immutable, so we clone it\n // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9\n var rect = {};\n for (var k in boundingRect) {\n rect[k] = boundingRect[k];\n }\n\n if (node.ownerDocument !== document) {\n var _frameElement = node.ownerDocument.defaultView.frameElement;\n if (_frameElement) {\n var frameRect = getActualBoundingClientRect(_frameElement);\n rect.top += frameRect.top;\n rect.bottom += frameRect.top;\n rect.left += frameRect.left;\n rect.right += frameRect.left;\n }\n }\n\n return rect;\n}\n\nfunction getScrollParents(el) {\n // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;\n // https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n var computedStyle = getComputedStyle(el) || {};\n var position = computedStyle.position;\n var parents = [];\n\n if (position === 'fixed') {\n return [el];\n }\n\n var parent = el;\n while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {\n var style = undefined;\n try {\n style = getComputedStyle(parent);\n } catch (err) {}\n\n if (typeof style === 'undefined' || style === null) {\n parents.push(parent);\n return parents;\n }\n\n var _style = style;\n var overflow = _style.overflow;\n var overflowX = _style.overflowX;\n var overflowY = _style.overflowY;\n\n if (/(auto|scroll)/.test(overflow + overflowY + overflowX)) {\n if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {\n parents.push(parent);\n }\n }\n }\n\n parents.push(el.ownerDocument.body);\n\n // If the node is within a frame, account for the parent window scroll\n if (el.ownerDocument !== document) {\n parents.push(el.ownerDocument.defaultView);\n }\n\n return parents;\n}\n\nvar uniqueId = (function () {\n var id = 0;\n return function () {\n return ++id;\n };\n})();\n\nvar zeroPosCache = {};\nvar getOrigin = function getOrigin() {\n // getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of\n // jitter as the user scrolls that messes with our ability to detect if two positions\n // are equivilant or not. We place an element at the top left of the page that will\n // get the same jitter, so we can cancel the two out.\n var node = zeroElement;\n if (!node || !document.body.contains(node)) {\n node = document.createElement('div');\n node.setAttribute('data-tether-id', uniqueId());\n extend(node.style, {\n top: 0,\n left: 0,\n position: 'absolute'\n });\n\n document.body.appendChild(node);\n\n zeroElement = node;\n }\n\n var id = node.getAttribute('data-tether-id');\n if (typeof zeroPosCache[id] === 'undefined') {\n zeroPosCache[id] = getActualBoundingClientRect(node);\n\n // Clear the cache when this position call is done\n defer(function () {\n delete zeroPosCache[id];\n });\n }\n\n return zeroPosCache[id];\n};\n\nfunction removeUtilElements() {\n if (zeroElement) {\n document.body.removeChild(zeroElement);\n }\n zeroElement = null;\n};\n\nfunction getBounds(el) {\n var doc = undefined;\n if (el === document) {\n doc = document;\n el = document.documentElement;\n } else {\n doc = el.ownerDocument;\n }\n\n var docEl = doc.documentElement;\n\n var box = getActualBoundingClientRect(el);\n\n var origin = getOrigin();\n\n box.top -= origin.top;\n box.left -= origin.left;\n\n if (typeof box.width === 'undefined') {\n box.width = document.body.scrollWidth - box.left - box.right;\n }\n if (typeof box.height === 'undefined') {\n box.height = document.body.scrollHeight - box.top - box.bottom;\n }\n\n box.top = box.top - docEl.clientTop;\n box.left = box.left - docEl.clientLeft;\n box.right = doc.body.clientWidth - box.width - box.left;\n box.bottom = doc.body.clientHeight - box.height - box.top;\n\n return box;\n}\n\nfunction getOffsetParent(el) {\n return el.offsetParent || document.documentElement;\n}\n\nvar _scrollBarSize = null;\nfunction getScrollBarSize() {\n if (_scrollBarSize) {\n return _scrollBarSize;\n }\n var inner = document.createElement('div');\n inner.style.width = '100%';\n inner.style.height = '200px';\n\n var outer = document.createElement('div');\n extend(outer.style, {\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none',\n visibility: 'hidden',\n width: '200px',\n height: '150px',\n overflow: 'hidden'\n });\n\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n\n var widthContained = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n var widthScroll = inner.offsetWidth;\n\n if (widthContained === widthScroll) {\n widthScroll = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n\n var width = widthContained - widthScroll;\n\n _scrollBarSize = { width: width, height: width };\n return _scrollBarSize;\n}\n\nfunction extend() {\n var out = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n var args = [];\n\n Array.prototype.push.apply(args, arguments);\n\n args.slice(1).forEach(function (obj) {\n if (obj) {\n for (var key in obj) {\n if (({}).hasOwnProperty.call(obj, key)) {\n out[key] = obj[key];\n }\n }\n }\n });\n\n return out;\n}\n\nfunction removeClass(el, name) {\n if (typeof el.classList !== 'undefined') {\n name.split(' ').forEach(function (cls) {\n if (cls.trim()) {\n el.classList.remove(cls);\n }\n });\n } else {\n var regex = new RegExp('(^| )' + name.split(' ').join('|') + '( |$)', 'gi');\n var className = getClassName(el).replace(regex, ' ');\n setClassName(el, className);\n }\n}\n\nfunction addClass(el, name) {\n if (typeof el.classList !== 'undefined') {\n name.split(' ').forEach(function (cls) {\n if (cls.trim()) {\n el.classList.add(cls);\n }\n });\n } else {\n removeClass(el, name);\n var cls = getClassName(el) + (' ' + name);\n setClassName(el, cls);\n }\n}\n\nfunction hasClass(el, name) {\n if (typeof el.classList !== 'undefined') {\n return el.classList.contains(name);\n }\n var className = getClassName(el);\n return new RegExp('(^| )' + name + '( |$)', 'gi').test(className);\n}\n\nfunction getClassName(el) {\n // Can't use just SVGAnimatedString here since nodes within a Frame in IE have\n // completely separately SVGAnimatedString base classes\n if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {\n return el.className.baseVal;\n }\n return el.className;\n}\n\nfunction setClassName(el, className) {\n el.setAttribute('class', className);\n}\n\nfunction updateClasses(el, add, all) {\n // Of the set of 'all' classes, we need the 'add' classes, and only the\n // 'add' classes to be set.\n all.forEach(function (cls) {\n if (add.indexOf(cls) === -1 && hasClass(el, cls)) {\n removeClass(el, cls);\n }\n });\n\n add.forEach(function (cls) {\n if (!hasClass(el, cls)) {\n addClass(el, cls);\n }\n });\n}\n\nvar deferred = [];\n\nvar defer = function defer(fn) {\n deferred.push(fn);\n};\n\nvar flush = function flush() {\n var fn = undefined;\n while (fn = deferred.pop()) {\n fn();\n }\n};\n\nvar Evented = (function () {\n function Evented() {\n _classCallCheck(this, Evented);\n }\n\n _createClass(Evented, [{\n key: 'on',\n value: function on(event, handler, ctx) {\n var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];\n\n if (typeof this.bindings === 'undefined') {\n this.bindings = {};\n }\n if (typeof this.bindings[event] === 'undefined') {\n this.bindings[event] = [];\n }\n this.bindings[event].push({ handler: handler, ctx: ctx, once: once });\n }\n }, {\n key: 'once',\n value: function once(event, handler, ctx) {\n this.on(event, handler, ctx, true);\n }\n }, {\n key: 'off',\n value: function off(event, handler) {\n if (typeof this.bindings === 'undefined' || typeof this.bindings[event] === 'undefined') {\n return;\n }\n\n if (typeof handler === 'undefined') {\n delete this.bindings[event];\n } else {\n var i = 0;\n while (i < this.bindings[event].length) {\n if (this.bindings[event][i].handler === handler) {\n this.bindings[event].splice(i, 1);\n } else {\n ++i;\n }\n }\n }\n }\n }, {\n key: 'trigger',\n value: function trigger(event) {\n if (typeof this.bindings !== 'undefined' && this.bindings[event]) {\n var i = 0;\n\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n while (i < this.bindings[event].length) {\n var _bindings$event$i = this.bindings[event][i];\n var handler = _bindings$event$i.handler;\n var ctx = _bindings$event$i.ctx;\n var once = _bindings$event$i.once;\n\n var context = ctx;\n if (typeof context === 'undefined') {\n context = this;\n }\n\n handler.apply(context, args);\n\n if (once) {\n this.bindings[event].splice(i, 1);\n } else {\n ++i;\n }\n }\n }\n }\n }]);\n\n return Evented;\n})();\n\nTetherBase.Utils = {\n getActualBoundingClientRect: getActualBoundingClientRect,\n getScrollParents: getScrollParents,\n getBounds: getBounds,\n getOffsetParent: getOffsetParent,\n extend: extend,\n addClass: addClass,\n removeClass: removeClass,\n hasClass: hasClass,\n updateClasses: updateClasses,\n defer: defer,\n flush: flush,\n uniqueId: uniqueId,\n Evented: Evented,\n getScrollBarSize: getScrollBarSize,\n removeUtilElements: removeUtilElements\n};\n/* globals TetherBase, performance */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nvar _get = function get(_x6, _x7, _x8) { var _again = true; _function: while (_again) { var object = _x6, property = _x7, receiver = _x8; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x6 = parent; _x7 = property; _x8 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nif (typeof TetherBase === 'undefined') {\n throw new Error('You must include the utils.js file before tether.js');\n}\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getScrollParents = _TetherBase$Utils.getScrollParents;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar getOffsetParent = _TetherBase$Utils.getOffsetParent;\nvar extend = _TetherBase$Utils.extend;\nvar addClass = _TetherBase$Utils.addClass;\nvar removeClass = _TetherBase$Utils.removeClass;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\nvar flush = _TetherBase$Utils.flush;\nvar getScrollBarSize = _TetherBase$Utils.getScrollBarSize;\nvar removeUtilElements = _TetherBase$Utils.removeUtilElements;\n\nfunction within(a, b) {\n var diff = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];\n\n return a + diff >= b && b >= a - diff;\n}\n\nvar transformKey = (function () {\n if (typeof document === 'undefined') {\n return '';\n }\n var el = document.createElement('div');\n\n var transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];\n for (var i = 0; i < transforms.length; ++i) {\n var key = transforms[i];\n if (el.style[key] !== undefined) {\n return key;\n }\n }\n})();\n\nvar tethers = [];\n\nvar position = function position() {\n tethers.forEach(function (tether) {\n tether.position(false);\n });\n flush();\n};\n\nfunction now() {\n if (typeof performance !== 'undefined' && typeof performance.now !== 'undefined') {\n return performance.now();\n }\n return +new Date();\n}\n\n(function () {\n var lastCall = null;\n var lastDuration = null;\n var pendingTimeout = null;\n\n var tick = function tick() {\n if (typeof lastDuration !== 'undefined' && lastDuration > 16) {\n // We voluntarily throttle ourselves if we can't manage 60fps\n lastDuration = Math.min(lastDuration - 16, 250);\n\n // Just in case this is the last event, remember to position just once more\n pendingTimeout = setTimeout(tick, 250);\n return;\n }\n\n if (typeof lastCall !== 'undefined' && now() - lastCall < 10) {\n // Some browsers call events a little too frequently, refuse to run more than is reasonable\n return;\n }\n\n if (pendingTimeout != null) {\n clearTimeout(pendingTimeout);\n pendingTimeout = null;\n }\n\n lastCall = now();\n position();\n lastDuration = now() - lastCall;\n };\n\n if (typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {\n ['resize', 'scroll', 'touchmove'].forEach(function (event) {\n window.addEventListener(event, tick);\n });\n }\n})();\n\nvar MIRROR_LR = {\n center: 'center',\n left: 'right',\n right: 'left'\n};\n\nvar MIRROR_TB = {\n middle: 'middle',\n top: 'bottom',\n bottom: 'top'\n};\n\nvar OFFSET_MAP = {\n top: 0,\n left: 0,\n middle: '50%',\n center: '50%',\n bottom: '100%',\n right: '100%'\n};\n\nvar autoToFixedAttachment = function autoToFixedAttachment(attachment, relativeToAttachment) {\n var left = attachment.left;\n var top = attachment.top;\n\n if (left === 'auto') {\n left = MIRROR_LR[relativeToAttachment.left];\n }\n\n if (top === 'auto') {\n top = MIRROR_TB[relativeToAttachment.top];\n }\n\n return { left: left, top: top };\n};\n\nvar attachmentToOffset = function attachmentToOffset(attachment) {\n var left = attachment.left;\n var top = attachment.top;\n\n if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {\n left = OFFSET_MAP[attachment.left];\n }\n\n if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {\n top = OFFSET_MAP[attachment.top];\n }\n\n return { left: left, top: top };\n};\n\nfunction addOffset() {\n var out = { top: 0, left: 0 };\n\n for (var _len = arguments.length, offsets = Array(_len), _key = 0; _key < _len; _key++) {\n offsets[_key] = arguments[_key];\n }\n\n offsets.forEach(function (_ref) {\n var top = _ref.top;\n var left = _ref.left;\n\n if (typeof top === 'string') {\n top = parseFloat(top, 10);\n }\n if (typeof left === 'string') {\n left = parseFloat(left, 10);\n }\n\n out.top += top;\n out.left += left;\n });\n\n return out;\n}\n\nfunction offsetToPx(offset, size) {\n if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {\n offset.left = parseFloat(offset.left, 10) / 100 * size.width;\n }\n if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {\n offset.top = parseFloat(offset.top, 10) / 100 * size.height;\n }\n\n return offset;\n}\n\nvar parseOffset = function parseOffset(value) {\n var _value$split = value.split(' ');\n\n var _value$split2 = _slicedToArray(_value$split, 2);\n\n var top = _value$split2[0];\n var left = _value$split2[1];\n\n return { top: top, left: left };\n};\nvar parseAttachment = parseOffset;\n\nvar TetherClass = (function (_Evented) {\n _inherits(TetherClass, _Evented);\n\n function TetherClass(options) {\n var _this = this;\n\n _classCallCheck(this, TetherClass);\n\n _get(Object.getPrototypeOf(TetherClass.prototype), 'constructor', this).call(this);\n this.position = this.position.bind(this);\n\n tethers.push(this);\n\n this.history = [];\n\n this.setOptions(options, false);\n\n TetherBase.modules.forEach(function (module) {\n if (typeof module.initialize !== 'undefined') {\n module.initialize.call(_this);\n }\n });\n\n this.position();\n }\n\n _createClass(TetherClass, [{\n key: 'getClass',\n value: function getClass() {\n var key = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];\n var classes = this.options.classes;\n\n if (typeof classes !== 'undefined' && classes[key]) {\n return this.options.classes[key];\n } else if (this.options.classPrefix) {\n return this.options.classPrefix + '-' + key;\n } else {\n return key;\n }\n }\n }, {\n key: 'setOptions',\n value: function setOptions(options) {\n var _this2 = this;\n\n var pos = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];\n\n var defaults = {\n offset: '0 0',\n targetOffset: '0 0',\n targetAttachment: 'auto auto',\n classPrefix: 'tether'\n };\n\n this.options = extend(defaults, options);\n\n var _options = this.options;\n var element = _options.element;\n var target = _options.target;\n var targetModifier = _options.targetModifier;\n\n this.element = element;\n this.target = target;\n this.targetModifier = targetModifier;\n\n if (this.target === 'viewport') {\n this.target = document.body;\n this.targetModifier = 'visible';\n } else if (this.target === 'scroll-handle') {\n this.target = document.body;\n this.targetModifier = 'scroll-handle';\n }\n\n ['element', 'target'].forEach(function (key) {\n if (typeof _this2[key] === 'undefined') {\n throw new Error('Tether Error: Both element and target must be defined');\n }\n\n if (typeof _this2[key].jquery !== 'undefined') {\n _this2[key] = _this2[key][0];\n } else if (typeof _this2[key] === 'string') {\n _this2[key] = document.querySelector(_this2[key]);\n }\n });\n\n addClass(this.element, this.getClass('element'));\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, this.getClass('target'));\n }\n\n if (!this.options.attachment) {\n throw new Error('Tether Error: You must provide an attachment');\n }\n\n this.targetAttachment = parseAttachment(this.options.targetAttachment);\n this.attachment = parseAttachment(this.options.attachment);\n this.offset = parseOffset(this.options.offset);\n this.targetOffset = parseOffset(this.options.targetOffset);\n\n if (typeof this.scrollParents !== 'undefined') {\n this.disable();\n }\n\n if (this.targetModifier === 'scroll-handle') {\n this.scrollParents = [this.target];\n } else {\n this.scrollParents = getScrollParents(this.target);\n }\n\n if (!(this.options.enabled === false)) {\n this.enable(pos);\n }\n }\n }, {\n key: 'getTargetBounds',\n value: function getTargetBounds() {\n if (typeof this.targetModifier !== 'undefined') {\n if (this.targetModifier === 'visible') {\n if (this.target === document.body) {\n return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };\n } else {\n var bounds = getBounds(this.target);\n\n var out = {\n height: bounds.height,\n width: bounds.width,\n top: bounds.top,\n left: bounds.left\n };\n\n out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));\n out.height = Math.min(out.height, bounds.height - (bounds.top + bounds.height - (pageYOffset + innerHeight)));\n out.height = Math.min(innerHeight, out.height);\n out.height -= 2;\n\n out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));\n out.width = Math.min(out.width, bounds.width - (bounds.left + bounds.width - (pageXOffset + innerWidth)));\n out.width = Math.min(innerWidth, out.width);\n out.width -= 2;\n\n if (out.top < pageYOffset) {\n out.top = pageYOffset;\n }\n if (out.left < pageXOffset) {\n out.left = pageXOffset;\n }\n\n return out;\n }\n } else if (this.targetModifier === 'scroll-handle') {\n var bounds = undefined;\n var target = this.target;\n if (target === document.body) {\n target = document.documentElement;\n\n bounds = {\n left: pageXOffset,\n top: pageYOffset,\n height: innerHeight,\n width: innerWidth\n };\n } else {\n bounds = getBounds(target);\n }\n\n var style = getComputedStyle(target);\n\n var hasBottomScroll = target.scrollWidth > target.clientWidth || [style.overflow, style.overflowX].indexOf('scroll') >= 0 || this.target !== document.body;\n\n var scrollBottom = 0;\n if (hasBottomScroll) {\n scrollBottom = 15;\n }\n\n var height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;\n\n var out = {\n width: 15,\n height: height * 0.975 * (height / target.scrollHeight),\n left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15\n };\n\n var fitAdj = 0;\n if (height < 408 && this.target === document.body) {\n fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;\n }\n\n if (this.target !== document.body) {\n out.height = Math.max(out.height, 24);\n }\n\n var scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);\n out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);\n\n if (this.target === document.body) {\n out.height = Math.max(out.height, 24);\n }\n\n return out;\n }\n } else {\n return getBounds(this.target);\n }\n }\n }, {\n key: 'clearCache',\n value: function clearCache() {\n this._cache = {};\n }\n }, {\n key: 'cache',\n value: function cache(k, getter) {\n // More than one module will often need the same DOM info, so\n // we keep a cache which is cleared on each position call\n if (typeof this._cache === 'undefined') {\n this._cache = {};\n }\n\n if (typeof this._cache[k] === 'undefined') {\n this._cache[k] = getter.call(this);\n }\n\n return this._cache[k];\n }\n }, {\n key: 'enable',\n value: function enable() {\n var _this3 = this;\n\n var pos = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, this.getClass('enabled'));\n }\n addClass(this.element, this.getClass('enabled'));\n this.enabled = true;\n\n this.scrollParents.forEach(function (parent) {\n if (parent !== _this3.target.ownerDocument) {\n parent.addEventListener('scroll', _this3.position);\n }\n });\n\n if (pos) {\n this.position();\n }\n }\n }, {\n key: 'disable',\n value: function disable() {\n var _this4 = this;\n\n removeClass(this.target, this.getClass('enabled'));\n removeClass(this.element, this.getClass('enabled'));\n this.enabled = false;\n\n if (typeof this.scrollParents !== 'undefined') {\n this.scrollParents.forEach(function (parent) {\n parent.removeEventListener('scroll', _this4.position);\n });\n }\n }\n }, {\n key: 'destroy',\n value: function destroy() {\n var _this5 = this;\n\n this.disable();\n\n tethers.forEach(function (tether, i) {\n if (tether === _this5) {\n tethers.splice(i, 1);\n }\n });\n\n // Remove any elements we were using for convenience from the DOM\n if (tethers.length === 0) {\n removeUtilElements();\n }\n }\n }, {\n key: 'updateAttachClasses',\n value: function updateAttachClasses(elementAttach, targetAttach) {\n var _this6 = this;\n\n elementAttach = elementAttach || this.attachment;\n targetAttach = targetAttach || this.targetAttachment;\n var sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];\n\n if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {\n // updateAttachClasses can be called more than once in a position call, so\n // we need to clean up after ourselves such that when the last defer gets\n // ran it doesn't add any extra classes from previous calls.\n this._addAttachClasses.splice(0, this._addAttachClasses.length);\n }\n\n if (typeof this._addAttachClasses === 'undefined') {\n this._addAttachClasses = [];\n }\n var add = this._addAttachClasses;\n\n if (elementAttach.top) {\n add.push(this.getClass('element-attached') + '-' + elementAttach.top);\n }\n if (elementAttach.left) {\n add.push(this.getClass('element-attached') + '-' + elementAttach.left);\n }\n if (targetAttach.top) {\n add.push(this.getClass('target-attached') + '-' + targetAttach.top);\n }\n if (targetAttach.left) {\n add.push(this.getClass('target-attached') + '-' + targetAttach.left);\n }\n\n var all = [];\n sides.forEach(function (side) {\n all.push(_this6.getClass('element-attached') + '-' + side);\n all.push(_this6.getClass('target-attached') + '-' + side);\n });\n\n defer(function () {\n if (!(typeof _this6._addAttachClasses !== 'undefined')) {\n return;\n }\n\n updateClasses(_this6.element, _this6._addAttachClasses, all);\n if (!(_this6.options.addTargetClasses === false)) {\n updateClasses(_this6.target, _this6._addAttachClasses, all);\n }\n\n delete _this6._addAttachClasses;\n });\n }\n }, {\n key: 'position',\n value: function position() {\n var _this7 = this;\n\n var flushChanges = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\n\n // flushChanges commits the changes immediately, leave true unless you are positioning multiple\n // tethers (in which case call Tether.Utils.flush yourself when you're done)\n\n if (!this.enabled) {\n return;\n }\n\n this.clearCache();\n\n // Turn 'auto' attachments into the appropriate corner or edge\n var targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);\n\n this.updateAttachClasses(this.attachment, targetAttachment);\n\n var elementPos = this.cache('element-bounds', function () {\n return getBounds(_this7.element);\n });\n\n var width = elementPos.width;\n var height = elementPos.height;\n\n if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {\n var _lastSize = this.lastSize;\n\n // We cache the height and width to make it possible to position elements that are\n // getting hidden.\n width = _lastSize.width;\n height = _lastSize.height;\n } else {\n this.lastSize = { width: width, height: height };\n }\n\n var targetPos = this.cache('target-bounds', function () {\n return _this7.getTargetBounds();\n });\n var targetSize = targetPos;\n\n // Get an actual px offset from the attachment\n var offset = offsetToPx(attachmentToOffset(this.attachment), { width: width, height: height });\n var targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);\n\n var manualOffset = offsetToPx(this.offset, { width: width, height: height });\n var manualTargetOffset = offsetToPx(this.targetOffset, targetSize);\n\n // Add the manually provided offset\n offset = addOffset(offset, manualOffset);\n targetOffset = addOffset(targetOffset, manualTargetOffset);\n\n // It's now our goal to make (element position + offset) == (target position + target offset)\n var left = targetPos.left + targetOffset.left - offset.left;\n var top = targetPos.top + targetOffset.top - offset.top;\n\n for (var i = 0; i < TetherBase.modules.length; ++i) {\n var _module2 = TetherBase.modules[i];\n var ret = _module2.position.call(this, {\n left: left,\n top: top,\n targetAttachment: targetAttachment,\n targetPos: targetPos,\n elementPos: elementPos,\n offset: offset,\n targetOffset: targetOffset,\n manualOffset: manualOffset,\n manualTargetOffset: manualTargetOffset,\n scrollbarSize: scrollbarSize,\n attachment: this.attachment\n });\n\n if (ret === false) {\n return false;\n } else if (typeof ret === 'undefined' || typeof ret !== 'object') {\n continue;\n } else {\n top = ret.top;\n left = ret.left;\n }\n }\n\n // We describe the position three different ways to give the optimizer\n // a chance to decide the best possible way to position the element\n // with the fewest repaints.\n var next = {\n // It's position relative to the page (absolute positioning when\n // the element is a child of the body)\n page: {\n top: top,\n left: left\n },\n\n // It's position relative to the viewport (fixed positioning)\n viewport: {\n top: top - pageYOffset,\n bottom: pageYOffset - top - height + innerHeight,\n left: left - pageXOffset,\n right: pageXOffset - left - width + innerWidth\n }\n };\n\n var doc = this.target.ownerDocument;\n var win = doc.defaultView;\n\n var scrollbarSize = undefined;\n if (win.innerHeight > doc.documentElement.clientHeight) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.bottom -= scrollbarSize.height;\n }\n\n if (win.innerWidth > doc.documentElement.clientWidth) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.right -= scrollbarSize.width;\n }\n\n if (['', 'static'].indexOf(doc.body.style.position) === -1 || ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {\n // Absolute positioning in the body will be relative to the page, not the 'initial containing block'\n next.page.bottom = doc.body.scrollHeight - top - height;\n next.page.right = doc.body.scrollWidth - left - width;\n }\n\n if (typeof this.options.optimizations !== 'undefined' && this.options.optimizations.moveElement !== false && !(typeof this.targetModifier !== 'undefined')) {\n (function () {\n var offsetParent = _this7.cache('target-offsetparent', function () {\n return getOffsetParent(_this7.target);\n });\n var offsetPosition = _this7.cache('target-offsetparent-bounds', function () {\n return getBounds(offsetParent);\n });\n var offsetParentStyle = getComputedStyle(offsetParent);\n var offsetParentSize = offsetPosition;\n\n var offsetBorder = {};\n ['Top', 'Left', 'Bottom', 'Right'].forEach(function (side) {\n offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle['border' + side + 'Width']);\n });\n\n offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;\n offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;\n\n if (next.page.top >= offsetPosition.top + offsetBorder.top && next.page.bottom >= offsetPosition.bottom) {\n if (next.page.left >= offsetPosition.left + offsetBorder.left && next.page.right >= offsetPosition.right) {\n // We're within the visible part of the target's scroll parent\n var scrollTop = offsetParent.scrollTop;\n var scrollLeft = offsetParent.scrollLeft;\n\n // It's position relative to the target's offset parent (absolute positioning when\n // the element is moved to be a child of the target's offset parent).\n next.offset = {\n top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,\n left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left\n };\n }\n }\n })();\n }\n\n // We could also travel up the DOM and try each containing context, rather than only\n // looking at the body, but we're gonna get diminishing returns.\n\n this.move(next);\n\n this.history.unshift(next);\n\n if (this.history.length > 3) {\n this.history.pop();\n }\n\n if (flushChanges) {\n flush();\n }\n\n return true;\n }\n\n // THE ISSUE\n }, {\n key: 'move',\n value: function move(pos) {\n var _this8 = this;\n\n if (!(typeof this.element.parentNode !== 'undefined')) {\n return;\n }\n\n var same = {};\n\n for (var type in pos) {\n same[type] = {};\n\n for (var key in pos[type]) {\n var found = false;\n\n for (var i = 0; i < this.history.length; ++i) {\n var point = this.history[i];\n if (typeof point[type] !== 'undefined' && !within(point[type][key], pos[type][key])) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n same[type][key] = true;\n }\n }\n }\n\n var css = { top: '', left: '', right: '', bottom: '' };\n\n var transcribe = function transcribe(_same, _pos) {\n var hasOptimizations = typeof _this8.options.optimizations !== 'undefined';\n var gpu = hasOptimizations ? _this8.options.optimizations.gpu : null;\n if (gpu !== false) {\n var yPos = undefined,\n xPos = undefined;\n if (_same.top) {\n css.top = 0;\n yPos = _pos.top;\n } else {\n css.bottom = 0;\n yPos = -_pos.bottom;\n }\n\n if (_same.left) {\n css.left = 0;\n xPos = _pos.left;\n } else {\n css.right = 0;\n xPos = -_pos.right;\n }\n\n if (window.matchMedia) {\n // HubSpot/tether#207\n var retina = window.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;\n if (!retina) {\n xPos = Math.round(xPos);\n yPos = Math.round(yPos);\n }\n }\n\n css[transformKey] = 'translateX(' + xPos + 'px) translateY(' + yPos + 'px)';\n\n if (transformKey !== 'msTransform') {\n // The Z transform will keep this in the GPU (faster, and prevents artifacts),\n // but IE9 doesn't support 3d transforms and will choke.\n css[transformKey] += \" translateZ(0)\";\n }\n } else {\n if (_same.top) {\n css.top = _pos.top + 'px';\n } else {\n css.bottom = _pos.bottom + 'px';\n }\n\n if (_same.left) {\n css.left = _pos.left + 'px';\n } else {\n css.right = _pos.right + 'px';\n }\n }\n };\n\n var moved = false;\n if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {\n css.position = 'absolute';\n transcribe(same.page, pos.page);\n } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {\n css.position = 'fixed';\n transcribe(same.viewport, pos.viewport);\n } else if (typeof same.offset !== 'undefined' && same.offset.top && same.offset.left) {\n (function () {\n css.position = 'absolute';\n var offsetParent = _this8.cache('target-offsetparent', function () {\n return getOffsetParent(_this8.target);\n });\n\n if (getOffsetParent(_this8.element) !== offsetParent) {\n defer(function () {\n _this8.element.parentNode.removeChild(_this8.element);\n offsetParent.appendChild(_this8.element);\n });\n }\n\n transcribe(same.offset, pos.offset);\n moved = true;\n })();\n } else {\n css.position = 'absolute';\n transcribe({ top: true, left: true }, pos.page);\n }\n\n if (!moved) {\n if (this.options.bodyElement) {\n this.options.bodyElement.appendChild(this.element);\n } else {\n var offsetParentIsBody = true;\n var currentNode = this.element.parentNode;\n while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY') {\n if (getComputedStyle(currentNode).position !== 'static') {\n offsetParentIsBody = false;\n break;\n }\n\n currentNode = currentNode.parentNode;\n }\n\n if (!offsetParentIsBody) {\n this.element.parentNode.removeChild(this.element);\n this.element.ownerDocument.body.appendChild(this.element);\n }\n }\n }\n\n // Any css change will trigger a repaint, so let's avoid one if nothing changed\n var writeCSS = {};\n var write = false;\n for (var key in css) {\n var val = css[key];\n var elVal = this.element.style[key];\n\n if (elVal !== val) {\n write = true;\n writeCSS[key] = val;\n }\n }\n\n if (write) {\n defer(function () {\n extend(_this8.element.style, writeCSS);\n _this8.trigger('repositioned');\n });\n }\n }\n }]);\n\n return TetherClass;\n})(Evented);\n\nTetherClass.modules = [];\n\nTetherBase.position = position;\n\nvar Tether = extend(TetherClass, TetherBase);\n/* globals TetherBase */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar extend = _TetherBase$Utils.extend;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\n\nvar BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];\n\nfunction getBoundingRect(tether, to) {\n if (to === 'scrollParent') {\n to = tether.scrollParents[0];\n } else if (to === 'window') {\n to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];\n }\n\n if (to === document) {\n to = to.documentElement;\n }\n\n if (typeof to.nodeType !== 'undefined') {\n (function () {\n var node = to;\n var size = getBounds(to);\n var pos = size;\n var style = getComputedStyle(to);\n\n to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];\n\n // Account any parent Frames scroll offset\n if (node.ownerDocument !== document) {\n var win = node.ownerDocument.defaultView;\n to[0] += win.pageXOffset;\n to[1] += win.pageYOffset;\n to[2] += win.pageXOffset;\n to[3] += win.pageYOffset;\n }\n\n BOUNDS_FORMAT.forEach(function (side, i) {\n side = side[0].toUpperCase() + side.substr(1);\n if (side === 'Top' || side === 'Left') {\n to[i] += parseFloat(style['border' + side + 'Width']);\n } else {\n to[i] -= parseFloat(style['border' + side + 'Width']);\n }\n });\n })();\n }\n\n return to;\n}\n\nTetherBase.modules.push({\n position: function position(_ref) {\n var _this = this;\n\n var top = _ref.top;\n var left = _ref.left;\n var targetAttachment = _ref.targetAttachment;\n\n if (!this.options.constraints) {\n return true;\n }\n\n var _cache = this.cache('element-bounds', function () {\n return getBounds(_this.element);\n });\n\n var height = _cache.height;\n var width = _cache.width;\n\n if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {\n var _lastSize = this.lastSize;\n\n // Handle the item getting hidden as a result of our positioning without glitching\n // the classes in and out\n width = _lastSize.width;\n height = _lastSize.height;\n }\n\n var targetSize = this.cache('target-bounds', function () {\n return _this.getTargetBounds();\n });\n\n var targetHeight = targetSize.height;\n var targetWidth = targetSize.width;\n\n var allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];\n\n this.options.constraints.forEach(function (constraint) {\n var outOfBoundsClass = constraint.outOfBoundsClass;\n var pinnedClass = constraint.pinnedClass;\n\n if (outOfBoundsClass) {\n allClasses.push(outOfBoundsClass);\n }\n if (pinnedClass) {\n allClasses.push(pinnedClass);\n }\n });\n\n allClasses.forEach(function (cls) {\n ['left', 'top', 'right', 'bottom'].forEach(function (side) {\n allClasses.push(cls + '-' + side);\n });\n });\n\n var addClasses = [];\n\n var tAttachment = extend({}, targetAttachment);\n var eAttachment = extend({}, this.attachment);\n\n this.options.constraints.forEach(function (constraint) {\n var to = constraint.to;\n var attachment = constraint.attachment;\n var pin = constraint.pin;\n\n if (typeof attachment === 'undefined') {\n attachment = '';\n }\n\n var changeAttachX = undefined,\n changeAttachY = undefined;\n if (attachment.indexOf(' ') >= 0) {\n var _attachment$split = attachment.split(' ');\n\n var _attachment$split2 = _slicedToArray(_attachment$split, 2);\n\n changeAttachY = _attachment$split2[0];\n changeAttachX = _attachment$split2[1];\n } else {\n changeAttachX = changeAttachY = attachment;\n }\n\n var bounds = getBoundingRect(_this, to);\n\n if (changeAttachY === 'target' || changeAttachY === 'both') {\n if (top < bounds[1] && tAttachment.top === 'top') {\n top += targetHeight;\n tAttachment.top = 'bottom';\n }\n\n if (top + height > bounds[3] && tAttachment.top === 'bottom') {\n top -= targetHeight;\n tAttachment.top = 'top';\n }\n }\n\n if (changeAttachY === 'together') {\n if (tAttachment.top === 'top') {\n if (eAttachment.top === 'bottom' && top < bounds[1]) {\n top += targetHeight;\n tAttachment.top = 'bottom';\n\n top += height;\n eAttachment.top = 'top';\n } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {\n top -= height - targetHeight;\n tAttachment.top = 'bottom';\n\n eAttachment.top = 'bottom';\n }\n }\n\n if (tAttachment.top === 'bottom') {\n if (eAttachment.top === 'top' && top + height > bounds[3]) {\n top -= targetHeight;\n tAttachment.top = 'top';\n\n top -= height;\n eAttachment.top = 'bottom';\n } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {\n top += height - targetHeight;\n tAttachment.top = 'top';\n\n eAttachment.top = 'top';\n }\n }\n\n if (tAttachment.top === 'middle') {\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n } else if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n }\n }\n\n if (changeAttachX === 'target' || changeAttachX === 'both') {\n if (left < bounds[0] && tAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n }\n\n if (left + width > bounds[2] && tAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n }\n }\n\n if (changeAttachX === 'together') {\n if (left < bounds[0] && tAttachment.left === 'left') {\n if (eAttachment.left === 'right') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left += width;\n eAttachment.left = 'left';\n } else if (eAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left -= width;\n eAttachment.left = 'right';\n }\n } else if (left + width > bounds[2] && tAttachment.left === 'right') {\n if (eAttachment.left === 'left') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left -= width;\n eAttachment.left = 'right';\n } else if (eAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left += width;\n eAttachment.left = 'left';\n }\n } else if (tAttachment.left === 'center') {\n if (left + width > bounds[2] && eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n } else if (left < bounds[0] && eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n }\n }\n }\n\n if (changeAttachY === 'element' || changeAttachY === 'both') {\n if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n }\n }\n\n if (changeAttachX === 'element' || changeAttachX === 'both') {\n if (left < bounds[0]) {\n if (eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n } else if (eAttachment.left === 'center') {\n left += width / 2;\n eAttachment.left = 'left';\n }\n }\n\n if (left + width > bounds[2]) {\n if (eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n } else if (eAttachment.left === 'center') {\n left -= width / 2;\n eAttachment.left = 'right';\n }\n }\n }\n\n if (typeof pin === 'string') {\n pin = pin.split(',').map(function (p) {\n return p.trim();\n });\n } else if (pin === true) {\n pin = ['top', 'left', 'right', 'bottom'];\n }\n\n pin = pin || [];\n\n var pinned = [];\n var oob = [];\n\n if (top < bounds[1]) {\n if (pin.indexOf('top') >= 0) {\n top = bounds[1];\n pinned.push('top');\n } else {\n oob.push('top');\n }\n }\n\n if (top + height > bounds[3]) {\n if (pin.indexOf('bottom') >= 0) {\n top = bounds[3] - height;\n pinned.push('bottom');\n } else {\n oob.push('bottom');\n }\n }\n\n if (left < bounds[0]) {\n if (pin.indexOf('left') >= 0) {\n left = bounds[0];\n pinned.push('left');\n } else {\n oob.push('left');\n }\n }\n\n if (left + width > bounds[2]) {\n if (pin.indexOf('right') >= 0) {\n left = bounds[2] - width;\n pinned.push('right');\n } else {\n oob.push('right');\n }\n }\n\n if (pinned.length) {\n (function () {\n var pinnedClass = undefined;\n if (typeof _this.options.pinnedClass !== 'undefined') {\n pinnedClass = _this.options.pinnedClass;\n } else {\n pinnedClass = _this.getClass('pinned');\n }\n\n addClasses.push(pinnedClass);\n pinned.forEach(function (side) {\n addClasses.push(pinnedClass + '-' + side);\n });\n })();\n }\n\n if (oob.length) {\n (function () {\n var oobClass = undefined;\n if (typeof _this.options.outOfBoundsClass !== 'undefined') {\n oobClass = _this.options.outOfBoundsClass;\n } else {\n oobClass = _this.getClass('out-of-bounds');\n }\n\n addClasses.push(oobClass);\n oob.forEach(function (side) {\n addClasses.push(oobClass + '-' + side);\n });\n })();\n }\n\n if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {\n eAttachment.left = tAttachment.left = false;\n }\n if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {\n eAttachment.top = tAttachment.top = false;\n }\n\n if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== _this.attachment.top || eAttachment.left !== _this.attachment.left) {\n _this.updateAttachClasses(eAttachment, tAttachment);\n _this.trigger('update', {\n attachment: eAttachment,\n targetAttachment: tAttachment\n });\n }\n });\n\n defer(function () {\n if (!(_this.options.addTargetClasses === false)) {\n updateClasses(_this.target, addClasses, allClasses);\n }\n updateClasses(_this.element, addClasses, allClasses);\n });\n\n return { top: top, left: left };\n }\n});\n/* globals TetherBase */\n\n'use strict';\n\nvar _TetherBase$Utils = TetherBase.Utils;\nvar getBounds = _TetherBase$Utils.getBounds;\nvar updateClasses = _TetherBase$Utils.updateClasses;\nvar defer = _TetherBase$Utils.defer;\n\nTetherBase.modules.push({\n position: function position(_ref) {\n var _this = this;\n\n var top = _ref.top;\n var left = _ref.left;\n\n var _cache = this.cache('element-bounds', function () {\n return getBounds(_this.element);\n });\n\n var height = _cache.height;\n var width = _cache.width;\n\n var targetPos = this.getTargetBounds();\n\n var bottom = top + height;\n var right = left + width;\n\n var abutted = [];\n if (top <= targetPos.bottom && bottom >= targetPos.top) {\n ['left', 'right'].forEach(function (side) {\n var targetPosSide = targetPos[side];\n if (targetPosSide === left || targetPosSide === right) {\n abutted.push(side);\n }\n });\n }\n\n if (left <= targetPos.right && right >= targetPos.left) {\n ['top', 'bottom'].forEach(function (side) {\n var targetPosSide = targetPos[side];\n if (targetPosSide === top || targetPosSide === bottom) {\n abutted.push(side);\n }\n });\n }\n\n var allClasses = [];\n var addClasses = [];\n\n var sides = ['left', 'top', 'right', 'bottom'];\n allClasses.push(this.getClass('abutted'));\n sides.forEach(function (side) {\n allClasses.push(_this.getClass('abutted') + '-' + side);\n });\n\n if (abutted.length) {\n addClasses.push(this.getClass('abutted'));\n }\n\n abutted.forEach(function (side) {\n addClasses.push(_this.getClass('abutted') + '-' + side);\n });\n\n defer(function () {\n if (!(_this.options.addTargetClasses === false)) {\n updateClasses(_this.target, addClasses, allClasses);\n }\n updateClasses(_this.element, addClasses, allClasses);\n });\n\n return true;\n }\n});\n/* globals TetherBase */\n\n'use strict';\n\nvar _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\n\nTetherBase.modules.push({\n position: function position(_ref) {\n var top = _ref.top;\n var left = _ref.left;\n\n if (!this.options.shift) {\n return;\n }\n\n var shift = this.options.shift;\n if (typeof this.options.shift === 'function') {\n shift = this.options.shift.call(this, { top: top, left: left });\n }\n\n var shiftTop = undefined,\n shiftLeft = undefined;\n if (typeof shift === 'string') {\n shift = shift.split(' ');\n shift[1] = shift[1] || shift[0];\n\n var _shift = shift;\n\n var _shift2 = _slicedToArray(_shift, 2);\n\n shiftTop = _shift2[0];\n shiftLeft = _shift2[1];\n\n shiftTop = parseFloat(shiftTop, 10);\n shiftLeft = parseFloat(shiftLeft, 10);\n } else {\n shiftTop = shift.top;\n shiftLeft = shift.left;\n }\n\n top += shiftTop;\n left += shiftLeft;\n\n return { top: top, left: left };\n }\n});\nreturn Tether;\n\n}));\n","/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n\n\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n\n/******/ \t// identity function for calling harmory imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n\n/******/ \t// define getter function for harmory exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tObject.defineProperty(exports, name, {\n/******/ \t\t\tconfigurable: false,\n/******/ \t\t\tenumerable: true,\n/******/ \t\t\tget: getter\n/******/ \t\t});\n/******/ \t};\n\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 53);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\neval(\"/*\\r\\n\\tMIT License http://www.opensource.org/licenses/mit-license.php\\r\\n\\tAuthor Tobias Koppers @sokra\\r\\n*/\\r\\n// css base code, injected by the css-loader\\r\\nmodule.exports = function() {\\r\\n\\tvar list = [];\\r\\n\\r\\n\\t// return the list of modules as css string\\r\\n\\tlist.toString = function toString() {\\r\\n\\t\\tvar result = [];\\r\\n\\t\\tfor(var i = 0; i < this.length; i++) {\\r\\n\\t\\t\\tvar item = this[i];\\r\\n\\t\\t\\tif(item[2]) {\\r\\n\\t\\t\\t\\tresult.push(\\\"@media \\\" + item[2] + \\\"{\\\" + item[1] + \\\"}\\\");\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\tresult.push(item[1]);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn result.join(\\\"\\\");\\r\\n\\t};\\r\\n\\r\\n\\t// import a list of modules into the list\\r\\n\\tlist.i = function(modules, mediaQuery) {\\r\\n\\t\\tif(typeof modules === \\\"string\\\")\\r\\n\\t\\t\\tmodules = [[null, modules, \\\"\\\"]];\\r\\n\\t\\tvar alreadyImportedModules = {};\\r\\n\\t\\tfor(var i = 0; i < this.length; i++) {\\r\\n\\t\\t\\tvar id = this[i][0];\\r\\n\\t\\t\\tif(typeof id === \\\"number\\\")\\r\\n\\t\\t\\t\\talreadyImportedModules[id] = true;\\r\\n\\t\\t}\\r\\n\\t\\tfor(i = 0; i < modules.length; i++) {\\r\\n\\t\\t\\tvar item = modules[i];\\r\\n\\t\\t\\t// skip already imported module\\r\\n\\t\\t\\t// this implementation is not 100% perfect for weird media query combinations\\r\\n\\t\\t\\t// when a module is imported multiple times with different media queries.\\r\\n\\t\\t\\t// I hope this will never occur (Hey this way we have smaller bundles)\\r\\n\\t\\t\\tif(typeof item[0] !== \\\"number\\\" || !alreadyImportedModules[item[0]]) {\\r\\n\\t\\t\\t\\tif(mediaQuery && !item[2]) {\\r\\n\\t\\t\\t\\t\\titem[2] = mediaQuery;\\r\\n\\t\\t\\t\\t} else if(mediaQuery) {\\r\\n\\t\\t\\t\\t\\titem[2] = \\\"(\\\" + item[2] + \\\") and (\\\" + mediaQuery + \\\")\\\";\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\tlist.push(item);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t};\\r\\n\\treturn list;\\r\\n};\\r\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL34vY3NzLWxvYWRlci9saWIvY3NzLWJhc2UuanM/ZGEwNCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG5cdE1JVCBMaWNlbnNlIGh0dHA6Ly93d3cub3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvbWl0LWxpY2Vuc2UucGhwXHJcblx0QXV0aG9yIFRvYmlhcyBLb3BwZXJzIEBzb2tyYVxyXG4qL1xyXG4vLyBjc3MgYmFzZSBjb2RlLCBpbmplY3RlZCBieSB0aGU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y8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2Nzcy1sb2FkZXIvbGliL2Nzcy1iYXNlLmpzXG4vLyBtb2R1bGUgaWQgPSAwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\neval(\"module.exports = function normalizeComponent (\\n rawScriptExports,\\n compiledTemplate,\\n scopeId,\\n cssModules\\n) {\\n var esModule\\n var scriptExports = rawScriptExports = rawScriptExports || {}\\n\\n // ES6 modules interop\\n var type = typeof rawScriptExports.default\\n if (type === 'object' || type === 'function') {\\n esModule = rawScriptExports\\n scriptExports = rawScriptExports.default\\n }\\n\\n // Vue.extend constructor export interop\\n var options = typeof scriptExports === 'function'\\n ? scriptExports.options\\n : scriptExports\\n\\n // render functions\\n if (compiledTemplate) {\\n options.render = compiledTemplate.render\\n options.staticRenderFns = compiledTemplate.staticRenderFns\\n }\\n\\n // scopedId\\n if (scopeId) {\\n options._scopeId = scopeId\\n }\\n\\n // inject cssModules\\n if (cssModules) {\\n var computed = options.computed || (options.computed = {})\\n Object.keys(cssModules).forEach(function (key) {\\n var module = cssModules[key]\\n computed[key] = function () { return module }\\n })\\n }\\n\\n return {\\n esModule: esModule,\\n exports: scriptExports,\\n options: options\\n }\\n}\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL34vdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vcm1hbGl6ZXIuanM/ZDRmMyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIG5vcm1hbGl6ZUNvbXBvbmVudCAoXG4gIHJhd1NjcmlwdEV4cG9ydHMsXG4gIGNvbXBpbGVkVGVtcGxhdGUsXG4gIHNjb3BlSWQsXG4gIGNzc01vZHVsZXNcbikge1xuICB2YXIgZXNNb2R1bGVcbiAgdmFyIHNjcmlwdEV4cG9ydHMgPSByYXdTY3JpcHRFeHBvcnRzID0gcmF3U2NyaXB0RXhwb3J0cyB8fCB7fVxuXG4gIC8vIEVTNiBtb2R1bGVzIGludGVyb3BcbiAgdmFyIHR5cGUgPSB0eXBlb2YgcmF3U2NyaXB0RXhwb3J0cy5kZWZhdWx0XG4gIGlmICh0eXBlID09PSAnb2JqZWN0JyB8fCB0eXBlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgZXNNb2R1bGUgPSByYXdTY3JpcHRFeHBvcnRzXG4gICAgc2NyaXB0RXhwb3J0cyA9IHJhd1NjcmlwdEV4cG9ydHMuZGVmYXVsdFxuICB9XG5cbiAgLy8gVnVlLmV4dGVuZCBjb25zdHJ1Y3RvciBleHBvcnQgaW50ZXJvcFxuICB2YXIgb3B0aW9ucyA9IHR5cGVvZiBzY3JpcHRFeHBvcnRzID09PSAnZnVuY3Rpb24nXG4gICAgPyBzY3JpcHRFeHBvcnRzLm9wdGlvbnNcbiAgICA6IHNjcmlwdEV4cG9ydHNcblxuICAvLyByZW5kZXIgZnVuY3Rpb25zXG4gIGlmIChjb21waWxlZFRlbXBsYXRlKSB7XG4gICAgb3B0aW9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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"/*\\n MIT License http://www.opensource.org/licenses/mit-license.php\\n Author Tobias Koppers @sokra\\n Modified by Evan You @yyx990803\\n*/\\n\\nvar hasDocument = typeof document !== 'undefined'\\n\\nif (typeof DEBUG !== 'undefined' && DEBUG) {\\n if (!hasDocument) {\\n throw new Error(\\n 'vue-style-loader cannot be used in a non-browser environment. ' +\\n \\\"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\\\"\\n ) }\\n}\\n\\nvar listToStyles = __webpack_require__(48)\\n\\n/*\\ntype StyleObject = {\\n id: number;\\n parts: Array<StyleObjectPart>\\n}\\n\\ntype StyleObjectPart = {\\n css: string;\\n media: string;\\n sourceMap: ?string\\n}\\n*/\\n\\nvar stylesInDom = {/*\\n [id: number]: {\\n id: number,\\n refs: number,\\n parts: Array<(obj?: StyleObjectPart) => void>\\n }\\n*/}\\n\\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\\nvar singletonElement = null\\nvar singletonCounter = 0\\nvar isProduction = false\\nvar noop = function () {}\\n\\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\\n// tags it will allow on a page\\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\\\b/.test(navigator.userAgent.toLowerCase())\\n\\nmodule.exports = function (parentId, list, _isProduction) {\\n isProduction = _isProduction\\n\\n var styles = listToStyles(parentId, list)\\n addStylesToDom(styles)\\n\\n return function update (newList) {\\n var mayRemove = []\\n for (var i = 0; i < styles.length; i++) {\\n var item = styles[i]\\n var domStyle = stylesInDom[item.id]\\n domStyle.refs--\\n mayRemove.push(domStyle)\\n }\\n if (newList) {\\n styles = listToStyles(parentId, newList)\\n addStylesToDom(styles)\\n } else {\\n styles = []\\n }\\n for (var i = 0; i < mayRemove.length; i++) {\\n var domStyle = mayRemove[i]\\n if (domStyle.refs === 0) {\\n for (var j = 0; j < domStyle.parts.length; j++) {\\n domStyle.parts[j]()\\n }\\n delete stylesInDom[domStyle.id]\\n }\\n }\\n }\\n}\\n\\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\\n for (var i = 0; i < styles.length; i++) {\\n var item = styles[i]\\n var domStyle = stylesInDom[item.id]\\n if (domStyle) {\\n domStyle.refs++\\n for (var j = 0; j < domStyle.parts.length; j++) {\\n domStyle.parts[j](item.parts[j])\\n }\\n for (; j < item.parts.length; j++) {\\n domStyle.parts.push(addStyle(item.parts[j]))\\n }\\n if (domStyle.parts.length > item.parts.length) {\\n domStyle.parts.length = item.parts.length\\n }\\n } else {\\n var parts = []\\n for (var j = 0; j < item.parts.length; j++) {\\n parts.push(addStyle(item.parts[j]))\\n }\\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\\n }\\n }\\n}\\n\\nfunction listToStyles (parentId, list) {\\n var styles = []\\n var newStyles = {}\\n for (var i = 0; i < list.length; i++) {\\n var item = list[i]\\n var id = item[0]\\n var css = item[1]\\n var media = item[2]\\n var sourceMap = item[3]\\n var part = { css: css, media: media, sourceMap: sourceMap }\\n if (!newStyles[id]) {\\n part.id = parentId + ':0'\\n styles.push(newStyles[id] = { id: id, parts: [part] })\\n } else {\\n part.id = parentId + ':' + newStyles[id].parts.length\\n newStyles[id].parts.push(part)\\n }\\n }\\n return styles\\n}\\n\\nfunction createStyleElement () {\\n var styleElement = document.createElement('style')\\n styleElement.type = 'text/css'\\n head.appendChild(styleElement)\\n return styleElement\\n}\\n\\nfunction addStyle (obj /* StyleObjectPart */) {\\n var update, remove\\n var styleElement = document.querySelector('style[data-vue-ssr-id~=\\\"' + obj.id + '\\\"]')\\n var hasSSR = styleElement != null\\n\\n // if in production mode and style is already provided by SSR,\\n // simply do nothing.\\n if (hasSSR && isProduction) {\\n return noop\\n }\\n\\n if (isOldIE) {\\n // use singleton mode for IE9.\\n var styleIndex = singletonCounter++\\n styleElement = singletonElement || (singletonElement = createStyleElement())\\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\\n } else {\\n // use multi-style-tag mode in all other cases\\n styleElement = styleElement || createStyleElement()\\n update = applyToTag.bind(null, styleElement)\\n remove = function () {\\n styleElement.parentNode.removeChild(styleElement)\\n }\\n }\\n\\n if (!hasSSR) {\\n update(obj)\\n }\\n\\n return function updateStyle (newObj /* StyleObjectPart */) {\\n if (newObj) {\\n if (newObj.css === obj.css &&\\n newObj.media === obj.media &&\\n newObj.sourceMap === obj.sourceMap) {\\n return\\n }\\n update(obj = newObj)\\n } else {\\n remove()\\n }\\n }\\n}\\n\\nvar replaceText = (function () {\\n var textStore = []\\n\\n return function (index, replacement) {\\n textStore[index] = replacement\\n return textStore.filter(Boolean).join('\\\\n')\\n }\\n})()\\n\\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\\n var css = remove ? '' : obj.css\\n\\n if (styleElement.styleSheet) {\\n styleElement.styleSheet.cssText = replaceText(index, css)\\n } else {\\n var cssNode = document.createTextNode(css)\\n var childNodes = styleElement.childNodes\\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\\n if (childNodes.length) {\\n styleElement.insertBefore(cssNode, childNodes[index])\\n } else {\\n styleElement.appendChild(cssNode)\\n }\\n }\\n}\\n\\nfunction applyToTag (styleElement, obj) {\\n var css = obj.css\\n var media = obj.media\\n var sourceMap = obj.sourceMap\\n\\n if (media) {\\n styleElement.setAttribute('media', media)\\n }\\n\\n if (sourceMap) {\\n // https://developer.chrome.com/devtools/docs/javascript-debugging\\n // this makes source maps inside style tags work properly in Chrome\\n css += '\\\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\\n // http://stackoverflow.com/a/26603875\\n css += '\\\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\\n }\\n\\n if (styleElement.styleSheet) {\\n styleElement.styleSheet.cssText = css\\n } else {\\n while (styleElement.firstChild) {\\n styleElement.removeChild(styleElement.firstChild)\\n }\\n styleElement.appendChild(document.createTextNode(css))\\n }\\n}\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL34vdnVlLWxvYWRlci9+L3Z1ZS1zdHlsZS1sb2FkZXIvbGliL2FkZFN0eWxlc0NsaWVudC5qcz9jMGJiIl0sInNvdXJjZXNDb250ZW50IjpbIi8qXG4gIE1JVCBMaWNlbnNlIGh0dHA6Ly93d3cub3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvbWl0LWxpY2Vuc2UucGhwXG4gIEF1dGhvciBUb2JpYXMgS29wcGVycyBAc29rcmFcbiAgTW9kaWZpZWQgYnkgRXZhbiBZb3UgQHl5eDk5MDgwM1xuKi9cblxudmFyIGhhc0RvY3VtZW50ID0gdHlwZW9mIGRvY3VtZW50ICE9PSAndW5kZWZpbmVkJ1xuXG5pZiAodHlwZW9mIERFQlVHICE9PSAndW5kZWZpbmVkJyAmJiBERUJVRykge1xuICBpZiAoIWhhc0RvY3VtZW50KSB7XG4gICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICd2dWUtc3R5bGUtbG9hZGVyIGNhbm5vdCBiZSB1c2VkIGluIGEgbm9uLWJyb3dzZXIgZW52aXJvbm1lbnQuICcgK1xuICAgIFwiVXNlIHsgdGFyZ2V0OiAnbm9kZScgfSBpbiB5b3VyIFdlYnBhY2sgY29uZmlnIHRvIGluZGljYXRlIGEgc2VydmVyLXJlbmRlcmluZyBlbnZpcm9ubWVudC5cIlxuICApIH1cbn1cblxudmFyIGxpc3RUb1N0e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NBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\\n * jQuery JavaScript Library v3.1.1\\n * https://jquery.com/\\n *\\n * Includes Sizzle.js\\n * https://sizzlejs.com/\\n *\\n * Copyright jQuery Foundation and other contributors\\n * Released under the MIT license\\n * https://jquery.org/license\\n *\\n * Date: 2016-09-22T22:30Z\\n */\\n( function( global, factory ) {\\n\\n\\t\\\"use strict\\\";\\n\\n\\tif ( typeof module === \\\"object\\\" && typeof module.exports === \\\"object\\\" ) {\\n\\n\\t\\t// For CommonJS and CommonJS-like environments where a proper `window`\\n\\t\\t// is present, execute the factory and get jQuery.\\n\\t\\t// For environments that do not have a `window` with a `document`\\n\\t\\t// (such as Node.js), expose a factory as module.exports.\\n\\t\\t// This accentuates the need for the creation of a real `window`.\\n\\t\\t// e.g. var jQuery = require(\\\"jquery\\\")(window);\\n\\t\\t// See ticket #14549 for more info.\\n\\t\\tmodule.exports = global.document ?\\n\\t\\t\\tfactory( global, true ) :\\n\\t\\t\\tfunction( w ) {\\n\\t\\t\\t\\tif ( !w.document ) {\\n\\t\\t\\t\\t\\tthrow new Error( \\\"jQuery requires a window with a document\\\" );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn factory( w );\\n\\t\\t\\t};\\n\\t} else {\\n\\t\\tfactory( global );\\n\\t}\\n\\n// Pass this if window is not defined yet\\n} )( typeof window !== \\\"undefined\\\" ? window : this, function( window, noGlobal ) {\\n\\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\\n// enough that all such attempts are guarded in a try block.\\n\\\"use strict\\\";\\n\\nvar arr = [];\\n\\nvar document = window.document;\\n\\nvar getProto = Object.getPrototypeOf;\\n\\nvar slice = arr.slice;\\n\\nvar concat = arr.concat;\\n\\nvar push = arr.push;\\n\\nvar indexOf = arr.indexOf;\\n\\nvar class2type = {};\\n\\nvar toString = class2type.toString;\\n\\nvar hasOwn = class2type.hasOwnProperty;\\n\\nvar fnToString = hasOwn.toString;\\n\\nvar ObjectFunctionString = fnToString.call( Object );\\n\\nvar support = {};\\n\\n\\n\\n\\tfunction DOMEval( code, doc ) {\\n\\t\\tdoc = doc || document;\\n\\n\\t\\tvar script = doc.createElement( \\\"script\\\" );\\n\\n\\t\\tscript.text = code;\\n\\t\\tdoc.head.appendChild( script ).parentNode.removeChild( script );\\n\\t}\\n/* global Symbol */\\n// Defining this global in .eslintrc.json would create a danger of using the global\\n// unguarded in another place, it seems safer to define global only for this module\\n\\n\\n\\nvar\\n\\tversion = \\\"3.1.1\\\",\\n\\n\\t// Define a local copy of jQuery\\n\\tjQuery = function( selector, context ) {\\n\\n\\t\\t// The jQuery object is actually just the init constructor 'enhanced'\\n\\t\\t// Need init if jQuery is called (just allow error to be thrown if not included)\\n\\t\\treturn new jQuery.fn.init( selector, context );\\n\\t},\\n\\n\\t// Support: Android <=4.0 only\\n\\t// Make sure we trim BOM and NBSP\\n\\trtrim = /^[\\\\s\\\\uFEFF\\\\xA0]+|[\\\\s\\\\uFEFF\\\\xA0]+$/g,\\n\\n\\t// Matches dashed string for camelizing\\n\\trmsPrefix = /^-ms-/,\\n\\trdashAlpha = /-([a-z])/g,\\n\\n\\t// Used by jQuery.camelCase as callback to replace()\\n\\tfcamelCase = function( all, letter ) {\\n\\t\\treturn letter.toUpperCase();\\n\\t};\\n\\njQuery.fn = jQuery.prototype = {\\n\\n\\t// The current version of jQuery being used\\n\\tjquery: version,\\n\\n\\tconstructor: jQuery,\\n\\n\\t// The default length of a jQuery object is 0\\n\\tlength: 0,\\n\\n\\ttoArray: function() {\\n\\t\\treturn slice.call( this );\\n\\t},\\n\\n\\t// Get the Nth element in the matched element set OR\\n\\t// Get the whole matched element set as a clean array\\n\\tget: function( num ) {\\n\\n\\t\\t// Return all the elements in a clean array\\n\\t\\tif ( num == null ) {\\n\\t\\t\\treturn slice.call( this );\\n\\t\\t}\\n\\n\\t\\t// Return just the one element from the set\\n\\t\\treturn num < 0 ? this[ num + this.length ] : this[ num ];\\n\\t},\\n\\n\\t// Take an array of elements and push it onto the stack\\n\\t// (returning the new matched element set)\\n\\tpushStack: function( elems ) {\\n\\n\\t\\t// Build a new jQuery matched element set\\n\\t\\tvar ret = jQuery.merge( this.constructor(), elems );\\n\\n\\t\\t// Add the old object onto the stack (as a reference)\\n\\t\\tret.prevObject = this;\\n\\n\\t\\t// Return the newly-formed element set\\n\\t\\treturn ret;\\n\\t},\\n\\n\\t// Execute a callback for every element in the matched set.\\n\\teach: function( callback ) {\\n\\t\\treturn jQuery.each( this, callback );\\n\\t},\\n\\n\\tmap: function( callback ) {\\n\\t\\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\\n\\t\\t\\treturn callback.call( elem, i, elem );\\n\\t\\t} ) );\\n\\t},\\n\\n\\tslice: function() {\\n\\t\\treturn this.pushStack( slice.apply( this, arguments ) );\\n\\t},\\n\\n\\tfirst: function() {\\n\\t\\treturn this.eq( 0 );\\n\\t},\\n\\n\\tlast: function() {\\n\\t\\treturn this.eq( -1 );\\n\\t},\\n\\n\\teq: function( i ) {\\n\\t\\tvar len = this.length,\\n\\t\\t\\tj = +i + ( i < 0 ? len : 0 );\\n\\t\\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\\n\\t},\\n\\n\\tend: function() {\\n\\t\\treturn this.prevObject || this.constructor();\\n\\t},\\n\\n\\t// For internal use only.\\n\\t// Behaves like an Array's method, not like a jQuery method.\\n\\tpush: push,\\n\\tsort: arr.sort,\\n\\tsplice: arr.splice\\n};\\n\\njQuery.extend = jQuery.fn.extend = function() {\\n\\tvar options, name, src, copy, copyIsArray, clone,\\n\\t\\ttarget = arguments[ 0 ] || {},\\n\\t\\ti = 1,\\n\\t\\tlength = arguments.length,\\n\\t\\tdeep = false;\\n\\n\\t// Handle a deep copy situation\\n\\tif ( typeof target === \\\"boolean\\\" ) {\\n\\t\\tdeep = target;\\n\\n\\t\\t// Skip the boolean and the target\\n\\t\\ttarget = arguments[ i ] || {};\\n\\t\\ti++;\\n\\t}\\n\\n\\t// Handle case when target is a string or something (possible in deep copy)\\n\\tif ( typeof target !== \\\"object\\\" && !jQuery.isFunction( target ) ) {\\n\\t\\ttarget = {};\\n\\t}\\n\\n\\t// Extend jQuery itself if only one argument is passed\\n\\tif ( i === length ) {\\n\\t\\ttarget = this;\\n\\t\\ti--;\\n\\t}\\n\\n\\tfor ( ; i < length; i++ ) {\\n\\n\\t\\t// Only deal with non-null/undefined values\\n\\t\\tif ( ( options = arguments[ i ] ) != null ) {\\n\\n\\t\\t\\t// Extend the base object\\n\\t\\t\\tfor ( name in options ) {\\n\\t\\t\\t\\tsrc = target[ name ];\\n\\t\\t\\t\\tcopy = options[ name ];\\n\\n\\t\\t\\t\\t// Prevent never-ending loop\\n\\t\\t\\t\\tif ( target === copy ) {\\n\\t\\t\\t\\t\\tcontinue;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Recurse if we're merging plain objects or arrays\\n\\t\\t\\t\\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\\n\\t\\t\\t\\t\\t( copyIsArray = jQuery.isArray( copy ) ) ) ) {\\n\\n\\t\\t\\t\\t\\tif ( copyIsArray ) {\\n\\t\\t\\t\\t\\t\\tcopyIsArray = false;\\n\\t\\t\\t\\t\\t\\tclone = src && jQuery.isArray( src ) ? src : [];\\n\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tclone = src && jQuery.isPlainObject( src ) ? src : {};\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Never move original objects, clone them\\n\\t\\t\\t\\t\\ttarget[ name ] = jQuery.extend( deep, clone, copy );\\n\\n\\t\\t\\t\\t// Don't bring in undefined values\\n\\t\\t\\t\\t} else if ( copy !== undefined ) {\\n\\t\\t\\t\\t\\ttarget[ name ] = copy;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Return the modified object\\n\\treturn target;\\n};\\n\\njQuery.extend( {\\n\\n\\t// Unique for each copy of jQuery on the page\\n\\texpando: \\\"jQuery\\\" + ( version + Math.random() ).replace( /\\\\D/g, \\\"\\\" ),\\n\\n\\t// Assume jQuery is ready without the ready module\\n\\tisReady: true,\\n\\n\\terror: function( msg ) {\\n\\t\\tthrow new Error( msg );\\n\\t},\\n\\n\\tnoop: function() {},\\n\\n\\tisFunction: function( obj ) {\\n\\t\\treturn jQuery.type( obj ) === \\\"function\\\";\\n\\t},\\n\\n\\tisArray: Array.isArray,\\n\\n\\tisWindow: function( obj ) {\\n\\t\\treturn obj != null && obj === obj.window;\\n\\t},\\n\\n\\tisNumeric: function( obj ) {\\n\\n\\t\\t// As of jQuery 3.0, isNumeric is limited to\\n\\t\\t// strings and numbers (primitives or objects)\\n\\t\\t// that can be coerced to finite numbers (gh-2662)\\n\\t\\tvar type = jQuery.type( obj );\\n\\t\\treturn ( type === \\\"number\\\" || type === \\\"string\\\" ) &&\\n\\n\\t\\t\\t// parseFloat NaNs numeric-cast false positives (\\\"\\\")\\n\\t\\t\\t// ...but misinterprets leading-number strings, particularly hex literals (\\\"0x...\\\")\\n\\t\\t\\t// subtraction forces infinities to NaN\\n\\t\\t\\t!isNaN( obj - parseFloat( obj ) );\\n\\t},\\n\\n\\tisPlainObject: function( obj ) {\\n\\t\\tvar proto, Ctor;\\n\\n\\t\\t// Detect obvious negatives\\n\\t\\t// Use toString instead of jQuery.type to catch host objects\\n\\t\\tif ( !obj || toString.call( obj ) !== \\\"[object Object]\\\" ) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\tproto = getProto( obj );\\n\\n\\t\\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\\n\\t\\tif ( !proto ) {\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\n\\t\\t// Objects with prototype are plain iff they were constructed by a global Object function\\n\\t\\tCtor = hasOwn.call( proto, \\\"constructor\\\" ) && proto.constructor;\\n\\t\\treturn typeof Ctor === \\\"function\\\" && fnToString.call( Ctor ) === ObjectFunctionString;\\n\\t},\\n\\n\\tisEmptyObject: function( obj ) {\\n\\n\\t\\t/* eslint-disable no-unused-vars */\\n\\t\\t// See https://github.com/eslint/eslint/issues/6125\\n\\t\\tvar name;\\n\\n\\t\\tfor ( name in obj ) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\treturn true;\\n\\t},\\n\\n\\ttype: function( obj ) {\\n\\t\\tif ( obj == null ) {\\n\\t\\t\\treturn obj + \\\"\\\";\\n\\t\\t}\\n\\n\\t\\t// Support: Android <=2.3 only (functionish RegExp)\\n\\t\\treturn typeof obj === \\\"object\\\" || typeof obj === \\\"function\\\" ?\\n\\t\\t\\tclass2type[ toString.call( obj ) ] || \\\"object\\\" :\\n\\t\\t\\ttypeof obj;\\n\\t},\\n\\n\\t// Evaluates a script in a global context\\n\\tglobalEval: function( code ) {\\n\\t\\tDOMEval( code );\\n\\t},\\n\\n\\t// Convert dashed to camelCase; used by the css and data modules\\n\\t// Support: IE <=9 - 11, Edge 12 - 13\\n\\t// Microsoft forgot to hump their vendor prefix (#9572)\\n\\tcamelCase: function( string ) {\\n\\t\\treturn string.replace( rmsPrefix, \\\"ms-\\\" ).replace( rdashAlpha, fcamelCase );\\n\\t},\\n\\n\\tnodeName: function( elem, name ) {\\n\\t\\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\\n\\t},\\n\\n\\teach: function( obj, callback ) {\\n\\t\\tvar length, i = 0;\\n\\n\\t\\tif ( isArrayLike( obj ) ) {\\n\\t\\t\\tlength = obj.length;\\n\\t\\t\\tfor ( ; i < length; i++ ) {\\n\\t\\t\\t\\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\tfor ( i in obj ) {\\n\\t\\t\\t\\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn obj;\\n\\t},\\n\\n\\t// Support: Android <=4.0 only\\n\\ttrim: function( text ) {\\n\\t\\treturn text == null ?\\n\\t\\t\\t\\\"\\\" :\\n\\t\\t\\t( text + \\\"\\\" ).replace( rtrim, \\\"\\\" );\\n\\t},\\n\\n\\t// results is for internal usage only\\n\\tmakeArray: function( arr, results ) {\\n\\t\\tvar ret = results || [];\\n\\n\\t\\tif ( arr != null ) {\\n\\t\\t\\tif ( isArrayLike( Object( arr ) ) ) {\\n\\t\\t\\t\\tjQuery.merge( ret,\\n\\t\\t\\t\\t\\ttypeof arr === \\\"string\\\" ?\\n\\t\\t\\t\\t\\t[ arr ] : arr\\n\\t\\t\\t\\t);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tpush.call( ret, arr );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn ret;\\n\\t},\\n\\n\\tinArray: function( elem, arr, i ) {\\n\\t\\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\\n\\t},\\n\\n\\t// Support: Android <=4.0 only, PhantomJS 1 only\\n\\t// push.apply(_, arraylike) throws on ancient WebKit\\n\\tmerge: function( first, second ) {\\n\\t\\tvar len = +second.length,\\n\\t\\t\\tj = 0,\\n\\t\\t\\ti = first.length;\\n\\n\\t\\tfor ( ; j < len; j++ ) {\\n\\t\\t\\tfirst[ i++ ] = second[ j ];\\n\\t\\t}\\n\\n\\t\\tfirst.length = i;\\n\\n\\t\\treturn first;\\n\\t},\\n\\n\\tgrep: function( elems, callback, invert ) {\\n\\t\\tvar callbackInverse,\\n\\t\\t\\tmatches = [],\\n\\t\\t\\ti = 0,\\n\\t\\t\\tlength = elems.length,\\n\\t\\t\\tcallbackExpect = !invert;\\n\\n\\t\\t// Go through the array, only saving the items\\n\\t\\t// that pass the validator function\\n\\t\\tfor ( ; i < length; i++ ) {\\n\\t\\t\\tcallbackInverse = !callback( elems[ i ], i );\\n\\t\\t\\tif ( callbackInverse !== callbackExpect ) {\\n\\t\\t\\t\\tmatches.push( elems[ i ] );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn matches;\\n\\t},\\n\\n\\t// arg is for internal usage only\\n\\tmap: function( elems, callback, arg ) {\\n\\t\\tvar length, value,\\n\\t\\t\\ti = 0,\\n\\t\\t\\tret = [];\\n\\n\\t\\t// Go through the array, translating each of the items to their new values\\n\\t\\tif ( isArrayLike( elems ) ) {\\n\\t\\t\\tlength = elems.length;\\n\\t\\t\\tfor ( ; i < length; i++ ) {\\n\\t\\t\\t\\tvalue = callback( elems[ i ], i, arg );\\n\\n\\t\\t\\t\\tif ( value != null ) {\\n\\t\\t\\t\\t\\tret.push( value );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t// Go through every key on the object,\\n\\t\\t} else {\\n\\t\\t\\tfor ( i in elems ) {\\n\\t\\t\\t\\tvalue = callback( elems[ i ], i, arg );\\n\\n\\t\\t\\t\\tif ( value != null ) {\\n\\t\\t\\t\\t\\tret.push( value );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Flatten any nested arrays\\n\\t\\treturn concat.apply( [], ret );\\n\\t},\\n\\n\\t// A global GUID counter for objects\\n\\tguid: 1,\\n\\n\\t// Bind a function to a context, optionally partially applying any\\n\\t// arguments.\\n\\tproxy: function( fn, context ) {\\n\\t\\tvar tmp, args, proxy;\\n\\n\\t\\tif ( typeof context === \\\"string\\\" ) {\\n\\t\\t\\ttmp = fn[ context ];\\n\\t\\t\\tcontext = fn;\\n\\t\\t\\tfn = tmp;\\n\\t\\t}\\n\\n\\t\\t// Quick check to determine if target is callable, in the spec\\n\\t\\t// this throws a TypeError, but we will just return undefined.\\n\\t\\tif ( !jQuery.isFunction( fn ) ) {\\n\\t\\t\\treturn undefined;\\n\\t\\t}\\n\\n\\t\\t// Simulated bind\\n\\t\\targs = slice.call( arguments, 2 );\\n\\t\\tproxy = function() {\\n\\t\\t\\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\\n\\t\\t};\\n\\n\\t\\t// Set the guid of unique handler to the same of original handler, so it can be removed\\n\\t\\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\\n\\n\\t\\treturn proxy;\\n\\t},\\n\\n\\tnow: Date.now,\\n\\n\\t// jQuery.support is not used in Core but other projects attach their\\n\\t// properties to it so it needs to exist.\\n\\tsupport: support\\n} );\\n\\nif ( typeof Symbol === \\\"function\\\" ) {\\n\\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\\n}\\n\\n// Populate the class2type map\\njQuery.each( \\\"Boolean Number String Function Array Date RegExp Object Error Symbol\\\".split( \\\" \\\" ),\\nfunction( i, name ) {\\n\\tclass2type[ \\\"[object \\\" + name + \\\"]\\\" ] = name.toLowerCase();\\n} );\\n\\nfunction isArrayLike( obj ) {\\n\\n\\t// Support: real iOS 8.2 only (not reproducible in simulator)\\n\\t// `in` check used to prevent JIT error (gh-2145)\\n\\t// hasOwn isn't used here due to false negatives\\n\\t// regarding Nodelist length in IE\\n\\tvar length = !!obj && \\\"length\\\" in obj && obj.length,\\n\\t\\ttype = jQuery.type( obj );\\n\\n\\tif ( type === \\\"function\\\" || jQuery.isWindow( obj ) ) {\\n\\t\\treturn false;\\n\\t}\\n\\n\\treturn type === \\\"array\\\" || length === 0 ||\\n\\t\\ttypeof length === \\\"number\\\" && length > 0 && ( length - 1 ) in obj;\\n}\\nvar Sizzle =\\n/*!\\n * Sizzle CSS Selector Engine v2.3.3\\n * https://sizzlejs.com/\\n *\\n * Copyright jQuery Foundation and other contributors\\n * Released under the MIT license\\n * http://jquery.org/license\\n *\\n * Date: 2016-08-08\\n */\\n(function( window ) {\\n\\nvar i,\\n\\tsupport,\\n\\tExpr,\\n\\tgetText,\\n\\tisXML,\\n\\ttokenize,\\n\\tcompile,\\n\\tselect,\\n\\toutermostContext,\\n\\tsortInput,\\n\\thasDuplicate,\\n\\n\\t// Local document vars\\n\\tsetDocument,\\n\\tdocument,\\n\\tdocElem,\\n\\tdocumentIsHTML,\\n\\trbuggyQSA,\\n\\trbuggyMatches,\\n\\tmatches,\\n\\tcontains,\\n\\n\\t// Instance-specific data\\n\\texpando = \\\"sizzle\\\" + 1 * new Date(),\\n\\tpreferredDoc = window.document,\\n\\tdirruns = 0,\\n\\tdone = 0,\\n\\tclassCache = createCache(),\\n\\ttokenCache = createCache(),\\n\\tcompilerCache = createCache(),\\n\\tsortOrder = function( a, b ) {\\n\\t\\tif ( a === b ) {\\n\\t\\t\\thasDuplicate = true;\\n\\t\\t}\\n\\t\\treturn 0;\\n\\t},\\n\\n\\t// Instance methods\\n\\thasOwn = ({}).hasOwnProperty,\\n\\tarr = [],\\n\\tpop = arr.pop,\\n\\tpush_native = arr.push,\\n\\tpush = arr.push,\\n\\tslice = arr.slice,\\n\\t// Use a stripped-down indexOf as it's faster than native\\n\\t// https://jsperf.com/thor-indexof-vs-for/5\\n\\tindexOf = function( list, elem ) {\\n\\t\\tvar i = 0,\\n\\t\\t\\tlen = list.length;\\n\\t\\tfor ( ; i < len; i++ ) {\\n\\t\\t\\tif ( list[i] === elem ) {\\n\\t\\t\\t\\treturn i;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn -1;\\n\\t},\\n\\n\\tbooleans = \\\"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\\\",\\n\\n\\t// Regular expressions\\n\\n\\t// http://www.w3.org/TR/css3-selectors/#whitespace\\n\\twhitespace = \\\"[\\\\\\\\x20\\\\\\\\t\\\\\\\\r\\\\\\\\n\\\\\\\\f]\\\",\\n\\n\\t// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\\n\\tidentifier = \\\"(?:\\\\\\\\\\\\\\\\.|[\\\\\\\\w-]|[^\\\\0-\\\\\\\\xa0])+\\\",\\n\\n\\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\\n\\tattributes = \\\"\\\\\\\\[\\\" + whitespace + \\\"*(\\\" + identifier + \\\")(?:\\\" + whitespace +\\n\\t\\t// Operator (capture 2)\\n\\t\\t\\\"*([*^$|!~]?=)\\\" + whitespace +\\n\\t\\t// \\\"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\\\"\\n\\t\\t\\\"*(?:'((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\'])*)'|\\\\\\\"((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\\\\\\\"])*)\\\\\\\"|(\\\" + identifier + \\\"))|)\\\" + whitespace +\\n\\t\\t\\\"*\\\\\\\\]\\\",\\n\\n\\tpseudos = \\\":(\\\" + identifier + \\\")(?:\\\\\\\\((\\\" +\\n\\t\\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\\n\\t\\t// 1. quoted (capture 3; capture 4 or capture 5)\\n\\t\\t\\\"('((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\'])*)'|\\\\\\\"((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\\\\\\\\"])*)\\\\\\\")|\\\" +\\n\\t\\t// 2. simple (capture 6)\\n\\t\\t\\\"((?:\\\\\\\\\\\\\\\\.|[^\\\\\\\\\\\\\\\\()[\\\\\\\\]]|\\\" + attributes + \\\")*)|\\\" +\\n\\t\\t// 3. anything else (capture 2)\\n\\t\\t\\\".*\\\" +\\n\\t\\t\\\")\\\\\\\\)|)\\\",\\n\\n\\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\\n\\trwhitespace = new RegExp( whitespace + \\\"+\\\", \\\"g\\\" ),\\n\\trtrim = new RegExp( \\\"^\\\" + whitespace + \\\"+|((?:^|[^\\\\\\\\\\\\\\\\])(?:\\\\\\\\\\\\\\\\.)*)\\\" + whitespace + \\\"+$\\\", \\\"g\\\" ),\\n\\n\\trcomma = new RegExp( \\\"^\\\" + whitespace + \\\"*,\\\" + whitespace + \\\"*\\\" ),\\n\\trcombinators = new RegExp( \\\"^\\\" + whitespace + \\\"*([>+~]|\\\" + whitespace + \\\")\\\" + whitespace + \\\"*\\\" ),\\n\\n\\trattributeQuotes = new RegExp( \\\"=\\\" + whitespace + \\\"*([^\\\\\\\\]'\\\\\\\"]*?)\\\" + whitespace + \\\"*\\\\\\\\]\\\", \\\"g\\\" ),\\n\\n\\trpseudo = new RegExp( pseudos ),\\n\\tridentifier = new RegExp( \\\"^\\\" + identifier + \\\"$\\\" ),\\n\\n\\tmatchExpr = {\\n\\t\\t\\\"ID\\\": new RegExp( \\\"^#(\\\" + identifier + \\\")\\\" ),\\n\\t\\t\\\"CLASS\\\": new RegExp( \\\"^\\\\\\\\.(\\\" + identifier + \\\")\\\" ),\\n\\t\\t\\\"TAG\\\": new RegExp( \\\"^(\\\" + identifier + \\\"|[*])\\\" ),\\n\\t\\t\\\"ATTR\\\": new RegExp( \\\"^\\\" + attributes ),\\n\\t\\t\\\"PSEUDO\\\": new RegExp( \\\"^\\\" + pseudos ),\\n\\t\\t\\\"CHILD\\\": new RegExp( \\\"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\\\\\(\\\" + whitespace +\\n\\t\\t\\t\\\"*(even|odd|(([+-]|)(\\\\\\\\d*)n|)\\\" + whitespace + \\\"*(?:([+-]|)\\\" + whitespace +\\n\\t\\t\\t\\\"*(\\\\\\\\d+)|))\\\" + whitespace + \\\"*\\\\\\\\)|)\\\", \\\"i\\\" ),\\n\\t\\t\\\"bool\\\": new RegExp( \\\"^(?:\\\" + booleans + \\\")$\\\", \\\"i\\\" ),\\n\\t\\t// For use in libraries implementing .is()\\n\\t\\t// We use this for POS matching in `select`\\n\\t\\t\\\"needsContext\\\": new RegExp( \\\"^\\\" + whitespace + \\\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\\\\\(\\\" +\\n\\t\\t\\twhitespace + \\\"*((?:-\\\\\\\\d)?\\\\\\\\d*)\\\" + whitespace + \\\"*\\\\\\\\)|)(?=[^-]|$)\\\", \\\"i\\\" )\\n\\t},\\n\\n\\trinputs = /^(?:input|select|textarea|button)$/i,\\n\\trheader = /^h\\\\d$/i,\\n\\n\\trnative = /^[^{]+\\\\{\\\\s*\\\\[native \\\\w/,\\n\\n\\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\\n\\trquickExpr = /^(?:#([\\\\w-]+)|(\\\\w+)|\\\\.([\\\\w-]+))$/,\\n\\n\\trsibling = /[+~]/,\\n\\n\\t// CSS escapes\\n\\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\\n\\trunescape = new RegExp( \\\"\\\\\\\\\\\\\\\\([\\\\\\\\da-f]{1,6}\\\" + whitespace + \\\"?|(\\\" + whitespace + \\\")|.)\\\", \\\"ig\\\" ),\\n\\tfunescape = function( _, escaped, escapedWhitespace ) {\\n\\t\\tvar high = \\\"0x\\\" + escaped - 0x10000;\\n\\t\\t// NaN means non-codepoint\\n\\t\\t// Support: Firefox<24\\n\\t\\t// Workaround erroneous numeric interpretation of +\\\"0x\\\"\\n\\t\\treturn high !== high || escapedWhitespace ?\\n\\t\\t\\tescaped :\\n\\t\\t\\thigh < 0 ?\\n\\t\\t\\t\\t// BMP codepoint\\n\\t\\t\\t\\tString.fromCharCode( high + 0x10000 ) :\\n\\t\\t\\t\\t// Supplemental Plane codepoint (surrogate pair)\\n\\t\\t\\t\\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\\n\\t},\\n\\n\\t// CSS string/identifier serialization\\n\\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\\n\\trcssescape = /([\\\\0-\\\\x1f\\\\x7f]|^-?\\\\d)|^-$|[^\\\\0-\\\\x1f\\\\x7f-\\\\uFFFF\\\\w-]/g,\\n\\tfcssescape = function( ch, asCodePoint ) {\\n\\t\\tif ( asCodePoint ) {\\n\\n\\t\\t\\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\\n\\t\\t\\tif ( ch === \\\"\\\\0\\\" ) {\\n\\t\\t\\t\\treturn \\\"\\\\uFFFD\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Control characters and (dependent upon position) numbers get escaped as code points\\n\\t\\t\\treturn ch.slice( 0, -1 ) + \\\"\\\\\\\\\\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + \\\" \\\";\\n\\t\\t}\\n\\n\\t\\t// Other potentially-special ASCII characters get backslash-escaped\\n\\t\\treturn \\\"\\\\\\\\\\\" + ch;\\n\\t},\\n\\n\\t// Used for iframes\\n\\t// See setDocument()\\n\\t// Removing the function wrapper causes a \\\"Permission Denied\\\"\\n\\t// error in IE\\n\\tunloadHandler = function() {\\n\\t\\tsetDocument();\\n\\t},\\n\\n\\tdisabledAncestor = addCombinator(\\n\\t\\tfunction( elem ) {\\n\\t\\t\\treturn elem.disabled === true && (\\\"form\\\" in elem || \\\"label\\\" in elem);\\n\\t\\t},\\n\\t\\t{ dir: \\\"parentNode\\\", next: \\\"legend\\\" }\\n\\t);\\n\\n// Optimize for push.apply( _, NodeList )\\ntry {\\n\\tpush.apply(\\n\\t\\t(arr = slice.call( preferredDoc.childNodes )),\\n\\t\\tpreferredDoc.childNodes\\n\\t);\\n\\t// Support: Android<4.0\\n\\t// Detect silently failing push.apply\\n\\tarr[ preferredDoc.childNodes.length ].nodeType;\\n} catch ( e ) {\\n\\tpush = { apply: arr.length ?\\n\\n\\t\\t// Leverage slice if possible\\n\\t\\tfunction( target, els ) {\\n\\t\\t\\tpush_native.apply( target, slice.call(els) );\\n\\t\\t} :\\n\\n\\t\\t// Support: IE<9\\n\\t\\t// Otherwise append directly\\n\\t\\tfunction( target, els ) {\\n\\t\\t\\tvar j = target.length,\\n\\t\\t\\t\\ti = 0;\\n\\t\\t\\t// Can't trust NodeList.length\\n\\t\\t\\twhile ( (target[j++] = els[i++]) ) {}\\n\\t\\t\\ttarget.length = j - 1;\\n\\t\\t}\\n\\t};\\n}\\n\\nfunction Sizzle( selector, context, results, seed ) {\\n\\tvar m, i, elem, nid, match, groups, newSelector,\\n\\t\\tnewContext = context && context.ownerDocument,\\n\\n\\t\\t// nodeType defaults to 9, since context defaults to document\\n\\t\\tnodeType = context ? context.nodeType : 9;\\n\\n\\tresults = results || [];\\n\\n\\t// Return early from calls with invalid selector or context\\n\\tif ( typeof selector !== \\\"string\\\" || !selector ||\\n\\t\\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\\n\\n\\t\\treturn results;\\n\\t}\\n\\n\\t// Try to shortcut find operations (as opposed to filters) in HTML documents\\n\\tif ( !seed ) {\\n\\n\\t\\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\\n\\t\\t\\tsetDocument( context );\\n\\t\\t}\\n\\t\\tcontext = context || document;\\n\\n\\t\\tif ( documentIsHTML ) {\\n\\n\\t\\t\\t// If the selector is sufficiently simple, try using a \\\"get*By*\\\" DOM method\\n\\t\\t\\t// (excepting DocumentFragment context, where the methods don't exist)\\n\\t\\t\\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\\n\\n\\t\\t\\t\\t// ID selector\\n\\t\\t\\t\\tif ( (m = match[1]) ) {\\n\\n\\t\\t\\t\\t\\t// Document context\\n\\t\\t\\t\\t\\tif ( nodeType === 9 ) {\\n\\t\\t\\t\\t\\t\\tif ( (elem = context.getElementById( m )) ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Support: IE, Opera, Webkit\\n\\t\\t\\t\\t\\t\\t\\t// TODO: identify versions\\n\\t\\t\\t\\t\\t\\t\\t// getElementById can match elements by name instead of ID\\n\\t\\t\\t\\t\\t\\t\\tif ( elem.id === m ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tresults.push( elem );\\n\\t\\t\\t\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Element context\\n\\t\\t\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t\\t\\t// Support: IE, Opera, Webkit\\n\\t\\t\\t\\t\\t\\t// TODO: identify versions\\n\\t\\t\\t\\t\\t\\t// getElementById can match elements by name instead of ID\\n\\t\\t\\t\\t\\t\\tif ( newContext && (elem = newContext.getElementById( m )) &&\\n\\t\\t\\t\\t\\t\\t\\tcontains( context, elem ) &&\\n\\t\\t\\t\\t\\t\\t\\telem.id === m ) {\\n\\n\\t\\t\\t\\t\\t\\t\\tresults.push( elem );\\n\\t\\t\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Type selector\\n\\t\\t\\t\\t} else if ( match[2] ) {\\n\\t\\t\\t\\t\\tpush.apply( results, context.getElementsByTagName( selector ) );\\n\\t\\t\\t\\t\\treturn results;\\n\\n\\t\\t\\t\\t// Class selector\\n\\t\\t\\t\\t} else if ( (m = match[3]) && support.getElementsByClassName &&\\n\\t\\t\\t\\t\\tcontext.getElementsByClassName ) {\\n\\n\\t\\t\\t\\t\\tpush.apply( results, context.getElementsByClassName( m ) );\\n\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Take advantage of querySelectorAll\\n\\t\\t\\tif ( support.qsa &&\\n\\t\\t\\t\\t!compilerCache[ selector + \\\" \\\" ] &&\\n\\t\\t\\t\\t(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\\n\\n\\t\\t\\t\\tif ( nodeType !== 1 ) {\\n\\t\\t\\t\\t\\tnewContext = context;\\n\\t\\t\\t\\t\\tnewSelector = selector;\\n\\n\\t\\t\\t\\t// qSA looks outside Element context, which is not what we want\\n\\t\\t\\t\\t// Thanks to Andrew Dupont for this workaround technique\\n\\t\\t\\t\\t// Support: IE <=8\\n\\t\\t\\t\\t// Exclude object elements\\n\\t\\t\\t\\t} else if ( context.nodeName.toLowerCase() !== \\\"object\\\" ) {\\n\\n\\t\\t\\t\\t\\t// Capture the context ID, setting it first if necessary\\n\\t\\t\\t\\t\\tif ( (nid = context.getAttribute( \\\"id\\\" )) ) {\\n\\t\\t\\t\\t\\t\\tnid = nid.replace( rcssescape, fcssescape );\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tcontext.setAttribute( \\\"id\\\", (nid = expando) );\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Prefix every selector in the list\\n\\t\\t\\t\\t\\tgroups = tokenize( selector );\\n\\t\\t\\t\\t\\ti = groups.length;\\n\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\t\\tgroups[i] = \\\"#\\\" + nid + \\\" \\\" + toSelector( groups[i] );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tnewSelector = groups.join( \\\",\\\" );\\n\\n\\t\\t\\t\\t\\t// Expand context for sibling selectors\\n\\t\\t\\t\\t\\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\\n\\t\\t\\t\\t\\t\\tcontext;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif ( newSelector ) {\\n\\t\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\t\\tpush.apply( results,\\n\\t\\t\\t\\t\\t\\t\\tnewContext.querySelectorAll( newSelector )\\n\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t\\t} catch ( qsaError ) {\\n\\t\\t\\t\\t\\t} finally {\\n\\t\\t\\t\\t\\t\\tif ( nid === expando ) {\\n\\t\\t\\t\\t\\t\\t\\tcontext.removeAttribute( \\\"id\\\" );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// All others\\n\\treturn select( selector.replace( rtrim, \\\"$1\\\" ), context, results, seed );\\n}\\n\\n/**\\n * Create key-value caches of limited size\\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\\n *\\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\\n *\\tdeleting the oldest entry\\n */\\nfunction createCache() {\\n\\tvar keys = [];\\n\\n\\tfunction cache( key, value ) {\\n\\t\\t// Use (key + \\\" \\\") to avoid collision with native prototype properties (see Issue #157)\\n\\t\\tif ( keys.push( key + \\\" \\\" ) > Expr.cacheLength ) {\\n\\t\\t\\t// Only keep the most recent entries\\n\\t\\t\\tdelete cache[ keys.shift() ];\\n\\t\\t}\\n\\t\\treturn (cache[ key + \\\" \\\" ] = value);\\n\\t}\\n\\treturn cache;\\n}\\n\\n/**\\n * Mark a function for special use by Sizzle\\n * @param {Function} fn The function to mark\\n */\\nfunction markFunction( fn ) {\\n\\tfn[ expando ] = true;\\n\\treturn fn;\\n}\\n\\n/**\\n * Support testing using an element\\n * @param {Function} fn Passed the created element and returns a boolean result\\n */\\nfunction assert( fn ) {\\n\\tvar el = document.createElement(\\\"fieldset\\\");\\n\\n\\ttry {\\n\\t\\treturn !!fn( el );\\n\\t} catch (e) {\\n\\t\\treturn false;\\n\\t} finally {\\n\\t\\t// Remove from its parent by default\\n\\t\\tif ( el.parentNode ) {\\n\\t\\t\\tel.parentNode.removeChild( el );\\n\\t\\t}\\n\\t\\t// release memory in IE\\n\\t\\tel = null;\\n\\t}\\n}\\n\\n/**\\n * Adds the same handler for all of the specified attrs\\n * @param {String} attrs Pipe-separated list of attributes\\n * @param {Function} handler The method that will be applied\\n */\\nfunction addHandle( attrs, handler ) {\\n\\tvar arr = attrs.split(\\\"|\\\"),\\n\\t\\ti = arr.length;\\n\\n\\twhile ( i-- ) {\\n\\t\\tExpr.attrHandle[ arr[i] ] = handler;\\n\\t}\\n}\\n\\n/**\\n * Checks document order of two siblings\\n * @param {Element} a\\n * @param {Element} b\\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\\n */\\nfunction siblingCheck( a, b ) {\\n\\tvar cur = b && a,\\n\\t\\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\\n\\t\\t\\ta.sourceIndex - b.sourceIndex;\\n\\n\\t// Use IE sourceIndex if available on both nodes\\n\\tif ( diff ) {\\n\\t\\treturn diff;\\n\\t}\\n\\n\\t// Check if b follows a\\n\\tif ( cur ) {\\n\\t\\twhile ( (cur = cur.nextSibling) ) {\\n\\t\\t\\tif ( cur === b ) {\\n\\t\\t\\t\\treturn -1;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn a ? 1 : -1;\\n}\\n\\n/**\\n * Returns a function to use in pseudos for input types\\n * @param {String} type\\n */\\nfunction createInputPseudo( type ) {\\n\\treturn function( elem ) {\\n\\t\\tvar name = elem.nodeName.toLowerCase();\\n\\t\\treturn name === \\\"input\\\" && elem.type === type;\\n\\t};\\n}\\n\\n/**\\n * Returns a function to use in pseudos for buttons\\n * @param {String} type\\n */\\nfunction createButtonPseudo( type ) {\\n\\treturn function( elem ) {\\n\\t\\tvar name = elem.nodeName.toLowerCase();\\n\\t\\treturn (name === \\\"input\\\" || name === \\\"button\\\") && elem.type === type;\\n\\t};\\n}\\n\\n/**\\n * Returns a function to use in pseudos for :enabled/:disabled\\n * @param {Boolean} disabled true for :disabled; false for :enabled\\n */\\nfunction createDisabledPseudo( disabled ) {\\n\\n\\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\\n\\treturn function( elem ) {\\n\\n\\t\\t// Only certain elements can match :enabled or :disabled\\n\\t\\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\\n\\t\\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\\n\\t\\tif ( \\\"form\\\" in elem ) {\\n\\n\\t\\t\\t// Check for inherited disabledness on relevant non-disabled elements:\\n\\t\\t\\t// * listed form-associated elements in a disabled fieldset\\n\\t\\t\\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\\n\\t\\t\\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\\n\\t\\t\\t// * option elements in a disabled optgroup\\n\\t\\t\\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\\n\\t\\t\\t// All such elements have a \\\"form\\\" property.\\n\\t\\t\\tif ( elem.parentNode && elem.disabled === false ) {\\n\\n\\t\\t\\t\\t// Option elements defer to a parent optgroup if present\\n\\t\\t\\t\\tif ( \\\"label\\\" in elem ) {\\n\\t\\t\\t\\t\\tif ( \\\"label\\\" in elem.parentNode ) {\\n\\t\\t\\t\\t\\t\\treturn elem.parentNode.disabled === disabled;\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\treturn elem.disabled === disabled;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Support: IE 6 - 11\\n\\t\\t\\t\\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\\n\\t\\t\\t\\treturn elem.isDisabled === disabled ||\\n\\n\\t\\t\\t\\t\\t// Where there is no isDisabled, check manually\\n\\t\\t\\t\\t\\t/* jshint -W018 */\\n\\t\\t\\t\\t\\telem.isDisabled !== !disabled &&\\n\\t\\t\\t\\t\\t\\tdisabledAncestor( elem ) === disabled;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn elem.disabled === disabled;\\n\\n\\t\\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\\n\\t\\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\\n\\t\\t// even exist on them, let alone have a boolean value.\\n\\t\\t} else if ( \\\"label\\\" in elem ) {\\n\\t\\t\\treturn elem.disabled === disabled;\\n\\t\\t}\\n\\n\\t\\t// Remaining elements are neither :enabled nor :disabled\\n\\t\\treturn false;\\n\\t};\\n}\\n\\n/**\\n * Returns a function to use in pseudos for positionals\\n * @param {Function} fn\\n */\\nfunction createPositionalPseudo( fn ) {\\n\\treturn markFunction(function( argument ) {\\n\\t\\targument = +argument;\\n\\t\\treturn markFunction(function( seed, matches ) {\\n\\t\\t\\tvar j,\\n\\t\\t\\t\\tmatchIndexes = fn( [], seed.length, argument ),\\n\\t\\t\\t\\ti = matchIndexes.length;\\n\\n\\t\\t\\t// Match elements found at the specified indexes\\n\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\tif ( seed[ (j = matchIndexes[i]) ] ) {\\n\\t\\t\\t\\t\\tseed[j] = !(matches[j] = seed[j]);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t});\\n\\t});\\n}\\n\\n/**\\n * Checks a node for validity as a Sizzle context\\n * @param {Element|Object=} context\\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\\n */\\nfunction testContext( context ) {\\n\\treturn context && typeof context.getElementsByTagName !== \\\"undefined\\\" && context;\\n}\\n\\n// Expose support vars for convenience\\nsupport = Sizzle.support = {};\\n\\n/**\\n * Detects XML nodes\\n * @param {Element|Object} elem An element or a document\\n * @returns {Boolean} True iff elem is a non-HTML XML node\\n */\\nisXML = Sizzle.isXML = function( elem ) {\\n\\t// documentElement is verified for cases where it doesn't yet exist\\n\\t// (such as loading iframes in IE - #4833)\\n\\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\\n\\treturn documentElement ? documentElement.nodeName !== \\\"HTML\\\" : false;\\n};\\n\\n/**\\n * Sets document-related variables once based on the current document\\n * @param {Element|Object} [doc] An element or document object to use to set the document\\n * @returns {Object} Returns the current document\\n */\\nsetDocument = Sizzle.setDocument = function( node ) {\\n\\tvar hasCompare, subWindow,\\n\\t\\tdoc = node ? node.ownerDocument || node : preferredDoc;\\n\\n\\t// Return early if doc is invalid or already selected\\n\\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\\n\\t\\treturn document;\\n\\t}\\n\\n\\t// Update global variables\\n\\tdocument = doc;\\n\\tdocElem = document.documentElement;\\n\\tdocumentIsHTML = !isXML( document );\\n\\n\\t// Support: IE 9-11, Edge\\n\\t// Accessing iframe documents after unload throws \\\"permission denied\\\" errors (jQuery #13936)\\n\\tif ( preferredDoc !== document &&\\n\\t\\t(subWindow = document.defaultView) && subWindow.top !== subWindow ) {\\n\\n\\t\\t// Support: IE 11, Edge\\n\\t\\tif ( subWindow.addEventListener ) {\\n\\t\\t\\tsubWindow.addEventListener( \\\"unload\\\", unloadHandler, false );\\n\\n\\t\\t// Support: IE 9 - 10 only\\n\\t\\t} else if ( subWindow.attachEvent ) {\\n\\t\\t\\tsubWindow.attachEvent( \\\"onunload\\\", unloadHandler );\\n\\t\\t}\\n\\t}\\n\\n\\t/* Attributes\\n\\t---------------------------------------------------------------------- */\\n\\n\\t// Support: IE<8\\n\\t// Verify that getAttribute really returns attributes and not properties\\n\\t// (excepting IE8 booleans)\\n\\tsupport.attributes = assert(function( el ) {\\n\\t\\tel.className = \\\"i\\\";\\n\\t\\treturn !el.getAttribute(\\\"className\\\");\\n\\t});\\n\\n\\t/* getElement(s)By*\\n\\t---------------------------------------------------------------------- */\\n\\n\\t// Check if getElementsByTagName(\\\"*\\\") returns only elements\\n\\tsupport.getElementsByTagName = assert(function( el ) {\\n\\t\\tel.appendChild( document.createComment(\\\"\\\") );\\n\\t\\treturn !el.getElementsByTagName(\\\"*\\\").length;\\n\\t});\\n\\n\\t// Support: IE<9\\n\\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\\n\\n\\t// Support: IE<10\\n\\t// Check if getElementById returns elements by name\\n\\t// The broken getElementById methods don't pick up programmatically-set names,\\n\\t// so use a roundabout getElementsByName test\\n\\tsupport.getById = assert(function( el ) {\\n\\t\\tdocElem.appendChild( el ).id = expando;\\n\\t\\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\\n\\t});\\n\\n\\t// ID filter and find\\n\\tif ( support.getById ) {\\n\\t\\tExpr.filter[\\\"ID\\\"] = function( id ) {\\n\\t\\t\\tvar attrId = id.replace( runescape, funescape );\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\treturn elem.getAttribute(\\\"id\\\") === attrId;\\n\\t\\t\\t};\\n\\t\\t};\\n\\t\\tExpr.find[\\\"ID\\\"] = function( id, context ) {\\n\\t\\t\\tif ( typeof context.getElementById !== \\\"undefined\\\" && documentIsHTML ) {\\n\\t\\t\\t\\tvar elem = context.getElementById( id );\\n\\t\\t\\t\\treturn elem ? [ elem ] : [];\\n\\t\\t\\t}\\n\\t\\t};\\n\\t} else {\\n\\t\\tExpr.filter[\\\"ID\\\"] = function( id ) {\\n\\t\\t\\tvar attrId = id.replace( runescape, funescape );\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\tvar node = typeof elem.getAttributeNode !== \\\"undefined\\\" &&\\n\\t\\t\\t\\t\\telem.getAttributeNode(\\\"id\\\");\\n\\t\\t\\t\\treturn node && node.value === attrId;\\n\\t\\t\\t};\\n\\t\\t};\\n\\n\\t\\t// Support: IE 6 - 7 only\\n\\t\\t// getElementById is not reliable as a find shortcut\\n\\t\\tExpr.find[\\\"ID\\\"] = function( id, context ) {\\n\\t\\t\\tif ( typeof context.getElementById !== \\\"undefined\\\" && documentIsHTML ) {\\n\\t\\t\\t\\tvar node, i, elems,\\n\\t\\t\\t\\t\\telem = context.getElementById( id );\\n\\n\\t\\t\\t\\tif ( elem ) {\\n\\n\\t\\t\\t\\t\\t// Verify the id attribute\\n\\t\\t\\t\\t\\tnode = elem.getAttributeNode(\\\"id\\\");\\n\\t\\t\\t\\t\\tif ( node && node.value === id ) {\\n\\t\\t\\t\\t\\t\\treturn [ elem ];\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Fall back on getElementsByName\\n\\t\\t\\t\\t\\telems = context.getElementsByName( id );\\n\\t\\t\\t\\t\\ti = 0;\\n\\t\\t\\t\\t\\twhile ( (elem = elems[i++]) ) {\\n\\t\\t\\t\\t\\t\\tnode = elem.getAttributeNode(\\\"id\\\");\\n\\t\\t\\t\\t\\t\\tif ( node && node.value === id ) {\\n\\t\\t\\t\\t\\t\\t\\treturn [ elem ];\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn [];\\n\\t\\t\\t}\\n\\t\\t};\\n\\t}\\n\\n\\t// Tag\\n\\tExpr.find[\\\"TAG\\\"] = support.getElementsByTagName ?\\n\\t\\tfunction( tag, context ) {\\n\\t\\t\\tif ( typeof context.getElementsByTagName !== \\\"undefined\\\" ) {\\n\\t\\t\\t\\treturn context.getElementsByTagName( tag );\\n\\n\\t\\t\\t// DocumentFragment nodes don't have gEBTN\\n\\t\\t\\t} else if ( support.qsa ) {\\n\\t\\t\\t\\treturn context.querySelectorAll( tag );\\n\\t\\t\\t}\\n\\t\\t} :\\n\\n\\t\\tfunction( tag, context ) {\\n\\t\\t\\tvar elem,\\n\\t\\t\\t\\ttmp = [],\\n\\t\\t\\t\\ti = 0,\\n\\t\\t\\t\\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\\n\\t\\t\\t\\tresults = context.getElementsByTagName( tag );\\n\\n\\t\\t\\t// Filter out possible comments\\n\\t\\t\\tif ( tag === \\\"*\\\" ) {\\n\\t\\t\\t\\twhile ( (elem = results[i++]) ) {\\n\\t\\t\\t\\t\\tif ( elem.nodeType === 1 ) {\\n\\t\\t\\t\\t\\t\\ttmp.push( elem );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn tmp;\\n\\t\\t\\t}\\n\\t\\t\\treturn results;\\n\\t\\t};\\n\\n\\t// Class\\n\\tExpr.find[\\\"CLASS\\\"] = support.getElementsByClassName && function( className, context ) {\\n\\t\\tif ( typeof context.getElementsByClassName !== \\\"undefined\\\" && documentIsHTML ) {\\n\\t\\t\\treturn context.getElementsByClassName( className );\\n\\t\\t}\\n\\t};\\n\\n\\t/* QSA/matchesSelector\\n\\t---------------------------------------------------------------------- */\\n\\n\\t// QSA and matchesSelector support\\n\\n\\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\\n\\trbuggyMatches = [];\\n\\n\\t// qSa(:focus) reports false when true (Chrome 21)\\n\\t// We allow this because of a bug in IE8/9 that throws an error\\n\\t// whenever `document.activeElement` is accessed on an iframe\\n\\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\\n\\t// See https://bugs.jquery.com/ticket/13378\\n\\trbuggyQSA = [];\\n\\n\\tif ( (support.qsa = rnative.test( document.querySelectorAll )) ) {\\n\\t\\t// Build QSA regex\\n\\t\\t// Regex strategy adopted from Diego Perini\\n\\t\\tassert(function( el ) {\\n\\t\\t\\t// Select is set to empty string on purpose\\n\\t\\t\\t// This is to test IE's treatment of not explicitly\\n\\t\\t\\t// setting a boolean content attribute,\\n\\t\\t\\t// since its presence should be enough\\n\\t\\t\\t// https://bugs.jquery.com/ticket/12359\\n\\t\\t\\tdocElem.appendChild( el ).innerHTML = \\\"<a id='\\\" + expando + \\\"'></a>\\\" +\\n\\t\\t\\t\\t\\\"<select id='\\\" + expando + \\\"-\\\\r\\\\\\\\' msallowcapture=''>\\\" +\\n\\t\\t\\t\\t\\\"<option selected=''></option></select>\\\";\\n\\n\\t\\t\\t// Support: IE8, Opera 11-12.16\\n\\t\\t\\t// Nothing should be selected when empty strings follow ^= or $= or *=\\n\\t\\t\\t// The test attribute must be unknown in Opera but \\\"safe\\\" for WinRT\\n\\t\\t\\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\\n\\t\\t\\tif ( el.querySelectorAll(\\\"[msallowcapture^='']\\\").length ) {\\n\\t\\t\\t\\trbuggyQSA.push( \\\"[*^$]=\\\" + whitespace + \\\"*(?:''|\\\\\\\"\\\\\\\")\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Support: IE8\\n\\t\\t\\t// Boolean attributes and \\\"value\\\" are not treated correctly\\n\\t\\t\\tif ( !el.querySelectorAll(\\\"[selected]\\\").length ) {\\n\\t\\t\\t\\trbuggyQSA.push( \\\"\\\\\\\\[\\\" + whitespace + \\\"*(?:value|\\\" + booleans + \\\")\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\\n\\t\\t\\tif ( !el.querySelectorAll( \\\"[id~=\\\" + expando + \\\"-]\\\" ).length ) {\\n\\t\\t\\t\\trbuggyQSA.push(\\\"~=\\\");\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Webkit/Opera - :checked should return selected option elements\\n\\t\\t\\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\\n\\t\\t\\t// IE8 throws error here and will not see later tests\\n\\t\\t\\tif ( !el.querySelectorAll(\\\":checked\\\").length ) {\\n\\t\\t\\t\\trbuggyQSA.push(\\\":checked\\\");\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Support: Safari 8+, iOS 8+\\n\\t\\t\\t// https://bugs.webkit.org/show_bug.cgi?id=136851\\n\\t\\t\\t// In-page `selector#id sibling-combinator selector` fails\\n\\t\\t\\tif ( !el.querySelectorAll( \\\"a#\\\" + expando + \\\"+*\\\" ).length ) {\\n\\t\\t\\t\\trbuggyQSA.push(\\\".#.+[+~]\\\");\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\tassert(function( el ) {\\n\\t\\t\\tel.innerHTML = \\\"<a href='' disabled='disabled'></a>\\\" +\\n\\t\\t\\t\\t\\\"<select disabled='disabled'><option/></select>\\\";\\n\\n\\t\\t\\t// Support: Windows 8 Native Apps\\n\\t\\t\\t// The type and name attributes are restricted during .innerHTML assignment\\n\\t\\t\\tvar input = document.createElement(\\\"input\\\");\\n\\t\\t\\tinput.setAttribute( \\\"type\\\", \\\"hidden\\\" );\\n\\t\\t\\tel.appendChild( input ).setAttribute( \\\"name\\\", \\\"D\\\" );\\n\\n\\t\\t\\t// Support: IE8\\n\\t\\t\\t// Enforce case-sensitivity of name attribute\\n\\t\\t\\tif ( el.querySelectorAll(\\\"[name=d]\\\").length ) {\\n\\t\\t\\t\\trbuggyQSA.push( \\\"name\\\" + whitespace + \\\"*[*^$|!~]?=\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\\n\\t\\t\\t// IE8 throws error here and will not see later tests\\n\\t\\t\\tif ( el.querySelectorAll(\\\":enabled\\\").length !== 2 ) {\\n\\t\\t\\t\\trbuggyQSA.push( \\\":enabled\\\", \\\":disabled\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Support: IE9-11+\\n\\t\\t\\t// IE's :disabled selector does not pick up the children of disabled fieldsets\\n\\t\\t\\tdocElem.appendChild( el ).disabled = true;\\n\\t\\t\\tif ( el.querySelectorAll(\\\":disabled\\\").length !== 2 ) {\\n\\t\\t\\t\\trbuggyQSA.push( \\\":enabled\\\", \\\":disabled\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Opera 10-11 does not throw on post-comma invalid pseudos\\n\\t\\t\\tel.querySelectorAll(\\\"*,:x\\\");\\n\\t\\t\\trbuggyQSA.push(\\\",.*:\\\");\\n\\t\\t});\\n\\t}\\n\\n\\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\\n\\t\\tdocElem.webkitMatchesSelector ||\\n\\t\\tdocElem.mozMatchesSelector ||\\n\\t\\tdocElem.oMatchesSelector ||\\n\\t\\tdocElem.msMatchesSelector) )) ) {\\n\\n\\t\\tassert(function( el ) {\\n\\t\\t\\t// Check to see if it's possible to do matchesSelector\\n\\t\\t\\t// on a disconnected node (IE 9)\\n\\t\\t\\tsupport.disconnectedMatch = matches.call( el, \\\"*\\\" );\\n\\n\\t\\t\\t// This should fail with an exception\\n\\t\\t\\t// Gecko does not error, returns false instead\\n\\t\\t\\tmatches.call( el, \\\"[s!='']:x\\\" );\\n\\t\\t\\trbuggyMatches.push( \\\"!=\\\", pseudos );\\n\\t\\t});\\n\\t}\\n\\n\\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\\\"|\\\") );\\n\\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\\\"|\\\") );\\n\\n\\t/* Contains\\n\\t---------------------------------------------------------------------- */\\n\\thasCompare = rnative.test( docElem.compareDocumentPosition );\\n\\n\\t// Element contains another\\n\\t// Purposefully self-exclusive\\n\\t// As in, an element does not contain itself\\n\\tcontains = hasCompare || rnative.test( docElem.contains ) ?\\n\\t\\tfunction( a, b ) {\\n\\t\\t\\tvar adown = a.nodeType === 9 ? a.documentElement : a,\\n\\t\\t\\t\\tbup = b && b.parentNode;\\n\\t\\t\\treturn a === bup || !!( bup && bup.nodeType === 1 && (\\n\\t\\t\\t\\tadown.contains ?\\n\\t\\t\\t\\t\\tadown.contains( bup ) :\\n\\t\\t\\t\\t\\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\\n\\t\\t\\t));\\n\\t\\t} :\\n\\t\\tfunction( a, b ) {\\n\\t\\t\\tif ( b ) {\\n\\t\\t\\t\\twhile ( (b = b.parentNode) ) {\\n\\t\\t\\t\\t\\tif ( b === a ) {\\n\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn false;\\n\\t\\t};\\n\\n\\t/* Sorting\\n\\t---------------------------------------------------------------------- */\\n\\n\\t// Document order sorting\\n\\tsortOrder = hasCompare ?\\n\\tfunction( a, b ) {\\n\\n\\t\\t// Flag for duplicate removal\\n\\t\\tif ( a === b ) {\\n\\t\\t\\thasDuplicate = true;\\n\\t\\t\\treturn 0;\\n\\t\\t}\\n\\n\\t\\t// Sort on method existence if only one input has compareDocumentPosition\\n\\t\\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\\n\\t\\tif ( compare ) {\\n\\t\\t\\treturn compare;\\n\\t\\t}\\n\\n\\t\\t// Calculate position if both inputs belong to the same document\\n\\t\\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\\n\\t\\t\\ta.compareDocumentPosition( b ) :\\n\\n\\t\\t\\t// Otherwise we know they are disconnected\\n\\t\\t\\t1;\\n\\n\\t\\t// Disconnected nodes\\n\\t\\tif ( compare & 1 ||\\n\\t\\t\\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\\n\\n\\t\\t\\t// Choose the first element that is related to our preferred document\\n\\t\\t\\tif ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\\n\\t\\t\\t\\treturn -1;\\n\\t\\t\\t}\\n\\t\\t\\tif ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\\n\\t\\t\\t\\treturn 1;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Maintain original order\\n\\t\\t\\treturn sortInput ?\\n\\t\\t\\t\\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\\n\\t\\t\\t\\t0;\\n\\t\\t}\\n\\n\\t\\treturn compare & 4 ? -1 : 1;\\n\\t} :\\n\\tfunction( a, b ) {\\n\\t\\t// Exit early if the nodes are identical\\n\\t\\tif ( a === b ) {\\n\\t\\t\\thasDuplicate = true;\\n\\t\\t\\treturn 0;\\n\\t\\t}\\n\\n\\t\\tvar cur,\\n\\t\\t\\ti = 0,\\n\\t\\t\\taup = a.parentNode,\\n\\t\\t\\tbup = b.parentNode,\\n\\t\\t\\tap = [ a ],\\n\\t\\t\\tbp = [ b ];\\n\\n\\t\\t// Parentless nodes are either documents or disconnected\\n\\t\\tif ( !aup || !bup ) {\\n\\t\\t\\treturn a === document ? -1 :\\n\\t\\t\\t\\tb === document ? 1 :\\n\\t\\t\\t\\taup ? -1 :\\n\\t\\t\\t\\tbup ? 1 :\\n\\t\\t\\t\\tsortInput ?\\n\\t\\t\\t\\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\\n\\t\\t\\t\\t0;\\n\\n\\t\\t// If the nodes are siblings, we can do a quick check\\n\\t\\t} else if ( aup === bup ) {\\n\\t\\t\\treturn siblingCheck( a, b );\\n\\t\\t}\\n\\n\\t\\t// Otherwise we need full lists of their ancestors for comparison\\n\\t\\tcur = a;\\n\\t\\twhile ( (cur = cur.parentNode) ) {\\n\\t\\t\\tap.unshift( cur );\\n\\t\\t}\\n\\t\\tcur = b;\\n\\t\\twhile ( (cur = cur.parentNode) ) {\\n\\t\\t\\tbp.unshift( cur );\\n\\t\\t}\\n\\n\\t\\t// Walk down the tree looking for a discrepancy\\n\\t\\twhile ( ap[i] === bp[i] ) {\\n\\t\\t\\ti++;\\n\\t\\t}\\n\\n\\t\\treturn i ?\\n\\t\\t\\t// Do a sibling check if the nodes have a common ancestor\\n\\t\\t\\tsiblingCheck( ap[i], bp[i] ) :\\n\\n\\t\\t\\t// Otherwise nodes in our document sort first\\n\\t\\t\\tap[i] === preferredDoc ? -1 :\\n\\t\\t\\tbp[i] === preferredDoc ? 1 :\\n\\t\\t\\t0;\\n\\t};\\n\\n\\treturn document;\\n};\\n\\nSizzle.matches = function( expr, elements ) {\\n\\treturn Sizzle( expr, null, null, elements );\\n};\\n\\nSizzle.matchesSelector = function( elem, expr ) {\\n\\t// Set document vars if needed\\n\\tif ( ( elem.ownerDocument || elem ) !== document ) {\\n\\t\\tsetDocument( elem );\\n\\t}\\n\\n\\t// Make sure that attribute selectors are quoted\\n\\texpr = expr.replace( rattributeQuotes, \\\"='$1']\\\" );\\n\\n\\tif ( support.matchesSelector && documentIsHTML &&\\n\\t\\t!compilerCache[ expr + \\\" \\\" ] &&\\n\\t\\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\\n\\t\\t( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {\\n\\n\\t\\ttry {\\n\\t\\t\\tvar ret = matches.call( elem, expr );\\n\\n\\t\\t\\t// IE 9's matchesSelector returns false on disconnected nodes\\n\\t\\t\\tif ( ret || support.disconnectedMatch ||\\n\\t\\t\\t\\t\\t// As well, disconnected nodes are said to be in a document\\n\\t\\t\\t\\t\\t// fragment in IE 9\\n\\t\\t\\t\\t\\telem.document && elem.document.nodeType !== 11 ) {\\n\\t\\t\\t\\treturn ret;\\n\\t\\t\\t}\\n\\t\\t} catch (e) {}\\n\\t}\\n\\n\\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\\n};\\n\\nSizzle.contains = function( context, elem ) {\\n\\t// Set document vars if needed\\n\\tif ( ( context.ownerDocument || context ) !== document ) {\\n\\t\\tsetDocument( context );\\n\\t}\\n\\treturn contains( context, elem );\\n};\\n\\nSizzle.attr = function( elem, name ) {\\n\\t// Set document vars if needed\\n\\tif ( ( elem.ownerDocument || elem ) !== document ) {\\n\\t\\tsetDocument( elem );\\n\\t}\\n\\n\\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\\n\\t\\t// Don't get fooled by Object.prototype properties (jQuery #13807)\\n\\t\\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\\n\\t\\t\\tfn( elem, name, !documentIsHTML ) :\\n\\t\\t\\tundefined;\\n\\n\\treturn val !== undefined ?\\n\\t\\tval :\\n\\t\\tsupport.attributes || !documentIsHTML ?\\n\\t\\t\\telem.getAttribute( name ) :\\n\\t\\t\\t(val = elem.getAttributeNode(name)) && val.specified ?\\n\\t\\t\\t\\tval.value :\\n\\t\\t\\t\\tnull;\\n};\\n\\nSizzle.escape = function( sel ) {\\n\\treturn (sel + \\\"\\\").replace( rcssescape, fcssescape );\\n};\\n\\nSizzle.error = function( msg ) {\\n\\tthrow new Error( \\\"Syntax error, unrecognized expression: \\\" + msg );\\n};\\n\\n/**\\n * Document sorting and removing duplicates\\n * @param {ArrayLike} results\\n */\\nSizzle.uniqueSort = function( results ) {\\n\\tvar elem,\\n\\t\\tduplicates = [],\\n\\t\\tj = 0,\\n\\t\\ti = 0;\\n\\n\\t// Unless we *know* we can detect duplicates, assume their presence\\n\\thasDuplicate = !support.detectDuplicates;\\n\\tsortInput = !support.sortStable && results.slice( 0 );\\n\\tresults.sort( sortOrder );\\n\\n\\tif ( hasDuplicate ) {\\n\\t\\twhile ( (elem = results[i++]) ) {\\n\\t\\t\\tif ( elem === results[ i ] ) {\\n\\t\\t\\t\\tj = duplicates.push( i );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\twhile ( j-- ) {\\n\\t\\t\\tresults.splice( duplicates[ j ], 1 );\\n\\t\\t}\\n\\t}\\n\\n\\t// Clear input after sorting to release objects\\n\\t// See https://github.com/jquery/sizzle/pull/225\\n\\tsortInput = null;\\n\\n\\treturn results;\\n};\\n\\n/**\\n * Utility function for retrieving the text value of an array of DOM nodes\\n * @param {Array|Element} elem\\n */\\ngetText = Sizzle.getText = function( elem ) {\\n\\tvar node,\\n\\t\\tret = \\\"\\\",\\n\\t\\ti = 0,\\n\\t\\tnodeType = elem.nodeType;\\n\\n\\tif ( !nodeType ) {\\n\\t\\t// If no nodeType, this is expected to be an array\\n\\t\\twhile ( (node = elem[i++]) ) {\\n\\t\\t\\t// Do not traverse comment nodes\\n\\t\\t\\tret += getText( node );\\n\\t\\t}\\n\\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\\n\\t\\t// Use textContent for elements\\n\\t\\t// innerText usage removed for consistency of new lines (jQuery #11153)\\n\\t\\tif ( typeof elem.textContent === \\\"string\\\" ) {\\n\\t\\t\\treturn elem.textContent;\\n\\t\\t} else {\\n\\t\\t\\t// Traverse its children\\n\\t\\t\\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\\n\\t\\t\\t\\tret += getText( elem );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t} else if ( nodeType === 3 || nodeType === 4 ) {\\n\\t\\treturn elem.nodeValue;\\n\\t}\\n\\t// Do not include comment or processing instruction nodes\\n\\n\\treturn ret;\\n};\\n\\nExpr = Sizzle.selectors = {\\n\\n\\t// Can be adjusted by the user\\n\\tcacheLength: 50,\\n\\n\\tcreatePseudo: markFunction,\\n\\n\\tmatch: matchExpr,\\n\\n\\tattrHandle: {},\\n\\n\\tfind: {},\\n\\n\\trelative: {\\n\\t\\t\\\">\\\": { dir: \\\"parentNode\\\", first: true },\\n\\t\\t\\\" \\\": { dir: \\\"parentNode\\\" },\\n\\t\\t\\\"+\\\": { dir: \\\"previousSibling\\\", first: true },\\n\\t\\t\\\"~\\\": { dir: \\\"previousSibling\\\" }\\n\\t},\\n\\n\\tpreFilter: {\\n\\t\\t\\\"ATTR\\\": function( match ) {\\n\\t\\t\\tmatch[1] = match[1].replace( runescape, funescape );\\n\\n\\t\\t\\t// Move the given value to match[3] whether quoted or unquoted\\n\\t\\t\\tmatch[3] = ( match[3] || match[4] || match[5] || \\\"\\\" ).replace( runescape, funescape );\\n\\n\\t\\t\\tif ( match[2] === \\\"~=\\\" ) {\\n\\t\\t\\t\\tmatch[3] = \\\" \\\" + match[3] + \\\" \\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn match.slice( 0, 4 );\\n\\t\\t},\\n\\n\\t\\t\\\"CHILD\\\": function( match ) {\\n\\t\\t\\t/* matches from matchExpr[\\\"CHILD\\\"]\\n\\t\\t\\t\\t1 type (only|nth|...)\\n\\t\\t\\t\\t2 what (child|of-type)\\n\\t\\t\\t\\t3 argument (even|odd|\\\\d*|\\\\d*n([+-]\\\\d+)?|...)\\n\\t\\t\\t\\t4 xn-component of xn+y argument ([+-]?\\\\d*n|)\\n\\t\\t\\t\\t5 sign of xn-component\\n\\t\\t\\t\\t6 x of xn-component\\n\\t\\t\\t\\t7 sign of y-component\\n\\t\\t\\t\\t8 y of y-component\\n\\t\\t\\t*/\\n\\t\\t\\tmatch[1] = match[1].toLowerCase();\\n\\n\\t\\t\\tif ( match[1].slice( 0, 3 ) === \\\"nth\\\" ) {\\n\\t\\t\\t\\t// nth-* requires argument\\n\\t\\t\\t\\tif ( !match[3] ) {\\n\\t\\t\\t\\t\\tSizzle.error( match[0] );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// numeric x and y parameters for Expr.filter.CHILD\\n\\t\\t\\t\\t// remember that false/true cast respectively to 0/1\\n\\t\\t\\t\\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \\\"even\\\" || match[3] === \\\"odd\\\" ) );\\n\\t\\t\\t\\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \\\"odd\\\" );\\n\\n\\t\\t\\t// other types prohibit arguments\\n\\t\\t\\t} else if ( match[3] ) {\\n\\t\\t\\t\\tSizzle.error( match[0] );\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn match;\\n\\t\\t},\\n\\n\\t\\t\\\"PSEUDO\\\": function( match ) {\\n\\t\\t\\tvar excess,\\n\\t\\t\\t\\tunquoted = !match[6] && match[2];\\n\\n\\t\\t\\tif ( matchExpr[\\\"CHILD\\\"].test( match[0] ) ) {\\n\\t\\t\\t\\treturn null;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Accept quoted arguments as-is\\n\\t\\t\\tif ( match[3] ) {\\n\\t\\t\\t\\tmatch[2] = match[4] || match[5] || \\\"\\\";\\n\\n\\t\\t\\t// Strip excess characters from unquoted arguments\\n\\t\\t\\t} else if ( unquoted && rpseudo.test( unquoted ) &&\\n\\t\\t\\t\\t// Get excess from tokenize (recursively)\\n\\t\\t\\t\\t(excess = tokenize( unquoted, true )) &&\\n\\t\\t\\t\\t// advance to the next closing parenthesis\\n\\t\\t\\t\\t(excess = unquoted.indexOf( \\\")\\\", unquoted.length - excess ) - unquoted.length) ) {\\n\\n\\t\\t\\t\\t// excess is a negative index\\n\\t\\t\\t\\tmatch[0] = match[0].slice( 0, excess );\\n\\t\\t\\t\\tmatch[2] = unquoted.slice( 0, excess );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Return only captures needed by the pseudo filter method (type and argument)\\n\\t\\t\\treturn match.slice( 0, 3 );\\n\\t\\t}\\n\\t},\\n\\n\\tfilter: {\\n\\n\\t\\t\\\"TAG\\\": function( nodeNameSelector ) {\\n\\t\\t\\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\\n\\t\\t\\treturn nodeNameSelector === \\\"*\\\" ?\\n\\t\\t\\t\\tfunction() { return true; } :\\n\\t\\t\\t\\tfunction( elem ) {\\n\\t\\t\\t\\t\\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\\n\\t\\t\\t\\t};\\n\\t\\t},\\n\\n\\t\\t\\\"CLASS\\\": function( className ) {\\n\\t\\t\\tvar pattern = classCache[ className + \\\" \\\" ];\\n\\n\\t\\t\\treturn pattern ||\\n\\t\\t\\t\\t(pattern = new RegExp( \\\"(^|\\\" + whitespace + \\\")\\\" + className + \\\"(\\\" + whitespace + \\\"|$)\\\" )) &&\\n\\t\\t\\t\\tclassCache( className, function( elem ) {\\n\\t\\t\\t\\t\\treturn pattern.test( typeof elem.className === \\\"string\\\" && elem.className || typeof elem.getAttribute !== \\\"undefined\\\" && elem.getAttribute(\\\"class\\\") || \\\"\\\" );\\n\\t\\t\\t\\t});\\n\\t\\t},\\n\\n\\t\\t\\\"ATTR\\\": function( name, operator, check ) {\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\tvar result = Sizzle.attr( elem, name );\\n\\n\\t\\t\\t\\tif ( result == null ) {\\n\\t\\t\\t\\t\\treturn operator === \\\"!=\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif ( !operator ) {\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tresult += \\\"\\\";\\n\\n\\t\\t\\t\\treturn operator === \\\"=\\\" ? result === check :\\n\\t\\t\\t\\t\\toperator === \\\"!=\\\" ? result !== check :\\n\\t\\t\\t\\t\\toperator === \\\"^=\\\" ? check && result.indexOf( check ) === 0 :\\n\\t\\t\\t\\t\\toperator === \\\"*=\\\" ? check && result.indexOf( check ) > -1 :\\n\\t\\t\\t\\t\\toperator === \\\"$=\\\" ? check && result.slice( -check.length ) === check :\\n\\t\\t\\t\\t\\toperator === \\\"~=\\\" ? ( \\\" \\\" + result.replace( rwhitespace, \\\" \\\" ) + \\\" \\\" ).indexOf( check ) > -1 :\\n\\t\\t\\t\\t\\toperator === \\\"|=\\\" ? result === check || result.slice( 0, check.length + 1 ) === check + \\\"-\\\" :\\n\\t\\t\\t\\t\\tfalse;\\n\\t\\t\\t};\\n\\t\\t},\\n\\n\\t\\t\\\"CHILD\\\": function( type, what, argument, first, last ) {\\n\\t\\t\\tvar simple = type.slice( 0, 3 ) !== \\\"nth\\\",\\n\\t\\t\\t\\tforward = type.slice( -4 ) !== \\\"last\\\",\\n\\t\\t\\t\\tofType = what === \\\"of-type\\\";\\n\\n\\t\\t\\treturn first === 1 && last === 0 ?\\n\\n\\t\\t\\t\\t// Shortcut for :nth-*(n)\\n\\t\\t\\t\\tfunction( elem ) {\\n\\t\\t\\t\\t\\treturn !!elem.parentNode;\\n\\t\\t\\t\\t} :\\n\\n\\t\\t\\t\\tfunction( elem, context, xml ) {\\n\\t\\t\\t\\t\\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\\n\\t\\t\\t\\t\\t\\tdir = simple !== forward ? \\\"nextSibling\\\" : \\\"previousSibling\\\",\\n\\t\\t\\t\\t\\t\\tparent = elem.parentNode,\\n\\t\\t\\t\\t\\t\\tname = ofType && elem.nodeName.toLowerCase(),\\n\\t\\t\\t\\t\\t\\tuseCache = !xml && !ofType,\\n\\t\\t\\t\\t\\t\\tdiff = false;\\n\\n\\t\\t\\t\\t\\tif ( parent ) {\\n\\n\\t\\t\\t\\t\\t\\t// :(first|last|only)-(child|of-type)\\n\\t\\t\\t\\t\\t\\tif ( simple ) {\\n\\t\\t\\t\\t\\t\\t\\twhile ( dir ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tnode = elem;\\n\\t\\t\\t\\t\\t\\t\\t\\twhile ( (node = node[ dir ]) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( ofType ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tnode.nodeName.toLowerCase() === name :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tnode.nodeType === 1 ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t// Reverse direction for :only-* (if we haven't yet done so)\\n\\t\\t\\t\\t\\t\\t\\t\\tstart = dir = type === \\\"only\\\" && !start && \\\"nextSibling\\\";\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\tstart = [ forward ? parent.firstChild : parent.lastChild ];\\n\\n\\t\\t\\t\\t\\t\\t// non-xml :nth-child(...) stores cache data on `parent`\\n\\t\\t\\t\\t\\t\\tif ( forward && useCache ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Seek `elem` from a previously-cached index\\n\\n\\t\\t\\t\\t\\t\\t\\t// ...in a gzip-friendly way\\n\\t\\t\\t\\t\\t\\t\\tnode = parent;\\n\\t\\t\\t\\t\\t\\t\\touterCache = node[ expando ] || (node[ expando ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\t// Support: IE <9 only\\n\\t\\t\\t\\t\\t\\t\\t// Defend against cloned attroperties (jQuery gh-1709)\\n\\t\\t\\t\\t\\t\\t\\tuniqueCache = outerCache[ node.uniqueID ] ||\\n\\t\\t\\t\\t\\t\\t\\t\\t(outerCache[ node.uniqueID ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\tcache = uniqueCache[ type ] || [];\\n\\t\\t\\t\\t\\t\\t\\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\\n\\t\\t\\t\\t\\t\\t\\tdiff = nodeIndex && cache[ 2 ];\\n\\t\\t\\t\\t\\t\\t\\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\\n\\n\\t\\t\\t\\t\\t\\t\\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Fallback to seeking `elem` from the start\\n\\t\\t\\t\\t\\t\\t\\t\\t(diff = nodeIndex = 0) || start.pop()) ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// When found, cache indexes on `parent` and break\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( node.nodeType === 1 && ++diff && node === elem ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t// Use previously-cached element index if available\\n\\t\\t\\t\\t\\t\\t\\tif ( useCache ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t// ...in a gzip-friendly way\\n\\t\\t\\t\\t\\t\\t\\t\\tnode = elem;\\n\\t\\t\\t\\t\\t\\t\\t\\touterCache = node[ expando ] || (node[ expando ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Support: IE <9 only\\n\\t\\t\\t\\t\\t\\t\\t\\t// Defend against cloned attroperties (jQuery gh-1709)\\n\\t\\t\\t\\t\\t\\t\\t\\tuniqueCache = outerCache[ node.uniqueID ] ||\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(outerCache[ node.uniqueID ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\t\\tcache = uniqueCache[ type ] || [];\\n\\t\\t\\t\\t\\t\\t\\t\\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\\n\\t\\t\\t\\t\\t\\t\\t\\tdiff = nodeIndex;\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t// xml :nth-child(...)\\n\\t\\t\\t\\t\\t\\t\\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\\n\\t\\t\\t\\t\\t\\t\\tif ( diff === false ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t// Use the same loop as above to seek `elem` from the start\\n\\t\\t\\t\\t\\t\\t\\t\\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t(diff = nodeIndex = 0) || start.pop()) ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( ( ofType ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tnode.nodeName.toLowerCase() === name :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tnode.nodeType === 1 ) &&\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t++diff ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Cache the index of each encountered element\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( useCache ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\touterCache = node[ expando ] || (node[ expando ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: IE <9 only\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Defend against cloned attroperties (jQuery gh-1709)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tuniqueCache = outerCache[ node.uniqueID ] ||\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t(outerCache[ node.uniqueID ] = {});\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tuniqueCache[ type ] = [ dirruns, diff ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( node === elem ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t// Incorporate the offset, then check against cycle size\\n\\t\\t\\t\\t\\t\\tdiff -= last;\\n\\t\\t\\t\\t\\t\\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t};\\n\\t\\t},\\n\\n\\t\\t\\\"PSEUDO\\\": function( pseudo, argument ) {\\n\\t\\t\\t// pseudo-class names are case-insensitive\\n\\t\\t\\t// http://www.w3.org/TR/selectors/#pseudo-classes\\n\\t\\t\\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\\n\\t\\t\\t// Remember that setFilters inherits from pseudos\\n\\t\\t\\tvar args,\\n\\t\\t\\t\\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\\n\\t\\t\\t\\t\\tSizzle.error( \\\"unsupported pseudo: \\\" + pseudo );\\n\\n\\t\\t\\t// The user may use createPseudo to indicate that\\n\\t\\t\\t// arguments are needed to create the filter function\\n\\t\\t\\t// just as Sizzle does\\n\\t\\t\\tif ( fn[ expando ] ) {\\n\\t\\t\\t\\treturn fn( argument );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// But maintain support for old signatures\\n\\t\\t\\tif ( fn.length > 1 ) {\\n\\t\\t\\t\\targs = [ pseudo, pseudo, \\\"\\\", argument ];\\n\\t\\t\\t\\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\\n\\t\\t\\t\\t\\tmarkFunction(function( seed, matches ) {\\n\\t\\t\\t\\t\\t\\tvar idx,\\n\\t\\t\\t\\t\\t\\t\\tmatched = fn( seed, argument ),\\n\\t\\t\\t\\t\\t\\t\\ti = matched.length;\\n\\t\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\t\\t\\tidx = indexOf( seed, matched[i] );\\n\\t\\t\\t\\t\\t\\t\\tseed[ idx ] = !( matches[ idx ] = matched[i] );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}) :\\n\\t\\t\\t\\t\\tfunction( elem ) {\\n\\t\\t\\t\\t\\t\\treturn fn( elem, 0, args );\\n\\t\\t\\t\\t\\t};\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn fn;\\n\\t\\t}\\n\\t},\\n\\n\\tpseudos: {\\n\\t\\t// Potentially complex pseudos\\n\\t\\t\\\"not\\\": markFunction(function( selector ) {\\n\\t\\t\\t// Trim the selector passed to compile\\n\\t\\t\\t// to avoid treating leading and trailing\\n\\t\\t\\t// spaces as combinators\\n\\t\\t\\tvar input = [],\\n\\t\\t\\t\\tresults = [],\\n\\t\\t\\t\\tmatcher = compile( selector.replace( rtrim, \\\"$1\\\" ) );\\n\\n\\t\\t\\treturn matcher[ expando ] ?\\n\\t\\t\\t\\tmarkFunction(function( seed, matches, context, xml ) {\\n\\t\\t\\t\\t\\tvar elem,\\n\\t\\t\\t\\t\\t\\tunmatched = matcher( seed, null, xml, [] ),\\n\\t\\t\\t\\t\\t\\ti = seed.length;\\n\\n\\t\\t\\t\\t\\t// Match elements unmatched by `matcher`\\n\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\t\\tif ( (elem = unmatched[i]) ) {\\n\\t\\t\\t\\t\\t\\t\\tseed[i] = !(matches[i] = elem);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}) :\\n\\t\\t\\t\\tfunction( elem, context, xml ) {\\n\\t\\t\\t\\t\\tinput[0] = elem;\\n\\t\\t\\t\\t\\tmatcher( input, null, xml, results );\\n\\t\\t\\t\\t\\t// Don't keep the element (issue #299)\\n\\t\\t\\t\\t\\tinput[0] = null;\\n\\t\\t\\t\\t\\treturn !results.pop();\\n\\t\\t\\t\\t};\\n\\t\\t}),\\n\\n\\t\\t\\\"has\\\": markFunction(function( selector ) {\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\treturn Sizzle( selector, elem ).length > 0;\\n\\t\\t\\t};\\n\\t\\t}),\\n\\n\\t\\t\\\"contains\\\": markFunction(function( text ) {\\n\\t\\t\\ttext = text.replace( runescape, funescape );\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\\n\\t\\t\\t};\\n\\t\\t}),\\n\\n\\t\\t// \\\"Whether an element is represented by a :lang() selector\\n\\t\\t// is based solely on the element's language value\\n\\t\\t// being equal to the identifier C,\\n\\t\\t// or beginning with the identifier C immediately followed by \\\"-\\\".\\n\\t\\t// The matching of C against the element's language value is performed case-insensitively.\\n\\t\\t// The identifier C does not have to be a valid language name.\\\"\\n\\t\\t// http://www.w3.org/TR/selectors/#lang-pseudo\\n\\t\\t\\\"lang\\\": markFunction( function( lang ) {\\n\\t\\t\\t// lang value must be a valid identifier\\n\\t\\t\\tif ( !ridentifier.test(lang || \\\"\\\") ) {\\n\\t\\t\\t\\tSizzle.error( \\\"unsupported lang: \\\" + lang );\\n\\t\\t\\t}\\n\\t\\t\\tlang = lang.replace( runescape, funescape ).toLowerCase();\\n\\t\\t\\treturn function( elem ) {\\n\\t\\t\\t\\tvar elemLang;\\n\\t\\t\\t\\tdo {\\n\\t\\t\\t\\t\\tif ( (elemLang = documentIsHTML ?\\n\\t\\t\\t\\t\\t\\telem.lang :\\n\\t\\t\\t\\t\\t\\telem.getAttribute(\\\"xml:lang\\\") || elem.getAttribute(\\\"lang\\\")) ) {\\n\\n\\t\\t\\t\\t\\t\\telemLang = elemLang.toLowerCase();\\n\\t\\t\\t\\t\\t\\treturn elemLang === lang || elemLang.indexOf( lang + \\\"-\\\" ) === 0;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t};\\n\\t\\t}),\\n\\n\\t\\t// Miscellaneous\\n\\t\\t\\\"target\\\": function( elem ) {\\n\\t\\t\\tvar hash = window.location && window.location.hash;\\n\\t\\t\\treturn hash && hash.slice( 1 ) === elem.id;\\n\\t\\t},\\n\\n\\t\\t\\\"root\\\": function( elem ) {\\n\\t\\t\\treturn elem === docElem;\\n\\t\\t},\\n\\n\\t\\t\\\"focus\\\": function( elem ) {\\n\\t\\t\\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\\n\\t\\t},\\n\\n\\t\\t// Boolean properties\\n\\t\\t\\\"enabled\\\": createDisabledPseudo( false ),\\n\\t\\t\\\"disabled\\\": createDisabledPseudo( true ),\\n\\n\\t\\t\\\"checked\\\": function( elem ) {\\n\\t\\t\\t// In CSS3, :checked should return both checked and selected elements\\n\\t\\t\\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\\n\\t\\t\\tvar nodeName = elem.nodeName.toLowerCase();\\n\\t\\t\\treturn (nodeName === \\\"input\\\" && !!elem.checked) || (nodeName === \\\"option\\\" && !!elem.selected);\\n\\t\\t},\\n\\n\\t\\t\\\"selected\\\": function( elem ) {\\n\\t\\t\\t// Accessing this property makes selected-by-default\\n\\t\\t\\t// options in Safari work properly\\n\\t\\t\\tif ( elem.parentNode ) {\\n\\t\\t\\t\\telem.parentNode.selectedIndex;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn elem.selected === true;\\n\\t\\t},\\n\\n\\t\\t// Contents\\n\\t\\t\\\"empty\\\": function( elem ) {\\n\\t\\t\\t// http://www.w3.org/TR/selectors/#empty-pseudo\\n\\t\\t\\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\\n\\t\\t\\t// but not by others (comment: 8; processing instruction: 7; etc.)\\n\\t\\t\\t// nodeType < 6 works because attributes (2) do not appear as children\\n\\t\\t\\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\\n\\t\\t\\t\\tif ( elem.nodeType < 6 ) {\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn true;\\n\\t\\t},\\n\\n\\t\\t\\\"parent\\\": function( elem ) {\\n\\t\\t\\treturn !Expr.pseudos[\\\"empty\\\"]( elem );\\n\\t\\t},\\n\\n\\t\\t// Element/input types\\n\\t\\t\\\"header\\\": function( elem ) {\\n\\t\\t\\treturn rheader.test( elem.nodeName );\\n\\t\\t},\\n\\n\\t\\t\\\"input\\\": function( elem ) {\\n\\t\\t\\treturn rinputs.test( elem.nodeName );\\n\\t\\t},\\n\\n\\t\\t\\\"button\\\": function( elem ) {\\n\\t\\t\\tvar name = elem.nodeName.toLowerCase();\\n\\t\\t\\treturn name === \\\"input\\\" && elem.type === \\\"button\\\" || name === \\\"button\\\";\\n\\t\\t},\\n\\n\\t\\t\\\"text\\\": function( elem ) {\\n\\t\\t\\tvar attr;\\n\\t\\t\\treturn elem.nodeName.toLowerCase() === \\\"input\\\" &&\\n\\t\\t\\t\\telem.type === \\\"text\\\" &&\\n\\n\\t\\t\\t\\t// Support: IE<8\\n\\t\\t\\t\\t// New HTML5 attribute values (e.g., \\\"search\\\") appear with elem.type === \\\"text\\\"\\n\\t\\t\\t\\t( (attr = elem.getAttribute(\\\"type\\\")) == null || attr.toLowerCase() === \\\"text\\\" );\\n\\t\\t},\\n\\n\\t\\t// Position-in-collection\\n\\t\\t\\\"first\\\": createPositionalPseudo(function() {\\n\\t\\t\\treturn [ 0 ];\\n\\t\\t}),\\n\\n\\t\\t\\\"last\\\": createPositionalPseudo(function( matchIndexes, length ) {\\n\\t\\t\\treturn [ length - 1 ];\\n\\t\\t}),\\n\\n\\t\\t\\\"eq\\\": createPositionalPseudo(function( matchIndexes, length, argument ) {\\n\\t\\t\\treturn [ argument < 0 ? argument + length : argument ];\\n\\t\\t}),\\n\\n\\t\\t\\\"even\\\": createPositionalPseudo(function( matchIndexes, length ) {\\n\\t\\t\\tvar i = 0;\\n\\t\\t\\tfor ( ; i < length; i += 2 ) {\\n\\t\\t\\t\\tmatchIndexes.push( i );\\n\\t\\t\\t}\\n\\t\\t\\treturn matchIndexes;\\n\\t\\t}),\\n\\n\\t\\t\\\"odd\\\": createPositionalPseudo(function( matchIndexes, length ) {\\n\\t\\t\\tvar i = 1;\\n\\t\\t\\tfor ( ; i < length; i += 2 ) {\\n\\t\\t\\t\\tmatchIndexes.push( i );\\n\\t\\t\\t}\\n\\t\\t\\treturn matchIndexes;\\n\\t\\t}),\\n\\n\\t\\t\\\"lt\\\": createPositionalPseudo(function( matchIndexes, length, argument ) {\\n\\t\\t\\tvar i = argument < 0 ? argument + length : argument;\\n\\t\\t\\tfor ( ; --i >= 0; ) {\\n\\t\\t\\t\\tmatchIndexes.push( i );\\n\\t\\t\\t}\\n\\t\\t\\treturn matchIndexes;\\n\\t\\t}),\\n\\n\\t\\t\\\"gt\\\": createPositionalPseudo(function( matchIndexes, length, argument ) {\\n\\t\\t\\tvar i = argument < 0 ? argument + length : argument;\\n\\t\\t\\tfor ( ; ++i < length; ) {\\n\\t\\t\\t\\tmatchIndexes.push( i );\\n\\t\\t\\t}\\n\\t\\t\\treturn matchIndexes;\\n\\t\\t})\\n\\t}\\n};\\n\\nExpr.pseudos[\\\"nth\\\"] = Expr.pseudos[\\\"eq\\\"];\\n\\n// Add button/input type pseudos\\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\\n\\tExpr.pseudos[ i ] = createInputPseudo( i );\\n}\\nfor ( i in { submit: true, reset: true } ) {\\n\\tExpr.pseudos[ i ] = createButtonPseudo( i );\\n}\\n\\n// Easy API for creating new setFilters\\nfunction setFilters() {}\\nsetFilters.prototype = Expr.filters = Expr.pseudos;\\nExpr.setFilters = new setFilters();\\n\\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\\n\\tvar matched, match, tokens, type,\\n\\t\\tsoFar, groups, preFilters,\\n\\t\\tcached = tokenCache[ selector + \\\" \\\" ];\\n\\n\\tif ( cached ) {\\n\\t\\treturn parseOnly ? 0 : cached.slice( 0 );\\n\\t}\\n\\n\\tsoFar = selector;\\n\\tgroups = [];\\n\\tpreFilters = Expr.preFilter;\\n\\n\\twhile ( soFar ) {\\n\\n\\t\\t// Comma and first run\\n\\t\\tif ( !matched || (match = rcomma.exec( soFar )) ) {\\n\\t\\t\\tif ( match ) {\\n\\t\\t\\t\\t// Don't consume trailing commas as valid\\n\\t\\t\\t\\tsoFar = soFar.slice( match[0].length ) || soFar;\\n\\t\\t\\t}\\n\\t\\t\\tgroups.push( (tokens = []) );\\n\\t\\t}\\n\\n\\t\\tmatched = false;\\n\\n\\t\\t// Combinators\\n\\t\\tif ( (match = rcombinators.exec( soFar )) ) {\\n\\t\\t\\tmatched = match.shift();\\n\\t\\t\\ttokens.push({\\n\\t\\t\\t\\tvalue: matched,\\n\\t\\t\\t\\t// Cast descendant combinators to space\\n\\t\\t\\t\\ttype: match[0].replace( rtrim, \\\" \\\" )\\n\\t\\t\\t});\\n\\t\\t\\tsoFar = soFar.slice( matched.length );\\n\\t\\t}\\n\\n\\t\\t// Filters\\n\\t\\tfor ( type in Expr.filter ) {\\n\\t\\t\\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\\n\\t\\t\\t\\t(match = preFilters[ type ]( match ))) ) {\\n\\t\\t\\t\\tmatched = match.shift();\\n\\t\\t\\t\\ttokens.push({\\n\\t\\t\\t\\t\\tvalue: matched,\\n\\t\\t\\t\\t\\ttype: type,\\n\\t\\t\\t\\t\\tmatches: match\\n\\t\\t\\t\\t});\\n\\t\\t\\t\\tsoFar = soFar.slice( matched.length );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif ( !matched ) {\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\\n\\n\\t// Return the length of the invalid excess\\n\\t// if we're just parsing\\n\\t// Otherwise, throw an error or return tokens\\n\\treturn parseOnly ?\\n\\t\\tsoFar.length :\\n\\t\\tsoFar ?\\n\\t\\t\\tSizzle.error( selector ) :\\n\\t\\t\\t// Cache the tokens\\n\\t\\t\\ttokenCache( selector, groups ).slice( 0 );\\n};\\n\\nfunction toSelector( tokens ) {\\n\\tvar i = 0,\\n\\t\\tlen = tokens.length,\\n\\t\\tselector = \\\"\\\";\\n\\tfor ( ; i < len; i++ ) {\\n\\t\\tselector += tokens[i].value;\\n\\t}\\n\\treturn selector;\\n}\\n\\nfunction addCombinator( matcher, combinator, base ) {\\n\\tvar dir = combinator.dir,\\n\\t\\tskip = combinator.next,\\n\\t\\tkey = skip || dir,\\n\\t\\tcheckNonElements = base && key === \\\"parentNode\\\",\\n\\t\\tdoneName = done++;\\n\\n\\treturn combinator.first ?\\n\\t\\t// Check against closest ancestor/preceding element\\n\\t\\tfunction( elem, context, xml ) {\\n\\t\\t\\twhile ( (elem = elem[ dir ]) ) {\\n\\t\\t\\t\\tif ( elem.nodeType === 1 || checkNonElements ) {\\n\\t\\t\\t\\t\\treturn matcher( elem, context, xml );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn false;\\n\\t\\t} :\\n\\n\\t\\t// Check against all ancestor/preceding elements\\n\\t\\tfunction( elem, context, xml ) {\\n\\t\\t\\tvar oldCache, uniqueCache, outerCache,\\n\\t\\t\\t\\tnewCache = [ dirruns, doneName ];\\n\\n\\t\\t\\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\\n\\t\\t\\tif ( xml ) {\\n\\t\\t\\t\\twhile ( (elem = elem[ dir ]) ) {\\n\\t\\t\\t\\t\\tif ( elem.nodeType === 1 || checkNonElements ) {\\n\\t\\t\\t\\t\\t\\tif ( matcher( elem, context, xml ) ) {\\n\\t\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\twhile ( (elem = elem[ dir ]) ) {\\n\\t\\t\\t\\t\\tif ( elem.nodeType === 1 || checkNonElements ) {\\n\\t\\t\\t\\t\\t\\touterCache = elem[ expando ] || (elem[ expando ] = {});\\n\\n\\t\\t\\t\\t\\t\\t// Support: IE <9 only\\n\\t\\t\\t\\t\\t\\t// Defend against cloned attroperties (jQuery gh-1709)\\n\\t\\t\\t\\t\\t\\tuniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});\\n\\n\\t\\t\\t\\t\\t\\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\\n\\t\\t\\t\\t\\t\\t\\telem = elem[ dir ] || elem;\\n\\t\\t\\t\\t\\t\\t} else if ( (oldCache = uniqueCache[ key ]) &&\\n\\t\\t\\t\\t\\t\\t\\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Assign to newCache so results back-propagate to previous elements\\n\\t\\t\\t\\t\\t\\t\\treturn (newCache[ 2 ] = oldCache[ 2 ]);\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t// Reuse newcache so results back-propagate to previous elements\\n\\t\\t\\t\\t\\t\\t\\tuniqueCache[ key ] = newCache;\\n\\n\\t\\t\\t\\t\\t\\t\\t// A match means we're done; a fail means we have to keep checking\\n\\t\\t\\t\\t\\t\\t\\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn false;\\n\\t\\t};\\n}\\n\\nfunction elementMatcher( matchers ) {\\n\\treturn matchers.length > 1 ?\\n\\t\\tfunction( elem, context, xml ) {\\n\\t\\t\\tvar i = matchers.length;\\n\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\tif ( !matchers[i]( elem, context, xml ) ) {\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn true;\\n\\t\\t} :\\n\\t\\tmatchers[0];\\n}\\n\\nfunction multipleContexts( selector, contexts, results ) {\\n\\tvar i = 0,\\n\\t\\tlen = contexts.length;\\n\\tfor ( ; i < len; i++ ) {\\n\\t\\tSizzle( selector, contexts[i], results );\\n\\t}\\n\\treturn results;\\n}\\n\\nfunction condense( unmatched, map, filter, context, xml ) {\\n\\tvar elem,\\n\\t\\tnewUnmatched = [],\\n\\t\\ti = 0,\\n\\t\\tlen = unmatched.length,\\n\\t\\tmapped = map != null;\\n\\n\\tfor ( ; i < len; i++ ) {\\n\\t\\tif ( (elem = unmatched[i]) ) {\\n\\t\\t\\tif ( !filter || filter( elem, context, xml ) ) {\\n\\t\\t\\t\\tnewUnmatched.push( elem );\\n\\t\\t\\t\\tif ( mapped ) {\\n\\t\\t\\t\\t\\tmap.push( i );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn newUnmatched;\\n}\\n\\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\\n\\tif ( postFilter && !postFilter[ expando ] ) {\\n\\t\\tpostFilter = setMatcher( postFilter );\\n\\t}\\n\\tif ( postFinder && !postFinder[ expando ] ) {\\n\\t\\tpostFinder = setMatcher( postFinder, postSelector );\\n\\t}\\n\\treturn markFunction(function( seed, results, context, xml ) {\\n\\t\\tvar temp, i, elem,\\n\\t\\t\\tpreMap = [],\\n\\t\\t\\tpostMap = [],\\n\\t\\t\\tpreexisting = results.length,\\n\\n\\t\\t\\t// Get initial elements from seed or context\\n\\t\\t\\telems = seed || multipleContexts( selector || \\\"*\\\", context.nodeType ? [ context ] : context, [] ),\\n\\n\\t\\t\\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\\n\\t\\t\\tmatcherIn = preFilter && ( seed || !selector ) ?\\n\\t\\t\\t\\tcondense( elems, preMap, preFilter, context, xml ) :\\n\\t\\t\\t\\telems,\\n\\n\\t\\t\\tmatcherOut = matcher ?\\n\\t\\t\\t\\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\\n\\t\\t\\t\\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\\n\\n\\t\\t\\t\\t\\t// ...intermediate processing is necessary\\n\\t\\t\\t\\t\\t[] :\\n\\n\\t\\t\\t\\t\\t// ...otherwise use results directly\\n\\t\\t\\t\\t\\tresults :\\n\\t\\t\\t\\tmatcherIn;\\n\\n\\t\\t// Find primary matches\\n\\t\\tif ( matcher ) {\\n\\t\\t\\tmatcher( matcherIn, matcherOut, context, xml );\\n\\t\\t}\\n\\n\\t\\t// Apply postFilter\\n\\t\\tif ( postFilter ) {\\n\\t\\t\\ttemp = condense( matcherOut, postMap );\\n\\t\\t\\tpostFilter( temp, [], context, xml );\\n\\n\\t\\t\\t// Un-match failing elements by moving them back to matcherIn\\n\\t\\t\\ti = temp.length;\\n\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\tif ( (elem = temp[i]) ) {\\n\\t\\t\\t\\t\\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif ( seed ) {\\n\\t\\t\\tif ( postFinder || preFilter ) {\\n\\t\\t\\t\\tif ( postFinder ) {\\n\\t\\t\\t\\t\\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\\n\\t\\t\\t\\t\\ttemp = [];\\n\\t\\t\\t\\t\\ti = matcherOut.length;\\n\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\t\\tif ( (elem = matcherOut[i]) ) {\\n\\t\\t\\t\\t\\t\\t\\t// Restore matcherIn since elem is not yet a final match\\n\\t\\t\\t\\t\\t\\t\\ttemp.push( (matcherIn[i] = elem) );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tpostFinder( null, (matcherOut = []), temp, xml );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Move matched elements from seed to results to keep them synchronized\\n\\t\\t\\t\\ti = matcherOut.length;\\n\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\tif ( (elem = matcherOut[i]) &&\\n\\t\\t\\t\\t\\t\\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\\n\\n\\t\\t\\t\\t\\t\\tseed[temp] = !(results[temp] = elem);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t// Add elements to results, through postFinder if defined\\n\\t\\t} else {\\n\\t\\t\\tmatcherOut = condense(\\n\\t\\t\\t\\tmatcherOut === results ?\\n\\t\\t\\t\\t\\tmatcherOut.splice( preexisting, matcherOut.length ) :\\n\\t\\t\\t\\t\\tmatcherOut\\n\\t\\t\\t);\\n\\t\\t\\tif ( postFinder ) {\\n\\t\\t\\t\\tpostFinder( null, results, matcherOut, xml );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tpush.apply( results, matcherOut );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t});\\n}\\n\\nfunction matcherFromTokens( tokens ) {\\n\\tvar checkContext, matcher, j,\\n\\t\\tlen = tokens.length,\\n\\t\\tleadingRelative = Expr.relative[ tokens[0].type ],\\n\\t\\timplicitRelative = leadingRelative || Expr.relative[\\\" \\\"],\\n\\t\\ti = leadingRelative ? 1 : 0,\\n\\n\\t\\t// The foundational matcher ensures that elements are reachable from top-level context(s)\\n\\t\\tmatchContext = addCombinator( function( elem ) {\\n\\t\\t\\treturn elem === checkContext;\\n\\t\\t}, implicitRelative, true ),\\n\\t\\tmatchAnyContext = addCombinator( function( elem ) {\\n\\t\\t\\treturn indexOf( checkContext, elem ) > -1;\\n\\t\\t}, implicitRelative, true ),\\n\\t\\tmatchers = [ function( elem, context, xml ) {\\n\\t\\t\\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\\n\\t\\t\\t\\t(checkContext = context).nodeType ?\\n\\t\\t\\t\\t\\tmatchContext( elem, context, xml ) :\\n\\t\\t\\t\\t\\tmatchAnyContext( elem, context, xml ) );\\n\\t\\t\\t// Avoid hanging onto element (issue #299)\\n\\t\\t\\tcheckContext = null;\\n\\t\\t\\treturn ret;\\n\\t\\t} ];\\n\\n\\tfor ( ; i < len; i++ ) {\\n\\t\\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\\n\\t\\t\\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\\n\\t\\t} else {\\n\\t\\t\\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\\n\\n\\t\\t\\t// Return special upon seeing a positional matcher\\n\\t\\t\\tif ( matcher[ expando ] ) {\\n\\t\\t\\t\\t// Find the next relative operator (if any) for proper handling\\n\\t\\t\\t\\tj = ++i;\\n\\t\\t\\t\\tfor ( ; j < len; j++ ) {\\n\\t\\t\\t\\t\\tif ( Expr.relative[ tokens[j].type ] ) {\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn setMatcher(\\n\\t\\t\\t\\t\\ti > 1 && elementMatcher( matchers ),\\n\\t\\t\\t\\t\\ti > 1 && toSelector(\\n\\t\\t\\t\\t\\t\\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\\n\\t\\t\\t\\t\\t\\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \\\" \\\" ? \\\"*\\\" : \\\"\\\" })\\n\\t\\t\\t\\t\\t).replace( rtrim, \\\"$1\\\" ),\\n\\t\\t\\t\\t\\tmatcher,\\n\\t\\t\\t\\t\\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\\n\\t\\t\\t\\t\\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\\n\\t\\t\\t\\t\\tj < len && toSelector( tokens )\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\t\\t\\tmatchers.push( matcher );\\n\\t\\t}\\n\\t}\\n\\n\\treturn elementMatcher( matchers );\\n}\\n\\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\\n\\tvar bySet = setMatchers.length > 0,\\n\\t\\tbyElement = elementMatchers.length > 0,\\n\\t\\tsuperMatcher = function( seed, context, xml, results, outermost ) {\\n\\t\\t\\tvar elem, j, matcher,\\n\\t\\t\\t\\tmatchedCount = 0,\\n\\t\\t\\t\\ti = \\\"0\\\",\\n\\t\\t\\t\\tunmatched = seed && [],\\n\\t\\t\\t\\tsetMatched = [],\\n\\t\\t\\t\\tcontextBackup = outermostContext,\\n\\t\\t\\t\\t// We must always have either seed elements or outermost context\\n\\t\\t\\t\\telems = seed || byElement && Expr.find[\\\"TAG\\\"]( \\\"*\\\", outermost ),\\n\\t\\t\\t\\t// Use integer dirruns iff this is the outermost matcher\\n\\t\\t\\t\\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\\n\\t\\t\\t\\tlen = elems.length;\\n\\n\\t\\t\\tif ( outermost ) {\\n\\t\\t\\t\\toutermostContext = context === document || context || outermost;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Add elements passing elementMatchers directly to results\\n\\t\\t\\t// Support: IE<9, Safari\\n\\t\\t\\t// Tolerate NodeList properties (IE: \\\"length\\\"; Safari: <number>) matching elements by id\\n\\t\\t\\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\\n\\t\\t\\t\\tif ( byElement && elem ) {\\n\\t\\t\\t\\t\\tj = 0;\\n\\t\\t\\t\\t\\tif ( !context && elem.ownerDocument !== document ) {\\n\\t\\t\\t\\t\\t\\tsetDocument( elem );\\n\\t\\t\\t\\t\\t\\txml = !documentIsHTML;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\twhile ( (matcher = elementMatchers[j++]) ) {\\n\\t\\t\\t\\t\\t\\tif ( matcher( elem, context || document, xml) ) {\\n\\t\\t\\t\\t\\t\\t\\tresults.push( elem );\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tif ( outermost ) {\\n\\t\\t\\t\\t\\t\\tdirruns = dirrunsUnique;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Track unmatched elements for set filters\\n\\t\\t\\t\\tif ( bySet ) {\\n\\t\\t\\t\\t\\t// They will have gone through all possible matchers\\n\\t\\t\\t\\t\\tif ( (elem = !matcher && elem) ) {\\n\\t\\t\\t\\t\\t\\tmatchedCount--;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Lengthen the array for every element, matched or not\\n\\t\\t\\t\\t\\tif ( seed ) {\\n\\t\\t\\t\\t\\t\\tunmatched.push( elem );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\\n\\t\\t\\t// makes the latter nonnegative.\\n\\t\\t\\tmatchedCount += i;\\n\\n\\t\\t\\t// Apply set filters to unmatched elements\\n\\t\\t\\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\\n\\t\\t\\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\\n\\t\\t\\t// no element matchers and no seed.\\n\\t\\t\\t// Incrementing an initially-string \\\"0\\\" `i` allows `i` to remain a string only in that\\n\\t\\t\\t// case, which will result in a \\\"00\\\" `matchedCount` that differs from `i` but is also\\n\\t\\t\\t// numerically zero.\\n\\t\\t\\tif ( bySet && i !== matchedCount ) {\\n\\t\\t\\t\\tj = 0;\\n\\t\\t\\t\\twhile ( (matcher = setMatchers[j++]) ) {\\n\\t\\t\\t\\t\\tmatcher( unmatched, setMatched, context, xml );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif ( seed ) {\\n\\t\\t\\t\\t\\t// Reintegrate element matches to eliminate the need for sorting\\n\\t\\t\\t\\t\\tif ( matchedCount > 0 ) {\\n\\t\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\t\\t\\tif ( !(unmatched[i] || setMatched[i]) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tsetMatched[i] = pop.call( results );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Discard index placeholder values to get only actual matches\\n\\t\\t\\t\\t\\tsetMatched = condense( setMatched );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Add matches to results\\n\\t\\t\\t\\tpush.apply( results, setMatched );\\n\\n\\t\\t\\t\\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\\n\\t\\t\\t\\tif ( outermost && !seed && setMatched.length > 0 &&\\n\\t\\t\\t\\t\\t( matchedCount + setMatchers.length ) > 1 ) {\\n\\n\\t\\t\\t\\t\\tSizzle.uniqueSort( results );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Override manipulation of globals by nested matchers\\n\\t\\t\\tif ( outermost ) {\\n\\t\\t\\t\\tdirruns = dirrunsUnique;\\n\\t\\t\\t\\toutermostContext = contextBackup;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn unmatched;\\n\\t\\t};\\n\\n\\treturn bySet ?\\n\\t\\tmarkFunction( superMatcher ) :\\n\\t\\tsuperMatcher;\\n}\\n\\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\\n\\tvar i,\\n\\t\\tsetMatchers = [],\\n\\t\\telementMatchers = [],\\n\\t\\tcached = compilerCache[ selector + \\\" \\\" ];\\n\\n\\tif ( !cached ) {\\n\\t\\t// Generate a function of recursive functions that can be used to check each element\\n\\t\\tif ( !match ) {\\n\\t\\t\\tmatch = tokenize( selector );\\n\\t\\t}\\n\\t\\ti = match.length;\\n\\t\\twhile ( i-- ) {\\n\\t\\t\\tcached = matcherFromTokens( match[i] );\\n\\t\\t\\tif ( cached[ expando ] ) {\\n\\t\\t\\t\\tsetMatchers.push( cached );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\telementMatchers.push( cached );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Cache the compiled function\\n\\t\\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\\n\\n\\t\\t// Save selector and tokenization\\n\\t\\tcached.selector = selector;\\n\\t}\\n\\treturn cached;\\n};\\n\\n/**\\n * A low-level selection function that works with Sizzle's compiled\\n * selector functions\\n * @param {String|Function} selector A selector or a pre-compiled\\n * selector function built with Sizzle.compile\\n * @param {Element} context\\n * @param {Array} [results]\\n * @param {Array} [seed] A set of elements to match against\\n */\\nselect = Sizzle.select = function( selector, context, results, seed ) {\\n\\tvar i, tokens, token, type, find,\\n\\t\\tcompiled = typeof selector === \\\"function\\\" && selector,\\n\\t\\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\\n\\n\\tresults = results || [];\\n\\n\\t// Try to minimize operations if there is only one selector in the list and no seed\\n\\t// (the latter of which guarantees us context)\\n\\tif ( match.length === 1 ) {\\n\\n\\t\\t// Reduce context if the leading compound selector is an ID\\n\\t\\ttokens = match[0] = match[0].slice( 0 );\\n\\t\\tif ( tokens.length > 2 && (token = tokens[0]).type === \\\"ID\\\" &&\\n\\t\\t\\t\\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {\\n\\n\\t\\t\\tcontext = ( Expr.find[\\\"ID\\\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\\n\\t\\t\\tif ( !context ) {\\n\\t\\t\\t\\treturn results;\\n\\n\\t\\t\\t// Precompiled matchers will still verify ancestry, so step up a level\\n\\t\\t\\t} else if ( compiled ) {\\n\\t\\t\\t\\tcontext = context.parentNode;\\n\\t\\t\\t}\\n\\n\\t\\t\\tselector = selector.slice( tokens.shift().value.length );\\n\\t\\t}\\n\\n\\t\\t// Fetch a seed set for right-to-left matching\\n\\t\\ti = matchExpr[\\\"needsContext\\\"].test( selector ) ? 0 : tokens.length;\\n\\t\\twhile ( i-- ) {\\n\\t\\t\\ttoken = tokens[i];\\n\\n\\t\\t\\t// Abort if we hit a combinator\\n\\t\\t\\tif ( Expr.relative[ (type = token.type) ] ) {\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t\\tif ( (find = Expr.find[ type ]) ) {\\n\\t\\t\\t\\t// Search, expanding context for leading sibling combinators\\n\\t\\t\\t\\tif ( (seed = find(\\n\\t\\t\\t\\t\\ttoken.matches[0].replace( runescape, funescape ),\\n\\t\\t\\t\\t\\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\\n\\t\\t\\t\\t)) ) {\\n\\n\\t\\t\\t\\t\\t// If seed is empty or no tokens remain, we can return early\\n\\t\\t\\t\\t\\ttokens.splice( i, 1 );\\n\\t\\t\\t\\t\\tselector = seed.length && toSelector( tokens );\\n\\t\\t\\t\\t\\tif ( !selector ) {\\n\\t\\t\\t\\t\\t\\tpush.apply( results, seed );\\n\\t\\t\\t\\t\\t\\treturn results;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Compile and execute a filtering function if one is not provided\\n\\t// Provide `match` to avoid retokenization if we modified the selector above\\n\\t( compiled || compile( selector, match ) )(\\n\\t\\tseed,\\n\\t\\tcontext,\\n\\t\\t!documentIsHTML,\\n\\t\\tresults,\\n\\t\\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\\n\\t);\\n\\treturn results;\\n};\\n\\n// One-time assignments\\n\\n// Sort stability\\nsupport.sortStable = expando.split(\\\"\\\").sort( sortOrder ).join(\\\"\\\") === expando;\\n\\n// Support: Chrome 14-35+\\n// Always assume duplicates if they aren't passed to the comparison function\\nsupport.detectDuplicates = !!hasDuplicate;\\n\\n// Initialize against the default document\\nsetDocument();\\n\\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\\n// Detached nodes confoundingly follow *each other*\\nsupport.sortDetached = assert(function( el ) {\\n\\t// Should return 1, but returns 4 (following)\\n\\treturn el.compareDocumentPosition( document.createElement(\\\"fieldset\\\") ) & 1;\\n});\\n\\n// Support: IE<8\\n// Prevent attribute/property \\\"interpolation\\\"\\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\\nif ( !assert(function( el ) {\\n\\tel.innerHTML = \\\"<a href='#'></a>\\\";\\n\\treturn el.firstChild.getAttribute(\\\"href\\\") === \\\"#\\\" ;\\n}) ) {\\n\\taddHandle( \\\"type|href|height|width\\\", function( elem, name, isXML ) {\\n\\t\\tif ( !isXML ) {\\n\\t\\t\\treturn elem.getAttribute( name, name.toLowerCase() === \\\"type\\\" ? 1 : 2 );\\n\\t\\t}\\n\\t});\\n}\\n\\n// Support: IE<9\\n// Use defaultValue in place of getAttribute(\\\"value\\\")\\nif ( !support.attributes || !assert(function( el ) {\\n\\tel.innerHTML = \\\"<input/>\\\";\\n\\tel.firstChild.setAttribute( \\\"value\\\", \\\"\\\" );\\n\\treturn el.firstChild.getAttribute( \\\"value\\\" ) === \\\"\\\";\\n}) ) {\\n\\taddHandle( \\\"value\\\", function( elem, name, isXML ) {\\n\\t\\tif ( !isXML && elem.nodeName.toLowerCase() === \\\"input\\\" ) {\\n\\t\\t\\treturn elem.defaultValue;\\n\\t\\t}\\n\\t});\\n}\\n\\n// Support: IE<9\\n// Use getAttributeNode to fetch booleans when getAttribute lies\\nif ( !assert(function( el ) {\\n\\treturn el.getAttribute(\\\"disabled\\\") == null;\\n}) ) {\\n\\taddHandle( booleans, function( elem, name, isXML ) {\\n\\t\\tvar val;\\n\\t\\tif ( !isXML ) {\\n\\t\\t\\treturn elem[ name ] === true ? name.toLowerCase() :\\n\\t\\t\\t\\t\\t(val = elem.getAttributeNode( name )) && val.specified ?\\n\\t\\t\\t\\t\\tval.value :\\n\\t\\t\\t\\tnull;\\n\\t\\t}\\n\\t});\\n}\\n\\nreturn Sizzle;\\n\\n})( window );\\n\\n\\n\\njQuery.find = Sizzle;\\njQuery.expr = Sizzle.selectors;\\n\\n// Deprecated\\njQuery.expr[ \\\":\\\" ] = jQuery.expr.pseudos;\\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\\njQuery.text = Sizzle.getText;\\njQuery.isXMLDoc = Sizzle.isXML;\\njQuery.contains = Sizzle.contains;\\njQuery.escapeSelector = Sizzle.escape;\\n\\n\\n\\n\\nvar dir = function( elem, dir, until ) {\\n\\tvar matched = [],\\n\\t\\ttruncate = until !== undefined;\\n\\n\\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\\n\\t\\tif ( elem.nodeType === 1 ) {\\n\\t\\t\\tif ( truncate && jQuery( elem ).is( until ) ) {\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t\\tmatched.push( elem );\\n\\t\\t}\\n\\t}\\n\\treturn matched;\\n};\\n\\n\\nvar siblings = function( n, elem ) {\\n\\tvar matched = [];\\n\\n\\tfor ( ; n; n = n.nextSibling ) {\\n\\t\\tif ( n.nodeType === 1 && n !== elem ) {\\n\\t\\t\\tmatched.push( n );\\n\\t\\t}\\n\\t}\\n\\n\\treturn matched;\\n};\\n\\n\\nvar rneedsContext = jQuery.expr.match.needsContext;\\n\\nvar rsingleTag = ( /^<([a-z][^\\\\/\\\\0>:\\\\x20\\\\t\\\\r\\\\n\\\\f]*)[\\\\x20\\\\t\\\\r\\\\n\\\\f]*\\\\/?>(?:<\\\\/\\\\1>|)$/i );\\n\\n\\n\\nvar risSimple = /^.[^:#\\\\[\\\\.,]*$/;\\n\\n// Implement the identical functionality for filter and not\\nfunction winnow( elements, qualifier, not ) {\\n\\tif ( jQuery.isFunction( qualifier ) ) {\\n\\t\\treturn jQuery.grep( elements, function( elem, i ) {\\n\\t\\t\\treturn !!qualifier.call( elem, i, elem ) !== not;\\n\\t\\t} );\\n\\t}\\n\\n\\t// Single element\\n\\tif ( qualifier.nodeType ) {\\n\\t\\treturn jQuery.grep( elements, function( elem ) {\\n\\t\\t\\treturn ( elem === qualifier ) !== not;\\n\\t\\t} );\\n\\t}\\n\\n\\t// Arraylike of elements (jQuery, arguments, Array)\\n\\tif ( typeof qualifier !== \\\"string\\\" ) {\\n\\t\\treturn jQuery.grep( elements, function( elem ) {\\n\\t\\t\\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\\n\\t\\t} );\\n\\t}\\n\\n\\t// Simple selector that can be filtered directly, removing non-Elements\\n\\tif ( risSimple.test( qualifier ) ) {\\n\\t\\treturn jQuery.filter( qualifier, elements, not );\\n\\t}\\n\\n\\t// Complex selector, compare the two sets, removing non-Elements\\n\\tqualifier = jQuery.filter( qualifier, elements );\\n\\treturn jQuery.grep( elements, function( elem ) {\\n\\t\\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\\n\\t} );\\n}\\n\\njQuery.filter = function( expr, elems, not ) {\\n\\tvar elem = elems[ 0 ];\\n\\n\\tif ( not ) {\\n\\t\\texpr = \\\":not(\\\" + expr + \\\")\\\";\\n\\t}\\n\\n\\tif ( elems.length === 1 && elem.nodeType === 1 ) {\\n\\t\\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\\n\\t}\\n\\n\\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\\n\\t\\treturn elem.nodeType === 1;\\n\\t} ) );\\n};\\n\\njQuery.fn.extend( {\\n\\tfind: function( selector ) {\\n\\t\\tvar i, ret,\\n\\t\\t\\tlen = this.length,\\n\\t\\t\\tself = this;\\n\\n\\t\\tif ( typeof selector !== \\\"string\\\" ) {\\n\\t\\t\\treturn this.pushStack( jQuery( selector ).filter( function() {\\n\\t\\t\\t\\tfor ( i = 0; i < len; i++ ) {\\n\\t\\t\\t\\t\\tif ( jQuery.contains( self[ i ], this ) ) {\\n\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t} ) );\\n\\t\\t}\\n\\n\\t\\tret = this.pushStack( [] );\\n\\n\\t\\tfor ( i = 0; i < len; i++ ) {\\n\\t\\t\\tjQuery.find( selector, self[ i ], ret );\\n\\t\\t}\\n\\n\\t\\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\\n\\t},\\n\\tfilter: function( selector ) {\\n\\t\\treturn this.pushStack( winnow( this, selector || [], false ) );\\n\\t},\\n\\tnot: function( selector ) {\\n\\t\\treturn this.pushStack( winnow( this, selector || [], true ) );\\n\\t},\\n\\tis: function( selector ) {\\n\\t\\treturn !!winnow(\\n\\t\\t\\tthis,\\n\\n\\t\\t\\t// If this is a positional/relative selector, check membership in the returned set\\n\\t\\t\\t// so $(\\\"p:first\\\").is(\\\"p:last\\\") won't return true for a doc with two \\\"p\\\".\\n\\t\\t\\ttypeof selector === \\\"string\\\" && rneedsContext.test( selector ) ?\\n\\t\\t\\t\\tjQuery( selector ) :\\n\\t\\t\\t\\tselector || [],\\n\\t\\t\\tfalse\\n\\t\\t).length;\\n\\t}\\n} );\\n\\n\\n// Initialize a jQuery object\\n\\n\\n// A central reference to the root jQuery(document)\\nvar rootjQuery,\\n\\n\\t// A simple way to check for HTML strings\\n\\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\\n\\t// Strict HTML recognition (#11290: must start with <)\\n\\t// Shortcut simple #id case for speed\\n\\trquickExpr = /^(?:\\\\s*(<[\\\\w\\\\W]+>)[^>]*|#([\\\\w-]+))$/,\\n\\n\\tinit = jQuery.fn.init = function( selector, context, root ) {\\n\\t\\tvar match, elem;\\n\\n\\t\\t// HANDLE: $(\\\"\\\"), $(null), $(undefined), $(false)\\n\\t\\tif ( !selector ) {\\n\\t\\t\\treturn this;\\n\\t\\t}\\n\\n\\t\\t// Method init() accepts an alternate rootjQuery\\n\\t\\t// so migrate can support jQuery.sub (gh-2101)\\n\\t\\troot = root || rootjQuery;\\n\\n\\t\\t// Handle HTML strings\\n\\t\\tif ( typeof selector === \\\"string\\\" ) {\\n\\t\\t\\tif ( selector[ 0 ] === \\\"<\\\" &&\\n\\t\\t\\t\\tselector[ selector.length - 1 ] === \\\">\\\" &&\\n\\t\\t\\t\\tselector.length >= 3 ) {\\n\\n\\t\\t\\t\\t// Assume that strings that start and end with <> are HTML and skip the regex check\\n\\t\\t\\t\\tmatch = [ null, selector, null ];\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tmatch = rquickExpr.exec( selector );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Match html or make sure no context is specified for #id\\n\\t\\t\\tif ( match && ( match[ 1 ] || !context ) ) {\\n\\n\\t\\t\\t\\t// HANDLE: $(html) -> $(array)\\n\\t\\t\\t\\tif ( match[ 1 ] ) {\\n\\t\\t\\t\\t\\tcontext = context instanceof jQuery ? context[ 0 ] : context;\\n\\n\\t\\t\\t\\t\\t// Option to run scripts is true for back-compat\\n\\t\\t\\t\\t\\t// Intentionally let the error be thrown if parseHTML is not present\\n\\t\\t\\t\\t\\tjQuery.merge( this, jQuery.parseHTML(\\n\\t\\t\\t\\t\\t\\tmatch[ 1 ],\\n\\t\\t\\t\\t\\t\\tcontext && context.nodeType ? context.ownerDocument || context : document,\\n\\t\\t\\t\\t\\t\\ttrue\\n\\t\\t\\t\\t\\t) );\\n\\n\\t\\t\\t\\t\\t// HANDLE: $(html, props)\\n\\t\\t\\t\\t\\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\\n\\t\\t\\t\\t\\t\\tfor ( match in context ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Properties of context are called as methods if possible\\n\\t\\t\\t\\t\\t\\t\\tif ( jQuery.isFunction( this[ match ] ) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tthis[ match ]( context[ match ] );\\n\\n\\t\\t\\t\\t\\t\\t\\t// ...and otherwise set as attributes\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\tthis.attr( match, context[ match ] );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\treturn this;\\n\\n\\t\\t\\t\\t// HANDLE: $(#id)\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\telem = document.getElementById( match[ 2 ] );\\n\\n\\t\\t\\t\\t\\tif ( elem ) {\\n\\n\\t\\t\\t\\t\\t\\t// Inject the element directly into the jQuery object\\n\\t\\t\\t\\t\\t\\tthis[ 0 ] = elem;\\n\\t\\t\\t\\t\\t\\tthis.length = 1;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t// HANDLE: $(expr, $(...))\\n\\t\\t\\t} else if ( !context || context.jquery ) {\\n\\t\\t\\t\\treturn ( context || root ).find( selector );\\n\\n\\t\\t\\t// HANDLE: $(expr, context)\\n\\t\\t\\t// (which is just equivalent to: $(context).find(expr)\\n\\t\\t\\t} else {\\n\\t\\t\\t\\treturn this.constructor( context ).find( selector );\\n\\t\\t\\t}\\n\\n\\t\\t// HANDLE: $(DOMElement)\\n\\t\\t} else if ( selector.nodeType ) {\\n\\t\\t\\tthis[ 0 ] = selector;\\n\\t\\t\\tthis.length = 1;\\n\\t\\t\\treturn this;\\n\\n\\t\\t// HANDLE: $(function)\\n\\t\\t// Shortcut for document ready\\n\\t\\t} else if ( jQuery.isFunction( selector ) ) {\\n\\t\\t\\treturn root.ready !== undefined ?\\n\\t\\t\\t\\troot.ready( selector ) :\\n\\n\\t\\t\\t\\t// Execute immediately if ready is not present\\n\\t\\t\\t\\tselector( jQuery );\\n\\t\\t}\\n\\n\\t\\treturn jQuery.makeArray( selector, this );\\n\\t};\\n\\n// Give the init function the jQuery prototype for later instantiation\\ninit.prototype = jQuery.fn;\\n\\n// Initialize central reference\\nrootjQuery = jQuery( document );\\n\\n\\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\\n\\n\\t// Methods guaranteed to produce a unique set when starting from a unique set\\n\\tguaranteedUnique = {\\n\\t\\tchildren: true,\\n\\t\\tcontents: true,\\n\\t\\tnext: true,\\n\\t\\tprev: true\\n\\t};\\n\\njQuery.fn.extend( {\\n\\thas: function( target ) {\\n\\t\\tvar targets = jQuery( target, this ),\\n\\t\\t\\tl = targets.length;\\n\\n\\t\\treturn this.filter( function() {\\n\\t\\t\\tvar i = 0;\\n\\t\\t\\tfor ( ; i < l; i++ ) {\\n\\t\\t\\t\\tif ( jQuery.contains( this, targets[ i ] ) ) {\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tclosest: function( selectors, context ) {\\n\\t\\tvar cur,\\n\\t\\t\\ti = 0,\\n\\t\\t\\tl = this.length,\\n\\t\\t\\tmatched = [],\\n\\t\\t\\ttargets = typeof selectors !== \\\"string\\\" && jQuery( selectors );\\n\\n\\t\\t// Positional selectors never match, since there's no _selection_ context\\n\\t\\tif ( !rneedsContext.test( selectors ) ) {\\n\\t\\t\\tfor ( ; i < l; i++ ) {\\n\\t\\t\\t\\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\\n\\n\\t\\t\\t\\t\\t// Always skip document fragments\\n\\t\\t\\t\\t\\tif ( cur.nodeType < 11 && ( targets ?\\n\\t\\t\\t\\t\\t\\ttargets.index( cur ) > -1 :\\n\\n\\t\\t\\t\\t\\t\\t// Don't pass non-elements to Sizzle\\n\\t\\t\\t\\t\\t\\tcur.nodeType === 1 &&\\n\\t\\t\\t\\t\\t\\t\\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\\n\\n\\t\\t\\t\\t\\t\\tmatched.push( cur );\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\\n\\t},\\n\\n\\t// Determine the position of an element within the set\\n\\tindex: function( elem ) {\\n\\n\\t\\t// No argument, return index in parent\\n\\t\\tif ( !elem ) {\\n\\t\\t\\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\\n\\t\\t}\\n\\n\\t\\t// Index in selector\\n\\t\\tif ( typeof elem === \\\"string\\\" ) {\\n\\t\\t\\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\\n\\t\\t}\\n\\n\\t\\t// Locate the position of the desired element\\n\\t\\treturn indexOf.call( this,\\n\\n\\t\\t\\t// If it receives a jQuery object, the first element is used\\n\\t\\t\\telem.jquery ? elem[ 0 ] : elem\\n\\t\\t);\\n\\t},\\n\\n\\tadd: function( selector, context ) {\\n\\t\\treturn this.pushStack(\\n\\t\\t\\tjQuery.uniqueSort(\\n\\t\\t\\t\\tjQuery.merge( this.get(), jQuery( selector, context ) )\\n\\t\\t\\t)\\n\\t\\t);\\n\\t},\\n\\n\\taddBack: function( selector ) {\\n\\t\\treturn this.add( selector == null ?\\n\\t\\t\\tthis.prevObject : this.prevObject.filter( selector )\\n\\t\\t);\\n\\t}\\n} );\\n\\nfunction sibling( cur, dir ) {\\n\\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\\n\\treturn cur;\\n}\\n\\njQuery.each( {\\n\\tparent: function( elem ) {\\n\\t\\tvar parent = elem.parentNode;\\n\\t\\treturn parent && parent.nodeType !== 11 ? parent : null;\\n\\t},\\n\\tparents: function( elem ) {\\n\\t\\treturn dir( elem, \\\"parentNode\\\" );\\n\\t},\\n\\tparentsUntil: function( elem, i, until ) {\\n\\t\\treturn dir( elem, \\\"parentNode\\\", until );\\n\\t},\\n\\tnext: function( elem ) {\\n\\t\\treturn sibling( elem, \\\"nextSibling\\\" );\\n\\t},\\n\\tprev: function( elem ) {\\n\\t\\treturn sibling( elem, \\\"previousSibling\\\" );\\n\\t},\\n\\tnextAll: function( elem ) {\\n\\t\\treturn dir( elem, \\\"nextSibling\\\" );\\n\\t},\\n\\tprevAll: function( elem ) {\\n\\t\\treturn dir( elem, \\\"previousSibling\\\" );\\n\\t},\\n\\tnextUntil: function( elem, i, until ) {\\n\\t\\treturn dir( elem, \\\"nextSibling\\\", until );\\n\\t},\\n\\tprevUntil: function( elem, i, until ) {\\n\\t\\treturn dir( elem, \\\"previousSibling\\\", until );\\n\\t},\\n\\tsiblings: function( elem ) {\\n\\t\\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\\n\\t},\\n\\tchildren: function( elem ) {\\n\\t\\treturn siblings( elem.firstChild );\\n\\t},\\n\\tcontents: function( elem ) {\\n\\t\\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\\n\\t}\\n}, function( name, fn ) {\\n\\tjQuery.fn[ name ] = function( until, selector ) {\\n\\t\\tvar matched = jQuery.map( this, fn, until );\\n\\n\\t\\tif ( name.slice( -5 ) !== \\\"Until\\\" ) {\\n\\t\\t\\tselector = until;\\n\\t\\t}\\n\\n\\t\\tif ( selector && typeof selector === \\\"string\\\" ) {\\n\\t\\t\\tmatched = jQuery.filter( selector, matched );\\n\\t\\t}\\n\\n\\t\\tif ( this.length > 1 ) {\\n\\n\\t\\t\\t// Remove duplicates\\n\\t\\t\\tif ( !guaranteedUnique[ name ] ) {\\n\\t\\t\\t\\tjQuery.uniqueSort( matched );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Reverse order for parents* and prev-derivatives\\n\\t\\t\\tif ( rparentsprev.test( name ) ) {\\n\\t\\t\\t\\tmatched.reverse();\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn this.pushStack( matched );\\n\\t};\\n} );\\nvar rnothtmlwhite = ( /[^\\\\x20\\\\t\\\\r\\\\n\\\\f]+/g );\\n\\n\\n\\n// Convert String-formatted options into Object-formatted ones\\nfunction createOptions( options ) {\\n\\tvar object = {};\\n\\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\\n\\t\\tobject[ flag ] = true;\\n\\t} );\\n\\treturn object;\\n}\\n\\n/*\\n * Create a callback list using the following parameters:\\n *\\n *\\toptions: an optional list of space-separated options that will change how\\n *\\t\\t\\tthe callback list behaves or a more traditional option object\\n *\\n * By default a callback list will act like an event callback list and can be\\n * \\\"fired\\\" multiple times.\\n *\\n * Possible options:\\n *\\n *\\tonce:\\t\\t\\twill ensure the callback list can only be fired once (like a Deferred)\\n *\\n *\\tmemory:\\t\\t\\twill keep track of previous values and will call any callback added\\n *\\t\\t\\t\\t\\tafter the list has been fired right away with the latest \\\"memorized\\\"\\n *\\t\\t\\t\\t\\tvalues (like a Deferred)\\n *\\n *\\tunique:\\t\\t\\twill ensure a callback can only be added once (no duplicate in the list)\\n *\\n *\\tstopOnFalse:\\tinterrupt callings when a callback returns false\\n *\\n */\\njQuery.Callbacks = function( options ) {\\n\\n\\t// Convert options from String-formatted to Object-formatted if needed\\n\\t// (we check in cache first)\\n\\toptions = typeof options === \\\"string\\\" ?\\n\\t\\tcreateOptions( options ) :\\n\\t\\tjQuery.extend( {}, options );\\n\\n\\tvar // Flag to know if list is currently firing\\n\\t\\tfiring,\\n\\n\\t\\t// Last fire value for non-forgettable lists\\n\\t\\tmemory,\\n\\n\\t\\t// Flag to know if list was already fired\\n\\t\\tfired,\\n\\n\\t\\t// Flag to prevent firing\\n\\t\\tlocked,\\n\\n\\t\\t// Actual callback list\\n\\t\\tlist = [],\\n\\n\\t\\t// Queue of execution data for repeatable lists\\n\\t\\tqueue = [],\\n\\n\\t\\t// Index of currently firing callback (modified by add/remove as needed)\\n\\t\\tfiringIndex = -1,\\n\\n\\t\\t// Fire callbacks\\n\\t\\tfire = function() {\\n\\n\\t\\t\\t// Enforce single-firing\\n\\t\\t\\tlocked = options.once;\\n\\n\\t\\t\\t// Execute callbacks for all pending executions,\\n\\t\\t\\t// respecting firingIndex overrides and runtime changes\\n\\t\\t\\tfired = firing = true;\\n\\t\\t\\tfor ( ; queue.length; firingIndex = -1 ) {\\n\\t\\t\\t\\tmemory = queue.shift();\\n\\t\\t\\t\\twhile ( ++firingIndex < list.length ) {\\n\\n\\t\\t\\t\\t\\t// Run callback and check for early termination\\n\\t\\t\\t\\t\\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\\n\\t\\t\\t\\t\\t\\toptions.stopOnFalse ) {\\n\\n\\t\\t\\t\\t\\t\\t// Jump to end and forget the data so .add doesn't re-fire\\n\\t\\t\\t\\t\\t\\tfiringIndex = list.length;\\n\\t\\t\\t\\t\\t\\tmemory = false;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Forget the data if we're done with it\\n\\t\\t\\tif ( !options.memory ) {\\n\\t\\t\\t\\tmemory = false;\\n\\t\\t\\t}\\n\\n\\t\\t\\tfiring = false;\\n\\n\\t\\t\\t// Clean up if we're done firing for good\\n\\t\\t\\tif ( locked ) {\\n\\n\\t\\t\\t\\t// Keep an empty list if we have data for future add calls\\n\\t\\t\\t\\tif ( memory ) {\\n\\t\\t\\t\\t\\tlist = [];\\n\\n\\t\\t\\t\\t// Otherwise, this object is spent\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tlist = \\\"\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t},\\n\\n\\t\\t// Actual Callbacks object\\n\\t\\tself = {\\n\\n\\t\\t\\t// Add a callback or a collection of callbacks to the list\\n\\t\\t\\tadd: function() {\\n\\t\\t\\t\\tif ( list ) {\\n\\n\\t\\t\\t\\t\\t// If we have memory from a past run, we should fire after adding\\n\\t\\t\\t\\t\\tif ( memory && !firing ) {\\n\\t\\t\\t\\t\\t\\tfiringIndex = list.length - 1;\\n\\t\\t\\t\\t\\t\\tqueue.push( memory );\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t( function add( args ) {\\n\\t\\t\\t\\t\\t\\tjQuery.each( args, function( _, arg ) {\\n\\t\\t\\t\\t\\t\\t\\tif ( jQuery.isFunction( arg ) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( !options.unique || !self.has( arg ) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tlist.push( arg );\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t} else if ( arg && arg.length && jQuery.type( arg ) !== \\\"string\\\" ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Inspect recursively\\n\\t\\t\\t\\t\\t\\t\\t\\tadd( arg );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t\\t} )( arguments );\\n\\n\\t\\t\\t\\t\\tif ( memory && !firing ) {\\n\\t\\t\\t\\t\\t\\tfire();\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Remove a callback from the list\\n\\t\\t\\tremove: function() {\\n\\t\\t\\t\\tjQuery.each( arguments, function( _, arg ) {\\n\\t\\t\\t\\t\\tvar index;\\n\\t\\t\\t\\t\\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\\n\\t\\t\\t\\t\\t\\tlist.splice( index, 1 );\\n\\n\\t\\t\\t\\t\\t\\t// Handle firing indexes\\n\\t\\t\\t\\t\\t\\tif ( index <= firingIndex ) {\\n\\t\\t\\t\\t\\t\\t\\tfiringIndex--;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} );\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Check if a given callback is in the list.\\n\\t\\t\\t// If no argument is given, return whether or not list has callbacks attached.\\n\\t\\t\\thas: function( fn ) {\\n\\t\\t\\t\\treturn fn ?\\n\\t\\t\\t\\t\\tjQuery.inArray( fn, list ) > -1 :\\n\\t\\t\\t\\t\\tlist.length > 0;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Remove all callbacks from the list\\n\\t\\t\\tempty: function() {\\n\\t\\t\\t\\tif ( list ) {\\n\\t\\t\\t\\t\\tlist = [];\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Disable .fire and .add\\n\\t\\t\\t// Abort any current/pending executions\\n\\t\\t\\t// Clear all callbacks and values\\n\\t\\t\\tdisable: function() {\\n\\t\\t\\t\\tlocked = queue = [];\\n\\t\\t\\t\\tlist = memory = \\\"\\\";\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\t\\t\\tdisabled: function() {\\n\\t\\t\\t\\treturn !list;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Disable .fire\\n\\t\\t\\t// Also disable .add unless we have memory (since it would have no effect)\\n\\t\\t\\t// Abort any pending executions\\n\\t\\t\\tlock: function() {\\n\\t\\t\\t\\tlocked = queue = [];\\n\\t\\t\\t\\tif ( !memory && !firing ) {\\n\\t\\t\\t\\t\\tlist = memory = \\\"\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\t\\t\\tlocked: function() {\\n\\t\\t\\t\\treturn !!locked;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Call all callbacks with the given context and arguments\\n\\t\\t\\tfireWith: function( context, args ) {\\n\\t\\t\\t\\tif ( !locked ) {\\n\\t\\t\\t\\t\\targs = args || [];\\n\\t\\t\\t\\t\\targs = [ context, args.slice ? args.slice() : args ];\\n\\t\\t\\t\\t\\tqueue.push( args );\\n\\t\\t\\t\\t\\tif ( !firing ) {\\n\\t\\t\\t\\t\\t\\tfire();\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// Call all the callbacks with the given arguments\\n\\t\\t\\tfire: function() {\\n\\t\\t\\t\\tself.fireWith( this, arguments );\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t},\\n\\n\\t\\t\\t// To know if the callbacks have already been called at least once\\n\\t\\t\\tfired: function() {\\n\\t\\t\\t\\treturn !!fired;\\n\\t\\t\\t}\\n\\t\\t};\\n\\n\\treturn self;\\n};\\n\\n\\nfunction Identity( v ) {\\n\\treturn v;\\n}\\nfunction Thrower( ex ) {\\n\\tthrow ex;\\n}\\n\\nfunction adoptValue( value, resolve, reject ) {\\n\\tvar method;\\n\\n\\ttry {\\n\\n\\t\\t// Check for promise aspect first to privilege synchronous behavior\\n\\t\\tif ( value && jQuery.isFunction( ( method = value.promise ) ) ) {\\n\\t\\t\\tmethod.call( value ).done( resolve ).fail( reject );\\n\\n\\t\\t// Other thenables\\n\\t\\t} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {\\n\\t\\t\\tmethod.call( value, resolve, reject );\\n\\n\\t\\t// Other non-thenables\\n\\t\\t} else {\\n\\n\\t\\t\\t// Support: Android 4.0 only\\n\\t\\t\\t// Strict mode functions invoked without .call/.apply get global-object context\\n\\t\\t\\tresolve.call( undefined, value );\\n\\t\\t}\\n\\n\\t// For Promises/A+, convert exceptions into rejections\\n\\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\\n\\t// Deferred#then to conditionally suppress rejection.\\n\\t} catch ( value ) {\\n\\n\\t\\t// Support: Android 4.0 only\\n\\t\\t// Strict mode functions invoked without .call/.apply get global-object context\\n\\t\\treject.call( undefined, value );\\n\\t}\\n}\\n\\njQuery.extend( {\\n\\n\\tDeferred: function( func ) {\\n\\t\\tvar tuples = [\\n\\n\\t\\t\\t\\t// action, add listener, callbacks,\\n\\t\\t\\t\\t// ... .then handlers, argument index, [final state]\\n\\t\\t\\t\\t[ \\\"notify\\\", \\\"progress\\\", jQuery.Callbacks( \\\"memory\\\" ),\\n\\t\\t\\t\\t\\tjQuery.Callbacks( \\\"memory\\\" ), 2 ],\\n\\t\\t\\t\\t[ \\\"resolve\\\", \\\"done\\\", jQuery.Callbacks( \\\"once memory\\\" ),\\n\\t\\t\\t\\t\\tjQuery.Callbacks( \\\"once memory\\\" ), 0, \\\"resolved\\\" ],\\n\\t\\t\\t\\t[ \\\"reject\\\", \\\"fail\\\", jQuery.Callbacks( \\\"once memory\\\" ),\\n\\t\\t\\t\\t\\tjQuery.Callbacks( \\\"once memory\\\" ), 1, \\\"rejected\\\" ]\\n\\t\\t\\t],\\n\\t\\t\\tstate = \\\"pending\\\",\\n\\t\\t\\tpromise = {\\n\\t\\t\\t\\tstate: function() {\\n\\t\\t\\t\\t\\treturn state;\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\talways: function() {\\n\\t\\t\\t\\t\\tdeferred.done( arguments ).fail( arguments );\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\\"catch\\\": function( fn ) {\\n\\t\\t\\t\\t\\treturn promise.then( null, fn );\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Keep pipe for back-compat\\n\\t\\t\\t\\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\\n\\t\\t\\t\\t\\tvar fns = arguments;\\n\\n\\t\\t\\t\\t\\treturn jQuery.Deferred( function( newDefer ) {\\n\\t\\t\\t\\t\\t\\tjQuery.each( tuples, function( i, tuple ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\\n\\t\\t\\t\\t\\t\\t\\tvar fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\\n\\n\\t\\t\\t\\t\\t\\t\\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\\n\\t\\t\\t\\t\\t\\t\\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\\n\\t\\t\\t\\t\\t\\t\\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\\n\\t\\t\\t\\t\\t\\t\\tdeferred[ tuple[ 1 ] ]( function() {\\n\\t\\t\\t\\t\\t\\t\\t\\tvar returned = fn && fn.apply( this, arguments );\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( returned && jQuery.isFunction( returned.promise ) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturned.promise()\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t.progress( newDefer.notify )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t.done( newDefer.resolve )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t.fail( newDefer.reject );\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tnewDefer[ tuple[ 0 ] + \\\"With\\\" ](\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthis,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfn ? [ returned ] : arguments\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t\\t\\tfns = null;\\n\\t\\t\\t\\t\\t} ).promise();\\n\\t\\t\\t\\t},\\n\\t\\t\\t\\tthen: function( onFulfilled, onRejected, onProgress ) {\\n\\t\\t\\t\\t\\tvar maxDepth = 0;\\n\\t\\t\\t\\t\\tfunction resolve( depth, deferred, handler, special ) {\\n\\t\\t\\t\\t\\t\\treturn function() {\\n\\t\\t\\t\\t\\t\\t\\tvar that = this,\\n\\t\\t\\t\\t\\t\\t\\t\\targs = arguments,\\n\\t\\t\\t\\t\\t\\t\\t\\tmightThrow = function() {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tvar returned, then;\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ section 2.3.3.3.3\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-59\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Ignore double-resolution attempts\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( depth < maxDepth ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturned = handler.apply( that, args );\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ section 2.3.1\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-48\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( returned === deferred.promise() ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthrow new TypeError( \\\"Thenable self-resolution\\\" );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ sections 2.3.3.1, 3.5\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-54\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-75\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Retrieve `then` only once\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tthen = returned &&\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ section 2.3.4\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-64\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Only check objects and functions for thenability\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t( typeof returned === \\\"object\\\" ||\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttypeof returned === \\\"function\\\" ) &&\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\treturned.then;\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Handle a returned thenable\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( jQuery.isFunction( then ) ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Special processors (notify) just wait for resolution\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( special ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthen.call(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\treturned,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tresolve( maxDepth, deferred, Identity, special ),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tresolve( maxDepth, deferred, Thrower, special )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Normal processors (resolve) also hook into progress\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// ...and disregard older resolution values\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmaxDepth++;\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthen.call(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\treturned,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tresolve( maxDepth, deferred, Identity, special ),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tresolve( maxDepth, deferred, Thrower, special ),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tresolve( maxDepth, deferred, Identity,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tdeferred.notifyWith )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Handle all other returned values\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Only substitute handlers pass on context\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// and multiple values (non-spec behavior)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( handler !== Identity ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthat = undefined;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\targs = [ returned ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Process the value(s)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Default process is resolve\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t( special || deferred.resolveWith )( that, args );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Only normal processors (resolve) catch and reject exceptions\\n\\t\\t\\t\\t\\t\\t\\t\\tprocess = special ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tmightThrow :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tfunction() {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tmightThrow();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} catch ( e ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( jQuery.Deferred.exceptionHook ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tjQuery.Deferred.exceptionHook( e,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tprocess.stackTrace );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ section 2.3.3.3.4.1\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-61\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Ignore post-resolution exceptions\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( depth + 1 >= maxDepth ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Only substitute handlers pass on context\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// and multiple values (non-spec behavior)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ( handler !== Thrower ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthat = undefined;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\targs = [ e ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tdeferred.rejectWith( that, args );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t};\\n\\n\\t\\t\\t\\t\\t\\t\\t// Support: Promises/A+ section 2.3.3.3.1\\n\\t\\t\\t\\t\\t\\t\\t// https://promisesaplus.com/#point-57\\n\\t\\t\\t\\t\\t\\t\\t// Re-resolve promises immediately to dodge false rejection from\\n\\t\\t\\t\\t\\t\\t\\t// subsequent errors\\n\\t\\t\\t\\t\\t\\t\\tif ( depth ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tprocess();\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Call an optional hook to record the stack, in case of exception\\n\\t\\t\\t\\t\\t\\t\\t\\t// since it's otherwise lost when execution goes async\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( jQuery.Deferred.getStackHook ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tprocess.stackTrace = jQuery.Deferred.getStackHook();\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\twindow.setTimeout( process );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t};\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\treturn jQuery.Deferred( function( newDefer ) {\\n\\n\\t\\t\\t\\t\\t\\t// progress_handlers.add( ... )\\n\\t\\t\\t\\t\\t\\ttuples[ 0 ][ 3 ].add(\\n\\t\\t\\t\\t\\t\\t\\tresolve(\\n\\t\\t\\t\\t\\t\\t\\t\\t0,\\n\\t\\t\\t\\t\\t\\t\\t\\tnewDefer,\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.isFunction( onProgress ) ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tonProgress :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tIdentity,\\n\\t\\t\\t\\t\\t\\t\\t\\tnewDefer.notifyWith\\n\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t\\t\\t// fulfilled_handlers.add( ... )\\n\\t\\t\\t\\t\\t\\ttuples[ 1 ][ 3 ].add(\\n\\t\\t\\t\\t\\t\\t\\tresolve(\\n\\t\\t\\t\\t\\t\\t\\t\\t0,\\n\\t\\t\\t\\t\\t\\t\\t\\tnewDefer,\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.isFunction( onFulfilled ) ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tonFulfilled :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tIdentity\\n\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t\\t\\t// rejected_handlers.add( ... )\\n\\t\\t\\t\\t\\t\\ttuples[ 2 ][ 3 ].add(\\n\\t\\t\\t\\t\\t\\t\\tresolve(\\n\\t\\t\\t\\t\\t\\t\\t\\t0,\\n\\t\\t\\t\\t\\t\\t\\t\\tnewDefer,\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.isFunction( onRejected ) ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tonRejected :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tThrower\\n\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t} ).promise();\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Get a promise for this deferred\\n\\t\\t\\t\\t// If obj is provided, the promise aspect is added to the object\\n\\t\\t\\t\\tpromise: function( obj ) {\\n\\t\\t\\t\\t\\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tdeferred = {};\\n\\n\\t\\t// Add list-specific methods\\n\\t\\tjQuery.each( tuples, function( i, tuple ) {\\n\\t\\t\\tvar list = tuple[ 2 ],\\n\\t\\t\\t\\tstateString = tuple[ 5 ];\\n\\n\\t\\t\\t// promise.progress = list.add\\n\\t\\t\\t// promise.done = list.add\\n\\t\\t\\t// promise.fail = list.add\\n\\t\\t\\tpromise[ tuple[ 1 ] ] = list.add;\\n\\n\\t\\t\\t// Handle state\\n\\t\\t\\tif ( stateString ) {\\n\\t\\t\\t\\tlist.add(\\n\\t\\t\\t\\t\\tfunction() {\\n\\n\\t\\t\\t\\t\\t\\t// state = \\\"resolved\\\" (i.e., fulfilled)\\n\\t\\t\\t\\t\\t\\t// state = \\\"rejected\\\"\\n\\t\\t\\t\\t\\t\\tstate = stateString;\\n\\t\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t\\t// rejected_callbacks.disable\\n\\t\\t\\t\\t\\t// fulfilled_callbacks.disable\\n\\t\\t\\t\\t\\ttuples[ 3 - i ][ 2 ].disable,\\n\\n\\t\\t\\t\\t\\t// progress_callbacks.lock\\n\\t\\t\\t\\t\\ttuples[ 0 ][ 2 ].lock\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\n\\t\\t\\t// progress_handlers.fire\\n\\t\\t\\t// fulfilled_handlers.fire\\n\\t\\t\\t// rejected_handlers.fire\\n\\t\\t\\tlist.add( tuple[ 3 ].fire );\\n\\n\\t\\t\\t// deferred.notify = function() { deferred.notifyWith(...) }\\n\\t\\t\\t// deferred.resolve = function() { deferred.resolveWith(...) }\\n\\t\\t\\t// deferred.reject = function() { deferred.rejectWith(...) }\\n\\t\\t\\tdeferred[ tuple[ 0 ] ] = function() {\\n\\t\\t\\t\\tdeferred[ tuple[ 0 ] + \\\"With\\\" ]( this === deferred ? undefined : this, arguments );\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t};\\n\\n\\t\\t\\t// deferred.notifyWith = list.fireWith\\n\\t\\t\\t// deferred.resolveWith = list.fireWith\\n\\t\\t\\t// deferred.rejectWith = list.fireWith\\n\\t\\t\\tdeferred[ tuple[ 0 ] + \\\"With\\\" ] = list.fireWith;\\n\\t\\t} );\\n\\n\\t\\t// Make the deferred a promise\\n\\t\\tpromise.promise( deferred );\\n\\n\\t\\t// Call given func if any\\n\\t\\tif ( func ) {\\n\\t\\t\\tfunc.call( deferred, deferred );\\n\\t\\t}\\n\\n\\t\\t// All done!\\n\\t\\treturn deferred;\\n\\t},\\n\\n\\t// Deferred helper\\n\\twhen: function( singleValue ) {\\n\\t\\tvar\\n\\n\\t\\t\\t// count of uncompleted subordinates\\n\\t\\t\\tremaining = arguments.length,\\n\\n\\t\\t\\t// count of unprocessed arguments\\n\\t\\t\\ti = remaining,\\n\\n\\t\\t\\t// subordinate fulfillment data\\n\\t\\t\\tresolveContexts = Array( i ),\\n\\t\\t\\tresolveValues = slice.call( arguments ),\\n\\n\\t\\t\\t// the master Deferred\\n\\t\\t\\tmaster = jQuery.Deferred(),\\n\\n\\t\\t\\t// subordinate callback factory\\n\\t\\t\\tupdateFunc = function( i ) {\\n\\t\\t\\t\\treturn function( value ) {\\n\\t\\t\\t\\t\\tresolveContexts[ i ] = this;\\n\\t\\t\\t\\t\\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\\n\\t\\t\\t\\t\\tif ( !( --remaining ) ) {\\n\\t\\t\\t\\t\\t\\tmaster.resolveWith( resolveContexts, resolveValues );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t};\\n\\t\\t\\t};\\n\\n\\t\\t// Single- and empty arguments are adopted like Promise.resolve\\n\\t\\tif ( remaining <= 1 ) {\\n\\t\\t\\tadoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject );\\n\\n\\t\\t\\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\\n\\t\\t\\tif ( master.state() === \\\"pending\\\" ||\\n\\t\\t\\t\\tjQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\\n\\n\\t\\t\\t\\treturn master.then();\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Multiple arguments are aggregated like Promise.all array elements\\n\\t\\twhile ( i-- ) {\\n\\t\\t\\tadoptValue( resolveValues[ i ], updateFunc( i ), master.reject );\\n\\t\\t}\\n\\n\\t\\treturn master.promise();\\n\\t}\\n} );\\n\\n\\n// These usually indicate a programmer mistake during development,\\n// warn about them ASAP rather than swallowing them by default.\\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\\n\\njQuery.Deferred.exceptionHook = function( error, stack ) {\\n\\n\\t// Support: IE 8 - 9 only\\n\\t// Console exists when dev tools are open, which can happen at any time\\n\\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\\n\\t\\twindow.console.warn( \\\"jQuery.Deferred exception: \\\" + error.message, error.stack, stack );\\n\\t}\\n};\\n\\n\\n\\n\\njQuery.readyException = function( error ) {\\n\\twindow.setTimeout( function() {\\n\\t\\tthrow error;\\n\\t} );\\n};\\n\\n\\n\\n\\n// The deferred used on DOM ready\\nvar readyList = jQuery.Deferred();\\n\\njQuery.fn.ready = function( fn ) {\\n\\n\\treadyList\\n\\t\\t.then( fn )\\n\\n\\t\\t// Wrap jQuery.readyException in a function so that the lookup\\n\\t\\t// happens at the time of error handling instead of callback\\n\\t\\t// registration.\\n\\t\\t.catch( function( error ) {\\n\\t\\t\\tjQuery.readyException( error );\\n\\t\\t} );\\n\\n\\treturn this;\\n};\\n\\njQuery.extend( {\\n\\n\\t// Is the DOM ready to be used? Set to true once it occurs.\\n\\tisReady: false,\\n\\n\\t// A counter to track how many items to wait for before\\n\\t// the ready event fires. See #6781\\n\\treadyWait: 1,\\n\\n\\t// Hold (or release) the ready event\\n\\tholdReady: function( hold ) {\\n\\t\\tif ( hold ) {\\n\\t\\t\\tjQuery.readyWait++;\\n\\t\\t} else {\\n\\t\\t\\tjQuery.ready( true );\\n\\t\\t}\\n\\t},\\n\\n\\t// Handle when the DOM is ready\\n\\tready: function( wait ) {\\n\\n\\t\\t// Abort if there are pending holds or we're already ready\\n\\t\\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Remember that the DOM is ready\\n\\t\\tjQuery.isReady = true;\\n\\n\\t\\t// If a normal DOM Ready event fired, decrement, and wait if need be\\n\\t\\tif ( wait !== true && --jQuery.readyWait > 0 ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// If there are functions bound, to execute\\n\\t\\treadyList.resolveWith( document, [ jQuery ] );\\n\\t}\\n} );\\n\\njQuery.ready.then = readyList.then;\\n\\n// The ready event handler and self cleanup method\\nfunction completed() {\\n\\tdocument.removeEventListener( \\\"DOMContentLoaded\\\", completed );\\n\\twindow.removeEventListener( \\\"load\\\", completed );\\n\\tjQuery.ready();\\n}\\n\\n// Catch cases where $(document).ready() is called\\n// after the browser event has already occurred.\\n// Support: IE <=9 - 10 only\\n// Older IE sometimes signals \\\"interactive\\\" too soon\\nif ( document.readyState === \\\"complete\\\" ||\\n\\t( document.readyState !== \\\"loading\\\" && !document.documentElement.doScroll ) ) {\\n\\n\\t// Handle it asynchronously to allow scripts the opportunity to delay ready\\n\\twindow.setTimeout( jQuery.ready );\\n\\n} else {\\n\\n\\t// Use the handy event callback\\n\\tdocument.addEventListener( \\\"DOMContentLoaded\\\", completed );\\n\\n\\t// A fallback to window.onload, that will always work\\n\\twindow.addEventListener( \\\"load\\\", completed );\\n}\\n\\n\\n\\n\\n// Multifunctional method to get and set values of a collection\\n// The value/s can optionally be executed if it's a function\\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\\n\\tvar i = 0,\\n\\t\\tlen = elems.length,\\n\\t\\tbulk = key == null;\\n\\n\\t// Sets many values\\n\\tif ( jQuery.type( key ) === \\\"object\\\" ) {\\n\\t\\tchainable = true;\\n\\t\\tfor ( i in key ) {\\n\\t\\t\\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\\n\\t\\t}\\n\\n\\t// Sets one value\\n\\t} else if ( value !== undefined ) {\\n\\t\\tchainable = true;\\n\\n\\t\\tif ( !jQuery.isFunction( value ) ) {\\n\\t\\t\\traw = true;\\n\\t\\t}\\n\\n\\t\\tif ( bulk ) {\\n\\n\\t\\t\\t// Bulk operations run against the entire set\\n\\t\\t\\tif ( raw ) {\\n\\t\\t\\t\\tfn.call( elems, value );\\n\\t\\t\\t\\tfn = null;\\n\\n\\t\\t\\t// ...except when executing function values\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tbulk = fn;\\n\\t\\t\\t\\tfn = function( elem, key, value ) {\\n\\t\\t\\t\\t\\treturn bulk.call( jQuery( elem ), value );\\n\\t\\t\\t\\t};\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif ( fn ) {\\n\\t\\t\\tfor ( ; i < len; i++ ) {\\n\\t\\t\\t\\tfn(\\n\\t\\t\\t\\t\\telems[ i ], key, raw ?\\n\\t\\t\\t\\t\\tvalue :\\n\\t\\t\\t\\t\\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tif ( chainable ) {\\n\\t\\treturn elems;\\n\\t}\\n\\n\\t// Gets\\n\\tif ( bulk ) {\\n\\t\\treturn fn.call( elems );\\n\\t}\\n\\n\\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\\n};\\nvar acceptData = function( owner ) {\\n\\n\\t// Accepts only:\\n\\t// - Node\\n\\t// - Node.ELEMENT_NODE\\n\\t// - Node.DOCUMENT_NODE\\n\\t// - Object\\n\\t// - Any\\n\\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\\n};\\n\\n\\n\\n\\nfunction Data() {\\n\\tthis.expando = jQuery.expando + Data.uid++;\\n}\\n\\nData.uid = 1;\\n\\nData.prototype = {\\n\\n\\tcache: function( owner ) {\\n\\n\\t\\t// Check if the owner object already has a cache\\n\\t\\tvar value = owner[ this.expando ];\\n\\n\\t\\t// If not, create one\\n\\t\\tif ( !value ) {\\n\\t\\t\\tvalue = {};\\n\\n\\t\\t\\t// We can accept data for non-element nodes in modern browsers,\\n\\t\\t\\t// but we should not, see #8335.\\n\\t\\t\\t// Always return an empty object.\\n\\t\\t\\tif ( acceptData( owner ) ) {\\n\\n\\t\\t\\t\\t// If it is a node unlikely to be stringify-ed or looped over\\n\\t\\t\\t\\t// use plain assignment\\n\\t\\t\\t\\tif ( owner.nodeType ) {\\n\\t\\t\\t\\t\\towner[ this.expando ] = value;\\n\\n\\t\\t\\t\\t// Otherwise secure it in a non-enumerable property\\n\\t\\t\\t\\t// configurable must be true to allow the property to be\\n\\t\\t\\t\\t// deleted when data is removed\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tObject.defineProperty( owner, this.expando, {\\n\\t\\t\\t\\t\\t\\tvalue: value,\\n\\t\\t\\t\\t\\t\\tconfigurable: true\\n\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn value;\\n\\t},\\n\\tset: function( owner, data, value ) {\\n\\t\\tvar prop,\\n\\t\\t\\tcache = this.cache( owner );\\n\\n\\t\\t// Handle: [ owner, key, value ] args\\n\\t\\t// Always use camelCase key (gh-2257)\\n\\t\\tif ( typeof data === \\\"string\\\" ) {\\n\\t\\t\\tcache[ jQuery.camelCase( data ) ] = value;\\n\\n\\t\\t// Handle: [ owner, { properties } ] args\\n\\t\\t} else {\\n\\n\\t\\t\\t// Copy the properties one-by-one to the cache object\\n\\t\\t\\tfor ( prop in data ) {\\n\\t\\t\\t\\tcache[ jQuery.camelCase( prop ) ] = data[ prop ];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn cache;\\n\\t},\\n\\tget: function( owner, key ) {\\n\\t\\treturn key === undefined ?\\n\\t\\t\\tthis.cache( owner ) :\\n\\n\\t\\t\\t// Always use camelCase key (gh-2257)\\n\\t\\t\\towner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ];\\n\\t},\\n\\taccess: function( owner, key, value ) {\\n\\n\\t\\t// In cases where either:\\n\\t\\t//\\n\\t\\t// 1. No key was specified\\n\\t\\t// 2. A string key was specified, but no value provided\\n\\t\\t//\\n\\t\\t// Take the \\\"read\\\" path and allow the get method to determine\\n\\t\\t// which value to return, respectively either:\\n\\t\\t//\\n\\t\\t// 1. The entire cache object\\n\\t\\t// 2. The data stored at the key\\n\\t\\t//\\n\\t\\tif ( key === undefined ||\\n\\t\\t\\t\\t( ( key && typeof key === \\\"string\\\" ) && value === undefined ) ) {\\n\\n\\t\\t\\treturn this.get( owner, key );\\n\\t\\t}\\n\\n\\t\\t// When the key is not a string, or both a key and value\\n\\t\\t// are specified, set or extend (existing objects) with either:\\n\\t\\t//\\n\\t\\t// 1. An object of properties\\n\\t\\t// 2. A key and value\\n\\t\\t//\\n\\t\\tthis.set( owner, key, value );\\n\\n\\t\\t// Since the \\\"set\\\" path can have two possible entry points\\n\\t\\t// return the expected data based on which path was taken[*]\\n\\t\\treturn value !== undefined ? value : key;\\n\\t},\\n\\tremove: function( owner, key ) {\\n\\t\\tvar i,\\n\\t\\t\\tcache = owner[ this.expando ];\\n\\n\\t\\tif ( cache === undefined ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tif ( key !== undefined ) {\\n\\n\\t\\t\\t// Support array or space separated string of keys\\n\\t\\t\\tif ( jQuery.isArray( key ) ) {\\n\\n\\t\\t\\t\\t// If key is an array of keys...\\n\\t\\t\\t\\t// We always set camelCase keys, so remove that.\\n\\t\\t\\t\\tkey = key.map( jQuery.camelCase );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tkey = jQuery.camelCase( key );\\n\\n\\t\\t\\t\\t// If a key with the spaces exists, use it.\\n\\t\\t\\t\\t// Otherwise, create an array by matching non-whitespace\\n\\t\\t\\t\\tkey = key in cache ?\\n\\t\\t\\t\\t\\t[ key ] :\\n\\t\\t\\t\\t\\t( key.match( rnothtmlwhite ) || [] );\\n\\t\\t\\t}\\n\\n\\t\\t\\ti = key.length;\\n\\n\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\tdelete cache[ key[ i ] ];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Remove the expando if there's no more data\\n\\t\\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\\n\\n\\t\\t\\t// Support: Chrome <=35 - 45\\n\\t\\t\\t// Webkit & Blink performance suffers when deleting properties\\n\\t\\t\\t// from DOM nodes, so set to undefined instead\\n\\t\\t\\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\\n\\t\\t\\tif ( owner.nodeType ) {\\n\\t\\t\\t\\towner[ this.expando ] = undefined;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tdelete owner[ this.expando ];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\thasData: function( owner ) {\\n\\t\\tvar cache = owner[ this.expando ];\\n\\t\\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\\n\\t}\\n};\\nvar dataPriv = new Data();\\n\\nvar dataUser = new Data();\\n\\n\\n\\n//\\tImplementation Summary\\n//\\n//\\t1. Enforce API surface and semantic compatibility with 1.9.x branch\\n//\\t2. Improve the module's maintainability by reducing the storage\\n//\\t\\tpaths to a single mechanism.\\n//\\t3. Use the same single mechanism to support \\\"private\\\" and \\\"user\\\" data.\\n//\\t4. _Never_ expose \\\"private\\\" data to user code (TODO: Drop _data, _removeData)\\n//\\t5. Avoid exposing implementation details on user objects (eg. expando properties)\\n//\\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\\n\\nvar rbrace = /^(?:\\\\{[\\\\w\\\\W]*\\\\}|\\\\[[\\\\w\\\\W]*\\\\])$/,\\n\\trmultiDash = /[A-Z]/g;\\n\\nfunction getData( data ) {\\n\\tif ( data === \\\"true\\\" ) {\\n\\t\\treturn true;\\n\\t}\\n\\n\\tif ( data === \\\"false\\\" ) {\\n\\t\\treturn false;\\n\\t}\\n\\n\\tif ( data === \\\"null\\\" ) {\\n\\t\\treturn null;\\n\\t}\\n\\n\\t// Only convert to a number if it doesn't change the string\\n\\tif ( data === +data + \\\"\\\" ) {\\n\\t\\treturn +data;\\n\\t}\\n\\n\\tif ( rbrace.test( data ) ) {\\n\\t\\treturn JSON.parse( data );\\n\\t}\\n\\n\\treturn data;\\n}\\n\\nfunction dataAttr( elem, key, data ) {\\n\\tvar name;\\n\\n\\t// If nothing was found internally, try to fetch any\\n\\t// data from the HTML5 data-* attribute\\n\\tif ( data === undefined && elem.nodeType === 1 ) {\\n\\t\\tname = \\\"data-\\\" + key.replace( rmultiDash, \\\"-$&\\\" ).toLowerCase();\\n\\t\\tdata = elem.getAttribute( name );\\n\\n\\t\\tif ( typeof data === \\\"string\\\" ) {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tdata = getData( data );\\n\\t\\t\\t} catch ( e ) {}\\n\\n\\t\\t\\t// Make sure we set the data so it isn't changed later\\n\\t\\t\\tdataUser.set( elem, key, data );\\n\\t\\t} else {\\n\\t\\t\\tdata = undefined;\\n\\t\\t}\\n\\t}\\n\\treturn data;\\n}\\n\\njQuery.extend( {\\n\\thasData: function( elem ) {\\n\\t\\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\\n\\t},\\n\\n\\tdata: function( elem, name, data ) {\\n\\t\\treturn dataUser.access( elem, name, data );\\n\\t},\\n\\n\\tremoveData: function( elem, name ) {\\n\\t\\tdataUser.remove( elem, name );\\n\\t},\\n\\n\\t// TODO: Now that all calls to _data and _removeData have been replaced\\n\\t// with direct calls to dataPriv methods, these can be deprecated.\\n\\t_data: function( elem, name, data ) {\\n\\t\\treturn dataPriv.access( elem, name, data );\\n\\t},\\n\\n\\t_removeData: function( elem, name ) {\\n\\t\\tdataPriv.remove( elem, name );\\n\\t}\\n} );\\n\\njQuery.fn.extend( {\\n\\tdata: function( key, value ) {\\n\\t\\tvar i, name, data,\\n\\t\\t\\telem = this[ 0 ],\\n\\t\\t\\tattrs = elem && elem.attributes;\\n\\n\\t\\t// Gets all values\\n\\t\\tif ( key === undefined ) {\\n\\t\\t\\tif ( this.length ) {\\n\\t\\t\\t\\tdata = dataUser.get( elem );\\n\\n\\t\\t\\t\\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \\\"hasDataAttrs\\\" ) ) {\\n\\t\\t\\t\\t\\ti = attrs.length;\\n\\t\\t\\t\\t\\twhile ( i-- ) {\\n\\n\\t\\t\\t\\t\\t\\t// Support: IE 11 only\\n\\t\\t\\t\\t\\t\\t// The attrs elements can be null (#14894)\\n\\t\\t\\t\\t\\t\\tif ( attrs[ i ] ) {\\n\\t\\t\\t\\t\\t\\t\\tname = attrs[ i ].name;\\n\\t\\t\\t\\t\\t\\t\\tif ( name.indexOf( \\\"data-\\\" ) === 0 ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tname = jQuery.camelCase( name.slice( 5 ) );\\n\\t\\t\\t\\t\\t\\t\\t\\tdataAttr( elem, name, data[ name ] );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tdataPriv.set( elem, \\\"hasDataAttrs\\\", true );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn data;\\n\\t\\t}\\n\\n\\t\\t// Sets multiple values\\n\\t\\tif ( typeof key === \\\"object\\\" ) {\\n\\t\\t\\treturn this.each( function() {\\n\\t\\t\\t\\tdataUser.set( this, key );\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\treturn access( this, function( value ) {\\n\\t\\t\\tvar data;\\n\\n\\t\\t\\t// The calling jQuery object (element matches) is not empty\\n\\t\\t\\t// (and therefore has an element appears at this[ 0 ]) and the\\n\\t\\t\\t// `value` parameter was not undefined. An empty jQuery object\\n\\t\\t\\t// will result in `undefined` for elem = this[ 0 ] which will\\n\\t\\t\\t// throw an exception if an attempt to read a data cache is made.\\n\\t\\t\\tif ( elem && value === undefined ) {\\n\\n\\t\\t\\t\\t// Attempt to get data from the cache\\n\\t\\t\\t\\t// The key will always be camelCased in Data\\n\\t\\t\\t\\tdata = dataUser.get( elem, key );\\n\\t\\t\\t\\tif ( data !== undefined ) {\\n\\t\\t\\t\\t\\treturn data;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Attempt to \\\"discover\\\" the data in\\n\\t\\t\\t\\t// HTML5 custom data-* attrs\\n\\t\\t\\t\\tdata = dataAttr( elem, key );\\n\\t\\t\\t\\tif ( data !== undefined ) {\\n\\t\\t\\t\\t\\treturn data;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// We tried really hard, but the data doesn't exist.\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Set the data...\\n\\t\\t\\tthis.each( function() {\\n\\n\\t\\t\\t\\t// We always store the camelCased key\\n\\t\\t\\t\\tdataUser.set( this, key, value );\\n\\t\\t\\t} );\\n\\t\\t}, null, value, arguments.length > 1, null, true );\\n\\t},\\n\\n\\tremoveData: function( key ) {\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tdataUser.remove( this, key );\\n\\t\\t} );\\n\\t}\\n} );\\n\\n\\njQuery.extend( {\\n\\tqueue: function( elem, type, data ) {\\n\\t\\tvar queue;\\n\\n\\t\\tif ( elem ) {\\n\\t\\t\\ttype = ( type || \\\"fx\\\" ) + \\\"queue\\\";\\n\\t\\t\\tqueue = dataPriv.get( elem, type );\\n\\n\\t\\t\\t// Speed up dequeue by getting out quickly if this is just a lookup\\n\\t\\t\\tif ( data ) {\\n\\t\\t\\t\\tif ( !queue || jQuery.isArray( data ) ) {\\n\\t\\t\\t\\t\\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tqueue.push( data );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn queue || [];\\n\\t\\t}\\n\\t},\\n\\n\\tdequeue: function( elem, type ) {\\n\\t\\ttype = type || \\\"fx\\\";\\n\\n\\t\\tvar queue = jQuery.queue( elem, type ),\\n\\t\\t\\tstartLength = queue.length,\\n\\t\\t\\tfn = queue.shift(),\\n\\t\\t\\thooks = jQuery._queueHooks( elem, type ),\\n\\t\\t\\tnext = function() {\\n\\t\\t\\t\\tjQuery.dequeue( elem, type );\\n\\t\\t\\t};\\n\\n\\t\\t// If the fx queue is dequeued, always remove the progress sentinel\\n\\t\\tif ( fn === \\\"inprogress\\\" ) {\\n\\t\\t\\tfn = queue.shift();\\n\\t\\t\\tstartLength--;\\n\\t\\t}\\n\\n\\t\\tif ( fn ) {\\n\\n\\t\\t\\t// Add a progress sentinel to prevent the fx queue from being\\n\\t\\t\\t// automatically dequeued\\n\\t\\t\\tif ( type === \\\"fx\\\" ) {\\n\\t\\t\\t\\tqueue.unshift( \\\"inprogress\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Clear up the last queue stop function\\n\\t\\t\\tdelete hooks.stop;\\n\\t\\t\\tfn.call( elem, next, hooks );\\n\\t\\t}\\n\\n\\t\\tif ( !startLength && hooks ) {\\n\\t\\t\\thooks.empty.fire();\\n\\t\\t}\\n\\t},\\n\\n\\t// Not public - generate a queueHooks object, or return the current one\\n\\t_queueHooks: function( elem, type ) {\\n\\t\\tvar key = type + \\\"queueHooks\\\";\\n\\t\\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\\n\\t\\t\\tempty: jQuery.Callbacks( \\\"once memory\\\" ).add( function() {\\n\\t\\t\\t\\tdataPriv.remove( elem, [ type + \\\"queue\\\", key ] );\\n\\t\\t\\t} )\\n\\t\\t} );\\n\\t}\\n} );\\n\\njQuery.fn.extend( {\\n\\tqueue: function( type, data ) {\\n\\t\\tvar setter = 2;\\n\\n\\t\\tif ( typeof type !== \\\"string\\\" ) {\\n\\t\\t\\tdata = type;\\n\\t\\t\\ttype = \\\"fx\\\";\\n\\t\\t\\tsetter--;\\n\\t\\t}\\n\\n\\t\\tif ( arguments.length < setter ) {\\n\\t\\t\\treturn jQuery.queue( this[ 0 ], type );\\n\\t\\t}\\n\\n\\t\\treturn data === undefined ?\\n\\t\\t\\tthis :\\n\\t\\t\\tthis.each( function() {\\n\\t\\t\\t\\tvar queue = jQuery.queue( this, type, data );\\n\\n\\t\\t\\t\\t// Ensure a hooks for this queue\\n\\t\\t\\t\\tjQuery._queueHooks( this, type );\\n\\n\\t\\t\\t\\tif ( type === \\\"fx\\\" && queue[ 0 ] !== \\\"inprogress\\\" ) {\\n\\t\\t\\t\\t\\tjQuery.dequeue( this, type );\\n\\t\\t\\t\\t}\\n\\t\\t\\t} );\\n\\t},\\n\\tdequeue: function( type ) {\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tjQuery.dequeue( this, type );\\n\\t\\t} );\\n\\t},\\n\\tclearQueue: function( type ) {\\n\\t\\treturn this.queue( type || \\\"fx\\\", [] );\\n\\t},\\n\\n\\t// Get a promise resolved when queues of a certain type\\n\\t// are emptied (fx is the type by default)\\n\\tpromise: function( type, obj ) {\\n\\t\\tvar tmp,\\n\\t\\t\\tcount = 1,\\n\\t\\t\\tdefer = jQuery.Deferred(),\\n\\t\\t\\telements = this,\\n\\t\\t\\ti = this.length,\\n\\t\\t\\tresolve = function() {\\n\\t\\t\\t\\tif ( !( --count ) ) {\\n\\t\\t\\t\\t\\tdefer.resolveWith( elements, [ elements ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t};\\n\\n\\t\\tif ( typeof type !== \\\"string\\\" ) {\\n\\t\\t\\tobj = type;\\n\\t\\t\\ttype = undefined;\\n\\t\\t}\\n\\t\\ttype = type || \\\"fx\\\";\\n\\n\\t\\twhile ( i-- ) {\\n\\t\\t\\ttmp = dataPriv.get( elements[ i ], type + \\\"queueHooks\\\" );\\n\\t\\t\\tif ( tmp && tmp.empty ) {\\n\\t\\t\\t\\tcount++;\\n\\t\\t\\t\\ttmp.empty.add( resolve );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tresolve();\\n\\t\\treturn defer.promise( obj );\\n\\t}\\n} );\\nvar pnum = ( /[+-]?(?:\\\\d*\\\\.|)\\\\d+(?:[eE][+-]?\\\\d+|)/ ).source;\\n\\nvar rcssNum = new RegExp( \\\"^(?:([+-])=|)(\\\" + pnum + \\\")([a-z%]*)$\\\", \\\"i\\\" );\\n\\n\\nvar cssExpand = [ \\\"Top\\\", \\\"Right\\\", \\\"Bottom\\\", \\\"Left\\\" ];\\n\\nvar isHiddenWithinTree = function( elem, el ) {\\n\\n\\t\\t// isHiddenWithinTree might be called from jQuery#filter function;\\n\\t\\t// in that case, element will be second argument\\n\\t\\telem = el || elem;\\n\\n\\t\\t// Inline style trumps all\\n\\t\\treturn elem.style.display === \\\"none\\\" ||\\n\\t\\t\\telem.style.display === \\\"\\\" &&\\n\\n\\t\\t\\t// Otherwise, check computed style\\n\\t\\t\\t// Support: Firefox <=43 - 45\\n\\t\\t\\t// Disconnected elements can have computed display: none, so first confirm that elem is\\n\\t\\t\\t// in the document.\\n\\t\\t\\tjQuery.contains( elem.ownerDocument, elem ) &&\\n\\n\\t\\t\\tjQuery.css( elem, \\\"display\\\" ) === \\\"none\\\";\\n\\t};\\n\\nvar swap = function( elem, options, callback, args ) {\\n\\tvar ret, name,\\n\\t\\told = {};\\n\\n\\t// Remember the old values, and insert the new ones\\n\\tfor ( name in options ) {\\n\\t\\told[ name ] = elem.style[ name ];\\n\\t\\telem.style[ name ] = options[ name ];\\n\\t}\\n\\n\\tret = callback.apply( elem, args || [] );\\n\\n\\t// Revert the old values\\n\\tfor ( name in options ) {\\n\\t\\telem.style[ name ] = old[ name ];\\n\\t}\\n\\n\\treturn ret;\\n};\\n\\n\\n\\n\\nfunction adjustCSS( elem, prop, valueParts, tween ) {\\n\\tvar adjusted,\\n\\t\\tscale = 1,\\n\\t\\tmaxIterations = 20,\\n\\t\\tcurrentValue = tween ?\\n\\t\\t\\tfunction() {\\n\\t\\t\\t\\treturn tween.cur();\\n\\t\\t\\t} :\\n\\t\\t\\tfunction() {\\n\\t\\t\\t\\treturn jQuery.css( elem, prop, \\\"\\\" );\\n\\t\\t\\t},\\n\\t\\tinitial = currentValue(),\\n\\t\\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \\\"\\\" : \\\"px\\\" ),\\n\\n\\t\\t// Starting value computation is required for potential unit mismatches\\n\\t\\tinitialInUnit = ( jQuery.cssNumber[ prop ] || unit !== \\\"px\\\" && +initial ) &&\\n\\t\\t\\trcssNum.exec( jQuery.css( elem, prop ) );\\n\\n\\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\\n\\n\\t\\t// Trust units reported by jQuery.css\\n\\t\\tunit = unit || initialInUnit[ 3 ];\\n\\n\\t\\t// Make sure we update the tween properties later on\\n\\t\\tvalueParts = valueParts || [];\\n\\n\\t\\t// Iteratively approximate from a nonzero starting point\\n\\t\\tinitialInUnit = +initial || 1;\\n\\n\\t\\tdo {\\n\\n\\t\\t\\t// If previous iteration zeroed out, double until we get *something*.\\n\\t\\t\\t// Use string for doubling so we don't accidentally see scale as unchanged below\\n\\t\\t\\tscale = scale || \\\".5\\\";\\n\\n\\t\\t\\t// Adjust and apply\\n\\t\\t\\tinitialInUnit = initialInUnit / scale;\\n\\t\\t\\tjQuery.style( elem, prop, initialInUnit + unit );\\n\\n\\t\\t// Update scale, tolerating zero or NaN from tween.cur()\\n\\t\\t// Break the loop if scale is unchanged or perfect, or if we've just had enough.\\n\\t\\t} while (\\n\\t\\t\\tscale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations\\n\\t\\t);\\n\\t}\\n\\n\\tif ( valueParts ) {\\n\\t\\tinitialInUnit = +initialInUnit || +initial || 0;\\n\\n\\t\\t// Apply relative offset (+=/-=) if specified\\n\\t\\tadjusted = valueParts[ 1 ] ?\\n\\t\\t\\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\\n\\t\\t\\t+valueParts[ 2 ];\\n\\t\\tif ( tween ) {\\n\\t\\t\\ttween.unit = unit;\\n\\t\\t\\ttween.start = initialInUnit;\\n\\t\\t\\ttween.end = adjusted;\\n\\t\\t}\\n\\t}\\n\\treturn adjusted;\\n}\\n\\n\\nvar defaultDisplayMap = {};\\n\\nfunction getDefaultDisplay( elem ) {\\n\\tvar temp,\\n\\t\\tdoc = elem.ownerDocument,\\n\\t\\tnodeName = elem.nodeName,\\n\\t\\tdisplay = defaultDisplayMap[ nodeName ];\\n\\n\\tif ( display ) {\\n\\t\\treturn display;\\n\\t}\\n\\n\\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\\n\\tdisplay = jQuery.css( temp, \\\"display\\\" );\\n\\n\\ttemp.parentNode.removeChild( temp );\\n\\n\\tif ( display === \\\"none\\\" ) {\\n\\t\\tdisplay = \\\"block\\\";\\n\\t}\\n\\tdefaultDisplayMap[ nodeName ] = display;\\n\\n\\treturn display;\\n}\\n\\nfunction showHide( elements, show ) {\\n\\tvar display, elem,\\n\\t\\tvalues = [],\\n\\t\\tindex = 0,\\n\\t\\tlength = elements.length;\\n\\n\\t// Determine new display value for elements that need to change\\n\\tfor ( ; index < length; index++ ) {\\n\\t\\telem = elements[ index ];\\n\\t\\tif ( !elem.style ) {\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\n\\t\\tdisplay = elem.style.display;\\n\\t\\tif ( show ) {\\n\\n\\t\\t\\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\\n\\t\\t\\t// check is required in this first loop unless we have a nonempty display value (either\\n\\t\\t\\t// inline or about-to-be-restored)\\n\\t\\t\\tif ( display === \\\"none\\\" ) {\\n\\t\\t\\t\\tvalues[ index ] = dataPriv.get( elem, \\\"display\\\" ) || null;\\n\\t\\t\\t\\tif ( !values[ index ] ) {\\n\\t\\t\\t\\t\\telem.style.display = \\\"\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif ( elem.style.display === \\\"\\\" && isHiddenWithinTree( elem ) ) {\\n\\t\\t\\t\\tvalues[ index ] = getDefaultDisplay( elem );\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\tif ( display !== \\\"none\\\" ) {\\n\\t\\t\\t\\tvalues[ index ] = \\\"none\\\";\\n\\n\\t\\t\\t\\t// Remember what we're overwriting\\n\\t\\t\\t\\tdataPriv.set( elem, \\\"display\\\", display );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Set the display of the elements in a second loop to avoid constant reflow\\n\\tfor ( index = 0; index < length; index++ ) {\\n\\t\\tif ( values[ index ] != null ) {\\n\\t\\t\\telements[ index ].style.display = values[ index ];\\n\\t\\t}\\n\\t}\\n\\n\\treturn elements;\\n}\\n\\njQuery.fn.extend( {\\n\\tshow: function() {\\n\\t\\treturn showHide( this, true );\\n\\t},\\n\\thide: function() {\\n\\t\\treturn showHide( this );\\n\\t},\\n\\ttoggle: function( state ) {\\n\\t\\tif ( typeof state === \\\"boolean\\\" ) {\\n\\t\\t\\treturn state ? this.show() : this.hide();\\n\\t\\t}\\n\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tif ( isHiddenWithinTree( this ) ) {\\n\\t\\t\\t\\tjQuery( this ).show();\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tjQuery( this ).hide();\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t}\\n} );\\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\\n\\nvar rtagName = ( /<([a-z][^\\\\/\\\\0>\\\\x20\\\\t\\\\r\\\\n\\\\f]+)/i );\\n\\nvar rscriptType = ( /^$|\\\\/(?:java|ecma)script/i );\\n\\n\\n\\n// We have to close these tags to support XHTML (#13200)\\nvar wrapMap = {\\n\\n\\t// Support: IE <=9 only\\n\\toption: [ 1, \\\"<select multiple='multiple'>\\\", \\\"</select>\\\" ],\\n\\n\\t// XHTML parsers do not magically insert elements in the\\n\\t// same way that tag soup parsers do. So we cannot shorten\\n\\t// this by omitting <tbody> or other required elements.\\n\\tthead: [ 1, \\\"<table>\\\", \\\"</table>\\\" ],\\n\\tcol: [ 2, \\\"<table><colgroup>\\\", \\\"</colgroup></table>\\\" ],\\n\\ttr: [ 2, \\\"<table><tbody>\\\", \\\"</tbody></table>\\\" ],\\n\\ttd: [ 3, \\\"<table><tbody><tr>\\\", \\\"</tr></tbody></table>\\\" ],\\n\\n\\t_default: [ 0, \\\"\\\", \\\"\\\" ]\\n};\\n\\n// Support: IE <=9 only\\nwrapMap.optgroup = wrapMap.option;\\n\\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\\nwrapMap.th = wrapMap.td;\\n\\n\\nfunction getAll( context, tag ) {\\n\\n\\t// Support: IE <=9 - 11 only\\n\\t// Use typeof to avoid zero-argument method invocation on host objects (#15151)\\n\\tvar ret;\\n\\n\\tif ( typeof context.getElementsByTagName !== \\\"undefined\\\" ) {\\n\\t\\tret = context.getElementsByTagName( tag || \\\"*\\\" );\\n\\n\\t} else if ( typeof context.querySelectorAll !== \\\"undefined\\\" ) {\\n\\t\\tret = context.querySelectorAll( tag || \\\"*\\\" );\\n\\n\\t} else {\\n\\t\\tret = [];\\n\\t}\\n\\n\\tif ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) {\\n\\t\\treturn jQuery.merge( [ context ], ret );\\n\\t}\\n\\n\\treturn ret;\\n}\\n\\n\\n// Mark scripts as having already been evaluated\\nfunction setGlobalEval( elems, refElements ) {\\n\\tvar i = 0,\\n\\t\\tl = elems.length;\\n\\n\\tfor ( ; i < l; i++ ) {\\n\\t\\tdataPriv.set(\\n\\t\\t\\telems[ i ],\\n\\t\\t\\t\\\"globalEval\\\",\\n\\t\\t\\t!refElements || dataPriv.get( refElements[ i ], \\\"globalEval\\\" )\\n\\t\\t);\\n\\t}\\n}\\n\\n\\nvar rhtml = /<|&#?\\\\w+;/;\\n\\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\\n\\tvar elem, tmp, tag, wrap, contains, j,\\n\\t\\tfragment = context.createDocumentFragment(),\\n\\t\\tnodes = [],\\n\\t\\ti = 0,\\n\\t\\tl = elems.length;\\n\\n\\tfor ( ; i < l; i++ ) {\\n\\t\\telem = elems[ i ];\\n\\n\\t\\tif ( elem || elem === 0 ) {\\n\\n\\t\\t\\t// Add nodes directly\\n\\t\\t\\tif ( jQuery.type( elem ) === \\\"object\\\" ) {\\n\\n\\t\\t\\t\\t// Support: Android <=4.0 only, PhantomJS 1 only\\n\\t\\t\\t\\t// push.apply(_, arraylike) throws on ancient WebKit\\n\\t\\t\\t\\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\\n\\n\\t\\t\\t// Convert non-html into a text node\\n\\t\\t\\t} else if ( !rhtml.test( elem ) ) {\\n\\t\\t\\t\\tnodes.push( context.createTextNode( elem ) );\\n\\n\\t\\t\\t// Convert html into DOM nodes\\n\\t\\t\\t} else {\\n\\t\\t\\t\\ttmp = tmp || fragment.appendChild( context.createElement( \\\"div\\\" ) );\\n\\n\\t\\t\\t\\t// Deserialize a standard representation\\n\\t\\t\\t\\ttag = ( rtagName.exec( elem ) || [ \\\"\\\", \\\"\\\" ] )[ 1 ].toLowerCase();\\n\\t\\t\\t\\twrap = wrapMap[ tag ] || wrapMap._default;\\n\\t\\t\\t\\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\\n\\n\\t\\t\\t\\t// Descend through wrappers to the right content\\n\\t\\t\\t\\tj = wrap[ 0 ];\\n\\t\\t\\t\\twhile ( j-- ) {\\n\\t\\t\\t\\t\\ttmp = tmp.lastChild;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Support: Android <=4.0 only, PhantomJS 1 only\\n\\t\\t\\t\\t// push.apply(_, arraylike) throws on ancient WebKit\\n\\t\\t\\t\\tjQuery.merge( nodes, tmp.childNodes );\\n\\n\\t\\t\\t\\t// Remember the top-level container\\n\\t\\t\\t\\ttmp = fragment.firstChild;\\n\\n\\t\\t\\t\\t// Ensure the created nodes are orphaned (#12392)\\n\\t\\t\\t\\ttmp.textContent = \\\"\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Remove wrapper from fragment\\n\\tfragment.textContent = \\\"\\\";\\n\\n\\ti = 0;\\n\\twhile ( ( elem = nodes[ i++ ] ) ) {\\n\\n\\t\\t// Skip elements already in the context collection (trac-4087)\\n\\t\\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\\n\\t\\t\\tif ( ignored ) {\\n\\t\\t\\t\\tignored.push( elem );\\n\\t\\t\\t}\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\n\\t\\tcontains = jQuery.contains( elem.ownerDocument, elem );\\n\\n\\t\\t// Append to fragment\\n\\t\\ttmp = getAll( fragment.appendChild( elem ), \\\"script\\\" );\\n\\n\\t\\t// Preserve script evaluation history\\n\\t\\tif ( contains ) {\\n\\t\\t\\tsetGlobalEval( tmp );\\n\\t\\t}\\n\\n\\t\\t// Capture executables\\n\\t\\tif ( scripts ) {\\n\\t\\t\\tj = 0;\\n\\t\\t\\twhile ( ( elem = tmp[ j++ ] ) ) {\\n\\t\\t\\t\\tif ( rscriptType.test( elem.type || \\\"\\\" ) ) {\\n\\t\\t\\t\\t\\tscripts.push( elem );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn fragment;\\n}\\n\\n\\n( function() {\\n\\tvar fragment = document.createDocumentFragment(),\\n\\t\\tdiv = fragment.appendChild( document.createElement( \\\"div\\\" ) ),\\n\\t\\tinput = document.createElement( \\\"input\\\" );\\n\\n\\t// Support: Android 4.0 - 4.3 only\\n\\t// Check state lost if the name is set (#11217)\\n\\t// Support: Windows Web Apps (WWA)\\n\\t// `name` and `type` must use .setAttribute for WWA (#14901)\\n\\tinput.setAttribute( \\\"type\\\", \\\"radio\\\" );\\n\\tinput.setAttribute( \\\"checked\\\", \\\"checked\\\" );\\n\\tinput.setAttribute( \\\"name\\\", \\\"t\\\" );\\n\\n\\tdiv.appendChild( input );\\n\\n\\t// Support: Android <=4.1 only\\n\\t// Older WebKit doesn't clone checked state correctly in fragments\\n\\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\\n\\n\\t// Support: IE <=11 only\\n\\t// Make sure textarea (and checkbox) defaultValue is properly cloned\\n\\tdiv.innerHTML = \\\"<textarea>x</textarea>\\\";\\n\\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\\n} )();\\nvar documentElement = document.documentElement;\\n\\n\\n\\nvar\\n\\trkeyEvent = /^key/,\\n\\trmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,\\n\\trtypenamespace = /^([^.]*)(?:\\\\.(.+)|)/;\\n\\nfunction returnTrue() {\\n\\treturn true;\\n}\\n\\nfunction returnFalse() {\\n\\treturn false;\\n}\\n\\n// Support: IE <=9 only\\n// See #13393 for more info\\nfunction safeActiveElement() {\\n\\ttry {\\n\\t\\treturn document.activeElement;\\n\\t} catch ( err ) { }\\n}\\n\\nfunction on( elem, types, selector, data, fn, one ) {\\n\\tvar origFn, type;\\n\\n\\t// Types can be a map of types/handlers\\n\\tif ( typeof types === \\\"object\\\" ) {\\n\\n\\t\\t// ( types-Object, selector, data )\\n\\t\\tif ( typeof selector !== \\\"string\\\" ) {\\n\\n\\t\\t\\t// ( types-Object, data )\\n\\t\\t\\tdata = data || selector;\\n\\t\\t\\tselector = undefined;\\n\\t\\t}\\n\\t\\tfor ( type in types ) {\\n\\t\\t\\ton( elem, type, selector, data, types[ type ], one );\\n\\t\\t}\\n\\t\\treturn elem;\\n\\t}\\n\\n\\tif ( data == null && fn == null ) {\\n\\n\\t\\t// ( types, fn )\\n\\t\\tfn = selector;\\n\\t\\tdata = selector = undefined;\\n\\t} else if ( fn == null ) {\\n\\t\\tif ( typeof selector === \\\"string\\\" ) {\\n\\n\\t\\t\\t// ( types, selector, fn )\\n\\t\\t\\tfn = data;\\n\\t\\t\\tdata = undefined;\\n\\t\\t} else {\\n\\n\\t\\t\\t// ( types, data, fn )\\n\\t\\t\\tfn = data;\\n\\t\\t\\tdata = selector;\\n\\t\\t\\tselector = undefined;\\n\\t\\t}\\n\\t}\\n\\tif ( fn === false ) {\\n\\t\\tfn = returnFalse;\\n\\t} else if ( !fn ) {\\n\\t\\treturn elem;\\n\\t}\\n\\n\\tif ( one === 1 ) {\\n\\t\\torigFn = fn;\\n\\t\\tfn = function( event ) {\\n\\n\\t\\t\\t// Can use an empty set, since event contains the info\\n\\t\\t\\tjQuery().off( event );\\n\\t\\t\\treturn origFn.apply( this, arguments );\\n\\t\\t};\\n\\n\\t\\t// Use same guid so caller can remove using origFn\\n\\t\\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\\n\\t}\\n\\treturn elem.each( function() {\\n\\t\\tjQuery.event.add( this, types, fn, data, selector );\\n\\t} );\\n}\\n\\n/*\\n * Helper functions for managing events -- not part of the public interface.\\n * Props to Dean Edwards' addEvent library for many of the ideas.\\n */\\njQuery.event = {\\n\\n\\tglobal: {},\\n\\n\\tadd: function( elem, types, handler, data, selector ) {\\n\\n\\t\\tvar handleObjIn, eventHandle, tmp,\\n\\t\\t\\tevents, t, handleObj,\\n\\t\\t\\tspecial, handlers, type, namespaces, origType,\\n\\t\\t\\telemData = dataPriv.get( elem );\\n\\n\\t\\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\\n\\t\\tif ( !elemData ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Caller can pass in an object of custom data in lieu of the handler\\n\\t\\tif ( handler.handler ) {\\n\\t\\t\\thandleObjIn = handler;\\n\\t\\t\\thandler = handleObjIn.handler;\\n\\t\\t\\tselector = handleObjIn.selector;\\n\\t\\t}\\n\\n\\t\\t// Ensure that invalid selectors throw exceptions at attach time\\n\\t\\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\\n\\t\\tif ( selector ) {\\n\\t\\t\\tjQuery.find.matchesSelector( documentElement, selector );\\n\\t\\t}\\n\\n\\t\\t// Make sure that the handler has a unique ID, used to find/remove it later\\n\\t\\tif ( !handler.guid ) {\\n\\t\\t\\thandler.guid = jQuery.guid++;\\n\\t\\t}\\n\\n\\t\\t// Init the element's event structure and main handler, if this is the first\\n\\t\\tif ( !( events = elemData.events ) ) {\\n\\t\\t\\tevents = elemData.events = {};\\n\\t\\t}\\n\\t\\tif ( !( eventHandle = elemData.handle ) ) {\\n\\t\\t\\teventHandle = elemData.handle = function( e ) {\\n\\n\\t\\t\\t\\t// Discard the second event of a jQuery.event.trigger() and\\n\\t\\t\\t\\t// when an event is called after a page has unloaded\\n\\t\\t\\t\\treturn typeof jQuery !== \\\"undefined\\\" && jQuery.event.triggered !== e.type ?\\n\\t\\t\\t\\t\\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\\n\\t\\t\\t};\\n\\t\\t}\\n\\n\\t\\t// Handle multiple events separated by a space\\n\\t\\ttypes = ( types || \\\"\\\" ).match( rnothtmlwhite ) || [ \\\"\\\" ];\\n\\t\\tt = types.length;\\n\\t\\twhile ( t-- ) {\\n\\t\\t\\ttmp = rtypenamespace.exec( types[ t ] ) || [];\\n\\t\\t\\ttype = origType = tmp[ 1 ];\\n\\t\\t\\tnamespaces = ( tmp[ 2 ] || \\\"\\\" ).split( \\\".\\\" ).sort();\\n\\n\\t\\t\\t// There *must* be a type, no attaching namespace-only handlers\\n\\t\\t\\tif ( !type ) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// If event changes its type, use the special event handlers for the changed type\\n\\t\\t\\tspecial = jQuery.event.special[ type ] || {};\\n\\n\\t\\t\\t// If selector defined, determine special event api type, otherwise given type\\n\\t\\t\\ttype = ( selector ? special.delegateType : special.bindType ) || type;\\n\\n\\t\\t\\t// Update special based on newly reset type\\n\\t\\t\\tspecial = jQuery.event.special[ type ] || {};\\n\\n\\t\\t\\t// handleObj is passed to all event handlers\\n\\t\\t\\thandleObj = jQuery.extend( {\\n\\t\\t\\t\\ttype: type,\\n\\t\\t\\t\\torigType: origType,\\n\\t\\t\\t\\tdata: data,\\n\\t\\t\\t\\thandler: handler,\\n\\t\\t\\t\\tguid: handler.guid,\\n\\t\\t\\t\\tselector: selector,\\n\\t\\t\\t\\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\\n\\t\\t\\t\\tnamespace: namespaces.join( \\\".\\\" )\\n\\t\\t\\t}, handleObjIn );\\n\\n\\t\\t\\t// Init the event handler queue if we're the first\\n\\t\\t\\tif ( !( handlers = events[ type ] ) ) {\\n\\t\\t\\t\\thandlers = events[ type ] = [];\\n\\t\\t\\t\\thandlers.delegateCount = 0;\\n\\n\\t\\t\\t\\t// Only use addEventListener if the special events handler returns false\\n\\t\\t\\t\\tif ( !special.setup ||\\n\\t\\t\\t\\t\\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\\n\\n\\t\\t\\t\\t\\tif ( elem.addEventListener ) {\\n\\t\\t\\t\\t\\t\\telem.addEventListener( type, eventHandle );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( special.add ) {\\n\\t\\t\\t\\tspecial.add.call( elem, handleObj );\\n\\n\\t\\t\\t\\tif ( !handleObj.handler.guid ) {\\n\\t\\t\\t\\t\\thandleObj.handler.guid = handler.guid;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Add to the element's handler list, delegates in front\\n\\t\\t\\tif ( selector ) {\\n\\t\\t\\t\\thandlers.splice( handlers.delegateCount++, 0, handleObj );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\thandlers.push( handleObj );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Keep track of which events have ever been used, for event optimization\\n\\t\\t\\tjQuery.event.global[ type ] = true;\\n\\t\\t}\\n\\n\\t},\\n\\n\\t// Detach an event or set of events from an element\\n\\tremove: function( elem, types, handler, selector, mappedTypes ) {\\n\\n\\t\\tvar j, origCount, tmp,\\n\\t\\t\\tevents, t, handleObj,\\n\\t\\t\\tspecial, handlers, type, namespaces, origType,\\n\\t\\t\\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\\n\\n\\t\\tif ( !elemData || !( events = elemData.events ) ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Once for each type.namespace in types; type may be omitted\\n\\t\\ttypes = ( types || \\\"\\\" ).match( rnothtmlwhite ) || [ \\\"\\\" ];\\n\\t\\tt = types.length;\\n\\t\\twhile ( t-- ) {\\n\\t\\t\\ttmp = rtypenamespace.exec( types[ t ] ) || [];\\n\\t\\t\\ttype = origType = tmp[ 1 ];\\n\\t\\t\\tnamespaces = ( tmp[ 2 ] || \\\"\\\" ).split( \\\".\\\" ).sort();\\n\\n\\t\\t\\t// Unbind all events (on this namespace, if provided) for the element\\n\\t\\t\\tif ( !type ) {\\n\\t\\t\\t\\tfor ( type in events ) {\\n\\t\\t\\t\\t\\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\tspecial = jQuery.event.special[ type ] || {};\\n\\t\\t\\ttype = ( selector ? special.delegateType : special.bindType ) || type;\\n\\t\\t\\thandlers = events[ type ] || [];\\n\\t\\t\\ttmp = tmp[ 2 ] &&\\n\\t\\t\\t\\tnew RegExp( \\\"(^|\\\\\\\\.)\\\" + namespaces.join( \\\"\\\\\\\\.(?:.*\\\\\\\\.|)\\\" ) + \\\"(\\\\\\\\.|$)\\\" );\\n\\n\\t\\t\\t// Remove matching events\\n\\t\\t\\torigCount = j = handlers.length;\\n\\t\\t\\twhile ( j-- ) {\\n\\t\\t\\t\\thandleObj = handlers[ j ];\\n\\n\\t\\t\\t\\tif ( ( mappedTypes || origType === handleObj.origType ) &&\\n\\t\\t\\t\\t\\t( !handler || handler.guid === handleObj.guid ) &&\\n\\t\\t\\t\\t\\t( !tmp || tmp.test( handleObj.namespace ) ) &&\\n\\t\\t\\t\\t\\t( !selector || selector === handleObj.selector ||\\n\\t\\t\\t\\t\\t\\tselector === \\\"**\\\" && handleObj.selector ) ) {\\n\\t\\t\\t\\t\\thandlers.splice( j, 1 );\\n\\n\\t\\t\\t\\t\\tif ( handleObj.selector ) {\\n\\t\\t\\t\\t\\t\\thandlers.delegateCount--;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tif ( special.remove ) {\\n\\t\\t\\t\\t\\t\\tspecial.remove.call( elem, handleObj );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Remove generic event handler if we removed something and no more handlers exist\\n\\t\\t\\t// (avoids potential for endless recursion during removal of special event handlers)\\n\\t\\t\\tif ( origCount && !handlers.length ) {\\n\\t\\t\\t\\tif ( !special.teardown ||\\n\\t\\t\\t\\t\\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\\n\\n\\t\\t\\t\\t\\tjQuery.removeEvent( elem, type, elemData.handle );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tdelete events[ type ];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Remove data and the expando if it's no longer used\\n\\t\\tif ( jQuery.isEmptyObject( events ) ) {\\n\\t\\t\\tdataPriv.remove( elem, \\\"handle events\\\" );\\n\\t\\t}\\n\\t},\\n\\n\\tdispatch: function( nativeEvent ) {\\n\\n\\t\\t// Make a writable jQuery.Event from the native event object\\n\\t\\tvar event = jQuery.event.fix( nativeEvent );\\n\\n\\t\\tvar i, j, ret, matched, handleObj, handlerQueue,\\n\\t\\t\\targs = new Array( arguments.length ),\\n\\t\\t\\thandlers = ( dataPriv.get( this, \\\"events\\\" ) || {} )[ event.type ] || [],\\n\\t\\t\\tspecial = jQuery.event.special[ event.type ] || {};\\n\\n\\t\\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\\n\\t\\targs[ 0 ] = event;\\n\\n\\t\\tfor ( i = 1; i < arguments.length; i++ ) {\\n\\t\\t\\targs[ i ] = arguments[ i ];\\n\\t\\t}\\n\\n\\t\\tevent.delegateTarget = this;\\n\\n\\t\\t// Call the preDispatch hook for the mapped type, and let it bail if desired\\n\\t\\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Determine handlers\\n\\t\\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\\n\\n\\t\\t// Run delegates first; they may want to stop propagation beneath us\\n\\t\\ti = 0;\\n\\t\\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\\n\\t\\t\\tevent.currentTarget = matched.elem;\\n\\n\\t\\t\\tj = 0;\\n\\t\\t\\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\\n\\t\\t\\t\\t!event.isImmediatePropagationStopped() ) {\\n\\n\\t\\t\\t\\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\\n\\t\\t\\t\\t// a subset or equal to those in the bound event (both can have no namespace).\\n\\t\\t\\t\\tif ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {\\n\\n\\t\\t\\t\\t\\tevent.handleObj = handleObj;\\n\\t\\t\\t\\t\\tevent.data = handleObj.data;\\n\\n\\t\\t\\t\\t\\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\\n\\t\\t\\t\\t\\t\\thandleObj.handler ).apply( matched.elem, args );\\n\\n\\t\\t\\t\\t\\tif ( ret !== undefined ) {\\n\\t\\t\\t\\t\\t\\tif ( ( event.result = ret ) === false ) {\\n\\t\\t\\t\\t\\t\\t\\tevent.preventDefault();\\n\\t\\t\\t\\t\\t\\t\\tevent.stopPropagation();\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Call the postDispatch hook for the mapped type\\n\\t\\tif ( special.postDispatch ) {\\n\\t\\t\\tspecial.postDispatch.call( this, event );\\n\\t\\t}\\n\\n\\t\\treturn event.result;\\n\\t},\\n\\n\\thandlers: function( event, handlers ) {\\n\\t\\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\\n\\t\\t\\thandlerQueue = [],\\n\\t\\t\\tdelegateCount = handlers.delegateCount,\\n\\t\\t\\tcur = event.target;\\n\\n\\t\\t// Find delegate handlers\\n\\t\\tif ( delegateCount &&\\n\\n\\t\\t\\t// Support: IE <=9\\n\\t\\t\\t// Black-hole SVG <use> instance trees (trac-13180)\\n\\t\\t\\tcur.nodeType &&\\n\\n\\t\\t\\t// Support: Firefox <=42\\n\\t\\t\\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\\n\\t\\t\\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\\n\\t\\t\\t// Support: IE 11 only\\n\\t\\t\\t// ...but not arrow key \\\"clicks\\\" of radio inputs, which can have `button` -1 (gh-2343)\\n\\t\\t\\t!( event.type === \\\"click\\\" && event.button >= 1 ) ) {\\n\\n\\t\\t\\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\\n\\n\\t\\t\\t\\t// Don't check non-elements (#13208)\\n\\t\\t\\t\\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\\n\\t\\t\\t\\tif ( cur.nodeType === 1 && !( event.type === \\\"click\\\" && cur.disabled === true ) ) {\\n\\t\\t\\t\\t\\tmatchedHandlers = [];\\n\\t\\t\\t\\t\\tmatchedSelectors = {};\\n\\t\\t\\t\\t\\tfor ( i = 0; i < delegateCount; i++ ) {\\n\\t\\t\\t\\t\\t\\thandleObj = handlers[ i ];\\n\\n\\t\\t\\t\\t\\t\\t// Don't conflict with Object.prototype properties (#13203)\\n\\t\\t\\t\\t\\t\\tsel = handleObj.selector + \\\" \\\";\\n\\n\\t\\t\\t\\t\\t\\tif ( matchedSelectors[ sel ] === undefined ) {\\n\\t\\t\\t\\t\\t\\t\\tmatchedSelectors[ sel ] = handleObj.needsContext ?\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery( sel, this ).index( cur ) > -1 :\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.find( sel, this, null, [ cur ] ).length;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tif ( matchedSelectors[ sel ] ) {\\n\\t\\t\\t\\t\\t\\t\\tmatchedHandlers.push( handleObj );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tif ( matchedHandlers.length ) {\\n\\t\\t\\t\\t\\t\\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Add the remaining (directly-bound) handlers\\n\\t\\tcur = this;\\n\\t\\tif ( delegateCount < handlers.length ) {\\n\\t\\t\\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\\n\\t\\t}\\n\\n\\t\\treturn handlerQueue;\\n\\t},\\n\\n\\taddProp: function( name, hook ) {\\n\\t\\tObject.defineProperty( jQuery.Event.prototype, name, {\\n\\t\\t\\tenumerable: true,\\n\\t\\t\\tconfigurable: true,\\n\\n\\t\\t\\tget: jQuery.isFunction( hook ) ?\\n\\t\\t\\t\\tfunction() {\\n\\t\\t\\t\\t\\tif ( this.originalEvent ) {\\n\\t\\t\\t\\t\\t\\t\\treturn hook( this.originalEvent );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} :\\n\\t\\t\\t\\tfunction() {\\n\\t\\t\\t\\t\\tif ( this.originalEvent ) {\\n\\t\\t\\t\\t\\t\\t\\treturn this.originalEvent[ name ];\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\tset: function( value ) {\\n\\t\\t\\t\\tObject.defineProperty( this, name, {\\n\\t\\t\\t\\t\\tenumerable: true,\\n\\t\\t\\t\\t\\tconfigurable: true,\\n\\t\\t\\t\\t\\twritable: true,\\n\\t\\t\\t\\t\\tvalue: value\\n\\t\\t\\t\\t} );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tfix: function( originalEvent ) {\\n\\t\\treturn originalEvent[ jQuery.expando ] ?\\n\\t\\t\\toriginalEvent :\\n\\t\\t\\tnew jQuery.Event( originalEvent );\\n\\t},\\n\\n\\tspecial: {\\n\\t\\tload: {\\n\\n\\t\\t\\t// Prevent triggered image.load events from bubbling to window.load\\n\\t\\t\\tnoBubble: true\\n\\t\\t},\\n\\t\\tfocus: {\\n\\n\\t\\t\\t// Fire native event if possible so blur/focus sequence is correct\\n\\t\\t\\ttrigger: function() {\\n\\t\\t\\t\\tif ( this !== safeActiveElement() && this.focus ) {\\n\\t\\t\\t\\t\\tthis.focus();\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tdelegateType: \\\"focusin\\\"\\n\\t\\t},\\n\\t\\tblur: {\\n\\t\\t\\ttrigger: function() {\\n\\t\\t\\t\\tif ( this === safeActiveElement() && this.blur ) {\\n\\t\\t\\t\\t\\tthis.blur();\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\t\\t\\tdelegateType: \\\"focusout\\\"\\n\\t\\t},\\n\\t\\tclick: {\\n\\n\\t\\t\\t// For checkbox, fire native event so checked state will be right\\n\\t\\t\\ttrigger: function() {\\n\\t\\t\\t\\tif ( this.type === \\\"checkbox\\\" && this.click && jQuery.nodeName( this, \\\"input\\\" ) ) {\\n\\t\\t\\t\\t\\tthis.click();\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\n\\t\\t\\t// For cross-browser consistency, don't fire native .click() on links\\n\\t\\t\\t_default: function( event ) {\\n\\t\\t\\t\\treturn jQuery.nodeName( event.target, \\\"a\\\" );\\n\\t\\t\\t}\\n\\t\\t},\\n\\n\\t\\tbeforeunload: {\\n\\t\\t\\tpostDispatch: function( event ) {\\n\\n\\t\\t\\t\\t// Support: Firefox 20+\\n\\t\\t\\t\\t// Firefox doesn't alert if the returnValue field is not set.\\n\\t\\t\\t\\tif ( event.result !== undefined && event.originalEvent ) {\\n\\t\\t\\t\\t\\tevent.originalEvent.returnValue = event.result;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n};\\n\\njQuery.removeEvent = function( elem, type, handle ) {\\n\\n\\t// This \\\"if\\\" is needed for plain objects\\n\\tif ( elem.removeEventListener ) {\\n\\t\\telem.removeEventListener( type, handle );\\n\\t}\\n};\\n\\njQuery.Event = function( src, props ) {\\n\\n\\t// Allow instantiation without the 'new' keyword\\n\\tif ( !( this instanceof jQuery.Event ) ) {\\n\\t\\treturn new jQuery.Event( src, props );\\n\\t}\\n\\n\\t// Event object\\n\\tif ( src && src.type ) {\\n\\t\\tthis.originalEvent = src;\\n\\t\\tthis.type = src.type;\\n\\n\\t\\t// Events bubbling up the document may have been marked as prevented\\n\\t\\t// by a handler lower down the tree; reflect the correct value.\\n\\t\\tthis.isDefaultPrevented = src.defaultPrevented ||\\n\\t\\t\\t\\tsrc.defaultPrevented === undefined &&\\n\\n\\t\\t\\t\\t// Support: Android <=2.3 only\\n\\t\\t\\t\\tsrc.returnValue === false ?\\n\\t\\t\\treturnTrue :\\n\\t\\t\\treturnFalse;\\n\\n\\t\\t// Create target properties\\n\\t\\t// Support: Safari <=6 - 7 only\\n\\t\\t// Target should not be a text node (#504, #13143)\\n\\t\\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\\n\\t\\t\\tsrc.target.parentNode :\\n\\t\\t\\tsrc.target;\\n\\n\\t\\tthis.currentTarget = src.currentTarget;\\n\\t\\tthis.relatedTarget = src.relatedTarget;\\n\\n\\t// Event type\\n\\t} else {\\n\\t\\tthis.type = src;\\n\\t}\\n\\n\\t// Put explicitly provided properties onto the event object\\n\\tif ( props ) {\\n\\t\\tjQuery.extend( this, props );\\n\\t}\\n\\n\\t// Create a timestamp if incoming event doesn't have one\\n\\tthis.timeStamp = src && src.timeStamp || jQuery.now();\\n\\n\\t// Mark it as fixed\\n\\tthis[ jQuery.expando ] = true;\\n};\\n\\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\\njQuery.Event.prototype = {\\n\\tconstructor: jQuery.Event,\\n\\tisDefaultPrevented: returnFalse,\\n\\tisPropagationStopped: returnFalse,\\n\\tisImmediatePropagationStopped: returnFalse,\\n\\tisSimulated: false,\\n\\n\\tpreventDefault: function() {\\n\\t\\tvar e = this.originalEvent;\\n\\n\\t\\tthis.isDefaultPrevented = returnTrue;\\n\\n\\t\\tif ( e && !this.isSimulated ) {\\n\\t\\t\\te.preventDefault();\\n\\t\\t}\\n\\t},\\n\\tstopPropagation: function() {\\n\\t\\tvar e = this.originalEvent;\\n\\n\\t\\tthis.isPropagationStopped = returnTrue;\\n\\n\\t\\tif ( e && !this.isSimulated ) {\\n\\t\\t\\te.stopPropagation();\\n\\t\\t}\\n\\t},\\n\\tstopImmediatePropagation: function() {\\n\\t\\tvar e = this.originalEvent;\\n\\n\\t\\tthis.isImmediatePropagationStopped = returnTrue;\\n\\n\\t\\tif ( e && !this.isSimulated ) {\\n\\t\\t\\te.stopImmediatePropagation();\\n\\t\\t}\\n\\n\\t\\tthis.stopPropagation();\\n\\t}\\n};\\n\\n// Includes all common event props including KeyEvent and MouseEvent specific props\\njQuery.each( {\\n\\taltKey: true,\\n\\tbubbles: true,\\n\\tcancelable: true,\\n\\tchangedTouches: true,\\n\\tctrlKey: true,\\n\\tdetail: true,\\n\\teventPhase: true,\\n\\tmetaKey: true,\\n\\tpageX: true,\\n\\tpageY: true,\\n\\tshiftKey: true,\\n\\tview: true,\\n\\t\\\"char\\\": true,\\n\\tcharCode: true,\\n\\tkey: true,\\n\\tkeyCode: true,\\n\\tbutton: true,\\n\\tbuttons: true,\\n\\tclientX: true,\\n\\tclientY: true,\\n\\toffsetX: true,\\n\\toffsetY: true,\\n\\tpointerId: true,\\n\\tpointerType: true,\\n\\tscreenX: true,\\n\\tscreenY: true,\\n\\ttargetTouches: true,\\n\\ttoElement: true,\\n\\ttouches: true,\\n\\n\\twhich: function( event ) {\\n\\t\\tvar button = event.button;\\n\\n\\t\\t// Add which for key events\\n\\t\\tif ( event.which == null && rkeyEvent.test( event.type ) ) {\\n\\t\\t\\treturn event.charCode != null ? event.charCode : event.keyCode;\\n\\t\\t}\\n\\n\\t\\t// Add which for click: 1 === left; 2 === middle; 3 === right\\n\\t\\tif ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {\\n\\t\\t\\tif ( button & 1 ) {\\n\\t\\t\\t\\treturn 1;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( button & 2 ) {\\n\\t\\t\\t\\treturn 3;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( button & 4 ) {\\n\\t\\t\\t\\treturn 2;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn 0;\\n\\t\\t}\\n\\n\\t\\treturn event.which;\\n\\t}\\n}, jQuery.event.addProp );\\n\\n// Create mouseenter/leave events using mouseover/out and event-time checks\\n// so that event delegation works in jQuery.\\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\\n//\\n// Support: Safari 7 only\\n// Safari sends mouseenter too often; see:\\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\\n// for the description of the bug (it existed in older Chrome versions as well).\\njQuery.each( {\\n\\tmouseenter: \\\"mouseover\\\",\\n\\tmouseleave: \\\"mouseout\\\",\\n\\tpointerenter: \\\"pointerover\\\",\\n\\tpointerleave: \\\"pointerout\\\"\\n}, function( orig, fix ) {\\n\\tjQuery.event.special[ orig ] = {\\n\\t\\tdelegateType: fix,\\n\\t\\tbindType: fix,\\n\\n\\t\\thandle: function( event ) {\\n\\t\\t\\tvar ret,\\n\\t\\t\\t\\ttarget = this,\\n\\t\\t\\t\\trelated = event.relatedTarget,\\n\\t\\t\\t\\thandleObj = event.handleObj;\\n\\n\\t\\t\\t// For mouseenter/leave call the handler if related is outside the target.\\n\\t\\t\\t// NB: No relatedTarget if the mouse left/entered the browser window\\n\\t\\t\\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\\n\\t\\t\\t\\tevent.type = handleObj.origType;\\n\\t\\t\\t\\tret = handleObj.handler.apply( this, arguments );\\n\\t\\t\\t\\tevent.type = fix;\\n\\t\\t\\t}\\n\\t\\t\\treturn ret;\\n\\t\\t}\\n\\t};\\n} );\\n\\njQuery.fn.extend( {\\n\\n\\ton: function( types, selector, data, fn ) {\\n\\t\\treturn on( this, types, selector, data, fn );\\n\\t},\\n\\tone: function( types, selector, data, fn ) {\\n\\t\\treturn on( this, types, selector, data, fn, 1 );\\n\\t},\\n\\toff: function( types, selector, fn ) {\\n\\t\\tvar handleObj, type;\\n\\t\\tif ( types && types.preventDefault && types.handleObj ) {\\n\\n\\t\\t\\t// ( event ) dispatched jQuery.Event\\n\\t\\t\\thandleObj = types.handleObj;\\n\\t\\t\\tjQuery( types.delegateTarget ).off(\\n\\t\\t\\t\\thandleObj.namespace ?\\n\\t\\t\\t\\t\\thandleObj.origType + \\\".\\\" + handleObj.namespace :\\n\\t\\t\\t\\t\\thandleObj.origType,\\n\\t\\t\\t\\thandleObj.selector,\\n\\t\\t\\t\\thandleObj.handler\\n\\t\\t\\t);\\n\\t\\t\\treturn this;\\n\\t\\t}\\n\\t\\tif ( typeof types === \\\"object\\\" ) {\\n\\n\\t\\t\\t// ( types-object [, selector] )\\n\\t\\t\\tfor ( type in types ) {\\n\\t\\t\\t\\tthis.off( type, selector, types[ type ] );\\n\\t\\t\\t}\\n\\t\\t\\treturn this;\\n\\t\\t}\\n\\t\\tif ( selector === false || typeof selector === \\\"function\\\" ) {\\n\\n\\t\\t\\t// ( types [, fn] )\\n\\t\\t\\tfn = selector;\\n\\t\\t\\tselector = undefined;\\n\\t\\t}\\n\\t\\tif ( fn === false ) {\\n\\t\\t\\tfn = returnFalse;\\n\\t\\t}\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tjQuery.event.remove( this, types, fn, selector );\\n\\t\\t} );\\n\\t}\\n} );\\n\\n\\nvar\\n\\n\\t/* eslint-disable max-len */\\n\\n\\t// See https://github.com/eslint/eslint/issues/3229\\n\\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\\\\/\\\\0>\\\\x20\\\\t\\\\r\\\\n\\\\f]*)[^>]*)\\\\/>/gi,\\n\\n\\t/* eslint-enable */\\n\\n\\t// Support: IE <=10 - 11, Edge 12 - 13\\n\\t// In IE/Edge using regex groups here causes severe slowdowns.\\n\\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\\n\\trnoInnerhtml = /<script|<style|<link/i,\\n\\n\\t// checked=\\\"checked\\\" or checked\\n\\trchecked = /checked\\\\s*(?:[^=]|=\\\\s*.checked.)/i,\\n\\trscriptTypeMasked = /^true\\\\/(.*)/,\\n\\trcleanScript = /^\\\\s*<!(?:\\\\[CDATA\\\\[|--)|(?:\\\\]\\\\]|--)>\\\\s*$/g;\\n\\nfunction manipulationTarget( elem, content ) {\\n\\tif ( jQuery.nodeName( elem, \\\"table\\\" ) &&\\n\\t\\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \\\"tr\\\" ) ) {\\n\\n\\t\\treturn elem.getElementsByTagName( \\\"tbody\\\" )[ 0 ] || elem;\\n\\t}\\n\\n\\treturn elem;\\n}\\n\\n// Replace/restore the type attribute of script elements for safe DOM manipulation\\nfunction disableScript( elem ) {\\n\\telem.type = ( elem.getAttribute( \\\"type\\\" ) !== null ) + \\\"/\\\" + elem.type;\\n\\treturn elem;\\n}\\nfunction restoreScript( elem ) {\\n\\tvar match = rscriptTypeMasked.exec( elem.type );\\n\\n\\tif ( match ) {\\n\\t\\telem.type = match[ 1 ];\\n\\t} else {\\n\\t\\telem.removeAttribute( \\\"type\\\" );\\n\\t}\\n\\n\\treturn elem;\\n}\\n\\nfunction cloneCopyEvent( src, dest ) {\\n\\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\\n\\n\\tif ( dest.nodeType !== 1 ) {\\n\\t\\treturn;\\n\\t}\\n\\n\\t// 1. Copy private data: events, handlers, etc.\\n\\tif ( dataPriv.hasData( src ) ) {\\n\\t\\tpdataOld = dataPriv.access( src );\\n\\t\\tpdataCur = dataPriv.set( dest, pdataOld );\\n\\t\\tevents = pdataOld.events;\\n\\n\\t\\tif ( events ) {\\n\\t\\t\\tdelete pdataCur.handle;\\n\\t\\t\\tpdataCur.events = {};\\n\\n\\t\\t\\tfor ( type in events ) {\\n\\t\\t\\t\\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\\n\\t\\t\\t\\t\\tjQuery.event.add( dest, type, events[ type ][ i ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// 2. Copy user data\\n\\tif ( dataUser.hasData( src ) ) {\\n\\t\\tudataOld = dataUser.access( src );\\n\\t\\tudataCur = jQuery.extend( {}, udataOld );\\n\\n\\t\\tdataUser.set( dest, udataCur );\\n\\t}\\n}\\n\\n// Fix IE bugs, see support tests\\nfunction fixInput( src, dest ) {\\n\\tvar nodeName = dest.nodeName.toLowerCase();\\n\\n\\t// Fails to persist the checked state of a cloned checkbox or radio button.\\n\\tif ( nodeName === \\\"input\\\" && rcheckableType.test( src.type ) ) {\\n\\t\\tdest.checked = src.checked;\\n\\n\\t// Fails to return the selected option to the default selected state when cloning options\\n\\t} else if ( nodeName === \\\"input\\\" || nodeName === \\\"textarea\\\" ) {\\n\\t\\tdest.defaultValue = src.defaultValue;\\n\\t}\\n}\\n\\nfunction domManip( collection, args, callback, ignored ) {\\n\\n\\t// Flatten any nested arrays\\n\\targs = concat.apply( [], args );\\n\\n\\tvar fragment, first, scripts, hasScripts, node, doc,\\n\\t\\ti = 0,\\n\\t\\tl = collection.length,\\n\\t\\tiNoClone = l - 1,\\n\\t\\tvalue = args[ 0 ],\\n\\t\\tisFunction = jQuery.isFunction( value );\\n\\n\\t// We can't cloneNode fragments that contain checked, in WebKit\\n\\tif ( isFunction ||\\n\\t\\t\\t( l > 1 && typeof value === \\\"string\\\" &&\\n\\t\\t\\t\\t!support.checkClone && rchecked.test( value ) ) ) {\\n\\t\\treturn collection.each( function( index ) {\\n\\t\\t\\tvar self = collection.eq( index );\\n\\t\\t\\tif ( isFunction ) {\\n\\t\\t\\t\\targs[ 0 ] = value.call( this, index, self.html() );\\n\\t\\t\\t}\\n\\t\\t\\tdomManip( self, args, callback, ignored );\\n\\t\\t} );\\n\\t}\\n\\n\\tif ( l ) {\\n\\t\\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\\n\\t\\tfirst = fragment.firstChild;\\n\\n\\t\\tif ( fragment.childNodes.length === 1 ) {\\n\\t\\t\\tfragment = first;\\n\\t\\t}\\n\\n\\t\\t// Require either new content or an interest in ignored elements to invoke the callback\\n\\t\\tif ( first || ignored ) {\\n\\t\\t\\tscripts = jQuery.map( getAll( fragment, \\\"script\\\" ), disableScript );\\n\\t\\t\\thasScripts = scripts.length;\\n\\n\\t\\t\\t// Use the original fragment for the last item\\n\\t\\t\\t// instead of the first because it can end up\\n\\t\\t\\t// being emptied incorrectly in certain situations (#8070).\\n\\t\\t\\tfor ( ; i < l; i++ ) {\\n\\t\\t\\t\\tnode = fragment;\\n\\n\\t\\t\\t\\tif ( i !== iNoClone ) {\\n\\t\\t\\t\\t\\tnode = jQuery.clone( node, true, true );\\n\\n\\t\\t\\t\\t\\t// Keep references to cloned scripts for later restoration\\n\\t\\t\\t\\t\\tif ( hasScripts ) {\\n\\n\\t\\t\\t\\t\\t\\t// Support: Android <=4.0 only, PhantomJS 1 only\\n\\t\\t\\t\\t\\t\\t// push.apply(_, arraylike) throws on ancient WebKit\\n\\t\\t\\t\\t\\t\\tjQuery.merge( scripts, getAll( node, \\\"script\\\" ) );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tcallback.call( collection[ i ], node, i );\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( hasScripts ) {\\n\\t\\t\\t\\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\\n\\n\\t\\t\\t\\t// Reenable scripts\\n\\t\\t\\t\\tjQuery.map( scripts, restoreScript );\\n\\n\\t\\t\\t\\t// Evaluate executable scripts on first document insertion\\n\\t\\t\\t\\tfor ( i = 0; i < hasScripts; i++ ) {\\n\\t\\t\\t\\t\\tnode = scripts[ i ];\\n\\t\\t\\t\\t\\tif ( rscriptType.test( node.type || \\\"\\\" ) &&\\n\\t\\t\\t\\t\\t\\t!dataPriv.access( node, \\\"globalEval\\\" ) &&\\n\\t\\t\\t\\t\\t\\tjQuery.contains( doc, node ) ) {\\n\\n\\t\\t\\t\\t\\t\\tif ( node.src ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Optional AJAX dependency, but won't run scripts if not present\\n\\t\\t\\t\\t\\t\\t\\tif ( jQuery._evalUrl ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery._evalUrl( node.src );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\tDOMEval( node.textContent.replace( rcleanScript, \\\"\\\" ), doc );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn collection;\\n}\\n\\nfunction remove( elem, selector, keepData ) {\\n\\tvar node,\\n\\t\\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\\n\\t\\ti = 0;\\n\\n\\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\\n\\t\\tif ( !keepData && node.nodeType === 1 ) {\\n\\t\\t\\tjQuery.cleanData( getAll( node ) );\\n\\t\\t}\\n\\n\\t\\tif ( node.parentNode ) {\\n\\t\\t\\tif ( keepData && jQuery.contains( node.ownerDocument, node ) ) {\\n\\t\\t\\t\\tsetGlobalEval( getAll( node, \\\"script\\\" ) );\\n\\t\\t\\t}\\n\\t\\t\\tnode.parentNode.removeChild( node );\\n\\t\\t}\\n\\t}\\n\\n\\treturn elem;\\n}\\n\\njQuery.extend( {\\n\\thtmlPrefilter: function( html ) {\\n\\t\\treturn html.replace( rxhtmlTag, \\\"<$1></$2>\\\" );\\n\\t},\\n\\n\\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\\n\\t\\tvar i, l, srcElements, destElements,\\n\\t\\t\\tclone = elem.cloneNode( true ),\\n\\t\\t\\tinPage = jQuery.contains( elem.ownerDocument, elem );\\n\\n\\t\\t// Fix IE cloning issues\\n\\t\\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\\n\\t\\t\\t\\t!jQuery.isXMLDoc( elem ) ) {\\n\\n\\t\\t\\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\\n\\t\\t\\tdestElements = getAll( clone );\\n\\t\\t\\tsrcElements = getAll( elem );\\n\\n\\t\\t\\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\\n\\t\\t\\t\\tfixInput( srcElements[ i ], destElements[ i ] );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Copy the events from the original to the clone\\n\\t\\tif ( dataAndEvents ) {\\n\\t\\t\\tif ( deepDataAndEvents ) {\\n\\t\\t\\t\\tsrcElements = srcElements || getAll( elem );\\n\\t\\t\\t\\tdestElements = destElements || getAll( clone );\\n\\n\\t\\t\\t\\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\\n\\t\\t\\t\\t\\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tcloneCopyEvent( elem, clone );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Preserve script evaluation history\\n\\t\\tdestElements = getAll( clone, \\\"script\\\" );\\n\\t\\tif ( destElements.length > 0 ) {\\n\\t\\t\\tsetGlobalEval( destElements, !inPage && getAll( elem, \\\"script\\\" ) );\\n\\t\\t}\\n\\n\\t\\t// Return the cloned set\\n\\t\\treturn clone;\\n\\t},\\n\\n\\tcleanData: function( elems ) {\\n\\t\\tvar data, elem, type,\\n\\t\\t\\tspecial = jQuery.event.special,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\\n\\t\\t\\tif ( acceptData( elem ) ) {\\n\\t\\t\\t\\tif ( ( data = elem[ dataPriv.expando ] ) ) {\\n\\t\\t\\t\\t\\tif ( data.events ) {\\n\\t\\t\\t\\t\\t\\tfor ( type in data.events ) {\\n\\t\\t\\t\\t\\t\\t\\tif ( special[ type ] ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.event.remove( elem, type );\\n\\n\\t\\t\\t\\t\\t\\t\\t// This is a shortcut to avoid jQuery.event.remove's overhead\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\tjQuery.removeEvent( elem, type, data.handle );\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Support: Chrome <=35 - 45+\\n\\t\\t\\t\\t\\t// Assign undefined instead of using delete, see Data#remove\\n\\t\\t\\t\\t\\telem[ dataPriv.expando ] = undefined;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif ( elem[ dataUser.expando ] ) {\\n\\n\\t\\t\\t\\t\\t// Support: Chrome <=35 - 45+\\n\\t\\t\\t\\t\\t// Assign undefined instead of using delete, see Data#remove\\n\\t\\t\\t\\t\\telem[ dataUser.expando ] = undefined;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n} );\\n\\njQuery.fn.extend( {\\n\\tdetach: function( selector ) {\\n\\t\\treturn remove( this, selector, true );\\n\\t},\\n\\n\\tremove: function( selector ) {\\n\\t\\treturn remove( this, selector );\\n\\t},\\n\\n\\ttext: function( value ) {\\n\\t\\treturn access( this, function( value ) {\\n\\t\\t\\treturn value === undefined ?\\n\\t\\t\\t\\tjQuery.text( this ) :\\n\\t\\t\\t\\tthis.empty().each( function() {\\n\\t\\t\\t\\t\\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\\n\\t\\t\\t\\t\\t\\tthis.textContent = value;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} );\\n\\t\\t}, null, value, arguments.length );\\n\\t},\\n\\n\\tappend: function() {\\n\\t\\treturn domManip( this, arguments, function( elem ) {\\n\\t\\t\\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\\n\\t\\t\\t\\tvar target = manipulationTarget( this, elem );\\n\\t\\t\\t\\ttarget.appendChild( elem );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tprepend: function() {\\n\\t\\treturn domManip( this, arguments, function( elem ) {\\n\\t\\t\\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\\n\\t\\t\\t\\tvar target = manipulationTarget( this, elem );\\n\\t\\t\\t\\ttarget.insertBefore( elem, target.firstChild );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tbefore: function() {\\n\\t\\treturn domManip( this, arguments, function( elem ) {\\n\\t\\t\\tif ( this.parentNode ) {\\n\\t\\t\\t\\tthis.parentNode.insertBefore( elem, this );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tafter: function() {\\n\\t\\treturn domManip( this, arguments, function( elem ) {\\n\\t\\t\\tif ( this.parentNode ) {\\n\\t\\t\\t\\tthis.parentNode.insertBefore( elem, this.nextSibling );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\tempty: function() {\\n\\t\\tvar elem,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\\n\\t\\t\\tif ( elem.nodeType === 1 ) {\\n\\n\\t\\t\\t\\t// Prevent memory leaks\\n\\t\\t\\t\\tjQuery.cleanData( getAll( elem, false ) );\\n\\n\\t\\t\\t\\t// Remove any remaining nodes\\n\\t\\t\\t\\telem.textContent = \\\"\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\tclone: function( dataAndEvents, deepDataAndEvents ) {\\n\\t\\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\\n\\t\\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\\n\\n\\t\\treturn this.map( function() {\\n\\t\\t\\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\\n\\t\\t} );\\n\\t},\\n\\n\\thtml: function( value ) {\\n\\t\\treturn access( this, function( value ) {\\n\\t\\t\\tvar elem = this[ 0 ] || {},\\n\\t\\t\\t\\ti = 0,\\n\\t\\t\\t\\tl = this.length;\\n\\n\\t\\t\\tif ( value === undefined && elem.nodeType === 1 ) {\\n\\t\\t\\t\\treturn elem.innerHTML;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// See if we can take a shortcut and just use innerHTML\\n\\t\\t\\tif ( typeof value === \\\"string\\\" && !rnoInnerhtml.test( value ) &&\\n\\t\\t\\t\\t!wrapMap[ ( rtagName.exec( value ) || [ \\\"\\\", \\\"\\\" ] )[ 1 ].toLowerCase() ] ) {\\n\\n\\t\\t\\t\\tvalue = jQuery.htmlPrefilter( value );\\n\\n\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\tfor ( ; i < l; i++ ) {\\n\\t\\t\\t\\t\\t\\telem = this[ i ] || {};\\n\\n\\t\\t\\t\\t\\t\\t// Remove element nodes and prevent memory leaks\\n\\t\\t\\t\\t\\t\\tif ( elem.nodeType === 1 ) {\\n\\t\\t\\t\\t\\t\\t\\tjQuery.cleanData( getAll( elem, false ) );\\n\\t\\t\\t\\t\\t\\t\\telem.innerHTML = value;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\telem = 0;\\n\\n\\t\\t\\t\\t// If using innerHTML throws an exception, use the fallback method\\n\\t\\t\\t\\t} catch ( e ) {}\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( elem ) {\\n\\t\\t\\t\\tthis.empty().append( value );\\n\\t\\t\\t}\\n\\t\\t}, null, value, arguments.length );\\n\\t},\\n\\n\\treplaceWith: function() {\\n\\t\\tvar ignored = [];\\n\\n\\t\\t// Make the changes, replacing each non-ignored context element with the new content\\n\\t\\treturn domManip( this, arguments, function( elem ) {\\n\\t\\t\\tvar parent = this.parentNode;\\n\\n\\t\\t\\tif ( jQuery.inArray( this, ignored ) < 0 ) {\\n\\t\\t\\t\\tjQuery.cleanData( getAll( this ) );\\n\\t\\t\\t\\tif ( parent ) {\\n\\t\\t\\t\\t\\tparent.replaceChild( elem, this );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t// Force callback invocation\\n\\t\\t}, ignored );\\n\\t}\\n} );\\n\\njQuery.each( {\\n\\tappendTo: \\\"append\\\",\\n\\tprependTo: \\\"prepend\\\",\\n\\tinsertBefore: \\\"before\\\",\\n\\tinsertAfter: \\\"after\\\",\\n\\treplaceAll: \\\"replaceWith\\\"\\n}, function( name, original ) {\\n\\tjQuery.fn[ name ] = function( selector ) {\\n\\t\\tvar elems,\\n\\t\\t\\tret = [],\\n\\t\\t\\tinsert = jQuery( selector ),\\n\\t\\t\\tlast = insert.length - 1,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tfor ( ; i <= last; i++ ) {\\n\\t\\t\\telems = i === last ? this : this.clone( true );\\n\\t\\t\\tjQuery( insert[ i ] )[ original ]( elems );\\n\\n\\t\\t\\t// Support: Android <=4.0 only, PhantomJS 1 only\\n\\t\\t\\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\\n\\t\\t\\tpush.apply( ret, elems.get() );\\n\\t\\t}\\n\\n\\t\\treturn this.pushStack( ret );\\n\\t};\\n} );\\nvar rmargin = ( /^margin/ );\\n\\nvar rnumnonpx = new RegExp( \\\"^(\\\" + pnum + \\\")(?!px)[a-z%]+$\\\", \\\"i\\\" );\\n\\nvar getStyles = function( elem ) {\\n\\n\\t\\t// Support: IE <=11 only, Firefox <=30 (#15098, #14150)\\n\\t\\t// IE throws on elements created in popups\\n\\t\\t// FF meanwhile throws on frame elements through \\\"defaultView.getComputedStyle\\\"\\n\\t\\tvar view = elem.ownerDocument.defaultView;\\n\\n\\t\\tif ( !view || !view.opener ) {\\n\\t\\t\\tview = window;\\n\\t\\t}\\n\\n\\t\\treturn view.getComputedStyle( elem );\\n\\t};\\n\\n\\n\\n( function() {\\n\\n\\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\\n\\t// so they're executed at the same time to save the second computation.\\n\\tfunction computeStyleTests() {\\n\\n\\t\\t// This is a singleton, we need to execute it only once\\n\\t\\tif ( !div ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tdiv.style.cssText =\\n\\t\\t\\t\\\"box-sizing:border-box;\\\" +\\n\\t\\t\\t\\\"position:relative;display:block;\\\" +\\n\\t\\t\\t\\\"margin:auto;border:1px;padding:1px;\\\" +\\n\\t\\t\\t\\\"top:1%;width:50%\\\";\\n\\t\\tdiv.innerHTML = \\\"\\\";\\n\\t\\tdocumentElement.appendChild( container );\\n\\n\\t\\tvar divStyle = window.getComputedStyle( div );\\n\\t\\tpixelPositionVal = divStyle.top !== \\\"1%\\\";\\n\\n\\t\\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\\n\\t\\treliableMarginLeftVal = divStyle.marginLeft === \\\"2px\\\";\\n\\t\\tboxSizingReliableVal = divStyle.width === \\\"4px\\\";\\n\\n\\t\\t// Support: Android 4.0 - 4.3 only\\n\\t\\t// Some styles come back with percentage values, even though they shouldn't\\n\\t\\tdiv.style.marginRight = \\\"50%\\\";\\n\\t\\tpixelMarginRightVal = divStyle.marginRight === \\\"4px\\\";\\n\\n\\t\\tdocumentElement.removeChild( container );\\n\\n\\t\\t// Nullify the div so it wouldn't be stored in the memory and\\n\\t\\t// it will also be a sign that checks already performed\\n\\t\\tdiv = null;\\n\\t}\\n\\n\\tvar pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,\\n\\t\\tcontainer = document.createElement( \\\"div\\\" ),\\n\\t\\tdiv = document.createElement( \\\"div\\\" );\\n\\n\\t// Finish early in limited (non-browser) environments\\n\\tif ( !div.style ) {\\n\\t\\treturn;\\n\\t}\\n\\n\\t// Support: IE <=9 - 11 only\\n\\t// Style of cloned element affects source element cloned (#8908)\\n\\tdiv.style.backgroundClip = \\\"content-box\\\";\\n\\tdiv.cloneNode( true ).style.backgroundClip = \\\"\\\";\\n\\tsupport.clearCloneStyle = div.style.backgroundClip === \\\"content-box\\\";\\n\\n\\tcontainer.style.cssText = \\\"border:0;width:8px;height:0;top:0;left:-9999px;\\\" +\\n\\t\\t\\\"padding:0;margin-top:1px;position:absolute\\\";\\n\\tcontainer.appendChild( div );\\n\\n\\tjQuery.extend( support, {\\n\\t\\tpixelPosition: function() {\\n\\t\\t\\tcomputeStyleTests();\\n\\t\\t\\treturn pixelPositionVal;\\n\\t\\t},\\n\\t\\tboxSizingReliable: function() {\\n\\t\\t\\tcomputeStyleTests();\\n\\t\\t\\treturn boxSizingReliableVal;\\n\\t\\t},\\n\\t\\tpixelMarginRight: function() {\\n\\t\\t\\tcomputeStyleTests();\\n\\t\\t\\treturn pixelMarginRightVal;\\n\\t\\t},\\n\\t\\treliableMarginLeft: function() {\\n\\t\\t\\tcomputeStyleTests();\\n\\t\\t\\treturn reliableMarginLeftVal;\\n\\t\\t}\\n\\t} );\\n} )();\\n\\n\\nfunction curCSS( elem, name, computed ) {\\n\\tvar width, minWidth, maxWidth, ret,\\n\\t\\tstyle = elem.style;\\n\\n\\tcomputed = computed || getStyles( elem );\\n\\n\\t// Support: IE <=9 only\\n\\t// getPropertyValue is only needed for .css('filter') (#12537)\\n\\tif ( computed ) {\\n\\t\\tret = computed.getPropertyValue( name ) || computed[ name ];\\n\\n\\t\\tif ( ret === \\\"\\\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\\n\\t\\t\\tret = jQuery.style( elem, name );\\n\\t\\t}\\n\\n\\t\\t// A tribute to the \\\"awesome hack by Dean Edwards\\\"\\n\\t\\t// Android Browser returns percentage for some values,\\n\\t\\t// but width seems to be reliably pixels.\\n\\t\\t// This is against the CSSOM draft spec:\\n\\t\\t// https://drafts.csswg.org/cssom/#resolved-values\\n\\t\\tif ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {\\n\\n\\t\\t\\t// Remember the original values\\n\\t\\t\\twidth = style.width;\\n\\t\\t\\tminWidth = style.minWidth;\\n\\t\\t\\tmaxWidth = style.maxWidth;\\n\\n\\t\\t\\t// Put in the new values to get a computed value out\\n\\t\\t\\tstyle.minWidth = style.maxWidth = style.width = ret;\\n\\t\\t\\tret = computed.width;\\n\\n\\t\\t\\t// Revert the changed values\\n\\t\\t\\tstyle.width = width;\\n\\t\\t\\tstyle.minWidth = minWidth;\\n\\t\\t\\tstyle.maxWidth = maxWidth;\\n\\t\\t}\\n\\t}\\n\\n\\treturn ret !== undefined ?\\n\\n\\t\\t// Support: IE <=9 - 11 only\\n\\t\\t// IE returns zIndex value as an integer.\\n\\t\\tret + \\\"\\\" :\\n\\t\\tret;\\n}\\n\\n\\nfunction addGetHookIf( conditionFn, hookFn ) {\\n\\n\\t// Define the hook, we'll check on the first run if it's really needed.\\n\\treturn {\\n\\t\\tget: function() {\\n\\t\\t\\tif ( conditionFn() ) {\\n\\n\\t\\t\\t\\t// Hook not needed (or it's not possible to use it due\\n\\t\\t\\t\\t// to missing dependency), remove it.\\n\\t\\t\\t\\tdelete this.get;\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Hook needed; redefine it so that the support test is not executed again.\\n\\t\\t\\treturn ( this.get = hookFn ).apply( this, arguments );\\n\\t\\t}\\n\\t};\\n}\\n\\n\\nvar\\n\\n\\t// Swappable if display is none or starts with table\\n\\t// except \\\"table\\\", \\\"table-cell\\\", or \\\"table-caption\\\"\\n\\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\\n\\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\\n\\tcssShow = { position: \\\"absolute\\\", visibility: \\\"hidden\\\", display: \\\"block\\\" },\\n\\tcssNormalTransform = {\\n\\t\\tletterSpacing: \\\"0\\\",\\n\\t\\tfontWeight: \\\"400\\\"\\n\\t},\\n\\n\\tcssPrefixes = [ \\\"Webkit\\\", \\\"Moz\\\", \\\"ms\\\" ],\\n\\temptyStyle = document.createElement( \\\"div\\\" ).style;\\n\\n// Return a css property mapped to a potentially vendor prefixed property\\nfunction vendorPropName( name ) {\\n\\n\\t// Shortcut for names that are not vendor prefixed\\n\\tif ( name in emptyStyle ) {\\n\\t\\treturn name;\\n\\t}\\n\\n\\t// Check for vendor prefixed names\\n\\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\\n\\t\\ti = cssPrefixes.length;\\n\\n\\twhile ( i-- ) {\\n\\t\\tname = cssPrefixes[ i ] + capName;\\n\\t\\tif ( name in emptyStyle ) {\\n\\t\\t\\treturn name;\\n\\t\\t}\\n\\t}\\n}\\n\\nfunction setPositiveNumber( elem, value, subtract ) {\\n\\n\\t// Any relative (+/-) values have already been\\n\\t// normalized at this point\\n\\tvar matches = rcssNum.exec( value );\\n\\treturn matches ?\\n\\n\\t\\t// Guard against undefined \\\"subtract\\\", e.g., when used as in cssHooks\\n\\t\\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \\\"px\\\" ) :\\n\\t\\tvalue;\\n}\\n\\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\\n\\tvar i,\\n\\t\\tval = 0;\\n\\n\\t// If we already have the right measurement, avoid augmentation\\n\\tif ( extra === ( isBorderBox ? \\\"border\\\" : \\\"content\\\" ) ) {\\n\\t\\ti = 4;\\n\\n\\t// Otherwise initialize for horizontal or vertical properties\\n\\t} else {\\n\\t\\ti = name === \\\"width\\\" ? 1 : 0;\\n\\t}\\n\\n\\tfor ( ; i < 4; i += 2 ) {\\n\\n\\t\\t// Both box models exclude margin, so add it if we want it\\n\\t\\tif ( extra === \\\"margin\\\" ) {\\n\\t\\t\\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\\n\\t\\t}\\n\\n\\t\\tif ( isBorderBox ) {\\n\\n\\t\\t\\t// border-box includes padding, so remove it if we want content\\n\\t\\t\\tif ( extra === \\\"content\\\" ) {\\n\\t\\t\\t\\tval -= jQuery.css( elem, \\\"padding\\\" + cssExpand[ i ], true, styles );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// At this point, extra isn't border nor margin, so remove border\\n\\t\\t\\tif ( extra !== \\\"margin\\\" ) {\\n\\t\\t\\t\\tval -= jQuery.css( elem, \\\"border\\\" + cssExpand[ i ] + \\\"Width\\\", true, styles );\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\n\\t\\t\\t// At this point, extra isn't content, so add padding\\n\\t\\t\\tval += jQuery.css( elem, \\\"padding\\\" + cssExpand[ i ], true, styles );\\n\\n\\t\\t\\t// At this point, extra isn't content nor padding, so add border\\n\\t\\t\\tif ( extra !== \\\"padding\\\" ) {\\n\\t\\t\\t\\tval += jQuery.css( elem, \\\"border\\\" + cssExpand[ i ] + \\\"Width\\\", true, styles );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn val;\\n}\\n\\nfunction getWidthOrHeight( elem, name, extra ) {\\n\\n\\t// Start with offset property, which is equivalent to the border-box value\\n\\tvar val,\\n\\t\\tvalueIsBorderBox = true,\\n\\t\\tstyles = getStyles( elem ),\\n\\t\\tisBorderBox = jQuery.css( elem, \\\"boxSizing\\\", false, styles ) === \\\"border-box\\\";\\n\\n\\t// Support: IE <=11 only\\n\\t// Running getBoundingClientRect on a disconnected node\\n\\t// in IE throws an error.\\n\\tif ( elem.getClientRects().length ) {\\n\\t\\tval = elem.getBoundingClientRect()[ name ];\\n\\t}\\n\\n\\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\\n\\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\\n\\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\\n\\tif ( val <= 0 || val == null ) {\\n\\n\\t\\t// Fall back to computed then uncomputed css if necessary\\n\\t\\tval = curCSS( elem, name, styles );\\n\\t\\tif ( val < 0 || val == null ) {\\n\\t\\t\\tval = elem.style[ name ];\\n\\t\\t}\\n\\n\\t\\t// Computed unit is not pixels. Stop here and return.\\n\\t\\tif ( rnumnonpx.test( val ) ) {\\n\\t\\t\\treturn val;\\n\\t\\t}\\n\\n\\t\\t// Check for style in case a browser which returns unreliable values\\n\\t\\t// for getComputedStyle silently falls back to the reliable elem.style\\n\\t\\tvalueIsBorderBox = isBorderBox &&\\n\\t\\t\\t( support.boxSizingReliable() || val === elem.style[ name ] );\\n\\n\\t\\t// Normalize \\\"\\\", auto, and prepare for extra\\n\\t\\tval = parseFloat( val ) || 0;\\n\\t}\\n\\n\\t// Use the active box-sizing model to add/subtract irrelevant styles\\n\\treturn ( val +\\n\\t\\taugmentWidthOrHeight(\\n\\t\\t\\telem,\\n\\t\\t\\tname,\\n\\t\\t\\textra || ( isBorderBox ? \\\"border\\\" : \\\"content\\\" ),\\n\\t\\t\\tvalueIsBorderBox,\\n\\t\\t\\tstyles\\n\\t\\t)\\n\\t) + \\\"px\\\";\\n}\\n\\njQuery.extend( {\\n\\n\\t// Add in style property hooks for overriding the default\\n\\t// behavior of getting and setting a style property\\n\\tcssHooks: {\\n\\t\\topacity: {\\n\\t\\t\\tget: function( elem, computed ) {\\n\\t\\t\\t\\tif ( computed ) {\\n\\n\\t\\t\\t\\t\\t// We should always get a number back from opacity\\n\\t\\t\\t\\t\\tvar ret = curCSS( elem, \\\"opacity\\\" );\\n\\t\\t\\t\\t\\treturn ret === \\\"\\\" ? \\\"1\\\" : ret;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\n\\t// Don't automatically add \\\"px\\\" to these possibly-unitless properties\\n\\tcssNumber: {\\n\\t\\t\\\"animationIterationCount\\\": true,\\n\\t\\t\\\"columnCount\\\": true,\\n\\t\\t\\\"fillOpacity\\\": true,\\n\\t\\t\\\"flexGrow\\\": true,\\n\\t\\t\\\"flexShrink\\\": true,\\n\\t\\t\\\"fontWeight\\\": true,\\n\\t\\t\\\"lineHeight\\\": true,\\n\\t\\t\\\"opacity\\\": true,\\n\\t\\t\\\"order\\\": true,\\n\\t\\t\\\"orphans\\\": true,\\n\\t\\t\\\"widows\\\": true,\\n\\t\\t\\\"zIndex\\\": true,\\n\\t\\t\\\"zoom\\\": true\\n\\t},\\n\\n\\t// Add in properties whose names you wish to fix before\\n\\t// setting or getting the value\\n\\tcssProps: {\\n\\t\\t\\\"float\\\": \\\"cssFloat\\\"\\n\\t},\\n\\n\\t// Get and set the style property on a DOM Node\\n\\tstyle: function( elem, name, value, extra ) {\\n\\n\\t\\t// Don't set styles on text and comment nodes\\n\\t\\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Make sure that we're working with the right name\\n\\t\\tvar ret, type, hooks,\\n\\t\\t\\torigName = jQuery.camelCase( name ),\\n\\t\\t\\tstyle = elem.style;\\n\\n\\t\\tname = jQuery.cssProps[ origName ] ||\\n\\t\\t\\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\\n\\n\\t\\t// Gets hook for the prefixed version, then unprefixed version\\n\\t\\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\\n\\n\\t\\t// Check if we're setting a value\\n\\t\\tif ( value !== undefined ) {\\n\\t\\t\\ttype = typeof value;\\n\\n\\t\\t\\t// Convert \\\"+=\\\" or \\\"-=\\\" to relative numbers (#7345)\\n\\t\\t\\tif ( type === \\\"string\\\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\\n\\t\\t\\t\\tvalue = adjustCSS( elem, name, ret );\\n\\n\\t\\t\\t\\t// Fixes bug #9237\\n\\t\\t\\t\\ttype = \\\"number\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Make sure that null and NaN values aren't set (#7116)\\n\\t\\t\\tif ( value == null || value !== value ) {\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// If a number was passed in, add the unit (except for certain CSS properties)\\n\\t\\t\\tif ( type === \\\"number\\\" ) {\\n\\t\\t\\t\\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \\\"\\\" : \\\"px\\\" );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// background-* props affect original clone's values\\n\\t\\t\\tif ( !support.clearCloneStyle && value === \\\"\\\" && name.indexOf( \\\"background\\\" ) === 0 ) {\\n\\t\\t\\t\\tstyle[ name ] = \\\"inherit\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t// If a hook was provided, use that value, otherwise just set the specified value\\n\\t\\t\\tif ( !hooks || !( \\\"set\\\" in hooks ) ||\\n\\t\\t\\t\\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\\n\\n\\t\\t\\t\\tstyle[ name ] = value;\\n\\t\\t\\t}\\n\\n\\t\\t} else {\\n\\n\\t\\t\\t// If a hook was provided get the non-computed value from there\\n\\t\\t\\tif ( hooks && \\\"get\\\" in hooks &&\\n\\t\\t\\t\\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\\n\\n\\t\\t\\t\\treturn ret;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Otherwise just get the value from the style object\\n\\t\\t\\treturn style[ name ];\\n\\t\\t}\\n\\t},\\n\\n\\tcss: function( elem, name, extra, styles ) {\\n\\t\\tvar val, num, hooks,\\n\\t\\t\\torigName = jQuery.camelCase( name );\\n\\n\\t\\t// Make sure that we're working with the right name\\n\\t\\tname = jQuery.cssProps[ origName ] ||\\n\\t\\t\\t( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );\\n\\n\\t\\t// Try prefixed name followed by the unprefixed name\\n\\t\\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\\n\\n\\t\\t// If a hook was provided get the computed value from there\\n\\t\\tif ( hooks && \\\"get\\\" in hooks ) {\\n\\t\\t\\tval = hooks.get( elem, true, extra );\\n\\t\\t}\\n\\n\\t\\t// Otherwise, if a way to get the computed value exists, use that\\n\\t\\tif ( val === undefined ) {\\n\\t\\t\\tval = curCSS( elem, name, styles );\\n\\t\\t}\\n\\n\\t\\t// Convert \\\"normal\\\" to computed value\\n\\t\\tif ( val === \\\"normal\\\" && name in cssNormalTransform ) {\\n\\t\\t\\tval = cssNormalTransform[ name ];\\n\\t\\t}\\n\\n\\t\\t// Make numeric if forced or a qualifier was provided and val looks numeric\\n\\t\\tif ( extra === \\\"\\\" || extra ) {\\n\\t\\t\\tnum = parseFloat( val );\\n\\t\\t\\treturn extra === true || isFinite( num ) ? num || 0 : val;\\n\\t\\t}\\n\\t\\treturn val;\\n\\t}\\n} );\\n\\njQuery.each( [ \\\"height\\\", \\\"width\\\" ], function( i, name ) {\\n\\tjQuery.cssHooks[ name ] = {\\n\\t\\tget: function( elem, computed, extra ) {\\n\\t\\t\\tif ( computed ) {\\n\\n\\t\\t\\t\\t// Certain elements can have dimension info if we invisibly show them\\n\\t\\t\\t\\t// but it must have a current display style that would benefit\\n\\t\\t\\t\\treturn rdisplayswap.test( jQuery.css( elem, \\\"display\\\" ) ) &&\\n\\n\\t\\t\\t\\t\\t// Support: Safari 8+\\n\\t\\t\\t\\t\\t// Table columns in Safari have non-zero offsetWidth & zero\\n\\t\\t\\t\\t\\t// getBoundingClientRect().width unless display is changed.\\n\\t\\t\\t\\t\\t// Support: IE <=11 only\\n\\t\\t\\t\\t\\t// Running getBoundingClientRect on a disconnected node\\n\\t\\t\\t\\t\\t// in IE throws an error.\\n\\t\\t\\t\\t\\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\\n\\t\\t\\t\\t\\t\\tswap( elem, cssShow, function() {\\n\\t\\t\\t\\t\\t\\t\\treturn getWidthOrHeight( elem, name, extra );\\n\\t\\t\\t\\t\\t\\t} ) :\\n\\t\\t\\t\\t\\t\\tgetWidthOrHeight( elem, name, extra );\\n\\t\\t\\t}\\n\\t\\t},\\n\\n\\t\\tset: function( elem, value, extra ) {\\n\\t\\t\\tvar matches,\\n\\t\\t\\t\\tstyles = extra && getStyles( elem ),\\n\\t\\t\\t\\tsubtract = extra && augmentWidthOrHeight(\\n\\t\\t\\t\\t\\telem,\\n\\t\\t\\t\\t\\tname,\\n\\t\\t\\t\\t\\textra,\\n\\t\\t\\t\\t\\tjQuery.css( elem, \\\"boxSizing\\\", false, styles ) === \\\"border-box\\\",\\n\\t\\t\\t\\t\\tstyles\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t// Convert to pixels if value adjustment is needed\\n\\t\\t\\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\\n\\t\\t\\t\\t( matches[ 3 ] || \\\"px\\\" ) !== \\\"px\\\" ) {\\n\\n\\t\\t\\t\\telem.style[ name ] = value;\\n\\t\\t\\t\\tvalue = jQuery.css( elem, name );\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn setPositiveNumber( elem, value, subtract );\\n\\t\\t}\\n\\t};\\n} );\\n\\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\\n\\tfunction( elem, computed ) {\\n\\t\\tif ( computed ) {\\n\\t\\t\\treturn ( parseFloat( curCSS( elem, \\\"marginLeft\\\" ) ) ||\\n\\t\\t\\t\\telem.getBoundingClientRect().left -\\n\\t\\t\\t\\t\\tswap( elem, { marginLeft: 0 }, function() {\\n\\t\\t\\t\\t\\t\\treturn elem.getBoundingClientRect().left;\\n\\t\\t\\t\\t\\t} )\\n\\t\\t\\t\\t) + \\\"px\\\";\\n\\t\\t}\\n\\t}\\n);\\n\\n// These hooks are used by animate to expand properties\\njQuery.each( {\\n\\tmargin: \\\"\\\",\\n\\tpadding: \\\"\\\",\\n\\tborder: \\\"Width\\\"\\n}, function( prefix, suffix ) {\\n\\tjQuery.cssHooks[ prefix + suffix ] = {\\n\\t\\texpand: function( value ) {\\n\\t\\t\\tvar i = 0,\\n\\t\\t\\t\\texpanded = {},\\n\\n\\t\\t\\t\\t// Assumes a single number if not a string\\n\\t\\t\\t\\tparts = typeof value === \\\"string\\\" ? value.split( \\\" \\\" ) : [ value ];\\n\\n\\t\\t\\tfor ( ; i < 4; i++ ) {\\n\\t\\t\\t\\texpanded[ prefix + cssExpand[ i ] + suffix ] =\\n\\t\\t\\t\\t\\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn expanded;\\n\\t\\t}\\n\\t};\\n\\n\\tif ( !rmargin.test( prefix ) ) {\\n\\t\\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\\n\\t}\\n} );\\n\\njQuery.fn.extend( {\\n\\tcss: function( name, value ) {\\n\\t\\treturn access( this, function( elem, name, value ) {\\n\\t\\t\\tvar styles, len,\\n\\t\\t\\t\\tmap = {},\\n\\t\\t\\t\\ti = 0;\\n\\n\\t\\t\\tif ( jQuery.isArray( name ) ) {\\n\\t\\t\\t\\tstyles = getStyles( elem );\\n\\t\\t\\t\\tlen = name.length;\\n\\n\\t\\t\\t\\tfor ( ; i < len; i++ ) {\\n\\t\\t\\t\\t\\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn map;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn value !== undefined ?\\n\\t\\t\\t\\tjQuery.style( elem, name, value ) :\\n\\t\\t\\t\\tjQuery.css( elem, name );\\n\\t\\t}, name, value, arguments.length > 1 );\\n\\t}\\n} );\\n\\n\\nfunction Tween( elem, options, prop, end, easing ) {\\n\\treturn new Tween.prototype.init( elem, options, prop, end, easing );\\n}\\njQuery.Tween = Tween;\\n\\nTween.prototype = {\\n\\tconstructor: Tween,\\n\\tinit: function( elem, options, prop, end, easing, unit ) {\\n\\t\\tthis.elem = elem;\\n\\t\\tthis.prop = prop;\\n\\t\\tthis.easing = easing || jQuery.easing._default;\\n\\t\\tthis.options = options;\\n\\t\\tthis.start = this.now = this.cur();\\n\\t\\tthis.end = end;\\n\\t\\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \\\"\\\" : \\\"px\\\" );\\n\\t},\\n\\tcur: function() {\\n\\t\\tvar hooks = Tween.propHooks[ this.prop ];\\n\\n\\t\\treturn hooks && hooks.get ?\\n\\t\\t\\thooks.get( this ) :\\n\\t\\t\\tTween.propHooks._default.get( this );\\n\\t},\\n\\trun: function( percent ) {\\n\\t\\tvar eased,\\n\\t\\t\\thooks = Tween.propHooks[ this.prop ];\\n\\n\\t\\tif ( this.options.duration ) {\\n\\t\\t\\tthis.pos = eased = jQuery.easing[ this.easing ](\\n\\t\\t\\t\\tpercent, this.options.duration * percent, 0, 1, this.options.duration\\n\\t\\t\\t);\\n\\t\\t} else {\\n\\t\\t\\tthis.pos = eased = percent;\\n\\t\\t}\\n\\t\\tthis.now = ( this.end - this.start ) * eased + this.start;\\n\\n\\t\\tif ( this.options.step ) {\\n\\t\\t\\tthis.options.step.call( this.elem, this.now, this );\\n\\t\\t}\\n\\n\\t\\tif ( hooks && hooks.set ) {\\n\\t\\t\\thooks.set( this );\\n\\t\\t} else {\\n\\t\\t\\tTween.propHooks._default.set( this );\\n\\t\\t}\\n\\t\\treturn this;\\n\\t}\\n};\\n\\nTween.prototype.init.prototype = Tween.prototype;\\n\\nTween.propHooks = {\\n\\t_default: {\\n\\t\\tget: function( tween ) {\\n\\t\\t\\tvar result;\\n\\n\\t\\t\\t// Use a property on the element directly when it is not a DOM element,\\n\\t\\t\\t// or when there is no matching style property that exists.\\n\\t\\t\\tif ( tween.elem.nodeType !== 1 ||\\n\\t\\t\\t\\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\\n\\t\\t\\t\\treturn tween.elem[ tween.prop ];\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Passing an empty string as a 3rd parameter to .css will automatically\\n\\t\\t\\t// attempt a parseFloat and fallback to a string if the parse fails.\\n\\t\\t\\t// Simple values such as \\\"10px\\\" are parsed to Float;\\n\\t\\t\\t// complex values such as \\\"rotate(1rad)\\\" are returned as-is.\\n\\t\\t\\tresult = jQuery.css( tween.elem, tween.prop, \\\"\\\" );\\n\\n\\t\\t\\t// Empty strings, null, undefined and \\\"auto\\\" are converted to 0.\\n\\t\\t\\treturn !result || result === \\\"auto\\\" ? 0 : result;\\n\\t\\t},\\n\\t\\tset: function( tween ) {\\n\\n\\t\\t\\t// Use step hook for back compat.\\n\\t\\t\\t// Use cssHook if its there.\\n\\t\\t\\t// Use .style if available and use plain properties where available.\\n\\t\\t\\tif ( jQuery.fx.step[ tween.prop ] ) {\\n\\t\\t\\t\\tjQuery.fx.step[ tween.prop ]( tween );\\n\\t\\t\\t} else if ( tween.elem.nodeType === 1 &&\\n\\t\\t\\t\\t( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||\\n\\t\\t\\t\\t\\tjQuery.cssHooks[ tween.prop ] ) ) {\\n\\t\\t\\t\\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\ttween.elem[ tween.prop ] = tween.now;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n};\\n\\n// Support: IE <=9 only\\n// Panic based approach to setting things on disconnected nodes\\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\\n\\tset: function( tween ) {\\n\\t\\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\\n\\t\\t\\ttween.elem[ tween.prop ] = tween.now;\\n\\t\\t}\\n\\t}\\n};\\n\\njQuery.easing = {\\n\\tlinear: function( p ) {\\n\\t\\treturn p;\\n\\t},\\n\\tswing: function( p ) {\\n\\t\\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\\n\\t},\\n\\t_default: \\\"swing\\\"\\n};\\n\\njQuery.fx = Tween.prototype.init;\\n\\n// Back compat <1.8 extension point\\njQuery.fx.step = {};\\n\\n\\n\\n\\nvar\\n\\tfxNow, timerId,\\n\\trfxtypes = /^(?:toggle|show|hide)$/,\\n\\trrun = /queueHooks$/;\\n\\nfunction raf() {\\n\\tif ( timerId ) {\\n\\t\\twindow.requestAnimationFrame( raf );\\n\\t\\tjQuery.fx.tick();\\n\\t}\\n}\\n\\n// Animations created synchronously will run synchronously\\nfunction createFxNow() {\\n\\twindow.setTimeout( function() {\\n\\t\\tfxNow = undefined;\\n\\t} );\\n\\treturn ( fxNow = jQuery.now() );\\n}\\n\\n// Generate parameters to create a standard animation\\nfunction genFx( type, includeWidth ) {\\n\\tvar which,\\n\\t\\ti = 0,\\n\\t\\tattrs = { height: type };\\n\\n\\t// If we include width, step value is 1 to do all cssExpand values,\\n\\t// otherwise step value is 2 to skip over Left and Right\\n\\tincludeWidth = includeWidth ? 1 : 0;\\n\\tfor ( ; i < 4; i += 2 - includeWidth ) {\\n\\t\\twhich = cssExpand[ i ];\\n\\t\\tattrs[ \\\"margin\\\" + which ] = attrs[ \\\"padding\\\" + which ] = type;\\n\\t}\\n\\n\\tif ( includeWidth ) {\\n\\t\\tattrs.opacity = attrs.width = type;\\n\\t}\\n\\n\\treturn attrs;\\n}\\n\\nfunction createTween( value, prop, animation ) {\\n\\tvar tween,\\n\\t\\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \\\"*\\\" ] ),\\n\\t\\tindex = 0,\\n\\t\\tlength = collection.length;\\n\\tfor ( ; index < length; index++ ) {\\n\\t\\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\\n\\n\\t\\t\\t// We're done with this property\\n\\t\\t\\treturn tween;\\n\\t\\t}\\n\\t}\\n}\\n\\nfunction defaultPrefilter( elem, props, opts ) {\\n\\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\\n\\t\\tisBox = \\\"width\\\" in props || \\\"height\\\" in props,\\n\\t\\tanim = this,\\n\\t\\torig = {},\\n\\t\\tstyle = elem.style,\\n\\t\\thidden = elem.nodeType && isHiddenWithinTree( elem ),\\n\\t\\tdataShow = dataPriv.get( elem, \\\"fxshow\\\" );\\n\\n\\t// Queue-skipping animations hijack the fx hooks\\n\\tif ( !opts.queue ) {\\n\\t\\thooks = jQuery._queueHooks( elem, \\\"fx\\\" );\\n\\t\\tif ( hooks.unqueued == null ) {\\n\\t\\t\\thooks.unqueued = 0;\\n\\t\\t\\toldfire = hooks.empty.fire;\\n\\t\\t\\thooks.empty.fire = function() {\\n\\t\\t\\t\\tif ( !hooks.unqueued ) {\\n\\t\\t\\t\\t\\toldfire();\\n\\t\\t\\t\\t}\\n\\t\\t\\t};\\n\\t\\t}\\n\\t\\thooks.unqueued++;\\n\\n\\t\\tanim.always( function() {\\n\\n\\t\\t\\t// Ensure the complete handler is called before this completes\\n\\t\\t\\tanim.always( function() {\\n\\t\\t\\t\\thooks.unqueued--;\\n\\t\\t\\t\\tif ( !jQuery.queue( elem, \\\"fx\\\" ).length ) {\\n\\t\\t\\t\\t\\thooks.empty.fire();\\n\\t\\t\\t\\t}\\n\\t\\t\\t} );\\n\\t\\t} );\\n\\t}\\n\\n\\t// Detect show/hide animations\\n\\tfor ( prop in props ) {\\n\\t\\tvalue = props[ prop ];\\n\\t\\tif ( rfxtypes.test( value ) ) {\\n\\t\\t\\tdelete props[ prop ];\\n\\t\\t\\ttoggle = toggle || value === \\\"toggle\\\";\\n\\t\\t\\tif ( value === ( hidden ? \\\"hide\\\" : \\\"show\\\" ) ) {\\n\\n\\t\\t\\t\\t// Pretend to be hidden if this is a \\\"show\\\" and\\n\\t\\t\\t\\t// there is still data from a stopped show/hide\\n\\t\\t\\t\\tif ( value === \\\"show\\\" && dataShow && dataShow[ prop ] !== undefined ) {\\n\\t\\t\\t\\t\\thidden = true;\\n\\n\\t\\t\\t\\t// Ignore all other no-op show/hide data\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tcontinue;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\\n\\t\\t}\\n\\t}\\n\\n\\t// Bail out if this is a no-op like .hide().hide()\\n\\tpropTween = !jQuery.isEmptyObject( props );\\n\\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\\n\\t\\treturn;\\n\\t}\\n\\n\\t// Restrict \\\"overflow\\\" and \\\"display\\\" styles during box animations\\n\\tif ( isBox && elem.nodeType === 1 ) {\\n\\n\\t\\t// Support: IE <=9 - 11, Edge 12 - 13\\n\\t\\t// Record all 3 overflow attributes because IE does not infer the shorthand\\n\\t\\t// from identically-valued overflowX and overflowY\\n\\t\\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\\n\\n\\t\\t// Identify a display type, preferring old show/hide data over the CSS cascade\\n\\t\\trestoreDisplay = dataShow && dataShow.display;\\n\\t\\tif ( restoreDisplay == null ) {\\n\\t\\t\\trestoreDisplay = dataPriv.get( elem, \\\"display\\\" );\\n\\t\\t}\\n\\t\\tdisplay = jQuery.css( elem, \\\"display\\\" );\\n\\t\\tif ( display === \\\"none\\\" ) {\\n\\t\\t\\tif ( restoreDisplay ) {\\n\\t\\t\\t\\tdisplay = restoreDisplay;\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t// Get nonempty value(s) by temporarily forcing visibility\\n\\t\\t\\t\\tshowHide( [ elem ], true );\\n\\t\\t\\t\\trestoreDisplay = elem.style.display || restoreDisplay;\\n\\t\\t\\t\\tdisplay = jQuery.css( elem, \\\"display\\\" );\\n\\t\\t\\t\\tshowHide( [ elem ] );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Animate inline elements as inline-block\\n\\t\\tif ( display === \\\"inline\\\" || display === \\\"inline-block\\\" && restoreDisplay != null ) {\\n\\t\\t\\tif ( jQuery.css( elem, \\\"float\\\" ) === \\\"none\\\" ) {\\n\\n\\t\\t\\t\\t// Restore the original display value at the end of pure show/hide animations\\n\\t\\t\\t\\tif ( !propTween ) {\\n\\t\\t\\t\\t\\tanim.done( function() {\\n\\t\\t\\t\\t\\t\\tstyle.display = restoreDisplay;\\n\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t\\tif ( restoreDisplay == null ) {\\n\\t\\t\\t\\t\\t\\tdisplay = style.display;\\n\\t\\t\\t\\t\\t\\trestoreDisplay = display === \\\"none\\\" ? \\\"\\\" : display;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tstyle.display = \\\"inline-block\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tif ( opts.overflow ) {\\n\\t\\tstyle.overflow = \\\"hidden\\\";\\n\\t\\tanim.always( function() {\\n\\t\\t\\tstyle.overflow = opts.overflow[ 0 ];\\n\\t\\t\\tstyle.overflowX = opts.overflow[ 1 ];\\n\\t\\t\\tstyle.overflowY = opts.overflow[ 2 ];\\n\\t\\t} );\\n\\t}\\n\\n\\t// Implement show/hide animations\\n\\tpropTween = false;\\n\\tfor ( prop in orig ) {\\n\\n\\t\\t// General show/hide setup for this element animation\\n\\t\\tif ( !propTween ) {\\n\\t\\t\\tif ( dataShow ) {\\n\\t\\t\\t\\tif ( \\\"hidden\\\" in dataShow ) {\\n\\t\\t\\t\\t\\thidden = dataShow.hidden;\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tdataShow = dataPriv.access( elem, \\\"fxshow\\\", { display: restoreDisplay } );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Store hidden/visible for toggle so `.stop().toggle()` \\\"reverses\\\"\\n\\t\\t\\tif ( toggle ) {\\n\\t\\t\\t\\tdataShow.hidden = !hidden;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Show elements before animating them\\n\\t\\t\\tif ( hidden ) {\\n\\t\\t\\t\\tshowHide( [ elem ], true );\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* eslint-disable no-loop-func */\\n\\n\\t\\t\\tanim.done( function() {\\n\\n\\t\\t\\t/* eslint-enable no-loop-func */\\n\\n\\t\\t\\t\\t// The final step of a \\\"hide\\\" animation is actually hiding the element\\n\\t\\t\\t\\tif ( !hidden ) {\\n\\t\\t\\t\\t\\tshowHide( [ elem ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tdataPriv.remove( elem, \\\"fxshow\\\" );\\n\\t\\t\\t\\tfor ( prop in orig ) {\\n\\t\\t\\t\\t\\tjQuery.style( elem, prop, orig[ prop ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\t// Per-property setup\\n\\t\\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\\n\\t\\tif ( !( prop in dataShow ) ) {\\n\\t\\t\\tdataShow[ prop ] = propTween.start;\\n\\t\\t\\tif ( hidden ) {\\n\\t\\t\\t\\tpropTween.end = propTween.start;\\n\\t\\t\\t\\tpropTween.start = 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\\n\\nfunction propFilter( props, specialEasing ) {\\n\\tvar index, name, easing, value, hooks;\\n\\n\\t// camelCase, specialEasing and expand cssHook pass\\n\\tfor ( index in props ) {\\n\\t\\tname = jQuery.camelCase( index );\\n\\t\\teasing = specialEasing[ name ];\\n\\t\\tvalue = props[ index ];\\n\\t\\tif ( jQuery.isArray( value ) ) {\\n\\t\\t\\teasing = value[ 1 ];\\n\\t\\t\\tvalue = props[ index ] = value[ 0 ];\\n\\t\\t}\\n\\n\\t\\tif ( index !== name ) {\\n\\t\\t\\tprops[ name ] = value;\\n\\t\\t\\tdelete props[ index ];\\n\\t\\t}\\n\\n\\t\\thooks = jQuery.cssHooks[ name ];\\n\\t\\tif ( hooks && \\\"expand\\\" in hooks ) {\\n\\t\\t\\tvalue = hooks.expand( value );\\n\\t\\t\\tdelete props[ name ];\\n\\n\\t\\t\\t// Not quite $.extend, this won't overwrite existing keys.\\n\\t\\t\\t// Reusing 'index' because we have the correct \\\"name\\\"\\n\\t\\t\\tfor ( index in value ) {\\n\\t\\t\\t\\tif ( !( index in props ) ) {\\n\\t\\t\\t\\t\\tprops[ index ] = value[ index ];\\n\\t\\t\\t\\t\\tspecialEasing[ index ] = easing;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\tspecialEasing[ name ] = easing;\\n\\t\\t}\\n\\t}\\n}\\n\\nfunction Animation( elem, properties, options ) {\\n\\tvar result,\\n\\t\\tstopped,\\n\\t\\tindex = 0,\\n\\t\\tlength = Animation.prefilters.length,\\n\\t\\tdeferred = jQuery.Deferred().always( function() {\\n\\n\\t\\t\\t// Don't match elem in the :animated selector\\n\\t\\t\\tdelete tick.elem;\\n\\t\\t} ),\\n\\t\\ttick = function() {\\n\\t\\t\\tif ( stopped ) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t\\tvar currentTime = fxNow || createFxNow(),\\n\\t\\t\\t\\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\\n\\n\\t\\t\\t\\t// Support: Android 2.3 only\\n\\t\\t\\t\\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\\n\\t\\t\\t\\ttemp = remaining / animation.duration || 0,\\n\\t\\t\\t\\tpercent = 1 - temp,\\n\\t\\t\\t\\tindex = 0,\\n\\t\\t\\t\\tlength = animation.tweens.length;\\n\\n\\t\\t\\tfor ( ; index < length; index++ ) {\\n\\t\\t\\t\\tanimation.tweens[ index ].run( percent );\\n\\t\\t\\t}\\n\\n\\t\\t\\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\\n\\n\\t\\t\\tif ( percent < 1 && length ) {\\n\\t\\t\\t\\treturn remaining;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tdeferred.resolveWith( elem, [ animation ] );\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t},\\n\\t\\tanimation = deferred.promise( {\\n\\t\\t\\telem: elem,\\n\\t\\t\\tprops: jQuery.extend( {}, properties ),\\n\\t\\t\\topts: jQuery.extend( true, {\\n\\t\\t\\t\\tspecialEasing: {},\\n\\t\\t\\t\\teasing: jQuery.easing._default\\n\\t\\t\\t}, options ),\\n\\t\\t\\toriginalProperties: properties,\\n\\t\\t\\toriginalOptions: options,\\n\\t\\t\\tstartTime: fxNow || createFxNow(),\\n\\t\\t\\tduration: options.duration,\\n\\t\\t\\ttweens: [],\\n\\t\\t\\tcreateTween: function( prop, end ) {\\n\\t\\t\\t\\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\\n\\t\\t\\t\\t\\t\\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\\n\\t\\t\\t\\tanimation.tweens.push( tween );\\n\\t\\t\\t\\treturn tween;\\n\\t\\t\\t},\\n\\t\\t\\tstop: function( gotoEnd ) {\\n\\t\\t\\t\\tvar index = 0,\\n\\n\\t\\t\\t\\t\\t// If we are going to the end, we want to run all the tweens\\n\\t\\t\\t\\t\\t// otherwise we skip this part\\n\\t\\t\\t\\t\\tlength = gotoEnd ? animation.tweens.length : 0;\\n\\t\\t\\t\\tif ( stopped ) {\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tstopped = true;\\n\\t\\t\\t\\tfor ( ; index < length; index++ ) {\\n\\t\\t\\t\\t\\tanimation.tweens[ index ].run( 1 );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Resolve when we played the last frame; otherwise, reject\\n\\t\\t\\t\\tif ( gotoEnd ) {\\n\\t\\t\\t\\t\\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\\n\\t\\t\\t\\t\\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn this;\\n\\t\\t\\t}\\n\\t\\t} ),\\n\\t\\tprops = animation.props;\\n\\n\\tpropFilter( props, animation.opts.specialEasing );\\n\\n\\tfor ( ; index < length; index++ ) {\\n\\t\\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\\n\\t\\tif ( result ) {\\n\\t\\t\\tif ( jQuery.isFunction( result.stop ) ) {\\n\\t\\t\\t\\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\\n\\t\\t\\t\\t\\tjQuery.proxy( result.stop, result );\\n\\t\\t\\t}\\n\\t\\t\\treturn result;\\n\\t\\t}\\n\\t}\\n\\n\\tjQuery.map( props, createTween, animation );\\n\\n\\tif ( jQuery.isFunction( animation.opts.start ) ) {\\n\\t\\tanimation.opts.start.call( elem, animation );\\n\\t}\\n\\n\\tjQuery.fx.timer(\\n\\t\\tjQuery.extend( tick, {\\n\\t\\t\\telem: elem,\\n\\t\\t\\tanim: animation,\\n\\t\\t\\tqueue: animation.opts.queue\\n\\t\\t} )\\n\\t);\\n\\n\\t// attach callbacks from options\\n\\treturn animation.progress( animation.opts.progress )\\n\\t\\t.done( animation.opts.done, animation.opts.complete )\\n\\t\\t.fail( animation.opts.fail )\\n\\t\\t.always( animation.opts.always );\\n}\\n\\njQuery.Animation = jQuery.extend( Animation, {\\n\\n\\ttweeners: {\\n\\t\\t\\\"*\\\": [ function( prop, value ) {\\n\\t\\t\\tvar tween = this.createTween( prop, value );\\n\\t\\t\\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\\n\\t\\t\\treturn tween;\\n\\t\\t} ]\\n\\t},\\n\\n\\ttweener: function( props, callback ) {\\n\\t\\tif ( jQuery.isFunction( props ) ) {\\n\\t\\t\\tcallback = props;\\n\\t\\t\\tprops = [ \\\"*\\\" ];\\n\\t\\t} else {\\n\\t\\t\\tprops = props.match( rnothtmlwhite );\\n\\t\\t}\\n\\n\\t\\tvar prop,\\n\\t\\t\\tindex = 0,\\n\\t\\t\\tlength = props.length;\\n\\n\\t\\tfor ( ; index < length; index++ ) {\\n\\t\\t\\tprop = props[ index ];\\n\\t\\t\\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\\n\\t\\t\\tAnimation.tweeners[ prop ].unshift( callback );\\n\\t\\t}\\n\\t},\\n\\n\\tprefilters: [ defaultPrefilter ],\\n\\n\\tprefilter: function( callback, prepend ) {\\n\\t\\tif ( prepend ) {\\n\\t\\t\\tAnimation.prefilters.unshift( callback );\\n\\t\\t} else {\\n\\t\\t\\tAnimation.prefilters.push( callback );\\n\\t\\t}\\n\\t}\\n} );\\n\\njQuery.speed = function( speed, easing, fn ) {\\n\\tvar opt = speed && typeof speed === \\\"object\\\" ? jQuery.extend( {}, speed ) : {\\n\\t\\tcomplete: fn || !fn && easing ||\\n\\t\\t\\tjQuery.isFunction( speed ) && speed,\\n\\t\\tduration: speed,\\n\\t\\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\\n\\t};\\n\\n\\t// Go to the end state if fx are off or if document is hidden\\n\\tif ( jQuery.fx.off || document.hidden ) {\\n\\t\\topt.duration = 0;\\n\\n\\t} else {\\n\\t\\tif ( typeof opt.duration !== \\\"number\\\" ) {\\n\\t\\t\\tif ( opt.duration in jQuery.fx.speeds ) {\\n\\t\\t\\t\\topt.duration = jQuery.fx.speeds[ opt.duration ];\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\topt.duration = jQuery.fx.speeds._default;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Normalize opt.queue - true/undefined/null -> \\\"fx\\\"\\n\\tif ( opt.queue == null || opt.queue === true ) {\\n\\t\\topt.queue = \\\"fx\\\";\\n\\t}\\n\\n\\t// Queueing\\n\\topt.old = opt.complete;\\n\\n\\topt.complete = function() {\\n\\t\\tif ( jQuery.isFunction( opt.old ) ) {\\n\\t\\t\\topt.old.call( this );\\n\\t\\t}\\n\\n\\t\\tif ( opt.queue ) {\\n\\t\\t\\tjQuery.dequeue( this, opt.queue );\\n\\t\\t}\\n\\t};\\n\\n\\treturn opt;\\n};\\n\\njQuery.fn.extend( {\\n\\tfadeTo: function( speed, to, easing, callback ) {\\n\\n\\t\\t// Show any hidden elements after setting opacity to 0\\n\\t\\treturn this.filter( isHiddenWithinTree ).css( \\\"opacity\\\", 0 ).show()\\n\\n\\t\\t\\t// Animate to the value specified\\n\\t\\t\\t.end().animate( { opacity: to }, speed, easing, callback );\\n\\t},\\n\\tanimate: function( prop, speed, easing, callback ) {\\n\\t\\tvar empty = jQuery.isEmptyObject( prop ),\\n\\t\\t\\toptall = jQuery.speed( speed, easing, callback ),\\n\\t\\t\\tdoAnimation = function() {\\n\\n\\t\\t\\t\\t// Operate on a copy of prop so per-property easing won't be lost\\n\\t\\t\\t\\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\\n\\n\\t\\t\\t\\t// Empty animations, or finishing resolves immediately\\n\\t\\t\\t\\tif ( empty || dataPriv.get( this, \\\"finish\\\" ) ) {\\n\\t\\t\\t\\t\\tanim.stop( true );\\n\\t\\t\\t\\t}\\n\\t\\t\\t};\\n\\t\\t\\tdoAnimation.finish = doAnimation;\\n\\n\\t\\treturn empty || optall.queue === false ?\\n\\t\\t\\tthis.each( doAnimation ) :\\n\\t\\t\\tthis.queue( optall.queue, doAnimation );\\n\\t},\\n\\tstop: function( type, clearQueue, gotoEnd ) {\\n\\t\\tvar stopQueue = function( hooks ) {\\n\\t\\t\\tvar stop = hooks.stop;\\n\\t\\t\\tdelete hooks.stop;\\n\\t\\t\\tstop( gotoEnd );\\n\\t\\t};\\n\\n\\t\\tif ( typeof type !== \\\"string\\\" ) {\\n\\t\\t\\tgotoEnd = clearQueue;\\n\\t\\t\\tclearQueue = type;\\n\\t\\t\\ttype = undefined;\\n\\t\\t}\\n\\t\\tif ( clearQueue && type !== false ) {\\n\\t\\t\\tthis.queue( type || \\\"fx\\\", [] );\\n\\t\\t}\\n\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tvar dequeue = true,\\n\\t\\t\\t\\tindex = type != null && type + \\\"queueHooks\\\",\\n\\t\\t\\t\\ttimers = jQuery.timers,\\n\\t\\t\\t\\tdata = dataPriv.get( this );\\n\\n\\t\\t\\tif ( index ) {\\n\\t\\t\\t\\tif ( data[ index ] && data[ index ].stop ) {\\n\\t\\t\\t\\t\\tstopQueue( data[ index ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tfor ( index in data ) {\\n\\t\\t\\t\\t\\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\\n\\t\\t\\t\\t\\t\\tstopQueue( data[ index ] );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\tfor ( index = timers.length; index--; ) {\\n\\t\\t\\t\\tif ( timers[ index ].elem === this &&\\n\\t\\t\\t\\t\\t( type == null || timers[ index ].queue === type ) ) {\\n\\n\\t\\t\\t\\t\\ttimers[ index ].anim.stop( gotoEnd );\\n\\t\\t\\t\\t\\tdequeue = false;\\n\\t\\t\\t\\t\\ttimers.splice( index, 1 );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Start the next in the queue if the last step wasn't forced.\\n\\t\\t\\t// Timers currently will call their complete callbacks, which\\n\\t\\t\\t// will dequeue but only if they were gotoEnd.\\n\\t\\t\\tif ( dequeue || !gotoEnd ) {\\n\\t\\t\\t\\tjQuery.dequeue( this, type );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\tfinish: function( type ) {\\n\\t\\tif ( type !== false ) {\\n\\t\\t\\ttype = type || \\\"fx\\\";\\n\\t\\t}\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tvar index,\\n\\t\\t\\t\\tdata = dataPriv.get( this ),\\n\\t\\t\\t\\tqueue = data[ type + \\\"queue\\\" ],\\n\\t\\t\\t\\thooks = data[ type + \\\"queueHooks\\\" ],\\n\\t\\t\\t\\ttimers = jQuery.timers,\\n\\t\\t\\t\\tlength = queue ? queue.length : 0;\\n\\n\\t\\t\\t// Enable finishing flag on private data\\n\\t\\t\\tdata.finish = true;\\n\\n\\t\\t\\t// Empty the queue first\\n\\t\\t\\tjQuery.queue( this, type, [] );\\n\\n\\t\\t\\tif ( hooks && hooks.stop ) {\\n\\t\\t\\t\\thooks.stop.call( this, true );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Look for any active animations, and finish them\\n\\t\\t\\tfor ( index = timers.length; index--; ) {\\n\\t\\t\\t\\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\\n\\t\\t\\t\\t\\ttimers[ index ].anim.stop( true );\\n\\t\\t\\t\\t\\ttimers.splice( index, 1 );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Look for any animations in the old queue and finish them\\n\\t\\t\\tfor ( index = 0; index < length; index++ ) {\\n\\t\\t\\t\\tif ( queue[ index ] && queue[ index ].finish ) {\\n\\t\\t\\t\\t\\tqueue[ index ].finish.call( this );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Turn off finishing flag\\n\\t\\t\\tdelete data.finish;\\n\\t\\t} );\\n\\t}\\n} );\\n\\njQuery.each( [ \\\"toggle\\\", \\\"show\\\", \\\"hide\\\" ], function( i, name ) {\\n\\tvar cssFn = jQuery.fn[ name ];\\n\\tjQuery.fn[ name ] = function( speed, easing, callback ) {\\n\\t\\treturn speed == null || typeof speed === \\\"boolean\\\" ?\\n\\t\\t\\tcssFn.apply( this, arguments ) :\\n\\t\\t\\tthis.animate( genFx( name, true ), speed, easing, callback );\\n\\t};\\n} );\\n\\n// Generate shortcuts for custom animations\\njQuery.each( {\\n\\tslideDown: genFx( \\\"show\\\" ),\\n\\tslideUp: genFx( \\\"hide\\\" ),\\n\\tslideToggle: genFx( \\\"toggle\\\" ),\\n\\tfadeIn: { opacity: \\\"show\\\" },\\n\\tfadeOut: { opacity: \\\"hide\\\" },\\n\\tfadeToggle: { opacity: \\\"toggle\\\" }\\n}, function( name, props ) {\\n\\tjQuery.fn[ name ] = function( speed, easing, callback ) {\\n\\t\\treturn this.animate( props, speed, easing, callback );\\n\\t};\\n} );\\n\\njQuery.timers = [];\\njQuery.fx.tick = function() {\\n\\tvar timer,\\n\\t\\ti = 0,\\n\\t\\ttimers = jQuery.timers;\\n\\n\\tfxNow = jQuery.now();\\n\\n\\tfor ( ; i < timers.length; i++ ) {\\n\\t\\ttimer = timers[ i ];\\n\\n\\t\\t// Checks the timer has not already been removed\\n\\t\\tif ( !timer() && timers[ i ] === timer ) {\\n\\t\\t\\ttimers.splice( i--, 1 );\\n\\t\\t}\\n\\t}\\n\\n\\tif ( !timers.length ) {\\n\\t\\tjQuery.fx.stop();\\n\\t}\\n\\tfxNow = undefined;\\n};\\n\\njQuery.fx.timer = function( timer ) {\\n\\tjQuery.timers.push( timer );\\n\\tif ( timer() ) {\\n\\t\\tjQuery.fx.start();\\n\\t} else {\\n\\t\\tjQuery.timers.pop();\\n\\t}\\n};\\n\\njQuery.fx.interval = 13;\\njQuery.fx.start = function() {\\n\\tif ( !timerId ) {\\n\\t\\ttimerId = window.requestAnimationFrame ?\\n\\t\\t\\twindow.requestAnimationFrame( raf ) :\\n\\t\\t\\twindow.setInterval( jQuery.fx.tick, jQuery.fx.interval );\\n\\t}\\n};\\n\\njQuery.fx.stop = function() {\\n\\tif ( window.cancelAnimationFrame ) {\\n\\t\\twindow.cancelAnimationFrame( timerId );\\n\\t} else {\\n\\t\\twindow.clearInterval( timerId );\\n\\t}\\n\\n\\ttimerId = null;\\n};\\n\\njQuery.fx.speeds = {\\n\\tslow: 600,\\n\\tfast: 200,\\n\\n\\t// Default speed\\n\\t_default: 400\\n};\\n\\n\\n// Based off of the plugin by Clint Helfers, with permission.\\n// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/\\njQuery.fn.delay = function( time, type ) {\\n\\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\\n\\ttype = type || \\\"fx\\\";\\n\\n\\treturn this.queue( type, function( next, hooks ) {\\n\\t\\tvar timeout = window.setTimeout( next, time );\\n\\t\\thooks.stop = function() {\\n\\t\\t\\twindow.clearTimeout( timeout );\\n\\t\\t};\\n\\t} );\\n};\\n\\n\\n( function() {\\n\\tvar input = document.createElement( \\\"input\\\" ),\\n\\t\\tselect = document.createElement( \\\"select\\\" ),\\n\\t\\topt = select.appendChild( document.createElement( \\\"option\\\" ) );\\n\\n\\tinput.type = \\\"checkbox\\\";\\n\\n\\t// Support: Android <=4.3 only\\n\\t// Default value for a checkbox should be \\\"on\\\"\\n\\tsupport.checkOn = input.value !== \\\"\\\";\\n\\n\\t// Support: IE <=11 only\\n\\t// Must access selectedIndex to make default options select\\n\\tsupport.optSelected = opt.selected;\\n\\n\\t// Support: IE <=11 only\\n\\t// An input loses its value after becoming a radio\\n\\tinput = document.createElement( \\\"input\\\" );\\n\\tinput.value = \\\"t\\\";\\n\\tinput.type = \\\"radio\\\";\\n\\tsupport.radioValue = input.value === \\\"t\\\";\\n} )();\\n\\n\\nvar boolHook,\\n\\tattrHandle = jQuery.expr.attrHandle;\\n\\njQuery.fn.extend( {\\n\\tattr: function( name, value ) {\\n\\t\\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\\n\\t},\\n\\n\\tremoveAttr: function( name ) {\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tjQuery.removeAttr( this, name );\\n\\t\\t} );\\n\\t}\\n} );\\n\\njQuery.extend( {\\n\\tattr: function( elem, name, value ) {\\n\\t\\tvar ret, hooks,\\n\\t\\t\\tnType = elem.nodeType;\\n\\n\\t\\t// Don't get/set attributes on text, comment and attribute nodes\\n\\t\\tif ( nType === 3 || nType === 8 || nType === 2 ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Fallback to prop when attributes are not supported\\n\\t\\tif ( typeof elem.getAttribute === \\\"undefined\\\" ) {\\n\\t\\t\\treturn jQuery.prop( elem, name, value );\\n\\t\\t}\\n\\n\\t\\t// Attribute hooks are determined by the lowercase version\\n\\t\\t// Grab necessary hook if one is defined\\n\\t\\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\\n\\t\\t\\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\\n\\t\\t\\t\\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\\n\\t\\t}\\n\\n\\t\\tif ( value !== undefined ) {\\n\\t\\t\\tif ( value === null ) {\\n\\t\\t\\t\\tjQuery.removeAttr( elem, name );\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( hooks && \\\"set\\\" in hooks &&\\n\\t\\t\\t\\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\\n\\t\\t\\t\\treturn ret;\\n\\t\\t\\t}\\n\\n\\t\\t\\telem.setAttribute( name, value + \\\"\\\" );\\n\\t\\t\\treturn value;\\n\\t\\t}\\n\\n\\t\\tif ( hooks && \\\"get\\\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\\n\\t\\t\\treturn ret;\\n\\t\\t}\\n\\n\\t\\tret = jQuery.find.attr( elem, name );\\n\\n\\t\\t// Non-existent attributes return null, we normalize to undefined\\n\\t\\treturn ret == null ? undefined : ret;\\n\\t},\\n\\n\\tattrHooks: {\\n\\t\\ttype: {\\n\\t\\t\\tset: function( elem, value ) {\\n\\t\\t\\t\\tif ( !support.radioValue && value === \\\"radio\\\" &&\\n\\t\\t\\t\\t\\tjQuery.nodeName( elem, \\\"input\\\" ) ) {\\n\\t\\t\\t\\t\\tvar val = elem.value;\\n\\t\\t\\t\\t\\telem.setAttribute( \\\"type\\\", value );\\n\\t\\t\\t\\t\\tif ( val ) {\\n\\t\\t\\t\\t\\t\\telem.value = val;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn value;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\n\\tremoveAttr: function( elem, value ) {\\n\\t\\tvar name,\\n\\t\\t\\ti = 0,\\n\\n\\t\\t\\t// Attribute names can contain non-HTML whitespace characters\\n\\t\\t\\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\\n\\t\\t\\tattrNames = value && value.match( rnothtmlwhite );\\n\\n\\t\\tif ( attrNames && elem.nodeType === 1 ) {\\n\\t\\t\\twhile ( ( name = attrNames[ i++ ] ) ) {\\n\\t\\t\\t\\telem.removeAttribute( name );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n} );\\n\\n// Hooks for boolean attributes\\nboolHook = {\\n\\tset: function( elem, value, name ) {\\n\\t\\tif ( value === false ) {\\n\\n\\t\\t\\t// Remove boolean attributes when set to false\\n\\t\\t\\tjQuery.removeAttr( elem, name );\\n\\t\\t} else {\\n\\t\\t\\telem.setAttribute( name, name );\\n\\t\\t}\\n\\t\\treturn name;\\n\\t}\\n};\\n\\njQuery.each( jQuery.expr.match.bool.source.match( /\\\\w+/g ), function( i, name ) {\\n\\tvar getter = attrHandle[ name ] || jQuery.find.attr;\\n\\n\\tattrHandle[ name ] = function( elem, name, isXML ) {\\n\\t\\tvar ret, handle,\\n\\t\\t\\tlowercaseName = name.toLowerCase();\\n\\n\\t\\tif ( !isXML ) {\\n\\n\\t\\t\\t// Avoid an infinite loop by temporarily removing this function from the getter\\n\\t\\t\\thandle = attrHandle[ lowercaseName ];\\n\\t\\t\\tattrHandle[ lowercaseName ] = ret;\\n\\t\\t\\tret = getter( elem, name, isXML ) != null ?\\n\\t\\t\\t\\tlowercaseName :\\n\\t\\t\\t\\tnull;\\n\\t\\t\\tattrHandle[ lowercaseName ] = handle;\\n\\t\\t}\\n\\t\\treturn ret;\\n\\t};\\n} );\\n\\n\\n\\n\\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\\n\\trclickable = /^(?:a|area)$/i;\\n\\njQuery.fn.extend( {\\n\\tprop: function( name, value ) {\\n\\t\\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\\n\\t},\\n\\n\\tremoveProp: function( name ) {\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tdelete this[ jQuery.propFix[ name ] || name ];\\n\\t\\t} );\\n\\t}\\n} );\\n\\njQuery.extend( {\\n\\tprop: function( elem, name, value ) {\\n\\t\\tvar ret, hooks,\\n\\t\\t\\tnType = elem.nodeType;\\n\\n\\t\\t// Don't get/set properties on text, comment and attribute nodes\\n\\t\\tif ( nType === 3 || nType === 8 || nType === 2 ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\\n\\n\\t\\t\\t// Fix name and attach hooks\\n\\t\\t\\tname = jQuery.propFix[ name ] || name;\\n\\t\\t\\thooks = jQuery.propHooks[ name ];\\n\\t\\t}\\n\\n\\t\\tif ( value !== undefined ) {\\n\\t\\t\\tif ( hooks && \\\"set\\\" in hooks &&\\n\\t\\t\\t\\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\\n\\t\\t\\t\\treturn ret;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn ( elem[ name ] = value );\\n\\t\\t}\\n\\n\\t\\tif ( hooks && \\\"get\\\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\\n\\t\\t\\treturn ret;\\n\\t\\t}\\n\\n\\t\\treturn elem[ name ];\\n\\t},\\n\\n\\tpropHooks: {\\n\\t\\ttabIndex: {\\n\\t\\t\\tget: function( elem ) {\\n\\n\\t\\t\\t\\t// Support: IE <=9 - 11 only\\n\\t\\t\\t\\t// elem.tabIndex doesn't always return the\\n\\t\\t\\t\\t// correct value when it hasn't been explicitly set\\n\\t\\t\\t\\t// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\\n\\t\\t\\t\\t// Use proper attribute retrieval(#12072)\\n\\t\\t\\t\\tvar tabindex = jQuery.find.attr( elem, \\\"tabindex\\\" );\\n\\n\\t\\t\\t\\tif ( tabindex ) {\\n\\t\\t\\t\\t\\treturn parseInt( tabindex, 10 );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif (\\n\\t\\t\\t\\t\\trfocusable.test( elem.nodeName ) ||\\n\\t\\t\\t\\t\\trclickable.test( elem.nodeName ) &&\\n\\t\\t\\t\\t\\telem.href\\n\\t\\t\\t\\t) {\\n\\t\\t\\t\\t\\treturn 0;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn -1;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t},\\n\\n\\tpropFix: {\\n\\t\\t\\\"for\\\": \\\"htmlFor\\\",\\n\\t\\t\\\"class\\\": \\\"className\\\"\\n\\t}\\n} );\\n\\n// Support: IE <=11 only\\n// Accessing the selectedIndex property\\n// forces the browser to respect setting selected\\n// on the option\\n// The getter ensures a default option is selected\\n// when in an optgroup\\n// eslint rule \\\"no-unused-expressions\\\" is disabled for this code\\n// since it considers such accessions noop\\nif ( !support.optSelected ) {\\n\\tjQuery.propHooks.selected = {\\n\\t\\tget: function( elem ) {\\n\\n\\t\\t\\t/* eslint no-unused-expressions: \\\"off\\\" */\\n\\n\\t\\t\\tvar parent = elem.parentNode;\\n\\t\\t\\tif ( parent && parent.parentNode ) {\\n\\t\\t\\t\\tparent.parentNode.selectedIndex;\\n\\t\\t\\t}\\n\\t\\t\\treturn null;\\n\\t\\t},\\n\\t\\tset: function( elem ) {\\n\\n\\t\\t\\t/* eslint no-unused-expressions: \\\"off\\\" */\\n\\n\\t\\t\\tvar parent = elem.parentNode;\\n\\t\\t\\tif ( parent ) {\\n\\t\\t\\t\\tparent.selectedIndex;\\n\\n\\t\\t\\t\\tif ( parent.parentNode ) {\\n\\t\\t\\t\\t\\tparent.parentNode.selectedIndex;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n}\\n\\njQuery.each( [\\n\\t\\\"tabIndex\\\",\\n\\t\\\"readOnly\\\",\\n\\t\\\"maxLength\\\",\\n\\t\\\"cellSpacing\\\",\\n\\t\\\"cellPadding\\\",\\n\\t\\\"rowSpan\\\",\\n\\t\\\"colSpan\\\",\\n\\t\\\"useMap\\\",\\n\\t\\\"frameBorder\\\",\\n\\t\\\"contentEditable\\\"\\n], function() {\\n\\tjQuery.propFix[ this.toLowerCase() ] = this;\\n} );\\n\\n\\n\\n\\n\\t// Strip and collapse whitespace according to HTML spec\\n\\t// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace\\n\\tfunction stripAndCollapse( value ) {\\n\\t\\tvar tokens = value.match( rnothtmlwhite ) || [];\\n\\t\\treturn tokens.join( \\\" \\\" );\\n\\t}\\n\\n\\nfunction getClass( elem ) {\\n\\treturn elem.getAttribute && elem.getAttribute( \\\"class\\\" ) || \\\"\\\";\\n}\\n\\njQuery.fn.extend( {\\n\\taddClass: function( value ) {\\n\\t\\tvar classes, elem, cur, curValue, clazz, j, finalValue,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tif ( jQuery.isFunction( value ) ) {\\n\\t\\t\\treturn this.each( function( j ) {\\n\\t\\t\\t\\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\tif ( typeof value === \\\"string\\\" && value ) {\\n\\t\\t\\tclasses = value.match( rnothtmlwhite ) || [];\\n\\n\\t\\t\\twhile ( ( elem = this[ i++ ] ) ) {\\n\\t\\t\\t\\tcurValue = getClass( elem );\\n\\t\\t\\t\\tcur = elem.nodeType === 1 && ( \\\" \\\" + stripAndCollapse( curValue ) + \\\" \\\" );\\n\\n\\t\\t\\t\\tif ( cur ) {\\n\\t\\t\\t\\t\\tj = 0;\\n\\t\\t\\t\\t\\twhile ( ( clazz = classes[ j++ ] ) ) {\\n\\t\\t\\t\\t\\t\\tif ( cur.indexOf( \\\" \\\" + clazz + \\\" \\\" ) < 0 ) {\\n\\t\\t\\t\\t\\t\\t\\tcur += clazz + \\\" \\\";\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Only assign if different to avoid unneeded rendering.\\n\\t\\t\\t\\t\\tfinalValue = stripAndCollapse( cur );\\n\\t\\t\\t\\t\\tif ( curValue !== finalValue ) {\\n\\t\\t\\t\\t\\t\\telem.setAttribute( \\\"class\\\", finalValue );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\tremoveClass: function( value ) {\\n\\t\\tvar classes, elem, cur, curValue, clazz, j, finalValue,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tif ( jQuery.isFunction( value ) ) {\\n\\t\\t\\treturn this.each( function( j ) {\\n\\t\\t\\t\\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\tif ( !arguments.length ) {\\n\\t\\t\\treturn this.attr( \\\"class\\\", \\\"\\\" );\\n\\t\\t}\\n\\n\\t\\tif ( typeof value === \\\"string\\\" && value ) {\\n\\t\\t\\tclasses = value.match( rnothtmlwhite ) || [];\\n\\n\\t\\t\\twhile ( ( elem = this[ i++ ] ) ) {\\n\\t\\t\\t\\tcurValue = getClass( elem );\\n\\n\\t\\t\\t\\t// This expression is here for better compressibility (see addClass)\\n\\t\\t\\t\\tcur = elem.nodeType === 1 && ( \\\" \\\" + stripAndCollapse( curValue ) + \\\" \\\" );\\n\\n\\t\\t\\t\\tif ( cur ) {\\n\\t\\t\\t\\t\\tj = 0;\\n\\t\\t\\t\\t\\twhile ( ( clazz = classes[ j++ ] ) ) {\\n\\n\\t\\t\\t\\t\\t\\t// Remove *all* instances\\n\\t\\t\\t\\t\\t\\twhile ( cur.indexOf( \\\" \\\" + clazz + \\\" \\\" ) > -1 ) {\\n\\t\\t\\t\\t\\t\\t\\tcur = cur.replace( \\\" \\\" + clazz + \\\" \\\", \\\" \\\" );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Only assign if different to avoid unneeded rendering.\\n\\t\\t\\t\\t\\tfinalValue = stripAndCollapse( cur );\\n\\t\\t\\t\\t\\tif ( curValue !== finalValue ) {\\n\\t\\t\\t\\t\\t\\telem.setAttribute( \\\"class\\\", finalValue );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\ttoggleClass: function( value, stateVal ) {\\n\\t\\tvar type = typeof value;\\n\\n\\t\\tif ( typeof stateVal === \\\"boolean\\\" && type === \\\"string\\\" ) {\\n\\t\\t\\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\\n\\t\\t}\\n\\n\\t\\tif ( jQuery.isFunction( value ) ) {\\n\\t\\t\\treturn this.each( function( i ) {\\n\\t\\t\\t\\tjQuery( this ).toggleClass(\\n\\t\\t\\t\\t\\tvalue.call( this, i, getClass( this ), stateVal ),\\n\\t\\t\\t\\t\\tstateVal\\n\\t\\t\\t\\t);\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tvar className, i, self, classNames;\\n\\n\\t\\t\\tif ( type === \\\"string\\\" ) {\\n\\n\\t\\t\\t\\t// Toggle individual class names\\n\\t\\t\\t\\ti = 0;\\n\\t\\t\\t\\tself = jQuery( this );\\n\\t\\t\\t\\tclassNames = value.match( rnothtmlwhite ) || [];\\n\\n\\t\\t\\t\\twhile ( ( className = classNames[ i++ ] ) ) {\\n\\n\\t\\t\\t\\t\\t// Check each className given, space separated list\\n\\t\\t\\t\\t\\tif ( self.hasClass( className ) ) {\\n\\t\\t\\t\\t\\t\\tself.removeClass( className );\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tself.addClass( className );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t// Toggle whole class name\\n\\t\\t\\t} else if ( value === undefined || type === \\\"boolean\\\" ) {\\n\\t\\t\\t\\tclassName = getClass( this );\\n\\t\\t\\t\\tif ( className ) {\\n\\n\\t\\t\\t\\t\\t// Store className if set\\n\\t\\t\\t\\t\\tdataPriv.set( this, \\\"__className__\\\", className );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// If the element has a class name or if we're passed `false`,\\n\\t\\t\\t\\t// then remove the whole classname (if there was one, the above saved it).\\n\\t\\t\\t\\t// Otherwise bring back whatever was previously saved (if anything),\\n\\t\\t\\t\\t// falling back to the empty string if nothing was stored.\\n\\t\\t\\t\\tif ( this.setAttribute ) {\\n\\t\\t\\t\\t\\tthis.setAttribute( \\\"class\\\",\\n\\t\\t\\t\\t\\t\\tclassName || value === false ?\\n\\t\\t\\t\\t\\t\\t\\\"\\\" :\\n\\t\\t\\t\\t\\t\\tdataPriv.get( this, \\\"__className__\\\" ) || \\\"\\\"\\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\thasClass: function( selector ) {\\n\\t\\tvar className, elem,\\n\\t\\t\\ti = 0;\\n\\n\\t\\tclassName = \\\" \\\" + selector + \\\" \\\";\\n\\t\\twhile ( ( elem = this[ i++ ] ) ) {\\n\\t\\t\\tif ( elem.nodeType === 1 &&\\n\\t\\t\\t\\t( \\\" \\\" + stripAndCollapse( getClass( elem ) ) + \\\" \\\" ).indexOf( className ) > -1 ) {\\n\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn false;\\n\\t}\\n} );\\n\\n\\n\\n\\nvar rreturn = /\\\\r/g;\\n\\njQuery.fn.extend( {\\n\\tval: function( value ) {\\n\\t\\tvar hooks, ret, isFunction,\\n\\t\\t\\telem = this[ 0 ];\\n\\n\\t\\tif ( !arguments.length ) {\\n\\t\\t\\tif ( elem ) {\\n\\t\\t\\t\\thooks = jQuery.valHooks[ elem.type ] ||\\n\\t\\t\\t\\t\\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\\n\\n\\t\\t\\t\\tif ( hooks &&\\n\\t\\t\\t\\t\\t\\\"get\\\" in hooks &&\\n\\t\\t\\t\\t\\t( ret = hooks.get( elem, \\\"value\\\" ) ) !== undefined\\n\\t\\t\\t\\t) {\\n\\t\\t\\t\\t\\treturn ret;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tret = elem.value;\\n\\n\\t\\t\\t\\t// Handle most common string cases\\n\\t\\t\\t\\tif ( typeof ret === \\\"string\\\" ) {\\n\\t\\t\\t\\t\\treturn ret.replace( rreturn, \\\"\\\" );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Handle cases where value is null/undef or number\\n\\t\\t\\t\\treturn ret == null ? \\\"\\\" : ret;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tisFunction = jQuery.isFunction( value );\\n\\n\\t\\treturn this.each( function( i ) {\\n\\t\\t\\tvar val;\\n\\n\\t\\t\\tif ( this.nodeType !== 1 ) {\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( isFunction ) {\\n\\t\\t\\t\\tval = value.call( this, i, jQuery( this ).val() );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tval = value;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Treat null/undefined as \\\"\\\"; convert numbers to string\\n\\t\\t\\tif ( val == null ) {\\n\\t\\t\\t\\tval = \\\"\\\";\\n\\n\\t\\t\\t} else if ( typeof val === \\\"number\\\" ) {\\n\\t\\t\\t\\tval += \\\"\\\";\\n\\n\\t\\t\\t} else if ( jQuery.isArray( val ) ) {\\n\\t\\t\\t\\tval = jQuery.map( val, function( value ) {\\n\\t\\t\\t\\t\\treturn value == null ? \\\"\\\" : value + \\\"\\\";\\n\\t\\t\\t\\t} );\\n\\t\\t\\t}\\n\\n\\t\\t\\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\\n\\n\\t\\t\\t// If set returns undefined, fall back to normal setting\\n\\t\\t\\tif ( !hooks || !( \\\"set\\\" in hooks ) || hooks.set( this, val, \\\"value\\\" ) === undefined ) {\\n\\t\\t\\t\\tthis.value = val;\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t}\\n} );\\n\\njQuery.extend( {\\n\\tvalHooks: {\\n\\t\\toption: {\\n\\t\\t\\tget: function( elem ) {\\n\\n\\t\\t\\t\\tvar val = jQuery.find.attr( elem, \\\"value\\\" );\\n\\t\\t\\t\\treturn val != null ?\\n\\t\\t\\t\\t\\tval :\\n\\n\\t\\t\\t\\t\\t// Support: IE <=10 - 11 only\\n\\t\\t\\t\\t\\t// option.text throws exceptions (#14686, #14858)\\n\\t\\t\\t\\t\\t// Strip and collapse whitespace\\n\\t\\t\\t\\t\\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\\n\\t\\t\\t\\t\\tstripAndCollapse( jQuery.text( elem ) );\\n\\t\\t\\t}\\n\\t\\t},\\n\\t\\tselect: {\\n\\t\\t\\tget: function( elem ) {\\n\\t\\t\\t\\tvar value, option, i,\\n\\t\\t\\t\\t\\toptions = elem.options,\\n\\t\\t\\t\\t\\tindex = elem.selectedIndex,\\n\\t\\t\\t\\t\\tone = elem.type === \\\"select-one\\\",\\n\\t\\t\\t\\t\\tvalues = one ? null : [],\\n\\t\\t\\t\\t\\tmax = one ? index + 1 : options.length;\\n\\n\\t\\t\\t\\tif ( index < 0 ) {\\n\\t\\t\\t\\t\\ti = max;\\n\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\ti = one ? index : 0;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Loop through all the selected options\\n\\t\\t\\t\\tfor ( ; i < max; i++ ) {\\n\\t\\t\\t\\t\\toption = options[ i ];\\n\\n\\t\\t\\t\\t\\t// Support: IE <=9 only\\n\\t\\t\\t\\t\\t// IE8-9 doesn't update selected after form reset (#2551)\\n\\t\\t\\t\\t\\tif ( ( option.selected || i === index ) &&\\n\\n\\t\\t\\t\\t\\t\\t\\t// Don't return options that are disabled or in a disabled optgroup\\n\\t\\t\\t\\t\\t\\t\\t!option.disabled &&\\n\\t\\t\\t\\t\\t\\t\\t( !option.parentNode.disabled ||\\n\\t\\t\\t\\t\\t\\t\\t\\t!jQuery.nodeName( option.parentNode, \\\"optgroup\\\" ) ) ) {\\n\\n\\t\\t\\t\\t\\t\\t// Get the specific value for the option\\n\\t\\t\\t\\t\\t\\tvalue = jQuery( option ).val();\\n\\n\\t\\t\\t\\t\\t\\t// We don't need an array for one selects\\n\\t\\t\\t\\t\\t\\tif ( one ) {\\n\\t\\t\\t\\t\\t\\t\\treturn value;\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t// Multi-Selects return an array\\n\\t\\t\\t\\t\\t\\tvalues.push( value );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn values;\\n\\t\\t\\t},\\n\\n\\t\\t\\tset: function( elem, value ) {\\n\\t\\t\\t\\tvar optionSet, option,\\n\\t\\t\\t\\t\\toptions = elem.options,\\n\\t\\t\\t\\t\\tvalues = jQuery.makeArray( value ),\\n\\t\\t\\t\\t\\ti = options.length;\\n\\n\\t\\t\\t\\twhile ( i-- ) {\\n\\t\\t\\t\\t\\toption = options[ i ];\\n\\n\\t\\t\\t\\t\\t/* eslint-disable no-cond-assign */\\n\\n\\t\\t\\t\\t\\tif ( option.selected =\\n\\t\\t\\t\\t\\t\\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\\n\\t\\t\\t\\t\\t) {\\n\\t\\t\\t\\t\\t\\toptionSet = true;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t/* eslint-enable no-cond-assign */\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Force browsers to behave consistently when non-matching value is set\\n\\t\\t\\t\\tif ( !optionSet ) {\\n\\t\\t\\t\\t\\telem.selectedIndex = -1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn values;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n} );\\n\\n// Radios and checkboxes getter/setter\\njQuery.each( [ \\\"radio\\\", \\\"checkbox\\\" ], function() {\\n\\tjQuery.valHooks[ this ] = {\\n\\t\\tset: function( elem, value ) {\\n\\t\\t\\tif ( jQuery.isArray( value ) ) {\\n\\t\\t\\t\\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n\\tif ( !support.checkOn ) {\\n\\t\\tjQuery.valHooks[ this ].get = function( elem ) {\\n\\t\\t\\treturn elem.getAttribute( \\\"value\\\" ) === null ? \\\"on\\\" : elem.value;\\n\\t\\t};\\n\\t}\\n} );\\n\\n\\n\\n\\n// Return jQuery for attributes-only inclusion\\n\\n\\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;\\n\\njQuery.extend( jQuery.event, {\\n\\n\\ttrigger: function( event, data, elem, onlyHandlers ) {\\n\\n\\t\\tvar i, cur, tmp, bubbleType, ontype, handle, special,\\n\\t\\t\\teventPath = [ elem || document ],\\n\\t\\t\\ttype = hasOwn.call( event, \\\"type\\\" ) ? event.type : event,\\n\\t\\t\\tnamespaces = hasOwn.call( event, \\\"namespace\\\" ) ? event.namespace.split( \\\".\\\" ) : [];\\n\\n\\t\\tcur = tmp = elem = elem || document;\\n\\n\\t\\t// Don't do events on text and comment nodes\\n\\t\\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\\n\\t\\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tif ( type.indexOf( \\\".\\\" ) > -1 ) {\\n\\n\\t\\t\\t// Namespaced trigger; create a regexp to match event type in handle()\\n\\t\\t\\tnamespaces = type.split( \\\".\\\" );\\n\\t\\t\\ttype = namespaces.shift();\\n\\t\\t\\tnamespaces.sort();\\n\\t\\t}\\n\\t\\tontype = type.indexOf( \\\":\\\" ) < 0 && \\\"on\\\" + type;\\n\\n\\t\\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\\n\\t\\tevent = event[ jQuery.expando ] ?\\n\\t\\t\\tevent :\\n\\t\\t\\tnew jQuery.Event( type, typeof event === \\\"object\\\" && event );\\n\\n\\t\\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\\n\\t\\tevent.isTrigger = onlyHandlers ? 2 : 3;\\n\\t\\tevent.namespace = namespaces.join( \\\".\\\" );\\n\\t\\tevent.rnamespace = event.namespace ?\\n\\t\\t\\tnew RegExp( \\\"(^|\\\\\\\\.)\\\" + namespaces.join( \\\"\\\\\\\\.(?:.*\\\\\\\\.|)\\\" ) + \\\"(\\\\\\\\.|$)\\\" ) :\\n\\t\\t\\tnull;\\n\\n\\t\\t// Clean up the event in case it is being reused\\n\\t\\tevent.result = undefined;\\n\\t\\tif ( !event.target ) {\\n\\t\\t\\tevent.target = elem;\\n\\t\\t}\\n\\n\\t\\t// Clone any incoming data and prepend the event, creating the handler arg list\\n\\t\\tdata = data == null ?\\n\\t\\t\\t[ event ] :\\n\\t\\t\\tjQuery.makeArray( data, [ event ] );\\n\\n\\t\\t// Allow special events to draw outside the lines\\n\\t\\tspecial = jQuery.event.special[ type ] || {};\\n\\t\\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Determine event propagation path in advance, per W3C events spec (#9951)\\n\\t\\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\\n\\t\\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\\n\\n\\t\\t\\tbubbleType = special.delegateType || type;\\n\\t\\t\\tif ( !rfocusMorph.test( bubbleType + type ) ) {\\n\\t\\t\\t\\tcur = cur.parentNode;\\n\\t\\t\\t}\\n\\t\\t\\tfor ( ; cur; cur = cur.parentNode ) {\\n\\t\\t\\t\\teventPath.push( cur );\\n\\t\\t\\t\\ttmp = cur;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\\n\\t\\t\\tif ( tmp === ( elem.ownerDocument || document ) ) {\\n\\t\\t\\t\\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Fire handlers on the event path\\n\\t\\ti = 0;\\n\\t\\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\\n\\n\\t\\t\\tevent.type = i > 1 ?\\n\\t\\t\\t\\tbubbleType :\\n\\t\\t\\t\\tspecial.bindType || type;\\n\\n\\t\\t\\t// jQuery handler\\n\\t\\t\\thandle = ( dataPriv.get( cur, \\\"events\\\" ) || {} )[ event.type ] &&\\n\\t\\t\\t\\tdataPriv.get( cur, \\\"handle\\\" );\\n\\t\\t\\tif ( handle ) {\\n\\t\\t\\t\\thandle.apply( cur, data );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Native handler\\n\\t\\t\\thandle = ontype && cur[ ontype ];\\n\\t\\t\\tif ( handle && handle.apply && acceptData( cur ) ) {\\n\\t\\t\\t\\tevent.result = handle.apply( cur, data );\\n\\t\\t\\t\\tif ( event.result === false ) {\\n\\t\\t\\t\\t\\tevent.preventDefault();\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tevent.type = type;\\n\\n\\t\\t// If nobody prevented the default action, do it now\\n\\t\\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\\n\\n\\t\\t\\tif ( ( !special._default ||\\n\\t\\t\\t\\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\\n\\t\\t\\t\\tacceptData( elem ) ) {\\n\\n\\t\\t\\t\\t// Call a native DOM method on the target with the same name as the event.\\n\\t\\t\\t\\t// Don't do default actions on window, that's where global variables be (#6170)\\n\\t\\t\\t\\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\\n\\n\\t\\t\\t\\t\\t// Don't re-trigger an onFOO event when we call its FOO() method\\n\\t\\t\\t\\t\\ttmp = elem[ ontype ];\\n\\n\\t\\t\\t\\t\\tif ( tmp ) {\\n\\t\\t\\t\\t\\t\\telem[ ontype ] = null;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// Prevent re-triggering of the same event, since we already bubbled it above\\n\\t\\t\\t\\t\\tjQuery.event.triggered = type;\\n\\t\\t\\t\\t\\telem[ type ]();\\n\\t\\t\\t\\t\\tjQuery.event.triggered = undefined;\\n\\n\\t\\t\\t\\t\\tif ( tmp ) {\\n\\t\\t\\t\\t\\t\\telem[ ontype ] = tmp;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn event.result;\\n\\t},\\n\\n\\t// Piggyback on a donor event to simulate a different one\\n\\t// Used only for `focus(in | out)` events\\n\\tsimulate: function( type, elem, event ) {\\n\\t\\tvar e = jQuery.extend(\\n\\t\\t\\tnew jQuery.Event(),\\n\\t\\t\\tevent,\\n\\t\\t\\t{\\n\\t\\t\\t\\ttype: type,\\n\\t\\t\\t\\tisSimulated: true\\n\\t\\t\\t}\\n\\t\\t);\\n\\n\\t\\tjQuery.event.trigger( e, null, elem );\\n\\t}\\n\\n} );\\n\\njQuery.fn.extend( {\\n\\n\\ttrigger: function( type, data ) {\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tjQuery.event.trigger( type, data, this );\\n\\t\\t} );\\n\\t},\\n\\ttriggerHandler: function( type, data ) {\\n\\t\\tvar elem = this[ 0 ];\\n\\t\\tif ( elem ) {\\n\\t\\t\\treturn jQuery.event.trigger( type, data, elem, true );\\n\\t\\t}\\n\\t}\\n} );\\n\\n\\njQuery.each( ( \\\"blur focus focusin focusout resize scroll click dblclick \\\" +\\n\\t\\\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \\\" +\\n\\t\\\"change select submit keydown keypress keyup contextmenu\\\" ).split( \\\" \\\" ),\\n\\tfunction( i, name ) {\\n\\n\\t// Handle event binding\\n\\tjQuery.fn[ name ] = function( data, fn ) {\\n\\t\\treturn arguments.length > 0 ?\\n\\t\\t\\tthis.on( name, null, data, fn ) :\\n\\t\\t\\tthis.trigger( name );\\n\\t};\\n} );\\n\\njQuery.fn.extend( {\\n\\thover: function( fnOver, fnOut ) {\\n\\t\\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\\n\\t}\\n} );\\n\\n\\n\\n\\nsupport.focusin = \\\"onfocusin\\\" in window;\\n\\n\\n// Support: Firefox <=44\\n// Firefox doesn't have focus(in | out) events\\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\\n//\\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\\n// focus(in | out) events fire after focus & blur events,\\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\\nif ( !support.focusin ) {\\n\\tjQuery.each( { focus: \\\"focusin\\\", blur: \\\"focusout\\\" }, function( orig, fix ) {\\n\\n\\t\\t// Attach a single capturing handler on the document while someone wants focusin/focusout\\n\\t\\tvar handler = function( event ) {\\n\\t\\t\\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\\n\\t\\t};\\n\\n\\t\\tjQuery.event.special[ fix ] = {\\n\\t\\t\\tsetup: function() {\\n\\t\\t\\t\\tvar doc = this.ownerDocument || this,\\n\\t\\t\\t\\t\\tattaches = dataPriv.access( doc, fix );\\n\\n\\t\\t\\t\\tif ( !attaches ) {\\n\\t\\t\\t\\t\\tdoc.addEventListener( orig, handler, true );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\\n\\t\\t\\t},\\n\\t\\t\\tteardown: function() {\\n\\t\\t\\t\\tvar doc = this.ownerDocument || this,\\n\\t\\t\\t\\t\\tattaches = dataPriv.access( doc, fix ) - 1;\\n\\n\\t\\t\\t\\tif ( !attaches ) {\\n\\t\\t\\t\\t\\tdoc.removeEventListener( orig, handler, true );\\n\\t\\t\\t\\t\\tdataPriv.remove( doc, fix );\\n\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tdataPriv.access( doc, fix, attaches );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t};\\n\\t} );\\n}\\nvar location = window.location;\\n\\nvar nonce = jQuery.now();\\n\\nvar rquery = ( /\\\\?/ );\\n\\n\\n\\n// Cross-browser xml parsing\\njQuery.parseXML = function( data ) {\\n\\tvar xml;\\n\\tif ( !data || typeof data !== \\\"string\\\" ) {\\n\\t\\treturn null;\\n\\t}\\n\\n\\t// Support: IE 9 - 11 only\\n\\t// IE throws on parseFromString with invalid input.\\n\\ttry {\\n\\t\\txml = ( new window.DOMParser() ).parseFromString( data, \\\"text/xml\\\" );\\n\\t} catch ( e ) {\\n\\t\\txml = undefined;\\n\\t}\\n\\n\\tif ( !xml || xml.getElementsByTagName( \\\"parsererror\\\" ).length ) {\\n\\t\\tjQuery.error( \\\"Invalid XML: \\\" + data );\\n\\t}\\n\\treturn xml;\\n};\\n\\n\\nvar\\n\\trbracket = /\\\\[\\\\]$/,\\n\\trCRLF = /\\\\r?\\\\n/g,\\n\\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\\n\\trsubmittable = /^(?:input|select|textarea|keygen)/i;\\n\\nfunction buildParams( prefix, obj, traditional, add ) {\\n\\tvar name;\\n\\n\\tif ( jQuery.isArray( obj ) ) {\\n\\n\\t\\t// Serialize array item.\\n\\t\\tjQuery.each( obj, function( i, v ) {\\n\\t\\t\\tif ( traditional || rbracket.test( prefix ) ) {\\n\\n\\t\\t\\t\\t// Treat each array item as a scalar.\\n\\t\\t\\t\\tadd( prefix, v );\\n\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t// Item is non-scalar (array or object), encode its numeric index.\\n\\t\\t\\t\\tbuildParams(\\n\\t\\t\\t\\t\\tprefix + \\\"[\\\" + ( typeof v === \\\"object\\\" && v != null ? i : \\\"\\\" ) + \\\"]\\\",\\n\\t\\t\\t\\t\\tv,\\n\\t\\t\\t\\t\\ttraditional,\\n\\t\\t\\t\\t\\tadd\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\t\\t} );\\n\\n\\t} else if ( !traditional && jQuery.type( obj ) === \\\"object\\\" ) {\\n\\n\\t\\t// Serialize object item.\\n\\t\\tfor ( name in obj ) {\\n\\t\\t\\tbuildParams( prefix + \\\"[\\\" + name + \\\"]\\\", obj[ name ], traditional, add );\\n\\t\\t}\\n\\n\\t} else {\\n\\n\\t\\t// Serialize scalar item.\\n\\t\\tadd( prefix, obj );\\n\\t}\\n}\\n\\n// Serialize an array of form elements or a set of\\n// key/values into a query string\\njQuery.param = function( a, traditional ) {\\n\\tvar prefix,\\n\\t\\ts = [],\\n\\t\\tadd = function( key, valueOrFunction ) {\\n\\n\\t\\t\\t// If value is a function, invoke it and use its return value\\n\\t\\t\\tvar value = jQuery.isFunction( valueOrFunction ) ?\\n\\t\\t\\t\\tvalueOrFunction() :\\n\\t\\t\\t\\tvalueOrFunction;\\n\\n\\t\\t\\ts[ s.length ] = encodeURIComponent( key ) + \\\"=\\\" +\\n\\t\\t\\t\\tencodeURIComponent( value == null ? \\\"\\\" : value );\\n\\t\\t};\\n\\n\\t// If an array was passed in, assume that it is an array of form elements.\\n\\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\\n\\n\\t\\t// Serialize the form elements\\n\\t\\tjQuery.each( a, function() {\\n\\t\\t\\tadd( this.name, this.value );\\n\\t\\t} );\\n\\n\\t} else {\\n\\n\\t\\t// If traditional, encode the \\\"old\\\" way (the way 1.3.2 or older\\n\\t\\t// did it), otherwise encode params recursively.\\n\\t\\tfor ( prefix in a ) {\\n\\t\\t\\tbuildParams( prefix, a[ prefix ], traditional, add );\\n\\t\\t}\\n\\t}\\n\\n\\t// Return the resulting serialization\\n\\treturn s.join( \\\"&\\\" );\\n};\\n\\njQuery.fn.extend( {\\n\\tserialize: function() {\\n\\t\\treturn jQuery.param( this.serializeArray() );\\n\\t},\\n\\tserializeArray: function() {\\n\\t\\treturn this.map( function() {\\n\\n\\t\\t\\t// Can add propHook for \\\"elements\\\" to filter or add form elements\\n\\t\\t\\tvar elements = jQuery.prop( this, \\\"elements\\\" );\\n\\t\\t\\treturn elements ? jQuery.makeArray( elements ) : this;\\n\\t\\t} )\\n\\t\\t.filter( function() {\\n\\t\\t\\tvar type = this.type;\\n\\n\\t\\t\\t// Use .is( \\\":disabled\\\" ) so that fieldset[disabled] works\\n\\t\\t\\treturn this.name && !jQuery( this ).is( \\\":disabled\\\" ) &&\\n\\t\\t\\t\\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\\n\\t\\t\\t\\t( this.checked || !rcheckableType.test( type ) );\\n\\t\\t} )\\n\\t\\t.map( function( i, elem ) {\\n\\t\\t\\tvar val = jQuery( this ).val();\\n\\n\\t\\t\\tif ( val == null ) {\\n\\t\\t\\t\\treturn null;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( jQuery.isArray( val ) ) {\\n\\t\\t\\t\\treturn jQuery.map( val, function( val ) {\\n\\t\\t\\t\\t\\treturn { name: elem.name, value: val.replace( rCRLF, \\\"\\\\r\\\\n\\\" ) };\\n\\t\\t\\t\\t} );\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn { name: elem.name, value: val.replace( rCRLF, \\\"\\\\r\\\\n\\\" ) };\\n\\t\\t} ).get();\\n\\t}\\n} );\\n\\n\\nvar\\n\\tr20 = /%20/g,\\n\\trhash = /#.*$/,\\n\\trantiCache = /([?&])_=[^&]*/,\\n\\trheaders = /^(.*?):[ \\\\t]*([^\\\\r\\\\n]*)$/mg,\\n\\n\\t// #7653, #8125, #8152: local protocol detection\\n\\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\\n\\trnoContent = /^(?:GET|HEAD)$/,\\n\\trprotocol = /^\\\\/\\\\//,\\n\\n\\t/* Prefilters\\n\\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\\n\\t * 2) These are called:\\n\\t * - BEFORE asking for a transport\\n\\t * - AFTER param serialization (s.data is a string if s.processData is true)\\n\\t * 3) key is the dataType\\n\\t * 4) the catchall symbol \\\"*\\\" can be used\\n\\t * 5) execution will start with transport dataType and THEN continue down to \\\"*\\\" if needed\\n\\t */\\n\\tprefilters = {},\\n\\n\\t/* Transports bindings\\n\\t * 1) key is the dataType\\n\\t * 2) the catchall symbol \\\"*\\\" can be used\\n\\t * 3) selection will start with transport dataType and THEN go to \\\"*\\\" if needed\\n\\t */\\n\\ttransports = {},\\n\\n\\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\\n\\tallTypes = \\\"*/\\\".concat( \\\"*\\\" ),\\n\\n\\t// Anchor tag for parsing the document origin\\n\\toriginAnchor = document.createElement( \\\"a\\\" );\\n\\toriginAnchor.href = location.href;\\n\\n// Base \\\"constructor\\\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\\nfunction addToPrefiltersOrTransports( structure ) {\\n\\n\\t// dataTypeExpression is optional and defaults to \\\"*\\\"\\n\\treturn function( dataTypeExpression, func ) {\\n\\n\\t\\tif ( typeof dataTypeExpression !== \\\"string\\\" ) {\\n\\t\\t\\tfunc = dataTypeExpression;\\n\\t\\t\\tdataTypeExpression = \\\"*\\\";\\n\\t\\t}\\n\\n\\t\\tvar dataType,\\n\\t\\t\\ti = 0,\\n\\t\\t\\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\\n\\n\\t\\tif ( jQuery.isFunction( func ) ) {\\n\\n\\t\\t\\t// For each dataType in the dataTypeExpression\\n\\t\\t\\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\\n\\n\\t\\t\\t\\t// Prepend if requested\\n\\t\\t\\t\\tif ( dataType[ 0 ] === \\\"+\\\" ) {\\n\\t\\t\\t\\t\\tdataType = dataType.slice( 1 ) || \\\"*\\\";\\n\\t\\t\\t\\t\\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\\n\\n\\t\\t\\t\\t// Otherwise append\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t};\\n}\\n\\n// Base inspection function for prefilters and transports\\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\\n\\n\\tvar inspected = {},\\n\\t\\tseekingTransport = ( structure === transports );\\n\\n\\tfunction inspect( dataType ) {\\n\\t\\tvar selected;\\n\\t\\tinspected[ dataType ] = true;\\n\\t\\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\\n\\t\\t\\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\\n\\t\\t\\tif ( typeof dataTypeOrTransport === \\\"string\\\" &&\\n\\t\\t\\t\\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\\n\\n\\t\\t\\t\\toptions.dataTypes.unshift( dataTypeOrTransport );\\n\\t\\t\\t\\tinspect( dataTypeOrTransport );\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t} else if ( seekingTransport ) {\\n\\t\\t\\t\\treturn !( selected = dataTypeOrTransport );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t\\treturn selected;\\n\\t}\\n\\n\\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \\\"*\\\" ] && inspect( \\\"*\\\" );\\n}\\n\\n// A special extend for ajax options\\n// that takes \\\"flat\\\" options (not to be deep extended)\\n// Fixes #9887\\nfunction ajaxExtend( target, src ) {\\n\\tvar key, deep,\\n\\t\\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\\n\\n\\tfor ( key in src ) {\\n\\t\\tif ( src[ key ] !== undefined ) {\\n\\t\\t\\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\\n\\t\\t}\\n\\t}\\n\\tif ( deep ) {\\n\\t\\tjQuery.extend( true, target, deep );\\n\\t}\\n\\n\\treturn target;\\n}\\n\\n/* Handles responses to an ajax request:\\n * - finds the right dataType (mediates between content-type and expected dataType)\\n * - returns the corresponding response\\n */\\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\\n\\n\\tvar ct, type, finalDataType, firstDataType,\\n\\t\\tcontents = s.contents,\\n\\t\\tdataTypes = s.dataTypes;\\n\\n\\t// Remove auto dataType and get content-type in the process\\n\\twhile ( dataTypes[ 0 ] === \\\"*\\\" ) {\\n\\t\\tdataTypes.shift();\\n\\t\\tif ( ct === undefined ) {\\n\\t\\t\\tct = s.mimeType || jqXHR.getResponseHeader( \\\"Content-Type\\\" );\\n\\t\\t}\\n\\t}\\n\\n\\t// Check if we're dealing with a known content-type\\n\\tif ( ct ) {\\n\\t\\tfor ( type in contents ) {\\n\\t\\t\\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\\n\\t\\t\\t\\tdataTypes.unshift( type );\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t// Check to see if we have a response for the expected dataType\\n\\tif ( dataTypes[ 0 ] in responses ) {\\n\\t\\tfinalDataType = dataTypes[ 0 ];\\n\\t} else {\\n\\n\\t\\t// Try convertible dataTypes\\n\\t\\tfor ( type in responses ) {\\n\\t\\t\\tif ( !dataTypes[ 0 ] || s.converters[ type + \\\" \\\" + dataTypes[ 0 ] ] ) {\\n\\t\\t\\t\\tfinalDataType = type;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t\\tif ( !firstDataType ) {\\n\\t\\t\\t\\tfirstDataType = type;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Or just use first one\\n\\t\\tfinalDataType = finalDataType || firstDataType;\\n\\t}\\n\\n\\t// If we found a dataType\\n\\t// We add the dataType to the list if needed\\n\\t// and return the corresponding response\\n\\tif ( finalDataType ) {\\n\\t\\tif ( finalDataType !== dataTypes[ 0 ] ) {\\n\\t\\t\\tdataTypes.unshift( finalDataType );\\n\\t\\t}\\n\\t\\treturn responses[ finalDataType ];\\n\\t}\\n}\\n\\n/* Chain conversions given the request and the original response\\n * Also sets the responseXXX fields on the jqXHR instance\\n */\\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\\n\\tvar conv2, current, conv, tmp, prev,\\n\\t\\tconverters = {},\\n\\n\\t\\t// Work with a copy of dataTypes in case we need to modify it for conversion\\n\\t\\tdataTypes = s.dataTypes.slice();\\n\\n\\t// Create converters map with lowercased keys\\n\\tif ( dataTypes[ 1 ] ) {\\n\\t\\tfor ( conv in s.converters ) {\\n\\t\\t\\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\\n\\t\\t}\\n\\t}\\n\\n\\tcurrent = dataTypes.shift();\\n\\n\\t// Convert to each sequential dataType\\n\\twhile ( current ) {\\n\\n\\t\\tif ( s.responseFields[ current ] ) {\\n\\t\\t\\tjqXHR[ s.responseFields[ current ] ] = response;\\n\\t\\t}\\n\\n\\t\\t// Apply the dataFilter if provided\\n\\t\\tif ( !prev && isSuccess && s.dataFilter ) {\\n\\t\\t\\tresponse = s.dataFilter( response, s.dataType );\\n\\t\\t}\\n\\n\\t\\tprev = current;\\n\\t\\tcurrent = dataTypes.shift();\\n\\n\\t\\tif ( current ) {\\n\\n\\t\\t\\t// There's only work to do if current dataType is non-auto\\n\\t\\t\\tif ( current === \\\"*\\\" ) {\\n\\n\\t\\t\\t\\tcurrent = prev;\\n\\n\\t\\t\\t// Convert response if prev dataType is non-auto and differs from current\\n\\t\\t\\t} else if ( prev !== \\\"*\\\" && prev !== current ) {\\n\\n\\t\\t\\t\\t// Seek a direct converter\\n\\t\\t\\t\\tconv = converters[ prev + \\\" \\\" + current ] || converters[ \\\"* \\\" + current ];\\n\\n\\t\\t\\t\\t// If none found, seek a pair\\n\\t\\t\\t\\tif ( !conv ) {\\n\\t\\t\\t\\t\\tfor ( conv2 in converters ) {\\n\\n\\t\\t\\t\\t\\t\\t// If conv2 outputs current\\n\\t\\t\\t\\t\\t\\ttmp = conv2.split( \\\" \\\" );\\n\\t\\t\\t\\t\\t\\tif ( tmp[ 1 ] === current ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// If prev can be converted to accepted input\\n\\t\\t\\t\\t\\t\\t\\tconv = converters[ prev + \\\" \\\" + tmp[ 0 ] ] ||\\n\\t\\t\\t\\t\\t\\t\\t\\tconverters[ \\\"* \\\" + tmp[ 0 ] ];\\n\\t\\t\\t\\t\\t\\t\\tif ( conv ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Condense equivalence converters\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( conv === true ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tconv = converters[ conv2 ];\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Otherwise, insert the intermediate dataType\\n\\t\\t\\t\\t\\t\\t\\t\\t} else if ( converters[ conv2 ] !== true ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcurrent = tmp[ 0 ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tdataTypes.unshift( tmp[ 1 ] );\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Apply converter (if not an equivalence)\\n\\t\\t\\t\\tif ( conv !== true ) {\\n\\n\\t\\t\\t\\t\\t// Unless errors are allowed to bubble, catch and return them\\n\\t\\t\\t\\t\\tif ( conv && s.throws ) {\\n\\t\\t\\t\\t\\t\\tresponse = conv( response );\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\t\\t\\tresponse = conv( response );\\n\\t\\t\\t\\t\\t\\t} catch ( e ) {\\n\\t\\t\\t\\t\\t\\t\\treturn {\\n\\t\\t\\t\\t\\t\\t\\t\\tstate: \\\"parsererror\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\terror: conv ? e : \\\"No conversion from \\\" + prev + \\\" to \\\" + current\\n\\t\\t\\t\\t\\t\\t\\t};\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn { state: \\\"success\\\", data: response };\\n}\\n\\njQuery.extend( {\\n\\n\\t// Counter for holding the number of active queries\\n\\tactive: 0,\\n\\n\\t// Last-Modified header cache for next request\\n\\tlastModified: {},\\n\\tetag: {},\\n\\n\\tajaxSettings: {\\n\\t\\turl: location.href,\\n\\t\\ttype: \\\"GET\\\",\\n\\t\\tisLocal: rlocalProtocol.test( location.protocol ),\\n\\t\\tglobal: true,\\n\\t\\tprocessData: true,\\n\\t\\tasync: true,\\n\\t\\tcontentType: \\\"application/x-www-form-urlencoded; charset=UTF-8\\\",\\n\\n\\t\\t/*\\n\\t\\ttimeout: 0,\\n\\t\\tdata: null,\\n\\t\\tdataType: null,\\n\\t\\tusername: null,\\n\\t\\tpassword: null,\\n\\t\\tcache: null,\\n\\t\\tthrows: false,\\n\\t\\ttraditional: false,\\n\\t\\theaders: {},\\n\\t\\t*/\\n\\n\\t\\taccepts: {\\n\\t\\t\\t\\\"*\\\": allTypes,\\n\\t\\t\\ttext: \\\"text/plain\\\",\\n\\t\\t\\thtml: \\\"text/html\\\",\\n\\t\\t\\txml: \\\"application/xml, text/xml\\\",\\n\\t\\t\\tjson: \\\"application/json, text/javascript\\\"\\n\\t\\t},\\n\\n\\t\\tcontents: {\\n\\t\\t\\txml: /\\\\bxml\\\\b/,\\n\\t\\t\\thtml: /\\\\bhtml/,\\n\\t\\t\\tjson: /\\\\bjson\\\\b/\\n\\t\\t},\\n\\n\\t\\tresponseFields: {\\n\\t\\t\\txml: \\\"responseXML\\\",\\n\\t\\t\\ttext: \\\"responseText\\\",\\n\\t\\t\\tjson: \\\"responseJSON\\\"\\n\\t\\t},\\n\\n\\t\\t// Data converters\\n\\t\\t// Keys separate source (or catchall \\\"*\\\") and destination types with a single space\\n\\t\\tconverters: {\\n\\n\\t\\t\\t// Convert anything to text\\n\\t\\t\\t\\\"* text\\\": String,\\n\\n\\t\\t\\t// Text to html (true = no transformation)\\n\\t\\t\\t\\\"text html\\\": true,\\n\\n\\t\\t\\t// Evaluate text as a json expression\\n\\t\\t\\t\\\"text json\\\": JSON.parse,\\n\\n\\t\\t\\t// Parse text as xml\\n\\t\\t\\t\\\"text xml\\\": jQuery.parseXML\\n\\t\\t},\\n\\n\\t\\t// For options that shouldn't be deep extended:\\n\\t\\t// you can add your own custom options here if\\n\\t\\t// and when you create one that shouldn't be\\n\\t\\t// deep extended (see ajaxExtend)\\n\\t\\tflatOptions: {\\n\\t\\t\\turl: true,\\n\\t\\t\\tcontext: true\\n\\t\\t}\\n\\t},\\n\\n\\t// Creates a full fledged settings object into target\\n\\t// with both ajaxSettings and settings fields.\\n\\t// If target is omitted, writes into ajaxSettings.\\n\\tajaxSetup: function( target, settings ) {\\n\\t\\treturn settings ?\\n\\n\\t\\t\\t// Building a settings object\\n\\t\\t\\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\\n\\n\\t\\t\\t// Extending ajaxSettings\\n\\t\\t\\tajaxExtend( jQuery.ajaxSettings, target );\\n\\t},\\n\\n\\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\\n\\tajaxTransport: addToPrefiltersOrTransports( transports ),\\n\\n\\t// Main method\\n\\tajax: function( url, options ) {\\n\\n\\t\\t// If url is an object, simulate pre-1.5 signature\\n\\t\\tif ( typeof url === \\\"object\\\" ) {\\n\\t\\t\\toptions = url;\\n\\t\\t\\turl = undefined;\\n\\t\\t}\\n\\n\\t\\t// Force options to be an object\\n\\t\\toptions = options || {};\\n\\n\\t\\tvar transport,\\n\\n\\t\\t\\t// URL without anti-cache param\\n\\t\\t\\tcacheURL,\\n\\n\\t\\t\\t// Response headers\\n\\t\\t\\tresponseHeadersString,\\n\\t\\t\\tresponseHeaders,\\n\\n\\t\\t\\t// timeout handle\\n\\t\\t\\ttimeoutTimer,\\n\\n\\t\\t\\t// Url cleanup var\\n\\t\\t\\turlAnchor,\\n\\n\\t\\t\\t// Request state (becomes false upon send and true upon completion)\\n\\t\\t\\tcompleted,\\n\\n\\t\\t\\t// To know if global events are to be dispatched\\n\\t\\t\\tfireGlobals,\\n\\n\\t\\t\\t// Loop variable\\n\\t\\t\\ti,\\n\\n\\t\\t\\t// uncached part of the url\\n\\t\\t\\tuncached,\\n\\n\\t\\t\\t// Create the final options object\\n\\t\\t\\ts = jQuery.ajaxSetup( {}, options ),\\n\\n\\t\\t\\t// Callbacks context\\n\\t\\t\\tcallbackContext = s.context || s,\\n\\n\\t\\t\\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\\n\\t\\t\\tglobalEventContext = s.context &&\\n\\t\\t\\t\\t( callbackContext.nodeType || callbackContext.jquery ) ?\\n\\t\\t\\t\\t\\tjQuery( callbackContext ) :\\n\\t\\t\\t\\t\\tjQuery.event,\\n\\n\\t\\t\\t// Deferreds\\n\\t\\t\\tdeferred = jQuery.Deferred(),\\n\\t\\t\\tcompleteDeferred = jQuery.Callbacks( \\\"once memory\\\" ),\\n\\n\\t\\t\\t// Status-dependent callbacks\\n\\t\\t\\tstatusCode = s.statusCode || {},\\n\\n\\t\\t\\t// Headers (they are sent all at once)\\n\\t\\t\\trequestHeaders = {},\\n\\t\\t\\trequestHeadersNames = {},\\n\\n\\t\\t\\t// Default abort message\\n\\t\\t\\tstrAbort = \\\"canceled\\\",\\n\\n\\t\\t\\t// Fake xhr\\n\\t\\t\\tjqXHR = {\\n\\t\\t\\t\\treadyState: 0,\\n\\n\\t\\t\\t\\t// Builds headers hashtable if needed\\n\\t\\t\\t\\tgetResponseHeader: function( key ) {\\n\\t\\t\\t\\t\\tvar match;\\n\\t\\t\\t\\t\\tif ( completed ) {\\n\\t\\t\\t\\t\\t\\tif ( !responseHeaders ) {\\n\\t\\t\\t\\t\\t\\t\\tresponseHeaders = {};\\n\\t\\t\\t\\t\\t\\t\\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tresponseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tmatch = responseHeaders[ key.toLowerCase() ];\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn match == null ? null : match;\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Raw string\\n\\t\\t\\t\\tgetAllResponseHeaders: function() {\\n\\t\\t\\t\\t\\treturn completed ? responseHeadersString : null;\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Caches the header\\n\\t\\t\\t\\tsetRequestHeader: function( name, value ) {\\n\\t\\t\\t\\t\\tif ( completed == null ) {\\n\\t\\t\\t\\t\\t\\tname = requestHeadersNames[ name.toLowerCase() ] =\\n\\t\\t\\t\\t\\t\\t\\trequestHeadersNames[ name.toLowerCase() ] || name;\\n\\t\\t\\t\\t\\t\\trequestHeaders[ name ] = value;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Overrides response content-type header\\n\\t\\t\\t\\toverrideMimeType: function( type ) {\\n\\t\\t\\t\\t\\tif ( completed == null ) {\\n\\t\\t\\t\\t\\t\\ts.mimeType = type;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Status-dependent callbacks\\n\\t\\t\\t\\tstatusCode: function( map ) {\\n\\t\\t\\t\\t\\tvar code;\\n\\t\\t\\t\\t\\tif ( map ) {\\n\\t\\t\\t\\t\\t\\tif ( completed ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Execute the appropriate callbacks\\n\\t\\t\\t\\t\\t\\t\\tjqXHR.always( map[ jqXHR.status ] );\\n\\t\\t\\t\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Lazy-add the new callbacks in a way that preserves old ones\\n\\t\\t\\t\\t\\t\\t\\tfor ( code in map ) {\\n\\t\\t\\t\\t\\t\\t\\t\\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\t// Cancel the request\\n\\t\\t\\t\\tabort: function( statusText ) {\\n\\t\\t\\t\\t\\tvar finalText = statusText || strAbort;\\n\\t\\t\\t\\t\\tif ( transport ) {\\n\\t\\t\\t\\t\\t\\ttransport.abort( finalText );\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tdone( 0, finalText );\\n\\t\\t\\t\\t\\treturn this;\\n\\t\\t\\t\\t}\\n\\t\\t\\t};\\n\\n\\t\\t// Attach deferreds\\n\\t\\tdeferred.promise( jqXHR );\\n\\n\\t\\t// Add protocol if not provided (prefilters might expect it)\\n\\t\\t// Handle falsy url in the settings object (#10093: consistency with old signature)\\n\\t\\t// We also use the url parameter if available\\n\\t\\ts.url = ( ( url || s.url || location.href ) + \\\"\\\" )\\n\\t\\t\\t.replace( rprotocol, location.protocol + \\\"//\\\" );\\n\\n\\t\\t// Alias method option to type as per ticket #12004\\n\\t\\ts.type = options.method || options.type || s.method || s.type;\\n\\n\\t\\t// Extract dataTypes list\\n\\t\\ts.dataTypes = ( s.dataType || \\\"*\\\" ).toLowerCase().match( rnothtmlwhite ) || [ \\\"\\\" ];\\n\\n\\t\\t// A cross-domain request is in order when the origin doesn't match the current origin.\\n\\t\\tif ( s.crossDomain == null ) {\\n\\t\\t\\turlAnchor = document.createElement( \\\"a\\\" );\\n\\n\\t\\t\\t// Support: IE <=8 - 11, Edge 12 - 13\\n\\t\\t\\t// IE throws exception on accessing the href property if url is malformed,\\n\\t\\t\\t// e.g. http://example.com:80x/\\n\\t\\t\\ttry {\\n\\t\\t\\t\\turlAnchor.href = s.url;\\n\\n\\t\\t\\t\\t// Support: IE <=8 - 11 only\\n\\t\\t\\t\\t// Anchor's host property isn't correctly set when s.url is relative\\n\\t\\t\\t\\turlAnchor.href = urlAnchor.href;\\n\\t\\t\\t\\ts.crossDomain = originAnchor.protocol + \\\"//\\\" + originAnchor.host !==\\n\\t\\t\\t\\t\\turlAnchor.protocol + \\\"//\\\" + urlAnchor.host;\\n\\t\\t\\t} catch ( e ) {\\n\\n\\t\\t\\t\\t// If there is an error parsing the URL, assume it is crossDomain,\\n\\t\\t\\t\\t// it can be rejected by the transport if it is invalid\\n\\t\\t\\t\\ts.crossDomain = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Convert data if not already a string\\n\\t\\tif ( s.data && s.processData && typeof s.data !== \\\"string\\\" ) {\\n\\t\\t\\ts.data = jQuery.param( s.data, s.traditional );\\n\\t\\t}\\n\\n\\t\\t// Apply prefilters\\n\\t\\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\\n\\n\\t\\t// If request was aborted inside a prefilter, stop there\\n\\t\\tif ( completed ) {\\n\\t\\t\\treturn jqXHR;\\n\\t\\t}\\n\\n\\t\\t// We can fire global events as of now if asked to\\n\\t\\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\\n\\t\\tfireGlobals = jQuery.event && s.global;\\n\\n\\t\\t// Watch for a new set of requests\\n\\t\\tif ( fireGlobals && jQuery.active++ === 0 ) {\\n\\t\\t\\tjQuery.event.trigger( \\\"ajaxStart\\\" );\\n\\t\\t}\\n\\n\\t\\t// Uppercase the type\\n\\t\\ts.type = s.type.toUpperCase();\\n\\n\\t\\t// Determine if request has content\\n\\t\\ts.hasContent = !rnoContent.test( s.type );\\n\\n\\t\\t// Save the URL in case we're toying with the If-Modified-Since\\n\\t\\t// and/or If-None-Match header later on\\n\\t\\t// Remove hash to simplify url manipulation\\n\\t\\tcacheURL = s.url.replace( rhash, \\\"\\\" );\\n\\n\\t\\t// More options handling for requests with no content\\n\\t\\tif ( !s.hasContent ) {\\n\\n\\t\\t\\t// Remember the hash so we can put it back\\n\\t\\t\\tuncached = s.url.slice( cacheURL.length );\\n\\n\\t\\t\\t// If data is available, append data to url\\n\\t\\t\\tif ( s.data ) {\\n\\t\\t\\t\\tcacheURL += ( rquery.test( cacheURL ) ? \\\"&\\\" : \\\"?\\\" ) + s.data;\\n\\n\\t\\t\\t\\t// #9682: remove data so that it's not used in an eventual retry\\n\\t\\t\\t\\tdelete s.data;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Add or update anti-cache param if needed\\n\\t\\t\\tif ( s.cache === false ) {\\n\\t\\t\\t\\tcacheURL = cacheURL.replace( rantiCache, \\\"$1\\\" );\\n\\t\\t\\t\\tuncached = ( rquery.test( cacheURL ) ? \\\"&\\\" : \\\"?\\\" ) + \\\"_=\\\" + ( nonce++ ) + uncached;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\\n\\t\\t\\ts.url = cacheURL + uncached;\\n\\n\\t\\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\\n\\t\\t} else if ( s.data && s.processData &&\\n\\t\\t\\t( s.contentType || \\\"\\\" ).indexOf( \\\"application/x-www-form-urlencoded\\\" ) === 0 ) {\\n\\t\\t\\ts.data = s.data.replace( r20, \\\"+\\\" );\\n\\t\\t}\\n\\n\\t\\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\\n\\t\\tif ( s.ifModified ) {\\n\\t\\t\\tif ( jQuery.lastModified[ cacheURL ] ) {\\n\\t\\t\\t\\tjqXHR.setRequestHeader( \\\"If-Modified-Since\\\", jQuery.lastModified[ cacheURL ] );\\n\\t\\t\\t}\\n\\t\\t\\tif ( jQuery.etag[ cacheURL ] ) {\\n\\t\\t\\t\\tjqXHR.setRequestHeader( \\\"If-None-Match\\\", jQuery.etag[ cacheURL ] );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Set the correct header, if data is being sent\\n\\t\\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\\n\\t\\t\\tjqXHR.setRequestHeader( \\\"Content-Type\\\", s.contentType );\\n\\t\\t}\\n\\n\\t\\t// Set the Accepts header for the server, depending on the dataType\\n\\t\\tjqXHR.setRequestHeader(\\n\\t\\t\\t\\\"Accept\\\",\\n\\t\\t\\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\\n\\t\\t\\t\\ts.accepts[ s.dataTypes[ 0 ] ] +\\n\\t\\t\\t\\t\\t( s.dataTypes[ 0 ] !== \\\"*\\\" ? \\\", \\\" + allTypes + \\\"; q=0.01\\\" : \\\"\\\" ) :\\n\\t\\t\\t\\ts.accepts[ \\\"*\\\" ]\\n\\t\\t);\\n\\n\\t\\t// Check for headers option\\n\\t\\tfor ( i in s.headers ) {\\n\\t\\t\\tjqXHR.setRequestHeader( i, s.headers[ i ] );\\n\\t\\t}\\n\\n\\t\\t// Allow custom headers/mimetypes and early abort\\n\\t\\tif ( s.beforeSend &&\\n\\t\\t\\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\\n\\n\\t\\t\\t// Abort if not done already and return\\n\\t\\t\\treturn jqXHR.abort();\\n\\t\\t}\\n\\n\\t\\t// Aborting is no longer a cancellation\\n\\t\\tstrAbort = \\\"abort\\\";\\n\\n\\t\\t// Install callbacks on deferreds\\n\\t\\tcompleteDeferred.add( s.complete );\\n\\t\\tjqXHR.done( s.success );\\n\\t\\tjqXHR.fail( s.error );\\n\\n\\t\\t// Get transport\\n\\t\\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\\n\\n\\t\\t// If no transport, we auto-abort\\n\\t\\tif ( !transport ) {\\n\\t\\t\\tdone( -1, \\\"No Transport\\\" );\\n\\t\\t} else {\\n\\t\\t\\tjqXHR.readyState = 1;\\n\\n\\t\\t\\t// Send global event\\n\\t\\t\\tif ( fireGlobals ) {\\n\\t\\t\\t\\tglobalEventContext.trigger( \\\"ajaxSend\\\", [ jqXHR, s ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// If request was aborted inside ajaxSend, stop there\\n\\t\\t\\tif ( completed ) {\\n\\t\\t\\t\\treturn jqXHR;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Timeout\\n\\t\\t\\tif ( s.async && s.timeout > 0 ) {\\n\\t\\t\\t\\ttimeoutTimer = window.setTimeout( function() {\\n\\t\\t\\t\\t\\tjqXHR.abort( \\\"timeout\\\" );\\n\\t\\t\\t\\t}, s.timeout );\\n\\t\\t\\t}\\n\\n\\t\\t\\ttry {\\n\\t\\t\\t\\tcompleted = false;\\n\\t\\t\\t\\ttransport.send( requestHeaders, done );\\n\\t\\t\\t} catch ( e ) {\\n\\n\\t\\t\\t\\t// Rethrow post-completion exceptions\\n\\t\\t\\t\\tif ( completed ) {\\n\\t\\t\\t\\t\\tthrow e;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Propagate others as results\\n\\t\\t\\t\\tdone( -1, e );\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Callback for when everything is done\\n\\t\\tfunction done( status, nativeStatusText, responses, headers ) {\\n\\t\\t\\tvar isSuccess, success, error, response, modified,\\n\\t\\t\\t\\tstatusText = nativeStatusText;\\n\\n\\t\\t\\t// Ignore repeat invocations\\n\\t\\t\\tif ( completed ) {\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\n\\t\\t\\tcompleted = true;\\n\\n\\t\\t\\t// Clear timeout if it exists\\n\\t\\t\\tif ( timeoutTimer ) {\\n\\t\\t\\t\\twindow.clearTimeout( timeoutTimer );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Dereference transport for early garbage collection\\n\\t\\t\\t// (no matter how long the jqXHR object will be used)\\n\\t\\t\\ttransport = undefined;\\n\\n\\t\\t\\t// Cache response headers\\n\\t\\t\\tresponseHeadersString = headers || \\\"\\\";\\n\\n\\t\\t\\t// Set readyState\\n\\t\\t\\tjqXHR.readyState = status > 0 ? 4 : 0;\\n\\n\\t\\t\\t// Determine if successful\\n\\t\\t\\tisSuccess = status >= 200 && status < 300 || status === 304;\\n\\n\\t\\t\\t// Get response data\\n\\t\\t\\tif ( responses ) {\\n\\t\\t\\t\\tresponse = ajaxHandleResponses( s, jqXHR, responses );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Convert no matter what (that way responseXXX fields are always set)\\n\\t\\t\\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\\n\\n\\t\\t\\t// If successful, handle type chaining\\n\\t\\t\\tif ( isSuccess ) {\\n\\n\\t\\t\\t\\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\\n\\t\\t\\t\\tif ( s.ifModified ) {\\n\\t\\t\\t\\t\\tmodified = jqXHR.getResponseHeader( \\\"Last-Modified\\\" );\\n\\t\\t\\t\\t\\tif ( modified ) {\\n\\t\\t\\t\\t\\t\\tjQuery.lastModified[ cacheURL ] = modified;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tmodified = jqXHR.getResponseHeader( \\\"etag\\\" );\\n\\t\\t\\t\\t\\tif ( modified ) {\\n\\t\\t\\t\\t\\t\\tjQuery.etag[ cacheURL ] = modified;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// if no content\\n\\t\\t\\t\\tif ( status === 204 || s.type === \\\"HEAD\\\" ) {\\n\\t\\t\\t\\t\\tstatusText = \\\"nocontent\\\";\\n\\n\\t\\t\\t\\t// if not modified\\n\\t\\t\\t\\t} else if ( status === 304 ) {\\n\\t\\t\\t\\t\\tstatusText = \\\"notmodified\\\";\\n\\n\\t\\t\\t\\t// If we have data, let's convert it\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tstatusText = response.state;\\n\\t\\t\\t\\t\\tsuccess = response.data;\\n\\t\\t\\t\\t\\terror = response.error;\\n\\t\\t\\t\\t\\tisSuccess = !error;\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\n\\t\\t\\t\\t// Extract error from statusText and normalize for non-aborts\\n\\t\\t\\t\\terror = statusText;\\n\\t\\t\\t\\tif ( status || !statusText ) {\\n\\t\\t\\t\\t\\tstatusText = \\\"error\\\";\\n\\t\\t\\t\\t\\tif ( status < 0 ) {\\n\\t\\t\\t\\t\\t\\tstatus = 0;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Set data for the fake xhr object\\n\\t\\t\\tjqXHR.status = status;\\n\\t\\t\\tjqXHR.statusText = ( nativeStatusText || statusText ) + \\\"\\\";\\n\\n\\t\\t\\t// Success/Error\\n\\t\\t\\tif ( isSuccess ) {\\n\\t\\t\\t\\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Status-dependent callbacks\\n\\t\\t\\tjqXHR.statusCode( statusCode );\\n\\t\\t\\tstatusCode = undefined;\\n\\n\\t\\t\\tif ( fireGlobals ) {\\n\\t\\t\\t\\tglobalEventContext.trigger( isSuccess ? \\\"ajaxSuccess\\\" : \\\"ajaxError\\\",\\n\\t\\t\\t\\t\\t[ jqXHR, s, isSuccess ? success : error ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Complete\\n\\t\\t\\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\\n\\n\\t\\t\\tif ( fireGlobals ) {\\n\\t\\t\\t\\tglobalEventContext.trigger( \\\"ajaxComplete\\\", [ jqXHR, s ] );\\n\\n\\t\\t\\t\\t// Handle the global AJAX counter\\n\\t\\t\\t\\tif ( !( --jQuery.active ) ) {\\n\\t\\t\\t\\t\\tjQuery.event.trigger( \\\"ajaxStop\\\" );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn jqXHR;\\n\\t},\\n\\n\\tgetJSON: function( url, data, callback ) {\\n\\t\\treturn jQuery.get( url, data, callback, \\\"json\\\" );\\n\\t},\\n\\n\\tgetScript: function( url, callback ) {\\n\\t\\treturn jQuery.get( url, undefined, callback, \\\"script\\\" );\\n\\t}\\n} );\\n\\njQuery.each( [ \\\"get\\\", \\\"post\\\" ], function( i, method ) {\\n\\tjQuery[ method ] = function( url, data, callback, type ) {\\n\\n\\t\\t// Shift arguments if data argument was omitted\\n\\t\\tif ( jQuery.isFunction( data ) ) {\\n\\t\\t\\ttype = type || callback;\\n\\t\\t\\tcallback = data;\\n\\t\\t\\tdata = undefined;\\n\\t\\t}\\n\\n\\t\\t// The url can be an options object (which then must have .url)\\n\\t\\treturn jQuery.ajax( jQuery.extend( {\\n\\t\\t\\turl: url,\\n\\t\\t\\ttype: method,\\n\\t\\t\\tdataType: type,\\n\\t\\t\\tdata: data,\\n\\t\\t\\tsuccess: callback\\n\\t\\t}, jQuery.isPlainObject( url ) && url ) );\\n\\t};\\n} );\\n\\n\\njQuery._evalUrl = function( url ) {\\n\\treturn jQuery.ajax( {\\n\\t\\turl: url,\\n\\n\\t\\t// Make this explicit, since user can override this through ajaxSetup (#11264)\\n\\t\\ttype: \\\"GET\\\",\\n\\t\\tdataType: \\\"script\\\",\\n\\t\\tcache: true,\\n\\t\\tasync: false,\\n\\t\\tglobal: false,\\n\\t\\t\\\"throws\\\": true\\n\\t} );\\n};\\n\\n\\njQuery.fn.extend( {\\n\\twrapAll: function( html ) {\\n\\t\\tvar wrap;\\n\\n\\t\\tif ( this[ 0 ] ) {\\n\\t\\t\\tif ( jQuery.isFunction( html ) ) {\\n\\t\\t\\t\\thtml = html.call( this[ 0 ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// The elements to wrap the target around\\n\\t\\t\\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\\n\\n\\t\\t\\tif ( this[ 0 ].parentNode ) {\\n\\t\\t\\t\\twrap.insertBefore( this[ 0 ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\twrap.map( function() {\\n\\t\\t\\t\\tvar elem = this;\\n\\n\\t\\t\\t\\twhile ( elem.firstElementChild ) {\\n\\t\\t\\t\\t\\telem = elem.firstElementChild;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn elem;\\n\\t\\t\\t} ).append( this );\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\twrapInner: function( html ) {\\n\\t\\tif ( jQuery.isFunction( html ) ) {\\n\\t\\t\\treturn this.each( function( i ) {\\n\\t\\t\\t\\tjQuery( this ).wrapInner( html.call( this, i ) );\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\treturn this.each( function() {\\n\\t\\t\\tvar self = jQuery( this ),\\n\\t\\t\\t\\tcontents = self.contents();\\n\\n\\t\\t\\tif ( contents.length ) {\\n\\t\\t\\t\\tcontents.wrapAll( html );\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tself.append( html );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\twrap: function( html ) {\\n\\t\\tvar isFunction = jQuery.isFunction( html );\\n\\n\\t\\treturn this.each( function( i ) {\\n\\t\\t\\tjQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );\\n\\t\\t} );\\n\\t},\\n\\n\\tunwrap: function( selector ) {\\n\\t\\tthis.parent( selector ).not( \\\"body\\\" ).each( function() {\\n\\t\\t\\tjQuery( this ).replaceWith( this.childNodes );\\n\\t\\t} );\\n\\t\\treturn this;\\n\\t}\\n} );\\n\\n\\njQuery.expr.pseudos.hidden = function( elem ) {\\n\\treturn !jQuery.expr.pseudos.visible( elem );\\n};\\njQuery.expr.pseudos.visible = function( elem ) {\\n\\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\\n};\\n\\n\\n\\n\\njQuery.ajaxSettings.xhr = function() {\\n\\ttry {\\n\\t\\treturn new window.XMLHttpRequest();\\n\\t} catch ( e ) {}\\n};\\n\\nvar xhrSuccessStatus = {\\n\\n\\t\\t// File protocol always yields status code 0, assume 200\\n\\t\\t0: 200,\\n\\n\\t\\t// Support: IE <=9 only\\n\\t\\t// #1450: sometimes IE returns 1223 when it should be 204\\n\\t\\t1223: 204\\n\\t},\\n\\txhrSupported = jQuery.ajaxSettings.xhr();\\n\\nsupport.cors = !!xhrSupported && ( \\\"withCredentials\\\" in xhrSupported );\\nsupport.ajax = xhrSupported = !!xhrSupported;\\n\\njQuery.ajaxTransport( function( options ) {\\n\\tvar callback, errorCallback;\\n\\n\\t// Cross domain only allowed if supported through XMLHttpRequest\\n\\tif ( support.cors || xhrSupported && !options.crossDomain ) {\\n\\t\\treturn {\\n\\t\\t\\tsend: function( headers, complete ) {\\n\\t\\t\\t\\tvar i,\\n\\t\\t\\t\\t\\txhr = options.xhr();\\n\\n\\t\\t\\t\\txhr.open(\\n\\t\\t\\t\\t\\toptions.type,\\n\\t\\t\\t\\t\\toptions.url,\\n\\t\\t\\t\\t\\toptions.async,\\n\\t\\t\\t\\t\\toptions.username,\\n\\t\\t\\t\\t\\toptions.password\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t// Apply custom fields if provided\\n\\t\\t\\t\\tif ( options.xhrFields ) {\\n\\t\\t\\t\\t\\tfor ( i in options.xhrFields ) {\\n\\t\\t\\t\\t\\t\\txhr[ i ] = options.xhrFields[ i ];\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Override mime type if needed\\n\\t\\t\\t\\tif ( options.mimeType && xhr.overrideMimeType ) {\\n\\t\\t\\t\\t\\txhr.overrideMimeType( options.mimeType );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// X-Requested-With header\\n\\t\\t\\t\\t// For cross-domain requests, seeing as conditions for a preflight are\\n\\t\\t\\t\\t// akin to a jigsaw puzzle, we simply never set it to be sure.\\n\\t\\t\\t\\t// (it can always be set on a per-request basis or even using ajaxSetup)\\n\\t\\t\\t\\t// For same-domain requests, won't change header if already provided.\\n\\t\\t\\t\\tif ( !options.crossDomain && !headers[ \\\"X-Requested-With\\\" ] ) {\\n\\t\\t\\t\\t\\theaders[ \\\"X-Requested-With\\\" ] = \\\"XMLHttpRequest\\\";\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Set headers\\n\\t\\t\\t\\tfor ( i in headers ) {\\n\\t\\t\\t\\t\\txhr.setRequestHeader( i, headers[ i ] );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Callback\\n\\t\\t\\t\\tcallback = function( type ) {\\n\\t\\t\\t\\t\\treturn function() {\\n\\t\\t\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\t\\t\\tcallback = errorCallback = xhr.onload =\\n\\t\\t\\t\\t\\t\\t\\t\\txhr.onerror = xhr.onabort = xhr.onreadystatechange = null;\\n\\n\\t\\t\\t\\t\\t\\t\\tif ( type === \\\"abort\\\" ) {\\n\\t\\t\\t\\t\\t\\t\\t\\txhr.abort();\\n\\t\\t\\t\\t\\t\\t\\t} else if ( type === \\\"error\\\" ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// Support: IE <=9 only\\n\\t\\t\\t\\t\\t\\t\\t\\t// On a manual native abort, IE9 throws\\n\\t\\t\\t\\t\\t\\t\\t\\t// errors on any property access that is not readyState\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( typeof xhr.status !== \\\"number\\\" ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcomplete( 0, \\\"error\\\" );\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcomplete(\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// File: protocol always yields status 0; see #8605, #14207\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\txhr.status,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\txhr.statusText\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\tcomplete(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\txhrSuccessStatus[ xhr.status ] || xhr.status,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\txhr.statusText,\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Support: IE <=9 only\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// IE9 has no XHR2 but throws on binary (trac-11426)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// For XHR2 non-text, let the caller handle it (gh-2498)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t( xhr.responseType || \\\"text\\\" ) !== \\\"text\\\" ||\\n\\t\\t\\t\\t\\t\\t\\t\\t\\ttypeof xhr.responseText !== \\\"string\\\" ?\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{ binary: xhr.response } :\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{ text: xhr.responseText },\\n\\t\\t\\t\\t\\t\\t\\t\\t\\txhr.getAllResponseHeaders()\\n\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t};\\n\\t\\t\\t\\t};\\n\\n\\t\\t\\t\\t// Listen to events\\n\\t\\t\\t\\txhr.onload = callback();\\n\\t\\t\\t\\terrorCallback = xhr.onerror = callback( \\\"error\\\" );\\n\\n\\t\\t\\t\\t// Support: IE 9 only\\n\\t\\t\\t\\t// Use onreadystatechange to replace onabort\\n\\t\\t\\t\\t// to handle uncaught aborts\\n\\t\\t\\t\\tif ( xhr.onabort !== undefined ) {\\n\\t\\t\\t\\t\\txhr.onabort = errorCallback;\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\txhr.onreadystatechange = function() {\\n\\n\\t\\t\\t\\t\\t\\t// Check readyState before timeout as it changes\\n\\t\\t\\t\\t\\t\\tif ( xhr.readyState === 4 ) {\\n\\n\\t\\t\\t\\t\\t\\t\\t// Allow onerror to be called first,\\n\\t\\t\\t\\t\\t\\t\\t// but that will not handle a native abort\\n\\t\\t\\t\\t\\t\\t\\t// Also, save errorCallback to a variable\\n\\t\\t\\t\\t\\t\\t\\t// as xhr.onerror cannot be accessed\\n\\t\\t\\t\\t\\t\\t\\twindow.setTimeout( function() {\\n\\t\\t\\t\\t\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\terrorCallback();\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t} );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t};\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Create the abort callback\\n\\t\\t\\t\\tcallback = callback( \\\"abort\\\" );\\n\\n\\t\\t\\t\\ttry {\\n\\n\\t\\t\\t\\t\\t// Do send the request (this may raise an exception)\\n\\t\\t\\t\\t\\txhr.send( options.hasContent && options.data || null );\\n\\t\\t\\t\\t} catch ( e ) {\\n\\n\\t\\t\\t\\t\\t// #14683: Only rethrow if this hasn't been notified as an error yet\\n\\t\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\t\\tthrow e;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t},\\n\\n\\t\\t\\tabort: function() {\\n\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\tcallback();\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t};\\n\\t}\\n} );\\n\\n\\n\\n\\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\\njQuery.ajaxPrefilter( function( s ) {\\n\\tif ( s.crossDomain ) {\\n\\t\\ts.contents.script = false;\\n\\t}\\n} );\\n\\n// Install script dataType\\njQuery.ajaxSetup( {\\n\\taccepts: {\\n\\t\\tscript: \\\"text/javascript, application/javascript, \\\" +\\n\\t\\t\\t\\\"application/ecmascript, application/x-ecmascript\\\"\\n\\t},\\n\\tcontents: {\\n\\t\\tscript: /\\\\b(?:java|ecma)script\\\\b/\\n\\t},\\n\\tconverters: {\\n\\t\\t\\\"text script\\\": function( text ) {\\n\\t\\t\\tjQuery.globalEval( text );\\n\\t\\t\\treturn text;\\n\\t\\t}\\n\\t}\\n} );\\n\\n// Handle cache's special case and crossDomain\\njQuery.ajaxPrefilter( \\\"script\\\", function( s ) {\\n\\tif ( s.cache === undefined ) {\\n\\t\\ts.cache = false;\\n\\t}\\n\\tif ( s.crossDomain ) {\\n\\t\\ts.type = \\\"GET\\\";\\n\\t}\\n} );\\n\\n// Bind script tag hack transport\\njQuery.ajaxTransport( \\\"script\\\", function( s ) {\\n\\n\\t// This transport only deals with cross domain requests\\n\\tif ( s.crossDomain ) {\\n\\t\\tvar script, callback;\\n\\t\\treturn {\\n\\t\\t\\tsend: function( _, complete ) {\\n\\t\\t\\t\\tscript = jQuery( \\\"<script>\\\" ).prop( {\\n\\t\\t\\t\\t\\tcharset: s.scriptCharset,\\n\\t\\t\\t\\t\\tsrc: s.url\\n\\t\\t\\t\\t} ).on(\\n\\t\\t\\t\\t\\t\\\"load error\\\",\\n\\t\\t\\t\\t\\tcallback = function( evt ) {\\n\\t\\t\\t\\t\\t\\tscript.remove();\\n\\t\\t\\t\\t\\t\\tcallback = null;\\n\\t\\t\\t\\t\\t\\tif ( evt ) {\\n\\t\\t\\t\\t\\t\\t\\tcomplete( evt.type === \\\"error\\\" ? 404 : 200, evt.type );\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t// Use native DOM manipulation to avoid our domManip AJAX trickery\\n\\t\\t\\t\\tdocument.head.appendChild( script[ 0 ] );\\n\\t\\t\\t},\\n\\t\\t\\tabort: function() {\\n\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\tcallback();\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t};\\n\\t}\\n} );\\n\\n\\n\\n\\nvar oldCallbacks = [],\\n\\trjsonp = /(=)\\\\?(?=&|$)|\\\\?\\\\?/;\\n\\n// Default jsonp settings\\njQuery.ajaxSetup( {\\n\\tjsonp: \\\"callback\\\",\\n\\tjsonpCallback: function() {\\n\\t\\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \\\"_\\\" + ( nonce++ ) );\\n\\t\\tthis[ callback ] = true;\\n\\t\\treturn callback;\\n\\t}\\n} );\\n\\n// Detect, normalize options and install callbacks for jsonp requests\\njQuery.ajaxPrefilter( \\\"json jsonp\\\", function( s, originalSettings, jqXHR ) {\\n\\n\\tvar callbackName, overwritten, responseContainer,\\n\\t\\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\\n\\t\\t\\t\\\"url\\\" :\\n\\t\\t\\ttypeof s.data === \\\"string\\\" &&\\n\\t\\t\\t\\t( s.contentType || \\\"\\\" )\\n\\t\\t\\t\\t\\t.indexOf( \\\"application/x-www-form-urlencoded\\\" ) === 0 &&\\n\\t\\t\\t\\trjsonp.test( s.data ) && \\\"data\\\"\\n\\t\\t);\\n\\n\\t// Handle iff the expected data type is \\\"jsonp\\\" or we have a parameter to set\\n\\tif ( jsonProp || s.dataTypes[ 0 ] === \\\"jsonp\\\" ) {\\n\\n\\t\\t// Get callback name, remembering preexisting value associated with it\\n\\t\\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\\n\\t\\t\\ts.jsonpCallback() :\\n\\t\\t\\ts.jsonpCallback;\\n\\n\\t\\t// Insert callback into url or form data\\n\\t\\tif ( jsonProp ) {\\n\\t\\t\\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \\\"$1\\\" + callbackName );\\n\\t\\t} else if ( s.jsonp !== false ) {\\n\\t\\t\\ts.url += ( rquery.test( s.url ) ? \\\"&\\\" : \\\"?\\\" ) + s.jsonp + \\\"=\\\" + callbackName;\\n\\t\\t}\\n\\n\\t\\t// Use data converter to retrieve json after script execution\\n\\t\\ts.converters[ \\\"script json\\\" ] = function() {\\n\\t\\t\\tif ( !responseContainer ) {\\n\\t\\t\\t\\tjQuery.error( callbackName + \\\" was not called\\\" );\\n\\t\\t\\t}\\n\\t\\t\\treturn responseContainer[ 0 ];\\n\\t\\t};\\n\\n\\t\\t// Force json dataType\\n\\t\\ts.dataTypes[ 0 ] = \\\"json\\\";\\n\\n\\t\\t// Install callback\\n\\t\\toverwritten = window[ callbackName ];\\n\\t\\twindow[ callbackName ] = function() {\\n\\t\\t\\tresponseContainer = arguments;\\n\\t\\t};\\n\\n\\t\\t// Clean-up function (fires after converters)\\n\\t\\tjqXHR.always( function() {\\n\\n\\t\\t\\t// If previous value didn't exist - remove it\\n\\t\\t\\tif ( overwritten === undefined ) {\\n\\t\\t\\t\\tjQuery( window ).removeProp( callbackName );\\n\\n\\t\\t\\t// Otherwise restore preexisting value\\n\\t\\t\\t} else {\\n\\t\\t\\t\\twindow[ callbackName ] = overwritten;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Save back as free\\n\\t\\t\\tif ( s[ callbackName ] ) {\\n\\n\\t\\t\\t\\t// Make sure that re-using the options doesn't screw things around\\n\\t\\t\\t\\ts.jsonpCallback = originalSettings.jsonpCallback;\\n\\n\\t\\t\\t\\t// Save the callback name for future use\\n\\t\\t\\t\\toldCallbacks.push( callbackName );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Call if it was a function and we have a response\\n\\t\\t\\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\\n\\t\\t\\t\\toverwritten( responseContainer[ 0 ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\tresponseContainer = overwritten = undefined;\\n\\t\\t} );\\n\\n\\t\\t// Delegate to script\\n\\t\\treturn \\\"script\\\";\\n\\t}\\n} );\\n\\n\\n\\n\\n// Support: Safari 8 only\\n// In Safari 8 documents created via document.implementation.createHTMLDocument\\n// collapse sibling forms: the second one becomes a child of the first one.\\n// Because of that, this security measure has to be disabled in Safari 8.\\n// https://bugs.webkit.org/show_bug.cgi?id=137337\\nsupport.createHTMLDocument = ( function() {\\n\\tvar body = document.implementation.createHTMLDocument( \\\"\\\" ).body;\\n\\tbody.innerHTML = \\\"<form></form><form></form>\\\";\\n\\treturn body.childNodes.length === 2;\\n} )();\\n\\n\\n// Argument \\\"data\\\" should be string of html\\n// context (optional): If specified, the fragment will be created in this context,\\n// defaults to document\\n// keepScripts (optional): If true, will include scripts passed in the html string\\njQuery.parseHTML = function( data, context, keepScripts ) {\\n\\tif ( typeof data !== \\\"string\\\" ) {\\n\\t\\treturn [];\\n\\t}\\n\\tif ( typeof context === \\\"boolean\\\" ) {\\n\\t\\tkeepScripts = context;\\n\\t\\tcontext = false;\\n\\t}\\n\\n\\tvar base, parsed, scripts;\\n\\n\\tif ( !context ) {\\n\\n\\t\\t// Stop scripts or inline event handlers from being executed immediately\\n\\t\\t// by using document.implementation\\n\\t\\tif ( support.createHTMLDocument ) {\\n\\t\\t\\tcontext = document.implementation.createHTMLDocument( \\\"\\\" );\\n\\n\\t\\t\\t// Set the base href for the created document\\n\\t\\t\\t// so any parsed elements with URLs\\n\\t\\t\\t// are based on the document's URL (gh-2965)\\n\\t\\t\\tbase = context.createElement( \\\"base\\\" );\\n\\t\\t\\tbase.href = document.location.href;\\n\\t\\t\\tcontext.head.appendChild( base );\\n\\t\\t} else {\\n\\t\\t\\tcontext = document;\\n\\t\\t}\\n\\t}\\n\\n\\tparsed = rsingleTag.exec( data );\\n\\tscripts = !keepScripts && [];\\n\\n\\t// Single tag\\n\\tif ( parsed ) {\\n\\t\\treturn [ context.createElement( parsed[ 1 ] ) ];\\n\\t}\\n\\n\\tparsed = buildFragment( [ data ], context, scripts );\\n\\n\\tif ( scripts && scripts.length ) {\\n\\t\\tjQuery( scripts ).remove();\\n\\t}\\n\\n\\treturn jQuery.merge( [], parsed.childNodes );\\n};\\n\\n\\n/**\\n * Load a url into a page\\n */\\njQuery.fn.load = function( url, params, callback ) {\\n\\tvar selector, type, response,\\n\\t\\tself = this,\\n\\t\\toff = url.indexOf( \\\" \\\" );\\n\\n\\tif ( off > -1 ) {\\n\\t\\tselector = stripAndCollapse( url.slice( off ) );\\n\\t\\turl = url.slice( 0, off );\\n\\t}\\n\\n\\t// If it's a function\\n\\tif ( jQuery.isFunction( params ) ) {\\n\\n\\t\\t// We assume that it's the callback\\n\\t\\tcallback = params;\\n\\t\\tparams = undefined;\\n\\n\\t// Otherwise, build a param string\\n\\t} else if ( params && typeof params === \\\"object\\\" ) {\\n\\t\\ttype = \\\"POST\\\";\\n\\t}\\n\\n\\t// If we have elements to modify, make the request\\n\\tif ( self.length > 0 ) {\\n\\t\\tjQuery.ajax( {\\n\\t\\t\\turl: url,\\n\\n\\t\\t\\t// If \\\"type\\\" variable is undefined, then \\\"GET\\\" method will be used.\\n\\t\\t\\t// Make value of this field explicit since\\n\\t\\t\\t// user can override it through ajaxSetup method\\n\\t\\t\\ttype: type || \\\"GET\\\",\\n\\t\\t\\tdataType: \\\"html\\\",\\n\\t\\t\\tdata: params\\n\\t\\t} ).done( function( responseText ) {\\n\\n\\t\\t\\t// Save response for use in complete callback\\n\\t\\t\\tresponse = arguments;\\n\\n\\t\\t\\tself.html( selector ?\\n\\n\\t\\t\\t\\t// If a selector was specified, locate the right elements in a dummy div\\n\\t\\t\\t\\t// Exclude scripts to avoid IE 'Permission Denied' errors\\n\\t\\t\\t\\tjQuery( \\\"<div>\\\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\\n\\n\\t\\t\\t\\t// Otherwise use the full result\\n\\t\\t\\t\\tresponseText );\\n\\n\\t\\t// If the request succeeds, this function gets \\\"data\\\", \\\"status\\\", \\\"jqXHR\\\"\\n\\t\\t// but they are ignored because response was set above.\\n\\t\\t// If it fails, this function gets \\\"jqXHR\\\", \\\"status\\\", \\\"error\\\"\\n\\t\\t} ).always( callback && function( jqXHR, status ) {\\n\\t\\t\\tself.each( function() {\\n\\t\\t\\t\\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\\n\\t\\t\\t} );\\n\\t\\t} );\\n\\t}\\n\\n\\treturn this;\\n};\\n\\n\\n\\n\\n// Attach a bunch of functions for handling common AJAX events\\njQuery.each( [\\n\\t\\\"ajaxStart\\\",\\n\\t\\\"ajaxStop\\\",\\n\\t\\\"ajaxComplete\\\",\\n\\t\\\"ajaxError\\\",\\n\\t\\\"ajaxSuccess\\\",\\n\\t\\\"ajaxSend\\\"\\n], function( i, type ) {\\n\\tjQuery.fn[ type ] = function( fn ) {\\n\\t\\treturn this.on( type, fn );\\n\\t};\\n} );\\n\\n\\n\\n\\njQuery.expr.pseudos.animated = function( elem ) {\\n\\treturn jQuery.grep( jQuery.timers, function( fn ) {\\n\\t\\treturn elem === fn.elem;\\n\\t} ).length;\\n};\\n\\n\\n\\n\\n/**\\n * Gets a window from an element\\n */\\nfunction getWindow( elem ) {\\n\\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\\n}\\n\\njQuery.offset = {\\n\\tsetOffset: function( elem, options, i ) {\\n\\t\\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\\n\\t\\t\\tposition = jQuery.css( elem, \\\"position\\\" ),\\n\\t\\t\\tcurElem = jQuery( elem ),\\n\\t\\t\\tprops = {};\\n\\n\\t\\t// Set position first, in-case top/left are set even on static elem\\n\\t\\tif ( position === \\\"static\\\" ) {\\n\\t\\t\\telem.style.position = \\\"relative\\\";\\n\\t\\t}\\n\\n\\t\\tcurOffset = curElem.offset();\\n\\t\\tcurCSSTop = jQuery.css( elem, \\\"top\\\" );\\n\\t\\tcurCSSLeft = jQuery.css( elem, \\\"left\\\" );\\n\\t\\tcalculatePosition = ( position === \\\"absolute\\\" || position === \\\"fixed\\\" ) &&\\n\\t\\t\\t( curCSSTop + curCSSLeft ).indexOf( \\\"auto\\\" ) > -1;\\n\\n\\t\\t// Need to be able to calculate position if either\\n\\t\\t// top or left is auto and position is either absolute or fixed\\n\\t\\tif ( calculatePosition ) {\\n\\t\\t\\tcurPosition = curElem.position();\\n\\t\\t\\tcurTop = curPosition.top;\\n\\t\\t\\tcurLeft = curPosition.left;\\n\\n\\t\\t} else {\\n\\t\\t\\tcurTop = parseFloat( curCSSTop ) || 0;\\n\\t\\t\\tcurLeft = parseFloat( curCSSLeft ) || 0;\\n\\t\\t}\\n\\n\\t\\tif ( jQuery.isFunction( options ) ) {\\n\\n\\t\\t\\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\\n\\t\\t\\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\\n\\t\\t}\\n\\n\\t\\tif ( options.top != null ) {\\n\\t\\t\\tprops.top = ( options.top - curOffset.top ) + curTop;\\n\\t\\t}\\n\\t\\tif ( options.left != null ) {\\n\\t\\t\\tprops.left = ( options.left - curOffset.left ) + curLeft;\\n\\t\\t}\\n\\n\\t\\tif ( \\\"using\\\" in options ) {\\n\\t\\t\\toptions.using.call( elem, props );\\n\\n\\t\\t} else {\\n\\t\\t\\tcurElem.css( props );\\n\\t\\t}\\n\\t}\\n};\\n\\njQuery.fn.extend( {\\n\\toffset: function( options ) {\\n\\n\\t\\t// Preserve chaining for setter\\n\\t\\tif ( arguments.length ) {\\n\\t\\t\\treturn options === undefined ?\\n\\t\\t\\t\\tthis :\\n\\t\\t\\t\\tthis.each( function( i ) {\\n\\t\\t\\t\\t\\tjQuery.offset.setOffset( this, options, i );\\n\\t\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\tvar docElem, win, rect, doc,\\n\\t\\t\\telem = this[ 0 ];\\n\\n\\t\\tif ( !elem ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Support: IE <=11 only\\n\\t\\t// Running getBoundingClientRect on a\\n\\t\\t// disconnected node in IE throws an error\\n\\t\\tif ( !elem.getClientRects().length ) {\\n\\t\\t\\treturn { top: 0, left: 0 };\\n\\t\\t}\\n\\n\\t\\trect = elem.getBoundingClientRect();\\n\\n\\t\\t// Make sure element is not hidden (display: none)\\n\\t\\tif ( rect.width || rect.height ) {\\n\\t\\t\\tdoc = elem.ownerDocument;\\n\\t\\t\\twin = getWindow( doc );\\n\\t\\t\\tdocElem = doc.documentElement;\\n\\n\\t\\t\\treturn {\\n\\t\\t\\t\\ttop: rect.top + win.pageYOffset - docElem.clientTop,\\n\\t\\t\\t\\tleft: rect.left + win.pageXOffset - docElem.clientLeft\\n\\t\\t\\t};\\n\\t\\t}\\n\\n\\t\\t// Return zeros for disconnected and hidden elements (gh-2310)\\n\\t\\treturn rect;\\n\\t},\\n\\n\\tposition: function() {\\n\\t\\tif ( !this[ 0 ] ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\tvar offsetParent, offset,\\n\\t\\t\\telem = this[ 0 ],\\n\\t\\t\\tparentOffset = { top: 0, left: 0 };\\n\\n\\t\\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0},\\n\\t\\t// because it is its only offset parent\\n\\t\\tif ( jQuery.css( elem, \\\"position\\\" ) === \\\"fixed\\\" ) {\\n\\n\\t\\t\\t// Assume getBoundingClientRect is there when computed position is fixed\\n\\t\\t\\toffset = elem.getBoundingClientRect();\\n\\n\\t\\t} else {\\n\\n\\t\\t\\t// Get *real* offsetParent\\n\\t\\t\\toffsetParent = this.offsetParent();\\n\\n\\t\\t\\t// Get correct offsets\\n\\t\\t\\toffset = this.offset();\\n\\t\\t\\tif ( !jQuery.nodeName( offsetParent[ 0 ], \\\"html\\\" ) ) {\\n\\t\\t\\t\\tparentOffset = offsetParent.offset();\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Add offsetParent borders\\n\\t\\t\\tparentOffset = {\\n\\t\\t\\t\\ttop: parentOffset.top + jQuery.css( offsetParent[ 0 ], \\\"borderTopWidth\\\", true ),\\n\\t\\t\\t\\tleft: parentOffset.left + jQuery.css( offsetParent[ 0 ], \\\"borderLeftWidth\\\", true )\\n\\t\\t\\t};\\n\\t\\t}\\n\\n\\t\\t// Subtract parent offsets and element margins\\n\\t\\treturn {\\n\\t\\t\\ttop: offset.top - parentOffset.top - jQuery.css( elem, \\\"marginTop\\\", true ),\\n\\t\\t\\tleft: offset.left - parentOffset.left - jQuery.css( elem, \\\"marginLeft\\\", true )\\n\\t\\t};\\n\\t},\\n\\n\\t// This method will return documentElement in the following cases:\\n\\t// 1) For the element inside the iframe without offsetParent, this method will return\\n\\t// documentElement of the parent window\\n\\t// 2) For the hidden or detached element\\n\\t// 3) For body or html element, i.e. in case of the html node - it will return itself\\n\\t//\\n\\t// but those exceptions were never presented as a real life use-cases\\n\\t// and might be considered as more preferable results.\\n\\t//\\n\\t// This logic, however, is not guaranteed and can change at any point in the future\\n\\toffsetParent: function() {\\n\\t\\treturn this.map( function() {\\n\\t\\t\\tvar offsetParent = this.offsetParent;\\n\\n\\t\\t\\twhile ( offsetParent && jQuery.css( offsetParent, \\\"position\\\" ) === \\\"static\\\" ) {\\n\\t\\t\\t\\toffsetParent = offsetParent.offsetParent;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn offsetParent || documentElement;\\n\\t\\t} );\\n\\t}\\n} );\\n\\n// Create scrollLeft and scrollTop methods\\njQuery.each( { scrollLeft: \\\"pageXOffset\\\", scrollTop: \\\"pageYOffset\\\" }, function( method, prop ) {\\n\\tvar top = \\\"pageYOffset\\\" === prop;\\n\\n\\tjQuery.fn[ method ] = function( val ) {\\n\\t\\treturn access( this, function( elem, method, val ) {\\n\\t\\t\\tvar win = getWindow( elem );\\n\\n\\t\\t\\tif ( val === undefined ) {\\n\\t\\t\\t\\treturn win ? win[ prop ] : elem[ method ];\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ( win ) {\\n\\t\\t\\t\\twin.scrollTo(\\n\\t\\t\\t\\t\\t!top ? val : win.pageXOffset,\\n\\t\\t\\t\\t\\ttop ? val : win.pageYOffset\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\telem[ method ] = val;\\n\\t\\t\\t}\\n\\t\\t}, method, val, arguments.length );\\n\\t};\\n} );\\n\\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\\n// Add the top/left cssHooks using jQuery.fn.position\\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\\n// getComputedStyle returns percent when specified for top/left/bottom/right;\\n// rather than make the css module depend on the offset module, just check for it here\\njQuery.each( [ \\\"top\\\", \\\"left\\\" ], function( i, prop ) {\\n\\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\\n\\t\\tfunction( elem, computed ) {\\n\\t\\t\\tif ( computed ) {\\n\\t\\t\\t\\tcomputed = curCSS( elem, prop );\\n\\n\\t\\t\\t\\t// If curCSS returns percentage, fallback to offset\\n\\t\\t\\t\\treturn rnumnonpx.test( computed ) ?\\n\\t\\t\\t\\t\\tjQuery( elem ).position()[ prop ] + \\\"px\\\" :\\n\\t\\t\\t\\t\\tcomputed;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t);\\n} );\\n\\n\\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\\njQuery.each( { Height: \\\"height\\\", Width: \\\"width\\\" }, function( name, type ) {\\n\\tjQuery.each( { padding: \\\"inner\\\" + name, content: type, \\\"\\\": \\\"outer\\\" + name },\\n\\t\\tfunction( defaultExtra, funcName ) {\\n\\n\\t\\t// Margin is only for outerHeight, outerWidth\\n\\t\\tjQuery.fn[ funcName ] = function( margin, value ) {\\n\\t\\t\\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \\\"boolean\\\" ),\\n\\t\\t\\t\\textra = defaultExtra || ( margin === true || value === true ? \\\"margin\\\" : \\\"border\\\" );\\n\\n\\t\\t\\treturn access( this, function( elem, type, value ) {\\n\\t\\t\\t\\tvar doc;\\n\\n\\t\\t\\t\\tif ( jQuery.isWindow( elem ) ) {\\n\\n\\t\\t\\t\\t\\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\\n\\t\\t\\t\\t\\treturn funcName.indexOf( \\\"outer\\\" ) === 0 ?\\n\\t\\t\\t\\t\\t\\telem[ \\\"inner\\\" + name ] :\\n\\t\\t\\t\\t\\t\\telem.document.documentElement[ \\\"client\\\" + name ];\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// Get document width or height\\n\\t\\t\\t\\tif ( elem.nodeType === 9 ) {\\n\\t\\t\\t\\t\\tdoc = elem.documentElement;\\n\\n\\t\\t\\t\\t\\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\\n\\t\\t\\t\\t\\t// whichever is greatest\\n\\t\\t\\t\\t\\treturn Math.max(\\n\\t\\t\\t\\t\\t\\telem.body[ \\\"scroll\\\" + name ], doc[ \\\"scroll\\\" + name ],\\n\\t\\t\\t\\t\\t\\telem.body[ \\\"offset\\\" + name ], doc[ \\\"offset\\\" + name ],\\n\\t\\t\\t\\t\\t\\tdoc[ \\\"client\\\" + name ]\\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn value === undefined ?\\n\\n\\t\\t\\t\\t\\t// Get width or height on the element, requesting but not forcing parseFloat\\n\\t\\t\\t\\t\\tjQuery.css( elem, type, extra ) :\\n\\n\\t\\t\\t\\t\\t// Set width or height on the element\\n\\t\\t\\t\\t\\tjQuery.style( elem, type, value, extra );\\n\\t\\t\\t}, type, chainable ? margin : undefined, chainable );\\n\\t\\t};\\n\\t} );\\n} );\\n\\n\\njQuery.fn.extend( {\\n\\n\\tbind: function( types, data, fn ) {\\n\\t\\treturn this.on( types, null, data, fn );\\n\\t},\\n\\tunbind: function( types, fn ) {\\n\\t\\treturn this.off( types, null, fn );\\n\\t},\\n\\n\\tdelegate: function( selector, types, data, fn ) {\\n\\t\\treturn this.on( types, selector, data, fn );\\n\\t},\\n\\tundelegate: function( selector, types, fn ) {\\n\\n\\t\\t// ( namespace ) or ( selector, types [, fn] )\\n\\t\\treturn arguments.length === 1 ?\\n\\t\\t\\tthis.off( selector, \\\"**\\\" ) :\\n\\t\\t\\tthis.off( types, selector || \\\"**\\\", fn );\\n\\t}\\n} );\\n\\njQuery.parseJSON = JSON.parse;\\n\\n\\n\\n\\n// Register as a named AMD module, since jQuery can be concatenated with other\\n// files that may use define, but not via a proper concatenation script that\\n// understands anonymous AMD modules. A named AMD is safest and most robust\\n// way to register. Lowercase jquery is used because AMD module names are\\n// derived from file names, and jQuery is normally delivered in a lowercase\\n// file name. Do this after creating the global so that if an AMD module wants\\n// to call noConflict to hide this version of jQuery, it will work.\\n\\n// Note that for maximum portability, libraries that are not jQuery should\\n// declare themselves as anonymous modules, and avoid setting a global if an\\n// AMD loader is present. jQuery is a special case. For more information, see\\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\\n\\nif ( true ) {\\n\\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {\\n\\t\\treturn jQuery;\\n\\t}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n}\\n\\n\\n\\n\\nvar\\n\\n\\t// Map over jQuery in case of overwrite\\n\\t_jQuery = window.jQuery,\\n\\n\\t// Map over the $ in case of overwrite\\n\\t_$ = window.$;\\n\\njQuery.noConflict = function( deep ) {\\n\\tif ( window.$ === jQuery ) {\\n\\t\\twindow.$ = _$;\\n\\t}\\n\\n\\tif ( deep && window.jQuery === jQuery ) {\\n\\t\\twindow.jQuery = _jQuery;\\n\\t}\\n\\n\\treturn jQuery;\\n};\\n\\n// Expose jQuery and $ identifiers, even in AMD\\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\\n// and CommonJS for browser emulators (#13566)\\nif ( !noGlobal ) {\\n\\twindow.jQuery = window.$ = jQuery;\\n}\\n\\n\\n\\n\\n\\nreturn jQuery;\\n} );\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL34vanF1ZXJ5L2Rpc3QvanF1ZXJ5LmpzPzI3ZDkiXSwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBqUXVlcnkgSmF2YVNjcmlwdCBMaWJyYXJ5IHYzLjEuMVxuICogaHR0cHM6Ly9qcXVlcnkuY29tL1xuICpcbiAqIEluY2x1ZGVzIFNpenpsZS5qc1xuICogaHR0cHM6Ly9zaXp6bGVqcy5jb20vXG4gKlxuICogQ29weXJpZ2h0IGpRdWVyeSBGb3VuZGF0aW9uIGFuZCBvdGhlciBjb250cmlidXRvcnNcbiAqIFJlbGVhc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZVxuICogaHR0cHM6Ly9qcXVlcnkub3JnL2xpY2Vuc2VcbiAqXG4gKiBEYXRlOiAyMDE2LTA5LTIyVDIyOjMwWlxuICovXG4oIGZ1bmN0aW9uKCBnbG9iYWwsIGZhY3RvcnkgKSB7XG5cblx0XCJ1c2Ugc3RyaWN0XCI7XG5cblx0aWYgKCB0eXBlb2YgbW9kdWxlID09PSBcIm9iamVjdFwiICYmIHR5cGVvZiBtb2R1bGUuZXhwb3J0cyA9PT0gXCJvYmplY3RcIiApIHtcblxuXHRcdC8vIEZvciBDb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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\neval(\"var g;\\r\\n\\r\\n// This works in non-strict mode\\r\\ng = (function() { return this; })();\\r\\n\\r\\ntry {\\r\\n\\t// This works if eval is allowed (see CSP)\\r\\n\\tg = g || Function(\\\"return this\\\")() || (1,eval)(\\\"this\\\");\\r\\n} catch(e) {\\r\\n\\t// This works if the window reference is available\\r\\n\\tif(typeof window === \\\"object\\\")\\r\\n\\t\\tg = window;\\r\\n}\\r\\n\\r\\n// g can still be undefined, but nothing to do about it...\\r\\n// We return undefined, instead of nothing here, so it's\\r\\n// easier to handle this case. if(!global) { ...}\\r\\n\\r\\nmodule.exports = g;\\r\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8od2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanM/MzY5OCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcclxuXHJcbi8vIFRoaXMgd29ya3MgaW4gbm9uLXN0cmljdCBtb2RlXHJcb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webpack_require__(29);\\n\\n/**\\n * We'll load jQuery and the Bootstrap jQuery plugin which provides support\\n * for JavaScript based Bootstrap features such as modals and tabs. This\\n * code may be modified to fit the specific needs of your application.\\n */\\n\\nwindow.$ = window.jQuery = __webpack_require__(3);\\n__webpack_require__(11);\\n\\n/**\\n * Vue is a modern JavaScript library for building interactive web interfaces\\n * using reactive data binding and reusable components. Vue's API is clean\\n * and simple, leaving you to focus on building your next great project.\\n */\\n\\nwindow.Vue = __webpack_require__(51);\\n__webpack_require__(49);\\n\\n/**\\n * We'll register a HTTP interceptor to attach the \\\"CSRF\\\" header to each of\\n * the outgoing requests issued by this application. The CSRF middleware\\n * included with Laravel will automatically verify the header's value.\\n */\\n\\nVue.http.interceptors.push(function (request, next) {\\n request.headers.set('X-CSRF-TOKEN', Laravel.csrfToken);\\n\\n next();\\n});\\n\\n/**\\n * Echo exposes an expressive API for subscribing to channels and listening\\n * for events that are broadcast by Laravel. Echo and event broadcasting\\n * allows your team to easily build robust real-time web applications.\\n */\\n\\n// import Echo from \\\"laravel-echo\\\"\\n\\n// window.Echo = new Echo({\\n// broadcaster: 'pusher',\\n// key: 'your-pusher-key'\\n// });\\n\\n\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9yZXNvdXJjZXMvYXNzZXRzL2pzL2Jvb3RzdHJhcC5qcz81ZTYzIl0sInNvdXJjZXNDb250ZW50IjpbIlxud2luZG93Ll8gPSByZXF1aXJlKCdsb2Rhc2gnKTtcblxuLyoqXG4gKiBXZSdsbCBsb2FkIGpRdWVyeSBhbmQgdGhlIEJvb3RzdHJhcCBqUXVlcnkgcGx1Z2luIHdoaWNoIHByb3ZpZGVzIHN1cHBvcnRcbiAqIGZvciBKYXZhU2NyaXB0IGJhc2VkIEJvb3RzdHJhcCBmZWF0dXJlcyBzdWNoIGFzIG1vZGFscyBhbmQgdGFicy4gVGhpc1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ZWwuY3NyZlRva2VuKTtcblxuICAgIG5leHQoKTtcbn0pO1xuXG4vKipcbiAqIEVjaG8gZXhwb3NlcyBhbiBleHByZXNzaXZlIEFQSSBmb3Igc3Vic2NyaWJpbmcgdG8gY2hhbm5lbHMgYW5kIGxpc3RlbmluZ1xuICogZm9yIGV2ZW50cyB0aGF0IGFyZSBicm9hZGNhc3QgYnkgTGFyYXZlbC4gRWNobyBhbmQgZXZlbnQgYnJvYWRjYXN0aW5nXG4gKiBhbGxvd3MgeW91ciB0ZWFtIHRvIGVhc2lseSBidWlsZCByb2J1c3QgcmVhbC10aW1lIHdlYiBhcHBsaWNhdGlvbnMuXG4gKi9cblxuLy8gaW1wb3J0IEVjaG8gZnJvbSBcImxhcmF2ZWwtZWNob1wiXG5cbi8vIHdpbmRvdy5FY2hvID0gbmV3IEVjaG8oe1xuLy8gICAgIGJyb2FkY2FzdGVyOiAncHVzaGVyJyxcbi8vICAgICBrZXk6ICd5b3VyLXB1c2hlci1rZXknXG4vLyB9KTtcblxuXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gcmVzb3VyY2VzL2Fzc2V0cy9qcy9ib290c3RyYXAuanMiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTs7Ozs7OztBQU9BO0FBQ0E7QUFDQTs7Ozs7OztBQU9BO0FBQ0E7QUFDQTs7Ozs7OztBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7Ozs7Ozs7OyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(43)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(14),\\n /* template */\\n __webpack_require__(36),\\n /* scopeId */\\n \\\"data-v-5301a236\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/importer/importer.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] importer.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-5301a236\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-5301a236\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9pbXBvcnRlci9pbXBvcnRlci52dWU/NWM4YyJdLCJzb3VyY2VzQ29udGVudCI6WyJcbi8qIHN0eWxlcyAqL1xucmVxdWlyZShcIiEhdnVlLWxvYWRlci9ub2RlX21vZHVsZXMvdnVlLXN0eWxlLWxvYWRlciFjc3MtbG9hZGVyP3NvdXJjZU1hcCEuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlcj9pZD1kYXRhLXYtNTMwMWEyMzYmc2NvcGVkPXRydWUhLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3I/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL2ltcG9ydGVyLnZ1ZVwiKVxuXG52YXIgQ29tcG9uZW50ID0gcmVxdWlyZShcIiEuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGV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BQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(45)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(15),\\n /* template */\\n __webpack_require__(38),\\n /* scopeId */\\n \\\"data-v-de0d0e4e\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/passport/AuthorizedClients.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] AuthorizedClients.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-de0d0e4e\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-de0d0e4e\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9wYXNzcG9ydC9BdXRob3JpemVkQ2xpZW50cy52dWU/MzMyZSJdLCJzb3VyY2VzQ29udGVudCI6WyJcbi8qIHN0eWxlcyAqL1xucmVxdWlyZShcIiEhdnVlLWxvYWRlci9ub2RlX21vZHVsZXMvdnVlLX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wiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfVxufSkoKX1cblxubW9kdWxlLmV4cG9ydHMgPSBDb21wb25lbnQuZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQXV0aG9yaXplZENsaWVudHMudnVlXG4vLyBtb2R1bGUgaWQgPSA3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(46)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(16),\\n /* template */\\n __webpack_require__(39),\\n /* scopeId */\\n \\\"data-v-e9c80318\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/passport/Clients.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] Clients.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-e9c80318\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-e9c80318\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9wYXNzcG9ydC9DbGllbnRzLnZ1ZT9jODY3Il0sInNvdXJjZXNDb250ZW50IjpbIlxuLyogc3R5bGVzICovXG5yZXF1aXJlKFwiISF2dWUtbG9hZGVyL25vZGVfbW9kdWxlcy92dWUtc3R5bGUtbG9hZGVyIWNzcy1sb2FkZXI/c291cmNlTWFwIS4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyP2lkPWRhdGEtdi1lOWM4MDMxOCZzY29wZWQ9dHJ1ZSEuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvcj90eXBlPXN0eWxlcyZpbmRleD0wIS4vQ2xpZW50cy52dWVcIilcblxudmFyIENvbXBvbmVudCA9IHJlcXVpcmUoXCIhLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvY29tcG9uZW50LW5vcm1hbGl6ZXJcIikoXG4gIC8qIHNjcmlwdCAqL1xuICByZXF1aXJlKFwiISFidWJsZS1sb2FkZXIhLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3I/dHlwZT1zY3JpcHQmaW5kZXg9MCEuL0NsaWVudHMudnVlXCIpLFxuICAvKiB0ZW1wbGF0ZSAqL1xuICByZXF1aXJlKFwiISEuL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ByZXF1aXJlKFwidnVlLWhvdC1yZWxvYWQtYXBpXCIpXG4gIGhvdEFQSS5pbnN0YWxsKHJlcXVpcmUoXCJ2dWVcIiksIGZhbHNlKVxuICBpZiAoIWhvdEFQSS5jb21wYXRpYmxlKSByZXR1cm5cbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAoIW1vZHVsZS5ob3QuZGF0YSkge1xuICAgIGhvdEFQSS5jcmVhdGVSZWNvcmQoXCJkYXRhLXYtZTljODAzMThcIiwgQ29tcG9uZW50Lm9wdGlvbnMpXG4gIH0gZWxzZSB7XG4gICAgaG90QVBJLnJlbG9hZChcImRhdGEtdi1lOWM4MDMxOFwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfVxufSkoKX1cblxubW9kdWxlLmV4cG9ydHMgPSBDb21wb25lbnQuZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQ2xpZW50cy52dWVcbi8vIG1vZHVsZSBpZCA9IDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(41)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(17),\\n /* template */\\n __webpack_require__(34),\\n /* scopeId */\\n \\\"data-v-225778c2\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/passport/PersonalAccessTokens.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] PersonalAccessTokens.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-225778c2\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-225778c2\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9wYXNzcG9ydC9QZXJzb25hbEFjY2Vzc1Rva2Vucy52dWU/MDJiMSJdLCJzb3VyY2VzQ29udGVudCI6WyJcbi8qIHN0eWxlcyAqL1xucmVxdWlyZShcIiEhdnVlLWxvYWRlci9ub2RlX21vZHVsZXMvdnVlLXN0eWxlLWxvYWRlciFjc3MtbG9hZGVyP3NvdXJjZU1hcCEuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlcj9pZD1kYXRhLXYtMjI1Nzc4YzImc2NvcGVkPXRydWUhLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3I/dHlwZT1zdHlsZXMmaW5kZX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nlc3NUb2tlbnMudnVlXG4vLyBtb2R1bGUgaWQgPSA5XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*\\n * jQuery File Upload Plugin\\n * https://github.com/blueimp/jQuery-File-Upload\\n *\\n * Copyright 2010, Sebastian Tschan\\n * https://blueimp.net\\n *\\n * Licensed under the MIT license:\\n * https://opensource.org/licenses/MIT\\n */\\n\\n/* jshint nomen:false */\\n/* global define, require, window, document, location, Blob, FormData */\\n\\n;(function (factory) {\\n 'use strict';\\n if (true) {\\n // Register as an anonymous AMD module:\\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [\\n __webpack_require__(3),\\n __webpack_require__(27)\\n ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n } else if (typeof exports === 'object') {\\n // Node/CommonJS:\\n factory(\\n require('jquery'),\\n require('./vendor/jquery.ui.widget')\\n );\\n } else {\\n // Browser globals:\\n factory(window.jQuery);\\n }\\n}(function ($) {\\n 'use strict';\\n\\n // Detect file input support, based on\\n // http://viljamis.com/blog/2012/file-upload-support-on-mobile/\\n $.support.fileInput = !(new RegExp(\\n // Handle devices which give false positives for the feature detection:\\n '(Android (1\\\\\\\\.[0156]|2\\\\\\\\.[01]))' +\\n '|(Windows Phone (OS 7|8\\\\\\\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +\\n '|(w(eb)?OSBrowser)|(webOS)' +\\n '|(Kindle/(1\\\\\\\\.0|2\\\\\\\\.[05]|3\\\\\\\\.0))'\\n ).test(window.navigator.userAgent) ||\\n // Feature detection for all other devices:\\n $('<input type=\\\"file\\\">').prop('disabled'));\\n\\n // The FileReader API is not actually used, but works as feature detection,\\n // as some Safari versions (5?) support XHR file uploads via the FormData API,\\n // but not non-multipart XHR file uploads.\\n // window.XMLHttpRequestUpload is not available on IE10, so we check for\\n // window.ProgressEvent instead to detect XHR2 file upload capability:\\n $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);\\n $.support.xhrFormDataFileUpload = !!window.FormData;\\n\\n // Detect support for Blob slicing (required for chunked uploads):\\n $.support.blobSlice = window.Blob && (Blob.prototype.slice ||\\n Blob.prototype.webkitSlice || Blob.prototype.mozSlice);\\n\\n // Helper function to create drag handlers for dragover/dragenter/dragleave:\\n function getDragHandler(type) {\\n var isDragOver = type === 'dragover';\\n return function (e) {\\n e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;\\n var dataTransfer = e.dataTransfer;\\n if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&\\n this._trigger(\\n type,\\n $.Event(type, {delegatedEvent: e})\\n ) !== false) {\\n e.preventDefault();\\n if (isDragOver) {\\n dataTransfer.dropEffect = 'copy';\\n }\\n }\\n };\\n }\\n\\n // The fileupload widget listens for change events on file input fields defined\\n // via fileInput setting and paste or drop events of the given dropZone.\\n // In addition to the default jQuery Widget methods, the fileupload widget\\n // exposes the \\\"add\\\" and \\\"send\\\" methods, to add or directly send files using\\n // the fileupload API.\\n // By default, files added via file input selection, paste, drag & drop or\\n // \\\"add\\\" method are uploaded immediately, but it is possible to override\\n // the \\\"add\\\" callback option to queue file uploads.\\n $.widget('blueimp.fileupload', {\\n\\n options: {\\n // The drop target element(s), by the default the complete document.\\n // Set to null to disable drag & drop support:\\n dropZone: $(document),\\n // The paste target element(s), by the default undefined.\\n // Set to a DOM node or jQuery object to enable file pasting:\\n pasteZone: undefined,\\n // The file input field(s), that are listened to for change events.\\n // If undefined, it is set to the file input fields inside\\n // of the widget element on plugin initialization.\\n // Set to null to disable the change listener.\\n fileInput: undefined,\\n // By default, the file input field is replaced with a clone after\\n // each input field change event. This is required for iframe transport\\n // queues and allows change events to be fired for the same file\\n // selection, but can be disabled by setting the following option to false:\\n replaceFileInput: true,\\n // The parameter name for the file form data (the request argument name).\\n // If undefined or empty, the name property of the file input field is\\n // used, or \\\"files[]\\\" if the file input name property is also empty,\\n // can be a string or an array of strings:\\n paramName: undefined,\\n // By default, each file of a selection is uploaded using an individual\\n // request for XHR type uploads. Set to false to upload file\\n // selections in one request each:\\n singleFileUploads: true,\\n // To limit the number of files uploaded with one XHR request,\\n // set the following option to an integer greater than 0:\\n limitMultiFileUploads: undefined,\\n // The following option limits the number of files uploaded with one\\n // XHR request to keep the request size under or equal to the defined\\n // limit in bytes:\\n limitMultiFileUploadSize: undefined,\\n // Multipart file uploads add a number of bytes to each uploaded file,\\n // therefore the following option adds an overhead for each file used\\n // in the limitMultiFileUploadSize configuration:\\n limitMultiFileUploadSizeOverhead: 512,\\n // Set the following option to true to issue all file upload requests\\n // in a sequential order:\\n sequentialUploads: false,\\n // To limit the number of concurrent uploads,\\n // set the following option to an integer greater than 0:\\n limitConcurrentUploads: undefined,\\n // Set the following option to true to force iframe transport uploads:\\n forceIframeTransport: false,\\n // Set the following option to the location of a redirect url on the\\n // origin server, for cross-domain iframe transport uploads:\\n redirect: undefined,\\n // The parameter name for the redirect url, sent as part of the form\\n // data and set to 'redirect' if this option is empty:\\n redirectParamName: undefined,\\n // Set the following option to the location of a postMessage window,\\n // to enable postMessage transport uploads:\\n postMessage: undefined,\\n // By default, XHR file uploads are sent as multipart/form-data.\\n // The iframe transport is always using multipart/form-data.\\n // Set to false to enable non-multipart XHR uploads:\\n multipart: true,\\n // To upload large files in smaller chunks, set the following option\\n // to a preferred maximum chunk size. If set to 0, null or undefined,\\n // or the browser does not support the required Blob API, files will\\n // be uploaded as a whole.\\n maxChunkSize: undefined,\\n // When a non-multipart upload or a chunked multipart upload has been\\n // aborted, this option can be used to resume the upload by setting\\n // it to the size of the already uploaded bytes. This option is most\\n // useful when modifying the options object inside of the \\\"add\\\" or\\n // \\\"send\\\" callbacks, as the options are cloned for each file upload.\\n uploadedBytes: undefined,\\n // By default, failed (abort or error) file uploads are removed from the\\n // global progress calculation. Set the following option to false to\\n // prevent recalculating the global progress data:\\n recalculateProgress: true,\\n // Interval in milliseconds to calculate and trigger progress events:\\n progressInterval: 100,\\n // Interval in milliseconds to calculate progress bitrate:\\n bitrateInterval: 500,\\n // By default, uploads are started automatically when adding files:\\n autoUpload: true,\\n\\n // Error and info messages:\\n messages: {\\n uploadedBytes: 'Uploaded bytes exceed file size'\\n },\\n\\n // Translation function, gets the message key to be translated\\n // and an object with context specific data as arguments:\\n i18n: function (message, context) {\\n message = this.messages[message] || message.toString();\\n if (context) {\\n $.each(context, function (key, value) {\\n message = message.replace('{' + key + '}', value);\\n });\\n }\\n return message;\\n },\\n\\n // Additional form data to be sent along with the file uploads can be set\\n // using this option, which accepts an array of objects with name and\\n // value properties, a function returning such an array, a FormData\\n // object (for XHR file uploads), or a simple object.\\n // The form of the first fileInput is given as parameter to the function:\\n formData: function (form) {\\n return form.serializeArray();\\n },\\n\\n // The add callback is invoked as soon as files are added to the fileupload\\n // widget (via file input selection, drag & drop, paste or add API call).\\n // If the singleFileUploads option is enabled, this callback will be\\n // called once for each file in the selection for XHR file uploads, else\\n // once for each file selection.\\n //\\n // The upload starts when the submit method is invoked on the data parameter.\\n // The data object contains a files property holding the added files\\n // and allows you to override plugin options as well as define ajax settings.\\n //\\n // Listeners for this callback can also be bound the following way:\\n // .bind('fileuploadadd', func);\\n //\\n // data.submit() returns a Promise object and allows to attach additional\\n // handlers using jQuery's Deferred callbacks:\\n // data.submit().done(func).fail(func).always(func);\\n add: function (e, data) {\\n if (e.isDefaultPrevented()) {\\n return false;\\n }\\n if (data.autoUpload || (data.autoUpload !== false &&\\n $(this).fileupload('option', 'autoUpload'))) {\\n data.process().done(function () {\\n data.submit();\\n });\\n }\\n },\\n\\n // Other callbacks:\\n\\n // Callback for the submit event of each file upload:\\n // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);\\n\\n // Callback for the start of each file upload request:\\n // send: function (e, data) {}, // .bind('fileuploadsend', func);\\n\\n // Callback for successful uploads:\\n // done: function (e, data) {}, // .bind('fileuploaddone', func);\\n\\n // Callback for failed (abort or error) uploads:\\n // fail: function (e, data) {}, // .bind('fileuploadfail', func);\\n\\n // Callback for completed (success, abort or error) requests:\\n // always: function (e, data) {}, // .bind('fileuploadalways', func);\\n\\n // Callback for upload progress events:\\n // progress: function (e, data) {}, // .bind('fileuploadprogress', func);\\n\\n // Callback for global upload progress events:\\n // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);\\n\\n // Callback for uploads start, equivalent to the global ajaxStart event:\\n // start: function (e) {}, // .bind('fileuploadstart', func);\\n\\n // Callback for uploads stop, equivalent to the global ajaxStop event:\\n // stop: function (e) {}, // .bind('fileuploadstop', func);\\n\\n // Callback for change events of the fileInput(s):\\n // change: function (e, data) {}, // .bind('fileuploadchange', func);\\n\\n // Callback for paste events to the pasteZone(s):\\n // paste: function (e, data) {}, // .bind('fileuploadpaste', func);\\n\\n // Callback for drop events of the dropZone(s):\\n // drop: function (e, data) {}, // .bind('fileuploaddrop', func);\\n\\n // Callback for dragover events of the dropZone(s):\\n // dragover: function (e) {}, // .bind('fileuploaddragover', func);\\n\\n // Callback for the start of each chunk upload request:\\n // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);\\n\\n // Callback for successful chunk uploads:\\n // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);\\n\\n // Callback for failed (abort or error) chunk uploads:\\n // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);\\n\\n // Callback for completed (success, abort or error) chunk upload requests:\\n // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);\\n\\n // The plugin options are used as settings object for the ajax calls.\\n // The following are jQuery ajax settings required for the file uploads:\\n processData: false,\\n contentType: false,\\n cache: false,\\n timeout: 0\\n },\\n\\n // A list of options that require reinitializing event listeners and/or\\n // special initialization code:\\n _specialOptions: [\\n 'fileInput',\\n 'dropZone',\\n 'pasteZone',\\n 'multipart',\\n 'forceIframeTransport'\\n ],\\n\\n _blobSlice: $.support.blobSlice && function () {\\n var slice = this.slice || this.webkitSlice || this.mozSlice;\\n return slice.apply(this, arguments);\\n },\\n\\n _BitrateTimer: function () {\\n this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());\\n this.loaded = 0;\\n this.bitrate = 0;\\n this.getBitrate = function (now, loaded, interval) {\\n var timeDiff = now - this.timestamp;\\n if (!this.bitrate || !interval || timeDiff > interval) {\\n this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;\\n this.loaded = loaded;\\n this.timestamp = now;\\n }\\n return this.bitrate;\\n };\\n },\\n\\n _isXHRUpload: function (options) {\\n return !options.forceIframeTransport &&\\n ((!options.multipart && $.support.xhrFileUpload) ||\\n $.support.xhrFormDataFileUpload);\\n },\\n\\n _getFormData: function (options) {\\n var formData;\\n if ($.type(options.formData) === 'function') {\\n return options.formData(options.form);\\n }\\n if ($.isArray(options.formData)) {\\n return options.formData;\\n }\\n if ($.type(options.formData) === 'object') {\\n formData = [];\\n $.each(options.formData, function (name, value) {\\n formData.push({name: name, value: value});\\n });\\n return formData;\\n }\\n return [];\\n },\\n\\n _getTotal: function (files) {\\n var total = 0;\\n $.each(files, function (index, file) {\\n total += file.size || 1;\\n });\\n return total;\\n },\\n\\n _initProgressObject: function (obj) {\\n var progress = {\\n loaded: 0,\\n total: 0,\\n bitrate: 0\\n };\\n if (obj._progress) {\\n $.extend(obj._progress, progress);\\n } else {\\n obj._progress = progress;\\n }\\n },\\n\\n _initResponseObject: function (obj) {\\n var prop;\\n if (obj._response) {\\n for (prop in obj._response) {\\n if (obj._response.hasOwnProperty(prop)) {\\n delete obj._response[prop];\\n }\\n }\\n } else {\\n obj._response = {};\\n }\\n },\\n\\n _onProgress: function (e, data) {\\n if (e.lengthComputable) {\\n var now = ((Date.now) ? Date.now() : (new Date()).getTime()),\\n loaded;\\n if (data._time && data.progressInterval &&\\n (now - data._time < data.progressInterval) &&\\n e.loaded !== e.total) {\\n return;\\n }\\n data._time = now;\\n loaded = Math.floor(\\n e.loaded / e.total * (data.chunkSize || data._progress.total)\\n ) + (data.uploadedBytes || 0);\\n // Add the difference from the previously loaded state\\n // to the global loaded counter:\\n this._progress.loaded += (loaded - data._progress.loaded);\\n this._progress.bitrate = this._bitrateTimer.getBitrate(\\n now,\\n this._progress.loaded,\\n data.bitrateInterval\\n );\\n data._progress.loaded = data.loaded = loaded;\\n data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(\\n now,\\n loaded,\\n data.bitrateInterval\\n );\\n // Trigger a custom progress event with a total data property set\\n // to the file size(s) of the current upload and a loaded data\\n // property calculated accordingly:\\n this._trigger(\\n 'progress',\\n $.Event('progress', {delegatedEvent: e}),\\n data\\n );\\n // Trigger a global progress event for all current file uploads,\\n // including ajax calls queued for sequential file uploads:\\n this._trigger(\\n 'progressall',\\n $.Event('progressall', {delegatedEvent: e}),\\n this._progress\\n );\\n }\\n },\\n\\n _initProgressListener: function (options) {\\n var that = this,\\n xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();\\n // Accesss to the native XHR object is required to add event listeners\\n // for the upload progress event:\\n if (xhr.upload) {\\n $(xhr.upload).bind('progress', function (e) {\\n var oe = e.originalEvent;\\n // Make sure the progress event properties get copied over:\\n e.lengthComputable = oe.lengthComputable;\\n e.loaded = oe.loaded;\\n e.total = oe.total;\\n that._onProgress(e, options);\\n });\\n options.xhr = function () {\\n return xhr;\\n };\\n }\\n },\\n\\n _isInstanceOf: function (type, obj) {\\n // Cross-frame instanceof check\\n return Object.prototype.toString.call(obj) === '[object ' + type + ']';\\n },\\n\\n _initXHRData: function (options) {\\n var that = this,\\n formData,\\n file = options.files[0],\\n // Ignore non-multipart setting if not supported:\\n multipart = options.multipart || !$.support.xhrFileUpload,\\n paramName = $.type(options.paramName) === 'array' ?\\n options.paramName[0] : options.paramName;\\n options.headers = $.extend({}, options.headers);\\n if (options.contentRange) {\\n options.headers['Content-Range'] = options.contentRange;\\n }\\n if (!multipart || options.blob || !this._isInstanceOf('File', file)) {\\n options.headers['Content-Disposition'] = 'attachment; filename=\\\"' +\\n encodeURI(file.name) + '\\\"';\\n }\\n if (!multipart) {\\n options.contentType = file.type || 'application/octet-stream';\\n options.data = options.blob || file;\\n } else if ($.support.xhrFormDataFileUpload) {\\n if (options.postMessage) {\\n // window.postMessage does not allow sending FormData\\n // objects, so we just add the File/Blob objects to\\n // the formData array and let the postMessage window\\n // create the FormData object out of this array:\\n formData = this._getFormData(options);\\n if (options.blob) {\\n formData.push({\\n name: paramName,\\n value: options.blob\\n });\\n } else {\\n $.each(options.files, function (index, file) {\\n formData.push({\\n name: ($.type(options.paramName) === 'array' &&\\n options.paramName[index]) || paramName,\\n value: file\\n });\\n });\\n }\\n } else {\\n if (that._isInstanceOf('FormData', options.formData)) {\\n formData = options.formData;\\n } else {\\n formData = new FormData();\\n $.each(this._getFormData(options), function (index, field) {\\n formData.append(field.name, field.value);\\n });\\n }\\n if (options.blob) {\\n formData.append(paramName, options.blob, file.name);\\n } else {\\n $.each(options.files, function (index, file) {\\n // This check allows the tests to run with\\n // dummy objects:\\n if (that._isInstanceOf('File', file) ||\\n that._isInstanceOf('Blob', file)) {\\n formData.append(\\n ($.type(options.paramName) === 'array' &&\\n options.paramName[index]) || paramName,\\n file,\\n file.uploadName || file.name\\n );\\n }\\n });\\n }\\n }\\n options.data = formData;\\n }\\n // Blob reference is not needed anymore, free memory:\\n options.blob = null;\\n },\\n\\n _initIframeSettings: function (options) {\\n var targetHost = $('<a></a>').prop('href', options.url).prop('host');\\n // Setting the dataType to iframe enables the iframe transport:\\n options.dataType = 'iframe ' + (options.dataType || '');\\n // The iframe transport accepts a serialized array as form data:\\n options.formData = this._getFormData(options);\\n // Add redirect url to form data on cross-domain uploads:\\n if (options.redirect && targetHost && targetHost !== location.host) {\\n options.formData.push({\\n name: options.redirectParamName || 'redirect',\\n value: options.redirect\\n });\\n }\\n },\\n\\n _initDataSettings: function (options) {\\n if (this._isXHRUpload(options)) {\\n if (!this._chunkedUpload(options, true)) {\\n if (!options.data) {\\n this._initXHRData(options);\\n }\\n this._initProgressListener(options);\\n }\\n if (options.postMessage) {\\n // Setting the dataType to postmessage enables the\\n // postMessage transport:\\n options.dataType = 'postmessage ' + (options.dataType || '');\\n }\\n } else {\\n this._initIframeSettings(options);\\n }\\n },\\n\\n _getParamName: function (options) {\\n var fileInput = $(options.fileInput),\\n paramName = options.paramName;\\n if (!paramName) {\\n paramName = [];\\n fileInput.each(function () {\\n var input = $(this),\\n name = input.prop('name') || 'files[]',\\n i = (input.prop('files') || [1]).length;\\n while (i) {\\n paramName.push(name);\\n i -= 1;\\n }\\n });\\n if (!paramName.length) {\\n paramName = [fileInput.prop('name') || 'files[]'];\\n }\\n } else if (!$.isArray(paramName)) {\\n paramName = [paramName];\\n }\\n return paramName;\\n },\\n\\n _initFormSettings: function (options) {\\n // Retrieve missing options from the input field and the\\n // associated form, if available:\\n if (!options.form || !options.form.length) {\\n options.form = $(options.fileInput.prop('form'));\\n // If the given file input doesn't have an associated form,\\n // use the default widget file input's form:\\n if (!options.form.length) {\\n options.form = $(this.options.fileInput.prop('form'));\\n }\\n }\\n options.paramName = this._getParamName(options);\\n if (!options.url) {\\n options.url = options.form.prop('action') || location.href;\\n }\\n // The HTTP request method must be \\\"POST\\\" or \\\"PUT\\\":\\n options.type = (options.type ||\\n ($.type(options.form.prop('method')) === 'string' &&\\n options.form.prop('method')) || ''\\n ).toUpperCase();\\n if (options.type !== 'POST' && options.type !== 'PUT' &&\\n options.type !== 'PATCH') {\\n options.type = 'POST';\\n }\\n if (!options.formAcceptCharset) {\\n options.formAcceptCharset = options.form.attr('accept-charset');\\n }\\n },\\n\\n _getAJAXSettings: function (data) {\\n var options = $.extend({}, this.options, data);\\n this._initFormSettings(options);\\n this._initDataSettings(options);\\n return options;\\n },\\n\\n // jQuery 1.6 doesn't provide .state(),\\n // while jQuery 1.8+ removed .isRejected() and .isResolved():\\n _getDeferredState: function (deferred) {\\n if (deferred.state) {\\n return deferred.state();\\n }\\n if (deferred.isResolved()) {\\n return 'resolved';\\n }\\n if (deferred.isRejected()) {\\n return 'rejected';\\n }\\n return 'pending';\\n },\\n\\n // Maps jqXHR callbacks to the equivalent\\n // methods of the given Promise object:\\n _enhancePromise: function (promise) {\\n promise.success = promise.done;\\n promise.error = promise.fail;\\n promise.complete = promise.always;\\n return promise;\\n },\\n\\n // Creates and returns a Promise object enhanced with\\n // the jqXHR methods abort, success, error and complete:\\n _getXHRPromise: function (resolveOrReject, context, args) {\\n var dfd = $.Deferred(),\\n promise = dfd.promise();\\n context = context || this.options.context || promise;\\n if (resolveOrReject === true) {\\n dfd.resolveWith(context, args);\\n } else if (resolveOrReject === false) {\\n dfd.rejectWith(context, args);\\n }\\n promise.abort = dfd.promise;\\n return this._enhancePromise(promise);\\n },\\n\\n // Adds convenience methods to the data callback argument:\\n _addConvenienceMethods: function (e, data) {\\n var that = this,\\n getPromise = function (args) {\\n return $.Deferred().resolveWith(that, args).promise();\\n };\\n data.process = function (resolveFunc, rejectFunc) {\\n if (resolveFunc || rejectFunc) {\\n data._processQueue = this._processQueue =\\n (this._processQueue || getPromise([this])).then(\\n function () {\\n if (data.errorThrown) {\\n return $.Deferred()\\n .rejectWith(that, [data]).promise();\\n }\\n return getPromise(arguments);\\n }\\n ).then(resolveFunc, rejectFunc);\\n }\\n return this._processQueue || getPromise([this]);\\n };\\n data.submit = function () {\\n if (this.state() !== 'pending') {\\n data.jqXHR = this.jqXHR =\\n (that._trigger(\\n 'submit',\\n $.Event('submit', {delegatedEvent: e}),\\n this\\n ) !== false) && that._onSend(e, this);\\n }\\n return this.jqXHR || that._getXHRPromise();\\n };\\n data.abort = function () {\\n if (this.jqXHR) {\\n return this.jqXHR.abort();\\n }\\n this.errorThrown = 'abort';\\n that._trigger('fail', null, this);\\n return that._getXHRPromise(false);\\n };\\n data.state = function () {\\n if (this.jqXHR) {\\n return that._getDeferredState(this.jqXHR);\\n }\\n if (this._processQueue) {\\n return that._getDeferredState(this._processQueue);\\n }\\n };\\n data.processing = function () {\\n return !this.jqXHR && this._processQueue && that\\n ._getDeferredState(this._processQueue) === 'pending';\\n };\\n data.progress = function () {\\n return this._progress;\\n };\\n data.response = function () {\\n return this._response;\\n };\\n },\\n\\n // Parses the Range header from the server response\\n // and returns the uploaded bytes:\\n _getUploadedBytes: function (jqXHR) {\\n var range = jqXHR.getResponseHeader('Range'),\\n parts = range && range.split('-'),\\n upperBytesPos = parts && parts.length > 1 &&\\n parseInt(parts[1], 10);\\n return upperBytesPos && upperBytesPos + 1;\\n },\\n\\n // Uploads a file in multiple, sequential requests\\n // by splitting the file up in multiple blob chunks.\\n // If the second parameter is true, only tests if the file\\n // should be uploaded in chunks, but does not invoke any\\n // upload requests:\\n _chunkedUpload: function (options, testOnly) {\\n options.uploadedBytes = options.uploadedBytes || 0;\\n var that = this,\\n file = options.files[0],\\n fs = file.size,\\n ub = options.uploadedBytes,\\n mcs = options.maxChunkSize || fs,\\n slice = this._blobSlice,\\n dfd = $.Deferred(),\\n promise = dfd.promise(),\\n jqXHR,\\n upload;\\n if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||\\n options.data) {\\n return false;\\n }\\n if (testOnly) {\\n return true;\\n }\\n if (ub >= fs) {\\n file.error = options.i18n('uploadedBytes');\\n return this._getXHRPromise(\\n false,\\n options.context,\\n [null, 'error', file.error]\\n );\\n }\\n // The chunk upload method:\\n upload = function () {\\n // Clone the options object for each chunk upload:\\n var o = $.extend({}, options),\\n currentLoaded = o._progress.loaded;\\n o.blob = slice.call(\\n file,\\n ub,\\n ub + mcs,\\n file.type\\n );\\n // Store the current chunk size, as the blob itself\\n // will be dereferenced after data processing:\\n o.chunkSize = o.blob.size;\\n // Expose the chunk bytes position range:\\n o.contentRange = 'bytes ' + ub + '-' +\\n (ub + o.chunkSize - 1) + '/' + fs;\\n // Process the upload data (the blob and potential form data):\\n that._initXHRData(o);\\n // Add progress listeners for this chunk upload:\\n that._initProgressListener(o);\\n jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||\\n that._getXHRPromise(false, o.context))\\n .done(function (result, textStatus, jqXHR) {\\n ub = that._getUploadedBytes(jqXHR) ||\\n (ub + o.chunkSize);\\n // Create a progress event if no final progress event\\n // with loaded equaling total has been triggered\\n // for this chunk:\\n if (currentLoaded + o.chunkSize - o._progress.loaded) {\\n that._onProgress($.Event('progress', {\\n lengthComputable: true,\\n loaded: ub - o.uploadedBytes,\\n total: ub - o.uploadedBytes\\n }), o);\\n }\\n options.uploadedBytes = o.uploadedBytes = ub;\\n o.result = result;\\n o.textStatus = textStatus;\\n o.jqXHR = jqXHR;\\n that._trigger('chunkdone', null, o);\\n that._trigger('chunkalways', null, o);\\n if (ub < fs) {\\n // File upload not yet complete,\\n // continue with the next chunk:\\n upload();\\n } else {\\n dfd.resolveWith(\\n o.context,\\n [result, textStatus, jqXHR]\\n );\\n }\\n })\\n .fail(function (jqXHR, textStatus, errorThrown) {\\n o.jqXHR = jqXHR;\\n o.textStatus = textStatus;\\n o.errorThrown = errorThrown;\\n that._trigger('chunkfail', null, o);\\n that._trigger('chunkalways', null, o);\\n dfd.rejectWith(\\n o.context,\\n [jqXHR, textStatus, errorThrown]\\n );\\n });\\n };\\n this._enhancePromise(promise);\\n promise.abort = function () {\\n return jqXHR.abort();\\n };\\n upload();\\n return promise;\\n },\\n\\n _beforeSend: function (e, data) {\\n if (this._active === 0) {\\n // the start callback is triggered when an upload starts\\n // and no other uploads are currently running,\\n // equivalent to the global ajaxStart event:\\n this._trigger('start');\\n // Set timer for global bitrate progress calculation:\\n this._bitrateTimer = new this._BitrateTimer();\\n // Reset the global progress values:\\n this._progress.loaded = this._progress.total = 0;\\n this._progress.bitrate = 0;\\n }\\n // Make sure the container objects for the .response() and\\n // .progress() methods on the data object are available\\n // and reset to their initial state:\\n this._initResponseObject(data);\\n this._initProgressObject(data);\\n data._progress.loaded = data.loaded = data.uploadedBytes || 0;\\n data._progress.total = data.total = this._getTotal(data.files) || 1;\\n data._progress.bitrate = data.bitrate = 0;\\n this._active += 1;\\n // Initialize the global progress values:\\n this._progress.loaded += data.loaded;\\n this._progress.total += data.total;\\n },\\n\\n _onDone: function (result, textStatus, jqXHR, options) {\\n var total = options._progress.total,\\n response = options._response;\\n if (options._progress.loaded < total) {\\n // Create a progress event if no final progress event\\n // with loaded equaling total has been triggered:\\n this._onProgress($.Event('progress', {\\n lengthComputable: true,\\n loaded: total,\\n total: total\\n }), options);\\n }\\n response.result = options.result = result;\\n response.textStatus = options.textStatus = textStatus;\\n response.jqXHR = options.jqXHR = jqXHR;\\n this._trigger('done', null, options);\\n },\\n\\n _onFail: function (jqXHR, textStatus, errorThrown, options) {\\n var response = options._response;\\n if (options.recalculateProgress) {\\n // Remove the failed (error or abort) file upload from\\n // the global progress calculation:\\n this._progress.loaded -= options._progress.loaded;\\n this._progress.total -= options._progress.total;\\n }\\n response.jqXHR = options.jqXHR = jqXHR;\\n response.textStatus = options.textStatus = textStatus;\\n response.errorThrown = options.errorThrown = errorThrown;\\n this._trigger('fail', null, options);\\n },\\n\\n _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {\\n // jqXHRorResult, textStatus and jqXHRorError are added to the\\n // options object via done and fail callbacks\\n this._trigger('always', null, options);\\n },\\n\\n _onSend: function (e, data) {\\n if (!data.submit) {\\n this._addConvenienceMethods(e, data);\\n }\\n var that = this,\\n jqXHR,\\n aborted,\\n slot,\\n pipe,\\n options = that._getAJAXSettings(data),\\n send = function () {\\n that._sending += 1;\\n // Set timer for bitrate progress calculation:\\n options._bitrateTimer = new that._BitrateTimer();\\n jqXHR = jqXHR || (\\n ((aborted || that._trigger(\\n 'send',\\n $.Event('send', {delegatedEvent: e}),\\n options\\n ) === false) &&\\n that._getXHRPromise(false, options.context, aborted)) ||\\n that._chunkedUpload(options) || $.ajax(options)\\n ).done(function (result, textStatus, jqXHR) {\\n that._onDone(result, textStatus, jqXHR, options);\\n }).fail(function (jqXHR, textStatus, errorThrown) {\\n that._onFail(jqXHR, textStatus, errorThrown, options);\\n }).always(function (jqXHRorResult, textStatus, jqXHRorError) {\\n that._onAlways(\\n jqXHRorResult,\\n textStatus,\\n jqXHRorError,\\n options\\n );\\n that._sending -= 1;\\n that._active -= 1;\\n if (options.limitConcurrentUploads &&\\n options.limitConcurrentUploads > that._sending) {\\n // Start the next queued upload,\\n // that has not been aborted:\\n var nextSlot = that._slots.shift();\\n while (nextSlot) {\\n if (that._getDeferredState(nextSlot) === 'pending') {\\n nextSlot.resolve();\\n break;\\n }\\n nextSlot = that._slots.shift();\\n }\\n }\\n if (that._active === 0) {\\n // The stop callback is triggered when all uploads have\\n // been completed, equivalent to the global ajaxStop event:\\n that._trigger('stop');\\n }\\n });\\n return jqXHR;\\n };\\n this._beforeSend(e, options);\\n if (this.options.sequentialUploads ||\\n (this.options.limitConcurrentUploads &&\\n this.options.limitConcurrentUploads <= this._sending)) {\\n if (this.options.limitConcurrentUploads > 1) {\\n slot = $.Deferred();\\n this._slots.push(slot);\\n pipe = slot.then(send);\\n } else {\\n this._sequence = this._sequence.then(send, send);\\n pipe = this._sequence;\\n }\\n // Return the piped Promise object, enhanced with an abort method,\\n // which is delegated to the jqXHR object of the current upload,\\n // and jqXHR callbacks mapped to the equivalent Promise methods:\\n pipe.abort = function () {\\n aborted = [undefined, 'abort', 'abort'];\\n if (!jqXHR) {\\n if (slot) {\\n slot.rejectWith(options.context, aborted);\\n }\\n return send();\\n }\\n return jqXHR.abort();\\n };\\n return this._enhancePromise(pipe);\\n }\\n return send();\\n },\\n\\n _onAdd: function (e, data) {\\n var that = this,\\n result = true,\\n options = $.extend({}, this.options, data),\\n files = data.files,\\n filesLength = files.length,\\n limit = options.limitMultiFileUploads,\\n limitSize = options.limitMultiFileUploadSize,\\n overhead = options.limitMultiFileUploadSizeOverhead,\\n batchSize = 0,\\n paramName = this._getParamName(options),\\n paramNameSet,\\n paramNameSlice,\\n fileSet,\\n i,\\n j = 0;\\n if (!filesLength) {\\n return false;\\n }\\n if (limitSize && files[0].size === undefined) {\\n limitSize = undefined;\\n }\\n if (!(options.singleFileUploads || limit || limitSize) ||\\n !this._isXHRUpload(options)) {\\n fileSet = [files];\\n paramNameSet = [paramName];\\n } else if (!(options.singleFileUploads || limitSize) && limit) {\\n fileSet = [];\\n paramNameSet = [];\\n for (i = 0; i < filesLength; i += limit) {\\n fileSet.push(files.slice(i, i + limit));\\n paramNameSlice = paramName.slice(i, i + limit);\\n if (!paramNameSlice.length) {\\n paramNameSlice = paramName;\\n }\\n paramNameSet.push(paramNameSlice);\\n }\\n } else if (!options.singleFileUploads && limitSize) {\\n fileSet = [];\\n paramNameSet = [];\\n for (i = 0; i < filesLength; i = i + 1) {\\n batchSize += files[i].size + overhead;\\n if (i + 1 === filesLength ||\\n ((batchSize + files[i + 1].size + overhead) > limitSize) ||\\n (limit && i + 1 - j >= limit)) {\\n fileSet.push(files.slice(j, i + 1));\\n paramNameSlice = paramName.slice(j, i + 1);\\n if (!paramNameSlice.length) {\\n paramNameSlice = paramName;\\n }\\n paramNameSet.push(paramNameSlice);\\n j = i + 1;\\n batchSize = 0;\\n }\\n }\\n } else {\\n paramNameSet = paramName;\\n }\\n data.originalFiles = files;\\n $.each(fileSet || files, function (index, element) {\\n var newData = $.extend({}, data);\\n newData.files = fileSet ? element : [element];\\n newData.paramName = paramNameSet[index];\\n that._initResponseObject(newData);\\n that._initProgressObject(newData);\\n that._addConvenienceMethods(e, newData);\\n result = that._trigger(\\n 'add',\\n $.Event('add', {delegatedEvent: e}),\\n newData\\n );\\n return result;\\n });\\n return result;\\n },\\n\\n _replaceFileInput: function (data) {\\n var input = data.fileInput,\\n inputClone = input.clone(true),\\n restoreFocus = input.is(document.activeElement);\\n // Add a reference for the new cloned file input to the data argument:\\n data.fileInputClone = inputClone;\\n $('<form></form>').append(inputClone)[0].reset();\\n // Detaching allows to insert the fileInput on another form\\n // without loosing the file input value:\\n input.after(inputClone).detach();\\n // If the fileInput had focus before it was detached,\\n // restore focus to the inputClone.\\n if (restoreFocus) {\\n inputClone.focus();\\n }\\n // Avoid memory leaks with the detached file input:\\n $.cleanData(input.unbind('remove'));\\n // Replace the original file input element in the fileInput\\n // elements set with the clone, which has been copied including\\n // event handlers:\\n this.options.fileInput = this.options.fileInput.map(function (i, el) {\\n if (el === input[0]) {\\n return inputClone[0];\\n }\\n return el;\\n });\\n // If the widget has been initialized on the file input itself,\\n // override this.element with the file input clone:\\n if (input[0] === this.element[0]) {\\n this.element = inputClone;\\n }\\n },\\n\\n _handleFileTreeEntry: function (entry, path) {\\n var that = this,\\n dfd = $.Deferred(),\\n entries = [],\\n dirReader,\\n errorHandler = function (e) {\\n if (e && !e.entry) {\\n e.entry = entry;\\n }\\n // Since $.when returns immediately if one\\n // Deferred is rejected, we use resolve instead.\\n // This allows valid files and invalid items\\n // to be returned together in one set:\\n dfd.resolve([e]);\\n },\\n successHandler = function (entries) {\\n that._handleFileTreeEntries(\\n entries,\\n path + entry.name + '/'\\n ).done(function (files) {\\n dfd.resolve(files);\\n }).fail(errorHandler);\\n },\\n readEntries = function () {\\n dirReader.readEntries(function (results) {\\n if (!results.length) {\\n successHandler(entries);\\n } else {\\n entries = entries.concat(results);\\n readEntries();\\n }\\n }, errorHandler);\\n };\\n path = path || '';\\n if (entry.isFile) {\\n if (entry._file) {\\n // Workaround for Chrome bug #149735\\n entry._file.relativePath = path;\\n dfd.resolve(entry._file);\\n } else {\\n entry.file(function (file) {\\n file.relativePath = path;\\n dfd.resolve(file);\\n }, errorHandler);\\n }\\n } else if (entry.isDirectory) {\\n dirReader = entry.createReader();\\n readEntries();\\n } else {\\n // Return an empy list for file system items\\n // other than files or directories:\\n dfd.resolve([]);\\n }\\n return dfd.promise();\\n },\\n\\n _handleFileTreeEntries: function (entries, path) {\\n var that = this;\\n return $.when.apply(\\n $,\\n $.map(entries, function (entry) {\\n return that._handleFileTreeEntry(entry, path);\\n })\\n ).then(function () {\\n return Array.prototype.concat.apply(\\n [],\\n arguments\\n );\\n });\\n },\\n\\n _getDroppedFiles: function (dataTransfer) {\\n dataTransfer = dataTransfer || {};\\n var items = dataTransfer.items;\\n if (items && items.length && (items[0].webkitGetAsEntry ||\\n items[0].getAsEntry)) {\\n return this._handleFileTreeEntries(\\n $.map(items, function (item) {\\n var entry;\\n if (item.webkitGetAsEntry) {\\n entry = item.webkitGetAsEntry();\\n if (entry) {\\n // Workaround for Chrome bug #149735:\\n entry._file = item.getAsFile();\\n }\\n return entry;\\n }\\n return item.getAsEntry();\\n })\\n );\\n }\\n return $.Deferred().resolve(\\n $.makeArray(dataTransfer.files)\\n ).promise();\\n },\\n\\n _getSingleFileInputFiles: function (fileInput) {\\n fileInput = $(fileInput);\\n var entries = fileInput.prop('webkitEntries') ||\\n fileInput.prop('entries'),\\n files,\\n value;\\n if (entries && entries.length) {\\n return this._handleFileTreeEntries(entries);\\n }\\n files = $.makeArray(fileInput.prop('files'));\\n if (!files.length) {\\n value = fileInput.prop('value');\\n if (!value) {\\n return $.Deferred().resolve([]).promise();\\n }\\n // If the files property is not available, the browser does not\\n // support the File API and we add a pseudo File object with\\n // the input value as name with path information removed:\\n files = [{name: value.replace(/^.*\\\\\\\\/, '')}];\\n } else if (files[0].name === undefined && files[0].fileName) {\\n // File normalization for Safari 4 and Firefox 3:\\n $.each(files, function (index, file) {\\n file.name = file.fileName;\\n file.size = file.fileSize;\\n });\\n }\\n return $.Deferred().resolve(files).promise();\\n },\\n\\n _getFileInputFiles: function (fileInput) {\\n if (!(fileInput instanceof $) || fileInput.length === 1) {\\n return this._getSingleFileInputFiles(fileInput);\\n }\\n return $.when.apply(\\n $,\\n $.map(fileInput, this._getSingleFileInputFiles)\\n ).then(function () {\\n return Array.prototype.concat.apply(\\n [],\\n arguments\\n );\\n });\\n },\\n\\n _onChange: function (e) {\\n var that = this,\\n data = {\\n fileInput: $(e.target),\\n form: $(e.target.form)\\n };\\n this._getFileInputFiles(data.fileInput).always(function (files) {\\n data.files = files;\\n if (that.options.replaceFileInput) {\\n that._replaceFileInput(data);\\n }\\n if (that._trigger(\\n 'change',\\n $.Event('change', {delegatedEvent: e}),\\n data\\n ) !== false) {\\n that._onAdd(e, data);\\n }\\n });\\n },\\n\\n _onPaste: function (e) {\\n var items = e.originalEvent && e.originalEvent.clipboardData &&\\n e.originalEvent.clipboardData.items,\\n data = {files: []};\\n if (items && items.length) {\\n $.each(items, function (index, item) {\\n var file = item.getAsFile && item.getAsFile();\\n if (file) {\\n data.files.push(file);\\n }\\n });\\n if (this._trigger(\\n 'paste',\\n $.Event('paste', {delegatedEvent: e}),\\n data\\n ) !== false) {\\n this._onAdd(e, data);\\n }\\n }\\n },\\n\\n _onDrop: function (e) {\\n e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;\\n var that = this,\\n dataTransfer = e.dataTransfer,\\n data = {};\\n if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {\\n e.preventDefault();\\n this._getDroppedFiles(dataTransfer).always(function (files) {\\n data.files = files;\\n if (that._trigger(\\n 'drop',\\n $.Event('drop', {delegatedEvent: e}),\\n data\\n ) !== false) {\\n that._onAdd(e, data);\\n }\\n });\\n }\\n },\\n\\n _onDragOver: getDragHandler('dragover'),\\n\\n _onDragEnter: getDragHandler('dragenter'),\\n\\n _onDragLeave: getDragHandler('dragleave'),\\n\\n _initEventHandlers: function () {\\n if (this._isXHRUpload(this.options)) {\\n this._on(this.options.dropZone, {\\n dragover: this._onDragOver,\\n drop: this._onDrop,\\n // event.preventDefault() on dragenter is required for IE10+:\\n dragenter: this._onDragEnter,\\n // dragleave is not required, but added for completeness:\\n dragleave: this._onDragLeave\\n });\\n this._on(this.options.pasteZone, {\\n paste: this._onPaste\\n });\\n }\\n if ($.support.fileInput) {\\n this._on(this.options.fileInput, {\\n change: this._onChange\\n });\\n }\\n },\\n\\n _destroyEventHandlers: function () {\\n this._off(this.options.dropZone, 'dragenter dragleave dragover drop');\\n this._off(this.options.pasteZone, 'paste');\\n this._off(this.options.fileInput, 'change');\\n },\\n\\n _destroy: function () {\\n this._destroyEventHandlers();\\n },\\n\\n _setOption: function (key, value) {\\n var reinit = $.inArray(key, this._specialOptions) !== -1;\\n if (reinit) {\\n this._destroyEventHandlers();\\n }\\n this._super(key, value);\\n if (reinit) {\\n this._initSpecialOptions();\\n this._initEventHandlers();\\n }\\n },\\n\\n _initSpecialOptions: function () {\\n var options = this.options;\\n if (options.fileInput === undefined) {\\n options.fileInput = this.element.is('input[type=\\\"file\\\"]') ?\\n this.element : this.element.find('input[type=\\\"file\\\"]');\\n } else if (!(options.fileInput instanceof $)) {\\n options.fileInput = $(options.fileInput);\\n }\\n if (!(options.dropZone instanceof $)) {\\n options.dropZone = $(options.dropZone);\\n }\\n if (!(options.pasteZone instanceof $)) {\\n options.pasteZone = $(options.pasteZone);\\n }\\n },\\n\\n _getRegExp: function (str) {\\n var parts = str.split('/'),\\n modifiers = parts.pop();\\n parts.shift();\\n return new RegExp(parts.join('/'), modifiers);\\n },\\n\\n _isRegExpOption: function (key, value) {\\n return key !== 'url' && $.type(value) === 'string' &&\\n /^\\\\/.*\\\\/[igm]{0,3}$/.test(value);\\n },\\n\\n _initDataAttributes: function () {\\n var that = this,\\n options = this.options,\\n data = this.element.data();\\n // Initialize options set via HTML5 data-attributes:\\n $.each(\\n this.element[0].attributes,\\n function (index, attr) {\\n var key = attr.name.toLowerCase(),\\n value;\\n if (/^data-/.test(key)) {\\n // Convert hyphen-ated key to camelCase:\\n key = key.slice(5).replace(/-[a-z]/g, function (str) {\\n return str.charAt(1).toUpperCase();\\n });\\n value = data[key];\\n if (that._isRegExpOption(key, value)) {\\n value = that._getRegExp(value);\\n }\\n options[key] = value;\\n }\\n }\\n );\\n },\\n\\n _create: function () {\\n this._initDataAttributes();\\n this._initSpecialOptions();\\n this._slots = [];\\n this._sequence = this._getXHRPromise(true);\\n this._sending = this._active = 0;\\n this._initProgressObject(this);\\n this._initEventHandlers();\\n },\\n\\n // This method is exposed to the widget API and allows to query\\n // the number of active uploads:\\n active: function () {\\n return this._active;\\n },\\n\\n // This method is exposed to the widget API and allows to query\\n // the widget upload progress.\\n // It returns an object with loaded, total and bitrate properties\\n // for the running uploads:\\n progress: function () {\\n return this._progress;\\n },\\n\\n // This method is exposed to the widget API and allows adding files\\n // using the fileupload API. The data parameter accepts an object which\\n // must have a files property and can contain additional options:\\n // .fileupload('add', {files: filesList});\\n add: function (data) {\\n var that = this;\\n if (!data || this.options.disabled) {\\n return;\\n }\\n if (data.fileInput && !data.files) {\\n this._getFileInputFiles(data.fileInput).always(function (files) {\\n data.files = files;\\n that._onAdd(null, data);\\n });\\n } else {\\n data.files = $.makeArray(data.files);\\n this._onAdd(null, data);\\n }\\n },\\n\\n // This method is exposed to the widget API and allows sending files\\n // using the fileupload API. The data parameter accepts an object which\\n // must have a files or fileInput property and can contain additional options:\\n // .fileupload('send', {files: filesList});\\n // The method returns a Promise object for the file upload call.\\n send: function (data) {\\n if (data && !this.options.disabled) {\\n if (data.fileInput && !data.files) {\\n var that = this,\\n dfd = $.Deferred(),\\n promise = dfd.promise(),\\n jqXHR,\\n aborted;\\n promise.abort = function () {\\n aborted = true;\\n if (jqXHR) {\\n return jqXHR.abort();\\n }\\n dfd.reject(null, 'abort', 'abort');\\n return promise;\\n };\\n this._getFileInputFiles(data.fileInput).always(\\n function (files) {\\n if (aborted) {\\n return;\\n }\\n if (!files.length) {\\n dfd.reject();\\n return;\\n }\\n data.files = files;\\n jqXHR = that._onSend(null, data);\\n jqXHR.then(\\n function (result, textStatus, jqXHR) {\\n dfd.resolve(result, textStatus, jqXHR);\\n },\\n function (jqXHR, textStatus, errorThrown) {\\n dfd.reject(jqXHR, textStatus, errorThrown);\\n }\\n );\\n }\\n );\\n return this._enhancePromise(promise);\\n }\\n data.files = $.makeArray(data.files);\\n if (data.files.length) {\\n return this._onSend(null, data);\\n }\\n }\\n return this._getXHRPromise(false, data && data.context);\\n }\\n\\n });\\n\\n}));\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L2JsdWVpbXAtZmlsZS11cGxvYWQvanMvanF1ZXJ5LmZpbGV1cGxvYWQuanM/NDFlMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogalF1ZXJ5IEZpbGUgVXBsb2FkIFBsdWdpblxuICogaHR0cHM6Ly9naXRodWIuY29tL2JsdWVpbXAvalF1ZXJ5LUZpbGUtVXBsb2FkXG4gKlxuICogQ29weXJpZ2h0IDIwMTAsIFNlYmFzdGlhbiBUc2NoYW5cbiAqIGh0dHBzOi8vYmx1ZWltcC5uZXRcbiAqXG4gKiBMaWNlbnNlZCB1bmRlciB0aGUgTUlUIGxpY2Vuc2U6XG4gKiBodHRwczovL29wZW5zb3VyY2Uub3JnL2xpY2Vuc2VzL01JVFxuICovXG5cbi8qIGpzaGludCBub21lbjpmYWxzZSAqL1xuLyogZ2xvYmFsIGRlZmluZSwgcmVxdWlyZSwgd2luZG93LCBkb2N1bWVudCwgbG9jYXRpb24sIEJsb2IsIEZvcm1EYXRhICovXG5cbjsoZnVuY3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saXppbmcgZXZlbnQgbGlzdGVuZXJzIGFuZC9vclxuICAgICAgICAvLyBzcGVjaWFsIGluaXRpYWxpemF0aW9uIGNvZGU6XG4gICAgICAgIF9zcGVjaWFsT3B0aW9uczogW1xuICAgICAgICAgICAgJ2ZpbGVJbnB1dCcsXG4gICAgICAgICAgICAnZHJvcFpvbmUnLFxuICAgICAgICAgICAgJ3Bhc3RlWm9uZScsXG4gICAgICAgICAgICAnbXVsdGlwYXJ0JyxcbiAgICAgICAgICAgICdmb3JjZUlmcmFtZVRyYW5zcG9ydCdcbiAgICAgICAgXSxcblxuICAgICAgICBfYmxvYlNsaWNlOiAkLnN1cHBvcnQuYmxvYlNsaWNlICYmIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBzbGljZSA9IHRoaXMuc2xpY2UgfHwgdGhpcy53ZWJraXRTbGljZSB8fCB0aGlzLm1velNsaWNlO1xuICAgICAgICAgICAgcmV0dXJuIHNsaWNlLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX0JpdHJhdGVUaW1lcjogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy50aW1lc3RhbXAgPSAoKERhdGUubm93KSA/IERhdGUubm93KCkgOiAobmV3IERhdGUoKSkuZ2V0VGltZSgpKTtcbiAgICAgICAgICAgIHRoaXMubG9hZGVkID0gMDtcbiAgICAgICAgICAgIHRoaXMuYml0cmF0ZSA9IDA7XG4gICAgICAgICAgICB0aGlzLmdldEJpdHJhdGUgPSBmdW5jdGlvbiAobm93LCBsb2FkZWQsIGludGVydmFsKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRpbWVEaWZmID0gbm93IC0gdGhpcy50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmJpdHJhdGUgfHwgIWludGVydmFsIHx8IHRpbWVEaWZmID4gaW50ZXJ2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5iaXRyYXRlID0gKGxvYWRlZCAtIHRoaXMubG9hZGVkKSAqICgxMDAwIC8gdGltZURpZmYpICogODtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2FkZWQgPSBsb2FkZWQ7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMudGltZXN0YW1wID0gbm93O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5iaXRyYXRlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfSxcblxuICAgICAgICBfaXNYSFJVcGxvYWQ6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm4gIW9wdGlvbnMuZm9yY2VJZnJhbWVUcmFuc3BvcnQgJiZcbiAgICAgICAgICAgICAgICAoKCFvcHRpb25zLm11bHRpcGFydCAmJiAkLnN1cHBvcnQueGhyRmlsZVVwbG9hZCkgfHxcbiAgICAgICAgICAgICAgICAkLnN1cHBvcnQueGhyRm9ybURhdGFGaWxlVXBsb2FkKTtcbiAgICAgICAgfSxcblxuICAgICAgICBfZ2V0Rm9ybURhdGE6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICB2YXIgZm9ybURhdGE7XG4gICAgICAgICAgICBpZiAoJC50eXBlKG9wdGlvbnMuZm9ybURhdGEpID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnMuZm9ybURhdGEob3B0aW9ucy5mb3JtKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgkLmlzQXJyYXkob3B0aW9ucy5mb3JtRGF0YSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9ucy5mb3JtRGF0YTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgkLnR5cGUob3B0aW9ucy5mb3JtRGF0YSkgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgZm9ybURhdGEgPSBbXTtcbiAgICAgICAgICAgICAgICAkLmVhY2gob3B0aW9ucy5mb3JtRGF0YSwgZnVuY3Rpb24gKG5hbWUsIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLnB1c2goe25hbWU6IG5hbWUsIHZhbHVlOiB2YWx1ZX0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybiBmb3JtRGF0YTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgfSxcblxuICAgICAgICBfZ2V0VG90YWw6IGZ1bmN0aW9uIChmaWxlcykge1xuICAgICAgICAgICAgdmFyIHRvdGFsID0gMDtcbiAgICAgICAgICAgICQuZWFjaChmaWxlcywgZnVuY3Rpb24gKGluZGV4LCBmaWxlKSB7XG4gICAgICAgICAgICAgICAgdG90YWwgKz0gZmlsZS5zaXplIHx8IDE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiB0b3RhbDtcbiAgICAgICAgfSxcblxuICAgICAgICBfaW5pdFByb2dyZXNzT2JqZWN0OiBmdW5jdGlvbiAob2JqKSB7XG4gICAgICAgICAgICB2YXIgcHJvZ3Jlc3MgPSB7XG4gICAgICAgICAgICAgICAgbG9hZGVkOiAwLFxuICAgICAgICAgICAgICAgIHRvdGFsOiAwLFxuICAgICAgICAgICAgICAgIGJpdHJhdGU6IDBcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAob2JqLl9wcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICQuZXh0ZW5kKG9iai5fcHJvZ3Jlc3MsIHByb2dyZXNzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb2JqLl9wcm9ncmVzcyA9IHByb2dyZXNzO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIF9pbml0UmVzcG9uc2VPYmplY3Q6IGZ1bmN0aW9uIChvYmopIHtcbiAgICAgICAgICAgIHZhciBwcm9wO1xuICAgICAgICAgICAgaWYgKG9iai5fcmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHByb3AgaW4gb2JqLl9yZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAob2JqLl9yZXNwb25zZS5oYXNPd25Qcm9wZXJ0eShwcm9wKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9iai5fcmVzcG9uc2VbcHJvcF07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG9iai5fcmVzcG9uc2UgPSB7fTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfb25Qcm9ncmVzczogZnVuY3Rpb24gKGUsIGRhdGEpIHtcbiAgICAgICAgICAgIGlmIChlLmxlbmd0aENvbXB1dGFibGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgbm93ID0gKChEYXRlLm5vdykgPyBEYXRlLm5vdygpIDogKG5ldyBEYXRlKCkpLmdldFRpbWUoKSksXG4gICAgICAgICAgICAgICAgICAgIGxvYWRlZDtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5fdGltZSAmJiBkYXRhLnByb2dyZXNzSW50ZXJ2YWwgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIChub3cgLSBkYXRhLl90aW1lIDwgZGF0YS5wcm9ncmVzc0ludGVydmFsKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgZS5sb2FkZWQgIT09IGUudG90YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkYXRhLl90aW1lID0gbm93O1xuICAgICAgICAgICAgICAgIGxvYWRlZCA9IE1hdGguZmxvb3IoXG4gICAgICAgICAgICAgICAgICAgIGUubG9hZGVkIC8gZS50b3RhbCAqIChkYXRh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ICAgICAgICAgICAgLy8gdG8gdGhlIGZpbGUgc2l6ZShzKSBvZiB0aGUgY3VycmVudCB1cGxvYWQgYW5kIGEgbG9hZGVkIGRhdGFcbiAgICAgICAgICAgICAgICAvLyBwcm9wZXJ0eSBjYWxjdWxhdGVkIGFjY29yZGluZ2x5OlxuICAgICAgICAgICAgICAgIHRoaXMuX3RyaWdnZXIoXG4gICAgICAgICAgICAgICAgICAgICdwcm9ncmVzcycsXG4gICAgICAgICAgICAgICAgICAgICQuRXZlbnQoJ3Byb2dyZXNzJywge2RlbGVnYXRlZEV2ZW50OiBlfSksXG4gICAgICAgICAgICAgICAgICAgIGRhdGFcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIC8vIFRyaWdnZXIgYSBnbG9iYWwgcHJvZ3Jlc3MgZXZlbnQgZm9yIGFsbCBjdXJyZW50IGZpbGUgdXBsb2FkcyxcbiAgICAgICAgICAgICAgICAvLyBpbmNsdWRpbmcgYWpheCBjYWxscyBxdWV1ZWQgZm9yIHNlcXVlbnRpYWwgZmlsZSB1cGxvYWRzOlxuICAgICAgICAgICAgICAgIHRoaXMuX3RyaWdnZXIoXG4gICAgICAgICAgICAgICAgICAgICdwcm9ncmVzc2FsbCcsXG4gICAgICAgICAgICAgICAgICAgICQuRXZlbnQoJ3Byb2dyZXNzYWxsJywge2RlbGVnYXRlZEV2ZW50OiBlfSksXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3Byb2dyZXNzXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfaW5pdFByb2dyZXNzTGlzdGVuZXI6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsXG4gICAgICAgICAgICAgICAgeGhyID0gb3B0aW9ucy54aHIgPyBvcHRpb25zLnhocigpIDogJC5hamF4U2V0dGluZ3MueGhyKCk7XG4gICAgICAgICAgICAvLyBBY2Nlc3NzIHRvIHRoZSBuYXRpdmUgWEhSIG9iamVjdCBpcyByZXF1aXJlZCB0byBhZGQgZXZlbnQgbGlzdGVuZXJzXG4gICAgICAgICAgICAvLyBmb3IgdGhlIHVwbG9hZCBwcm9ncmVzcyBldmVudDpcbiAgICAgICAgICAgIGlmICh4aHIudXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgJCh4aHIudXBsb2FkKS5iaW5kKCdwcm9ncmVzcycsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvZSA9IGUub3JpZ2luYWxFdmVudDtcbiAgICAgICAgICAgICAgICAgICAgLy8gTWFrZSBzdXJlIHRoZSBwcm9ncmVzcyBldmVudCBwcm9wZXJ0aWVzIGdldCBjb3BpZWQgb3ZlcjpcbiAgICAgICAgICAgICAgICAgICAgZS5sZW5ndGhDb21wdXRhYmxlID0gb2UubGVuZ3RoQ29tcHV0YWJsZTtcbiAgICAgICAgICAgICAgICAgICAgZS5sb2FkZWQgPSBvZS5sb2FkZWQ7XG4gICAgICAgICAgICAgICAgICAgIGUudG90YWwgPSBvZS50b3RhbDtcbiAgICAgICAgICAgICAgICAgICAgdGhhdC5fb25Qcm9ncmVzcyhlLCBvcHRpb25zKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBvcHRpb25zLnhociA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHhocjtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIF9pc0luc3RhbmNlT2Y6IGZ1bmN0aW9uICh0eXBlLCBvYmopIHtcbiAgICAgICAgICAgIC8vIENyb3NzLWZyYW1lIGluc3RhbmNlb2YgY2hlY2tcbiAgICAgICAgICAgIHJldHVybiBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSA9PT0gJ1tvYmplY3QgJyArIHR5cGUgKyAnXSc7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2luaXRYSFJEYXRhOiBmdW5jdGlvbiAob3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIHRoYXQgPSB0aGlzLFxuICAgICAgICAgICAgICAgIGZvcm1EYXRhLFxuICAgICAgICAgICAgICAgIGZpbGUgPSBvcHRpb25zLmZpbGVzWzBdLFxuICAgICAgICAgICAgICAgIC8vIElnbm9yZSBub24tbXVsdGlwYXJ0IHNldHRpbmcgaWYgbm90IHN1cHBvcnRlZDpcbiAgICAgICAgICAgICAgICBtdWx0aXBhcnQgPSBvcHRpb25zLm11bHRpcGFydCB8fCAhJC5zdXBwb3J0LnhockZpbGVVcGxvYWQsXG4gICAgICAgICAgICAgICAgcGFyYW1OYW1lID0gJC50eXBlKG9wdGlvbnMucGFyYW1OYW1lKSA9PT0gJ2FycmF5JyA/XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMucGFyYW1OYW1lWzBdIDogb3B0aW9ucy5wYXJhbU5hbWU7XG4gICAgICAgICAgICBvcHRpb25zLmhlYWRlcnMgPSAkLmV4dGVuZCh7fSwgb3B0aW9ucy5oZWFkZXJzKTtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmNvbnRlbnRSYW5nZSkge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuaGVhZGVyc1snQ29udGVudC1SYW5nZSddID0gb3B0aW9ucy5jb250ZW50UmFuZ2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIW11bHRpcGFydCB8fCBvcHRpb25zLmJsb2IgfHwgIXRoaXMuX2lzSW5zdGFuY2VPZignRmlsZScsIGZpbGUpKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5oZWFkZXJzWydDb250ZW50LURpc3Bvc2l0aW9uJ10gPSAnYXR0YWNobWVudDsgZmlsZW5hbWU9XCInICtcbiAgICAgICAgICAgICAgICAgICAgZW5jb2RlVVJJKGZpbGUubmFtZSkgKyAnXCInO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFtdWx0aXBhcnQpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmNvbnRlbnRUeXBlID0gZmlsZS50eXBlIHx8ICdhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0nO1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZGF0YSA9IG9wdGlvbnMuYmxvYiB8fCBmaWxlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgkLnN1cHBvcnQueGhyRm9ybURhdGFGaWxlVXBsb2FkKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucG9zdE1lc3NhZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gd2luZG93LnBvc3RNZXNzYWdlIGRvZXMgbm90IGFsbG93IHNlbmRpbmcgRm9ybURhdGFcbiAgICAgICAgICAgICAgICAgICAgLy8gb2JqZWN0cywgc28gd2UganVzdCBhZGQgdGhlIEZpbGUvQmxvYiBvYmplY3RzIHRvXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoZSBmb3JtRGF0YSBhcnJheSBhbmQgbGV0IHRoZSBwb3N0TWVzc2FnZSB3aW5kb3dcbiAgICAgICAgICAgICAgICAgICAgLy8gY3JlYXRlIHRoZSBGb3JtRGF0YSBvYmplY3Qgb3V0IG9mIHRoaXMgYXJyYXk6XG4gICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhID0gdGhpcy5fZ2V0Rm9ybURhdGEob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmJsb2IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IHBhcmFtTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogb3B0aW9ucy5ibG9iXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQuZWFjaChvcHRpb25zLmZpbGVzLCBmdW5jdGlvbiAoaW5kZXgsIGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtRGF0YS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogKCQudHlwZShvcHRpb25zLnBhcmFtTmFtZSkgPT09ICdhcnJheScgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMucGFyYW1OYW1lW2luZGV4XSkgfHwgcGFyYW1OYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZmlsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhhdC5faXNJbnN0YW5jZU9mKCdGb3JtRGF0YScsIG9wdGlvbnMuZm9ybURhdGEpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtRGF0YSA9IG9wdGlvbnMuZm9ybURhdGE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtRGF0YSA9IG5ldyBGb3JtRGF0YSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJC5lYWNoKHRoaXMuX2dldEZvcm1EYXRhKG9wdGlvbnMpLCBmdW5jdGlvbiAoaW5kZXgsIGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKGZpZWxkLm5hbWUsIGZpZWxkLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmJsb2IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZChwYXJhbU5hbWUsIG9wdGlvbnMuYmxvYiwgZmlsZS5uYW1lKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICQuZWFjaChvcHRpb25zLmZpbGVzLCBmdW5jdGlvbiAoaW5kZXgsIGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGNoZWNrIGFsbG93cyB0aGUgdGVzdHMgdG8gcnVuIHdpdGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBkdW1teSBvYmplY3RzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0aGF0Ll9pc0luc3RhbmNlT2YoJ0ZpbGUnLCBmaWxlKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5faXNJbnN0YW5jZU9mKCdCbG9iJywgZmlsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybURhdGEuYXBwZW5kKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCQudHlwZShvcHRpb25zLnBhcmFtTmFtZSkgPT09ICdhcnJheScgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLnBhcmFtTmFtZVtpbmRleF0pIHx8IHBhcmFtTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlLnVwbG9hZE5hbWUgfHwgZmlsZS5uYW1lXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgIC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XJhbU5hbWUgfHwgJ3JlZGlyZWN0JyxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG9wdGlvbnMucmVkaXJlY3RcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfaW5pdERhdGFTZXR0aW5nczogZnVuY3Rpb24gKG9wdGlvbnMpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9pc1hIUlVwbG9hZChvcHRpb25zKSkge1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5fY2h1bmtlZFVwbG9hZChvcHRpb25zLCB0cnVlKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbnMuZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5pdFhIUkRhdGEob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGhpcy5faW5pdFByb2dyZXNzTGlzdGVuZXIob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnBvc3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNldHRpbmcgdGhlIGRhdGFUeXBlIHRvIHBvc3RtZXNzYWdlIGVuYWJsZXMgdGhlXG4gICAgICAgICAgICAgICAgICAgIC8vIHBvc3RNZXNzYWdlIHRyYW5zcG9ydDpcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5kYXRhVHlwZSA9ICdwb3N0bWVzc2FnZSAnICsgKG9wdGlvbnMuZGF0YVR5cGUgfHwgJycpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5faW5pdElmcmFtZVNldHRpbmdzKG9wdGlvbnMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIF9nZXRQYXJhbU5hbWU6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICB2YXIgZmlsZUlucHV0ID0gJChvcHRpb25zLmZpbGVJbnB1dCksXG4gICAgICAgICAgICAgICAgcGFyYW1OYW1lID0gb3B0aW9ucy5wYXJhbU5hbWU7XG4gICAgICAgICAgICBpZiAoIXBhcmFtTmFtZSkge1xuICAgICAgICAgICAgICAgIHBhcmFtTmFtZSA9IFtdO1xuICAgICAgICAgICAgICAgIGZpbGVJbnB1dC5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlucHV0ID0gJCh0aGlzKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUgPSBpbnB1dC5wcm9wKCduYW1lJykgfHwgJ2ZpbGVzW10nLFxuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IChpbnB1dC5wcm9wKCdmaWxlcycpIHx8IFsxXSkubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoaSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1OYW1lLnB1c2gobmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpIC09IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBpZiAoIXBhcmFtTmFtZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1OYW1lID0gW2ZpbGVJbnB1dC5wcm9wKCduYW1lJykgfHwgJ2ZpbGVzW10nXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKCEkLmlzQXJyYXkocGFyYW1OYW1lKSkge1xuICAgICAgICAgICAgICAgIHBhcmFtTmFtZSA9IFtwYXJhbU5hbWVdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHBhcmFtTmFtZTtcbiAgICAgICAgfSxcblxuICAgICAgICBfaW5pdEZvcm1TZXR0aW5nczogZnVu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HlwZSA9IChvcHRpb25zLnR5cGUgfHxcbiAgICAgICAgICAgICAgICAoJC50eXBlKG9wdGlvbnMuZm9ybS5wcm9wKCdtZXRob2QnKSkgPT09ICdzdHJpbmcnICYmXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZm9ybS5wcm9wKCdtZXRob2QnKSkgfHwgJydcbiAgICAgICAgICAgICAgICApLnRvVXBwZXJDYXNlKCk7XG4gICAgICAgICAgICBpZiAob3B0aW9ucy50eXBlICE9PSAnUE9TVCcgJiYgb3B0aW9ucy50eXBlICE9PSAnUFVUJyAmJlxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zLnR5cGUgIT09ICdQQVRDSCcpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLnR5cGUgPSAnUE9TVCc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIW9wdGlvbnMuZm9ybUFjY2VwdENoYXJzZXQpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmZvcm1BY2NlcHRDaGFyc2V0ID0gb3B0aW9ucy5mb3JtLmF0dHIoJ2FjY2VwdC1jaGFyc2V0Jyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2dldEFKQVhTZXR0aW5nczogZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgIHZhciBvcHRpb25zID0gJC5leHRlbmQoe30sIHRoaXMub3B0aW9ucywgZGF0YSk7XG4gICAgICAgICAgICB0aGlzLl9pbml0Rm9ybVNldHRpbmdzKG9wdGlvbnMpO1xuICAgICAgICAgICAgdGhpcy5faW5pdERhdGFTZXR0aW5ncyhvcHRpb25zKTtcbiAgICAgICAgICAgIHJldHVybiBvcHRpb25zO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8vIGpRdWVyeSAxLjYgZG9lc24ndCBwcm92aWRlIC5zdGF0ZSgpLFxuICAgICAgICAvLyB3aGlsZSBqUXVlcnkgMS44KyByZW1vdmVkIC5pc1JlamVjdGVkKCkgYW5kIC5pc1Jlc29sdmVkKCk6XG4gICAgICAgIF9nZXREZWZlcnJlZFN0YXRlOiBmdW5jdGlvbiAoZGVmZXJyZWQpIHtcbiAgICAgICAgICAgIGlmIChkZWZlcnJlZC5zdGF0ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBkZWZlcnJlZC5zdGF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGRlZmVycmVkLmlzUmVzb2x2ZWQoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAncmVzb2x2ZWQnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGRlZmVycmVkLmlzUmVqZWN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAncmVqZWN0ZWQnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuICdwZW5kaW5nJztcbiAgICAgICAgfSxcblxuICAgICAgICAvLyBNYXBzIGpxWEhSIGNhbGxiYWNrcyB0byB0aGUgZXF1aXZhbGVudFxuICAgICAgICAvLyBtZXRob2RzIG9mIHRoZSBnaXZlbiBQcm9taXNlIG9iamVjdDpcbiAgICAgICAgX2VuaGFuY2VQcm9taXNlOiBmdW5jdGlvbiAocHJvbWlzZSkge1xuICAgICAgICAgICAgcHJvbWlzZS5zdWNjZXNzID0gcHJvbWlzZS5kb25lO1xuICAgICAgICAgICAgcHJvbWlzZS5lcnJvciA9IHByb21pc2UuZmFpbDtcbiAgICAgICAgICAgIHByb21pc2UuY29tcGxldGUgPSBwcm9taXNlLmFsd2F5cztcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8vIENyZWF0ZXMgYW5kIHJldHVybnMgYSBQcm9taXNlIG9iamVjdCBlbmhhbmNlZCB3aXRoXG4gICAgICAgIC8vIHRoZSBqcVhIUiBtZXRob2RzIGFib3J0LCBzdWNjZXNzLCBlcnJvciBhbmQgY29tcGxldGU6XG4gICAgICAgIF9nZXRYSFJQcm9taXNlOiBmdW5jdGlvbiAocmVzb2x2ZU9yUmVqZWN0LCBjb250ZXh0LCBhcmdzKSB7XG4gICAgICAgICAgICB2YXIgZGZkID0gJC5EZWZlcnJlZCgpLFxuICAgICAgICAgICAgICAgIHByb21pc2UgPSBkZmQucHJvbWlzZSgpO1xuICAgICAgICAgICAgY29udGV4dCA9IGNvbnRleHQgfHwgdGhpcy5vcHRpb25zLmNvbnRleHQgfHwgcHJvbWlzZTtcbiAgICAgICAgICAgIGlmIChyZXNvbHZlT3JSZWplY3QgPT09IHRydWUpIHtcbiAgICAgICAgICAgICAgICBkZmQucmVzb2x2ZVdpdGgoY29udGV4dCwgYXJncyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlc29sdmVPclJlamVjdCA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICBkZmQucmVqZWN0V2l0aChjb250ZXh0LCBhcmdzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHByb21pc2UuYWJvcnQgPSBkZmQucHJvbWlzZTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbmhhbmNlUHJvbWlzZShwcm9taXNlKTtcbiAgICAgICAgfSxcblxuICAgICAgICAvLyBBZGRzIGNvbnZlbmllbmNlIG1ldGhvZHMgdG8gdGhlIGRhdGEgY2FsbGJhY2sgYXJndW1lbnQ6XG4gICAgICAgIF9hZGRDb252ZW5pZW5jZU1ldGhvZHM6IGZ1bmN0aW9uIChlLCBkYXRhKSB7XG4gICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsXG4gICAgICAgICAgICAgICAgZ2V0UHJvbWlzZSA9IGZ1bmN0aW9uIChhcmdzKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLkRlZmVycmVkKCkucmVzb2x2ZVdpdGgodGhhdCwgYXJncykucHJvbWlzZSgpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICBkYXRhLnByb2Nlc3MgPSBmdW5jdGlvbiAocmVzb2x2ZUZ1bmMsIHJlamVjdEZ1bmMpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzb2x2ZUZ1bmMgfHwgcmVqZWN0RnVuYykge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLl9wcm9jZXNzUXVldWUgPSB0aGlzLl9wcm9jZXNzUXVldWUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgKHRoaXMuX3Byb2Nlc3NRdWV1ZSB8fCBnZXRQcm9taXNlKFt0aGlzXSkpLnRoZW4oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5lcnJvclRocm93bikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQuRGVmZXJyZWQoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWplY3RXaXRoKHRoYXQsIFtkYXRhXSkucHJvbWlzZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZXRQcm9taXNlKGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgKS50aGVuKHJlc29sdmVGdW5jLCByZWplY3RGdW5jKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3Byb2Nlc3NRdWV1ZSB8fCBnZXRQcm9taXNlKFt0aGlzXSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGF0YS5zdWJtaXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc3RhdGUoKSAhPT0gJ3BlbmRpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEuanFYSFIgPSB0aGlzLmpxWEhSID1cbiAgICAgICAgICAgICAgICAgICAgICAgICh0aGF0Ll90cmlnZ2VyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdzdWJtaXQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQuRXZlbnQoJ3N1Ym1pdCcsIHtkZWxlZ2F0ZWRFdmVudDogZX0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNcbiAgICAgICAgICAgICAgICAgICAgICAgICkgIT09IGZhbHNlKSAmJiB0aGF0Ll9vblNlbmQoZSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmpxWEhSIHx8IHRoYXQuX2dldFhIUlByb21pc2UoKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBkYXRhLmFib3J0ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmpxWEhSKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmpxWEhSLmFib3J0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JUaHJvd24gPSAnYWJvcnQnO1xuICAgICAgICAgICAgICAgIHRoYXQuX3RyaWdnZXIoJ2ZhaWwnLCBudWxsLCB0aGlzKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhhdC5fZ2V0WEhSUHJvbWlzZShmYWxzZSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgZGF0YS5zdGF0ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5qcVhIUikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhhdC5fZ2V0RGVmZXJyZWRTdGF0ZSh0aGlzLmpxWEhSKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuX3Byb2Nlc3NRdWV1ZSkge1xuICAgICAgICAgICAgICAgIC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ICAgICAgICAgICAgICAgIGpxWEhSLFxuICAgICAgICAgICAgICAgIHVwbG9hZDtcbiAgICAgICAgICAgIGlmICghKHRoaXMuX2lzWEhSVXBsb2FkKG9wdGlvbnMpICYmIHNsaWNlICYmICh1YiB8fCBtY3MgPCBmcykpIHx8XG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZGF0YSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0ZXN0T25seSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHViID49IGZzKSB7XG4gICAgICAgICAgICAgICAgZmlsZS5lcnJvciA9IG9wdGlvbnMuaTE4bigndXBsb2FkZWRCeXRlcycpO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9nZXRYSFJQcm9taXNlKFxuICAgICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5jb250ZXh0LFxuICAgICAgICAgICAgICAgICAgICBbbnVsbCwgJ2Vycm9yJywgZmlsZS5lcnJvcl1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVGhlIGNodW5rIHVwbG9hZCBtZXRob2Q6XG4gICAgICAgICAgICB1cGxvYWQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgLy8gQ2xvbmUgdGhlIG9wdGlvbnMgb2JqZWN0IGZvciBlYWNoIGNodW5rIHVwbG9hZDpcbiAgICAgICAgICAgICAgICB2YXIgbyA9ICQuZXh0ZW5kKHt9LCBvcHRpb25zKSxcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudExvYWRlZCA9IG8uX3Byb2dyZXNzLmxvYWRlZDtcbiAgICAgICAgICAgICAgICBvLmJsb2IgPSBzbGljZS5jYWxsKFxuICAgICAgICAgICAgICAgICAgICBmaWxlLFxuICAgICAgICAgICAgICAgICAgICB1YixcbiAgICAgICAgICAgICAgICAgICAgdWIgKyBtY3MsXG4gICAgICAgICAgICAgICAgICAgIGZpbGUudHlwZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgLy8gU3RvcmUgdGhlIGN1cnJlbnQgY2h1bmsgc2l6ZSwgYXMgdGhlIGJsb2IgaXRzZWxmXG4gICAgICAgICAgICAgICAgLy8gd2lsbCBiZSBkZXJlZmVyZW5jZWQgYWZ0ZXIgZGF0YSBwcm9jZXNzaW5nOlxuICAgICAgICAgICAgICAgIG8uY2h1bmtTaXplID0gby5ibG9iLnNpemU7XG4gICAgICAgICAgICAgICAgLy8gRXhwb3NlIHRoZSBjaHVuayBieXRlcyBwb3NpdGlvbiByYW5nZTpcbiAgICAgICAgICAgICAgICBvLmNvbnRlbnRSYW5nZSA9ICdieXRlcyAnICsgdWIgKyAnLScgK1xuICAgICAgICAgICAgICAgICAgICAodWIgKyBvLmNodW5rU2l6ZSAtIDEpICsgJy8nICsgZnM7XG4gICAgICAgICAgICAgICAgLy8gUHJvY2VzcyB0aGUgdXBsb2FkIGRhdGEgKHRoZSBibG9iIGFuZCBwb3RlbnRpYWwgZm9ybSBkYXRhKTpcbiAgICAgICAgICAgICAgICB0aGF0Ll9pbml0WEhSRGF0YShvKTtcbiAgICAgICAgICAgICAgICAvLyBBZGQgcHJvZ3Jlc3MgbGlzdGVuZXJzIGZvciB0aGlzIGNodW5rIHVwbG9hZDpcbiAgICAgICAgICAgICAgICB0aGF0Ll9pbml0UHJvZ3Jlc3NMaXN0ZW5lcihvKTtcbiAgICAgICAgICAgICAgICBqcVhIUiA9ICgodGhhdC5fdHJpZ2dlcignY2h1bmtzZW5kJywgbnVsbCwgbykgIT09IGZhbHNlICYmICQuYWpheChvKSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQuX2dldFhIUlByb21pc2UoZmFsc2UsIG8uY29udGV4dCkpXG4gICAgICAgICAgICAgICAgICAgIC5kb25lKGZ1bmN0aW9uIChyZXN1bHQsIHRleHRTdGF0dXMsIGpxWEhSKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1YiA9IHRoYXQuX2dldFVwbG9hZGVkQnl0ZXMoanFYSFIpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKHViICsgby5jaHVua1NpemUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGEgcHJvZ3Jlc3MgZXZlbnQgaWYgbm8gZmluYWwgcHJvZ3Jlc3MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdpdGggbG9hZGVkIGVxdWFsaW5nIHRvdGFsIGhhcyBiZWVuIHRyaWdnZXJlZFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZm9yIHRoaXMgY2h1bms6XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudExvYWRlZCArIG8uY2h1bmtTaXplIC0gby5fcHJvZ3Jlc3MubG9hZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fb25Qcm9ncmVzcygkLkV2ZW50KCdwcm9ncmVzcycsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoQ29tcHV0YWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGVkOiB1YiAtIG8udXBsb2FkZWRCeXRlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG90YWw6IHViIC0gby51cGxvYWRlZEJ5dGVzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksIG8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy51cGxvYWRlZEJ5dGVzID0gby51cGxvYWRlZEJ5dGVzID0gdWI7XG4gICAgICAgICAgICAgICAgICAgICAgICBvLnJlc3VsdCA9IHJlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8udGV4dFN0YXR1cyA9IHRleHRTdGF0dXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBvLmpxWEhSID0ganFYSFI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGF0Ll90cmlnZ2VyKCdjaHVua2RvbmUnLCBudWxsLCBvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQuX3RyaWdnZXIoJ2NodW5rYWx3YXlzJywgbnVsbCwgbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodWIgPCBmcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZpbGUgdXBsb2FkIG5vdCB5ZXQgY29tcGxldGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29udGludWUgd2l0aCB0aGUgbmV4dCBjaHVuazpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGZkLnJlc29sdmVXaXRoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLmNvbnRleHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtyZXN1bHQsIHRleHRTdGF0dXMsIGpxWEhSXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5mYWlsKGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8uanFYSFIgPSBqcVhIUjtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8udGV4dFN0YXR1cyA9IHRleHRTdGF0dXM7XG4gICAgICAgICAgICAgICAgICAgICAgICBvLmVycm9yVGhyb3duID0gZXJyb3JUaHJvd247XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGF0Ll90cmlnZ2VyKCdjaHVua2ZhaWwnLCBudWxsLCBvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQuX3RyaWdnZXIoJ2NodW5rYWx3YXlzJywgbnVsbCwgbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZmQucmVqZWN0V2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLmNvbnRleHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2pxWEhSLCB0ZXh0U3RhdHVzLCBlcnJvclRocm93bl1cbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHRoaXMuX2VuaGFuY2VQcm9taXNlKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5hYm9ydCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ganFYSFIuYWJvcnQoKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB1cGxvYWQoKTtcbiAgICAgICAgICAgIHJldHVybiBwcm9taXNlO1xuICAgICAgICB9LFxuXG4gICAgICAgIF9iZWZvcmVTZW5kOiBmdW5jdGlvbiAoZSwgZGF0YSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX2FjdGl2ZSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIC8vIHRoZSBzdGFydCBjYWxsYmFjayBpcyB0cmlnZ2VyZWQgd2hlbiBhbiB1cGxvYWQgc3RhcnRzXG4gICAgICAgICAgICAgICAgLy8gYW5kIG5vIG90aGVyIHVwbG9hZHMgYXJlIGN1cnJlbnRseSBydW5uaW5nLFxuICAgICAgICAgICAgICAgIC8vIGVxdWl2YWxlbnQgdG8gdGhlIGdsb2JhbCBhamF4U3RhcnQgZXZlbnQ6XG4gICAgICAgICAgICAgICAgdGhpcy5fdHJpZ2dlcignc3R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XRyYXRlVGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAganFYSFIgPSBqcVhIUiB8fCAoXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGFib3J0ZWQgfHwgdGhhdC5fdHJpZ2dlcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2VuZCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJC5FdmVudCgnc2VuZCcsIHtkZWxlZ2F0ZWRFdmVudDogZX0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgICAgICkgPT09IGZhbHNlKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fZ2V0WEhSUHJvbWlzZShmYWxzZSwgb3B0aW9ucy5jb250ZXh0LCBhYm9ydGVkKSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQuX2NodW5rZWRVcGxvYWQob3B0aW9ucykgfHwgJC5hamF4KG9wdGlvbnMpXG4gICAgICAgICAgICAgICAgICAgICkuZG9uZShmdW5jdGlvbiAocmVzdWx0LCB0ZXh0U3RhdHVzLCBqcVhIUikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fb25Eb25lKHJlc3VsdCwgdGV4dFN0YXR1cywganFYSFIsIG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICB9KS5mYWlsKGZ1bmN0aW9uIChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQuX29uRmFpbChqcVhIUiwgdGV4dFN0YXR1cywgZXJyb3JUaHJvd24sIG9wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICB9KS5hbHdheXMoZnVuY3Rpb24gKGpxWEhSb3JSZXN1bHQsIHRleHRTdGF0dXMsIGpxWEhSb3JFcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fb25BbHdheXMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganFYSFJvclJlc3VsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpxWEhSb3JFcnJvcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fc2VuZGluZyAtPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fYWN0aXZlIC09IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5saW1pdENvbmN1cnJlbnRVcGxvYWRzICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMubGltaXRDb25jdXJyZW50VXBsb2FkcyA+IHRoYXQuX3NlbmRpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTdGFydCB0aGUgbmV4dCBxdWV1ZWQgdXBsb2FkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoYXQgaGFzIG5vdCBiZWVuIGFib3J0ZWQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRTbG90ID0gdGhhdC5fc2xvdHMuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAobmV4dFNsb3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoYXQuX2dldERlZmVycmVkU3RhdGUobmV4dFNsb3QpID09PSAncGVuZGluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRTbG90LnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHRTbG90ID0gdGhhdC5fc2xvdHMuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhhdC5fYWN0aXZlID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIHN0b3AgY2FsbGJhY2sgaXMgdHJpZ2dlcmVkIHdoZW4gYWxsIHVwbG9hZHMgaGF2ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJlZW4gY29tcGxldGVkLCBlcXVpdmFsZW50IHRvIHRoZSBnbG9iYWwgYWpheFN0b3AgZXZlbnQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhhdC5fdHJpZ2dlcignc3RvcCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGpxWEhSO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB0aGlzLl9iZWZvcmVTZW5kKGUsIG9wdGlvbnMpO1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5zZXF1ZW50aWFsVXBsb2FkcyB8fFxuICAgICAgICAgICAgICAgICAgICAodGhpcy5vcHRpb25zLmxpbWl0Q29uY3VycmVudFVwbG9hZHMgJiZcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5vcHRpb25zLmxpbWl0Q29uY3VycmVudFVwbG9hZHMgPD0gdGhpcy5fc2VuZGluZykpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLmxpbWl0Q29uY3VycmVudFVwbG9hZHMgPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHNsb3QgPSAkLkRlZmVycmVkKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3Nsb3RzLnB1c2goc2xvdCk7XG4gICAgICAgICAgICAgICAgICAgIHBpcGUgPSBzbG90LnRoZW4oc2VuZCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fc2VxdWVuY2UgPSB0aGlzLl9zZXF1ZW5jZS50aGVuKHNlbmQsIHNlbmQpO1xuICAgICAgICAgICAgICAgICAgICBwaXBlID0gdGhpcy5fc2VxdWVuY2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFJldHVybiB0aGUgcGlwZWQgUHJvbWlzZSBvYmplY3QsIGVuaGFuY2VkIHdpdGggYW4gYWJvcnQgbWV0aG9kLFxuICAgICAgICAgICAgICAgIC8vIHdoaWNoIGlzIGRlbGVnYXRlZCB0byB0aGUganFYSFIgb2JqZWN0IG9mIHRoZSBjdXJyZW50IHVwbG9hZCxcbiAgICAgICAgICAgICAgICAvLyBhbmQganFYSFIgY2FsbGJhY2tzIG1hcHBlZCB0byB0aGUgZXF1aXZhbGVudCBQcm9taXNlIG1ldGhvZHM6XG4gICAgICAgICAgICAgICAgcGlwZS5hYm9ydCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgYWJvcnRlZCA9IFt1bmRlZmluZWQsICdhYm9ydCcsICdhYm9ydCddO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWpxWEhSKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2xvdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3QucmVqZWN0V2l0aChvcHRpb25zLmNvbnRleHQsIGFib3J0ZWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlbmQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4ganFYSFIuYWJvcnQoKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLl9lbmhhbmNlUHJvbWlzZShwaXBlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBzZW5kKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX29uQWRkOiBmdW5jdGlvbiAoZSwgZGF0YSkge1xuICAgICAgICAgICAgdmFyIHRoYXQgPSB0aGlzLFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRydWUsXG4gICAgICAgICAgICAgICAgb3B0aW9ucyA9ICQuZXh0ZW5kKHt9LCB0aGlzLm9wdGlvbnMsIGRhdGEpLFxuICAgICAgICAgICAgICAgIGZpbGVzID0gZGF0YS5maWxlcyxcbiAgICAgICAgICAgICAgICBmaWxlc0xlbmd0aCA9IGZpbGVzLmxlbmd0aCxcbiAgICAgICAgICAgICAgICBsaW1pdCA9IG9wdGlvbnMubGltaXRNdWx0aUZpbGVVcGxvYWRzLFxuICAgICAgICAgICAgICAgIGxpbWl0U2l6ZSA9IG9wdGlvbnMubGltaXRNdWx0aUZpbGVVcGxvYWRTaXplLFxuICAgICAgICAgICAgICAgIG92ZXJoZWFkID0gb3B0aW9ucy5saW1pdE11bHRpRmlsZVVwbG9hZFNpemVPdmVyaGVhZCxcbiAgICAgICAgICAgICAgICBiYXRjaFNpemUgPSAwLFxuICAgICAgICAgICAgICAgIHBhcmFtTmFtZSA9IHRoaXMuX2dldFBhcmFtTmFtZShvcHRpb25zKSxcbiAgICAgICAgICAgICAgICBwYXJhbU5hbWVTZXQsXG4gICAgICAgICAgICAgICAgcGFyYW1OYW1lU2xpY2UsXG4gICAgICAgICAgICAgICAgZmlsZVNldCxcbiAgICAgICAgICAgICAgICBpLFxuICAgICAgICAgICAgICAgIGogPSAwO1xuICAgICAgICAgICAgaWYgKCFmaWxlc0xlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChsaW1pdFNpemUgJiYgZmlsZXNbMF0uc2l6ZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgbGltaXRTaXplID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCEob3B0aW9ucy5zaW5nbGVGaWxlVXBsb2FkcyB8fCBsaW1pdCB8fCBsaW1pdFNpemUpIHx8XG4gICAgICAgICAgICAgICAgICAgICF0aGlzLl9pc1hIUlVwbG9hZChvcHRpb25zKSkge1xuICAgICAgICAgICAgICAgIGZpbGVTZXQgPSBbZmlsZXNdO1xuICAgICAgICAgICAgICAgIHBhcmFtTmFtZVNldCA9IFtwYXJhbU5hbWVdO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghKG9wdGlvbnMuc2luZ2xlRmlsZVVwbG9hZHMgfHwgbGltaXRTaXplKSAmJiBsaW1pdCkge1xuICAgICAgICAgICAgICAgIGZpbGVTZXQgPSBbXTtcbiAgICAgICAgICAgICAgICBwYXJhbU5hbWVTZXQgPSBbXTtcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZmlsZXNMZW5ndGg7IGkgKz0gbGltaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlsZVNldC5wdXNoKGZpbGVzLnNsaWNlKGksIGkgKyBsaW1pdCkpO1xuICAgICAgICAgICAgICAgICAgICBwYXJhbU5hbWVTbGljZSA9IHBhcmFtTmFtZS5zbGljZShpLCBpICsgbGltaXQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXBhcmFtTmFtZVNsaWNlLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1OYW1lU2xpY2UgPSBwYXJhbU5hbWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyYW1OYW1lU2V0LnB1c2gocGFyYW1OYW1lU2xpY2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIW9wdGlvbnMuc2luZ2xlRmlsZVVwbG9hZHMgJiYgbGltaXRTaXplKSB7XG4gICAgICAgICAgICAgICAgZmlsZVNldCA9IFtdO1xuICAgICAgICAgICAgICAgIHBhcmFtTmFtZVNldCA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBmaWxlc0xlbmd0aDsgaSA9IGkgKyAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhdGNoU2l6ZSArPSBmaWxlc1tpXS5zaXplICsgb3ZlcmhlYWQ7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpICsgMSA9PT0gZmlsZXNMZW5ndGggfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGJhdGNoU2l6ZSArIGZpbGVzW2kgKyAxXS5zaXplICsgb3ZlcmhlYWQpID4gbGltaXRTaXplKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsaW1pdCAmJiBpICsgMSAtIGogPj0gbGltaXQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWxlU2V0LnB1c2goZmlsZXMuc2xpY2UoaiwgaSArIDEpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtTmFtZVNsaWNlID0gcGFyYW1OYW1lLnNsaWNlKGosIGkgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcGFyYW1OYW1lU2xpY2UubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1OYW1lU2xpY2UgPSBwYXJhbU5hbWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbU5hbWVTZXQucHVzaChwYXJhbU5hbWVTbGljZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gaSArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBiYXRjaFNpemUgPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwYXJhbU5hbWVTZXQgPSBwYXJhbU5hbWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkYXRhLm9yaWdpbmFsRmlsZXMgPSBmaWxlcztcbiAgICAgICAgICAgICQuZWFjaChmaWxlU2V0IHx8IGZpbGVzLCBmdW5jdGlvbiAoaW5kZXgsIGVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV3RGF0YSA9ICQuZXh0ZW5kKHt9LCBkYXRhKTtcbiAgICAgICAgICAgICAgICBuZXdEYXRhLmZpbGVzID0gZmlsZVNldCA/IGVsZW1lbnQgOiBbZWxlbWVudF07XG4gICAgICAgICAgICAgICAgbmV3RGF0YS5wYXJhbU5hbWUgPSBwYXJhbU5hbWVTZXRbaW5kZXhdO1xuICAgICAgICAgICAgICAgIHRoYXQuX2luaXRSZXNwb25zZU9iamVjdChuZXdEYXRhKTtcbiAgICAgICAgICAgICAgICB0aGF0Ll9pbml0UHJvZ3Jlc3NPYmplY3QobmV3RGF0YSk7XG4gICAgICAgICAgICAgICAgdGhhdC5fYWRkQ29udmVuaWVuY2VNZXRob2RzKGUsIG5ld0RhdGEpO1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRoYXQuX3RyaWdnZXIoXG4gICAgICAgICAgICAgICAgICAgICdhZGQnLFxuICAgICAgICAgICAgICAgICAgICAkLkV2ZW50KCdhZGQnLCB7ZGVsZWdhdGVkRXZlbnQ6IGV9KSxcbiAgICAgICAgICAgICAgICAgICAgbmV3RGF0YVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfSxcblxuICAgICAgICBfcmVwbGFjZUZpbGVJbnB1dDogZnVuY3Rpb24gKGRhdGEpIHtcbiAgICAgICAgICAgIHZhciBpbnB1dCA9IGRhdGEuZmlsZUlucHV0LFxuICAgICAgICAgICAgICAg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wdXQgZWxlbWVudCBpbiB0aGUgZmlsZUlucHV0XG4gICAgICAgICAgICAvLyBlbGVtZW50cyBzZXQgd2l0aCB0aGUgY2xvbmUsIHdoaWNoIGhhcyBiZWVuIGNvcGllZCBpbmNsdWRpbmdcbiAgICAgICAgICAgIC8vIGV2ZW50IGhhbmRsZXJzOlxuICAgICAgICAgICAgdGhpcy5vcHRpb25zLmZpbGVJbnB1dCA9IHRoaXMub3B0aW9ucy5maWxlSW5wdXQubWFwKGZ1bmN0aW9uIChpLCBlbCkge1xuICAgICAgICAgICAgICAgIGlmIChlbCA9PT0gaW5wdXRbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0Q2xvbmVbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBlbDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgLy8gSWYgdGhlIHdpZGdldCBoYXMgYmVlbiBpbml0aWFsaXplZCBvbiB0aGUgZmlsZSBpbnB1dCBpdHNlbGYsXG4gICAgICAgICAgICAvLyBvdmVycmlkZSB0aGlzLmVsZW1lbnQgd2l0aCB0aGUgZmlsZSBpbnB1dCBjbG9uZTpcbiAgICAgICAgICAgIGlmIChpbnB1dFswXSA9PT0gdGhpcy5lbGVtZW50WzBdKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50ID0gaW5wdXRDbG9uZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfaGFuZGxlRmlsZVRyZWVFbnRyeTogZnVuY3Rpb24gKGVudHJ5LCBwYXRoKSB7XG4gICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsXG4gICAgICAgICAgICAgICAgZGZkID0gJC5EZWZlcnJlZCgpLFxuICAgICAgICAgICAgICAgIGVudHJpZXMgPSBbXSxcbiAgICAgICAgICAgICAgICBkaXJSZWFkZXIsXG4gICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyID0gZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGUgJiYgIWUuZW50cnkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUuZW50cnkgPSBlbnRyeTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBTaW5jZSAkLndoZW4gcmV0dXJucyBpbW1lZGlhdGVseSBpZiBvbmVcbiAgICAgICAgICAgICAgICAgICAgLy8gRGVmZXJyZWQgaXMgcmVqZWN0ZWQsIHdlIHVzZSByZXNvbHZlIGluc3RlYWQuXG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgYWxsb3dzIHZhbGlkIGZpbGVzIGFuZCBpbnZhbGlkIGl0ZW1zXG4gICAgICAgICAgICAgICAgICAgIC8vIHRvIGJlIHJldHVybmVkIHRvZ2V0aGVyIGluIG9uZSBzZXQ6XG4gICAgICAgICAgICAgICAgICAgIGRmZC5yZXNvbHZlKFtlXSk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzdWNjZXNzSGFuZGxlciA9IGZ1bmN0aW9uIChlbnRyaWVzKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoYXQuX2hhbmRsZUZpbGVUcmVlRW50cmllcyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGVudHJpZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoICsgZW50cnkubmFtZSArICcvJ1xuICAgICAgICAgICAgICAgICAgICApLmRvbmUoZnVuY3Rpb24gKGZpbGVzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZmQucmVzb2x2ZShmaWxlcyk7XG4gICAgICAgICAgICAgICAgICAgIH0pLmZhaWwoZXJyb3JIYW5kbGVyKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlYWRFbnRyaWVzID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBkaXJSZWFkZXIucmVhZEVudHJpZXMoZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmVzdWx0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzSGFuZGxlcihlbnRyaWVzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW50cmllcyA9IGVudHJpZXMuY29uY2F0KHJlc3VsdHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRFbnRyaWVzKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sIGVycm9ySGFuZGxlcik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHBhdGggPSBwYXRoIHx8ICcnO1xuICAgICAgICAgICAgaWYgKGVudHJ5LmlzRmlsZSkge1xuICAgICAgICAgICAgICAgIGlmIChlbnRyeS5fZmlsZSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBXb3JrYXJvdW5kIGZvciBDaHJvbWUgYnVnICMxNDk3MzVcbiAgICAgICAgICAgICAgICAgICAgZW50cnkuX2ZpbGUucmVsYXRpdmVQYXRoID0gcGF0aDtcbiAgICAgICAgICAgICAgICAgICAgZGZkLnJlc29sdmUoZW50cnkuX2ZpbGUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVudHJ5LmZpbGUoZnVuY3Rpb24gKGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbGUucmVsYXRpdmVQYXRoID0gcGF0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRmZC5yZXNvbHZlKGZpbGUpO1xuICAgICAgICAgICAgICAgICAgICB9LCBlcnJvckhhbmRsZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZW50cnkuaXNEaXJlY3RvcnkpIHtcbiAgICAgICAgICAgICAgICBkaXJSZWFkZXIgPSBlbnRyeS5jcmVhdGVSZWFkZXIoKTtcbiAgICAgICAgICAgICAgICByZWFkRW50cmllcygpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBSZXR1cm4gYW4gZW1weSBsaXN0IGZvciBmaWxlIHN5c3RlbSBpdGVtc1xuICAgICAgICAgICAgICAgIC8vIG90aGVyIHRoYW4gZmlsZXMgb3IgZGlyZWN0b3JpZXM6XG4gICAgICAgICAgICAgICAgZGZkLnJlc29sdmUoW10pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRmZC5wcm9taXNlKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2hhbmRsZUZpbGVUcmVlRW50cmllczogZnVuY3Rpb24gKGVudHJpZXMsIHBhdGgpIHtcbiAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcztcbiAgICAgICAgICAgIHJldHVybiAkLndoZW4uYXBwbHkoXG4gICAgICAgICAgICAgICAgJCxcbiAgICAgICAgICAgICAgICAkLm1hcChlbnRyaWVzLCBmdW5jdGlvbiAoZW50cnkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoYXQuX2hhbmRsZUZpbGVUcmVlRW50cnkoZW50cnksIHBhdGgpO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApLnRoZW4oZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBBcnJheS5wcm90b3R5cGUuY29uY2F0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgYXJndW1lbnRzXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuXG4gICAgICAgIF9nZXREcm9wcGVkRmlsZXM6IGZ1bmN0aW9uIChkYXRhVHJhbnNmZXIpIHtcbiAgICAgICAgICAgIGRhdGFUcmFuc2ZlciA9IGRhdGFUcmFuc2ZlciB8fCB7fTtcbiAgICAgICAgICAgIHZhciBpdGVtcyA9IGRhdGFUcmFuc2Zlci5pdGVtcztcbiAgICAgICAgICAgIGlmIChpdGVtcyAmJiBpdGVtcy5sZW5ndGggJiYgKGl0ZW1zWzBdLndlYmtpdEdldEFzRW50cnkgfHxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXNbMF0uZ2V0QXNFbnRyeSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5faGFuZGxlRmlsZVRyZWVFbnRyaWVzKFxuICAgICAgICAgICAgICAgICAgICAkLm1hcChpdGVtcywgZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBlbnRyeTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpdGVtLndlYmtpdEdldEFzRW50cnkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeSA9IGl0ZW0ud2Via2l0R2V0QXNFbnRyeSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbnRyeSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXb3JrYXJvdW5kIGZvciBDaHJvbWUgYnVnICMxNDk3MzU6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5Ll9maWxlID0gaXRlbS5nZXRBc0ZpbGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVudHJ5O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW0uZ2V0QXNFbnRyeSgpO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gJC5EZWZlcnJlZCgpLnJlc29sdmUoXG4gICAgICA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SBhZGQgYSBwc2V1ZG8gRmlsZSBvYmplY3Qgd2l0aFxuICAgICAgICAgICAgICAgIC8vIHRoZSBpbnB1dCB2YWx1ZSBhcyBuYW1lIHdpdGggcGF0aCBpbmZvcm1hdGlvbiByZW1vdmVkOlxuICAgICAgICAgICAgICAgIGZpbGVzID0gW3tuYW1lOiB2YWx1ZS5yZXBsYWNlKC9eLipcXFxcLywgJycpfV07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGZpbGVzWzBdLm5hbWUgPT09IHVuZGVmaW5lZCAmJiBmaWxlc1swXS5maWxlTmFtZSkge1xuICAgICAgICAgICAgICAgIC8vIEZpbGUgbm9ybWFsaXphdGlvbiBmb3IgU2FmYXJpIDQgYW5kIEZpcmVmb3ggMzpcbiAgICAgICAgICAgICAgICAkLmVhY2goZmlsZXMsIGZ1bmN0aW9uIChpbmRleCwgZmlsZSkge1xuICAgICAgICAgICAgICAgICAgICBmaWxlLm5hbWUgPSBmaWxlLmZpbGVOYW1lO1xuICAgICAgICAgICAgICAgICAgICBmaWxlLnNpemUgPSBmaWxlLmZpbGVTaXplO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuICQuRGVmZXJyZWQoKS5yZXNvbHZlKGZpbGVzKS5wcm9taXNlKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2dldEZpbGVJbnB1dEZpbGVzOiBmdW5jdGlvbiAoZmlsZUlucHV0KSB7XG4gICAgICAgICAgICBpZiAoIShmaWxlSW5wdXQgaW5zdGFuY2VvZiAkKSB8fCBmaWxlSW5wdXQubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2dldFNpbmdsZUZpbGVJbnB1dEZpbGVzKGZpbGVJbnB1dCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gJC53aGVuLmFwcGx5KFxuICAgICAgICAgICAgICAgICQsXG4gICAgICAgICAgICAgICAgJC5tYXAoZmlsZUlucHV0LCB0aGlzLl9nZXRTaW5nbGVGaWxlSW5wdXRGaWxlcylcbiAgICAgICAgICAgICkudGhlbihmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEFycmF5LnByb3RvdHlwZS5jb25jYXQuYXBwbHkoXG4gICAgICAgICAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgICAgICAgICBhcmd1bWVudHNcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX29uQ2hhbmdlOiBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgdmFyIHRoYXQgPSB0aGlzLFxuICAgICAgICAgICAgICAgIGRhdGEgPSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVJbnB1dDogJChlLnRhcmdldCksXG4gICAgICAgICAgICAgICAgICAgIGZvcm06ICQoZS50YXJnZXQuZm9ybSlcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgdGhpcy5fZ2V0RmlsZUlucHV0RmlsZXMoZGF0YS5maWxlSW5wdXQpLmFsd2F5cyhmdW5jdGlvbiAoZmlsZXMpIHtcbiAgICAgICAgICAgICAgICBkYXRhLmZpbGVzID0gZmlsZXM7XG4gICAgICAgICAgICAgICAgaWYgKHRoYXQub3B0aW9ucy5yZXBsYWNlRmlsZUlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgIHRoYXQuX3JlcGxhY2VGaWxlSW5wdXQoZGF0YSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGF0Ll90cmlnZ2VyKFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NoYW5nZScsXG4gICAgICAgICAgICAgICAgICAgICAgICAkLkV2ZW50KCdjaGFuZ2UnLCB7ZGVsZWdhdGVkRXZlbnQ6IGV9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgKSAhPT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhhdC5fb25BZGQoZSwgZGF0YSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX29uUGFzdGU6IGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICB2YXIgaXRlbXMgPSBlLm9yaWdpbmFsRXZlbnQgJiYgZS5vcmlnaW5hbEV2ZW50LmNsaXBib2FyZERhdGEgJiZcbiAgICAgICAgICAgICAgICAgICAgZS5vcmlnaW5hbEV2ZW50LmNsaXBib2FyZERhdGEuaXRlbXMsXG4gICAgICAgICAgICAgICAgZGF0YSA9IHtmaWxlczogW119O1xuICAgICAgICAgICAgaWYgKGl0ZW1zICYmIGl0ZW1zLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICQuZWFjaChpdGVtcywgZnVuY3Rpb24gKGluZGV4LCBpdGVtKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmaWxlID0gaXRlbS5nZXRBc0ZpbGUgJiYgaXRlbS5nZXRBc0ZpbGUoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuZmlsZXMucHVzaChmaWxlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLl90cmlnZ2VyKFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3Bhc3RlJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICQuRXZlbnQoJ3Bhc3RlJywge2RlbGVnYXRlZEV2ZW50OiBlfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhXG4gICAgICAgICAgICAgICAgICAgICkgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX29uQWRkKGUsIGRhdGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfb25Ecm9wOiBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgZS5kYXRhVHJhbnNmZXIgPSBlLm9yaWdpbmFsRXZlbnQgJiYgZS5vcmlnaW5hbEV2ZW50LmRhdGFUcmFuc2ZlcjtcbiAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcyxcbiAgICAgICAgICAgICAgICBkYXRhVHJhbnNmZXIgPSBlLmRhdGFUcmFuc2ZlcixcbiAgICAgICAgICAgICAgICBkYXRhID0ge307XG4gICAgICAgICAgICBpZiAoZGF0YVRyYW5zZmVyICYmIGRhdGFUcmFuc2Zlci5maWxlcyAmJiBkYXRhVHJhbnNmZXIuZmlsZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuX2dldERyb3BwZWRGaWxlcyhkYXRhVHJhbnNmZXIpLmFsd2F5cyhmdW5jdGlvbiAoZmlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5maWxlcyA9IGZpbGVzO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhhdC5fdHJpZ2dlcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZHJvcCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJC5FdmVudCgnZHJvcCcsIHtkZWxlZ2F0ZWRFdmVudDogZX0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgICkgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGF0Ll9vbkFkZChlLCBkYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIF9vbkRyYWdPdmVyOiBnZXREcmFnSGFuZGxlcignZHJhZ292ZXInKSxcblxuICAgICAgICBfb25EcmFnRW50ZXI6IGdldERyYWdIYW5kbGVyKCdkcmFnZW50ZXInKSxcblxuICAgICAgICBfb25EcmFnTGVhdmU6IGdldERyYWdIYW5kbGVyKCdkcmFnbGVhdmUnKSxcblxuICAgICAgICBfaW5pdEV2ZW50SGFuZGxlcnM6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLl9pc1hIUlVwbG9hZCh0aGlzLm9wdGlvbnMpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fb24odGhpcy5vcHRpb25zLmRyb3Bab25lLCB7XG4gICAgICAgICAgICAgICAgICAgIGRyYWdvdmVyOiB0aGlzLl9vbkRyYWdPdmVyLFxuICAgICAgICAgICAgICAgICAgICBkcm9wOiB0aGlzLl9vbkRyb3AsXG4gICAgICAgICAgICAgICAgICAgIC8vIGV2ZW50LnByZXZlbnREZWZhdWx0KCkgb24gZHJhZ2VudGVyIGlzIHJlcXVpcmVkIGZvciBJRTEwKzpcbiAgICAgICAgICAgICAgICAgICAgZHJhZ2VudGVyOiB0aGlzLl9vbkRyYWdFbnRlcixcbiAgICAgICAgICAgICAgICAgICAgLy8gZHJhZ2xlYXZlIGlzIG5vdCByZXF1aXJlZCwgYnV0IGFkZGVkIGZvciBjb21wbGV0ZW5lc3M6XG4gICAgICAgICAgICAgICAgICAgIGRyYWdsZWF2ZTogdGhpcy5fb25EcmFnTGVhdmVcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0aGlzLl9vbih0aGlzLm9wdGlvbnMucGFzdGVab25lLCB7XG4gICAgICAgICAgICAgICAgICAgIHBhc3RlOiB0aGlzLl9vblBhc3RlXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoJC5zdXBwb3J0LmZpbGVJbnB1dCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX29uKHRoaXMub3B0aW9ucy5maWxlSW5wdXQsIHtcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlOiB0aGlzLl9vbkNoYW5nZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgIF9kZXN0cm95RXZlbnRIYW5kbGVyczogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5fb2ZmKHRoaXMub3B0aW9ucy5kcm9wWm9uZSwgJ2RyYWdlbnRlciBkcmFnbGVhdmUgZHJhZ292ZXIgZHJvcCcpO1xuICAgICAgICAgICAgdGhpcy5fb2ZmKHRoaXMub3B0aW9ucy5wYXN0ZVpvbmUsICdwYXN0ZScpO1xuICAgICAgICAgICAgdGhpcy5fb2ZmKHRoaXMub3B0aW9ucy5maWxlSW5wdXQsICdjaGFuZ2UnKTtcbiAgICAgICAgfSxcblxuICAgICAgICBfZGVzdHJveTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5fZGVzdHJveUV2ZW50SGFuZGxlcnMoKTtcbiAgICAgICAgfSxcblxuICAgICAgICBfc2V0T3B0aW9uOiBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xuICAgICAgICAgICAgdmFyIHJlaW5pdCA9ICQuaW5BcnJheShrZXksIHRoaXMuX3NwZWNpYWxPcHRpb25zKSAhPT0gLTE7XG4gICAgICAgICAgICBpZiAocmVpbml0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fZGVzdHJveUV2ZW50SGFuZGxlcnMoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX3N1cGVyKGtleSwgdmFsdWUpO1xuICAgICAgICAgICAgaWYgKHJlaW5pdCkge1xuICAgICAgICAgICAgICAgIHRoaXMuX2luaXRTcGVjaWFsT3B0aW9ucygpO1xuICAgICAgICAgICAgICAgIHRoaXMuX2luaXRFdmVudEhhbmRsZXJzKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2luaXRTcGVjaWFsT3B0aW9uczogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIG9wdGlvbnMgPSB0aGlzLm9wdGlvbnM7XG4gICAgICAgICAgICBpZiAob3B0aW9ucy5maWxlSW5wdXQgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIG9wdGlvbnMuZmlsZUlucHV0ID0gdGhpcy5lbGVtZW50LmlzKCdpbnB1dFt0eXBlPVwiZmlsZVwiXScpID9cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudCA6IHRoaXMuZWxlbWVudC5maW5kKCdpbnB1dFt0eXBlPVwiZmlsZVwiXScpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghKG9wdGlvbnMuZmlsZUlucHV0IGluc3RhbmNlb2YgJCkpIHtcbiAgICAgICAgICAgICAgICBvcHRpb25zLmZpbGVJbnB1dCA9ICQob3B0aW9ucy5maWxlSW5wdXQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCEob3B0aW9ucy5kcm9wWm9uZSBpbnN0YW5jZW9mICQpKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5kcm9wWm9uZSA9ICQob3B0aW9ucy5kcm9wWm9uZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIShvcHRpb25zLnBhc3RlWm9uZSBpbnN0YW5jZW9mICQpKSB7XG4gICAgICAgICAgICAgICAgb3B0aW9ucy5wYXN0ZVpvbmUgPSAkKG9wdGlvbnMucGFzdGVab25lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICBfZ2V0UmVnRXhwOiBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICB2YXIgcGFydHMgPSBzdHIuc3BsaXQoJy8nKSxcbiAgICAgICAgICAgICAgICBtb2RpZmllcnMgPSBwYXJ0cy5wb3AoKTtcbiAgICAgICAgICAgIHBhcnRzLnNoaWZ0KCk7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChwYXJ0cy5qb2luKCcvJyksIG1vZGlmaWVycyk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2lzUmVnRXhwT3B0aW9uOiBmdW5jdGlvbiAoa2V5LCB2YWx1ZSkge1xuICAgICAgICAgICAgcmV0dXJuIGtleSAhPT0gJ3VybCcgJiYgJC50eXBlKHZhbHVlKSA9PT0gJ3N0cmluZycgJiZcbiAgICAgICAgICAgICAgICAvXlxcLy4qXFwvW2lnbV17MCwzfSQvLnRlc3QodmFsdWUpO1xuICAgICAgICB9LFxuXG4gICAgICAgIF9pbml0RGF0YUF0dHJpYnV0ZXM6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpcyxcbiAgICAgICAgICAgICAgICBvcHRpb25zID0gdGhpcy5vcHRpb25zLFxuICAgICAgICAgICAgICAgIGRhdGEgPSB0aGlzLmVsZW1lbnQuZGF0YSgpO1xuICAgICAgICAgICAgLy8gSW5pdGlhbGl6ZSBvcHRpb25zIHNldCB2aWEgSFRNTDUgZGF0YS1hdHRyaWJ1dGVzOlxuICAgICAgICAgICAgJC5lYWNoKFxuICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudFswXS5hdHRyaWJ1dGVzLFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChpbmRleCwgYXR0cikge1xuICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gYXR0ci5uYW1lLnRvTG93ZXJDYXNlKCksXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9eZGF0YS0vLnRlc3Qoa2V5KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29udmVydCBoeXBoZW4tYXRlZCBrZXkgdG8gY2FtZWxDYXNlOlxuICAgICAgICAgICAgICAgICAgICAgICAga2V5ID0ga2V5LnNsaWNlKDUpLnJlcGxhY2UoLy1bYS16XS9nLCBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0ci5jaGFyQXQoMSkudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBkYXRhW2tleV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodGhhdC5faXNSZWdFeHBPcHRpb24oa2V5LCB2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHRoYXQuX2dldFJlZ0V4cCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zW2tleV0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgX2NyZWF0ZTogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdGhpcy5faW5pdERhdGFBdHRyaWJ1dGVzKCk7XG4gICAgICAgICAgICB0aGlzLl9pbml0U3BlY2lhbE9wdGlvbnMoKTtcbiAgICAgICAgICAgIHRoaXMuX3Nsb3RzID0gW107XG4gICAgICAgICAgICB0aGlzLl9zZXF1ZW5jZSA9IHRoaXMuX2dldFhIUlByb21pc2UodHJ1ZSk7XG4gICAgICAgICAgICB0aGlzLl9zZW5kaW5nID0gdGhpcy5fYWN0aXZlID0gMDtcbiAgICAgICAgICAgIHRoaXMuX2luaXRQcm9ncmVzc09iamVjdCh0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuX2luaXRFdmVudEhhbmRsZXJzKCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLy8gVGhpcyBtZXRob2QgaXMgZXhwb3NlZCB0byB0aGUgd2lkZ2V0IEFQSSBhbmQgYWxsb3dzIHRvIHF1ZXJ5XG4gICAgICAgIC8vIHRoZSBudW1iZXIgb2Y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RhdGEgJiYgIXRoaXMub3B0aW9ucy5kaXNhYmxlZCkge1xuICAgICAgICAgICAgICAgIGlmIChkYXRhLmZpbGVJbnB1dCAmJiAhZGF0YS5maWxlcykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGhhdCA9IHRoaXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZmQgPSAkLkRlZmVycmVkKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlID0gZGZkLnByb21pc2UoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpxWEhSLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWJvcnRlZDtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZS5hYm9ydCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFib3J0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpxWEhSKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGpxWEhSLmFib3J0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBkZmQucmVqZWN0KG51bGwsICdhYm9ydCcsICdhYm9ydCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2dldEZpbGVJbnB1dEZpbGVzKGRhdGEuZmlsZUlucHV0KS5hbHdheXMoXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoZmlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWJvcnRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZmlsZXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRmZC5yZWplY3QoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmZpbGVzID0gZmlsZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganFYSFIgPSB0aGF0Ll9vblNlbmQobnVsbCwgZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganFYSFIudGhlbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHJlc3VsdCwgdGV4dFN0YXR1cywganFYSFIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRmZC5yZXNvbHZlKHJlc3VsdCwgdGV4dFN0YXR1cywganFYSFIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiAoanFYSFIsIHRleHRTdGF0dXMsIGVycm9yVGhyb3duKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZmQucmVqZWN0KGpxWEhSLCB0ZXh0U3RhdHVzLCBlcnJvclRocm93bik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZW5oYW5jZVByb21pc2UocHJvbWlzZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRhdGEuZmlsZXMgPSAkLm1ha2VBcnJheShkYXRhLmZpbGVzKTtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YS5maWxlcy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgIC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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 11 */\n/***/ function(module, exports) {\n\neval(\"/*!\\n * Bootstrap v3.3.7 (http://getbootstrap.com)\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under the MIT license\\n */\\n\\nif (typeof jQuery === 'undefined') {\\n throw new Error('Bootstrap\\\\'s JavaScript requires jQuery')\\n}\\n\\n+function ($) {\\n 'use strict';\\n var version = $.fn.jquery.split(' ')[0].split('.')\\n if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {\\n throw new Error('Bootstrap\\\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')\\n }\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: transition.js v3.3.7\\n * http://getbootstrap.com/javascript/#transitions\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\\n // ============================================================\\n\\n function transitionEnd() {\\n var el = document.createElement('bootstrap')\\n\\n var transEndEventNames = {\\n WebkitTransition : 'webkitTransitionEnd',\\n MozTransition : 'transitionend',\\n OTransition : 'oTransitionEnd otransitionend',\\n transition : 'transitionend'\\n }\\n\\n for (var name in transEndEventNames) {\\n if (el.style[name] !== undefined) {\\n return { end: transEndEventNames[name] }\\n }\\n }\\n\\n return false // explicit for ie8 ( ._.)\\n }\\n\\n // http://blog.alexmaccaw.com/css-transitions\\n $.fn.emulateTransitionEnd = function (duration) {\\n var called = false\\n var $el = this\\n $(this).one('bsTransitionEnd', function () { called = true })\\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\\n setTimeout(callback, duration)\\n return this\\n }\\n\\n $(function () {\\n $.support.transition = transitionEnd()\\n\\n if (!$.support.transition) return\\n\\n $.event.special.bsTransitionEnd = {\\n bindType: $.support.transition.end,\\n delegateType: $.support.transition.end,\\n handle: function (e) {\\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\\n }\\n }\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: alert.js v3.3.7\\n * http://getbootstrap.com/javascript/#alerts\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // ALERT CLASS DEFINITION\\n // ======================\\n\\n var dismiss = '[data-dismiss=\\\"alert\\\"]'\\n var Alert = function (el) {\\n $(el).on('click', dismiss, this.close)\\n }\\n\\n Alert.VERSION = '3.3.7'\\n\\n Alert.TRANSITION_DURATION = 150\\n\\n Alert.prototype.close = function (e) {\\n var $this = $(this)\\n var selector = $this.attr('data-target')\\n\\n if (!selector) {\\n selector = $this.attr('href')\\n selector = selector && selector.replace(/.*(?=#[^\\\\s]*$)/, '') // strip for ie7\\n }\\n\\n var $parent = $(selector === '#' ? [] : selector)\\n\\n if (e) e.preventDefault()\\n\\n if (!$parent.length) {\\n $parent = $this.closest('.alert')\\n }\\n\\n $parent.trigger(e = $.Event('close.bs.alert'))\\n\\n if (e.isDefaultPrevented()) return\\n\\n $parent.removeClass('in')\\n\\n function removeElement() {\\n // detach from parent, fire event then clean up data\\n $parent.detach().trigger('closed.bs.alert').remove()\\n }\\n\\n $.support.transition && $parent.hasClass('fade') ?\\n $parent\\n .one('bsTransitionEnd', removeElement)\\n .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\\n removeElement()\\n }\\n\\n\\n // ALERT PLUGIN DEFINITION\\n // =======================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.alert')\\n\\n if (!data) $this.data('bs.alert', (data = new Alert(this)))\\n if (typeof option == 'string') data[option].call($this)\\n })\\n }\\n\\n var old = $.fn.alert\\n\\n $.fn.alert = Plugin\\n $.fn.alert.Constructor = Alert\\n\\n\\n // ALERT NO CONFLICT\\n // =================\\n\\n $.fn.alert.noConflict = function () {\\n $.fn.alert = old\\n return this\\n }\\n\\n\\n // ALERT DATA-API\\n // ==============\\n\\n $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: button.js v3.3.7\\n * http://getbootstrap.com/javascript/#buttons\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // BUTTON PUBLIC CLASS DEFINITION\\n // ==============================\\n\\n var Button = function (element, options) {\\n this.$element = $(element)\\n this.options = $.extend({}, Button.DEFAULTS, options)\\n this.isLoading = false\\n }\\n\\n Button.VERSION = '3.3.7'\\n\\n Button.DEFAULTS = {\\n loadingText: 'loading...'\\n }\\n\\n Button.prototype.setState = function (state) {\\n var d = 'disabled'\\n var $el = this.$element\\n var val = $el.is('input') ? 'val' : 'html'\\n var data = $el.data()\\n\\n state += 'Text'\\n\\n if (data.resetText == null) $el.data('resetText', $el[val]())\\n\\n // push to event loop to allow forms to submit\\n setTimeout($.proxy(function () {\\n $el[val](data[state] == null ? this.options[state] : data[state])\\n\\n if (state == 'loadingText') {\\n this.isLoading = true\\n $el.addClass(d).attr(d, d).prop(d, true)\\n } else if (this.isLoading) {\\n this.isLoading = false\\n $el.removeClass(d).removeAttr(d).prop(d, false)\\n }\\n }, this), 0)\\n }\\n\\n Button.prototype.toggle = function () {\\n var changed = true\\n var $parent = this.$element.closest('[data-toggle=\\\"buttons\\\"]')\\n\\n if ($parent.length) {\\n var $input = this.$element.find('input')\\n if ($input.prop('type') == 'radio') {\\n if ($input.prop('checked')) changed = false\\n $parent.find('.active').removeClass('active')\\n this.$element.addClass('active')\\n } else if ($input.prop('type') == 'checkbox') {\\n if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false\\n this.$element.toggleClass('active')\\n }\\n $input.prop('checked', this.$element.hasClass('active'))\\n if (changed) $input.trigger('change')\\n } else {\\n this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\\n this.$element.toggleClass('active')\\n }\\n }\\n\\n\\n // BUTTON PLUGIN DEFINITION\\n // ========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.button')\\n var options = typeof option == 'object' && option\\n\\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\\n\\n if (option == 'toggle') data.toggle()\\n else if (option) data.setState(option)\\n })\\n }\\n\\n var old = $.fn.button\\n\\n $.fn.button = Plugin\\n $.fn.button.Constructor = Button\\n\\n\\n // BUTTON NO CONFLICT\\n // ==================\\n\\n $.fn.button.noConflict = function () {\\n $.fn.button = old\\n return this\\n }\\n\\n\\n // BUTTON DATA-API\\n // ===============\\n\\n $(document)\\n .on('click.bs.button.data-api', '[data-toggle^=\\\"button\\\"]', function (e) {\\n var $btn = $(e.target).closest('.btn')\\n Plugin.call($btn, 'toggle')\\n if (!($(e.target).is('input[type=\\\"radio\\\"], input[type=\\\"checkbox\\\"]'))) {\\n // Prevent double click on radios, and the double selections (so cancellation) on checkboxes\\n e.preventDefault()\\n // The target component still receive the focus\\n if ($btn.is('input,button')) $btn.trigger('focus')\\n else $btn.find('input:visible,button:visible').first().trigger('focus')\\n }\\n })\\n .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\\\"button\\\"]', function (e) {\\n $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: carousel.js v3.3.7\\n * http://getbootstrap.com/javascript/#carousel\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // CAROUSEL CLASS DEFINITION\\n // =========================\\n\\n var Carousel = function (element, options) {\\n this.$element = $(element)\\n this.$indicators = this.$element.find('.carousel-indicators')\\n this.options = options\\n this.paused = null\\n this.sliding = null\\n this.interval = null\\n this.$active = null\\n this.$items = null\\n\\n this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\\n\\n this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\\n .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\\n .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\\n }\\n\\n Carousel.VERSION = '3.3.7'\\n\\n Carousel.TRANSITION_DURATION = 600\\n\\n Carousel.DEFAULTS = {\\n interval: 5000,\\n pause: 'hover',\\n wrap: true,\\n keyboard: true\\n }\\n\\n Carousel.prototype.keydown = function (e) {\\n if (/input|textarea/i.test(e.target.tagName)) return\\n switch (e.which) {\\n case 37: this.prev(); break\\n case 39: this.next(); break\\n default: return\\n }\\n\\n e.preventDefault()\\n }\\n\\n Carousel.prototype.cycle = function (e) {\\n e || (this.paused = false)\\n\\n this.interval && clearInterval(this.interval)\\n\\n this.options.interval\\n && !this.paused\\n && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\\n\\n return this\\n }\\n\\n Carousel.prototype.getItemIndex = function (item) {\\n this.$items = item.parent().children('.item')\\n return this.$items.index(item || this.$active)\\n }\\n\\n Carousel.prototype.getItemForDirection = function (direction, active) {\\n var activeIndex = this.getItemIndex(active)\\n var willWrap = (direction == 'prev' && activeIndex === 0)\\n || (direction == 'next' && activeIndex == (this.$items.length - 1))\\n if (willWrap && !this.options.wrap) return active\\n var delta = direction == 'prev' ? -1 : 1\\n var itemIndex = (activeIndex + delta) % this.$items.length\\n return this.$items.eq(itemIndex)\\n }\\n\\n Carousel.prototype.to = function (pos) {\\n var that = this\\n var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\\n\\n if (pos > (this.$items.length - 1) || pos < 0) return\\n\\n if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \\\"slid\\\"\\n if (activeIndex == pos) return this.pause().cycle()\\n\\n return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\\n }\\n\\n Carousel.prototype.pause = function (e) {\\n e || (this.paused = true)\\n\\n if (this.$element.find('.next, .prev').length && $.support.transition) {\\n this.$element.trigger($.support.transition.end)\\n this.cycle(true)\\n }\\n\\n this.interval = clearInterval(this.interval)\\n\\n return this\\n }\\n\\n Carousel.prototype.next = function () {\\n if (this.sliding) return\\n return this.slide('next')\\n }\\n\\n Carousel.prototype.prev = function () {\\n if (this.sliding) return\\n return this.slide('prev')\\n }\\n\\n Carousel.prototype.slide = function (type, next) {\\n var $active = this.$element.find('.item.active')\\n var $next = next || this.getItemForDirection(type, $active)\\n var isCycling = this.interval\\n var direction = type == 'next' ? 'left' : 'right'\\n var that = this\\n\\n if ($next.hasClass('active')) return (this.sliding = false)\\n\\n var relatedTarget = $next[0]\\n var slideEvent = $.Event('slide.bs.carousel', {\\n relatedTarget: relatedTarget,\\n direction: direction\\n })\\n this.$element.trigger(slideEvent)\\n if (slideEvent.isDefaultPrevented()) return\\n\\n this.sliding = true\\n\\n isCycling && this.pause()\\n\\n if (this.$indicators.length) {\\n this.$indicators.find('.active').removeClass('active')\\n var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\\n $nextIndicator && $nextIndicator.addClass('active')\\n }\\n\\n var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \\\"slid\\\"\\n if ($.support.transition && this.$element.hasClass('slide')) {\\n $next.addClass(type)\\n $next[0].offsetWidth // force reflow\\n $active.addClass(direction)\\n $next.addClass(direction)\\n $active\\n .one('bsTransitionEnd', function () {\\n $next.removeClass([type, direction].join(' ')).addClass('active')\\n $active.removeClass(['active', direction].join(' '))\\n that.sliding = false\\n setTimeout(function () {\\n that.$element.trigger(slidEvent)\\n }, 0)\\n })\\n .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\\n } else {\\n $active.removeClass('active')\\n $next.addClass('active')\\n this.sliding = false\\n this.$element.trigger(slidEvent)\\n }\\n\\n isCycling && this.cycle()\\n\\n return this\\n }\\n\\n\\n // CAROUSEL PLUGIN DEFINITION\\n // ==========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.carousel')\\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\\n var action = typeof option == 'string' ? option : options.slide\\n\\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\\n if (typeof option == 'number') data.to(option)\\n else if (action) data[action]()\\n else if (options.interval) data.pause().cycle()\\n })\\n }\\n\\n var old = $.fn.carousel\\n\\n $.fn.carousel = Plugin\\n $.fn.carousel.Constructor = Carousel\\n\\n\\n // CAROUSEL NO CONFLICT\\n // ====================\\n\\n $.fn.carousel.noConflict = function () {\\n $.fn.carousel = old\\n return this\\n }\\n\\n\\n // CAROUSEL DATA-API\\n // =================\\n\\n var clickHandler = function (e) {\\n var href\\n var $this = $(this)\\n var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\\\s]+$)/, '')) // strip for ie7\\n if (!$target.hasClass('carousel')) return\\n var options = $.extend({}, $target.data(), $this.data())\\n var slideIndex = $this.attr('data-slide-to')\\n if (slideIndex) options.interval = false\\n\\n Plugin.call($target, options)\\n\\n if (slideIndex) {\\n $target.data('bs.carousel').to(slideIndex)\\n }\\n\\n e.preventDefault()\\n }\\n\\n $(document)\\n .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\\n .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\\n\\n $(window).on('load', function () {\\n $('[data-ride=\\\"carousel\\\"]').each(function () {\\n var $carousel = $(this)\\n Plugin.call($carousel, $carousel.data())\\n })\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: collapse.js v3.3.7\\n * http://getbootstrap.com/javascript/#collapse\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n/* jshint latedef: false */\\n\\n+function ($) {\\n 'use strict';\\n\\n // COLLAPSE PUBLIC CLASS DEFINITION\\n // ================================\\n\\n var Collapse = function (element, options) {\\n this.$element = $(element)\\n this.options = $.extend({}, Collapse.DEFAULTS, options)\\n this.$trigger = $('[data-toggle=\\\"collapse\\\"][href=\\\"#' + element.id + '\\\"],' +\\n '[data-toggle=\\\"collapse\\\"][data-target=\\\"#' + element.id + '\\\"]')\\n this.transitioning = null\\n\\n if (this.options.parent) {\\n this.$parent = this.getParent()\\n } else {\\n this.addAriaAndCollapsedClass(this.$element, this.$trigger)\\n }\\n\\n if (this.options.toggle) this.toggle()\\n }\\n\\n Collapse.VERSION = '3.3.7'\\n\\n Collapse.TRANSITION_DURATION = 350\\n\\n Collapse.DEFAULTS = {\\n toggle: true\\n }\\n\\n Collapse.prototype.dimension = function () {\\n var hasWidth = this.$element.hasClass('width')\\n return hasWidth ? 'width' : 'height'\\n }\\n\\n Collapse.prototype.show = function () {\\n if (this.transitioning || this.$element.hasClass('in')) return\\n\\n var activesData\\n var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\\n\\n if (actives && actives.length) {\\n activesData = actives.data('bs.collapse')\\n if (activesData && activesData.transitioning) return\\n }\\n\\n var startEvent = $.Event('show.bs.collapse')\\n this.$element.trigger(startEvent)\\n if (startEvent.isDefaultPrevented()) return\\n\\n if (actives && actives.length) {\\n Plugin.call(actives, 'hide')\\n activesData || actives.data('bs.collapse', null)\\n }\\n\\n var dimension = this.dimension()\\n\\n this.$element\\n .removeClass('collapse')\\n .addClass('collapsing')[dimension](0)\\n .attr('aria-expanded', true)\\n\\n this.$trigger\\n .removeClass('collapsed')\\n .attr('aria-expanded', true)\\n\\n this.transitioning = 1\\n\\n var complete = function () {\\n this.$element\\n .removeClass('collapsing')\\n .addClass('collapse in')[dimension]('')\\n this.transitioning = 0\\n this.$element\\n .trigger('shown.bs.collapse')\\n }\\n\\n if (!$.support.transition) return complete.call(this)\\n\\n var scrollSize = $.camelCase(['scroll', dimension].join('-'))\\n\\n this.$element\\n .one('bsTransitionEnd', $.proxy(complete, this))\\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\\n }\\n\\n Collapse.prototype.hide = function () {\\n if (this.transitioning || !this.$element.hasClass('in')) return\\n\\n var startEvent = $.Event('hide.bs.collapse')\\n this.$element.trigger(startEvent)\\n if (startEvent.isDefaultPrevented()) return\\n\\n var dimension = this.dimension()\\n\\n this.$element[dimension](this.$element[dimension]())[0].offsetHeight\\n\\n this.$element\\n .addClass('collapsing')\\n .removeClass('collapse in')\\n .attr('aria-expanded', false)\\n\\n this.$trigger\\n .addClass('collapsed')\\n .attr('aria-expanded', false)\\n\\n this.transitioning = 1\\n\\n var complete = function () {\\n this.transitioning = 0\\n this.$element\\n .removeClass('collapsing')\\n .addClass('collapse')\\n .trigger('hidden.bs.collapse')\\n }\\n\\n if (!$.support.transition) return complete.call(this)\\n\\n this.$element\\n [dimension](0)\\n .one('bsTransitionEnd', $.proxy(complete, this))\\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\\n }\\n\\n Collapse.prototype.toggle = function () {\\n this[this.$element.hasClass('in') ? 'hide' : 'show']()\\n }\\n\\n Collapse.prototype.getParent = function () {\\n return $(this.options.parent)\\n .find('[data-toggle=\\\"collapse\\\"][data-parent=\\\"' + this.options.parent + '\\\"]')\\n .each($.proxy(function (i, element) {\\n var $element = $(element)\\n this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\\n }, this))\\n .end()\\n }\\n\\n Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\\n var isOpen = $element.hasClass('in')\\n\\n $element.attr('aria-expanded', isOpen)\\n $trigger\\n .toggleClass('collapsed', !isOpen)\\n .attr('aria-expanded', isOpen)\\n }\\n\\n function getTargetFromTrigger($trigger) {\\n var href\\n var target = $trigger.attr('data-target')\\n || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\\\s]+$)/, '') // strip for ie7\\n\\n return $(target)\\n }\\n\\n\\n // COLLAPSE PLUGIN DEFINITION\\n // ==========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.collapse')\\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\\n\\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.collapse\\n\\n $.fn.collapse = Plugin\\n $.fn.collapse.Constructor = Collapse\\n\\n\\n // COLLAPSE NO CONFLICT\\n // ====================\\n\\n $.fn.collapse.noConflict = function () {\\n $.fn.collapse = old\\n return this\\n }\\n\\n\\n // COLLAPSE DATA-API\\n // =================\\n\\n $(document).on('click.bs.collapse.data-api', '[data-toggle=\\\"collapse\\\"]', function (e) {\\n var $this = $(this)\\n\\n if (!$this.attr('data-target')) e.preventDefault()\\n\\n var $target = getTargetFromTrigger($this)\\n var data = $target.data('bs.collapse')\\n var option = data ? 'toggle' : $this.data()\\n\\n Plugin.call($target, option)\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: dropdown.js v3.3.7\\n * http://getbootstrap.com/javascript/#dropdowns\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // DROPDOWN CLASS DEFINITION\\n // =========================\\n\\n var backdrop = '.dropdown-backdrop'\\n var toggle = '[data-toggle=\\\"dropdown\\\"]'\\n var Dropdown = function (element) {\\n $(element).on('click.bs.dropdown', this.toggle)\\n }\\n\\n Dropdown.VERSION = '3.3.7'\\n\\n function getParent($this) {\\n var selector = $this.attr('data-target')\\n\\n if (!selector) {\\n selector = $this.attr('href')\\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\\\s]*$)/, '') // strip for ie7\\n }\\n\\n var $parent = selector && $(selector)\\n\\n return $parent && $parent.length ? $parent : $this.parent()\\n }\\n\\n function clearMenus(e) {\\n if (e && e.which === 3) return\\n $(backdrop).remove()\\n $(toggle).each(function () {\\n var $this = $(this)\\n var $parent = getParent($this)\\n var relatedTarget = { relatedTarget: this }\\n\\n if (!$parent.hasClass('open')) return\\n\\n if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\\n\\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\\n\\n if (e.isDefaultPrevented()) return\\n\\n $this.attr('aria-expanded', 'false')\\n $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\\n })\\n }\\n\\n Dropdown.prototype.toggle = function (e) {\\n var $this = $(this)\\n\\n if ($this.is('.disabled, :disabled')) return\\n\\n var $parent = getParent($this)\\n var isActive = $parent.hasClass('open')\\n\\n clearMenus()\\n\\n if (!isActive) {\\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\\n // if mobile we use a backdrop because click events don't delegate\\n $(document.createElement('div'))\\n .addClass('dropdown-backdrop')\\n .insertAfter($(this))\\n .on('click', clearMenus)\\n }\\n\\n var relatedTarget = { relatedTarget: this }\\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\\n\\n if (e.isDefaultPrevented()) return\\n\\n $this\\n .trigger('focus')\\n .attr('aria-expanded', 'true')\\n\\n $parent\\n .toggleClass('open')\\n .trigger($.Event('shown.bs.dropdown', relatedTarget))\\n }\\n\\n return false\\n }\\n\\n Dropdown.prototype.keydown = function (e) {\\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\\n\\n var $this = $(this)\\n\\n e.preventDefault()\\n e.stopPropagation()\\n\\n if ($this.is('.disabled, :disabled')) return\\n\\n var $parent = getParent($this)\\n var isActive = $parent.hasClass('open')\\n\\n if (!isActive && e.which != 27 || isActive && e.which == 27) {\\n if (e.which == 27) $parent.find(toggle).trigger('focus')\\n return $this.trigger('click')\\n }\\n\\n var desc = ' li:not(.disabled):visible a'\\n var $items = $parent.find('.dropdown-menu' + desc)\\n\\n if (!$items.length) return\\n\\n var index = $items.index(e.target)\\n\\n if (e.which == 38 && index > 0) index-- // up\\n if (e.which == 40 && index < $items.length - 1) index++ // down\\n if (!~index) index = 0\\n\\n $items.eq(index).trigger('focus')\\n }\\n\\n\\n // DROPDOWN PLUGIN DEFINITION\\n // ==========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.dropdown')\\n\\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\\n if (typeof option == 'string') data[option].call($this)\\n })\\n }\\n\\n var old = $.fn.dropdown\\n\\n $.fn.dropdown = Plugin\\n $.fn.dropdown.Constructor = Dropdown\\n\\n\\n // DROPDOWN NO CONFLICT\\n // ====================\\n\\n $.fn.dropdown.noConflict = function () {\\n $.fn.dropdown = old\\n return this\\n }\\n\\n\\n // APPLY TO STANDARD DROPDOWN ELEMENTS\\n // ===================================\\n\\n $(document)\\n .on('click.bs.dropdown.data-api', clearMenus)\\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\\n .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: modal.js v3.3.7\\n * http://getbootstrap.com/javascript/#modals\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // MODAL CLASS DEFINITION\\n // ======================\\n\\n var Modal = function (element, options) {\\n this.options = options\\n this.$body = $(document.body)\\n this.$element = $(element)\\n this.$dialog = this.$element.find('.modal-dialog')\\n this.$backdrop = null\\n this.isShown = null\\n this.originalBodyPad = null\\n this.scrollbarWidth = 0\\n this.ignoreBackdropClick = false\\n\\n if (this.options.remote) {\\n this.$element\\n .find('.modal-content')\\n .load(this.options.remote, $.proxy(function () {\\n this.$element.trigger('loaded.bs.modal')\\n }, this))\\n }\\n }\\n\\n Modal.VERSION = '3.3.7'\\n\\n Modal.TRANSITION_DURATION = 300\\n Modal.BACKDROP_TRANSITION_DURATION = 150\\n\\n Modal.DEFAULTS = {\\n backdrop: true,\\n keyboard: true,\\n show: true\\n }\\n\\n Modal.prototype.toggle = function (_relatedTarget) {\\n return this.isShown ? this.hide() : this.show(_relatedTarget)\\n }\\n\\n Modal.prototype.show = function (_relatedTarget) {\\n var that = this\\n var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\\n\\n this.$element.trigger(e)\\n\\n if (this.isShown || e.isDefaultPrevented()) return\\n\\n this.isShown = true\\n\\n this.checkScrollbar()\\n this.setScrollbar()\\n this.$body.addClass('modal-open')\\n\\n this.escape()\\n this.resize()\\n\\n this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\\\"modal\\\"]', $.proxy(this.hide, this))\\n\\n this.$dialog.on('mousedown.dismiss.bs.modal', function () {\\n that.$element.one('mouseup.dismiss.bs.modal', function (e) {\\n if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\\n })\\n })\\n\\n this.backdrop(function () {\\n var transition = $.support.transition && that.$element.hasClass('fade')\\n\\n if (!that.$element.parent().length) {\\n that.$element.appendTo(that.$body) // don't move modals dom position\\n }\\n\\n that.$element\\n .show()\\n .scrollTop(0)\\n\\n that.adjustDialog()\\n\\n if (transition) {\\n that.$element[0].offsetWidth // force reflow\\n }\\n\\n that.$element.addClass('in')\\n\\n that.enforceFocus()\\n\\n var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\\n\\n transition ?\\n that.$dialog // wait for modal to slide in\\n .one('bsTransitionEnd', function () {\\n that.$element.trigger('focus').trigger(e)\\n })\\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\\n that.$element.trigger('focus').trigger(e)\\n })\\n }\\n\\n Modal.prototype.hide = function (e) {\\n if (e) e.preventDefault()\\n\\n e = $.Event('hide.bs.modal')\\n\\n this.$element.trigger(e)\\n\\n if (!this.isShown || e.isDefaultPrevented()) return\\n\\n this.isShown = false\\n\\n this.escape()\\n this.resize()\\n\\n $(document).off('focusin.bs.modal')\\n\\n this.$element\\n .removeClass('in')\\n .off('click.dismiss.bs.modal')\\n .off('mouseup.dismiss.bs.modal')\\n\\n this.$dialog.off('mousedown.dismiss.bs.modal')\\n\\n $.support.transition && this.$element.hasClass('fade') ?\\n this.$element\\n .one('bsTransitionEnd', $.proxy(this.hideModal, this))\\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\\n this.hideModal()\\n }\\n\\n Modal.prototype.enforceFocus = function () {\\n $(document)\\n .off('focusin.bs.modal') // guard against infinite focus loop\\n .on('focusin.bs.modal', $.proxy(function (e) {\\n if (document !== e.target &&\\n this.$element[0] !== e.target &&\\n !this.$element.has(e.target).length) {\\n this.$element.trigger('focus')\\n }\\n }, this))\\n }\\n\\n Modal.prototype.escape = function () {\\n if (this.isShown && this.options.keyboard) {\\n this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\\n e.which == 27 && this.hide()\\n }, this))\\n } else if (!this.isShown) {\\n this.$element.off('keydown.dismiss.bs.modal')\\n }\\n }\\n\\n Modal.prototype.resize = function () {\\n if (this.isShown) {\\n $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\\n } else {\\n $(window).off('resize.bs.modal')\\n }\\n }\\n\\n Modal.prototype.hideModal = function () {\\n var that = this\\n this.$element.hide()\\n this.backdrop(function () {\\n that.$body.removeClass('modal-open')\\n that.resetAdjustments()\\n that.resetScrollbar()\\n that.$element.trigger('hidden.bs.modal')\\n })\\n }\\n\\n Modal.prototype.removeBackdrop = function () {\\n this.$backdrop && this.$backdrop.remove()\\n this.$backdrop = null\\n }\\n\\n Modal.prototype.backdrop = function (callback) {\\n var that = this\\n var animate = this.$element.hasClass('fade') ? 'fade' : ''\\n\\n if (this.isShown && this.options.backdrop) {\\n var doAnimate = $.support.transition && animate\\n\\n this.$backdrop = $(document.createElement('div'))\\n .addClass('modal-backdrop ' + animate)\\n .appendTo(this.$body)\\n\\n this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\\n if (this.ignoreBackdropClick) {\\n this.ignoreBackdropClick = false\\n return\\n }\\n if (e.target !== e.currentTarget) return\\n this.options.backdrop == 'static'\\n ? this.$element[0].focus()\\n : this.hide()\\n }, this))\\n\\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\\n\\n this.$backdrop.addClass('in')\\n\\n if (!callback) return\\n\\n doAnimate ?\\n this.$backdrop\\n .one('bsTransitionEnd', callback)\\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\\n callback()\\n\\n } else if (!this.isShown && this.$backdrop) {\\n this.$backdrop.removeClass('in')\\n\\n var callbackRemove = function () {\\n that.removeBackdrop()\\n callback && callback()\\n }\\n $.support.transition && this.$element.hasClass('fade') ?\\n this.$backdrop\\n .one('bsTransitionEnd', callbackRemove)\\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\\n callbackRemove()\\n\\n } else if (callback) {\\n callback()\\n }\\n }\\n\\n // these following methods are used to handle overflowing modals\\n\\n Modal.prototype.handleUpdate = function () {\\n this.adjustDialog()\\n }\\n\\n Modal.prototype.adjustDialog = function () {\\n var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\\n\\n this.$element.css({\\n paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\\n paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\\n })\\n }\\n\\n Modal.prototype.resetAdjustments = function () {\\n this.$element.css({\\n paddingLeft: '',\\n paddingRight: ''\\n })\\n }\\n\\n Modal.prototype.checkScrollbar = function () {\\n var fullWindowWidth = window.innerWidth\\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\\n var documentElementRect = document.documentElement.getBoundingClientRect()\\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\\n }\\n this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\\n this.scrollbarWidth = this.measureScrollbar()\\n }\\n\\n Modal.prototype.setScrollbar = function () {\\n var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\\n this.originalBodyPad = document.body.style.paddingRight || ''\\n if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\\n }\\n\\n Modal.prototype.resetScrollbar = function () {\\n this.$body.css('padding-right', this.originalBodyPad)\\n }\\n\\n Modal.prototype.measureScrollbar = function () { // thx walsh\\n var scrollDiv = document.createElement('div')\\n scrollDiv.className = 'modal-scrollbar-measure'\\n this.$body.append(scrollDiv)\\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\\n this.$body[0].removeChild(scrollDiv)\\n return scrollbarWidth\\n }\\n\\n\\n // MODAL PLUGIN DEFINITION\\n // =======================\\n\\n function Plugin(option, _relatedTarget) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.modal')\\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\\n\\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\\n if (typeof option == 'string') data[option](_relatedTarget)\\n else if (options.show) data.show(_relatedTarget)\\n })\\n }\\n\\n var old = $.fn.modal\\n\\n $.fn.modal = Plugin\\n $.fn.modal.Constructor = Modal\\n\\n\\n // MODAL NO CONFLICT\\n // =================\\n\\n $.fn.modal.noConflict = function () {\\n $.fn.modal = old\\n return this\\n }\\n\\n\\n // MODAL DATA-API\\n // ==============\\n\\n $(document).on('click.bs.modal.data-api', '[data-toggle=\\\"modal\\\"]', function (e) {\\n var $this = $(this)\\n var href = $this.attr('href')\\n var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\\\s]+$)/, ''))) // strip for ie7\\n var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\\n\\n if ($this.is('a')) e.preventDefault()\\n\\n $target.one('show.bs.modal', function (showEvent) {\\n if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\\n $target.one('hidden.bs.modal', function () {\\n $this.is(':visible') && $this.trigger('focus')\\n })\\n })\\n Plugin.call($target, option, this)\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: tooltip.js v3.3.7\\n * http://getbootstrap.com/javascript/#tooltip\\n * Inspired by the original jQuery.tipsy by Jason Frame\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // TOOLTIP PUBLIC CLASS DEFINITION\\n // ===============================\\n\\n var Tooltip = function (element, options) {\\n this.type = null\\n this.options = null\\n this.enabled = null\\n this.timeout = null\\n this.hoverState = null\\n this.$element = null\\n this.inState = null\\n\\n this.init('tooltip', element, options)\\n }\\n\\n Tooltip.VERSION = '3.3.7'\\n\\n Tooltip.TRANSITION_DURATION = 150\\n\\n Tooltip.DEFAULTS = {\\n animation: true,\\n placement: 'top',\\n selector: false,\\n template: '<div class=\\\"tooltip\\\" role=\\\"tooltip\\\"><div class=\\\"tooltip-arrow\\\"></div><div class=\\\"tooltip-inner\\\"></div></div>',\\n trigger: 'hover focus',\\n title: '',\\n delay: 0,\\n html: false,\\n container: false,\\n viewport: {\\n selector: 'body',\\n padding: 0\\n }\\n }\\n\\n Tooltip.prototype.init = function (type, element, options) {\\n this.enabled = true\\n this.type = type\\n this.$element = $(element)\\n this.options = this.getOptions(options)\\n this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\\n this.inState = { click: false, hover: false, focus: false }\\n\\n if (this.$element[0] instanceof document.constructor && !this.options.selector) {\\n throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\\n }\\n\\n var triggers = this.options.trigger.split(' ')\\n\\n for (var i = triggers.length; i--;) {\\n var trigger = triggers[i]\\n\\n if (trigger == 'click') {\\n this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\\n } else if (trigger != 'manual') {\\n var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'\\n var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\\n\\n this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\\n this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\\n }\\n }\\n\\n this.options.selector ?\\n (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\\n this.fixTitle()\\n }\\n\\n Tooltip.prototype.getDefaults = function () {\\n return Tooltip.DEFAULTS\\n }\\n\\n Tooltip.prototype.getOptions = function (options) {\\n options = $.extend({}, this.getDefaults(), this.$element.data(), options)\\n\\n if (options.delay && typeof options.delay == 'number') {\\n options.delay = {\\n show: options.delay,\\n hide: options.delay\\n }\\n }\\n\\n return options\\n }\\n\\n Tooltip.prototype.getDelegateOptions = function () {\\n var options = {}\\n var defaults = this.getDefaults()\\n\\n this._options && $.each(this._options, function (key, value) {\\n if (defaults[key] != value) options[key] = value\\n })\\n\\n return options\\n }\\n\\n Tooltip.prototype.enter = function (obj) {\\n var self = obj instanceof this.constructor ?\\n obj : $(obj.currentTarget).data('bs.' + this.type)\\n\\n if (!self) {\\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\\n $(obj.currentTarget).data('bs.' + this.type, self)\\n }\\n\\n if (obj instanceof $.Event) {\\n self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\\n }\\n\\n if (self.tip().hasClass('in') || self.hoverState == 'in') {\\n self.hoverState = 'in'\\n return\\n }\\n\\n clearTimeout(self.timeout)\\n\\n self.hoverState = 'in'\\n\\n if (!self.options.delay || !self.options.delay.show) return self.show()\\n\\n self.timeout = setTimeout(function () {\\n if (self.hoverState == 'in') self.show()\\n }, self.options.delay.show)\\n }\\n\\n Tooltip.prototype.isInStateTrue = function () {\\n for (var key in this.inState) {\\n if (this.inState[key]) return true\\n }\\n\\n return false\\n }\\n\\n Tooltip.prototype.leave = function (obj) {\\n var self = obj instanceof this.constructor ?\\n obj : $(obj.currentTarget).data('bs.' + this.type)\\n\\n if (!self) {\\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\\n $(obj.currentTarget).data('bs.' + this.type, self)\\n }\\n\\n if (obj instanceof $.Event) {\\n self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\\n }\\n\\n if (self.isInStateTrue()) return\\n\\n clearTimeout(self.timeout)\\n\\n self.hoverState = 'out'\\n\\n if (!self.options.delay || !self.options.delay.hide) return self.hide()\\n\\n self.timeout = setTimeout(function () {\\n if (self.hoverState == 'out') self.hide()\\n }, self.options.delay.hide)\\n }\\n\\n Tooltip.prototype.show = function () {\\n var e = $.Event('show.bs.' + this.type)\\n\\n if (this.hasContent() && this.enabled) {\\n this.$element.trigger(e)\\n\\n var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\\n if (e.isDefaultPrevented() || !inDom) return\\n var that = this\\n\\n var $tip = this.tip()\\n\\n var tipId = this.getUID(this.type)\\n\\n this.setContent()\\n $tip.attr('id', tipId)\\n this.$element.attr('aria-describedby', tipId)\\n\\n if (this.options.animation) $tip.addClass('fade')\\n\\n var placement = typeof this.options.placement == 'function' ?\\n this.options.placement.call(this, $tip[0], this.$element[0]) :\\n this.options.placement\\n\\n var autoToken = /\\\\s?auto?\\\\s?/i\\n var autoPlace = autoToken.test(placement)\\n if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\\n\\n $tip\\n .detach()\\n .css({ top: 0, left: 0, display: 'block' })\\n .addClass(placement)\\n .data('bs.' + this.type, this)\\n\\n this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\\n this.$element.trigger('inserted.bs.' + this.type)\\n\\n var pos = this.getPosition()\\n var actualWidth = $tip[0].offsetWidth\\n var actualHeight = $tip[0].offsetHeight\\n\\n if (autoPlace) {\\n var orgPlacement = placement\\n var viewportDim = this.getPosition(this.$viewport)\\n\\n placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :\\n placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :\\n placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :\\n placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :\\n placement\\n\\n $tip\\n .removeClass(orgPlacement)\\n .addClass(placement)\\n }\\n\\n var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\\n\\n this.applyPlacement(calculatedOffset, placement)\\n\\n var complete = function () {\\n var prevHoverState = that.hoverState\\n that.$element.trigger('shown.bs.' + that.type)\\n that.hoverState = null\\n\\n if (prevHoverState == 'out') that.leave(that)\\n }\\n\\n $.support.transition && this.$tip.hasClass('fade') ?\\n $tip\\n .one('bsTransitionEnd', complete)\\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\\n complete()\\n }\\n }\\n\\n Tooltip.prototype.applyPlacement = function (offset, placement) {\\n var $tip = this.tip()\\n var width = $tip[0].offsetWidth\\n var height = $tip[0].offsetHeight\\n\\n // manually read margins because getBoundingClientRect includes difference\\n var marginTop = parseInt($tip.css('margin-top'), 10)\\n var marginLeft = parseInt($tip.css('margin-left'), 10)\\n\\n // we must check for NaN for ie 8/9\\n if (isNaN(marginTop)) marginTop = 0\\n if (isNaN(marginLeft)) marginLeft = 0\\n\\n offset.top += marginTop\\n offset.left += marginLeft\\n\\n // $.fn.offset doesn't round pixel values\\n // so we use setOffset directly with our own function B-0\\n $.offset.setOffset($tip[0], $.extend({\\n using: function (props) {\\n $tip.css({\\n top: Math.round(props.top),\\n left: Math.round(props.left)\\n })\\n }\\n }, offset), 0)\\n\\n $tip.addClass('in')\\n\\n // check to see if placing tip in new offset caused the tip to resize itself\\n var actualWidth = $tip[0].offsetWidth\\n var actualHeight = $tip[0].offsetHeight\\n\\n if (placement == 'top' && actualHeight != height) {\\n offset.top = offset.top + height - actualHeight\\n }\\n\\n var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\\n\\n if (delta.left) offset.left += delta.left\\n else offset.top += delta.top\\n\\n var isVertical = /top|bottom/.test(placement)\\n var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\\n var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\\n\\n $tip.offset(offset)\\n this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\\n }\\n\\n Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\\n this.arrow()\\n .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\\n .css(isVertical ? 'top' : 'left', '')\\n }\\n\\n Tooltip.prototype.setContent = function () {\\n var $tip = this.tip()\\n var title = this.getTitle()\\n\\n $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\\n $tip.removeClass('fade in top bottom left right')\\n }\\n\\n Tooltip.prototype.hide = function (callback) {\\n var that = this\\n var $tip = $(this.$tip)\\n var e = $.Event('hide.bs.' + this.type)\\n\\n function complete() {\\n if (that.hoverState != 'in') $tip.detach()\\n if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\\n that.$element\\n .removeAttr('aria-describedby')\\n .trigger('hidden.bs.' + that.type)\\n }\\n callback && callback()\\n }\\n\\n this.$element.trigger(e)\\n\\n if (e.isDefaultPrevented()) return\\n\\n $tip.removeClass('in')\\n\\n $.support.transition && $tip.hasClass('fade') ?\\n $tip\\n .one('bsTransitionEnd', complete)\\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\\n complete()\\n\\n this.hoverState = null\\n\\n return this\\n }\\n\\n Tooltip.prototype.fixTitle = function () {\\n var $e = this.$element\\n if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\\n $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\\n }\\n }\\n\\n Tooltip.prototype.hasContent = function () {\\n return this.getTitle()\\n }\\n\\n Tooltip.prototype.getPosition = function ($element) {\\n $element = $element || this.$element\\n\\n var el = $element[0]\\n var isBody = el.tagName == 'BODY'\\n\\n var elRect = el.getBoundingClientRect()\\n if (elRect.width == null) {\\n // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\\n elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\\n }\\n var isSvg = window.SVGElement && el instanceof window.SVGElement\\n // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\\n // See https://github.com/twbs/bootstrap/issues/20280\\n var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\\n var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\\n var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\\n\\n return $.extend({}, elRect, scroll, outerDims, elOffset)\\n }\\n\\n Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\\n return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :\\n placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\\n placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\\n /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\\n\\n }\\n\\n Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\\n var delta = { top: 0, left: 0 }\\n if (!this.$viewport) return delta\\n\\n var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\\n var viewportDimensions = this.getPosition(this.$viewport)\\n\\n if (/right|left/.test(placement)) {\\n var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll\\n var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\\n if (topEdgeOffset < viewportDimensions.top) { // top overflow\\n delta.top = viewportDimensions.top - topEdgeOffset\\n } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\\n delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\\n }\\n } else {\\n var leftEdgeOffset = pos.left - viewportPadding\\n var rightEdgeOffset = pos.left + viewportPadding + actualWidth\\n if (leftEdgeOffset < viewportDimensions.left) { // left overflow\\n delta.left = viewportDimensions.left - leftEdgeOffset\\n } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\\n delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\\n }\\n }\\n\\n return delta\\n }\\n\\n Tooltip.prototype.getTitle = function () {\\n var title\\n var $e = this.$element\\n var o = this.options\\n\\n title = $e.attr('data-original-title')\\n || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)\\n\\n return title\\n }\\n\\n Tooltip.prototype.getUID = function (prefix) {\\n do prefix += ~~(Math.random() * 1000000)\\n while (document.getElementById(prefix))\\n return prefix\\n }\\n\\n Tooltip.prototype.tip = function () {\\n if (!this.$tip) {\\n this.$tip = $(this.options.template)\\n if (this.$tip.length != 1) {\\n throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\\n }\\n }\\n return this.$tip\\n }\\n\\n Tooltip.prototype.arrow = function () {\\n return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\\n }\\n\\n Tooltip.prototype.enable = function () {\\n this.enabled = true\\n }\\n\\n Tooltip.prototype.disable = function () {\\n this.enabled = false\\n }\\n\\n Tooltip.prototype.toggleEnabled = function () {\\n this.enabled = !this.enabled\\n }\\n\\n Tooltip.prototype.toggle = function (e) {\\n var self = this\\n if (e) {\\n self = $(e.currentTarget).data('bs.' + this.type)\\n if (!self) {\\n self = new this.constructor(e.currentTarget, this.getDelegateOptions())\\n $(e.currentTarget).data('bs.' + this.type, self)\\n }\\n }\\n\\n if (e) {\\n self.inState.click = !self.inState.click\\n if (self.isInStateTrue()) self.enter(self)\\n else self.leave(self)\\n } else {\\n self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\\n }\\n }\\n\\n Tooltip.prototype.destroy = function () {\\n var that = this\\n clearTimeout(this.timeout)\\n this.hide(function () {\\n that.$element.off('.' + that.type).removeData('bs.' + that.type)\\n if (that.$tip) {\\n that.$tip.detach()\\n }\\n that.$tip = null\\n that.$arrow = null\\n that.$viewport = null\\n that.$element = null\\n })\\n }\\n\\n\\n // TOOLTIP PLUGIN DEFINITION\\n // =========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.tooltip')\\n var options = typeof option == 'object' && option\\n\\n if (!data && /destroy|hide/.test(option)) return\\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.tooltip\\n\\n $.fn.tooltip = Plugin\\n $.fn.tooltip.Constructor = Tooltip\\n\\n\\n // TOOLTIP NO CONFLICT\\n // ===================\\n\\n $.fn.tooltip.noConflict = function () {\\n $.fn.tooltip = old\\n return this\\n }\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: popover.js v3.3.7\\n * http://getbootstrap.com/javascript/#popovers\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // POPOVER PUBLIC CLASS DEFINITION\\n // ===============================\\n\\n var Popover = function (element, options) {\\n this.init('popover', element, options)\\n }\\n\\n if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\\n\\n Popover.VERSION = '3.3.7'\\n\\n Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\\n placement: 'right',\\n trigger: 'click',\\n content: '',\\n template: '<div class=\\\"popover\\\" role=\\\"tooltip\\\"><div class=\\\"arrow\\\"></div><h3 class=\\\"popover-title\\\"></h3><div class=\\\"popover-content\\\"></div></div>'\\n })\\n\\n\\n // NOTE: POPOVER EXTENDS tooltip.js\\n // ================================\\n\\n Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\\n\\n Popover.prototype.constructor = Popover\\n\\n Popover.prototype.getDefaults = function () {\\n return Popover.DEFAULTS\\n }\\n\\n Popover.prototype.setContent = function () {\\n var $tip = this.tip()\\n var title = this.getTitle()\\n var content = this.getContent()\\n\\n $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\\n $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\\n this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\\n ](content)\\n\\n $tip.removeClass('fade top bottom left right in')\\n\\n // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\\n // this manually by checking the contents.\\n if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\\n }\\n\\n Popover.prototype.hasContent = function () {\\n return this.getTitle() || this.getContent()\\n }\\n\\n Popover.prototype.getContent = function () {\\n var $e = this.$element\\n var o = this.options\\n\\n return $e.attr('data-content')\\n || (typeof o.content == 'function' ?\\n o.content.call($e[0]) :\\n o.content)\\n }\\n\\n Popover.prototype.arrow = function () {\\n return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\\n }\\n\\n\\n // POPOVER PLUGIN DEFINITION\\n // =========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.popover')\\n var options = typeof option == 'object' && option\\n\\n if (!data && /destroy|hide/.test(option)) return\\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.popover\\n\\n $.fn.popover = Plugin\\n $.fn.popover.Constructor = Popover\\n\\n\\n // POPOVER NO CONFLICT\\n // ===================\\n\\n $.fn.popover.noConflict = function () {\\n $.fn.popover = old\\n return this\\n }\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: scrollspy.js v3.3.7\\n * http://getbootstrap.com/javascript/#scrollspy\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // SCROLLSPY CLASS DEFINITION\\n // ==========================\\n\\n function ScrollSpy(element, options) {\\n this.$body = $(document.body)\\n this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\\n this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\\n this.selector = (this.options.target || '') + ' .nav li > a'\\n this.offsets = []\\n this.targets = []\\n this.activeTarget = null\\n this.scrollHeight = 0\\n\\n this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\\n this.refresh()\\n this.process()\\n }\\n\\n ScrollSpy.VERSION = '3.3.7'\\n\\n ScrollSpy.DEFAULTS = {\\n offset: 10\\n }\\n\\n ScrollSpy.prototype.getScrollHeight = function () {\\n return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\\n }\\n\\n ScrollSpy.prototype.refresh = function () {\\n var that = this\\n var offsetMethod = 'offset'\\n var offsetBase = 0\\n\\n this.offsets = []\\n this.targets = []\\n this.scrollHeight = this.getScrollHeight()\\n\\n if (!$.isWindow(this.$scrollElement[0])) {\\n offsetMethod = 'position'\\n offsetBase = this.$scrollElement.scrollTop()\\n }\\n\\n this.$body\\n .find(this.selector)\\n .map(function () {\\n var $el = $(this)\\n var href = $el.data('target') || $el.attr('href')\\n var $href = /^#./.test(href) && $(href)\\n\\n return ($href\\n && $href.length\\n && $href.is(':visible')\\n && [[$href[offsetMethod]().top + offsetBase, href]]) || null\\n })\\n .sort(function (a, b) { return a[0] - b[0] })\\n .each(function () {\\n that.offsets.push(this[0])\\n that.targets.push(this[1])\\n })\\n }\\n\\n ScrollSpy.prototype.process = function () {\\n var scrollTop = this.$scrollElement.scrollTop() + this.options.offset\\n var scrollHeight = this.getScrollHeight()\\n var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()\\n var offsets = this.offsets\\n var targets = this.targets\\n var activeTarget = this.activeTarget\\n var i\\n\\n if (this.scrollHeight != scrollHeight) {\\n this.refresh()\\n }\\n\\n if (scrollTop >= maxScroll) {\\n return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\\n }\\n\\n if (activeTarget && scrollTop < offsets[0]) {\\n this.activeTarget = null\\n return this.clear()\\n }\\n\\n for (i = offsets.length; i--;) {\\n activeTarget != targets[i]\\n && scrollTop >= offsets[i]\\n && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\\n && this.activate(targets[i])\\n }\\n }\\n\\n ScrollSpy.prototype.activate = function (target) {\\n this.activeTarget = target\\n\\n this.clear()\\n\\n var selector = this.selector +\\n '[data-target=\\\"' + target + '\\\"],' +\\n this.selector + '[href=\\\"' + target + '\\\"]'\\n\\n var active = $(selector)\\n .parents('li')\\n .addClass('active')\\n\\n if (active.parent('.dropdown-menu').length) {\\n active = active\\n .closest('li.dropdown')\\n .addClass('active')\\n }\\n\\n active.trigger('activate.bs.scrollspy')\\n }\\n\\n ScrollSpy.prototype.clear = function () {\\n $(this.selector)\\n .parentsUntil(this.options.target, '.active')\\n .removeClass('active')\\n }\\n\\n\\n // SCROLLSPY PLUGIN DEFINITION\\n // ===========================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.scrollspy')\\n var options = typeof option == 'object' && option\\n\\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.scrollspy\\n\\n $.fn.scrollspy = Plugin\\n $.fn.scrollspy.Constructor = ScrollSpy\\n\\n\\n // SCROLLSPY NO CONFLICT\\n // =====================\\n\\n $.fn.scrollspy.noConflict = function () {\\n $.fn.scrollspy = old\\n return this\\n }\\n\\n\\n // SCROLLSPY DATA-API\\n // ==================\\n\\n $(window).on('load.bs.scrollspy.data-api', function () {\\n $('[data-spy=\\\"scroll\\\"]').each(function () {\\n var $spy = $(this)\\n Plugin.call($spy, $spy.data())\\n })\\n })\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: tab.js v3.3.7\\n * http://getbootstrap.com/javascript/#tabs\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // TAB CLASS DEFINITION\\n // ====================\\n\\n var Tab = function (element) {\\n // jscs:disable requireDollarBeforejQueryAssignment\\n this.element = $(element)\\n // jscs:enable requireDollarBeforejQueryAssignment\\n }\\n\\n Tab.VERSION = '3.3.7'\\n\\n Tab.TRANSITION_DURATION = 150\\n\\n Tab.prototype.show = function () {\\n var $this = this.element\\n var $ul = $this.closest('ul:not(.dropdown-menu)')\\n var selector = $this.data('target')\\n\\n if (!selector) {\\n selector = $this.attr('href')\\n selector = selector && selector.replace(/.*(?=#[^\\\\s]*$)/, '') // strip for ie7\\n }\\n\\n if ($this.parent('li').hasClass('active')) return\\n\\n var $previous = $ul.find('.active:last a')\\n var hideEvent = $.Event('hide.bs.tab', {\\n relatedTarget: $this[0]\\n })\\n var showEvent = $.Event('show.bs.tab', {\\n relatedTarget: $previous[0]\\n })\\n\\n $previous.trigger(hideEvent)\\n $this.trigger(showEvent)\\n\\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\\n\\n var $target = $(selector)\\n\\n this.activate($this.closest('li'), $ul)\\n this.activate($target, $target.parent(), function () {\\n $previous.trigger({\\n type: 'hidden.bs.tab',\\n relatedTarget: $this[0]\\n })\\n $this.trigger({\\n type: 'shown.bs.tab',\\n relatedTarget: $previous[0]\\n })\\n })\\n }\\n\\n Tab.prototype.activate = function (element, container, callback) {\\n var $active = container.find('> .active')\\n var transition = callback\\n && $.support.transition\\n && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)\\n\\n function next() {\\n $active\\n .removeClass('active')\\n .find('> .dropdown-menu > .active')\\n .removeClass('active')\\n .end()\\n .find('[data-toggle=\\\"tab\\\"]')\\n .attr('aria-expanded', false)\\n\\n element\\n .addClass('active')\\n .find('[data-toggle=\\\"tab\\\"]')\\n .attr('aria-expanded', true)\\n\\n if (transition) {\\n element[0].offsetWidth // reflow for transition\\n element.addClass('in')\\n } else {\\n element.removeClass('fade')\\n }\\n\\n if (element.parent('.dropdown-menu').length) {\\n element\\n .closest('li.dropdown')\\n .addClass('active')\\n .end()\\n .find('[data-toggle=\\\"tab\\\"]')\\n .attr('aria-expanded', true)\\n }\\n\\n callback && callback()\\n }\\n\\n $active.length && transition ?\\n $active\\n .one('bsTransitionEnd', next)\\n .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\\n next()\\n\\n $active.removeClass('in')\\n }\\n\\n\\n // TAB PLUGIN DEFINITION\\n // =====================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.tab')\\n\\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.tab\\n\\n $.fn.tab = Plugin\\n $.fn.tab.Constructor = Tab\\n\\n\\n // TAB NO CONFLICT\\n // ===============\\n\\n $.fn.tab.noConflict = function () {\\n $.fn.tab = old\\n return this\\n }\\n\\n\\n // TAB DATA-API\\n // ============\\n\\n var clickHandler = function (e) {\\n e.preventDefault()\\n Plugin.call($(this), 'show')\\n }\\n\\n $(document)\\n .on('click.bs.tab.data-api', '[data-toggle=\\\"tab\\\"]', clickHandler)\\n .on('click.bs.tab.data-api', '[data-toggle=\\\"pill\\\"]', clickHandler)\\n\\n}(jQuery);\\n\\n/* ========================================================================\\n * Bootstrap: affix.js v3.3.7\\n * http://getbootstrap.com/javascript/#affix\\n * ========================================================================\\n * Copyright 2011-2016 Twitter, Inc.\\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\\n * ======================================================================== */\\n\\n\\n+function ($) {\\n 'use strict';\\n\\n // AFFIX CLASS DEFINITION\\n // ======================\\n\\n var Affix = function (element, options) {\\n this.options = $.extend({}, Affix.DEFAULTS, options)\\n\\n this.$target = $(this.options.target)\\n .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\\n .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))\\n\\n this.$element = $(element)\\n this.affixed = null\\n this.unpin = null\\n this.pinnedOffset = null\\n\\n this.checkPosition()\\n }\\n\\n Affix.VERSION = '3.3.7'\\n\\n Affix.RESET = 'affix affix-top affix-bottom'\\n\\n Affix.DEFAULTS = {\\n offset: 0,\\n target: window\\n }\\n\\n Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\\n var scrollTop = this.$target.scrollTop()\\n var position = this.$element.offset()\\n var targetHeight = this.$target.height()\\n\\n if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\\n\\n if (this.affixed == 'bottom') {\\n if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\\n return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\\n }\\n\\n var initializing = this.affixed == null\\n var colliderTop = initializing ? scrollTop : position.top\\n var colliderHeight = initializing ? targetHeight : height\\n\\n if (offsetTop != null && scrollTop <= offsetTop) return 'top'\\n if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\\n\\n return false\\n }\\n\\n Affix.prototype.getPinnedOffset = function () {\\n if (this.pinnedOffset) return this.pinnedOffset\\n this.$element.removeClass(Affix.RESET).addClass('affix')\\n var scrollTop = this.$target.scrollTop()\\n var position = this.$element.offset()\\n return (this.pinnedOffset = position.top - scrollTop)\\n }\\n\\n Affix.prototype.checkPositionWithEventLoop = function () {\\n setTimeout($.proxy(this.checkPosition, this), 1)\\n }\\n\\n Affix.prototype.checkPosition = function () {\\n if (!this.$element.is(':visible')) return\\n\\n var height = this.$element.height()\\n var offset = this.options.offset\\n var offsetTop = offset.top\\n var offsetBottom = offset.bottom\\n var scrollHeight = Math.max($(document).height(), $(document.body).height())\\n\\n if (typeof offset != 'object') offsetBottom = offsetTop = offset\\n if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)\\n if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\\n\\n var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\\n\\n if (this.affixed != affix) {\\n if (this.unpin != null) this.$element.css('top', '')\\n\\n var affixType = 'affix' + (affix ? '-' + affix : '')\\n var e = $.Event(affixType + '.bs.affix')\\n\\n this.$element.trigger(e)\\n\\n if (e.isDefaultPrevented()) return\\n\\n this.affixed = affix\\n this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\\n\\n this.$element\\n .removeClass(Affix.RESET)\\n .addClass(affixType)\\n .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\\n }\\n\\n if (affix == 'bottom') {\\n this.$element.offset({\\n top: scrollHeight - height - offsetBottom\\n })\\n }\\n }\\n\\n\\n // AFFIX PLUGIN DEFINITION\\n // =======================\\n\\n function Plugin(option) {\\n return this.each(function () {\\n var $this = $(this)\\n var data = $this.data('bs.affix')\\n var options = typeof option == 'object' && option\\n\\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\\n if (typeof option == 'string') data[option]()\\n })\\n }\\n\\n var old = $.fn.affix\\n\\n $.fn.affix = Plugin\\n $.fn.affix.Constructor = Affix\\n\\n\\n // AFFIX NO CONFLICT\\n // =================\\n\\n $.fn.affix.noConflict = function () {\\n $.fn.affix = old\\n return this\\n }\\n\\n\\n // AFFIX DATA-API\\n // ==============\\n\\n $(window).on('load', function () {\\n $('[data-spy=\\\"affix\\\"]').each(function () {\\n var $spy = $(this)\\n var data = $spy.data()\\n\\n data.offset = data.offset || {}\\n\\n if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\\n if (data.offsetTop != null) data.offset.top = data.offsetTop\\n\\n Plugin.call($spy, data)\\n })\\n })\\n\\n}(jQuery);\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L2Jvb3RzdHJhcC1zYXNzL2Fzc2V0cy9qYXZhc2NyaXB0cy9ib290c3RyYXAuanM/MThjZSJdLCJzb3VyY2Vz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blxufShqUXVlcnkpO1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIEJvb3RzdHJhcDogYWxlcnQuanMgdjMuMy43XG4gKiBodHRwOi8vZ2V0Ym9vdHN0cmFwLmNvbS9qYXZhc2NyaXB0LyNhbGVydHNcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQ29weXJpZ2h0IDIwMTEtMjAxNiBUd2l0dGVyLCBJbmMuXG4gKiBMaWNlbnNlZCB1bmRlciBNSVQgKGh0dHBzOi8vZ2l0aHViLmNvbS90d2JzL2Jvb3RzdHJhcC9ibG9iL21hc3Rlci9MSUNFTlNFKVxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXG5cblxuK2Z1bmN0aW9uICgkKSB7XG4gICd1c2Ugc3RyaWN0JztcblxuICAvLyBBTEVSVCBDTEFTUyBERUZJTklUSU9OXG4gIC8vID09PT09PT09PT09PT09PT09PT09PT1cblxuICB2YXIgZGlzbWlzcyA9ICdbZGF0YS1kaXNtaXNzPVwiYWxlcnRcIl0nXG4gIHZhciBBbGVydCAgID0gZnVuY3Rpb24gKGVsKSB7XG4gICAgJChlbCkub24oJ2NsaWNrJywgZGlzbWlzcywgdGhpcy5jbG9zZSlcbiAgfVxuXG4gIEFsZXJ0LlZFUlNJT04gPSAnMy4zLjcnXG5cbiAgQWxlcnQuVFJBTlNJVElPTl9EVVJBVElPTiA9IDE1MFxuXG4gIEFsZXJ0LnByb3RvdHlwZS5jbG9zZSA9IGZ1bmN0aW9uIChlKSB7XG4gICAgdmFyICR0aGlzICAgID0gJCh0aGlzKVxuICAgIHZhciBzZWxlY3RvciA9ICR0aGlzLmF0dHIoJ2RhdGEtdGFyZ2V0Jylcbl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AuY29tL2phdmFzY3JpcHQvI2J1dHRvbnNcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQ29weXJpZ2h0IDIwMTEtMjAxNiBUd2l0dGVyLCBJbmMuXG4gKiBMaWNlbnNlZCB1bmRlciBNSVQgKGh0dHBzOi8vZ2l0aHViLmNvbS90d2JzL2Jvb3RzdHJhcC9ibG9iL21hc3Rlci9MSUNFTlNFKVxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXG5cblxuK2Z1bmN0aW9uICgkKSB7XG4gICd1c2Ugc3RyaWN0JztcblxuICAvLyBCVVRUT04gUFVCTElDIENMQVNTIERFRklOSVRJT05cbiAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbiAgdmFyIEJ1dHRvbiA9IGZ1bmN0aW9uIChlbGVtZW50LCBvcHRpb25zKSB7XG4gICAgdGhpcy4kZWxlbWVudCAgPSAkKGVsZW1lbnQpXG4gICAgdGhpcy5vcHRpb25zICAgPSAkLmV4dGVuZCh7fSwgQnV0dG9uLkRFRkFVTFRTLCBvcHRpb25zKVxuICAgIHRoaXMuaXNMb2FkaW5nID0gZmFsc2VcbiAgfVxuXG4gIEJ1dHRvbi5WRVJTSU9OICA9ICczLjMuNydcblxuICBCdXR0b24uREVGQVVMVFMgPSB7XG4gICAgbG9hZGluZ1RleHQ6ICdsb2FkaW5nLi4uJ1xuICB9XG5cbiAgQnV0dG9uLnByb3RvdHlwZS5zZXRTdGF0ZSA9IGZ1bmN0aW9uIChzdGF0ZSkge1xuICAgIHZhciBkICAgID0gJ2Rpc2FibGVkJ1xuICAgIHZhciAkZWwgID0gdGhpcy4kZWxlbWVudFxuICAgIHZhciB2YWwgID0gJGVsLmlzKCdpbnB1dCcpID8gJ3ZhbCcgOiAnaHRtbCdcbiAgICB2Y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jdGlvbnMgKHNvIGNhbmNlbGxhdGlvbikgb24gY2hlY2tib3hlc1xuICAgICAgICBlLnByZXZlbnREZWZhdWx0KClcbiAgICAgICAgLy8gVGhlIHRhcmdldCBjb21wb25lbnQgc3RpbGwgcmVjZWl2ZSB0aGUgZm9jdXNcbiAgICAgICAgaWYgKCRidG4uaXMoJ2lucHV0LGJ1dHRvbicpKSAkYnRuLnRyaWdnZXIoJ2ZvY3VzJylcbiAgICAgICAgZWxzZSAkYnRuLmZpbmQoJ2lucHV0OnZpc2libGUsYnV0dG9uOnZpc2libGUnKS5maXJzdCgpLnRyaWdnZXIoJ2ZvY3VzJylcbiAgICAgIH1cbiAgICB9KVxuICAgIC5vbignZm9jdXMuYnMuYnV0dG9uLmRhdGEtYXBpIGJsdXIuYnMuYnV0dG9uLmRhdGEtYXBpJywgJ1tkYXRhLXRvZ2dsZV49XCJidXR0b25cIl0nLCBmdW5jdGlvbiAoZSkge1xuICAgICAgJChlLnRhcmdldCkuY2xvc2VzdCgnLmJ0bicpLnRvZ2dsZUNsYXNzKCdmb2N1cycsIC9eZm9jdXMoaW4pPyQvLnRlc3QoZS50eXBlKSlcbiAgICB9KVxuXG59KGpRdWVyeSk7XG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQm9vdHN0cmFwOiBjYXJvdXNlbC5qcyB2My4zLjdcbiAqIGh0dHA6Ly9nZXRib290c3RyYXAuY29tL2phdmFzY3JpcHQvI2Nhcm91c2VsXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvcHlyaWdodCAyMDExLTIwMTYgVHdpdHRlciwgSW5jLlxuICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqL1xuXG5cbitmdW5jdGlvbiAoJCkge1xuICAndXNlIHN0cmljdCc7XG5cbiAgLy8gQ0FST1VTRUwgQ0xBU1MgREVGSU5JVElPTlxuICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09XG5cbiAgdmFyIENhcm91c2VsID0gZnVuY3Rpb24gKGVsZW1lbnQsIG9wdGlvbnMpIHtcbiAgICB0aGlzLiRlbGVtZW50ICAgID0gJChlbGVtZW50KVxuICAgIHRoaXMuJGluZGljYXRvcnMgPSB0aGlzLiRlbGVtZW50LmZpbmQoJy5jYXJvdXNlbC1pbmRpY2F0b3JzJylcbiAgICB0aGlzLm9wdGlvbnMgICAgID0gb3B0aW9uc1xuICAgIHRoaXMucGF1c2VkICAgICAgPSBudWxsXG4gICAgdGhpcy5zbGlkaW5nICAgICA9IG51bGxcbiAgICB0aGlzLmludGVydmFsICAgID0gbnVsbFxuICAgIHRoaXMuJGFjdGl2ZSAgICAgPSBudWxsXG4gICAgdGhpcy4kaXRlbXMgICAgICA9IG51bGxcblxuICAgIHRoaXMub3B0aW9ucy5rZXlib2FyZCAmJiB0aGlzLiRlbGVtZW50Lm9uKCdrZXlkb3duLmJzLmNhcm91c2VsJywgJC5wcm94eSh0aGlzLmtleWRvd24sIHRoaXMpKVxuXG4gICAgdGhpcy5vcHRpb25zLnBhdXNlID09ICdob3ZlcicgJiYgISgnb250b3VjaHN0YXJ0JyBpbiBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQpICYmIHRoaXMuJGVsZW1lbnRcbiAgICAgIC5vbignbW91c2VlbnRlci5icy5jYXJvdXNlbCcsICQucHJveHkodGhpcy5wYXVzZSwgdGhpcykpXG4gICAgICAub24oJ21vdXNlbGVhdmUuYnMuY2Fyb3VzZWwnLCAkLnByb3h5KHRoaXMuY3ljbGUsIHRoaXMpKVxuICB9X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4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi9cblxuLyoganNoaW50IGxhdGVkZWY6IGZhbHNlICovXG5cbitmdW5jdGlvbiAoJCkge1xuICAndXNlIHN0cmljdCc7XG5cbiAgLy8gQ09MTEFQU0UgUFVCTElDIENMQVNTIERFRklOSVRJT05cbiAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuICB2YXIgQ29sbGFwc2UgPSBmdW5jdGlvbiAoZWxlbWVudCwgb3B0aW9ucykge1xuICAgIHRoaXMuJGVsZW1lbnQgICAgICA9ICQoZWxlbWVudClcbiAgICB0aGlzLm9wdGlvbnMgICAgICAgPSAkLmV4dGVuZCh7fSwgQ29sbGFwc2UuREVGQVVMVFMsIG9wdGlvbnMpXG4gICAgdGhpcy4kdHJpZ2dlciAgICAgID0gJCgnW2RhdGEtdG9nZ2xlPVwiY29sbGFwc2VcIl1baHJlZj1cIiMnICsgZWxlbWVudC5pZCArICdcIl0sJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAnW2RhdGEtdG9nZ2xlPVwiY29sbGFwc2VcIl1bZGF0YS10YXJnZXQ9XCIjJyArIGVsZW1lbnQuaWQgKyAnXCJdJylcbiAgICB0aGlzLnRyYW5zaXRpb25pbmcgPSBudWxsXG5cbiAgICBpZiAodGhpcy5vcHRpb25zLnBhcmVudCkge1xuICAgICAgdGhpcy4kcGFyZW50ID0gdGhpcy5nZXRQYXJlbnQoKVxuICAgIH0gZWxzZSB7XG4gICAgICB0aGlzLmFkZEFyaWFBbmRDb2xsYXBzZWRDbGFzcyh0aGlzLiRlbGVtZW50LCB0aGlzLiR0cmlnZ2VyKVxuICAgIH1cblxuICAgIGlmICh0aGlzLm9wdGlvbnMudG9nZ2xlKSB0aGlzLnRvZ2dsZSgpXG4gIH1cblxuICBDb2xsYXBzZS5WRVJTSU9OICA9ICczLjMuNydcblxuICBDb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nKVxuICAgIHZhciBvcHRpb24gID0gZGF0YSA/ICd0b2dnbGUnIDogJHRoaXMuZGF0YSgpXG5cbiAgICBQbHVnaW4uY2FsbCgkdGFyZ2V0LCBvcHRpb24pXG4gIH0pXG5cbn0oalF1ZXJ5KTtcblxuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gKiBCb290c3RyYXA6IGRyb3Bkb3duLmpzIHYzLjMuN1xuICogaHR0cDovL2dldGJvb3RzdHJhcC5jb20vamF2YXNjcmlwdC8jZHJvcGRvd25zXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvcHlyaWdodCAyMDExLTIwMTYgVHdpdHRlciwgSW5jLlxuICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqL1xuXG5cbitmdW5jdGlvbiAoJCkge1xuICAndXNlIHN0cmljdCc7XG5cbiAgLy8gRFJPUERPV04gQ0xBU1MgREVGSU5JVElPTlxuICAvLyA9PT09PT09PT09PT09PT09PT09PT09PT09XG5cbiAgdmFyIGJhY2tkcm9wID0gJy5kcm9wZG93bi1iYWNrZHJvcCdcbiAgdmFyIHRvZ2dsZSAgID0gJ1tkYXRhLXRvZ2dsZT1cImRyb3Bkb3duXCJdJ1xuICB2YXIgRHJvcGRvd24gPSBmdW5jdGlvbiAoZWxlbWVudCkge1xuICAgICQoZWxlbWVudCkub24oJ2NsaWNrLmJzLmRyb3Bkb3duJywgdGhpcy50b2dnbGUpXG4gIH1cblxuICBEcm9wZG93bi5WRVJTSU9OID0gJzMuMy43J1xuX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VlcnkpO1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIEJvb3RzdHJhcDogbW9kYWwuanMgdjMuMy43XG4gKiBodHRwOi8vZ2V0Ym9vdHN0cmFwLmNvbS9qYXZhc2NyaXB0LyNtb2RhbHNcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQ29weXJpZ2h0IDIwMTEtMjAxNiBUd2l0dGVyLCBJbmMuXG4gKiBMaWNlbnNlZCB1bmRlciBNSVQgKGh0dHBzOi8vZ2l0aHViLmNvbS90d2JzL2Jvb3RzdHJhcC9ibG9iL21hc3Rlci9MSUNFTlNFKVxuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovXG5cblxuK2Z1bmN0aW9uICgkKSB7XG4gICd1c2Ugc3RyaWN0JztcblxuICAvLyBNT0RBTCBDTEFTUyBERUZJTklUSU9OXG4gIC8vID09PT09PT09PT09PT09PT09PT09PT1cblxuICB2YXIgTW9kYWwgPSBmdW5jdGlvbiAoZWxlbWVudCwgb3B0aW9ucykge1xuICAgIHRoaXMub3B0aW9ucyAgICAgICAgICAgICA9IG9wdGlvbnNcbiAgICB0aGlzLiRib2R5ICAgICAgICAgICAgICAgPSAkKGRvY3VtZW50LmJvZHkpXG4gICAgdGhpcy4kZWxlbWVudCAgICAgICAgICAgID0gJChlbGVtZW50KVxuICAgIHRoaXMuJGRpYWxvZyAgICAgICAgICAgICA9IHRoaXMuJGVsZW1lbnQuZmluZCgnLm1vZGFsLWRpYWxvZycpXG4gICAgdGhpcy4kYmFja2Ryb3AgICAgICAgICAgID0gbnVsbFxuICAgIHRoaXMuaXNTaG93biAgICAgICAgICAgICA9IG51bGxcbiAgICB0aGlzLm9yaWdpbmFs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gJHRhcmdldC5kYXRhKCksICR0aGlzLmRhdGEoKSlcblxuICAgIGlmICgkdGhpcy5pcygnYScpKSBlLnByZXZlbnREZWZhdWx0KClcblxuICAgICR0YXJnZXQub25lKCdzaG93LmJzLm1vZGFsJywgZnVuY3Rpb24gKHNob3dFdmVudCkge1xuICAgICAgaWYgKHNob3dFdmVudC5pc0RlZmF1bHRQcmV2ZW50ZWQoKSkgcmV0dXJuIC8vIG9ubHkgcmVnaXN0ZXIgZm9jdXMgcmVzdG9yZXIgaWYgbW9kYWwgd2lsbCBhY3R1YWxseSBnZXQgc2hvd25cbiAgICAgICR0YXJnZXQub25lKCdoaWRkZW4uYnMubW9kYWwnLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICR0aGlzLmlzKCc6dmlzaWJsZScpICYmICR0aGlzLnRyaWdnZXIoJ2ZvY3VzJylcbiAgICAgIH0pXG4gICAgfSlcbiAgICBQbHVnaW4uY2FsbCgkdGFyZ2V0LCBvcHRpb24sIHRoaXMpXG4gIH0pXG5cbn0oalF1ZXJ5KTtcblxuLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gKiBCb290c3RyYXA6IHRvb2x0aXAuanMgdjMuMy43XG4gKiBodHRwOi8vZ2V0Ym9vdHN0cmFwLmNvbS9qYXZhc2NyaXB0LyN0b29sdGlwXG4gKiBJbnNwaXJlZCBieSB0aGUgb3JpZ2luYWwgalF1ZXJ5LnRpcHN5IGJ5IEphc29uIEZyYW1lXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvcHlyaWdodCAyMDExLTIwMTYgVHdpdHRlciwgSW5jLlxuICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlc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mIG9wdGlvblxuXG4gICAgICBpZiAoIWRhdGEgJiYgL2Rlc3Ryb3l8aGlkZS8udGVzdChvcHRpb24pKSByZXR1cm5cbiAgICAgIGlmICghZGF0YSkgJHRoaXMuZGF0YSgnYnMudG9vbHRpcCcsIChkYXRhID0gbmV3IFRvb2x0aXAodGhpcywgb3B0aW9ucykpKVxuICAgICAgaWYgKHR5cGVvZiBvcHRpb24gPT0gJ3N0cmluZycpIGRhdGFbb3B0aW9uXSgpXG4gICAgfSlcbiAgfVxuXG4gIHZhciBvbGQgPSAkLmZuLnRvb2x0aXBcblxuICAkLmZuLnRvb2x0aXAgICAgICAgICAgICAgPSBQbHVnaW5cbiAgJC5mbi50b29sdGlwLkNvbnN0cnVjdG9yID0gVG9vbHRpcFxuXG5cbiAgLy8gVE9PTFRJUCBOTyBDT05GTElDVFxuICAvLyA9PT09PT09PT09PT09PT09PT09XG5cbiAgJC5mbi50b29sdGlwLm5vQ29uZmxpY3QgPSBmdW5jdGlvbiAoKSB7XG4gICAgJC5mbi50b29sdGlwID0gb2xkXG4gICAgcmV0dXJuIHRoaXNcbiAgfVxuXG59KGpRdWVyeSk7XG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQm9vdHN0cmFwOiBwb3BvdmVyLmpzIHYzLjMuN1xuICogaHR0cDovL2dldGJvb3RzdHJhcC5jb20vamF2YXNjcmlwdC8jcG9wb3ZlcnNcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQ29weXJpZ2h0IDIwMTEtMjAxNiBUd2l0dGVyLCBJbmMuXG4gKiBMaWNlbnNlZCB1bmRlciBNSVQgKGh0dHBzOi8vZ2l0aHViLmNvbS90d2JzL2Jvb3RzdHJhcC9ibG9iL21hc3Rlci9MSUNFTlNFKVxuICogPT09PT09PT09PT09PT09P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ob3B0aW9uKSkgcmV0dXJuXG4gICAgICBpZiAoIWRhdGEpICR0aGlzLmRhdGEoJ2JzLnBvcG92ZXInLCAoZGF0YSA9IG5ldyBQb3BvdmVyKHRoaXMsIG9wdGlvbnMpKSlcbiAgICAgIGlmICh0eXBlb2Ygb3B0aW9uID09ICdzdHJpbmcnKSBkYXRhW29wdGlvbl0oKVxuICAgIH0pXG4gIH1cblxuICB2YXIgb2xkID0gJC5mbi5wb3BvdmVyXG5cbiAgJC5mbi5wb3BvdmVyICAgICAgICAgICAgID0gUGx1Z2luXG4gICQuZm4ucG9wb3Zlci5Db25zdHJ1Y3RvciA9IFBvcG92ZXJcblxuXG4gIC8vIFBPUE9WRVIgTk8gQ09ORkxJQ1RcbiAgLy8gPT09PT09PT09PT09PT09PT09PVxuXG4gICQuZm4ucG9wb3Zlci5ub0NvbmZsaWN0ID0gZnVuY3Rpb24gKCkge1xuICAgICQuZm4ucG9wb3ZlciA9IG9sZFxuICAgIHJldHVybiB0aGlzXG4gIH1cblxufShqUXVlcnkpO1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIEJvb3RzdHJhcDogc2Nyb2xsc3B5LmpzIHYzLjMuN1xuICogaHR0cDovL2dldGJvb3RzdHJhcC5jb20vamF2YXNjcmlwdC8jc2Nyb2xsc3B5XG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvcHlyaWdodCAyMDExLTIwMTYgVHdpdHRlciwgSW5jLlxuICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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gICQuZm4uc2Nyb2xsc3B5Lm5vQ29uZmxpY3QgPSBmdW5jdGlvbiAoKSB7XG4gICAgJC5mbi5zY3JvbGxzcHkgPSBvbGRcbiAgICByZXR1cm4gdGhpc1xuICB9XG5cblxuICAvLyBTQ1JPTExTUFkgREFUQS1BUElcbiAgLy8gPT09PT09PT09PT09PT09PT09XG5cbiAgJCh3aW5kb3cpLm9uKCdsb2FkLmJzLnNjcm9sbHNweS5kYXRhLWFwaScsIGZ1bmN0aW9uICgpIHtcbiAgICAkKCdbZGF0YS1zcHk9XCJzY3JvbGxcIl0nKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgIHZhciAkc3B5ID0gJCh0aGlzKVxuICAgICAgUGx1Z2luLmNhbGwoJHNweSwgJHNweS5kYXRhKCkpXG4gICAgfSlcbiAgfSlcblxufShqUXVlcnkpO1xuXG4vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIEJvb3RzdHJhcDogdGFiLmpzIHYzLjMuN1xuICogaHR0cDovL2dldGJvb3RzdHJhcC5jb20vamF2YXNjcmlwdC8jdGFic1xuICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4gKiBDb3B5cmlnaHQgMjAxMS0yMDE2IFR3aXR0ZXIsIEluYy5cbiAqIExpY2Vuc2VkIHVuZGVyIE1JVCAoaHR0cHM6Ly9naXRodWIuY29tL3R3YnMvYm9vdHN0cmFwL2Jsb2IvbWFzdGVyL0xJQ0VOU0UpXG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi9cblxuXG4rZnVuY3Rpb24gKCQpIHtcbiAgJ3VzZSBzdHJpY3QnO1xuXG4gIC8vIFRBQiBDTEFTUyBERUZJTklUSU9OXG4gIC8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LnByZXZlbnREZWZhdWx0KClcbiAgICBQbHVnaW4uY2FsbCgkKHRoaXMpLCAnc2hvdycpXG4gIH1cblxuICAkKGRvY3VtZW50KVxuICAgIC5vbignY2xpY2suYnMudGFiLmRhdGEtYXBpJywgJ1tkYXRhLXRvZ2dsZT1cInRhYlwiXScsIGNsaWNrSGFuZGxlcilcbiAgICAub24oJ2NsaWNrLmJzLnRhYi5kYXRhLWFwaScsICdbZGF0YS10b2dnbGU9XCJwaWxsXCJdJywgY2xpY2tIYW5kbGVyKVxuXG59KGpRdWVyeSk7XG5cbi8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuICogQm9vdHN0cmFwOiBhZmZpeC5qcyB2My4zLjdcbiAqIGh0dHA6Ly9nZXRib290c3RyYXAuY29tL2phdmFzY3JpcHQvI2FmZml4XG4gKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiAqIENvcHlyaWdodCAyMDExLTIwMTYgVHdpdHRlciwgSW5jLlxuICogTGljZW5zZWQgdW5kZXIgTUlUIChodHRwczovL2dpdGh1Yi5jb20vdHdicy9ib290c3RyYXAvYmxvYi9tYXN0ZXIvTElDRU5TRSlcbiAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqL1xuXG5cbitmdW5jdGlvbiAoJCkge1xuICAndXNlIHN0cmljdCc7XG5cbiAgLy8gQUZGSVggQ0xBU1MgREVGSU5JVElPTlxuICAvLyA9PT09PT09PT09PT09PT09PT09PT09XG5cbiAgdmFyIEFmZml4ID0gZnVuY3Rpb24gKGVsZW1lbnQsIG9wdGlvbnMpIHtcbiAgICB0aGlzLm9wdGlvbnMgPSAkLmV4dGVuZCh7fSwgQWZmaXguREVGQVVMVFMsIG9wdGlvbnMpXG5c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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n props: ['alertType', 'title'],\\n\\n computed: {\\n alertClassName: function alertClassName() {\\n return 'alert-' + this.alertType;\\n }\\n },\\n\\n methods: {\\n hideEvent: function hideEvent() {\\n this.$emit('hide');\\n }\\n }\\n};\\n\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2FsZXJ0LnZ1ZT9iZjQ4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cblxuZXhwb3J0IGRlZmF1bHQge1xuICAgIC8qXG4gICAgICogVGhlIGNvbXBvbmVudCdzIGRhdGEuXG4gICAgICovXG4gICAgcHJvcHM6IFsnYWxlcnRUeXBlJywgJ3RpdGxlJ10sXG5cbiAgICBjb21wdXRlZDoge1xuICAgICAgICBhbGVydENsYXNzTmFtZSgpIHtcbiAgICAgICAgICAgIHJldHVybiAnYWxlcnQtJyArIHRoaXMuYWxlcnRUeXBlO1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIG1ldGhvZHM6IHtcbiAgICAgICAgaGlkZUV2ZW50KCkge1xuICAgICAgICAgICAgdGhpcy4kZW1pdCgnaGlkZScpO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2FsZXJ0LnZ1ZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7QUFnQkE7Ozs7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n props: ['errors'],\\n};\\n\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2ltcG9ydGVyL2ltcG9ydGVyLWVycm9ycy52dWU/NGQwNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgICAvKlxuICAgICAqIFRoZSBjb21wb25lbnQncyBkYXRhLlxuICAgICAqL1xuICAgICBwcm9wczogWydlcnJvcnMnXSxcbn1cblxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHJlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9pbXBvcnRlci9pbXBvcnRlci1lcnJvcnMudnVlIl0sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQWtDQTs7OztBQUlBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n__webpack_require__(10);\\nvar modal = __webpack_require__(50).modal\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n data: function data() {\\n return {\\n files: [],\\n displayImportModal: false,\\n activeFile: null,\\n alert: {\\n type: null,\\n message: null,\\n visible: false,\\n },\\n modal: {\\n importType: 'asset',\\n update: false,\\n importTypes: [\\n { id: 'asset', text: 'Assets' },\\n { id: 'accessory', text: 'Accessories' },\\n { id: 'consumable', text: 'Consumable' },\\n { id: 'component', text: 'Components' },\\n { id: 'license', text: 'Licenses' }\\n ],\\n statusText: null,\\n },\\n importErrors: null,\\n progress: {\\n currentClass: \\\"progress-bar-warning\\\",\\n currentPercent: \\\"0\\\",\\n statusText: '',\\n visible: false\\n }\\n };\\n },\\n\\n /**\\n * Prepare the component (Vue 2.x).\\n */\\n mounted: function mounted() {\\n this.fetchFiles();\\n var vm = this;\\n $('#fileupload').fileupload({\\n dataType: 'json',\\n done: function done(e, data) {\\n vm.progress.currentClass=\\\"progress-bar-success\\\";\\n vm.progress.statusText = \\\"Success!\\\";\\n vm.files = data.result.files.concat(vm.files);\\n },\\n add: function add(e, data) {\\n data.headers = {\\n \\\"X-Requested-With\\\": 'XMLHttpRequest',\\n \\\"X-CSRF-TOKEN\\\": Laravel.csrfToken\\n };\\n data.process().done( function () {data.submit();});\\n vm.progress.visible=true;\\n },\\n progress: function progress(e, data) {\\n var progress = parseInt((data.loaded / data.total * 100, 10));\\n vm.progress.currentPercent = progress;\\n vm.progress.statusText = progress+'% Complete';\\n },\\n fail: function fail(e, data) {\\n vm.progress.currentClass = \\\"progress-bar-danger\\\";\\n // Display any errors returned from the $.ajax()\\n vm.progress.statusText = data.jqXHR.responseJSON.messages;\\n }\\n })\\n },\\n\\n methods: {\\n fetchFiles: function fetchFiles() {\\n var this$1 = this;\\n\\n this.$http.get('/api/v1/imports')\\n .then( function (ref) {\\n var data = ref.data;\\n\\n return this$1.files = data;\\n }, // Success\\n //Fail\\n function (response) {\\n this$1.alert.type=\\\"danger\\\";\\n this$1.alert.visible=true;\\n this$1.alert.message=\\\"Something went wrong fetching files...\\\";\\n });\\n },\\n deleteFile: function deleteFile(file, key) {\\n var this$1 = this;\\n\\n this.$http.delete(\\\"/api/v1/imports/\\\"+file.id)\\n .then(function (response) { return this$1.files.splice(key, 1); }, // Success\\n function (response) {// Fail\\n this$1.alert.type=\\\"danger\\\";\\n this$1.alert.visible=true;\\n this$1.alert.message=response.body.messages;\\n }\\n );\\n },\\n showModal: function showModal(file) {\\n this.activeFile = file;\\n this.displayImportModal = true;\\n },\\n\\n postSave: function postSave() {\\n var this$1 = this;\\n\\n this.modal.statusText = \\\"Processing...\\\";\\n this.$http.post('/api/v1/imports/process/'+this.activeFile.id, {\\n 'import-update': this.modal.update,\\n 'import-type': this.modal.importType\\n }).then( function (response) {\\n // Success\\n this$1.modal.statusText = \\\"Success... Redirecting.\\\";\\n window.location.href = response.body.messages.redirect_url;\\n }, function (response) {\\n // Failure\\n if(response.body.status == 'import-errors') {\\n this$1.importErrors = response.body.messages;\\n } else {\\n this$1.alert.message= response.body.messages;\\n this$1.alert.type=\\\"danger\\\";\\n this$1.alert.visible=true;\\n }\\n this$1.displayImportModal=false;\\n });\\n }\\n\\n },\\n\\n computed: {\\n progressWidth: function progressWidth() {\\n return \\\"width: \\\"+this.progress.currentPercent*10+'%';\\n }\\n },\\n\\n components: {\\n modal: modal,\\n errors: __webpack_require__(32),\\n alert: __webpack_require__(31),\\n select2: __webpack_require__(33)\\n }\\n};\\n\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2ltcG9ydGVyL2ltcG9ydGVyLnZ1ZT9mYWYwIl0sInNvdXJjZXNDb250ZW50IjpbIi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG5cbnJlcXVpcmUoJ2JsdWVpbXAtZmlsZS11cGxvYWQnKTtcbnZhciBtb2RhbCA9IHJlcXVpcmUoJ3Z1ZS1zdHJhcCcpLm1vZGFsXG5leHBvcnQgZGVmYXVsdCB7XG4gICAgLypcbiAgICAgKiBUaGUgY29tcG9uZW50J3MgZGF0YS5cbiAgICAgKi9cbiAgICBkYXRhKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZmlsZXM6IFtdLFxuICAgICAgICAgICAgZGlzcGxheUltcG9ydE1vZGFsOiBmYWxzZSxcbiAgICAgICAgICAgIGFjdGl2ZUZpbGU6IG51bGwsXG4gICAgICAgICAgICBhbGVydDoge1xuICAgICAgICAgICAgICAgIHR5cGU6IG51bGwsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogbnVsbCxcbiAgICAgICAgICAgICAgICB2aXNpYmxlOiBmYWxzZSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBtb2RhbDoge1xuICAgICAgICAgICAgICAgIGltcG9ydFR5cGU6ICdhc3NldCcsXG4gICAgICAgICAgICAgICAgdXBkYXRlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBpbXBvcnRUeXBlczogW1xuICAgICAgICAgICAgICAgICAgICB7IGlkOiAnYXNzZXQnLCB0ZXh0OiAnQXNzZXRzJyB9LFxuICAgICAgICAgICAgICAgICAgICB7IGlkOiAnYWNjZXNzb3J5JywgdGV4dDogJ0FjY2Vzc29yaWVzJyB9LFxuICAgICAgICAgICAgICAgICAgICB7IGlkOiAnY29uc3VtYWJsZScsIHRleHQ6ICdDb25zdW1hYmxlJyB9LFxuICAgICAgICAgICAgICAgICAgICB7IGlkOiAnY29tcG9uZW50JywgdGV4dDogJ0NvbXBvbmVudHMnIH0sXG4gICAgICAgICAgICAgICAgICAgIHsgaWQ6ICdsaWNlbnNlJywgdGV4dDogJ0xpY2Vuc2VzJyB9XG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiBudWxsLFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGltcG9ydEVycm9yczogbnVsbCxcbiAgICAgICAgICAgIHByb2dyZXNzOiB7XG4gICAgICAgICAgICAgICAgY3VycmVudENsYXNzOiBcInByb2dyZXNzLWJhci13YXJuaW5nXCIsXG4gICAgICAgICAgICAgICAgY3VycmVudFBlcmNlbnQ6IFwiMFwiLFxuICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6ICcnLFxuICAgICAgICAgICAgICAgIHZpc2libGU6IGZhbHNlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfSxcblxuICAgIC8qKlxuICAgICAqIFByZXBhcmUgdGhlIGNvbXBvbmVudCAoVnVlIDIueCkuXG4gICAgICovXG4gICAgbW91bnRlZCgpIHtcbiAgICAgICAgdGhpcy5mZXRjaEZpbGVzKCk7XG4gICAgICAgIGxldCB2bSA9IHRoaXM7XG4gICAgICAgICQoJyNmaWxldXBsb2FkJykuZmlsZXVwbG9hZCh7XG4gICAgICAgICAgICBkYXRhVHlwZTogJ2pzb24nLFxuICAgICAgICAgICAgZG9uZShlLCBkYXRhKSB7XG4gICAgICAgICAgICAgICAgdm0ucHJvZ3Jlc3MuY3VycmVudENsYXNzPVwicHJvZ3Jlc3MtYmFyLXN1Y2Nlc3NcIjtcbiAgICAgICAgICAgICAgICB2bS5wcm9ncmVzcy5zdGF0dXNUZXh0ID0gXCJTdWNjZXNzIVwiO1xuICAgICAgICAgICAgICAgIHZtLmZpbGVzID0gZGF0YS5yZXN1bHQuZmlsZXMuY29uY2F0KHZtLmZpbGVzKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhZGQoZSwgZGF0YSkge1xuICAgICAgICAgICAgICAgIGRhdGEuaGVhZGVycyA9IHtcbiAgICAgICAgICAgICAgICAgICAgXCJYLVJlcXVlc3RlZC1XaXRoXCI6ICdYTUxIdHRwUmVxdWVzdCcsXG4gICAgICAgICAgICAgICAgICAgIFwiWC1DU1JGLVRPS0VOXCI6IExhcmF2ZWwuY3NyZlRva2VuXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBkYXRhLnByb2Nlc3MoKS5kb25lKCAoKSA9PiB7ZGF0YS5zdWJtaXQoKTt9KTtcbiAgICAgICAgICAgICAgICB2bS5wcm9ncmVzcy52aXNpYmxlPXRydWU7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcHJvZ3Jlc3MoZSwgZGF0YSkge1xuICAgICAgICAgICAgICAgIHZhciBwcm9ncmVzcyA9IHBhcnNlSW50KChkYXRhLmxvYWRlZCAvIGRhdGEudG90YWwgKiAxMDAsIDEwKSk7XG4gICAgICAgICAgICAgICAgdm0ucHJvZ3Jlc3MuY3VycmVudFBlcmNlbnQgPSBwcm9ncmVzcztcbiAgICAgICAgICAgICAgICB2bS5wcm9ncmVzcy5zdGF0dXNUZXh0ID0gcHJvZ3Jlc3MrJyUgQ29tcGxldGUnO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZhaWwoZSwgZGF0YSkge1xuICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLmN1cnJlbnRDbGFzcyA9IFwicHJvZ3Jlc3MtYmFyLWRhbmdlclwiO1xuICAgICAgICAgICAgICAgIC8vIERpc3BsYXkgYW55IGVycm9ycyByZXR1cm5lZCBmcm9tIHRoZSAkLmFqYXgoKVxuICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLnN0YXR1c1RleHQgPSBkYXRhLmpxWEhSLnJlc3BvbnNlSlNPTi5tZXNzYWdlcztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICB9LFxuXG4gICAgbWV0aG9kczoge1xuICAgICAgICBmZXRjaEZpbGVzKCkge1xuICAgICAgICAgICAgdGhpcy4kaHR0cC5nZXQoJy9hcGkvdjEvaW1wb3J0cycpXG4gICAgICAgICAgICAudGhlbiggKHtkYXRhfSkgPT4gdGhpcy5maWxlcyA9IGRhdGEsIC8vIFN1Y2Nlc3NcbiAgICAgICAgICAgICAgICAvL0ZhaWxcbiAgICAgICAgICAgIChyZXNwb25zZSkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQudHlwZT1cImRhbmdlclwiO1xuICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQudmlzaWJsZT10cnVlO1xuICAgICAgICAgICAgICAgIHRoaXMuYWxlc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ICdpbXBvcnQtdHlwZSc6IHRoaXMubW9kYWwuaW1wb3J0VHlwZVxuICAgICAgICAgICAgfSkudGhlbiggKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgLy8gU3VjY2Vzc1xuICAgICAgICAgICAgICAgIHRoaXMubW9kYWwuc3RhdHVzVGV4dCA9IFwiU3VjY2Vzcy4uLiBSZWRpcmVjdGluZy5cIjtcbiAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IHJlc3BvbnNlLmJvZHkubWVzc2FnZXMucmVkaXJlY3RfdXJsO1xuICAgICAgICAgICAgfSwgKHJlc3BvbnNlKSA9PiB7XG4gICAgICAgICAgICAgICAgLy8gRmFpbHVyZVxuICAgICAgICAgICAgICAgIGlmKHJlc3BvbnNlLmJvZHkuc3RhdHVzID09ICdpbXBvcnQtZXJyb3JzJykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmltcG9ydEVycm9ycyA9IHJlc3BvbnNlLmJvZHkubWVzc2FnZXM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5tZXNzYWdlPSByZXNwb25zZS5ib2R5Lm1lc3NhZ2VzO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0LnR5cGU9XCJkYW5nZXJcIjtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC52aXNpYmxlPXRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuZGlzcGxheUltcG9ydE1vZGFsPWZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgIH0sXG5cbiAgICBjb21wdXRlZDoge1xuICAgICAgICBwcm9ncmVzc1dpZHRoKCkge1xuICAgICAgICAgICAgcmV0dXJuIFwid2lkdGg6IFwiK3RoaXMucHJvZ3Jlc3MuY3VycmVudFBlcmNlbnQqMTArJyUnO1xuICAgICAgICB9XG4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UFBO0FBQUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n data: function data() {\\n return {\\n tokens: []\\n };\\n },\\n\\n /**\\n * Prepare the component (Vue 1.x).\\n */\\n ready: function ready() {\\n this.prepareComponent();\\n },\\n\\n /**\\n * Prepare the component (Vue 2.x).\\n */\\n mounted: function mounted() {\\n this.prepareComponent();\\n },\\n\\n methods: {\\n /**\\n * Prepare the component (Vue 2.x).\\n */\\n prepareComponent: function prepareComponent() {\\n this.getTokens();\\n },\\n\\n /**\\n * Get all of the authorized tokens for the user.\\n */\\n getTokens: function getTokens() {\\n var this$1 = this;\\n\\n this.$http.get('/oauth/tokens')\\n .then(function (response) {\\n this$1.tokens = response.data;\\n });\\n },\\n\\n /**\\n * Revoke the given token.\\n */\\n revoke: function revoke(token) {\\n var this$1 = this;\\n\\n this.$http.delete('/oauth/tokens/' + token.id)\\n .then(function (response) {\\n this$1.getTokens();\\n });\\n }\\n }\\n};\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L0F1dGhvcml6ZWRDbGllbnRzLnZ1ZT9hYjRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gICAgLypcbiAgICAgKiBUaGUgY29tcG9uZW50J3MgZGF0YS5cbiAgICAgKi9cbiAgICBkYXRhKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdG9rZW5zOiBbXVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBQcmVwYXJlIHRoZSBjb21wb25lbnQgKFZ1ZSAxLngpLlxuICAgICAqL1xuICAgIHJlYWR5KCkge1xuICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cbiAgICAgKi9cbiAgICBtb3VudGVkKCkge1xuICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcbiAgICB9LFxuXG4gICAgbWV0aG9kczoge1xuICAgICAgICAvKipcbiAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cbiAgICAgICAgICovXG4gICAgICAgIHByZXBhcmVDb21wb25lbnQoKSB7XG4gICAgICAgICAgICB0aGlzLmdldFRva2VucygpO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXQgYWxsIG9mIHRoZSBhdXRob3JpemVkIHRva2VucyBmb3IgdGhlIHVzZXIuXG4gICAgICAgICAqL1xuICAgICAgICBnZXRUb2tlbnMoKSB7XG4gICAgICAgICAgICB0aGlzLiRodHRwLmdldCgnL29hdXRoL3Rva2VucycpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9rZW5zID0gcmVzcG9uc2UuZGF0YTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJldm9rZSB0aGUgZ2l2ZW4gdG9rZW4uXG4gICAgICAgICAqL1xuICAgICAgICByZXZva2UodG9rZW4pIHtcbiAgICAgICAgICAgIHRoaXMuJGh0dHAuZGVsZXRlKCcvb2F1dGgvdG9rZW5zLycgKyB0b2tlbi5pZClcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRUb2tlbnMoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L0F1dGhvcml6ZWRDbGllbnRzLnZ1ZSJdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXlEQTs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7OztBQUlBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7QUFJQTs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n data: function data() {\\n return {\\n clients: [],\\n\\n createForm: {\\n errors: [],\\n name: '',\\n redirect: ''\\n },\\n\\n editForm: {\\n errors: [],\\n name: '',\\n redirect: ''\\n }\\n };\\n },\\n\\n /**\\n * Prepare the component (Vue 1.x).\\n */\\n ready: function ready() {\\n this.prepareComponent();\\n },\\n\\n /**\\n * Prepare the component (Vue 2.x).\\n */\\n mounted: function mounted() {\\n this.prepareComponent();\\n },\\n\\n methods: {\\n /**\\n * Prepare the component.\\n */\\n prepareComponent: function prepareComponent() {\\n this.getClients();\\n\\n $('#modal-create-client').on('shown.bs.modal', function () {\\n $('#create-client-name').focus();\\n });\\n\\n $('#modal-edit-client').on('shown.bs.modal', function () {\\n $('#edit-client-name').focus();\\n });\\n },\\n\\n /**\\n * Get all of the OAuth clients for the user.\\n */\\n getClients: function getClients() {\\n var this$1 = this;\\n\\n this.$http.get('/oauth/clients')\\n .then(function (response) {\\n this$1.clients = response.data;\\n });\\n },\\n\\n /**\\n * Show the form for creating new clients.\\n */\\n showCreateClientForm: function showCreateClientForm() {\\n $('#modal-create-client').modal('show');\\n },\\n\\n /**\\n * Create a new OAuth client for the user.\\n */\\n store: function store() {\\n this.persistClient(\\n 'post', '/oauth/clients',\\n this.createForm, '#modal-create-client'\\n );\\n },\\n\\n /**\\n * Edit the given client.\\n */\\n edit: function edit(client) {\\n this.editForm.id = client.id;\\n this.editForm.name = client.name;\\n this.editForm.redirect = client.redirect;\\n\\n $('#modal-edit-client').modal('show');\\n },\\n\\n /**\\n * Update the client being edited.\\n */\\n update: function update() {\\n this.persistClient(\\n 'put', '/oauth/clients/' + this.editForm.id,\\n this.editForm, '#modal-edit-client'\\n );\\n },\\n\\n /**\\n * Persist the client to storage using the given form.\\n */\\n persistClient: function persistClient(method, uri, form, modal) {\\n var this$1 = this;\\n\\n form.errors = [];\\n\\n this.$http[method](uri, form)\\n .then(function (response) {\\n this$1.getClients();\\n\\n form.name = '';\\n form.redirect = '';\\n form.errors = [];\\n\\n $(modal).modal('hide');\\n })\\n .catch(function (response) {\\n if (typeof response.data === 'object') {\\n form.errors = _.flatten(_.toArray(response.data));\\n } else {\\n form.errors = ['Something went wrong. Please try again.'];\\n }\\n });\\n },\\n\\n /**\\n * Destroy the given client.\\n */\\n destroy: function destroy(client) {\\n var this$1 = this;\\n\\n this.$http.delete('/oauth/clients/' + client.id)\\n .then(function (response) {\\n this$1.getClients();\\n });\\n }\\n }\\n};\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L0NsaWVudHMudnVlPzQ0ZTAiXSwic291cmNlc0NvbnRlbnQiOlsiLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4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ZGVmYXVsdCB7XG4gICAgLypcbiAgICAgKiBUaGUgY29tcG9uZW50J3MgZGF0YS5cbiAgICAgKi9cbiAgICBkYXRhKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY2xpZW50czogW10sXG5cbiAgICAgICAgICAgIGNyZWF0ZUZvcm06IHtcbiAgICAgICAgICAgICAgICBlcnJvcnM6IFtdLFxuICAgICAgICAgICAgICAgIG5hbWU6ICcnLFxuICAgICAgICAgICAgICAgIHJlZGlyZWN0OiAnJ1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgZWRpdEZvcm06IHtcbiAgICAgICAgICAgICAgICBlcnJvcnM6IFtdLFxuICAgICAgICAgICAgICAgIG5hbWU6ICcnLFxuICAgICAgICAgICAgICAgIHJlZGlyZWN0OiAnJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG5cbiAgICAvKipcbiAgICAgKiBQcmVwYXJlIHRoZSBjb21wb25lbnQgKFZ1ZSAxLngpLlxuICAgICAqL1xuICAgIHJlYWR5KCkge1xuICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcbiAgICB9LFxuXG4gICAgLyoqXG4gICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cbiAgICAgKi9cbiAgICBtb3VudGVkKCkge1xuICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcbiAgICB9LFxuXG4gICAgbWV0aG9kczoge1xuICAgICAgICAvKipcbiAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50LlxuICAgICAgICAgKi9cbiAgICAgICAgcHJlcGFyZUNvbXBvbmVudCgpIHtcbiAgICAgICAgICAgIHRoaXMuZ2V0Q2xpZW50cygpO1xuXG4gICAgICAgICAgICAkKCcjbW9kYWwtY3JlYXRlLWNsaWVudCcpLm9uKCdzaG93bi5icy5tb2RhbCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAkKCcjY3JlYXRlLWNsaWVudC1uYW1lJykuZm9jdXMoKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAkKCcjbW9kYWwtZWRpdC1jbGllbnQnKS5vbignc2hvd24uYnMubW9kYWwnLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgJCgnI2VkaXQtY2xpZW50LW5hbWUnKS5mb2N1cygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldCBhbGwgb2YgdGhlIE9BdXRoIGNsaWVudHMgZm9yIHRoZSB1c2VyLlxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0Q2xpZW50cygpIHtcbiAgICAgICAgICAgIHRoaXMuJGh0dHAuZ2V0KCcvb2F1dGgvY2xpZW50cycpXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2xpZW50cyA9IHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTaG93IHRoZSBmb3JtIGZvciBjcmVhdGluZyBuZXcgY2xpZW50cy5cbiAgICAgICAgICovXG4gICAgICAgIHNob3dDcmVhdGVDbGllbnRGb3JtKCkge1xuICAgICAgICAgICAgJCgnI21vZGFsLWNyZWF0ZS1jbGllbnQnKS5tb2RhbCgnc2hvdycpO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGUgYSBuZXcgT0F1dGggY2xpZW50IGZvciB0aGUgdXNlci5cbiAgICAgICAgICovXG4gICAgICAgIHN0b3JlKCkge1xuICAgICAgICAgICAgdGhpcy5wZXJzaXN0Q2xpZW50KFxuICAgICAgICAgICAgICAgICdwb3N0JywgJy9vYXV0aC9jbGllbnRzJyxcbiAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUZvcm0sICcjbW9kYWwtY3JlYXRlLWNsaWVudCdcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEVkaXQgdGhlIGdpdmVuIGNsaWVudC5cbiAgICAgICAgICovXG4gICAgICAgIGVkaXQoY2xpZW50KSB7XG4gICAgICAgICAgICB0aGlzLmVkaXRGb3JtLmlkID0gY2xpZW50LmlkO1xuICAgICAgICAgICAgdGhpcy5lZGl0Rm9ybS5uYW1lID0gY2xpZW50Lm5hbWU7XG4gICAgICAgICAgICB0aGlzLmVkaXRGb3JtLnJlZGlyZWN0ID0gY2xpZW50LnJlZGlyZWN0O1xuXG4gICAgICAgICAgICAkKCcjbW9kYWwtZWRpdC1jbGllbnQnKS5tb2RhbCgnc2hvdycpO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBVcGRhdGUgdGhlIGNsaWVudCBiZWluZyBlZGl0ZWQuXG4gICAgICAgICAqL1xuICAgICAgICB1cGRhdGUoKSB7XG4gICAgICAgICAgICB0aGlzLnBlcnNpc3RDbGllbnQoXG4gICAgICAgICAgICAgICAgJ3B1dCcsICcvb2F1dGgvY2xpZW50cy8nICsgdGhpcy5lZGl0Rm9ybS5pZCxcbiAgICAgICAgICAgICAgICB0aGlzLmVkaXRGb3JtLCAnI21vZGFsLWVkaXQtY2xpZW50J1xuICAgICAgICAgICAgKTtcbiAgICAgICAgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogUGVyc2lzdCB0aGUgY2xpZW50IHRvIHN0b3JhZ2UgdXNpbmcgdGhlIGdpdmVuIGZvcm0uXG4gICAgICAgICAqL1xuICAgICAgICBwZXJzaXN0Q2xpZW50KG1ldGhvZCwgdXJpLCBmb3JtLCBtb2RhbCkge1xuICAgICAgICAgICAgZm9ybS5lcnJvcnMgPSBbXTtcblxuICAgICAgICAgICAgdGhpcy4kaHR0cFttZXRob2RdKHVyaSwgZm9ybSlcbiAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q2xpZW50cygpO1xuXG4gICAgICAgICAgICAgICAgICAgIGZvcm0ubmFtZSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICBmb3JtLnJlZGlyZWN0ID0gJyc7XG4gICAgICAgICAgICAgICAgICAgIGZvcm0uZXJyb3JzID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgJChtb2RhbCkubW9kYWwoJ2hpZGUnKTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5jYXRjaChyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVzcG9uc2UuZGF0YSA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcm0uZXJyb3JzID0gXy5mbGF0dGVuKF8udG9BcnJheShyZXNwb25zZS5kYXRhKSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtLmVycm9ycyA9IFsnU29tZXRoaW5nIHdlbnQgd3JvbmcuIFBsZWFzZSB0cnkgYWdhaW4uJ107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogRGVzdHJveSB0aGUgZ2l2ZW4gY2xpZW50LlxuICAgICAgICAgKi9cbiAgICAgICAgZGVzdHJveShjbGllbnQpIHtcbiAgICAgICAgICAgIHRoaXMuJGh0dHAuZGVsZXRlKCcvb2F1dGgvY2xpZW50cy8nICsgY2xpZW50LmlkKVxuICAgICAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdldENsaWVudHMoKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5cblxuXG4vLy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7QUFDQTs7OztBQUlBOztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7O0FBSUE7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n data: function data() {\\n return {\\n accessToken: null,\\n\\n tokens: [],\\n scopes: [],\\n\\n form: {\\n name: '',\\n scopes: [],\\n errors: []\\n }\\n };\\n },\\n\\n /**\\n * Prepare the component (Vue 1.x).\\n */\\n ready: function ready() {\\n this.prepareComponent();\\n },\\n\\n /**\\n * Prepare the component (Vue 2.x).\\n */\\n mounted: function mounted() {\\n this.prepareComponent();\\n },\\n\\n methods: {\\n /**\\n * Prepare the component.\\n */\\n prepareComponent: function prepareComponent() {\\n this.getTokens();\\n this.getScopes();\\n\\n $('#modal-create-token').on('shown.bs.modal', function () {\\n $('#create-token-name').focus();\\n });\\n },\\n\\n /**\\n * Get all of the personal access tokens for the user.\\n */\\n getTokens: function getTokens() {\\n var this$1 = this;\\n\\n this.$http.get('/oauth/personal-access-tokens')\\n .then(function (response) {\\n this$1.tokens = response.data;\\n });\\n },\\n\\n /**\\n * Get all of the available scopes.\\n */\\n getScopes: function getScopes() {\\n var this$1 = this;\\n\\n this.$http.get('/oauth/scopes')\\n .then(function (response) {\\n this$1.scopes = response.data;\\n });\\n },\\n\\n /**\\n * Show the form for creating new tokens.\\n */\\n showCreateTokenForm: function showCreateTokenForm() {\\n $('#modal-create-token').modal('show');\\n },\\n\\n /**\\n * Create a new personal access token.\\n */\\n store: function store() {\\n var this$1 = this;\\n\\n this.accessToken = null;\\n\\n this.form.errors = [];\\n\\n this.$http.post('/oauth/personal-access-tokens', this.form)\\n .then(function (response) {\\n this$1.form.name = '';\\n this$1.form.scopes = [];\\n this$1.form.errors = [];\\n\\n this$1.tokens.push(response.data.token);\\n\\n this$1.showAccessToken(response.data.accessToken);\\n })\\n .catch(function (response) {\\n if (typeof response.data === 'object') {\\n this$1.form.errors = _.flatten(_.toArray(response.data));\\n } else {\\n console.dir(this$1.form);\\n this$1.form.errors = ['Something went wrong. Please try again.'];\\n }\\n });\\n },\\n\\n /**\\n * Toggle the given scope in the list of assigned scopes.\\n */\\n toggleScope: function toggleScope(scope) {\\n if (this.scopeIsAssigned(scope)) {\\n this.form.scopes = _.reject(this.form.scopes, function (s) { return s == scope; });\\n } else {\\n this.form.scopes.push(scope);\\n }\\n },\\n\\n /**\\n * Determine if the given scope has been assigned to the token.\\n */\\n scopeIsAssigned: function scopeIsAssigned(scope) {\\n return _.indexOf(this.form.scopes, scope) >= 0;\\n },\\n\\n /**\\n * Show the given access token to the user.\\n */\\n showAccessToken: function showAccessToken(accessToken) {\\n $('#modal-create-token').modal('hide');\\n\\n this.accessToken = accessToken;\\n\\n $('#modal-access-token').modal('show');\\n },\\n\\n /**\\n * Revoke the given token.\\n */\\n revoke: function revoke(token) {\\n var this$1 = this;\\n\\n this.$http.delete('/oauth/personal-access-tokens/' + token.id)\\n .then(function (response) {\\n this$1.getTokens();\\n });\\n }\\n }\\n};\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L1BlcnNvbmFsQWNjZXNzVG9rZW5zLnZ1ZT9kODUxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vX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ICAgbW91bnRlZCgpIHtcbiAgICAgICAgdGhpcy5wcmVwYXJlQ29tcG9uZW50KCk7XG4gICAgfSxcblxuICAgIG1ldGhvZHM6IHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFByZXBhcmUgdGhlIGNvbXBvbmVudC5cbiAgICAgICAgICovXG4gICAgICAgIHByZXBhcmVDb21wb25lbnQoKSB7XG4gICAgICAgICAgICB0aGlzLmdldFRva2VucygpO1xuICAgICAgICAgICAgdGhpcy5nZXRTY29wZXMoKTtcblxuICAgICAgICAgICAgJCgnI21vZGFsLWNyZWF0ZS10b2tlbicpLm9uKCdzaG93bi5icy5tb2RhbCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAkKCcjY3JlYXRlLXRva2VuLW5hbWUnKS5mb2N1cygpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldCBhbGwgb2YgdGhlIHBlcnNvbmFsIGFjY2VzcyB0b2tlbnMgZm9yIHRoZSB1c2VyLlxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0VG9rZW5zKCkge1xuICAgICAgICAgICAgdGhpcy4kaHR0cC5nZXQoJy9vYXV0aC9wZXJzb25hbC1hY2Nlc3MtdG9rZW5zJylcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tlbnMgPSByZXNwb25zZS5kYXRhO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IGFsbCBvZiB0aGUgYXZhaWxhYmxlIHNjb3Blcy5cbiAgICAgICAgICovXG4gICAgICAgIGdldFNjb3BlcygpIHtcbiAgICAgICAgICAgIHRoaXMuJGh0dHAuZ2V0KCcvb2F1dGgvc2NvcGVzJylcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zY29wZXMgPSByZXNwb25zZS5kYXRhO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogU2hvdyB0aGUgZm9ybSBmb3IgY3JlYXRpbmcgbmV3IHRva2Vucy5cbiAgICAgICAgICovXG4gICAgICAgIHNob3dDcmVhdGVUb2tlbkZvcm0oKSB7XG4gICAgICAgICAgICAkKCcjbW9kYWwtY3JlYXRlLXRva2VuJykubW9kYWwoJ3Nob3cnKTtcbiAgICAgICAgfSxcblxuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRlIGEgbmV3IHBlcnNvbmFsIGFjY2VzcyB0b2tlbi5cbiAgICAgICAgICovXG4gICAgICAgIHN0b3JlKCkge1xuICAgICAgICAgICAgdGhpcy5hY2Nlc3NUb2tlbiA9IG51bGw7XG5cbiAgICAgICAgICAgIHRoaXMuZm9ybS5lcnJvcnMgPSBbXTtcblxuICAgICAgICAgICAgdGhpcy4kaHR0cC5wb3N0KCcvb2F1dGgvcGVyc29uYWwtYWNjZXNzLXRva2VucycsIHRoaXMuZm9ybSlcbiAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLm5hbWUgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5zY29wZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5lcnJvcnMgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tlbnMucHVzaChyZXNwb25zZS5kYXRhLnRva2VuKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zaG93QWNjZXNzVG9rZW4ocmVzcG9uc2UuZGF0YS5hY2Nlc3NUb2tlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChyZXNwb25zZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJlc3BvbnNlLmRhdGEgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLmVycm9ycyA9IF8uZmxhdHRlbihfLnRvQXJyYXkocmVzcG9uc2UuZGF0YSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZGlyKHRoaXMuZm9ybSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLmVycm9ycyA9IFsnU29tZXRoaW5nIHdlbnQgd3JvbmcuIFBsZWFzZSB0cnkgYWdhaW4uJ107XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBUb2dnbGUgdGhlIGdpdmVuIHNjb3BlIGluIHRoZSBsaXN0IG9mIGFzc2lnbmVkIHNjb3Blcy5cbiAgICAgICAgICovXG4gICAgICAgIHRvZ2dsZVNjb3BlKHNjb3BlKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zY29wZUlzQXNzaWduZWQoc2NvcGUpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5mb3JtLnNjb3BlcyA9IF8ucmVqZWN0KHRoaXMuZm9ybS5zY29wZXMsIHMgPT4gcyA9PSBzY29wZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5zY29wZXMucHVzaChzY29wZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIERldGVybWluZSBpZiB0aGUgZ2l2ZW4gc2NvcGUgaGFzIGJlZW4gYXNzaWduZWQgdG8gdGhlIHRva2VuL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QTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n//\\n\\n__webpack_require__(30);\\n/* harmony default export */ exports[\\\"default\\\"] = {\\n /*\\n * The component's data.\\n */\\n props: ['options', 'value'],\\n\\n mounted: function mounted() {\\n var vm = this;\\n $(this.$el)\\n .select2({\\n data: this.options\\n })\\n .on('change', function() { vm.$emit('input', this.value) } );\\n },\\n watch: {\\n value: function (value) {\\n $(this.$el).val(value)\\n },\\n options: function (options) {\\n $(this.$el).select2({data: options})\\n },\\n destroyed: function() {\\n $(this.$el).off().select2('destroy')\\n }\\n }\\n};\\n\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3NlbGVjdDIudnVlPzAxYzMiXSwic291cmNlc0NvbnRlbnQiOlsiLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cbi8vXG4vL1xuLy9cblxucmVxdWlyZSgnc2VsZWN0MicpO1xuZXhwb3J0IGRlZmF1bHQge1xuICAgIC8qXG4gICAgICogVGhlIGNvbXBvbmVudCdzIGRhdGEuXG4gICAgICovXG4gICAgcHJvcHM6IFsnb3B0aW9ucycsICd2YWx1ZSddLFxuXG4gICAgbW91bnRlZCgpIHtcbiAgICAgICAgdmFyIHZtID0gdGhpcztcbiAgICAgICAgJCh0aGlzLiRlbClcbiAgICAgICAgICAgIC5zZWxlY3QyKHtcbiAgICAgICAgICAgICAgICBkYXRhOiB0aGlzLm9wdGlvbnNcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAub24oJ2NoYW5nZScsIGZ1bmN0aW9uKCkgeyB2bS4kZW1pdCgnaW5wdXQnLCB0aGlzLnZhbHVlKSB9ICk7XG4gICAgfSxcbiAgICB3YXRjaDoge1xuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAkKHRoaXMuJGVsKS52YWwodmFsdWUpXG4gICAgICAgIH0sXG4gICAgICAgIG9wdGlvbnM6IGZ1bmN0aW9uIChvcHRpb25zKSB7XG4gICAgICAgICAgICAkKHRoaXMuJGVsKS5zZWxlY3QyKHtkYXRhOiBvcHRpb25zfSlcbiAgICAgICAgfSxcbiAgICAgICAgZGVzdHJveWVkOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICQodGhpcy4kZWwpLm9mZigpLnNlbGVjdDIoJ2Rlc3Ryb3knKVxuICAgICAgICB9XG4gICAgfVxufVxuXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3NlbGVjdDIudnVlIl0sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7QUFXQTtBQUNBOzs7O0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n.action-link[data-v-225778c2] {\\\\n cursor: pointer;\\\\n}\\\\n.m-b-none[data-v-225778c2] {\\\\n margin-bottom: 0;\\\\n}\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./resources/assets/js/components/passport/PersonalAccessTokens.vue?5734f4e4\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AACA;IACA,gBAAA;CACA;AAEA;IACA,iBAAA;CACA\\\",\\\"file\\\":\\\"PersonalAccessTokens.vue\\\",\\\"sourcesContent\\\":[\\\"<style scoped>\\\\n .action-link {\\\\n cursor: pointer;\\\\n }\\\\n\\\\n .m-b-none {\\\\n margin-bottom: 0;\\\\n }\\\\n</style>\\\\n\\\\n<template>\\\\n <div>\\\\n <div>\\\\n <div class=\\\\\\\"panel panel-default\\\\\\\">\\\\n <div class=\\\\\\\"panel-heading\\\\\\\">\\\\n <div style=\\\\\\\"display: flex; justify-content: space-between; align-items: center;\\\\\\\">\\\\n <span>\\\\n Personal Access Tokens\\\\n </span>\\\\n\\\\n <a class=\\\\\\\"action-link\\\\\\\" @click=\\\\\\\"showCreateTokenForm\\\\\\\">\\\\n Create New Token\\\\n </a>\\\\n </div>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"panel-body\\\\\\\">\\\\n <!-- No Tokens Notice -->\\\\n <p class=\\\\\\\"m-b-none\\\\\\\" v-if=\\\\\\\"tokens.length === 0\\\\\\\">\\\\n You have not created any personal access tokens.\\\\n </p>\\\\n\\\\n <!-- Personal Access Tokens -->\\\\n <table class=\\\\\\\"table table-borderless m-b-none\\\\\\\" v-if=\\\\\\\"tokens.length > 0\\\\\\\">\\\\n <thead>\\\\n <tr>\\\\n <th>Name</th>\\\\n <th></th>\\\\n </tr>\\\\n </thead>\\\\n\\\\n <tbody>\\\\n <tr v-for=\\\\\\\"token in tokens\\\\\\\">\\\\n <!-- Client Name -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n {{ token.name }}\\\\n </td>\\\\n\\\\n <!-- Delete Button -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <a class=\\\\\\\"action-link text-danger\\\\\\\" @click=\\\\\\\"revoke(token)\\\\\\\">\\\\n Delete\\\\n </a>\\\\n </td>\\\\n </tr>\\\\n </tbody>\\\\n </table>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Create Token Modal -->\\\\n <div class=\\\\\\\"modal fade\\\\\\\" id=\\\\\\\"modal-create-token\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" role=\\\\\\\"dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-content\\\\\\\">\\\\n <div class=\\\\\\\"modal-header\\\\\\\">\\\\n <button type=\\\\\\\"button \\\\\\\" class=\\\\\\\"close\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\">&times;</button>\\\\n\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\">\\\\n Create Token\\\\n </h4>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"modal-body\\\\\\\">\\\\n <!-- Form Errors -->\\\\n <div class=\\\\\\\"alert alert-danger\\\\\\\" v-if=\\\\\\\"form.errors.length > 0\\\\\\\">\\\\n <p><strong>Whoops!</strong> Something went wrong!</p>\\\\n <br>\\\\n <ul>\\\\n <li v-for=\\\\\\\"error in form.errors\\\\\\\">\\\\n {{ error }}\\\\n </li>\\\\n </ul>\\\\n </div>\\\\n\\\\n <!-- Create Token Form -->\\\\n <form class=\\\\\\\"form-horizontal\\\\\\\" role=\\\\\\\"form\\\\\\\" @submit.prevent=\\\\\\\"store\\\\\\\">\\\\n <!-- Name -->\\\\n <div class=\\\\\\\"form-group\\\\\\\">\\\\n <label class=\\\\\\\"col-md-4 control-label\\\\\\\">Name</label>\\\\n\\\\n <div class=\\\\\\\"col-md-6\\\\\\\">\\\\n <input id=\\\\\\\"create-token-name\\\\\\\" type=\\\\\\\"text\\\\\\\" class=\\\\\\\"form-control\\\\\\\" name=\\\\\\\"name\\\\\\\" v-model=\\\\\\\"form.name\\\\\\\">\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Scopes -->\\\\n <div class=\\\\\\\"form-group\\\\\\\" v-if=\\\\\\\"scopes.length > 0\\\\\\\">\\\\n <label class=\\\\\\\"col-md-4 control-label\\\\\\\">Scopes</label>\\\\n\\\\n <div class=\\\\\\\"col-md-6\\\\\\\">\\\\n <div v-for=\\\\\\\"scope in scopes\\\\\\\">\\\\n <div class=\\\\\\\"checkbox\\\\\\\">\\\\n <label>\\\\n <input type=\\\\\\\"checkbox\\\\\\\"\\\\n @click=\\\\\\\"toggleScope(scope.id)\\\\\\\"\\\\n :checked=\\\\\\\"scopeIsAssigned(scope.id)\\\\\\\">\\\\n\\\\n {{ scope.id }}\\\\n </label>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </form>\\\\n </div>\\\\n\\\\n <!-- Modal Actions -->\\\\n <div class=\\\\\\\"modal-footer\\\\\\\">\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\">Close</button>\\\\n\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-primary\\\\\\\" @click=\\\\\\\"store\\\\\\\">\\\\n Create\\\\n </button>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Access Token Modal -->\\\\n <div class=\\\\\\\"modal fade\\\\\\\" id=\\\\\\\"modal-access-token\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" role=\\\\\\\"dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-content\\\\\\\">\\\\n <div class=\\\\\\\"modal-header\\\\\\\">\\\\n <button type=\\\\\\\"button \\\\\\\" class=\\\\\\\"close\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\">&times;</button>\\\\n\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\">\\\\n Personal Access Token\\\\n </h4>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"modal-body\\\\\\\">\\\\n <p>\\\\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\\\\n You may now use this token to make API requests.\\\\n </p>\\\\n\\\\n <pre><code>{{ accessToken }}</code></pre>\\\\n </div>\\\\n\\\\n <!-- Modal Actions -->\\\\n <div class=\\\\\\\"modal-footer\\\\\\\">\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\">Close</button>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n</template>\\\\n\\\\n<script>\\\\n export default {\\\\n /*\\\\n * The component's data.\\\\n */\\\\n data() {\\\\n return {\\\\n accessToken: null,\\\\n\\\\n tokens: [],\\\\n scopes: [],\\\\n\\\\n form: {\\\\n name: '',\\\\n scopes: [],\\\\n errors: []\\\\n }\\\\n };\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 1.x).\\\\n */\\\\n ready() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 2.x).\\\\n */\\\\n mounted() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n methods: {\\\\n /**\\\\n * Prepare the component.\\\\n */\\\\n prepareComponent() {\\\\n this.getTokens();\\\\n this.getScopes();\\\\n\\\\n $('#modal-create-token').on('shown.bs.modal', () => {\\\\n $('#create-token-name').focus();\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Get all of the personal access tokens for the user.\\\\n */\\\\n getTokens() {\\\\n this.$http.get('/oauth/personal-access-tokens')\\\\n .then(response => {\\\\n this.tokens = response.data;\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Get all of the available scopes.\\\\n */\\\\n getScopes() {\\\\n this.$http.get('/oauth/scopes')\\\\n .then(response => {\\\\n this.scopes = response.data;\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Show the form for creating new tokens.\\\\n */\\\\n showCreateTokenForm() {\\\\n $('#modal-create-token').modal('show');\\\\n },\\\\n\\\\n /**\\\\n * Create a new personal access token.\\\\n */\\\\n store() {\\\\n this.accessToken = null;\\\\n\\\\n this.form.errors = [];\\\\n\\\\n this.$http.post('/oauth/personal-access-tokens', this.form)\\\\n .then(response => {\\\\n this.form.name = '';\\\\n this.form.scopes = [];\\\\n this.form.errors = [];\\\\n\\\\n this.tokens.push(response.data.token);\\\\n\\\\n this.showAccessToken(response.data.accessToken);\\\\n })\\\\n .catch(response => {\\\\n if (typeof response.data === 'object') {\\\\n this.form.errors = _.flatten(_.toArray(response.data));\\\\n } else {\\\\n console.dir(this.form);\\\\n this.form.errors = ['Something went wrong. Please try again.'];\\\\n }\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Toggle the given scope in the list of assigned scopes.\\\\n */\\\\n toggleScope(scope) {\\\\n if (this.scopeIsAssigned(scope)) {\\\\n this.form.scopes = _.reject(this.form.scopes, s => s == scope);\\\\n } else {\\\\n this.form.scopes.push(scope);\\\\n }\\\\n },\\\\n\\\\n /**\\\\n * Determine if the given scope has been assigned to the token.\\\\n */\\\\n scopeIsAssigned(scope) {\\\\n return _.indexOf(this.form.scopes, scope) >= 0;\\\\n },\\\\n\\\\n /**\\\\n * Show the given access token to the user.\\\\n */\\\\n showAccessToken(accessToken) {\\\\n $('#modal-create-token').modal('hide');\\\\n\\\\n this.accessToken = accessToken;\\\\n\\\\n $('#modal-access-token').modal('show');\\\\n },\\\\n\\\\n /**\\\\n * Revoke the given token.\\\\n */\\\\n revoke(token) {\\\\n this.$http.delete('/oauth/personal-access-tokens/' + token.id)\\\\n .then(response => {\\\\n this.getTokens();\\\\n });\\\\n }\\\\n }\\\\n }\\\\n</script>\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3Bvcn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bCBwYW5lbC1kZWZhdWx0XFxcIj5cXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwicGFuZWwtaGVhZGluZ1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IHN0eWxlPVxcXCJkaXNwbGF5OiBmbGV4OyBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47IGFsaWduLWl0ZW1zOiBjZW50ZXI7XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8c3Bhbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgUGVyc29uYWwgQWNjZXNzIFRva2Vuc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8YSBjbGFzcz1cXFwiYWN0aW9uLWxpbmtcXFwiIEBjbGljaz1cXFwic2hvd0NyZWF0ZVRva2VuRm9ybVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIENyZWF0ZSBOZXcgVG9rZW5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2E+XFxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcInBhbmVsLWJvZHlcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgPCEtLSBObyBUb2tlbnMgTm90aWNlIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgPHAgY2xhc3M9XFxcIm0tYi1ub25lXFxcIiB2LWlmPVxcXCJ0b2tlbnMubGVuZ3RoID09PSAwXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICBZb3UgaGF2ZSBub3QgY3JlYXRlZCBhbnkgcGVyc29uYWwgYWNjZXNzIHRva2Vucy5cXG4gICAgICAgICAgICAgICAgICAgIDwvcD5cXG5cXG4gICAgICAgICAgICAgICAgICAgIDwhLS0gUGVyc29uYWwgQWNjZXNzIFRva2VucyAtLT5cXG4gICAgICAgICAgICAgICAgICAgIDx0YWJsZSBjbGFzcz1cXFwidGFibGUgdGFibGUtYm9yZGVybGVzcyBtLWItbm9uZVxcXCIgdi1pZj1cXFwidG9rZW5zLmxlbmd0aCA+IDBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDx0aGVhZD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRyPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoPk5hbWU8L3RoPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoPjwvdGg+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC90aGVhZD5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8dGJvZHk+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ciB2LWZvcj1cXFwidG9rZW4gaW4gdG9rZW5zXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gQ2xpZW50IE5hbWUgLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9XFxcInZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyB0b2tlbi5uYW1lIH19XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBEZWxldGUgQnV0dG9uIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVxcXCJ2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XFxcImFjdGlvbi1saW5rIHRleHQtZGFuZ2VyXFxcIiBAY2xpY2s9XFxcInJldm9rZSh0b2tlbilcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGJvZHk+XFxuICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPlxcbiAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgIDwvZGl2PlxcblxcbiAgICAgICAgPCEtLSBDcmVhdGUgVG9rZW4gTW9kYWwgLS0+XFxuICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbCBmYWRlXFxcIiBpZD1cXFwibW9kYWwtY3JlYXRlLXRva2VuXFxcIiB0YWJpbmRleD1cXFwiLTFcXFwiIHJvbGU9XFxcImRpYWxvZ1xcXCI+XFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtZGlhbG9nXFxcIj5cXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtY29udGVudFxcXCI+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbC1oZWFkZXJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cXFwiYnV0dG9uIFxcXCIgY2xhc3M9XFxcImNsb3NlXFxcIiBkYXRhLWRpc21pc3M9XFxcIm1vZGFsXFxcIiBhcmlhLWhpZGRlbj1cXFwidHJ1ZVxcXCI+JnRpbWVzOzwvYnV0dG9uPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxoNCBjbGFzcz1cXFwibW9kYWwtdGl0bGVcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGUgVG9rZW5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2g0PlxcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbC1ib2R5XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8IS0tIEZvcm0gRXJyb3JzIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImFsZXJ0IGFsZXJ0LWRhbmdlclxcXCIgdi1pZj1cXFwiZm9ybS5lcnJvcnMubGVuZ3RoID4gMFxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPjxzdHJvbmc+V2hvb3BzITwvc3Ryb25nPiBTb21ldGhpbmcgd2VudCB3cm9uZyE8L3A+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxicj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHVsPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxpIHYtZm9yPVxcXCJlcnJvciBpbiBmb3JtLmVycm9yc1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgZXJyb3IgfX1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdWw+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBDcmVhdGUgVG9rZW4gRm9ybSAtLT5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8Zm9ybSBjbGFzcz1cXFwiZm9ybS1ob3Jpem9udGFsXFxcIiByb2xlPVxcXCJmb3JtXFxcIiBAc3VibWl0LnByZXZlbnQ9XFxcInN0b3JlXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBOYW1lIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJmb3JtLWdyb3VwXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cXFwiY29sLW1kLTQgY29udHJvbC1sYWJlbFxcXCI+TmFtZTwvbGFiZWw+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJjb2wtbWQtNlxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IGlkPVxcXCJjcmVhdGUtdG9rZW4tbmFtZVxcXCIgdHlwZT1cXFwidGV4dFxcXCIgY2xhc3M9XFxcImZvcm0tY29udHJvbFxcXCIgbmFtZT1cXFwibmFtZVxcXCIgdi1tb2RlbD1cXFwiZm9ybS5uYW1lXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBTY29wZXMgLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImZvcm0tZ3JvdXBcXFwiIHYtaWY9XFxcInNjb3Blcy5sZW5ndGggPiAwXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cXFwiY29sLW1kLTQgY29udHJvbC1sYWJlbFxcXCI+U2NvcGVzPC9sYWJlbD5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImNvbC1tZC02XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IHYtZm9yPVxcXCJzY29wZSBpbiBzY29wZXNcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJjaGVja2JveFxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWw+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9XFxcImNoZWNrYm94XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAY2xpY2s9XFxcInRvZ2dsZVNjb3BlKHNjb3BlLmlkKVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmNoZWNrZWQ9XFxcInNjb3BlSXNBc3NpZ25lZChzY29wZS5pZClcXFwiPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBzY29wZS5pZCB9fVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9sYWJlbD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9mb3JtPlxcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgICAgICA8IS0tIE1vZGFsIEFjdGlvbnMgLS0+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbC1mb290ZXJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cXFwiYnV0dG9uXFxcIiBjbGFzcz1cXFwiYnRuIGJ0bi1kZWZhdWx0XFxc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gICAgICAgICAgICAgICAgICAgICAgICAgUGVyc29uYWwgQWNjZXNzIFRva2VuXFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9oND5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcblxcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtYm9keVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPHA+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhlcmUgaXMgeW91ciBuZXcgcGVyc29uYWwgYWNjZXNzIHRva2VuLiBUaGlzIGlzIHRoZSBvbmx5IHRpbWUgaXQgd2lsbCBiZSBzaG93biBzbyBkb24ndCBsb3NlIGl0IVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBZb3UgbWF5IG5vdyB1c2UgdGhpcyB0b2tlbiB0byBtYWtlIEFQSSByZXF1ZXN0cy5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3A+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgPHByZT48Y29kZT57eyBhY2Nlc3NUb2tlbiB9fTwvY29kZT48L3ByZT5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcblxcbiAgICAgICAgICAgICAgICAgICAgPCEtLSBNb2RhbCBBY3Rpb25zIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtZm9vdGVyXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIHR5cGU9XFxcImJ1dHRvblxcXCIgY2xhc3M9XFxcImJ0biBidG4tZGVmYXVsdFxcXCIgZGF0YS1kaXNtaXNzPVxcXCJtb2RhbFxcXCI+Q2xvc2U8L2J1dHRvbj5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgIDwvZGl2PlxcbiAgICA8L2Rpdj5cXG48L3RlbXBsYXRlPlxcblxcbjxzY3JpcHQ+XFxuICAgIGV4cG9ydCBkZWZhdWx0IHtcXG4gICAgICAgIC8qXFxuICAgICAgICAgKiBUaGUgY29tcG9uZW50J3MgZGF0YS5cXG4gICAgICAgICAqL1xcbiAgICAgICAgZGF0YSgpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBhY2Nlc3NUb2tlbjogbnVsbCxcXG5cXG4gICAgICAgICAgICAgICAgdG9rZW5zOiBbXSxcXG4gICAgICAgICAgICAgICAgc2NvcGVzOiBbXSxcXG5cXG4gICAgICAgICAgICAgICAgZm9ybToge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogJycsXFxuICAgICAgICAgICAgICAgICAgICBzY29wZXM6IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzOiBbXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICAvKipcXG4gICAgICAgICAqIFByZXBhcmUgdGhlIGNvbXBvbmVudCAoVnVlIDEueCkuXFxuICAgICAgICAgKi9cXG4gICAgICAgIHJlYWR5KCkge1xcbiAgICAgICAgICAgIHRoaXMucHJlcGFyZUNvbXBvbmVudCgpO1xcbiAgICAgICAgfSxcXG5cXG4gICAgICAgIC8qKlxcbiAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cXG4gICAgICAgICAqL1xcbiAgICAgICAgbW91bnRlZCgpIHtcXG4gICAgICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICBtZXRob2RzOiB7XFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50LlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHByZXBhcmVDb21wb25lbnQoKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMuZ2V0VG9rZW5zKCk7XFxuICAgICAgICAgICAgICAgIHRoaXMuZ2V0U2NvcGVzKCk7XFxuXFxuICAgICAgICAgICAgICAgICQoJyNtb2RhbC1jcmVhdGUtdG9rZW4nKS5vbignc2hvd24uYnMubW9kYWwnLCAoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAkKCcjY3JlYXRlLXRva2VuLW5hbWUnKS5mb2N1cygpO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIEdldCBhbGwgb2YgdGhlIHBlcnNvbmFsIGFjY2VzcyB0b2tlbnMgZm9yIHRoZSB1c2VyLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGdldFRva2VucygpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5nZXQoJy9vYXV0aC9wZXJzb25hbC1hY2Nlc3MtdG9rZW5zJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9rZW5zID0gcmVzcG9uc2UuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIEdldCBhbGwgb2YgdGhlIGF2YWlsYWJsZSBzY29wZXMuXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgZ2V0U2NvcGVzKCkge1xcbiAgICAgICAgICAgICAgICB0aGlzLiRodHRwLmdldCgnL29hdXRoL3Njb3BlcycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNjb3BlcyA9IHJlc3BvbnNlLmRhdGE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSxcXG5cXG4gICAgICAgICAgICAvKipcXG4gICAgICAgICAgICAgKiBTaG93IHRoZSBmb3JtIGZvciBjcmVhdGluZyBuZXcgdG9rZW5zLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHNob3dDcmVhdGVUb2tlbkZvcm0oKSB7XFxuICAgICAgICAgICAgICAgICQoJyNtb2RhbC1jcmVhdGUtdG9rZW4nKS5tb2RhbCgnc2hvdycpO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogQ3JlYXRlIGEgbmV3IHBlcnNvbmFsIGFjY2VzcyB0b2tlbi5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBzdG9yZSgpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy5hY2Nlc3NUb2tlbiA9IG51bGw7XFxuXFxuICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5lcnJvcnMgPSBbXTtcXG5cXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5wb3N0KCcvb2F1dGgvcGVyc29uYWwtYWNjZXNzLXRva2VucycsIHRoaXMuZm9ybSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5uYW1lID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5zY29wZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5mb3JtLmVycm9ycyA9IFtdO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnRva2Vucy5wdXNoKHJlc3BvbnNlLmRhdGEudG9rZW4pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNob3dBY2Nlc3NUb2tlbihyZXNwb25zZS5kYXRhLmFjY2Vzc1Rva2VuKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC5jYXRjaChyZXNwb25zZSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcmVzcG9uc2UuZGF0YSA9PT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5lcnJvcnMgPSBfLmZsYXR0ZW4oXy50b0FycmF5KHJlc3BvbnNlLmRhdGEpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5kaXIodGhpcy5mb3JtKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5lcnJvcnMgPSBbJ1NvbWV0aGluZyB3ZW50IHdyb25nLiBQbGVhc2UgdHJ5IGFnYWluLiddO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSxcXG5cXG4gICAgICAgICAgICAvKipcXG4gICAgICAgICAgICAgKiBUb2dnbGUgdGhlIGdpdmVuIHNjb3BlIGluIHRoZSBsaXN0IG9mIGFzc2lnbmVkIHNjb3Blcy5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICB0b2dnbGVTY29wZShzY29wZSkge1xcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zY29wZUlzQXNzaWduZWQoc2NvcGUpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmZvcm0uc2NvcGVzID0gXy5yZWplY3QodGhpcy5mb3JtLnNjb3BlcywgcyA9PiBzID09IHNjb3BlKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZm9ybS5zY29wZXMucHVzaChzY29wZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIERldGVybWluZSBpZiB0aGUgZ2l2ZW4gc2NvcGUgaGFzIGJlZW4gYXNzaWduZWQgdG8gdGhlIHRva2VuLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHNjb3BlSXNBc3NpZ25lZChzY29wZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXy5pbmRleE9mKHRoaXMuZm9ybS5zY29wZXMsIHNjb3BlKSA+PSAwO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogU2hvdyB0aGUgZ2l2ZW4gYWNjZXNzIHRva2VuIHRvIHRoZSB1c2VyLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHNob3dBY2Nlc3NUb2tlbihhY2Nlc3NUb2tlbikge1xcbiAgICAgICAgICAgICAgICAkKCcjbW9kYWwtY3JlYXRlLXRva2VuJykubW9kYWwoJ2hpZGUnKTtcXG5cXG4gICAgICAgICAgICAgICAgdGhpcy5hY2Nlc3NUb2tlbiA9IGFjY2Vzc1Rva2VuO1xcblxcbiAgICAgICAgICAgICAgICAkKCcjbW9kYWwtYWNjZXNzLXRva2VuJykubW9kYWwoJ3Nob3cnKTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIFJldm9rZSB0aGUgZ2l2ZW4gdG9rZW4uXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgcmV2b2tlKHRva2VuKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMuJGh0dHAuZGVsZXRlKCcvb2F1dGgvcGVyc29uYWwtYWNjZXNzLXRva2Vucy8nICsgdG9rZW4uaWQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdldFRva2VucygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcbjwvc2NyaXB0PlxcblwiXSxcInNvdXJjZVJvb3RcIjpcIndlYnBhY2s6Ly9cIn1dKTtcblxuLy8gZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2Nzcy1sb2FkZXI/c291cmNlTWFwIS4vfi92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlci5qcz9pZD1kYXRhLXYtMjI1Nzc4YzImc2NvcGVkPXRydWUhLi9+L3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvUGVyc29uYWxBY2Nlc3NUb2tlbnMudnVlXG4vLyBtb2R1bGUgaWQgPSAxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[],\\\"names\\\":[],\\\"mappings\\\":\\\"\\\",\\\"file\\\":\\\"alert.vue\\\",\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlP2EwMWUiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cyA9IG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvbGliL2Nzcy1iYXNlLmpzXCIpKCk7XG4vLyBpbXBvcnRzXG5cblxuLy8gbW9kdWxlXG5leHBvcnRzLnB1c2goW21vZHVsZS5pZCwgXCJcXG5cXG5cIiwgXCJcIiwge1widmVyc2lvblwiOjMsXCJzb3VyY2VzXCI6W10sXCJuYW1lc1wiOltdLFwibWFwcGluZ3NcIjpcIlwiLFwiZmlsZVwiOlwiYWxlcnQudnVlXCIsXCJzb3VyY2VSb290XCI6XCJ3ZWJwYWNrOi8vXCJ9XSk7XG5cbi8vIGV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi9jc3MtbG9hZGVyP3NvdXJjZU1hcCEuL34vdnVlLWxvYWRlci9saWIvc3R5bGUtcmV3cml0ZXIuanM/aWQ9ZGF0YS12LTNlZGVmM2JhJnNjb3BlZD10cnVlIS4vfi92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXN0eWxlcyZpbmRleD0wIS4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2FsZXJ0LnZ1ZVxuLy8gbW9kdWxlIGlkID0gMjBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\ntd[data-v-5301a236] {\\\\n font-size: 14px;\\\\n}\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./resources/assets/js/components/importer/importer.vue?ec28e03c\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AACA;IACA,gBAAA;CACA\\\",\\\"file\\\":\\\"importer.vue\\\",\\\"sourcesContent\\\":[\\\"<style scoped>\\\\ntd {\\\\n font-size: 14px;\\\\n}\\\\n</style>\\\\n<template>\\\\n <div class=\\\\\\\"row\\\\\\\">\\\\n <alert v-show=\\\\\\\"alert.visible\\\\\\\" :alertType=\\\\\\\"alert.type\\\\\\\" v-on:hide=\\\\\\\"alert.visible = false\\\\\\\">{{ alert.message }}</alert>\\\\n <errors :errors=\\\\\\\"importErrors\\\\\\\"></errors>\\\\n <modal v-model=\\\\\\\"displayImportModal\\\\\\\" effect=\\\\\\\"fade\\\\\\\">\\\\n <div slot=\\\\\\\"modal-header\\\\\\\" class=\\\\\\\"modal-header\\\\\\\">\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\">Import File:</h4>\\\\n </div>\\\\n <div slot=\\\\\\\"modal-body\\\\\\\" class=\\\\\\\"modal-body\\\\\\\">\\\\n <div class=\\\\\\\"dynamic-form-row\\\\\\\">\\\\n <div class=\\\\\\\"col-md-4 col-xs-12\\\\\\\">\\\\n <label for=\\\\\\\"import-type\\\\\\\">Import Type:</label>\\\\n </div>\\\\n <div class=\\\\\\\"col-md-8 col-xs-12\\\\\\\">\\\\n <select2 :options=\\\\\\\"modal.importTypes\\\\\\\" v-model=\\\\\\\"modal.importType\\\\\\\">\\\\n <option disabled value=\\\\\\\"0\\\\\\\"></option>\\\\n </select2>\\\\n </div>\\\\n </div>\\\\n <div class=\\\\\\\"dynamic-form-row\\\\\\\">\\\\n <div class=\\\\\\\"col-md-4 col-xs-12\\\\\\\">\\\\n <label for=\\\\\\\"import-update\\\\\\\">Update Existing Values?:</label>\\\\n </div>\\\\n <div class=\\\\\\\"col-md-8 col-xs-12\\\\\\\">\\\\n <input type=\\\\\\\"checkbox\\\\\\\" name=\\\\\\\"import-update\\\\\\\" v-model=\\\\\\\"modal.update\\\\\\\">\\\\n </div>\\\\n </div>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"modal-footer\\\\\\\" slot=\\\\\\\"modal-footer\\\\\\\">\\\\n <div class=\\\\\\\"alert alert-success col-md-5 col-md-offset-1\\\\\\\" style=\\\\\\\"text-align:left\\\\\\\" v-if=\\\\\\\"modal.statusText\\\\\\\">{{ this.modal.statusText }}</div>\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" @click=\\\\\\\"displayImportModal = false\\\\\\\">Cancel</button>\\\\n <button type=\\\\\\\"submit\\\\\\\" class=\\\\\\\"btn btn-primary\\\\\\\" @click=\\\\\\\"postSave\\\\\\\">Process</button>\\\\n </div>\\\\n </modal>\\\\n <div class=\\\\\\\"col-md-12\\\\\\\">\\\\n <div class=\\\\\\\"box\\\\\\\">\\\\n <div class=\\\\\\\"box-body\\\\\\\">\\\\n <div class=\\\\\\\"row\\\\\\\">\\\\n <div class=\\\\\\\"col-md-3\\\\\\\">\\\\n <!-- The fileinput-button span is used to style the file input field as button -->\\\\n <span class=\\\\\\\"btn btn-info fileinput-button\\\\\\\">\\\\n <span>Select Import File...</span>\\\\n <!-- The file input field used as target for the file upload widget -->\\\\n <input id=\\\\\\\"fileupload\\\\\\\" type=\\\\\\\"file\\\\\\\" name=\\\\\\\"files[]\\\\\\\" data-url=\\\\\\\"/api/v1/imports\\\\\\\" accept=\\\\\\\"text/csv\\\\\\\">\\\\n </span>\\\\n </div>\\\\n <div class=\\\\\\\"col-md-9\\\\\\\" v-show=\\\\\\\"progress.visible\\\\\\\" style=\\\\\\\"padding-bottom:20px\\\\\\\">\\\\n <div class=\\\\\\\"col-md-11\\\\\\\">\\\\n <div class=\\\\\\\"progress progress-striped-active\\\\\\\" style=\\\\\\\"margin-top: 8px\\\\\\\">\\\\n <div class=\\\\\\\"progress-bar\\\\\\\" :class=\\\\\\\"progress.currentClass\\\\\\\" role=\\\\\\\"progressbar\\\\\\\" :style=\\\\\\\"progressWidth\\\\\\\">\\\\n <span>{{ progress.statusText }}</span>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n <div class=\\\\\\\"row\\\\\\\">\\\\n <div class=\\\\\\\"col-md-12\\\\\\\">\\\\n <table class=\\\\\\\"table table-striped\\\\\\\" id=\\\\\\\"upload-table\\\\\\\">\\\\n <thead>\\\\n <th>File</th>\\\\n <th>Created</th>\\\\n <th>Size</th>\\\\n <th></th>\\\\n </thead>\\\\n <tbody>\\\\n <tr v-for=\\\\\\\"file in files\\\\\\\">\\\\n <td>{{ file.file_path }}</td>\\\\n <td>{{ file.created_at }} </td>\\\\n <td>{{ file.filesize }}</td>\\\\n <td>\\\\n <button class=\\\\\\\"btn btn-sm btn-info\\\\\\\" @click=\\\\\\\"showModal(file)\\\\\\\"><i class=\\\\\\\"fa fa-spinner process\\\\\\\"></i>Process</button>\\\\n <button class=\\\\\\\"btn btn-sm btn-danger\\\\\\\" @click=\\\\\\\"deleteFile(file)\\\\\\\"><i class=\\\\\\\"fa fa-trash icon-white\\\\\\\"></i></button>\\\\n </td>\\\\n </tr>\\\\n </tbody>\\\\n </table>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n</template>\\\\n\\\\n<script>\\\\n require('blueimp-file-upload');\\\\n var modal = require('vue-strap').modal\\\\n export default {\\\\n /*\\\\n * The component's data.\\\\n */\\\\n data() {\\\\n return {\\\\n files: [],\\\\n displayImportModal: false,\\\\n activeFile: null,\\\\n alert: {\\\\n type: null,\\\\n message: null,\\\\n visible: false,\\\\n },\\\\n modal: {\\\\n importType: 'asset',\\\\n update: false,\\\\n importTypes: [\\\\n { id: 'asset', text: 'Assets' },\\\\n { id: 'accessory', text: 'Accessories' },\\\\n { id: 'consumable', text: 'Consumable' },\\\\n { id: 'component', text: 'Components' },\\\\n { id: 'license', text: 'Licenses' }\\\\n ],\\\\n statusText: null,\\\\n },\\\\n importErrors: null,\\\\n progress: {\\\\n currentClass: \\\\\\\"progress-bar-warning\\\\\\\",\\\\n currentPercent: \\\\\\\"0\\\\\\\",\\\\n statusText: '',\\\\n visible: false\\\\n }\\\\n };\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 2.x).\\\\n */\\\\n mounted() {\\\\n this.fetchFiles();\\\\n let vm = this;\\\\n $('#fileupload').fileupload({\\\\n dataType: 'json',\\\\n done(e, data) {\\\\n vm.progress.currentClass=\\\\\\\"progress-bar-success\\\\\\\";\\\\n vm.progress.statusText = \\\\\\\"Success!\\\\\\\";\\\\n vm.files = data.result.files.concat(vm.files);\\\\n },\\\\n add(e, data) {\\\\n data.headers = {\\\\n \\\\\\\"X-Requested-With\\\\\\\": 'XMLHttpRequest',\\\\n \\\\\\\"X-CSRF-TOKEN\\\\\\\": Laravel.csrfToken\\\\n };\\\\n data.process().done( () => {data.submit();});\\\\n vm.progress.visible=true;\\\\n },\\\\n progress(e, data) {\\\\n var progress = parseInt((data.loaded / data.total * 100, 10));\\\\n vm.progress.currentPercent = progress;\\\\n vm.progress.statusText = progress+'% Complete';\\\\n },\\\\n fail(e, data) {\\\\n vm.progress.currentClass = \\\\\\\"progress-bar-danger\\\\\\\";\\\\n // Display any errors returned from the $.ajax()\\\\n vm.progress.statusText = data.jqXHR.responseJSON.messages;\\\\n }\\\\n })\\\\n },\\\\n\\\\n methods: {\\\\n fetchFiles() {\\\\n this.$http.get('/api/v1/imports')\\\\n .then( ({data}) => this.files = data, // Success\\\\n //Fail\\\\n (response) => {\\\\n this.alert.type=\\\\\\\"danger\\\\\\\";\\\\n this.alert.visible=true;\\\\n this.alert.message=\\\\\\\"Something went wrong fetching files...\\\\\\\";\\\\n });\\\\n },\\\\n deleteFile(file, key) {\\\\n this.$http.delete(\\\\\\\"/api/v1/imports/\\\\\\\"+file.id)\\\\n .then((response) => this.files.splice(key, 1), // Success\\\\n (response) => {// Fail\\\\n this.alert.type=\\\\\\\"danger\\\\\\\";\\\\n this.alert.visible=true;\\\\n this.alert.message=response.body.messages;\\\\n }\\\\n );\\\\n },\\\\n showModal(file) {\\\\n this.activeFile = file;\\\\n this.displayImportModal = true;\\\\n },\\\\n\\\\n postSave() {\\\\n this.modal.statusText = \\\\\\\"Processing...\\\\\\\";\\\\n this.$http.post('/api/v1/imports/process/'+this.activeFile.id, {\\\\n 'import-update': this.modal.update,\\\\n 'import-type': this.modal.importType\\\\n }).then( (response) => {\\\\n // Success\\\\n this.modal.statusText = \\\\\\\"Success... Redirecting.\\\\\\\";\\\\n window.location.href = response.body.messages.redirect_url;\\\\n }, (response) => {\\\\n // Failure\\\\n if(response.body.status == 'import-errors') {\\\\n this.importErrors = response.body.messages;\\\\n } else {\\\\n this.alert.message= response.body.messages;\\\\n this.alert.type=\\\\\\\"danger\\\\\\\";\\\\n this.alert.visible=true;\\\\n }\\\\n this.displayImportModal=false;\\\\n });\\\\n }\\\\n\\\\n },\\\\n\\\\n computed: {\\\\n progressWidth() {\\\\n return \\\\\\\"width: \\\\\\\"+this.progress.currentPercent*10+'%';\\\\n }\\\\n },\\\\n\\\\n components: {\\\\n modal,\\\\n errors: require('./importer-errors.vue'),\\\\n alert: require('../alert.vue'),\\\\n select2: require('../select2.vue')\\\\n }\\\\n }\\\\n\\\\n</script>\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXIudnVlPzNiMGEiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cyA9IG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcI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BjbGFzcz1cXFwibW9kYWwtaGVhZGVyXFxcIj5cXG4gICAgICAgICAgICAgICAgPGg0IGNsYXNzPVxcXCJtb2RhbC10aXRsZVxcXCI+SW1wb3J0IEZpbGU6PC9oND5cXG4gICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8ZGl2IHNsb3Q9XFxcIm1vZGFsLWJvZHlcXFwiIGNsYXNzPVxcXCJtb2RhbC1ib2R5XFxcIj5cXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiZHluYW1pYy1mb3JtLXJvd1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJjb2wtbWQtNCBjb2wteHMtMTJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPVxcXCJpbXBvcnQtdHlwZVxcXCI+SW1wb3J0IFR5cGU6PC9sYWJlbD5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiY29sLW1kLTggY29sLXhzLTEyXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0MiA6b3B0aW9ucz1cXFwibW9kYWwuaW1wb3J0VHlwZXNcXFwiIHYtbW9kZWw9XFxcIm1vZGFsLmltcG9ydFR5cGVcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIGRpc2FibGVkIHZhbHVlPVxcXCIwXFxcIj48L29wdGlvbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdDI+XFxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJkeW5hbWljLWZvcm0tcm93XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImNvbC1tZC00IGNvbC14cy0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j5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImNvbC1tZC05XFxcIiB2LXNob3c9XFxcInByb2dyZXNzLnZpc2libGVcXFwiIHN0eWxlPVxcXCJwYWRkaW5nLWJvdHRvbToyMHB4XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiY29sLW1kLTExXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcInByb2dyZXNzIHByb2dyZXNzLXN0cmlwZWQtYWN0aXZlXFxcIiBzdHlsZT1cXFwibWFyZ2luLXRvcDogOHB4XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJwcm9ncmVzcy1iYXJcXFwiIDpjbGFzcz1cXFwicHJvZ3Jlc3MuY3VycmVudENsYXNzXFxcIiByb2xlPVxcXCJwcm9ncmVzc2JhclxcXCIgOnN0eWxlPVxcXCJwcm9ncmVzc1dpZHRoXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4+e3sgcHJvZ3Jlc3Muc3RhdHVzVGV4dCB9fTwvc3Bhbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwicm93XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJjb2wtbWQtMTJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGFibGUgY2xhc3M9XFxcInRhYmxlIHRhYmxlLXN0cmlwZWRcXFwiIGlkPVxcXCJ1cGxvYWQtdGFibGVcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoZWFkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD5GaWxlPC90aD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+Q3JlYXRlZDwvdGg+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoPlNpemU8L3RoPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD48L3RoPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90aGVhZD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0Ym9keT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1mb3I9XFxcImZpbGUgaW4gZmlsZXNcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+e3sgZmlsZS5maWxlX3BhdGggfX08L3RkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQ+e3sgZmlsZS5jcmVhdGVkX2F0IH19IDwvdGQ+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD57eyBmaWxlLmZpbGVzaXplIH19PC90ZD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz1cXFwiYnRuIGJ0bi1zbSBidG4taW5mb1xcXCIgQGNsaWNrPVxcXCJzaG93TW9kYWwoZmlsZSlcXFwiPjxpIGNsYXNzPVxcXCJmYSBmYS1zcGlubmVyIHByb2Nlc3NcXFwiPjwvaT5Qcm9jZXNzPC9idXR0b24+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIGNsYXNzPVxcXCJidG4gYnRuLXNtIGJ0bi1kYW5nZXJcXFwiIEBjbGljaz1cXFwiZGVsZXRlRmlsZShmaWxlKVxcXCI+PGkgY2xhc3M9XFxcImZhIGZhLXRyYXNoIGljb24td2hpdGVcXFwiPjwvaT48L2J1dHRvbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90Ym9keT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90YWJsZT5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgIDwvZGl2PlxcbiAgICA8L2Rpdj5cXG48L3RlbXBsYXRlPlxcblxcbjxzY3JpcHQ+XFxuICAgIHJlcXVpcmUoJ2JsdWVpbXAtZmlsZS11cGxvYWQnKTtcXG4gICAgdmFyIG1vZGFsID0gcmVxdWlyZSgndnVlLXN0cmFwJykubW9kYWxcXG4gICAgZXhwb3J0IGRlZmF1bHQge1xcbiAgICAgICAgLypcXG4gICAgICAgICAqIFRoZSBjb21wb25lbnQncyBkYXRhLlxcbiAgICAgICAgICovXFxuICAgICAgICBkYXRhKCkge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZpbGVzOiBbXSxcXG4gICAgICAgICAgICAgICAgZGlzcGxheUltcG9ydE1vZGFsOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgYWN0aXZlRmlsZTogbnVsbCxcXG4gICAgICAgICAgICAgICAgYWxlcnQ6IHtcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IG51bGwsXFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBudWxsLFxcbiAgICAgICAgICAgICAgICAgICAgdmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1vZGFsOiB7XFxuICAgICAgICAgICAgICAgICAgICBpbXBvcnRUeXBlOiAnYXNzZXQnLFxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGltcG9ydFR5cGVzOiBbXFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBpZDogJ2Fzc2V0JywgdGV4dDogJ0Fzc2V0cycgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB7IGlkOiAnYWNjZXNzb3J5JywgdGV4dDogJ0FjY2Vzc29yaWVzJyB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgaWQ6ICdjb25zdW1hYmxlJywgdGV4dDogJ0NvbnN1bWFibGUnIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBpZDogJ2NvbXBvbmVudCcsIHRleHQ6ICdDb21wb25lbnRzJyB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHsgaWQ6ICdsaWNlbnNlJywgdGV4dDogJ0xpY2Vuc2VzJyB9XFxuICAgICAgICAgICAgICAgICAgICBdLFxcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzVGV4dDogbnVsbCxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgaW1wb3J0RXJyb3JzOiBudWxsLFxcbiAgICAgICAgICAgICAgICBwcm9ncmVzczoge1xcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudENsYXNzOiBcXFwicHJvZ3Jlc3MtYmFyLXdhcm5pbmdcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudFBlcmNlbnQ6IFxcXCIwXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHN0YXR1c1RleHQ6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgdmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9LFxcblxcbiAgICAgICAgLyoqXFxuICAgICAgICAgKiBQcmVwYXJlIHRoZSBjb21wb25lbnQgKFZ1ZSAyLngpLlxcbiAgICAgICAgICovXFxuICAgICAgICBtb3VudGVkKCkge1xcbiAgICAgICAgICAgIHRoaXMuZmV0Y2hGaWxlcygpO1xcbiAgICAgICAgICAgIGxldCB2bSA9IHRoaXM7XFxuICAgICAgICAgICAgJCgnI2ZpbGV1cGxvYWQnKS5maWxldXBsb2FkKHtcXG4gICAgICAgICAgICAgICAgZGF0YVR5cGU6ICdqc29uJyxcXG4gICAgICAgICAgICAgICAgZG9uZShlLCBkYXRhKSB7XFxuICAgICAgICAgICAgICAgICAgICB2bS5wcm9ncmVzcy5jdXJyZW50Q2xhc3M9XFxcInByb2dyZXNzLWJhci1zdWNjZXNzXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLnN0YXR1c1RleHQgPSBcXFwiU3VjY2VzcyFcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgdm0uZmlsZXMgPSBkYXRhLnJlc3VsdC5maWxlcy5jb25jYXQodm0uZmlsZXMpO1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBhZGQoZSwgZGF0YSkge1xcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5oZWFkZXJzID0ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJYLVJlcXVlc3RlZC1XaXRoXFxcIjogJ1hNTEh0dHBSZXF1ZXN0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiWC1DU1JGLVRPS0VOXFxcIjogTGFyYXZlbC5jc3JmVG9rZW5cXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICBkYXRhLnByb2Nlc3MoKS5kb25lKCAoKSA9PiB7ZGF0YS5zdWJtaXQoKTt9KTtcXG4gICAgICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLnZpc2libGU9dHJ1ZTtcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgcHJvZ3Jlc3MoZSwgZGF0YSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHByb2dyZXNzID0gcGFyc2VJbnQoKGRhdGEubG9hZGVkIC8gZGF0YS50b3RhbCAqIDEwMCwgMTApKTtcXG4gICAgICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLmN1cnJlbnRQZXJjZW50ID0gcHJvZ3Jlc3M7XFxuICAgICAgICAgICAgICAgICAgICB2bS5wcm9ncmVzcy5zdGF0dXNUZXh0ID0gcHJvZ3Jlc3MrJyUgQ29tcGxldGUnO1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBmYWlsKGUsIGRhdGEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZtLnByb2dyZXNzLmN1cnJlbnRDbGFzcyA9IFxcXCJwcm9ncmVzcy1iYXItZGFuZ2VyXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIC8vIERpc3BsYXkgYW55IGVycm9ycyByZXR1cm5lZCBmcm9tIHRoZSAkLmFqYXgoKVxcbiAgICAgICAgICAgICAgICAgICAgdm0ucHJvZ3Jlc3Muc3RhdHVzVGV4dCA9IGRhdGEuanFYSFIucmVzcG9uc2VKU09OLm1lc3NhZ2VzO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICBtZXRob2RzOiB7XFxuICAgICAgICAgICAgZmV0Y2hGaWxlcygpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5nZXQoJy9hcGkvdjEvaW1wb3J0cycpXFxuICAgICAgICAgICAgICAgIC50aGVuKCAoe2RhdGF9KSA9PiB0aGlzLmZpbGVzID0gZGF0YSwgLy8gU3VjY2Vzc1xcbiAgICAgICAgICAgICAgICAgICAgLy9GYWlsXFxuICAgICAgICAgICAgICAgIChyZXNwb25zZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC50eXBlPVxcXCJkYW5nZXJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC52aXNpYmxlPXRydWU7XFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0Lm1lc3NhZ2U9XFxcIlNvbWV0aGluZyB3ZW50IHdyb25nIGZldGNoaW5nIGZpbGVzLi4uXFxcIjtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBkZWxldGVGaWxlKGZpbGUsIGtleSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLiRodHRwLmRlbGV0ZShcXFwiL2FwaS92MS9pbXBvcnRzL1xcXCIrZmlsZS5pZClcXG4gICAgICAgICAgICAgICAgLnRoZW4oKHJlc3BvbnNlKSA9PiB0aGlzLmZpbGVzLnNwbGljZShrZXksIDEpLCAvLyBTdWNjZXNzXFxuICAgICAgICAgICAgICAgICAgICAocmVzcG9uc2UpID0+IHsvLyBGYWlsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC50eXBlPVxcXCJkYW5nZXJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQudmlzaWJsZT10cnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQubWVzc2FnZT1yZXNwb25zZS5ib2R5Lm1lc3NhZ2VzO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICApO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgc2hvd01vZGFsKGZpbGUpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy5hY3RpdmVGaWxlID0gZmlsZTtcXG4gICAgICAgICAgICAgICAgdGhpcy5kaXNwbGF5SW1wb3J0TW9kYWwgPSB0cnVlO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgcG9zdFNhdmUoKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMubW9kYWwuc3RhdHVzVGV4dCA9IFxcXCJQcm9jZXNzaW5nLi4uXFxcIjtcXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5wb3N0KCcvYXBpL3YxL2ltcG9ydHMvcHJvY2Vzcy8nK3RoaXMuYWN0aXZlRmlsZS5pZCwge1xcbiAgICAgICAgICAgICAgICAgICAgJ2ltcG9ydC11cGRhdGUnOiB0aGlzLm1vZGFsLnVwZGF0ZSxcXG4gICAgICAgICAgICAgICAgICAgICdpbXBvcnQtdHlwZSc6IHRoaXMubW9kYWwuaW1wb3J0VHlwZVxcbiAgICAgICAgICAgICAgICB9KS50aGVuKCAocmVzcG9uc2UpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIFN1Y2Nlc3NcXG4gICAgICAgICAgICAgICAgICAgIHRoaXMubW9kYWwuc3RhdHVzVGV4dCA9IFxcXCJTdWNjZXNzLi4uIFJlZGlyZWN0aW5nLlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24uaHJlZiA9IHJlc3BvbnNlLmJvZHkubWVzc2FnZXMucmVkaXJlY3RfdXJsO1xcbiAgICAgICAgICAgICAgICB9LCAocmVzcG9uc2UpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIEZhaWx1cmVcXG4gICAgICAgICAgICAgICAgICAgIGlmKHJlc3BvbnNlLmJvZHkuc3RhdHVzID09ICdpbXBvcnQtZXJyb3JzJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuaW1wb3J0RXJyb3JzID0gcmVzcG9uc2UuYm9keS5tZXNzYWdlcztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5hbGVydC5tZXNzYWdlPSByZXNwb25zZS5ib2R5Lm1lc3NhZ2VzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuYWxlcnQudHlwZT1cXFwiZGFuZ2VyXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmFsZXJ0LnZpc2libGU9dHJ1ZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGlzcGxheUltcG9ydE1vZGFsPWZhbHNlO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICB9LFxcblxcbiAgICAgICAgY29tcHV0ZWQ6IHtcXG4gICAgICAgICAgICBwcm9ncmVzc1dpZHRoKCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcIndpZHRoOiBcXFwiK3RoaXMucHJvZ3Jlc3MuY3VycmVudFBlcmNlbnQqMTArJyUnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sXFxuXFxuICAgICAgICBjb21wb25lbnRzOiB7XFxuICAgICAgICAgICAgbW9kYWwsXFxuICAgICAgICAgICAgZXJyb3JzOiByZXF1aXJlKCcuL2ltcG9ydGVyLWVycm9ycy52dWUnKSxcXG4gICAgICAgICAgICBhbGVydDogcmVxdWlyZSgnLi4vYWxlcnQudnVlJyksXFxuICAgICAgICAgICAgc2VsZWN0MjogcmVxdWlyZSgnLi4vc2VsZWN0Mi52dWUnKVxcbiAgICAgICAgfVxcbiAgICB9XFxuXFxuPC9zY3JpcHQ+XFxuXCJdLFwic291cmNlUm9vdFwiOlwid2VicGFjazovL1wifV0pO1xuXG4vLyBleHBvcnRzXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vY3NzLWxvYWRlcj9zb3VyY2VNYXAhLi9+L3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi01MzAxYTIzNiZzY29wZWQ9dHJ1ZSEuL34vdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9pbXBvcnRlci9pbXBvcnRlci52dWVcbi8vIG1vZHVsZSBpZCA9IDIxXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[],\\\"names\\\":[],\\\"mappings\\\":\\\"\\\",\\\"file\\\":\\\"importer-errors.vue\\\",\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXItZXJyb3JzLnZ1ZT8zYWQ2Il0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydHMgPSBtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCIuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyL2xpYi9jc3MtYmFzZS5qc1wiKSgpO1xuLy8gaW1wb3J0c1xuXG5cbi8vIG1vZHVsZVxuZXhwb3J0cy5wdXNoKFttb2R1bGUuaWQsIFwiXFxuXFxuXCIsIFwiXCIsIHtcInZlcnNpb25cIjozLFwic291cmNlc1wiOltdLFwibmFtZXNcIjpbXSxcIm1hcHBpbmdzXCI6XCJcIixcImZpbGVcIjpcImltcG9ydGVyLWVycm9ycy52dWVcIixcInNvdXJjZVJvb3RcIjpcIndlYnBhY2s6Ly9cIn1dKTtcblxuLy8gZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2Nzcy1sb2FkZXI/c291cmNlTWFwIS4vfi92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlci5qcz9pZD1kYXRhLXYtNTY2N2MzMTImc2NvcGVkPXRydWUhLi9+L3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXItZXJyb3JzLnZ1ZVxuLy8gbW9kdWxlIGlkID0gMjJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n.action-link[data-v-de0d0e4e] {\\\\n cursor: pointer;\\\\n}\\\\n.m-b-none[data-v-de0d0e4e] {\\\\n margin-bottom: 0;\\\\n}\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./resources/assets/js/components/passport/AuthorizedClients.vue?a99076c0\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AACA;IACA,gBAAA;CACA;AAEA;IACA,iBAAA;CACA\\\",\\\"file\\\":\\\"AuthorizedClients.vue\\\",\\\"sourcesContent\\\":[\\\"<style scoped>\\\\n .action-link {\\\\n cursor: pointer;\\\\n }\\\\n\\\\n .m-b-none {\\\\n margin-bottom: 0;\\\\n }\\\\n</style>\\\\n\\\\n<template>\\\\n <div>\\\\n <div v-if=\\\\\\\"tokens.length > 0\\\\\\\">\\\\n <div class=\\\\\\\"panel panel-default\\\\\\\">\\\\n <div class=\\\\\\\"panel-heading\\\\\\\">Authorized Applications</div>\\\\n\\\\n <div class=\\\\\\\"panel-body\\\\\\\">\\\\n <!-- Authorized Tokens -->\\\\n <table class=\\\\\\\"table table-borderless m-b-none\\\\\\\">\\\\n <thead>\\\\n <tr>\\\\n <th>Name</th>\\\\n <th>Scopes</th>\\\\n <th></th>\\\\n </tr>\\\\n </thead>\\\\n\\\\n <tbody>\\\\n <tr v-for=\\\\\\\"token in tokens\\\\\\\">\\\\n <!-- Client Name -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n {{ token.client.name }}\\\\n </td>\\\\n\\\\n <!-- Scopes -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <span v-if=\\\\\\\"token.scopes.length > 0\\\\\\\">\\\\n {{ token.scopes.join(', ') }}\\\\n </span>\\\\n </td>\\\\n\\\\n <!-- Revoke Button -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <a class=\\\\\\\"action-link text-danger\\\\\\\" @click=\\\\\\\"revoke(token)\\\\\\\">\\\\n Revoke\\\\n </a>\\\\n </td>\\\\n </tr>\\\\n </tbody>\\\\n </table>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n</template>\\\\n\\\\n<script>\\\\n export default {\\\\n /*\\\\n * The component's data.\\\\n */\\\\n data() {\\\\n return {\\\\n tokens: []\\\\n };\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 1.x).\\\\n */\\\\n ready() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 2.x).\\\\n */\\\\n mounted() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n methods: {\\\\n /**\\\\n * Prepare the component (Vue 2.x).\\\\n */\\\\n prepareComponent() {\\\\n this.getTokens();\\\\n },\\\\n\\\\n /**\\\\n * Get all of the authorized tokens for the user.\\\\n */\\\\n getTokens() {\\\\n this.$http.get('/oauth/tokens')\\\\n .then(response => {\\\\n this.tokens = response.data;\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Revoke the given token.\\\\n */\\\\n revoke(token) {\\\\n this.$http.delete('/oauth/tokens/' + token.id)\\\\n .then(response => {\\\\n this.getTokens();\\\\n });\\\\n }\\\\n }\\\\n }\\\\n</script>\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQXV0aG9yaXplZENsaWVudHMudnVlPzA2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0cyA9IG1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvbGliL2Nzcy1iYXNlLmpzXCIpKCk7XG4vLyBpbXBvcnRzXG5cblxuLy8gbW9kdWxlXG5leHBvcnRzLnB1c2goW21vZHVsZS5pZCwgXCJcXG4uYWN0aW9uLWxpbmtbZGF0YS12LWRlMGQwZTRlXSB7XFxuICAgIGN1cnNvcjogcG9pbnRlcjtcXG59XFxuLm0tYi1ub25lW2RhdGEtdi1kZTBkMGU0ZV0ge1xcbi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ICAgPHRoZWFkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+TmFtZTwvdGg+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+U2NvcGVzPC90aD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD48L3RoPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGhlYWQ+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgPHRib2R5PlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1mb3I9XFxcInRva2VuIGluIHRva2Vuc1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tIENsaWVudCBOYW1lIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVxcXCJ2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgdG9rZW4uY2xpZW50Lm5hbWUgfX1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tIFNjb3BlcyAtLT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT1cXFwidmVydGljYWwtYWxpZ246IG1pZGRsZTtcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIHYtaWY9XFxcInRva2VuLnNjb3Blcy5sZW5ndGggPiAwXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3sgdG9rZW4uc2NvcGVzLmpvaW4oJywgJykgfX1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBSZXZva2UgQnV0dG9uIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVxcXCJ2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XFxcImFjdGlvbi1saW5rIHRleHQtZGFuZ2VyXFxcIiBAY2xpY2s9XFxcInJldm9rZSh0b2tlbilcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXZva2VcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvdGJvZHk+XFxuICAgICAgICAgICAgICAgICAgICA8L3RhYmxlPlxcbiAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgIDwvZGl2PlxcbiAgICA8L2Rpdj5cXG48L3RlbXBsYXRlPlxcblxcbjxzY3JpcHQ+XFxuICAgIGV4cG9ydCBkZWZhdWx0IHtcXG4gICAgICAgIC8qXFxuICAgICAgICAgKiBUaGUgY29tcG9uZW50J3MgZGF0YS5cXG4gICAgICAgICAqL1xcbiAgICAgICAgZGF0YSgpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICB0b2tlbnM6IFtdXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICAvKipcXG4gICAgICAgICAqIFByZXBhcmUgdGhlIGNvbXBvbmVudCAoVnVlIDEueCkuXFxuICAgICAgICAgKi9cXG4gICAgICAgIHJlYWR5KCkge1xcbiAgICAgICAgICAgIHRoaXMucHJlcGFyZUNvbXBvbmVudCgpO1xcbiAgICAgICAgfSxcXG5cXG4gICAgICAgIC8qKlxcbiAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cXG4gICAgICAgICAqL1xcbiAgICAgICAgbW91bnRlZCgpIHtcXG4gICAgICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICBtZXRob2RzOiB7XFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBwcmVwYXJlQ29tcG9uZW50KCkge1xcbiAgICAgICAgICAgICAgICB0aGlzLmdldFRva2VucygpO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogR2V0IGFsbCBvZiB0aGUgYXV0aG9yaXplZCB0b2tlbnMgZm9yIHRoZSB1c2VyLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGdldFRva2VucygpIHtcXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5nZXQoJy9vYXV0aC90b2tlbnMnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy50b2tlbnMgPSByZXNwb25zZS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogUmV2b2tlIHRoZSBnaXZlbiB0b2tlbi5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICByZXZva2UodG9rZW4pIHtcXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cC5kZWxldGUoJy9vYXV0aC90b2tlbnMvJyArIHRva2VuLmlkKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5nZXRUb2tlbnMoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1cXG48L3NjcmlwdD5cXG5cIl0sXCJzb3VyY2VSb290XCI6XCJ3ZWJwYWNrOi8vXCJ9XSk7XG5cbi8vIGV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi9jc3MtbG9hZGVyP3NvdXJjZU1hcCEuL34vdnVlLWxvYWRlci9saWIvc3R5bGUtcmV3cml0ZXIuanM/aWQ9ZGF0YS12LWRlMGQwZTRlJnNjb3BlZD10cnVlIS4vfi92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXN0eWxlcyZpbmRleD0wIS4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L0F1dGhvcml6ZWRDbGllbnRzLnZ1ZVxuLy8gbW9kdWxlIGlkID0gMjNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n.action-link[data-v-e9c80318] {\\\\n cursor: pointer;\\\\n}\\\\n.m-b-none[data-v-e9c80318] {\\\\n margin-bottom: 0;\\\\n}\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./resources/assets/js/components/passport/Clients.vue?35867ce4\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AACA;IACA,gBAAA;CACA;AAEA;IACA,iBAAA;CACA\\\",\\\"file\\\":\\\"Clients.vue\\\",\\\"sourcesContent\\\":[\\\"<style scoped>\\\\n .action-link {\\\\n cursor: pointer;\\\\n }\\\\n\\\\n .m-b-none {\\\\n margin-bottom: 0;\\\\n }\\\\n</style>\\\\n\\\\n<template>\\\\n <div>\\\\n <div class=\\\\\\\"panel panel-default\\\\\\\">\\\\n <div class=\\\\\\\"panel-heading\\\\\\\">\\\\n <div style=\\\\\\\"display: flex; justify-content: space-between; align-items: center;\\\\\\\">\\\\n <span>\\\\n OAuth Clients\\\\n </span>\\\\n\\\\n <a class=\\\\\\\"action-link\\\\\\\" @click=\\\\\\\"showCreateClientForm\\\\\\\">\\\\n Create New Client\\\\n </a>\\\\n </div>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"panel-body\\\\\\\">\\\\n <!-- Current Clients -->\\\\n <p class=\\\\\\\"m-b-none\\\\\\\" v-if=\\\\\\\"clients.length === 0\\\\\\\">\\\\n You have not created any OAuth clients.\\\\n </p>\\\\n\\\\n <table class=\\\\\\\"table table-borderless m-b-none\\\\\\\" v-if=\\\\\\\"clients.length > 0\\\\\\\">\\\\n <thead>\\\\n <tr>\\\\n <th>Client ID</th>\\\\n <th>Name</th>\\\\n <th>Secret</th>\\\\n <th></th>\\\\n <th></th>\\\\n </tr>\\\\n </thead>\\\\n\\\\n <tbody>\\\\n <tr v-for=\\\\\\\"client in clients\\\\\\\">\\\\n <!-- ID -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n {{ client.id }}\\\\n </td>\\\\n\\\\n <!-- Name -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n {{ client.name }}\\\\n </td>\\\\n\\\\n <!-- Secret -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <code>{{ client.secret }}</code>\\\\n </td>\\\\n\\\\n <!-- Edit Button -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <a class=\\\\\\\"action-link\\\\\\\" @click=\\\\\\\"edit(client)\\\\\\\">\\\\n Edit\\\\n </a>\\\\n </td>\\\\n\\\\n <!-- Delete Button -->\\\\n <td style=\\\\\\\"vertical-align: middle;\\\\\\\">\\\\n <a class=\\\\\\\"action-link text-danger\\\\\\\" @click=\\\\\\\"destroy(client)\\\\\\\">\\\\n Delete\\\\n </a>\\\\n </td>\\\\n </tr>\\\\n </tbody>\\\\n </table>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Create Client Modal -->\\\\n <div class=\\\\\\\"modal fade\\\\\\\" id=\\\\\\\"modal-create-client\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" role=\\\\\\\"dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-content\\\\\\\">\\\\n <div class=\\\\\\\"modal-header\\\\\\\">\\\\n <button type=\\\\\\\"button \\\\\\\" class=\\\\\\\"close\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\">&times;</button>\\\\n\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\">\\\\n Create Client\\\\n </h4>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"modal-body\\\\\\\">\\\\n <!-- Form Errors -->\\\\n <div class=\\\\\\\"alert alert-danger\\\\\\\" v-if=\\\\\\\"createForm.errors.length > 0\\\\\\\">\\\\n <p><strong>Whoops!</strong> Something went wrong!</p>\\\\n <br>\\\\n <ul>\\\\n <li v-for=\\\\\\\"error in createForm.errors\\\\\\\">\\\\n {{ error }}\\\\n </li>\\\\n </ul>\\\\n </div>\\\\n\\\\n <!-- Create Client Form -->\\\\n <form class=\\\\\\\"form-horizontal\\\\\\\" role=\\\\\\\"form\\\\\\\">\\\\n <!-- Name -->\\\\n <div class=\\\\\\\"form-group\\\\\\\">\\\\n <label class=\\\\\\\"col-md-3 control-label\\\\\\\">Name</label>\\\\n\\\\n <div class=\\\\\\\"col-md-7\\\\\\\">\\\\n <input id=\\\\\\\"create-client-name\\\\\\\" type=\\\\\\\"text\\\\\\\" class=\\\\\\\"form-control\\\\\\\"\\\\n @keyup.enter=\\\\\\\"store\\\\\\\" v-model=\\\\\\\"createForm.name\\\\\\\">\\\\n\\\\n <span class=\\\\\\\"help-block\\\\\\\">\\\\n Something your users will recognize and trust.\\\\n </span>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Redirect URL -->\\\\n <div class=\\\\\\\"form-group\\\\\\\">\\\\n <label class=\\\\\\\"col-md-3 control-label\\\\\\\">Redirect URL</label>\\\\n\\\\n <div class=\\\\\\\"col-md-7\\\\\\\">\\\\n <input type=\\\\\\\"text\\\\\\\" class=\\\\\\\"form-control\\\\\\\" name=\\\\\\\"redirect\\\\\\\"\\\\n @keyup.enter=\\\\\\\"store\\\\\\\" v-model=\\\\\\\"createForm.redirect\\\\\\\">\\\\n\\\\n <span class=\\\\\\\"help-block\\\\\\\">\\\\n Your application's authorization callback URL.\\\\n </span>\\\\n </div>\\\\n </div>\\\\n </form>\\\\n </div>\\\\n\\\\n <!-- Modal Actions -->\\\\n <div class=\\\\\\\"modal-footer\\\\\\\">\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\">Close</button>\\\\n\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-primary\\\\\\\" @click=\\\\\\\"store\\\\\\\">\\\\n Create\\\\n </button>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Edit Client Modal -->\\\\n <div class=\\\\\\\"modal fade\\\\\\\" id=\\\\\\\"modal-edit-client\\\\\\\" tabindex=\\\\\\\"-1\\\\\\\" role=\\\\\\\"dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-dialog\\\\\\\">\\\\n <div class=\\\\\\\"modal-content\\\\\\\">\\\\n <div class=\\\\\\\"modal-header\\\\\\\">\\\\n <button type=\\\\\\\"button \\\\\\\" class=\\\\\\\"close\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\">&times;</button>\\\\n\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\">\\\\n Edit Client\\\\n </h4>\\\\n </div>\\\\n\\\\n <div class=\\\\\\\"modal-body\\\\\\\">\\\\n <!-- Form Errors -->\\\\n <div class=\\\\\\\"alert alert-danger\\\\\\\" v-if=\\\\\\\"editForm.errors.length > 0\\\\\\\">\\\\n <p><strong>Whoops!</strong> Something went wrong!</p>\\\\n <br>\\\\n <ul>\\\\n <li v-for=\\\\\\\"error in editForm.errors\\\\\\\">\\\\n {{ error }}\\\\n </li>\\\\n </ul>\\\\n </div>\\\\n\\\\n <!-- Edit Client Form -->\\\\n <form class=\\\\\\\"form-horizontal\\\\\\\" role=\\\\\\\"form\\\\\\\">\\\\n <!-- Name -->\\\\n <div class=\\\\\\\"form-group\\\\\\\">\\\\n <label class=\\\\\\\"col-md-3 control-label\\\\\\\">Name</label>\\\\n\\\\n <div class=\\\\\\\"col-md-7\\\\\\\">\\\\n <input id=\\\\\\\"edit-client-name\\\\\\\" type=\\\\\\\"text\\\\\\\" class=\\\\\\\"form-control\\\\\\\"\\\\n @keyup.enter=\\\\\\\"update\\\\\\\" v-model=\\\\\\\"editForm.name\\\\\\\">\\\\n\\\\n <span class=\\\\\\\"help-block\\\\\\\">\\\\n Something your users will recognize and trust.\\\\n </span>\\\\n </div>\\\\n </div>\\\\n\\\\n <!-- Redirect URL -->\\\\n <div class=\\\\\\\"form-group\\\\\\\">\\\\n <label class=\\\\\\\"col-md-3 control-label\\\\\\\">Redirect URL</label>\\\\n\\\\n <div class=\\\\\\\"col-md-7\\\\\\\">\\\\n <input type=\\\\\\\"text\\\\\\\" class=\\\\\\\"form-control\\\\\\\" name=\\\\\\\"redirect\\\\\\\"\\\\n @keyup.enter=\\\\\\\"update\\\\\\\" v-model=\\\\\\\"editForm.redirect\\\\\\\">\\\\n\\\\n <span class=\\\\\\\"help-block\\\\\\\">\\\\n Your application's authorization callback URL.\\\\n </span>\\\\n </div>\\\\n </div>\\\\n </form>\\\\n </div>\\\\n\\\\n <!-- Modal Actions -->\\\\n <div class=\\\\\\\"modal-footer\\\\\\\">\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" data-dismiss=\\\\\\\"modal\\\\\\\">Close</button>\\\\n\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-primary\\\\\\\" @click=\\\\\\\"update\\\\\\\">\\\\n Save Changes\\\\n </button>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n </div>\\\\n</template>\\\\n\\\\n<script>\\\\n export default {\\\\n /*\\\\n * The component's data.\\\\n */\\\\n data() {\\\\n return {\\\\n clients: [],\\\\n\\\\n createForm: {\\\\n errors: [],\\\\n name: '',\\\\n redirect: ''\\\\n },\\\\n\\\\n editForm: {\\\\n errors: [],\\\\n name: '',\\\\n redirect: ''\\\\n }\\\\n };\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 1.x).\\\\n */\\\\n ready() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n /**\\\\n * Prepare the component (Vue 2.x).\\\\n */\\\\n mounted() {\\\\n this.prepareComponent();\\\\n },\\\\n\\\\n methods: {\\\\n /**\\\\n * Prepare the component.\\\\n */\\\\n prepareComponent() {\\\\n this.getClients();\\\\n\\\\n $('#modal-create-client').on('shown.bs.modal', () => {\\\\n $('#create-client-name').focus();\\\\n });\\\\n\\\\n $('#modal-edit-client').on('shown.bs.modal', () => {\\\\n $('#edit-client-name').focus();\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Get all of the OAuth clients for the user.\\\\n */\\\\n getClients() {\\\\n this.$http.get('/oauth/clients')\\\\n .then(response => {\\\\n this.clients = response.data;\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Show the form for creating new clients.\\\\n */\\\\n showCreateClientForm() {\\\\n $('#modal-create-client').modal('show');\\\\n },\\\\n\\\\n /**\\\\n * Create a new OAuth client for the user.\\\\n */\\\\n store() {\\\\n this.persistClient(\\\\n 'post', '/oauth/clients',\\\\n this.createForm, '#modal-create-client'\\\\n );\\\\n },\\\\n\\\\n /**\\\\n * Edit the given client.\\\\n */\\\\n edit(client) {\\\\n this.editForm.id = client.id;\\\\n this.editForm.name = client.name;\\\\n this.editForm.redirect = client.redirect;\\\\n\\\\n $('#modal-edit-client').modal('show');\\\\n },\\\\n\\\\n /**\\\\n * Update the client being edited.\\\\n */\\\\n update() {\\\\n this.persistClient(\\\\n 'put', '/oauth/clients/' + this.editForm.id,\\\\n this.editForm, '#modal-edit-client'\\\\n );\\\\n },\\\\n\\\\n /**\\\\n * Persist the client to storage using the given form.\\\\n */\\\\n persistClient(method, uri, form, modal) {\\\\n form.errors = [];\\\\n\\\\n this.$http[method](uri, form)\\\\n .then(response => {\\\\n this.getClients();\\\\n\\\\n form.name = '';\\\\n form.redirect = '';\\\\n form.errors = [];\\\\n\\\\n $(modal).modal('hide');\\\\n })\\\\n .catch(response => {\\\\n if (typeof response.data === 'object') {\\\\n form.errors = _.flatten(_.toArray(response.data));\\\\n } else {\\\\n form.errors = ['Something went wrong. Please try again.'];\\\\n }\\\\n });\\\\n },\\\\n\\\\n /**\\\\n * Destroy the given client.\\\\n */\\\\n destroy(client) {\\\\n this.$http.delete('/oauth/clients/' + client.id)\\\\n .then(response => {\\\\n this.getClients();\\\\n });\\\\n }\\\\n }\\\\n }\\\\n</script>\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJz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gcGFuZWwtZGVmYXVsdFxcXCI+XFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwicGFuZWwtaGVhZGluZ1xcXCI+XFxuICAgICAgICAgICAgICAgIDxkaXYgc3R5bGU9XFxcImRpc3BsYXk6IGZsZXg7IGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjsgYWxpZ24taXRlbXM6IGNlbnRlcjtcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgPHNwYW4+XFxuICAgICAgICAgICAgICAgICAgICAgICAgT0F1dGggQ2xpZW50c1xcbiAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxcblxcbiAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XFxcImFjdGlvbi1saW5rXFxcIiBAY2xpY2s9XFxcInNob3dDcmVhdGVDbGllbnRGb3JtXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGUgTmV3IENsaWVudFxcbiAgICAgICAgICAgICAgICAgICAgPC9hPlxcbiAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJwYW5lbC1ib2R5XFxcIj5cXG4gICAgICAgICAgICAgICAgPCEtLSBDdXJyZW50IENsaWVudHMgLS0+XFxuICAgICAgICAgICAgICAgIDxwIGNsYXNzPVxcXCJtLWItbm9uZVxcXCIgdi1pZj1cXFwiY2xpZW50cy5sZW5ndGggPT09IDBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgWW91IGhhdmUgbm90IGNyZWF0ZWQgYW55IE9BdXRoIGNsaWVudHMuXFxuICAgICAgICAgICAgICAgIDwvcD5cXG5cXG4gICAgICAgICAgICAgICAgPHRhYmxlIGNsYXNzPVxcXCJ0YWJsZSB0YWJsZS1ib3JkZXJsZXNzIG0tYi1ub25lXFxcIiB2LWlmPVxcXCJjbGllbnRzLmxlbmd0aCA+IDBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgPHRoZWFkPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDx0cj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoPkNsaWVudCBJRDwvdGg+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD5OYW1lPC90aD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRoPlNlY3JldDwvdGg+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0aD48L3RoPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGg+PC90aD5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3RyPlxcbiAgICAgICAgICAgICAgICAgICAgPC90aGVhZD5cXG5cXG4gICAgICAgICAgICAgICAgICAgIDx0Ym9keT5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8dHIgdi1mb3I9XFxcImNsaWVudCBpbiBjbGllbnRzXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBJRCAtLT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVxcXCJ2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBjbGllbnQuaWQgfX1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC90ZD5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBOYW1lIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9XFxcInZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IGNsaWVudC5uYW1lIH19XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gU2VjcmV0IC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9XFxcInZlcnRpY2FsLWFsaWduOiBtaWRkbGU7XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxjb2RlPnt7IGNsaWVudC5zZWNyZXQgfX08L2NvZGU+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gRWRpdCBCdXR0b24gLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT1cXFwidmVydGljYWwtYWxpZ246IG1pZGRsZTtcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XFxcImFjdGlvbi1saW5rXFxcIiBAY2xpY2s9XFxcImVkaXQoY2xpZW50KVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWRpdFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9hPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3RkPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tIERlbGV0ZSBCdXR0b24gLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZCBzdHlsZT1cXFwidmVydGljYWwtYWxpZ246IG1pZGRsZTtcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9XFxcImFjdGlvbi1saW5rIHRleHQtZGFuZ2VyXFxcIiBAY2xpY2s9XFxcImRlc3Ryb3koY2xpZW50KVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVsZXRlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2E+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvdGQ+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC90cj5cXG4gICAgICAgICAgICAgICAgICAgIDwvdGJvZHk+XFxuICAgICAgICAgICAgICAgIDwvdGFibGU+XFxuICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgIDwhLS0gQ3JlYXRlIENsaWVudCBNb2RhbCAtLT5cXG4gICAgICAgIDxkaXYgY2xhc3M9XFxcIm1vZGFsIGZhZGVcXFwiIGlkPVxcXCJtb2RhbC1jcmVhdGUtY2xpZW50XFxcIiB0YWJpbmRleD1cXFwiLTFcXFwiIHJvbGU9XFxcImRpYWxvZ1xcXCI+XFxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtZGlhbG9nXFxcIj5cXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtY29udGVudFxcXCI+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbC1oZWFkZXJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cXFwiYnV0dG9uIFxcXCIgY2xhc3M9XFxcImNsb3NlXFxcIiBkYXRhLWRpc21pc3M9XFxcIm1vZGFsXFxcIiBhcmlhLWhpZGRlbj1cXFwidHJ1ZVxcXCI+JnRpbWVzOzwvYnV0dG9uPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxoNCBjbGFzcz1cXFwibW9kYWwtdGl0bGVcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGUgQ2xpZW50XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9oND5cXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcblxcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwibW9kYWwtYm9keVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBGb3JtIEVycm9ycyAtLT5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJhbGVydCBhbGVydC1kYW5nZXJcXFwiIHYtaWY9XFxcImNyZWF0ZUZvcm0uZXJyb3JzLmxlbmd0aCA+IDBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD48c3Ryb25nPldob29wcyE8L3N0cm9uZz4gU29tZXRoaW5nIHdlbnQgd3JvbmchPC9wPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx1bD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaSB2LWZvcj1cXFwiZXJyb3IgaW4gY3JlYXRlRm9ybS5lcnJvcnNcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IGVycm9yIH19XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2xpPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3VsPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gQ3JlYXRlIENsaWVudCBGb3JtIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxmb3JtIGNsYXNzPVxcXCJmb3JtLWhvcml6b250YWxcXFwiIHJvbGU9XFxcImZvcm1cXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8IS0tIE5hbWUgLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImZvcm0tZ3JvdXBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVxcXCJjb2wtbWQtMyBjb250cm9sLWxhYmVsXFxcIj5OYW1lPC9sYWJlbD5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImNvbC1tZC03XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgaWQ9XFxcImNyZWF0ZS1jbGllbnQtbmFtZVxcXCIgdHlwZT1cXFwidGV4dFxcXCIgY2xhc3M9XFxcImZvcm0tY29udHJvbFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGtleXVwLmVudGVyPVxcXCJzdG9yZVxcXCIgdi1tb2RlbD1cXFwiY3JlYXRlRm9ybS5uYW1lXFxcIj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cXFwiaGVscC1ibG9ja1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvbWV0aGluZyB5b3VyIHVzZXJzIHdpbGwgcmVjb2duaXplIGFuZCB0cnVzdC5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gUmVkaXJlY3QgVVJMIC0tPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJmb3JtLWdyb3VwXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsYWJlbCBjbGFzcz1cXFwiY29sLW1kLTMgY29udHJvbC1sYWJlbFxcXCI+UmVkaXJlY3QgVVJMPC9sYWJlbD5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImNvbC1tZC03XFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT1cXFwidGV4dFxcXCIgY2xhc3M9XFxcImZvcm0tY29udHJvbFxcXCIgbmFtZT1cXFwicmVkaXJlY3RcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBrZXl1cC5lbnRlcj1cXFwic3RvcmVcXFwiIHYtbW9kZWw9XFxcImNyZWF0ZUZvcm0ucmVkaXJlY3RcXFwiPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVxcXCJoZWxwLWJsb2NrXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWW91ciBhcHBsaWNhdGlvbidzIGF1dGhvcml6YXRpb24gY2FsbGJhY2sgVVJMLlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Zvcm0+XFxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgICAgICAgICAgICAgIDwhLS0gTW9kYWwgQWN0aW9ucyAtLT5cXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcIm1vZGFsLWZvb3RlclxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVxcXCJidXR0b25cXFwiIGNsYXNzPVxcXCJidG4gYnRuLWRlZmF1bHRcXFwiIGRhdGEtZGlzbWlzcz1cXFwibW9kYWxcXFwiPkNsb3NlPC9idXR0b24+XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVxcXCJidXR0b25cXFwiIGNsYXNzPVxcXCJidG4gYnRuLXByaW1hcnlcXFwiIEBjbGljaz1cXFwic3RvcmVcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGVcXG4gICAgICAgICAgICAgICAgICAgICAgIC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aXYgY2xhc3M9XFxcImFsZXJ0IGFsZXJ0LWRhbmdlclxcXCIgdi1pZj1cXFwiZWRpdEZvcm0uZXJyb3JzLmxlbmd0aCA+IDBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cD48c3Ryb25nPldob29wcyE8L3N0cm9uZz4gU29tZXRoaW5nIHdlbnQgd3JvbmchPC9wPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx1bD5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaSB2LWZvcj1cXFwiZXJyb3IgaW4gZWRpdEZvcm0uZXJyb3JzXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7eyBlcnJvciB9fVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9saT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC91bD5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICA8IS0tIEVkaXQgQ2xpZW50IEZvcm0gLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPGZvcm0gY2xhc3M9XFxcImZvcm0taG9yaXpvbnRhbFxcXCIgcm9sZT1cXFwiZm9ybVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gTmFtZSAtLT5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiZm9ybS1ncm91cFxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgY2xhc3M9XFxcImNvbC1tZC0zIGNvbnRyb2wtbGFiZWxcXFwiPk5hbWU8L2xhYmVsPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiY29sLW1kLTdcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCBpZD1cXFwiZWRpdC1jbGllbnQtbmFtZVxcXCIgdHlwZT1cXFwidGV4dFxcXCIgY2xhc3M9XFxcImZvcm0tY29udHJvbFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGtleXVwLmVudGVyPVxcXCJ1cGRhdGVcXFwiIHYtbW9kZWw9XFxcImVkaXRGb3JtLm5hbWVcXFwiPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPVxcXCJoZWxwLWJsb2NrXFxcIj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU29tZXRoaW5nIHlvdXIgdXNlcnMgd2lsbCByZWNvZ25pemUgYW5kIHRydXN0LlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSBSZWRpcmVjdCBVUkwgLS0+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XFxcImZvcm0tZ3JvdXBcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzPVxcXCJjb2wtbWQtMyBjb250cm9sLWxhYmVsXFxcIj5SZWRpcmVjdCBVUkw8L2xhYmVsPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cXFwiY29sLW1kLTdcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPVxcXCJ0ZXh0XFxcIiBjbGFzcz1cXFwiZm9ybS1jb250cm9sXFxcIiBuYW1lPVxcXCJyZWRpcmVjdFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGtleXVwLmVudGVyPVxcXCJ1cGRhdGVcXFwiIHYtbW9kZWw9XFxcImVkaXRGb3JtLnJlZGlyZWN0XFxcIj5cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cXFwiaGVscC1ibG9ja1xcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFlvdXIgYXBwbGljYXRpb24ncyBhdXRob3JpemF0aW9uIGNhbGxiYWNrIFVSTC5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9mb3JtPlxcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuXFxuICAgICAgICAgICAgICAgICAgICA8IS0tIE1vZGFsIEFjdGlvbnMgLS0+XFxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVxcXCJtb2RhbC1mb290ZXJcXFwiPlxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cXFwiYnV0dG9uXFxcIiBjbGFzcz1cXFwiYnRuIGJ0bi1kZWZhdWx0XFxcIiBkYXRhLWRpc21pc3M9XFxcIm1vZGFsXFxcIj5DbG9zZTwvYnV0dG9uPlxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxidXR0b24gdHlwZT1cXFwiYnV0dG9uXFxcIiBjbGFzcz1cXFwiYnRuIGJ0bi1wcmltYXJ5XFxcIiBAY2xpY2s9XFxcInVwZGF0ZVxcXCI+XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNhdmUgQ2hhbmdlc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvYnV0dG9uPlxcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxuICAgICAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgICAgIDwvZGl2PlxcbiAgICAgICAgPC9kaXY+XFxuICAgIDwvZGl2PlxcbjwvdGVtcGxhdGU+XFxuXFxuPHNjcmlwdD5cXG4gICAgZXhwb3J0IGRlZmF1bHQge1xcbiAgICAgICAgLypcXG4gICAgICAgICAqIFRoZSBjb21wb25lbnQncyBkYXRhLlxcbiAgICAgICAgICovXFxuICAgICAgICBkYXRhKCkge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGNsaWVudHM6IFtdLFxcblxcbiAgICAgICAgICAgICAgICBjcmVhdGVGb3JtOiB7XFxuICAgICAgICAgICAgICAgICAgICBlcnJvcnM6IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogJycsXFxuICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogJydcXG4gICAgICAgICAgICAgICAgfSxcXG5cXG4gICAgICAgICAgICAgICAgZWRpdEZvcm06IHtcXG4gICAgICAgICAgICAgICAgICAgIGVycm9yczogW10sXFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiAnJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICAvKipcXG4gICAgICAgICAqIFByZXBhcmUgdGhlIGNvbXBvbmVudCAoVnVlIDEueCkuXFxuICAgICAgICAgKi9cXG4gICAgICAgIHJlYWR5KCkge1xcbiAgICAgICAgICAgIHRoaXMucHJlcGFyZUNvbXBvbmVudCgpO1xcbiAgICAgICAgfSxcXG5cXG4gICAgICAgIC8qKlxcbiAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50IChWdWUgMi54KS5cXG4gICAgICAgICAqL1xcbiAgICAgICAgbW91bnRlZCgpIHtcXG4gICAgICAgICAgICB0aGlzLnByZXBhcmVDb21wb25lbnQoKTtcXG4gICAgICAgIH0sXFxuXFxuICAgICAgICBtZXRob2RzOiB7XFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogUHJlcGFyZSB0aGUgY29tcG9uZW50LlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHByZXBhcmVDb21wb25lbnQoKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q2xpZW50cygpO1xcblxcbiAgICAgICAgICAgICAgICAkKCcjbW9kYWwtY3JlYXRlLWNsaWVudCcpLm9uKCdzaG93bi5icy5tb2RhbCcsICgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICQoJyNjcmVhdGUtY2xpZW50LW5hbWUnKS5mb2N1cygpO1xcbiAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgJCgnI21vZGFsLWVkaXQtY2xpZW50Jykub24oJ3Nob3duLmJzLm1vZGFsJywgKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgJCgnI2VkaXQtY2xpZW50LW5hbWUnKS5mb2N1cygpO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIEdldCBhbGwgb2YgdGhlIE9BdXRoIGNsaWVudHMgZm9yIHRoZSB1c2VyLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGdldENsaWVudHMoKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMuJGh0dHAuZ2V0KCcvb2F1dGgvY2xpZW50cycpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4ocmVzcG9uc2UgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNsaWVudHMgPSByZXNwb25zZS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogU2hvdyB0aGUgZm9ybSBmb3IgY3JlYXRpbmcgbmV3IGNsaWVudHMuXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgc2hvd0NyZWF0ZUNsaWVudEZvcm0oKSB7XFxuICAgICAgICAgICAgICAgICQoJyNtb2RhbC1jcmVhdGUtY2xpZW50JykubW9kYWwoJ3Nob3cnKTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIENyZWF0ZSBhIG5ldyBPQXV0aCBjbGllbnQgZm9yIHRoZSB1c2VyLlxcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIHN0b3JlKCkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnBlcnNpc3RDbGllbnQoXFxuICAgICAgICAgICAgICAgICAgICAncG9zdCcsICcvb2F1dGgvY2xpZW50cycsXFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUZvcm0sICcjbW9kYWwtY3JlYXRlLWNsaWVudCdcXG4gICAgICAgICAgICAgICAgKTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIEVkaXQgdGhlIGdpdmVuIGNsaWVudC5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBlZGl0KGNsaWVudCkge1xcbiAgICAgICAgICAgICAgICB0aGlzLmVkaXRGb3JtLmlkID0gY2xpZW50LmlkO1xcbiAgICAgICAgICAgICAgICB0aGlzLmVkaXRGb3JtLm5hbWUgPSBjbGllbnQubmFtZTtcXG4gICAgICAgICAgICAgICAgdGhpcy5lZGl0Rm9ybS5yZWRpcmVjdCA9IGNsaWVudC5yZWRpcmVjdDtcXG5cXG4gICAgICAgICAgICAgICAgJCgnI21vZGFsLWVkaXQtY2xpZW50JykubW9kYWwoJ3Nob3cnKTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIFVwZGF0ZSB0aGUgY2xpZW50IGJlaW5nIGVkaXRlZC5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICB1cGRhdGUoKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMucGVyc2lzdENsaWVudChcXG4gICAgICAgICAgICAgICAgICAgICdwdXQnLCAnL29hdXRoL2NsaWVudHMvJyArIHRoaXMuZWRpdEZvcm0uaWQsXFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmVkaXRGb3JtLCAnI21vZGFsLWVkaXQtY2xpZW50J1xcbiAgICAgICAgICAgICAgICApO1xcbiAgICAgICAgICAgIH0sXFxuXFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICogUGVyc2lzdCB0aGUgY2xpZW50IHRvIHN0b3JhZ2UgdXNpbmcgdGhlIGdpdmVuIGZvcm0uXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgcGVyc2lzdENsaWVudChtZXRob2QsIHVyaSwgZm9ybSwgbW9kYWwpIHtcXG4gICAgICAgICAgICAgICAgZm9ybS5lcnJvcnMgPSBbXTtcXG5cXG4gICAgICAgICAgICAgICAgdGhpcy4kaHR0cFttZXRob2RdKHVyaSwgZm9ybSlcXG4gICAgICAgICAgICAgICAgICAgIC50aGVuKHJlc3BvbnNlID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdldENsaWVudHMoKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtLm5hbWUgPSAnJztcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JtLnJlZGlyZWN0ID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9ybS5lcnJvcnMgPSBbXTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAkKG1vZGFsKS5tb2RhbCgnaGlkZScpO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIC5jYXRjaChyZXNwb25zZSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiByZXNwb25zZS5kYXRhID09PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtLmVycm9ycyA9IF8uZmxhdHRlbihfLnRvQXJyYXkocmVzcG9uc2UuZGF0YSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm0uZXJyb3JzID0gWydTb21ldGhpbmcgd2VudCB3cm9uZy4gUGxlYXNlIHRyeSBhZ2Fpbi4nXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9LFxcblxcbiAgICAgICAgICAgIC8qKlxcbiAgICAgICAgICAgICAqIERlc3Ryb3kgdGhlIGdpdmVuIGNsaWVudC5cXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBkZXN0cm95KGNsaWVudCkge1xcbiAgICAgICAgICAgICAgICB0aGlzLiRodHRwLmRlbGV0ZSgnL29hdXRoL2NsaWVudHMvJyArIGNsaWVudC5pZClcXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihyZXNwb25zZSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q2xpZW50cygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcbjwvc2NyaXB0PlxcblwiXSxcInNvdXJjZVJvb3RcIjpcIndlYnBhY2s6Ly9cIn1dKTtcblxuLy8gZXhwb3J0c1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2Nzcy1sb2FkZXI/c291cmNlTWFwIS4vfi92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlci5qcz9pZD1kYXRhLXYtZTljODAzMTgmc2NvcGVkPXRydWUhLi9+L3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQ2xpZW50cy52dWVcbi8vIG1vZHVsZSBpZCA9IDI0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"exports = module.exports = __webpack_require__(0)();\\n// imports\\n\\n\\n// module\\nexports.push([module.i, \\\"\\\\n\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[],\\\"names\\\":[],\\\"mappings\\\":\\\"\\\",\\\"file\\\":\\\"select2.vue\\\",\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\n// exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvc2VsZWN0Mi52dWU/MTkwOCJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKFwiLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvY3NzLWxvYWRlci9saWIvY3NzLWJhc2UuanNcIikoKTtcbi8vIGltcG9ydHNcblxuXG4vLyBtb2R1bGVcbmV4cG9ydHMucHVzaChbbW9kdWxlLmlkLCBcIlxcblxcblwiLCBcIlwiLCB7XCJ2ZXJzaW9uXCI6MyxcInNvdXJjZXNcIjpbXSxcIm5hbWVzXCI6W10sXCJtYXBwaW5nc1wiOlwiXCIsXCJmaWxlXCI6XCJzZWxlY3QyLnZ1ZVwiLFwic291cmNlUm9vdFwiOlwid2VicGFjazovL1wifV0pO1xuXG4vLyBleHBvcnRzXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vY3NzLWxvYWRlcj9zb3VyY2VNYXAhLi9+L3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi1mZjU2NGE4NiZzY29wZWQ9dHJ1ZSEuL34vdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9zZWxlY3QyLnZ1ZVxuLy8gbW9kdWxlIGlkID0gMjVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;( function( factory ) {\\n\\tif ( true ) {\\n\\n\\t\\t// AMD. Register as an anonymous module.\\n\\t\\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n\\t} else {\\n\\n\\t\\t// Browser globals\\n\\t\\tfactory( jQuery );\\n\\t}\\n} ( function( $ ) {\\n\\n$.ui = $.ui || {};\\n\\nreturn $.ui.version = \\\"1.12.1\\\";\\n\\n} ) );\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L2pxdWVyeS11aS91aS92ZXJzaW9uLmpzP2JkNDEiXSwic291cmNlc0NvbnRlbnQiOlsiKCBmdW5jdGlvbiggZmFjdG9yeSApIHtcblx0aWYgKCB0eXBlb2YgZGVmaW5lID09PSBcImZ1bmN0aW9uXCIgJiYgZGVmaW5lLmFtZCApIHtcblxuXHRcdC8vIEFNRC4gUmVnaXN0ZXIgYXMgYW4gYW5vbnltb3VzIG1vZHVsZS5cblx0XHRkZWZpbmUoIFsgXCJqcXVlcnlcIiBdLCBmYWN0b3J5ICk7XG5cdH0gZWxzZSB7XG5cblx0XHQvLyBCcm93c2VyIGdsb2JhbHNcblx0XHRmYWN0b3J5KCBqUXVlcnkgKTtcblx0fVxufSAoIGZ1bmN0aW9uKCAkICkge1xuXG4kLnVpID0gJC51aSB8fCB7fTtcblxucmV0dXJuICQudWkudmVyc2lvbiA9IFwiMS4xMi4xXCI7XG5cbn0gKSApO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2pxdWVyeS11aS91aS92ZXJzaW9uLmpzXG4vLyBtb2R1bGUgaWQgPSAyNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!\\n * jQuery UI Widget 1.12.1\\n * http://jqueryui.com\\n *\\n * Copyright jQuery Foundation and other contributors\\n * Released under the MIT license.\\n * http://jquery.org/license\\n */\\n\\n//>>label: Widget\\n//>>group: Core\\n//>>description: Provides a factory for creating stateful widgets with a common API.\\n//>>docs: http://api.jqueryui.com/jQuery.widget/\\n//>>demos: http://jqueryui.com/widget/\\n\\n( function( factory ) {\\n\\tif ( true ) {\\n\\n\\t\\t// AMD. Register as an anonymous module.\\n\\t\\t!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3), __webpack_require__(26) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n\\t} else {\\n\\n\\t\\t// Browser globals\\n\\t\\tfactory( jQuery );\\n\\t}\\n}( function( $ ) {\\n\\nvar widgetUuid = 0;\\nvar widgetSlice = Array.prototype.slice;\\n\\n$.cleanData = ( function( orig ) {\\n\\treturn function( elems ) {\\n\\t\\tvar events, elem, i;\\n\\t\\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\\n\\t\\t\\ttry {\\n\\n\\t\\t\\t\\t// Only trigger remove when necessary to save time\\n\\t\\t\\t\\tevents = $._data( elem, \\\"events\\\" );\\n\\t\\t\\t\\tif ( events && events.remove ) {\\n\\t\\t\\t\\t\\t$( elem ).triggerHandler( \\\"remove\\\" );\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t// Http://bugs.jquery.com/ticket/8235\\n\\t\\t\\t} catch ( e ) {}\\n\\t\\t}\\n\\t\\torig( elems );\\n\\t};\\n} )( $.cleanData );\\n\\n$.widget = function( name, base, prototype ) {\\n\\tvar existingConstructor, constructor, basePrototype;\\n\\n\\t// ProxiedPrototype allows the provided prototype to remain unmodified\\n\\t// so that it can be used as a mixin for multiple widgets (#8876)\\n\\tvar proxiedPrototype = {};\\n\\n\\tvar namespace = name.split( \\\".\\\" )[ 0 ];\\n\\tname = name.split( \\\".\\\" )[ 1 ];\\n\\tvar fullName = namespace + \\\"-\\\" + name;\\n\\n\\tif ( !prototype ) {\\n\\t\\tprototype = base;\\n\\t\\tbase = $.Widget;\\n\\t}\\n\\n\\tif ( $.isArray( prototype ) ) {\\n\\t\\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\\n\\t}\\n\\n\\t// Create selector for plugin\\n\\t$.expr[ \\\":\\\" ][ fullName.toLowerCase() ] = function( elem ) {\\n\\t\\treturn !!$.data( elem, fullName );\\n\\t};\\n\\n\\t$[ namespace ] = $[ namespace ] || {};\\n\\texistingConstructor = $[ namespace ][ name ];\\n\\tconstructor = $[ namespace ][ name ] = function( options, element ) {\\n\\n\\t\\t// Allow instantiation without \\\"new\\\" keyword\\n\\t\\tif ( !this._createWidget ) {\\n\\t\\t\\treturn new constructor( options, element );\\n\\t\\t}\\n\\n\\t\\t// Allow instantiation without initializing for simple inheritance\\n\\t\\t// must use \\\"new\\\" keyword (the code above always passes args)\\n\\t\\tif ( arguments.length ) {\\n\\t\\t\\tthis._createWidget( options, element );\\n\\t\\t}\\n\\t};\\n\\n\\t// Extend with the existing constructor to carry over any static properties\\n\\t$.extend( constructor, existingConstructor, {\\n\\t\\tversion: prototype.version,\\n\\n\\t\\t// Copy the object used to create the prototype in case we need to\\n\\t\\t// redefine the widget later\\n\\t\\t_proto: $.extend( {}, prototype ),\\n\\n\\t\\t// Track widgets that inherit from this widget in case this widget is\\n\\t\\t// redefined after a widget inherits from it\\n\\t\\t_childConstructors: []\\n\\t} );\\n\\n\\tbasePrototype = new base();\\n\\n\\t// We need to make the options hash a property directly on the new instance\\n\\t// otherwise we'll modify the options hash on the prototype that we're\\n\\t// inheriting from\\n\\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\\n\\t$.each( prototype, function( prop, value ) {\\n\\t\\tif ( !$.isFunction( value ) ) {\\n\\t\\t\\tproxiedPrototype[ prop ] = value;\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\tproxiedPrototype[ prop ] = ( function() {\\n\\t\\t\\tfunction _super() {\\n\\t\\t\\t\\treturn base.prototype[ prop ].apply( this, arguments );\\n\\t\\t\\t}\\n\\n\\t\\t\\tfunction _superApply( args ) {\\n\\t\\t\\t\\treturn base.prototype[ prop ].apply( this, args );\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn function() {\\n\\t\\t\\t\\tvar __super = this._super;\\n\\t\\t\\t\\tvar __superApply = this._superApply;\\n\\t\\t\\t\\tvar returnValue;\\n\\n\\t\\t\\t\\tthis._super = _super;\\n\\t\\t\\t\\tthis._superApply = _superApply;\\n\\n\\t\\t\\t\\treturnValue = value.apply( this, arguments );\\n\\n\\t\\t\\t\\tthis._super = __super;\\n\\t\\t\\t\\tthis._superApply = __superApply;\\n\\n\\t\\t\\t\\treturn returnValue;\\n\\t\\t\\t};\\n\\t\\t} )();\\n\\t} );\\n\\tconstructor.prototype = $.widget.extend( basePrototype, {\\n\\n\\t\\t// TODO: remove support for widgetEventPrefix\\n\\t\\t// always use the name + a colon as the prefix, e.g., draggable:start\\n\\t\\t// don't prefix for widgets that aren't DOM-based\\n\\t\\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\\n\\t}, proxiedPrototype, {\\n\\t\\tconstructor: constructor,\\n\\t\\tnamespace: namespace,\\n\\t\\twidgetName: name,\\n\\t\\twidgetFullName: fullName\\n\\t} );\\n\\n\\t// If this widget is being redefined then we need to find all widgets that\\n\\t// are inheriting from it and redefine all of them so that they inherit from\\n\\t// the new version of this widget. We're essentially trying to replace one\\n\\t// level in the prototype chain.\\n\\tif ( existingConstructor ) {\\n\\t\\t$.each( existingConstructor._childConstructors, function( i, child ) {\\n\\t\\t\\tvar childPrototype = child.prototype;\\n\\n\\t\\t\\t// Redefine the child widget using the same prototype that was\\n\\t\\t\\t// originally used, but inherit from the new version of the base\\n\\t\\t\\t$.widget( childPrototype.namespace + \\\".\\\" + childPrototype.widgetName, constructor,\\n\\t\\t\\t\\tchild._proto );\\n\\t\\t} );\\n\\n\\t\\t// Remove the list of existing child constructors from the old constructor\\n\\t\\t// so the old child constructors can be garbage collected\\n\\t\\tdelete existingConstructor._childConstructors;\\n\\t} else {\\n\\t\\tbase._childConstructors.push( constructor );\\n\\t}\\n\\n\\t$.widget.bridge( name, constructor );\\n\\n\\treturn constructor;\\n};\\n\\n$.widget.extend = function( target ) {\\n\\tvar input = widgetSlice.call( arguments, 1 );\\n\\tvar inputIndex = 0;\\n\\tvar inputLength = input.length;\\n\\tvar key;\\n\\tvar value;\\n\\n\\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\\n\\t\\tfor ( key in input[ inputIndex ] ) {\\n\\t\\t\\tvalue = input[ inputIndex ][ key ];\\n\\t\\t\\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\\n\\n\\t\\t\\t\\t// Clone objects\\n\\t\\t\\t\\tif ( $.isPlainObject( value ) ) {\\n\\t\\t\\t\\t\\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\\n\\t\\t\\t\\t\\t\\t$.widget.extend( {}, target[ key ], value ) :\\n\\n\\t\\t\\t\\t\\t\\t// Don't extend strings, arrays, etc. with objects\\n\\t\\t\\t\\t\\t\\t$.widget.extend( {}, value );\\n\\n\\t\\t\\t\\t// Copy everything else by reference\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\ttarget[ key ] = value;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\treturn target;\\n};\\n\\n$.widget.bridge = function( name, object ) {\\n\\tvar fullName = object.prototype.widgetFullName || name;\\n\\t$.fn[ name ] = function( options ) {\\n\\t\\tvar isMethodCall = typeof options === \\\"string\\\";\\n\\t\\tvar args = widgetSlice.call( arguments, 1 );\\n\\t\\tvar returnValue = this;\\n\\n\\t\\tif ( isMethodCall ) {\\n\\n\\t\\t\\t// If this is an empty collection, we need to have the instance method\\n\\t\\t\\t// return undefined instead of the jQuery instance\\n\\t\\t\\tif ( !this.length && options === \\\"instance\\\" ) {\\n\\t\\t\\t\\treturnValue = undefined;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tthis.each( function() {\\n\\t\\t\\t\\t\\tvar methodValue;\\n\\t\\t\\t\\t\\tvar instance = $.data( this, fullName );\\n\\n\\t\\t\\t\\t\\tif ( options === \\\"instance\\\" ) {\\n\\t\\t\\t\\t\\t\\treturnValue = instance;\\n\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tif ( !instance ) {\\n\\t\\t\\t\\t\\t\\treturn $.error( \\\"cannot call methods on \\\" + name +\\n\\t\\t\\t\\t\\t\\t\\t\\\" prior to initialization; \\\" +\\n\\t\\t\\t\\t\\t\\t\\t\\\"attempted to call method '\\\" + options + \\\"'\\\" );\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tif ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === \\\"_\\\" ) {\\n\\t\\t\\t\\t\\t\\treturn $.error( \\\"no such method '\\\" + options + \\\"' for \\\" + name +\\n\\t\\t\\t\\t\\t\\t\\t\\\" widget instance\\\" );\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\tmethodValue = instance[ options ].apply( instance, args );\\n\\n\\t\\t\\t\\t\\tif ( methodValue !== instance && methodValue !== undefined ) {\\n\\t\\t\\t\\t\\t\\treturnValue = methodValue && methodValue.jquery ?\\n\\t\\t\\t\\t\\t\\t\\treturnValue.pushStack( methodValue.get() ) :\\n\\t\\t\\t\\t\\t\\t\\tmethodValue;\\n\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} );\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\n\\t\\t\\t// Allow multiple hashes to be passed on init\\n\\t\\t\\tif ( args.length ) {\\n\\t\\t\\t\\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\\n\\t\\t\\t}\\n\\n\\t\\t\\tthis.each( function() {\\n\\t\\t\\t\\tvar instance = $.data( this, fullName );\\n\\t\\t\\t\\tif ( instance ) {\\n\\t\\t\\t\\t\\tinstance.option( options || {} );\\n\\t\\t\\t\\t\\tif ( instance._init ) {\\n\\t\\t\\t\\t\\t\\tinstance._init();\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$.data( this, fullName, new object( options, this ) );\\n\\t\\t\\t\\t}\\n\\t\\t\\t} );\\n\\t\\t}\\n\\n\\t\\treturn returnValue;\\n\\t};\\n};\\n\\n$.Widget = function( /* options, element */ ) {};\\n$.Widget._childConstructors = [];\\n\\n$.Widget.prototype = {\\n\\twidgetName: \\\"widget\\\",\\n\\twidgetEventPrefix: \\\"\\\",\\n\\tdefaultElement: \\\"<div>\\\",\\n\\n\\toptions: {\\n\\t\\tclasses: {},\\n\\t\\tdisabled: false,\\n\\n\\t\\t// Callbacks\\n\\t\\tcreate: null\\n\\t},\\n\\n\\t_createWidget: function( options, element ) {\\n\\t\\telement = $( element || this.defaultElement || this )[ 0 ];\\n\\t\\tthis.element = $( element );\\n\\t\\tthis.uuid = widgetUuid++;\\n\\t\\tthis.eventNamespace = \\\".\\\" + this.widgetName + this.uuid;\\n\\n\\t\\tthis.bindings = $();\\n\\t\\tthis.hoverable = $();\\n\\t\\tthis.focusable = $();\\n\\t\\tthis.classesElementLookup = {};\\n\\n\\t\\tif ( element !== this ) {\\n\\t\\t\\t$.data( element, this.widgetFullName, this );\\n\\t\\t\\tthis._on( true, this.element, {\\n\\t\\t\\t\\tremove: function( event ) {\\n\\t\\t\\t\\t\\tif ( event.target === element ) {\\n\\t\\t\\t\\t\\t\\tthis.destroy();\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t} );\\n\\t\\t\\tthis.document = $( element.style ?\\n\\n\\t\\t\\t\\t// Element within the document\\n\\t\\t\\t\\telement.ownerDocument :\\n\\n\\t\\t\\t\\t// Element is window or document\\n\\t\\t\\t\\telement.document || element );\\n\\t\\t\\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\\n\\t\\t}\\n\\n\\t\\tthis.options = $.widget.extend( {},\\n\\t\\t\\tthis.options,\\n\\t\\t\\tthis._getCreateOptions(),\\n\\t\\t\\toptions );\\n\\n\\t\\tthis._create();\\n\\n\\t\\tif ( this.options.disabled ) {\\n\\t\\t\\tthis._setOptionDisabled( this.options.disabled );\\n\\t\\t}\\n\\n\\t\\tthis._trigger( \\\"create\\\", null, this._getCreateEventData() );\\n\\t\\tthis._init();\\n\\t},\\n\\n\\t_getCreateOptions: function() {\\n\\t\\treturn {};\\n\\t},\\n\\n\\t_getCreateEventData: $.noop,\\n\\n\\t_create: $.noop,\\n\\n\\t_init: $.noop,\\n\\n\\tdestroy: function() {\\n\\t\\tvar that = this;\\n\\n\\t\\tthis._destroy();\\n\\t\\t$.each( this.classesElementLookup, function( key, value ) {\\n\\t\\t\\tthat._removeClass( value, key );\\n\\t\\t} );\\n\\n\\t\\t// We can probably remove the unbind calls in 2.0\\n\\t\\t// all event bindings should go through this._on()\\n\\t\\tthis.element\\n\\t\\t\\t.off( this.eventNamespace )\\n\\t\\t\\t.removeData( this.widgetFullName );\\n\\t\\tthis.widget()\\n\\t\\t\\t.off( this.eventNamespace )\\n\\t\\t\\t.removeAttr( \\\"aria-disabled\\\" );\\n\\n\\t\\t// Clean up events and states\\n\\t\\tthis.bindings.off( this.eventNamespace );\\n\\t},\\n\\n\\t_destroy: $.noop,\\n\\n\\twidget: function() {\\n\\t\\treturn this.element;\\n\\t},\\n\\n\\toption: function( key, value ) {\\n\\t\\tvar options = key;\\n\\t\\tvar parts;\\n\\t\\tvar curOption;\\n\\t\\tvar i;\\n\\n\\t\\tif ( arguments.length === 0 ) {\\n\\n\\t\\t\\t// Don't return a reference to the internal hash\\n\\t\\t\\treturn $.widget.extend( {}, this.options );\\n\\t\\t}\\n\\n\\t\\tif ( typeof key === \\\"string\\\" ) {\\n\\n\\t\\t\\t// Handle nested keys, e.g., \\\"foo.bar\\\" => { foo: { bar: ___ } }\\n\\t\\t\\toptions = {};\\n\\t\\t\\tparts = key.split( \\\".\\\" );\\n\\t\\t\\tkey = parts.shift();\\n\\t\\t\\tif ( parts.length ) {\\n\\t\\t\\t\\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\\n\\t\\t\\t\\tfor ( i = 0; i < parts.length - 1; i++ ) {\\n\\t\\t\\t\\t\\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\\n\\t\\t\\t\\t\\tcurOption = curOption[ parts[ i ] ];\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tkey = parts.pop();\\n\\t\\t\\t\\tif ( arguments.length === 1 ) {\\n\\t\\t\\t\\t\\treturn curOption[ key ] === undefined ? null : curOption[ key ];\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcurOption[ key ] = value;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tif ( arguments.length === 1 ) {\\n\\t\\t\\t\\t\\treturn this.options[ key ] === undefined ? null : this.options[ key ];\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\toptions[ key ] = value;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tthis._setOptions( options );\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\t_setOptions: function( options ) {\\n\\t\\tvar key;\\n\\n\\t\\tfor ( key in options ) {\\n\\t\\t\\tthis._setOption( key, options[ key ] );\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\t_setOption: function( key, value ) {\\n\\t\\tif ( key === \\\"classes\\\" ) {\\n\\t\\t\\tthis._setOptionClasses( value );\\n\\t\\t}\\n\\n\\t\\tthis.options[ key ] = value;\\n\\n\\t\\tif ( key === \\\"disabled\\\" ) {\\n\\t\\t\\tthis._setOptionDisabled( value );\\n\\t\\t}\\n\\n\\t\\treturn this;\\n\\t},\\n\\n\\t_setOptionClasses: function( value ) {\\n\\t\\tvar classKey, elements, currentElements;\\n\\n\\t\\tfor ( classKey in value ) {\\n\\t\\t\\tcurrentElements = this.classesElementLookup[ classKey ];\\n\\t\\t\\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\\n\\t\\t\\t\\t\\t!currentElements ||\\n\\t\\t\\t\\t\\t!currentElements.length ) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// We are doing this to create a new jQuery object because the _removeClass() call\\n\\t\\t\\t// on the next line is going to destroy the reference to the current elements being\\n\\t\\t\\t// tracked. We need to save a copy of this collection so that we can add the new classes\\n\\t\\t\\t// below.\\n\\t\\t\\telements = $( currentElements.get() );\\n\\t\\t\\tthis._removeClass( currentElements, classKey );\\n\\n\\t\\t\\t// We don't use _addClass() here, because that uses this.options.classes\\n\\t\\t\\t// for generating the string of classes. We want to use the value passed in from\\n\\t\\t\\t// _setOption(), this is the new value of the classes option which was passed to\\n\\t\\t\\t// _setOption(). We pass this value directly to _classes().\\n\\t\\t\\telements.addClass( this._classes( {\\n\\t\\t\\t\\telement: elements,\\n\\t\\t\\t\\tkeys: classKey,\\n\\t\\t\\t\\tclasses: value,\\n\\t\\t\\t\\tadd: true\\n\\t\\t\\t} ) );\\n\\t\\t}\\n\\t},\\n\\n\\t_setOptionDisabled: function( value ) {\\n\\t\\tthis._toggleClass( this.widget(), this.widgetFullName + \\\"-disabled\\\", null, !!value );\\n\\n\\t\\t// If the widget is becoming disabled, then nothing is interactive\\n\\t\\tif ( value ) {\\n\\t\\t\\tthis._removeClass( this.hoverable, null, \\\"ui-state-hover\\\" );\\n\\t\\t\\tthis._removeClass( this.focusable, null, \\\"ui-state-focus\\\" );\\n\\t\\t}\\n\\t},\\n\\n\\tenable: function() {\\n\\t\\treturn this._setOptions( { disabled: false } );\\n\\t},\\n\\n\\tdisable: function() {\\n\\t\\treturn this._setOptions( { disabled: true } );\\n\\t},\\n\\n\\t_classes: function( options ) {\\n\\t\\tvar full = [];\\n\\t\\tvar that = this;\\n\\n\\t\\toptions = $.extend( {\\n\\t\\t\\telement: this.element,\\n\\t\\t\\tclasses: this.options.classes || {}\\n\\t\\t}, options );\\n\\n\\t\\tfunction processClassString( classes, checkOption ) {\\n\\t\\t\\tvar current, i;\\n\\t\\t\\tfor ( i = 0; i < classes.length; i++ ) {\\n\\t\\t\\t\\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\\n\\t\\t\\t\\tif ( options.add ) {\\n\\t\\t\\t\\t\\tcurrent = $( $.unique( current.get().concat( options.element.get() ) ) );\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tcurrent = $( current.not( options.element ).get() );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tthat.classesElementLookup[ classes[ i ] ] = current;\\n\\t\\t\\t\\tfull.push( classes[ i ] );\\n\\t\\t\\t\\tif ( checkOption && options.classes[ classes[ i ] ] ) {\\n\\t\\t\\t\\t\\tfull.push( options.classes[ classes[ i ] ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tthis._on( options.element, {\\n\\t\\t\\t\\\"remove\\\": \\\"_untrackClassesElement\\\"\\n\\t\\t} );\\n\\n\\t\\tif ( options.keys ) {\\n\\t\\t\\tprocessClassString( options.keys.match( /\\\\S+/g ) || [], true );\\n\\t\\t}\\n\\t\\tif ( options.extra ) {\\n\\t\\t\\tprocessClassString( options.extra.match( /\\\\S+/g ) || [] );\\n\\t\\t}\\n\\n\\t\\treturn full.join( \\\" \\\" );\\n\\t},\\n\\n\\t_untrackClassesElement: function( event ) {\\n\\t\\tvar that = this;\\n\\t\\t$.each( that.classesElementLookup, function( key, value ) {\\n\\t\\t\\tif ( $.inArray( event.target, value ) !== -1 ) {\\n\\t\\t\\t\\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\t_removeClass: function( element, keys, extra ) {\\n\\t\\treturn this._toggleClass( element, keys, extra, false );\\n\\t},\\n\\n\\t_addClass: function( element, keys, extra ) {\\n\\t\\treturn this._toggleClass( element, keys, extra, true );\\n\\t},\\n\\n\\t_toggleClass: function( element, keys, extra, add ) {\\n\\t\\tadd = ( typeof add === \\\"boolean\\\" ) ? add : extra;\\n\\t\\tvar shift = ( typeof element === \\\"string\\\" || element === null ),\\n\\t\\t\\toptions = {\\n\\t\\t\\t\\textra: shift ? keys : extra,\\n\\t\\t\\t\\tkeys: shift ? element : keys,\\n\\t\\t\\t\\telement: shift ? this.element : element,\\n\\t\\t\\t\\tadd: add\\n\\t\\t\\t};\\n\\t\\toptions.element.toggleClass( this._classes( options ), add );\\n\\t\\treturn this;\\n\\t},\\n\\n\\t_on: function( suppressDisabledCheck, element, handlers ) {\\n\\t\\tvar delegateElement;\\n\\t\\tvar instance = this;\\n\\n\\t\\t// No suppressDisabledCheck flag, shuffle arguments\\n\\t\\tif ( typeof suppressDisabledCheck !== \\\"boolean\\\" ) {\\n\\t\\t\\thandlers = element;\\n\\t\\t\\telement = suppressDisabledCheck;\\n\\t\\t\\tsuppressDisabledCheck = false;\\n\\t\\t}\\n\\n\\t\\t// No element argument, shuffle and use this.element\\n\\t\\tif ( !handlers ) {\\n\\t\\t\\thandlers = element;\\n\\t\\t\\telement = this.element;\\n\\t\\t\\tdelegateElement = this.widget();\\n\\t\\t} else {\\n\\t\\t\\telement = delegateElement = $( element );\\n\\t\\t\\tthis.bindings = this.bindings.add( element );\\n\\t\\t}\\n\\n\\t\\t$.each( handlers, function( event, handler ) {\\n\\t\\t\\tfunction handlerProxy() {\\n\\n\\t\\t\\t\\t// Allow widgets to customize the disabled handling\\n\\t\\t\\t\\t// - disabled as an array instead of boolean\\n\\t\\t\\t\\t// - disabled class as method for disabling individual parts\\n\\t\\t\\t\\tif ( !suppressDisabledCheck &&\\n\\t\\t\\t\\t\\t\\t( instance.options.disabled === true ||\\n\\t\\t\\t\\t\\t\\t$( this ).hasClass( \\\"ui-state-disabled\\\" ) ) ) {\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn ( typeof handler === \\\"string\\\" ? instance[ handler ] : handler )\\n\\t\\t\\t\\t\\t.apply( instance, arguments );\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Copy the guid so direct unbinding works\\n\\t\\t\\tif ( typeof handler !== \\\"string\\\" ) {\\n\\t\\t\\t\\thandlerProxy.guid = handler.guid =\\n\\t\\t\\t\\t\\thandler.guid || handlerProxy.guid || $.guid++;\\n\\t\\t\\t}\\n\\n\\t\\t\\tvar match = event.match( /^([\\\\w:-]*)\\\\s*(.*)$/ );\\n\\t\\t\\tvar eventName = match[ 1 ] + instance.eventNamespace;\\n\\t\\t\\tvar selector = match[ 2 ];\\n\\n\\t\\t\\tif ( selector ) {\\n\\t\\t\\t\\tdelegateElement.on( eventName, selector, handlerProxy );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\telement.on( eventName, handlerProxy );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\t_off: function( element, eventName ) {\\n\\t\\teventName = ( eventName || \\\"\\\" ).split( \\\" \\\" ).join( this.eventNamespace + \\\" \\\" ) +\\n\\t\\t\\tthis.eventNamespace;\\n\\t\\telement.off( eventName ).off( eventName );\\n\\n\\t\\t// Clear the stack to avoid memory leaks (#10056)\\n\\t\\tthis.bindings = $( this.bindings.not( element ).get() );\\n\\t\\tthis.focusable = $( this.focusable.not( element ).get() );\\n\\t\\tthis.hoverable = $( this.hoverable.not( element ).get() );\\n\\t},\\n\\n\\t_delay: function( handler, delay ) {\\n\\t\\tfunction handlerProxy() {\\n\\t\\t\\treturn ( typeof handler === \\\"string\\\" ? instance[ handler ] : handler )\\n\\t\\t\\t\\t.apply( instance, arguments );\\n\\t\\t}\\n\\t\\tvar instance = this;\\n\\t\\treturn setTimeout( handlerProxy, delay || 0 );\\n\\t},\\n\\n\\t_hoverable: function( element ) {\\n\\t\\tthis.hoverable = this.hoverable.add( element );\\n\\t\\tthis._on( element, {\\n\\t\\t\\tmouseenter: function( event ) {\\n\\t\\t\\t\\tthis._addClass( $( event.currentTarget ), null, \\\"ui-state-hover\\\" );\\n\\t\\t\\t},\\n\\t\\t\\tmouseleave: function( event ) {\\n\\t\\t\\t\\tthis._removeClass( $( event.currentTarget ), null, \\\"ui-state-hover\\\" );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\t_focusable: function( element ) {\\n\\t\\tthis.focusable = this.focusable.add( element );\\n\\t\\tthis._on( element, {\\n\\t\\t\\tfocusin: function( event ) {\\n\\t\\t\\t\\tthis._addClass( $( event.currentTarget ), null, \\\"ui-state-focus\\\" );\\n\\t\\t\\t},\\n\\t\\t\\tfocusout: function( event ) {\\n\\t\\t\\t\\tthis._removeClass( $( event.currentTarget ), null, \\\"ui-state-focus\\\" );\\n\\t\\t\\t}\\n\\t\\t} );\\n\\t},\\n\\n\\t_trigger: function( type, event, data ) {\\n\\t\\tvar prop, orig;\\n\\t\\tvar callback = this.options[ type ];\\n\\n\\t\\tdata = data || {};\\n\\t\\tevent = $.Event( event );\\n\\t\\tevent.type = ( type === this.widgetEventPrefix ?\\n\\t\\t\\ttype :\\n\\t\\t\\tthis.widgetEventPrefix + type ).toLowerCase();\\n\\n\\t\\t// The original event may come from any element\\n\\t\\t// so we need to reset the target on the new event\\n\\t\\tevent.target = this.element[ 0 ];\\n\\n\\t\\t// Copy original event properties over to the new event\\n\\t\\torig = event.originalEvent;\\n\\t\\tif ( orig ) {\\n\\t\\t\\tfor ( prop in orig ) {\\n\\t\\t\\t\\tif ( !( prop in event ) ) {\\n\\t\\t\\t\\t\\tevent[ prop ] = orig[ prop ];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tthis.element.trigger( event, data );\\n\\t\\treturn !( $.isFunction( callback ) &&\\n\\t\\t\\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\\n\\t\\t\\tevent.isDefaultPrevented() );\\n\\t}\\n};\\n\\n$.each( { show: \\\"fadeIn\\\", hide: \\\"fadeOut\\\" }, function( method, defaultEffect ) {\\n\\t$.Widget.prototype[ \\\"_\\\" + method ] = function( element, options, callback ) {\\n\\t\\tif ( typeof options === \\\"string\\\" ) {\\n\\t\\t\\toptions = { effect: options };\\n\\t\\t}\\n\\n\\t\\tvar hasOptions;\\n\\t\\tvar effectName = !options ?\\n\\t\\t\\tmethod :\\n\\t\\t\\toptions === true || typeof options === \\\"number\\\" ?\\n\\t\\t\\t\\tdefaultEffect :\\n\\t\\t\\t\\toptions.effect || defaultEffect;\\n\\n\\t\\toptions = options || {};\\n\\t\\tif ( typeof options === \\\"number\\\" ) {\\n\\t\\t\\toptions = { duration: options };\\n\\t\\t}\\n\\n\\t\\thasOptions = !$.isEmptyObject( options );\\n\\t\\toptions.complete = callback;\\n\\n\\t\\tif ( options.delay ) {\\n\\t\\t\\telement.delay( options.delay );\\n\\t\\t}\\n\\n\\t\\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\\n\\t\\t\\telement[ method ]( options );\\n\\t\\t} else if ( effectName !== method && element[ effectName ] ) {\\n\\t\\t\\telement[ effectName ]( options.duration, options.easing, callback );\\n\\t\\t} else {\\n\\t\\t\\telement.queue( function( next ) {\\n\\t\\t\\t\\t$( this )[ method ]();\\n\\t\\t\\t\\tif ( callback ) {\\n\\t\\t\\t\\t\\tcallback.call( element[ 0 ] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tnext();\\n\\t\\t\\t} );\\n\\t\\t}\\n\\t};\\n} );\\n\\nreturn $.widget;\\n\\n} ) );\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L2pxdWVyeS11aS91aS93aWRnZXQuanM/NDliZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiFcbiAqIGpRdWVyeSBVSSBXaWRnZXQgMS4xMi4xXG4gKiBodHRwOi8vanF1ZXJ5dWkuY29tXG4gKlxuICogQ29weXJpZ2h0IGpRdWVyeSBGb3VuZGF0aW9uIGFuZCBvdGhlciBjb250cmlidXRvcnNcbiAqIFJlbGVhc2VkIHVuZGVyIHRoZSBNSVQgbGljZW5zZS5cbiAqIGh0dHA6Ly9qcXVlcnkub3JnL2xpY2Vuc2VcbiAqL1xuXG4vLz4+bGFiZWw6IFdpZGdldFxuLy8+Pmdyb3VwOiBDb3JlXG4vLz4+ZGVzY3JpcHRpb246IFByb3ZpZGVzIGEgZmFjdG9yeSBmb3IgY3JlYXRpbmcgc3RhdGVmdWwgd2lkZ2V0cyB3aXRoIGEgY29tbW9uIEFQSS5cbi8vPj5kb2NzOiBodHRwOi8vYXBpLmpxdWVyeXVpLmNvbS9qUXVlcnkud2lkZ2V0L1xuLy8+PmRlbW9zOiBodHRwOi8vanF1ZXJ5dWkuY29tL3dpZGdldC9cblxuKCBmdW5jdGlvbiggZmFjdG9yeSApIHtcblx0aWYgKCB0eXBlb2YgZGVmaW5lID09PSBcImZ1bmN0aW9uXCIgJiYgZGVmaW5lLmFtZCApIHtcblxuXHRcdC8vIEFNRC4gUmVnaXN0ZXIgYXMgYW4gYW5vbnltb3VzIG1vZHVsZS5cblx0XHRkZWZpbmUoIFsgXCJqcXV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DQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 28 */\n/***/ function(module, exports) {\n\neval(\"module.exports = function(module) {\\r\\n\\tif(!module.webpackPolyfill) {\\r\\n\\t\\tmodule.deprecate = function() {};\\r\\n\\t\\tmodule.paths = [];\\r\\n\\t\\t// module.parent = undefined by default\\r\\n\\t\\tif(!module.children) module.children = [];\\r\\n\\t\\tObject.defineProperty(module, \\\"loaded\\\", {\\r\\n\\t\\t\\tenumerable: true,\\r\\n\\t\\t\\tconfigurable: false,\\r\\n\\t\\t\\tget: function() { return module.l; }\\r\\n\\t\\t});\\r\\n\\t\\tObject.defineProperty(module, \\\"id\\\", {\\r\\n\\t\\t\\tenumerable: true,\\r\\n\\t\\t\\tconfigurable: false,\\r\\n\\t\\t\\tget: function() { return module.i; }\\r\\n\\t\\t});\\r\\n\\t\\tmodule.webpackPolyfill = 1;\\r\\n\\t}\\r\\n\\treturn module;\\r\\n}\\r\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vKHdlYnBhY2spL2J1aWxkaW4vbW9kdWxlLmpzP2MzYzIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbihtb2R1bGUpIHtcclxuXHRpZighbW9kdWxlLndlYnBhY2tQb2x5ZmlsbCkge1xyXG5cdFx0bW9kdWxlLmRlcHJlY2F0ZSA9IGZ1bmN0aW9uKCkge307XHJcblx0XHRtb2R1bGUucGF0aHMgPSBbXTtcclxuXHRcdC8vIG1vZHVsZS5wYXJlbnQgPSB1bmRlZmluZWQgYnkgZGVmYXVsdFxyXG5cdFx0aWYoIW1vZHVsZS5jaGlsZHJlbikgbW9kdWxlLmNoaWxkcmVuID0gW107XHJcblx0XHRPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kdWxlLCBcImxvYWRlZFwiLCB7XHJcblx0XHRcdGVudW1lcmFibGU6IHRydWUsXHJcblx0XHRcdGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcblx0XHRcdGdldDogZnVuY3Rpb24oKSB7IHJldHVybiBtb2R1bGUubDsgfVxyXG5cdFx0fSk7XHJcblx0XHRPYmplY3QuZGVmaW5lUHJvcGVydHkobW9kdWxlLCBcImlkXCIsIHtcclxuXHRcdFx0ZW51bWVyYWJsZTogdHJ1ZSxcclxuXHRcdFx0Y29uZmlndXJhYmxlOiBmYWxzZSxcclxuXHRcdFx0Z2V0OiBmdW5jdGlvbigpIHsgcmV0dXJuIG1vZHVsZS5pOyB9XHJcblx0XHR9KTtcclxuXHRcdG1vZHVsZS53ZWJwYWNrUG9seWZpbGwgPSAxO1xyXG5cdH1cclxuXHRyZXR1cm4gbW9kdWxlO1xyXG59XHJcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vICh3ZWJwYWNrKS9idWlsZGluL21vZHVsZS5qc1xuLy8gbW9kdWxlIGlkID0gMjhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\\n * @license\\n * Lodash <https://lodash.com/>\\n * Copyright JS Foundation and other contributors <https://js.foundation/>\\n * Released under MIT license <https://lodash.com/license>\\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\\n */\\n;(function() {\\n\\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\\n var undefined;\\n\\n /** Used as the semantic version number. */\\n var VERSION = '4.17.4';\\n\\n /** Used as the size to enable large array optimizations. */\\n var LARGE_ARRAY_SIZE = 200;\\n\\n /** Error message constants. */\\n var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\\n FUNC_ERROR_TEXT = 'Expected a function';\\n\\n /** Used to stand-in for `undefined` hash values. */\\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\\n\\n /** Used as the maximum memoize cache size. */\\n var MAX_MEMOIZE_SIZE = 500;\\n\\n /** Used as the internal argument placeholder. */\\n var PLACEHOLDER = '__lodash_placeholder__';\\n\\n /** Used to compose bitmasks for cloning. */\\n var CLONE_DEEP_FLAG = 1,\\n CLONE_FLAT_FLAG = 2,\\n CLONE_SYMBOLS_FLAG = 4;\\n\\n /** Used to compose bitmasks for value comparisons. */\\n var COMPARE_PARTIAL_FLAG = 1,\\n COMPARE_UNORDERED_FLAG = 2;\\n\\n /** Used to compose bitmasks for function metadata. */\\n var WRAP_BIND_FLAG = 1,\\n WRAP_BIND_KEY_FLAG = 2,\\n WRAP_CURRY_BOUND_FLAG = 4,\\n WRAP_CURRY_FLAG = 8,\\n WRAP_CURRY_RIGHT_FLAG = 16,\\n WRAP_PARTIAL_FLAG = 32,\\n WRAP_PARTIAL_RIGHT_FLAG = 64,\\n WRAP_ARY_FLAG = 128,\\n WRAP_REARG_FLAG = 256,\\n WRAP_FLIP_FLAG = 512;\\n\\n /** Used as default options for `_.truncate`. */\\n var DEFAULT_TRUNC_LENGTH = 30,\\n DEFAULT_TRUNC_OMISSION = '...';\\n\\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\\n var HOT_COUNT = 800,\\n HOT_SPAN = 16;\\n\\n /** Used to indicate the type of lazy iteratees. */\\n var LAZY_FILTER_FLAG = 1,\\n LAZY_MAP_FLAG = 2,\\n LAZY_WHILE_FLAG = 3;\\n\\n /** Used as references for various `Number` constants. */\\n var INFINITY = 1 / 0,\\n MAX_SAFE_INTEGER = 9007199254740991,\\n MAX_INTEGER = 1.7976931348623157e+308,\\n NAN = 0 / 0;\\n\\n /** Used as references for the maximum length and index of an array. */\\n var MAX_ARRAY_LENGTH = 4294967295,\\n MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\\n HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\\n\\n /** Used to associate wrap methods with their bit flags. */\\n var wrapFlags = [\\n ['ary', WRAP_ARY_FLAG],\\n ['bind', WRAP_BIND_FLAG],\\n ['bindKey', WRAP_BIND_KEY_FLAG],\\n ['curry', WRAP_CURRY_FLAG],\\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\\n ['flip', WRAP_FLIP_FLAG],\\n ['partial', WRAP_PARTIAL_FLAG],\\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\\n ['rearg', WRAP_REARG_FLAG]\\n ];\\n\\n /** `Object#toString` result references. */\\n var argsTag = '[object Arguments]',\\n arrayTag = '[object Array]',\\n asyncTag = '[object AsyncFunction]',\\n boolTag = '[object Boolean]',\\n dateTag = '[object Date]',\\n domExcTag = '[object DOMException]',\\n errorTag = '[object Error]',\\n funcTag = '[object Function]',\\n genTag = '[object GeneratorFunction]',\\n mapTag = '[object Map]',\\n numberTag = '[object Number]',\\n nullTag = '[object Null]',\\n objectTag = '[object Object]',\\n promiseTag = '[object Promise]',\\n proxyTag = '[object Proxy]',\\n regexpTag = '[object RegExp]',\\n setTag = '[object Set]',\\n stringTag = '[object String]',\\n symbolTag = '[object Symbol]',\\n undefinedTag = '[object Undefined]',\\n weakMapTag = '[object WeakMap]',\\n weakSetTag = '[object WeakSet]';\\n\\n var arrayBufferTag = '[object ArrayBuffer]',\\n dataViewTag = '[object DataView]',\\n float32Tag = '[object Float32Array]',\\n float64Tag = '[object Float64Array]',\\n int8Tag = '[object Int8Array]',\\n int16Tag = '[object Int16Array]',\\n int32Tag = '[object Int32Array]',\\n uint8Tag = '[object Uint8Array]',\\n uint8ClampedTag = '[object Uint8ClampedArray]',\\n uint16Tag = '[object Uint16Array]',\\n uint32Tag = '[object Uint32Array]';\\n\\n /** Used to match empty string literals in compiled template source. */\\n var reEmptyStringLeading = /\\\\b__p \\\\+= '';/g,\\n reEmptyStringMiddle = /\\\\b(__p \\\\+=) '' \\\\+/g,\\n reEmptyStringTrailing = /(__e\\\\(.*?\\\\)|\\\\b__t\\\\)) \\\\+\\\\n'';/g;\\n\\n /** Used to match HTML entities and HTML characters. */\\n var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\\n reUnescapedHtml = /[&<>\\\"']/g,\\n reHasEscapedHtml = RegExp(reEscapedHtml.source),\\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\\n\\n /** Used to match template delimiters. */\\n var reEscape = /<%-([\\\\s\\\\S]+?)%>/g,\\n reEvaluate = /<%([\\\\s\\\\S]+?)%>/g,\\n reInterpolate = /<%=([\\\\s\\\\S]+?)%>/g;\\n\\n /** Used to match property names within property paths. */\\n var reIsDeepProp = /\\\\.|\\\\[(?:[^[\\\\]]*|([\\\"'])(?:(?!\\\\1)[^\\\\\\\\]|\\\\\\\\.)*?\\\\1)\\\\]/,\\n reIsPlainProp = /^\\\\w*$/,\\n reLeadingDot = /^\\\\./,\\n rePropName = /[^.[\\\\]]+|\\\\[(?:(-?\\\\d+(?:\\\\.\\\\d+)?)|([\\\"'])((?:(?!\\\\2)[^\\\\\\\\]|\\\\\\\\.)*?)\\\\2)\\\\]|(?=(?:\\\\.|\\\\[\\\\])(?:\\\\.|\\\\[\\\\]|$))/g;\\n\\n /**\\n * Used to match `RegExp`\\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\\n */\\n var reRegExpChar = /[\\\\\\\\^$.*+?()[\\\\]{}|]/g,\\n reHasRegExpChar = RegExp(reRegExpChar.source);\\n\\n /** Used to match leading and trailing whitespace. */\\n var reTrim = /^\\\\s+|\\\\s+$/g,\\n reTrimStart = /^\\\\s+/,\\n reTrimEnd = /\\\\s+$/;\\n\\n /** Used to match wrap detail comments. */\\n var reWrapComment = /\\\\{(?:\\\\n\\\\/\\\\* \\\\[wrapped with .+\\\\] \\\\*\\\\/)?\\\\n?/,\\n reWrapDetails = /\\\\{\\\\n\\\\/\\\\* \\\\[wrapped with (.+)\\\\] \\\\*/,\\n reSplitDetails = /,? & /;\\n\\n /** Used to match words composed of alphanumeric characters. */\\n var reAsciiWord = /[^\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\x7f]+/g;\\n\\n /** Used to match backslashes in property paths. */\\n var reEscapeChar = /\\\\\\\\(\\\\\\\\)?/g;\\n\\n /**\\n * Used to match\\n * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\\n */\\n var reEsTemplate = /\\\\$\\\\{([^\\\\\\\\}]*(?:\\\\\\\\.[^\\\\\\\\}]*)*)\\\\}/g;\\n\\n /** Used to match `RegExp` flags from their coerced string values. */\\n var reFlags = /\\\\w*$/;\\n\\n /** Used to detect bad signed hexadecimal string values. */\\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\\n\\n /** Used to detect binary string values. */\\n var reIsBinary = /^0b[01]+$/i;\\n\\n /** Used to detect host constructors (Safari). */\\n var reIsHostCtor = /^\\\\[object .+?Constructor\\\\]$/;\\n\\n /** Used to detect octal string values. */\\n var reIsOctal = /^0o[0-7]+$/i;\\n\\n /** Used to detect unsigned integer values. */\\n var reIsUint = /^(?:0|[1-9]\\\\d*)$/;\\n\\n /** Used to match Latin Unicode letters (excluding mathematical operators). */\\n var reLatin = /[\\\\xc0-\\\\xd6\\\\xd8-\\\\xf6\\\\xf8-\\\\xff\\\\u0100-\\\\u017f]/g;\\n\\n /** Used to ensure capturing order of template delimiters. */\\n var reNoMatch = /($^)/;\\n\\n /** Used to match unescaped characters in compiled string literals. */\\n var reUnescapedString = /['\\\\n\\\\r\\\\u2028\\\\u2029\\\\\\\\]/g;\\n\\n /** Used to compose unicode character classes. */\\n var rsAstralRange = '\\\\\\\\ud800-\\\\\\\\udfff',\\n rsComboMarksRange = '\\\\\\\\u0300-\\\\\\\\u036f',\\n reComboHalfMarksRange = '\\\\\\\\ufe20-\\\\\\\\ufe2f',\\n rsComboSymbolsRange = '\\\\\\\\u20d0-\\\\\\\\u20ff',\\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\\n rsDingbatRange = '\\\\\\\\u2700-\\\\\\\\u27bf',\\n rsLowerRange = 'a-z\\\\\\\\xdf-\\\\\\\\xf6\\\\\\\\xf8-\\\\\\\\xff',\\n rsMathOpRange = '\\\\\\\\xac\\\\\\\\xb1\\\\\\\\xd7\\\\\\\\xf7',\\n rsNonCharRange = '\\\\\\\\x00-\\\\\\\\x2f\\\\\\\\x3a-\\\\\\\\x40\\\\\\\\x5b-\\\\\\\\x60\\\\\\\\x7b-\\\\\\\\xbf',\\n rsPunctuationRange = '\\\\\\\\u2000-\\\\\\\\u206f',\\n rsSpaceRange = ' \\\\\\\\t\\\\\\\\x0b\\\\\\\\f\\\\\\\\xa0\\\\\\\\ufeff\\\\\\\\n\\\\\\\\r\\\\\\\\u2028\\\\\\\\u2029\\\\\\\\u1680\\\\\\\\u180e\\\\\\\\u2000\\\\\\\\u2001\\\\\\\\u2002\\\\\\\\u2003\\\\\\\\u2004\\\\\\\\u2005\\\\\\\\u2006\\\\\\\\u2007\\\\\\\\u2008\\\\\\\\u2009\\\\\\\\u200a\\\\\\\\u202f\\\\\\\\u205f\\\\\\\\u3000',\\n rsUpperRange = 'A-Z\\\\\\\\xc0-\\\\\\\\xd6\\\\\\\\xd8-\\\\\\\\xde',\\n rsVarRange = '\\\\\\\\ufe0e\\\\\\\\ufe0f',\\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\\n\\n /** Used to compose unicode capture groups. */\\n var rsApos = \\\"['\\\\u2019]\\\",\\n rsAstral = '[' + rsAstralRange + ']',\\n rsBreak = '[' + rsBreakRange + ']',\\n rsCombo = '[' + rsComboRange + ']',\\n rsDigits = '\\\\\\\\d+',\\n rsDingbat = '[' + rsDingbatRange + ']',\\n rsLower = '[' + rsLowerRange + ']',\\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\\n rsFitz = '\\\\\\\\ud83c[\\\\\\\\udffb-\\\\\\\\udfff]',\\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\\n rsNonAstral = '[^' + rsAstralRange + ']',\\n rsRegional = '(?:\\\\\\\\ud83c[\\\\\\\\udde6-\\\\\\\\uddff]){2}',\\n rsSurrPair = '[\\\\\\\\ud800-\\\\\\\\udbff][\\\\\\\\udc00-\\\\\\\\udfff]',\\n rsUpper = '[' + rsUpperRange + ']',\\n rsZWJ = '\\\\\\\\u200d';\\n\\n /** Used to compose unicode regexes. */\\n var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\\n reOptMod = rsModifier + '?',\\n rsOptVar = '[' + rsVarRange + ']?',\\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\\n rsOrdLower = '\\\\\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\\\\\dth)\\\\\\\\b)',\\n rsOrdUpper = '\\\\\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\\\\\dTH)\\\\\\\\b)',\\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\\n\\n /** Used to match apostrophes. */\\n var reApos = RegExp(rsApos, 'g');\\n\\n /**\\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\\n */\\n var reComboMark = RegExp(rsCombo, 'g');\\n\\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\\n\\n /** Used to match complex or compound words. */\\n var reUnicodeWord = RegExp([\\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\\n rsUpper + '+' + rsOptContrUpper,\\n rsOrdUpper,\\n rsOrdLower,\\n rsDigits,\\n rsEmoji\\n ].join('|'), 'g');\\n\\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\\n\\n /** Used to detect strings that need a more robust regexp to match words. */\\n var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\\n\\n /** Used to assign default `context` object properties. */\\n var contextProps = [\\n 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\\n 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\\n 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\\n 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\\n '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\\n ];\\n\\n /** Used to make template sourceURLs easier to identify. */\\n var templateCounter = -1;\\n\\n /** Used to identify `toStringTag` values of typed arrays. */\\n var typedArrayTags = {};\\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\\n typedArrayTags[uint32Tag] = true;\\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\\n typedArrayTags[weakMapTag] = false;\\n\\n /** Used to identify `toStringTag` values supported by `_.clone`. */\\n var cloneableTags = {};\\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\\n cloneableTags[boolTag] = cloneableTags[dateTag] =\\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\\n cloneableTags[numberTag] = cloneableTags[objectTag] =\\n cloneableTags[regexpTag] = cloneableTags[setTag] =\\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\\n cloneableTags[errorTag] = cloneableTags[funcTag] =\\n cloneableTags[weakMapTag] = false;\\n\\n /** Used to map Latin Unicode letters to basic Latin letters. */\\n var deburredLetters = {\\n // Latin-1 Supplement block.\\n '\\\\xc0': 'A', '\\\\xc1': 'A', '\\\\xc2': 'A', '\\\\xc3': 'A', '\\\\xc4': 'A', '\\\\xc5': 'A',\\n '\\\\xe0': 'a', '\\\\xe1': 'a', '\\\\xe2': 'a', '\\\\xe3': 'a', '\\\\xe4': 'a', '\\\\xe5': 'a',\\n '\\\\xc7': 'C', '\\\\xe7': 'c',\\n '\\\\xd0': 'D', '\\\\xf0': 'd',\\n '\\\\xc8': 'E', '\\\\xc9': 'E', '\\\\xca': 'E', '\\\\xcb': 'E',\\n '\\\\xe8': 'e', '\\\\xe9': 'e', '\\\\xea': 'e', '\\\\xeb': 'e',\\n '\\\\xcc': 'I', '\\\\xcd': 'I', '\\\\xce': 'I', '\\\\xcf': 'I',\\n '\\\\xec': 'i', '\\\\xed': 'i', '\\\\xee': 'i', '\\\\xef': 'i',\\n '\\\\xd1': 'N', '\\\\xf1': 'n',\\n '\\\\xd2': 'O', '\\\\xd3': 'O', '\\\\xd4': 'O', '\\\\xd5': 'O', '\\\\xd6': 'O', '\\\\xd8': 'O',\\n '\\\\xf2': 'o', '\\\\xf3': 'o', '\\\\xf4': 'o', '\\\\xf5': 'o', '\\\\xf6': 'o', '\\\\xf8': 'o',\\n '\\\\xd9': 'U', '\\\\xda': 'U', '\\\\xdb': 'U', '\\\\xdc': 'U',\\n '\\\\xf9': 'u', '\\\\xfa': 'u', '\\\\xfb': 'u', '\\\\xfc': 'u',\\n '\\\\xdd': 'Y', '\\\\xfd': 'y', '\\\\xff': 'y',\\n '\\\\xc6': 'Ae', '\\\\xe6': 'ae',\\n '\\\\xde': 'Th', '\\\\xfe': 'th',\\n '\\\\xdf': 'ss',\\n // Latin Extended-A block.\\n '\\\\u0100': 'A', '\\\\u0102': 'A', '\\\\u0104': 'A',\\n '\\\\u0101': 'a', '\\\\u0103': 'a', '\\\\u0105': 'a',\\n '\\\\u0106': 'C', '\\\\u0108': 'C', '\\\\u010a': 'C', '\\\\u010c': 'C',\\n '\\\\u0107': 'c', '\\\\u0109': 'c', '\\\\u010b': 'c', '\\\\u010d': 'c',\\n '\\\\u010e': 'D', '\\\\u0110': 'D', '\\\\u010f': 'd', '\\\\u0111': 'd',\\n '\\\\u0112': 'E', '\\\\u0114': 'E', '\\\\u0116': 'E', '\\\\u0118': 'E', '\\\\u011a': 'E',\\n '\\\\u0113': 'e', '\\\\u0115': 'e', '\\\\u0117': 'e', '\\\\u0119': 'e', '\\\\u011b': 'e',\\n '\\\\u011c': 'G', '\\\\u011e': 'G', '\\\\u0120': 'G', '\\\\u0122': 'G',\\n '\\\\u011d': 'g', '\\\\u011f': 'g', '\\\\u0121': 'g', '\\\\u0123': 'g',\\n '\\\\u0124': 'H', '\\\\u0126': 'H', '\\\\u0125': 'h', '\\\\u0127': 'h',\\n '\\\\u0128': 'I', '\\\\u012a': 'I', '\\\\u012c': 'I', '\\\\u012e': 'I', '\\\\u0130': 'I',\\n '\\\\u0129': 'i', '\\\\u012b': 'i', '\\\\u012d': 'i', '\\\\u012f': 'i', '\\\\u0131': 'i',\\n '\\\\u0134': 'J', '\\\\u0135': 'j',\\n '\\\\u0136': 'K', '\\\\u0137': 'k', '\\\\u0138': 'k',\\n '\\\\u0139': 'L', '\\\\u013b': 'L', '\\\\u013d': 'L', '\\\\u013f': 'L', '\\\\u0141': 'L',\\n '\\\\u013a': 'l', '\\\\u013c': 'l', '\\\\u013e': 'l', '\\\\u0140': 'l', '\\\\u0142': 'l',\\n '\\\\u0143': 'N', '\\\\u0145': 'N', '\\\\u0147': 'N', '\\\\u014a': 'N',\\n '\\\\u0144': 'n', '\\\\u0146': 'n', '\\\\u0148': 'n', '\\\\u014b': 'n',\\n '\\\\u014c': 'O', '\\\\u014e': 'O', '\\\\u0150': 'O',\\n '\\\\u014d': 'o', '\\\\u014f': 'o', '\\\\u0151': 'o',\\n '\\\\u0154': 'R', '\\\\u0156': 'R', '\\\\u0158': 'R',\\n '\\\\u0155': 'r', '\\\\u0157': 'r', '\\\\u0159': 'r',\\n '\\\\u015a': 'S', '\\\\u015c': 'S', '\\\\u015e': 'S', '\\\\u0160': 'S',\\n '\\\\u015b': 's', '\\\\u015d': 's', '\\\\u015f': 's', '\\\\u0161': 's',\\n '\\\\u0162': 'T', '\\\\u0164': 'T', '\\\\u0166': 'T',\\n '\\\\u0163': 't', '\\\\u0165': 't', '\\\\u0167': 't',\\n '\\\\u0168': 'U', '\\\\u016a': 'U', '\\\\u016c': 'U', '\\\\u016e': 'U', '\\\\u0170': 'U', '\\\\u0172': 'U',\\n '\\\\u0169': 'u', '\\\\u016b': 'u', '\\\\u016d': 'u', '\\\\u016f': 'u', '\\\\u0171': 'u', '\\\\u0173': 'u',\\n '\\\\u0174': 'W', '\\\\u0175': 'w',\\n '\\\\u0176': 'Y', '\\\\u0177': 'y', '\\\\u0178': 'Y',\\n '\\\\u0179': 'Z', '\\\\u017b': 'Z', '\\\\u017d': 'Z',\\n '\\\\u017a': 'z', '\\\\u017c': 'z', '\\\\u017e': 'z',\\n '\\\\u0132': 'IJ', '\\\\u0133': 'ij',\\n '\\\\u0152': 'Oe', '\\\\u0153': 'oe',\\n '\\\\u0149': \\\"'n\\\", '\\\\u017f': 's'\\n };\\n\\n /** Used to map characters to HTML entities. */\\n var htmlEscapes = {\\n '&': '&amp;',\\n '<': '&lt;',\\n '>': '&gt;',\\n '\\\"': '&quot;',\\n \\\"'\\\": '&#39;'\\n };\\n\\n /** Used to map HTML entities to characters. */\\n var htmlUnescapes = {\\n '&amp;': '&',\\n '&lt;': '<',\\n '&gt;': '>',\\n '&quot;': '\\\"',\\n '&#39;': \\\"'\\\"\\n };\\n\\n /** Used to escape characters for inclusion in compiled string literals. */\\n var stringEscapes = {\\n '\\\\\\\\': '\\\\\\\\',\\n \\\"'\\\": \\\"'\\\",\\n '\\\\n': 'n',\\n '\\\\r': 'r',\\n '\\\\u2028': 'u2028',\\n '\\\\u2029': 'u2029'\\n };\\n\\n /** Built-in method references without a dependency on `root`. */\\n var freeParseFloat = parseFloat,\\n freeParseInt = parseInt;\\n\\n /** Detect free variable `global` from Node.js. */\\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\\n\\n /** Detect free variable `self`. */\\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\\n\\n /** Used as a reference to the global object. */\\n var root = freeGlobal || freeSelf || Function('return this')();\\n\\n /** Detect free variable `exports`. */\\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\\n\\n /** Detect free variable `module`. */\\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\\n\\n /** Detect the popular CommonJS extension `module.exports`. */\\n var moduleExports = freeModule && freeModule.exports === freeExports;\\n\\n /** Detect free variable `process` from Node.js. */\\n var freeProcess = moduleExports && freeGlobal.process;\\n\\n /** Used to access faster Node.js helpers. */\\n var nodeUtil = (function() {\\n try {\\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\\n } catch (e) {}\\n }());\\n\\n /* Node.js helper references. */\\n var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\\n nodeIsDate = nodeUtil && nodeUtil.isDate,\\n nodeIsMap = nodeUtil && nodeUtil.isMap,\\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\\n nodeIsSet = nodeUtil && nodeUtil.isSet,\\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\\n\\n /*--------------------------------------------------------------------------*/\\n\\n /**\\n * Adds the key-value `pair` to `map`.\\n *\\n * @private\\n * @param {Object} map The map to modify.\\n * @param {Array} pair The key-value pair to add.\\n * @returns {Object} Returns `map`.\\n */\\n function addMapEntry(map, pair) {\\n // Don't return `map.set` because it's not chainable in IE 11.\\n map.set(pair[0], pair[1]);\\n return map;\\n }\\n\\n /**\\n * Adds `value` to `set`.\\n *\\n * @private\\n * @param {Object} set The set to modify.\\n * @param {*} value The value to add.\\n * @returns {Object} Returns `set`.\\n */\\n function addSetEntry(set, value) {\\n // Don't return `set.add` because it's not chainable in IE 11.\\n set.add(value);\\n return set;\\n }\\n\\n /**\\n * A faster alternative to `Function#apply`, this function invokes `func`\\n * with the `this` binding of `thisArg` and the arguments of `args`.\\n *\\n * @private\\n * @param {Function} func The function to invoke.\\n * @param {*} thisArg The `this` binding of `func`.\\n * @param {Array} args The arguments to invoke `func` with.\\n * @returns {*} Returns the result of `func`.\\n */\\n function apply(func, thisArg, args) {\\n switch (args.length) {\\n case 0: return func.call(thisArg);\\n case 1: return func.call(thisArg, args[0]);\\n case 2: return func.call(thisArg, args[0], args[1]);\\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\\n }\\n return func.apply(thisArg, args);\\n }\\n\\n /**\\n * A specialized version of `baseAggregator` for arrays.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} setter The function to set `accumulator` values.\\n * @param {Function} iteratee The iteratee to transform keys.\\n * @param {Object} accumulator The initial aggregated object.\\n * @returns {Function} Returns `accumulator`.\\n */\\n function arrayAggregator(array, setter, iteratee, accumulator) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n while (++index < length) {\\n var value = array[index];\\n setter(accumulator, value, iteratee(value), array);\\n }\\n return accumulator;\\n }\\n\\n /**\\n * A specialized version of `_.forEach` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array} Returns `array`.\\n */\\n function arrayEach(array, iteratee) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n while (++index < length) {\\n if (iteratee(array[index], index, array) === false) {\\n break;\\n }\\n }\\n return array;\\n }\\n\\n /**\\n * A specialized version of `_.forEachRight` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array} Returns `array`.\\n */\\n function arrayEachRight(array, iteratee) {\\n var length = array == null ? 0 : array.length;\\n\\n while (length--) {\\n if (iteratee(array[length], length, array) === false) {\\n break;\\n }\\n }\\n return array;\\n }\\n\\n /**\\n * A specialized version of `_.every` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\\n * else `false`.\\n */\\n function arrayEvery(array, predicate) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n while (++index < length) {\\n if (!predicate(array[index], index, array)) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * A specialized version of `_.filter` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {Array} Returns the new filtered array.\\n */\\n function arrayFilter(array, predicate) {\\n var index = -1,\\n length = array == null ? 0 : array.length,\\n resIndex = 0,\\n result = [];\\n\\n while (++index < length) {\\n var value = array[index];\\n if (predicate(value, index, array)) {\\n result[resIndex++] = value;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * A specialized version of `_.includes` for arrays without support for\\n * specifying an index to search from.\\n *\\n * @private\\n * @param {Array} [array] The array to inspect.\\n * @param {*} target The value to search for.\\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\\n */\\n function arrayIncludes(array, value) {\\n var length = array == null ? 0 : array.length;\\n return !!length && baseIndexOf(array, value, 0) > -1;\\n }\\n\\n /**\\n * This function is like `arrayIncludes` except that it accepts a comparator.\\n *\\n * @private\\n * @param {Array} [array] The array to inspect.\\n * @param {*} target The value to search for.\\n * @param {Function} comparator The comparator invoked per element.\\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\\n */\\n function arrayIncludesWith(array, value, comparator) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n while (++index < length) {\\n if (comparator(value, array[index])) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * A specialized version of `_.map` for arrays without support for iteratee\\n * shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array} Returns the new mapped array.\\n */\\n function arrayMap(array, iteratee) {\\n var index = -1,\\n length = array == null ? 0 : array.length,\\n result = Array(length);\\n\\n while (++index < length) {\\n result[index] = iteratee(array[index], index, array);\\n }\\n return result;\\n }\\n\\n /**\\n * Appends the elements of `values` to `array`.\\n *\\n * @private\\n * @param {Array} array The array to modify.\\n * @param {Array} values The values to append.\\n * @returns {Array} Returns `array`.\\n */\\n function arrayPush(array, values) {\\n var index = -1,\\n length = values.length,\\n offset = array.length;\\n\\n while (++index < length) {\\n array[offset + index] = values[index];\\n }\\n return array;\\n }\\n\\n /**\\n * A specialized version of `_.reduce` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @param {*} [accumulator] The initial value.\\n * @param {boolean} [initAccum] Specify using the first element of `array` as\\n * the initial value.\\n * @returns {*} Returns the accumulated value.\\n */\\n function arrayReduce(array, iteratee, accumulator, initAccum) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n if (initAccum && length) {\\n accumulator = array[++index];\\n }\\n while (++index < length) {\\n accumulator = iteratee(accumulator, array[index], index, array);\\n }\\n return accumulator;\\n }\\n\\n /**\\n * A specialized version of `_.reduceRight` for arrays without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @param {*} [accumulator] The initial value.\\n * @param {boolean} [initAccum] Specify using the last element of `array` as\\n * the initial value.\\n * @returns {*} Returns the accumulated value.\\n */\\n function arrayReduceRight(array, iteratee, accumulator, initAccum) {\\n var length = array == null ? 0 : array.length;\\n if (initAccum && length) {\\n accumulator = array[--length];\\n }\\n while (length--) {\\n accumulator = iteratee(accumulator, array[length], length, array);\\n }\\n return accumulator;\\n }\\n\\n /**\\n * A specialized version of `_.some` for arrays without support for iteratee\\n * shorthands.\\n *\\n * @private\\n * @param {Array} [array] The array to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {boolean} Returns `true` if any element passes the predicate check,\\n * else `false`.\\n */\\n function arraySome(array, predicate) {\\n var index = -1,\\n length = array == null ? 0 : array.length;\\n\\n while (++index < length) {\\n if (predicate(array[index], index, array)) {\\n return true;\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * Gets the size of an ASCII `string`.\\n *\\n * @private\\n * @param {string} string The string inspect.\\n * @returns {number} Returns the string size.\\n */\\n var asciiSize = baseProperty('length');\\n\\n /**\\n * Converts an ASCII `string` to an array.\\n *\\n * @private\\n * @param {string} string The string to convert.\\n * @returns {Array} Returns the converted array.\\n */\\n function asciiToArray(string) {\\n return string.split('');\\n }\\n\\n /**\\n * Splits an ASCII `string` into an array of its words.\\n *\\n * @private\\n * @param {string} The string to inspect.\\n * @returns {Array} Returns the words of `string`.\\n */\\n function asciiWords(string) {\\n return string.match(reAsciiWord) || [];\\n }\\n\\n /**\\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\\n * without support for iteratee shorthands, which iterates over `collection`\\n * using `eachFunc`.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to inspect.\\n * @param {Function} predicate The function invoked per iteration.\\n * @param {Function} eachFunc The function to iterate over `collection`.\\n * @returns {*} Returns the found element or its key, else `undefined`.\\n */\\n function baseFindKey(collection, predicate, eachFunc) {\\n var result;\\n eachFunc(collection, function(value, key, collection) {\\n if (predicate(value, key, collection)) {\\n result = key;\\n return false;\\n }\\n });\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\\n * support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {Function} predicate The function invoked per iteration.\\n * @param {number} fromIndex The index to search from.\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\\n var length = array.length,\\n index = fromIndex + (fromRight ? 1 : -1);\\n\\n while ((fromRight ? index-- : ++index < length)) {\\n if (predicate(array[index], index, array)) {\\n return index;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} fromIndex The index to search from.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function baseIndexOf(array, value, fromIndex) {\\n return value === value\\n ? strictIndexOf(array, value, fromIndex)\\n : baseFindIndex(array, baseIsNaN, fromIndex);\\n }\\n\\n /**\\n * This function is like `baseIndexOf` except that it accepts a comparator.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} fromIndex The index to search from.\\n * @param {Function} comparator The comparator invoked per element.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function baseIndexOfWith(array, value, fromIndex, comparator) {\\n var index = fromIndex - 1,\\n length = array.length;\\n\\n while (++index < length) {\\n if (comparator(array[index], value)) {\\n return index;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * The base implementation of `_.isNaN` without support for number objects.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\\n */\\n function baseIsNaN(value) {\\n return value !== value;\\n }\\n\\n /**\\n * The base implementation of `_.mean` and `_.meanBy` without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {number} Returns the mean.\\n */\\n function baseMean(array, iteratee) {\\n var length = array == null ? 0 : array.length;\\n return length ? (baseSum(array, iteratee) / length) : NAN;\\n }\\n\\n /**\\n * The base implementation of `_.property` without support for deep paths.\\n *\\n * @private\\n * @param {string} key The key of the property to get.\\n * @returns {Function} Returns the new accessor function.\\n */\\n function baseProperty(key) {\\n return function(object) {\\n return object == null ? undefined : object[key];\\n };\\n }\\n\\n /**\\n * The base implementation of `_.propertyOf` without support for deep paths.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Function} Returns the new accessor function.\\n */\\n function basePropertyOf(object) {\\n return function(key) {\\n return object == null ? undefined : object[key];\\n };\\n }\\n\\n /**\\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @param {*} accumulator The initial value.\\n * @param {boolean} initAccum Specify using the first or last element of\\n * `collection` as the initial value.\\n * @param {Function} eachFunc The function to iterate over `collection`.\\n * @returns {*} Returns the accumulated value.\\n */\\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\\n eachFunc(collection, function(value, index, collection) {\\n accumulator = initAccum\\n ? (initAccum = false, value)\\n : iteratee(accumulator, value, index, collection);\\n });\\n return accumulator;\\n }\\n\\n /**\\n * The base implementation of `_.sortBy` which uses `comparer` to define the\\n * sort order of `array` and replaces criteria objects with their corresponding\\n * values.\\n *\\n * @private\\n * @param {Array} array The array to sort.\\n * @param {Function} comparer The function to define sort order.\\n * @returns {Array} Returns `array`.\\n */\\n function baseSortBy(array, comparer) {\\n var length = array.length;\\n\\n array.sort(comparer);\\n while (length--) {\\n array[length] = array[length].value;\\n }\\n return array;\\n }\\n\\n /**\\n * The base implementation of `_.sum` and `_.sumBy` without support for\\n * iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {number} Returns the sum.\\n */\\n function baseSum(array, iteratee) {\\n var result,\\n index = -1,\\n length = array.length;\\n\\n while (++index < length) {\\n var current = iteratee(array[index]);\\n if (current !== undefined) {\\n result = result === undefined ? current : (result + current);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.times` without support for iteratee shorthands\\n * or max array length checks.\\n *\\n * @private\\n * @param {number} n The number of times to invoke `iteratee`.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array} Returns the array of results.\\n */\\n function baseTimes(n, iteratee) {\\n var index = -1,\\n result = Array(n);\\n\\n while (++index < n) {\\n result[index] = iteratee(index);\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\\n * of key-value pairs for `object` corresponding to the property names of `props`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array} props The property names to get values for.\\n * @returns {Object} Returns the key-value pairs.\\n */\\n function baseToPairs(object, props) {\\n return arrayMap(props, function(key) {\\n return [key, object[key]];\\n });\\n }\\n\\n /**\\n * The base implementation of `_.unary` without support for storing metadata.\\n *\\n * @private\\n * @param {Function} func The function to cap arguments for.\\n * @returns {Function} Returns the new capped function.\\n */\\n function baseUnary(func) {\\n return function(value) {\\n return func(value);\\n };\\n }\\n\\n /**\\n * The base implementation of `_.values` and `_.valuesIn` which creates an\\n * array of `object` property values corresponding to the property names\\n * of `props`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array} props The property names to get values for.\\n * @returns {Object} Returns the array of property values.\\n */\\n function baseValues(object, props) {\\n return arrayMap(props, function(key) {\\n return object[key];\\n });\\n }\\n\\n /**\\n * Checks if a `cache` value for `key` exists.\\n *\\n * @private\\n * @param {Object} cache The cache to query.\\n * @param {string} key The key of the entry to check.\\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\\n */\\n function cacheHas(cache, key) {\\n return cache.has(key);\\n }\\n\\n /**\\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\\n * that is not found in the character symbols.\\n *\\n * @private\\n * @param {Array} strSymbols The string symbols to inspect.\\n * @param {Array} chrSymbols The character symbols to find.\\n * @returns {number} Returns the index of the first unmatched string symbol.\\n */\\n function charsStartIndex(strSymbols, chrSymbols) {\\n var index = -1,\\n length = strSymbols.length;\\n\\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\\n return index;\\n }\\n\\n /**\\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\\n * that is not found in the character symbols.\\n *\\n * @private\\n * @param {Array} strSymbols The string symbols to inspect.\\n * @param {Array} chrSymbols The character symbols to find.\\n * @returns {number} Returns the index of the last unmatched string symbol.\\n */\\n function charsEndIndex(strSymbols, chrSymbols) {\\n var index = strSymbols.length;\\n\\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\\n return index;\\n }\\n\\n /**\\n * Gets the number of `placeholder` occurrences in `array`.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} placeholder The placeholder to search for.\\n * @returns {number} Returns the placeholder count.\\n */\\n function countHolders(array, placeholder) {\\n var length = array.length,\\n result = 0;\\n\\n while (length--) {\\n if (array[length] === placeholder) {\\n ++result;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\\n * letters to basic Latin letters.\\n *\\n * @private\\n * @param {string} letter The matched letter to deburr.\\n * @returns {string} Returns the deburred letter.\\n */\\n var deburrLetter = basePropertyOf(deburredLetters);\\n\\n /**\\n * Used by `_.escape` to convert characters to HTML entities.\\n *\\n * @private\\n * @param {string} chr The matched character to escape.\\n * @returns {string} Returns the escaped character.\\n */\\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\\n\\n /**\\n * Used by `_.template` to escape characters for inclusion in compiled string literals.\\n *\\n * @private\\n * @param {string} chr The matched character to escape.\\n * @returns {string} Returns the escaped character.\\n */\\n function escapeStringChar(chr) {\\n return '\\\\\\\\' + stringEscapes[chr];\\n }\\n\\n /**\\n * Gets the value at `key` of `object`.\\n *\\n * @private\\n * @param {Object} [object] The object to query.\\n * @param {string} key The key of the property to get.\\n * @returns {*} Returns the property value.\\n */\\n function getValue(object, key) {\\n return object == null ? undefined : object[key];\\n }\\n\\n /**\\n * Checks if `string` contains Unicode symbols.\\n *\\n * @private\\n * @param {string} string The string to inspect.\\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\\n */\\n function hasUnicode(string) {\\n return reHasUnicode.test(string);\\n }\\n\\n /**\\n * Checks if `string` contains a word composed of Unicode symbols.\\n *\\n * @private\\n * @param {string} string The string to inspect.\\n * @returns {boolean} Returns `true` if a word is found, else `false`.\\n */\\n function hasUnicodeWord(string) {\\n return reHasUnicodeWord.test(string);\\n }\\n\\n /**\\n * Converts `iterator` to an array.\\n *\\n * @private\\n * @param {Object} iterator The iterator to convert.\\n * @returns {Array} Returns the converted array.\\n */\\n function iteratorToArray(iterator) {\\n var data,\\n result = [];\\n\\n while (!(data = iterator.next()).done) {\\n result.push(data.value);\\n }\\n return result;\\n }\\n\\n /**\\n * Converts `map` to its key-value pairs.\\n *\\n * @private\\n * @param {Object} map The map to convert.\\n * @returns {Array} Returns the key-value pairs.\\n */\\n function mapToArray(map) {\\n var index = -1,\\n result = Array(map.size);\\n\\n map.forEach(function(value, key) {\\n result[++index] = [key, value];\\n });\\n return result;\\n }\\n\\n /**\\n * Creates a unary function that invokes `func` with its argument transformed.\\n *\\n * @private\\n * @param {Function} func The function to wrap.\\n * @param {Function} transform The argument transform.\\n * @returns {Function} Returns the new function.\\n */\\n function overArg(func, transform) {\\n return function(arg) {\\n return func(transform(arg));\\n };\\n }\\n\\n /**\\n * Replaces all `placeholder` elements in `array` with an internal placeholder\\n * and returns an array of their indexes.\\n *\\n * @private\\n * @param {Array} array The array to modify.\\n * @param {*} placeholder The placeholder to replace.\\n * @returns {Array} Returns the new array of placeholder indexes.\\n */\\n function replaceHolders(array, placeholder) {\\n var index = -1,\\n length = array.length,\\n resIndex = 0,\\n result = [];\\n\\n while (++index < length) {\\n var value = array[index];\\n if (value === placeholder || value === PLACEHOLDER) {\\n array[index] = PLACEHOLDER;\\n result[resIndex++] = index;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Converts `set` to an array of its values.\\n *\\n * @private\\n * @param {Object} set The set to convert.\\n * @returns {Array} Returns the values.\\n */\\n function setToArray(set) {\\n var index = -1,\\n result = Array(set.size);\\n\\n set.forEach(function(value) {\\n result[++index] = value;\\n });\\n return result;\\n }\\n\\n /**\\n * Converts `set` to its value-value pairs.\\n *\\n * @private\\n * @param {Object} set The set to convert.\\n * @returns {Array} Returns the value-value pairs.\\n */\\n function setToPairs(set) {\\n var index = -1,\\n result = Array(set.size);\\n\\n set.forEach(function(value) {\\n result[++index] = [value, value];\\n });\\n return result;\\n }\\n\\n /**\\n * A specialized version of `_.indexOf` which performs strict equality\\n * comparisons of values, i.e. `===`.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} fromIndex The index to search from.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function strictIndexOf(array, value, fromIndex) {\\n var index = fromIndex - 1,\\n length = array.length;\\n\\n while (++index < length) {\\n if (array[index] === value) {\\n return index;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * A specialized version of `_.lastIndexOf` which performs strict equality\\n * comparisons of values, i.e. `===`.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} fromIndex The index to search from.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function strictLastIndexOf(array, value, fromIndex) {\\n var index = fromIndex + 1;\\n while (index--) {\\n if (array[index] === value) {\\n return index;\\n }\\n }\\n return index;\\n }\\n\\n /**\\n * Gets the number of symbols in `string`.\\n *\\n * @private\\n * @param {string} string The string to inspect.\\n * @returns {number} Returns the string size.\\n */\\n function stringSize(string) {\\n return hasUnicode(string)\\n ? unicodeSize(string)\\n : asciiSize(string);\\n }\\n\\n /**\\n * Converts `string` to an array.\\n *\\n * @private\\n * @param {string} string The string to convert.\\n * @returns {Array} Returns the converted array.\\n */\\n function stringToArray(string) {\\n return hasUnicode(string)\\n ? unicodeToArray(string)\\n : asciiToArray(string);\\n }\\n\\n /**\\n * Used by `_.unescape` to convert HTML entities to characters.\\n *\\n * @private\\n * @param {string} chr The matched character to unescape.\\n * @returns {string} Returns the unescaped character.\\n */\\n var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\\n\\n /**\\n * Gets the size of a Unicode `string`.\\n *\\n * @private\\n * @param {string} string The string inspect.\\n * @returns {number} Returns the string size.\\n */\\n function unicodeSize(string) {\\n var result = reUnicode.lastIndex = 0;\\n while (reUnicode.test(string)) {\\n ++result;\\n }\\n return result;\\n }\\n\\n /**\\n * Converts a Unicode `string` to an array.\\n *\\n * @private\\n * @param {string} string The string to convert.\\n * @returns {Array} Returns the converted array.\\n */\\n function unicodeToArray(string) {\\n return string.match(reUnicode) || [];\\n }\\n\\n /**\\n * Splits a Unicode `string` into an array of its words.\\n *\\n * @private\\n * @param {string} The string to inspect.\\n * @returns {Array} Returns the words of `string`.\\n */\\n function unicodeWords(string) {\\n return string.match(reUnicodeWord) || [];\\n }\\n\\n /*--------------------------------------------------------------------------*/\\n\\n /**\\n * Create a new pristine `lodash` function using the `context` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.1.0\\n * @category Util\\n * @param {Object} [context=root] The context object.\\n * @returns {Function} Returns a new `lodash` function.\\n * @example\\n *\\n * _.mixin({ 'foo': _.constant('foo') });\\n *\\n * var lodash = _.runInContext();\\n * lodash.mixin({ 'bar': lodash.constant('bar') });\\n *\\n * _.isFunction(_.foo);\\n * // => true\\n * _.isFunction(_.bar);\\n * // => false\\n *\\n * lodash.isFunction(lodash.foo);\\n * // => false\\n * lodash.isFunction(lodash.bar);\\n * // => true\\n *\\n * // Create a suped-up `defer` in Node.js.\\n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\\n */\\n var runInContext = (function runInContext(context) {\\n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\\n\\n /** Built-in constructor references. */\\n var Array = context.Array,\\n Date = context.Date,\\n Error = context.Error,\\n Function = context.Function,\\n Math = context.Math,\\n Object = context.Object,\\n RegExp = context.RegExp,\\n String = context.String,\\n TypeError = context.TypeError;\\n\\n /** Used for built-in method references. */\\n var arrayProto = Array.prototype,\\n funcProto = Function.prototype,\\n objectProto = Object.prototype;\\n\\n /** Used to detect overreaching core-js shims. */\\n var coreJsData = context['__core-js_shared__'];\\n\\n /** Used to resolve the decompiled source of functions. */\\n var funcToString = funcProto.toString;\\n\\n /** Used to check objects for own properties. */\\n var hasOwnProperty = objectProto.hasOwnProperty;\\n\\n /** Used to generate unique IDs. */\\n var idCounter = 0;\\n\\n /** Used to detect methods masquerading as native. */\\n var maskSrcKey = (function() {\\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\\n return uid ? ('Symbol(src)_1.' + uid) : '';\\n }());\\n\\n /**\\n * Used to resolve the\\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\\n * of values.\\n */\\n var nativeObjectToString = objectProto.toString;\\n\\n /** Used to infer the `Object` constructor. */\\n var objectCtorString = funcToString.call(Object);\\n\\n /** Used to restore the original `_` reference in `_.noConflict`. */\\n var oldDash = root._;\\n\\n /** Used to detect if a method is native. */\\n var reIsNative = RegExp('^' +\\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\\\\\$&')\\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\\\\\\\()| for .+?(?=\\\\\\\\\\\\])/g, '$1.*?') + '$'\\n );\\n\\n /** Built-in value references. */\\n var Buffer = moduleExports ? context.Buffer : undefined,\\n Symbol = context.Symbol,\\n Uint8Array = context.Uint8Array,\\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\\n getPrototype = overArg(Object.getPrototypeOf, Object),\\n objectCreate = Object.create,\\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\\n splice = arrayProto.splice,\\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\\n symIterator = Symbol ? Symbol.iterator : undefined,\\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\\n\\n var defineProperty = (function() {\\n try {\\n var func = getNative(Object, 'defineProperty');\\n func({}, '', {});\\n return func;\\n } catch (e) {}\\n }());\\n\\n /** Mocked built-ins. */\\n var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\\n ctxNow = Date && Date.now !== root.Date.now && Date.now,\\n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\\n\\n /* Built-in method references for those with the same name as other `lodash` methods. */\\n var nativeCeil = Math.ceil,\\n nativeFloor = Math.floor,\\n nativeGetSymbols = Object.getOwnPropertySymbols,\\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\\n nativeIsFinite = context.isFinite,\\n nativeJoin = arrayProto.join,\\n nativeKeys = overArg(Object.keys, Object),\\n nativeMax = Math.max,\\n nativeMin = Math.min,\\n nativeNow = Date.now,\\n nativeParseInt = context.parseInt,\\n nativeRandom = Math.random,\\n nativeReverse = arrayProto.reverse;\\n\\n /* Built-in method references that are verified to be native. */\\n var DataView = getNative(context, 'DataView'),\\n Map = getNative(context, 'Map'),\\n Promise = getNative(context, 'Promise'),\\n Set = getNative(context, 'Set'),\\n WeakMap = getNative(context, 'WeakMap'),\\n nativeCreate = getNative(Object, 'create');\\n\\n /** Used to store function metadata. */\\n var metaMap = WeakMap && new WeakMap;\\n\\n /** Used to lookup unminified function names. */\\n var realNames = {};\\n\\n /** Used to detect maps, sets, and weakmaps. */\\n var dataViewCtorString = toSource(DataView),\\n mapCtorString = toSource(Map),\\n promiseCtorString = toSource(Promise),\\n setCtorString = toSource(Set),\\n weakMapCtorString = toSource(WeakMap);\\n\\n /** Used to convert symbols to primitives and strings. */\\n var symbolProto = Symbol ? Symbol.prototype : undefined,\\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\\n symbolToString = symbolProto ? symbolProto.toString : undefined;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a `lodash` object which wraps `value` to enable implicit method\\n * chain sequences. Methods that operate on and return arrays, collections,\\n * and functions can be chained together. Methods that retrieve a single value\\n * or may return a primitive value will automatically end the chain sequence\\n * and return the unwrapped value. Otherwise, the value must be unwrapped\\n * with `_#value`.\\n *\\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\\n * enabled using `_.chain`.\\n *\\n * The execution of chained methods is lazy, that is, it's deferred until\\n * `_#value` is implicitly or explicitly called.\\n *\\n * Lazy evaluation allows several methods to support shortcut fusion.\\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\\n * the creation of intermediate arrays and can greatly reduce the number of\\n * iteratee executions. Sections of a chain sequence qualify for shortcut\\n * fusion if the section is applied to an array and iteratees accept only\\n * one argument. The heuristic for whether a section qualifies for shortcut\\n * fusion is subject to change.\\n *\\n * Chaining is supported in custom builds as long as the `_#value` method is\\n * directly or indirectly included in the build.\\n *\\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\\n *\\n * The wrapper `Array` methods are:\\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\\n *\\n * The wrapper `String` methods are:\\n * `replace` and `split`\\n *\\n * The wrapper methods that support shortcut fusion are:\\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\\n *\\n * The chainable wrapper methods are:\\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\\n * `zipObject`, `zipObjectDeep`, and `zipWith`\\n *\\n * The wrapper methods that are **not** chainable by default are:\\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\\n * `upperFirst`, `value`, and `words`\\n *\\n * @name _\\n * @constructor\\n * @category Seq\\n * @param {*} value The value to wrap in a `lodash` instance.\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * var wrapped = _([1, 2, 3]);\\n *\\n * // Returns an unwrapped value.\\n * wrapped.reduce(_.add);\\n * // => 6\\n *\\n * // Returns a wrapped value.\\n * var squares = wrapped.map(square);\\n *\\n * _.isArray(squares);\\n * // => false\\n *\\n * _.isArray(squares.value());\\n * // => true\\n */\\n function lodash(value) {\\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\\n if (value instanceof LodashWrapper) {\\n return value;\\n }\\n if (hasOwnProperty.call(value, '__wrapped__')) {\\n return wrapperClone(value);\\n }\\n }\\n return new LodashWrapper(value);\\n }\\n\\n /**\\n * The base implementation of `_.create` without support for assigning\\n * properties to the created object.\\n *\\n * @private\\n * @param {Object} proto The object to inherit from.\\n * @returns {Object} Returns the new object.\\n */\\n var baseCreate = (function() {\\n function object() {}\\n return function(proto) {\\n if (!isObject(proto)) {\\n return {};\\n }\\n if (objectCreate) {\\n return objectCreate(proto);\\n }\\n object.prototype = proto;\\n var result = new object;\\n object.prototype = undefined;\\n return result;\\n };\\n }());\\n\\n /**\\n * The function whose prototype chain sequence wrappers inherit from.\\n *\\n * @private\\n */\\n function baseLodash() {\\n // No operation performed.\\n }\\n\\n /**\\n * The base constructor for creating `lodash` wrapper objects.\\n *\\n * @private\\n * @param {*} value The value to wrap.\\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\\n */\\n function LodashWrapper(value, chainAll) {\\n this.__wrapped__ = value;\\n this.__actions__ = [];\\n this.__chain__ = !!chainAll;\\n this.__index__ = 0;\\n this.__values__ = undefined;\\n }\\n\\n /**\\n * By default, the template delimiters used by lodash are like those in\\n * embedded Ruby (ERB) as well as ES2015 template strings. Change the\\n * following template settings to use alternative delimiters.\\n *\\n * @static\\n * @memberOf _\\n * @type {Object}\\n */\\n lodash.templateSettings = {\\n\\n /**\\n * Used to detect `data` property values to be HTML-escaped.\\n *\\n * @memberOf _.templateSettings\\n * @type {RegExp}\\n */\\n 'escape': reEscape,\\n\\n /**\\n * Used to detect code to be evaluated.\\n *\\n * @memberOf _.templateSettings\\n * @type {RegExp}\\n */\\n 'evaluate': reEvaluate,\\n\\n /**\\n * Used to detect `data` property values to inject.\\n *\\n * @memberOf _.templateSettings\\n * @type {RegExp}\\n */\\n 'interpolate': reInterpolate,\\n\\n /**\\n * Used to reference the data object in the template text.\\n *\\n * @memberOf _.templateSettings\\n * @type {string}\\n */\\n 'variable': '',\\n\\n /**\\n * Used to import variables into the compiled template.\\n *\\n * @memberOf _.templateSettings\\n * @type {Object}\\n */\\n 'imports': {\\n\\n /**\\n * A reference to the `lodash` function.\\n *\\n * @memberOf _.templateSettings.imports\\n * @type {Function}\\n */\\n '_': lodash\\n }\\n };\\n\\n // Ensure wrappers are instances of `baseLodash`.\\n lodash.prototype = baseLodash.prototype;\\n lodash.prototype.constructor = lodash;\\n\\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\\n LodashWrapper.prototype.constructor = LodashWrapper;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\\n *\\n * @private\\n * @constructor\\n * @param {*} value The value to wrap.\\n */\\n function LazyWrapper(value) {\\n this.__wrapped__ = value;\\n this.__actions__ = [];\\n this.__dir__ = 1;\\n this.__filtered__ = false;\\n this.__iteratees__ = [];\\n this.__takeCount__ = MAX_ARRAY_LENGTH;\\n this.__views__ = [];\\n }\\n\\n /**\\n * Creates a clone of the lazy wrapper object.\\n *\\n * @private\\n * @name clone\\n * @memberOf LazyWrapper\\n * @returns {Object} Returns the cloned `LazyWrapper` object.\\n */\\n function lazyClone() {\\n var result = new LazyWrapper(this.__wrapped__);\\n result.__actions__ = copyArray(this.__actions__);\\n result.__dir__ = this.__dir__;\\n result.__filtered__ = this.__filtered__;\\n result.__iteratees__ = copyArray(this.__iteratees__);\\n result.__takeCount__ = this.__takeCount__;\\n result.__views__ = copyArray(this.__views__);\\n return result;\\n }\\n\\n /**\\n * Reverses the direction of lazy iteration.\\n *\\n * @private\\n * @name reverse\\n * @memberOf LazyWrapper\\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\\n */\\n function lazyReverse() {\\n if (this.__filtered__) {\\n var result = new LazyWrapper(this);\\n result.__dir__ = -1;\\n result.__filtered__ = true;\\n } else {\\n result = this.clone();\\n result.__dir__ *= -1;\\n }\\n return result;\\n }\\n\\n /**\\n * Extracts the unwrapped value from its lazy wrapper.\\n *\\n * @private\\n * @name value\\n * @memberOf LazyWrapper\\n * @returns {*} Returns the unwrapped value.\\n */\\n function lazyValue() {\\n var array = this.__wrapped__.value(),\\n dir = this.__dir__,\\n isArr = isArray(array),\\n isRight = dir < 0,\\n arrLength = isArr ? array.length : 0,\\n view = getView(0, arrLength, this.__views__),\\n start = view.start,\\n end = view.end,\\n length = end - start,\\n index = isRight ? end : (start - 1),\\n iteratees = this.__iteratees__,\\n iterLength = iteratees.length,\\n resIndex = 0,\\n takeCount = nativeMin(length, this.__takeCount__);\\n\\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\\n return baseWrapperValue(array, this.__actions__);\\n }\\n var result = [];\\n\\n outer:\\n while (length-- && resIndex < takeCount) {\\n index += dir;\\n\\n var iterIndex = -1,\\n value = array[index];\\n\\n while (++iterIndex < iterLength) {\\n var data = iteratees[iterIndex],\\n iteratee = data.iteratee,\\n type = data.type,\\n computed = iteratee(value);\\n\\n if (type == LAZY_MAP_FLAG) {\\n value = computed;\\n } else if (!computed) {\\n if (type == LAZY_FILTER_FLAG) {\\n continue outer;\\n } else {\\n break outer;\\n }\\n }\\n }\\n result[resIndex++] = value;\\n }\\n return result;\\n }\\n\\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\\n LazyWrapper.prototype.constructor = LazyWrapper;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a hash object.\\n *\\n * @private\\n * @constructor\\n * @param {Array} [entries] The key-value pairs to cache.\\n */\\n function Hash(entries) {\\n var index = -1,\\n length = entries == null ? 0 : entries.length;\\n\\n this.clear();\\n while (++index < length) {\\n var entry = entries[index];\\n this.set(entry[0], entry[1]);\\n }\\n }\\n\\n /**\\n * Removes all key-value entries from the hash.\\n *\\n * @private\\n * @name clear\\n * @memberOf Hash\\n */\\n function hashClear() {\\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\\n this.size = 0;\\n }\\n\\n /**\\n * Removes `key` and its value from the hash.\\n *\\n * @private\\n * @name delete\\n * @memberOf Hash\\n * @param {Object} hash The hash to modify.\\n * @param {string} key The key of the value to remove.\\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\\n */\\n function hashDelete(key) {\\n var result = this.has(key) && delete this.__data__[key];\\n this.size -= result ? 1 : 0;\\n return result;\\n }\\n\\n /**\\n * Gets the hash value for `key`.\\n *\\n * @private\\n * @name get\\n * @memberOf Hash\\n * @param {string} key The key of the value to get.\\n * @returns {*} Returns the entry value.\\n */\\n function hashGet(key) {\\n var data = this.__data__;\\n if (nativeCreate) {\\n var result = data[key];\\n return result === HASH_UNDEFINED ? undefined : result;\\n }\\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\\n }\\n\\n /**\\n * Checks if a hash value for `key` exists.\\n *\\n * @private\\n * @name has\\n * @memberOf Hash\\n * @param {string} key The key of the entry to check.\\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\\n */\\n function hashHas(key) {\\n var data = this.__data__;\\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\\n }\\n\\n /**\\n * Sets the hash `key` to `value`.\\n *\\n * @private\\n * @name set\\n * @memberOf Hash\\n * @param {string} key The key of the value to set.\\n * @param {*} value The value to set.\\n * @returns {Object} Returns the hash instance.\\n */\\n function hashSet(key, value) {\\n var data = this.__data__;\\n this.size += this.has(key) ? 0 : 1;\\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\\n return this;\\n }\\n\\n // Add methods to `Hash`.\\n Hash.prototype.clear = hashClear;\\n Hash.prototype['delete'] = hashDelete;\\n Hash.prototype.get = hashGet;\\n Hash.prototype.has = hashHas;\\n Hash.prototype.set = hashSet;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates an list cache object.\\n *\\n * @private\\n * @constructor\\n * @param {Array} [entries] The key-value pairs to cache.\\n */\\n function ListCache(entries) {\\n var index = -1,\\n length = entries == null ? 0 : entries.length;\\n\\n this.clear();\\n while (++index < length) {\\n var entry = entries[index];\\n this.set(entry[0], entry[1]);\\n }\\n }\\n\\n /**\\n * Removes all key-value entries from the list cache.\\n *\\n * @private\\n * @name clear\\n * @memberOf ListCache\\n */\\n function listCacheClear() {\\n this.__data__ = [];\\n this.size = 0;\\n }\\n\\n /**\\n * Removes `key` and its value from the list cache.\\n *\\n * @private\\n * @name delete\\n * @memberOf ListCache\\n * @param {string} key The key of the value to remove.\\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\\n */\\n function listCacheDelete(key) {\\n var data = this.__data__,\\n index = assocIndexOf(data, key);\\n\\n if (index < 0) {\\n return false;\\n }\\n var lastIndex = data.length - 1;\\n if (index == lastIndex) {\\n data.pop();\\n } else {\\n splice.call(data, index, 1);\\n }\\n --this.size;\\n return true;\\n }\\n\\n /**\\n * Gets the list cache value for `key`.\\n *\\n * @private\\n * @name get\\n * @memberOf ListCache\\n * @param {string} key The key of the value to get.\\n * @returns {*} Returns the entry value.\\n */\\n function listCacheGet(key) {\\n var data = this.__data__,\\n index = assocIndexOf(data, key);\\n\\n return index < 0 ? undefined : data[index][1];\\n }\\n\\n /**\\n * Checks if a list cache value for `key` exists.\\n *\\n * @private\\n * @name has\\n * @memberOf ListCache\\n * @param {string} key The key of the entry to check.\\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\\n */\\n function listCacheHas(key) {\\n return assocIndexOf(this.__data__, key) > -1;\\n }\\n\\n /**\\n * Sets the list cache `key` to `value`.\\n *\\n * @private\\n * @name set\\n * @memberOf ListCache\\n * @param {string} key The key of the value to set.\\n * @param {*} value The value to set.\\n * @returns {Object} Returns the list cache instance.\\n */\\n function listCacheSet(key, value) {\\n var data = this.__data__,\\n index = assocIndexOf(data, key);\\n\\n if (index < 0) {\\n ++this.size;\\n data.push([key, value]);\\n } else {\\n data[index][1] = value;\\n }\\n return this;\\n }\\n\\n // Add methods to `ListCache`.\\n ListCache.prototype.clear = listCacheClear;\\n ListCache.prototype['delete'] = listCacheDelete;\\n ListCache.prototype.get = listCacheGet;\\n ListCache.prototype.has = listCacheHas;\\n ListCache.prototype.set = listCacheSet;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a map cache object to store key-value pairs.\\n *\\n * @private\\n * @constructor\\n * @param {Array} [entries] The key-value pairs to cache.\\n */\\n function MapCache(entries) {\\n var index = -1,\\n length = entries == null ? 0 : entries.length;\\n\\n this.clear();\\n while (++index < length) {\\n var entry = entries[index];\\n this.set(entry[0], entry[1]);\\n }\\n }\\n\\n /**\\n * Removes all key-value entries from the map.\\n *\\n * @private\\n * @name clear\\n * @memberOf MapCache\\n */\\n function mapCacheClear() {\\n this.size = 0;\\n this.__data__ = {\\n 'hash': new Hash,\\n 'map': new (Map || ListCache),\\n 'string': new Hash\\n };\\n }\\n\\n /**\\n * Removes `key` and its value from the map.\\n *\\n * @private\\n * @name delete\\n * @memberOf MapCache\\n * @param {string} key The key of the value to remove.\\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\\n */\\n function mapCacheDelete(key) {\\n var result = getMapData(this, key)['delete'](key);\\n this.size -= result ? 1 : 0;\\n return result;\\n }\\n\\n /**\\n * Gets the map value for `key`.\\n *\\n * @private\\n * @name get\\n * @memberOf MapCache\\n * @param {string} key The key of the value to get.\\n * @returns {*} Returns the entry value.\\n */\\n function mapCacheGet(key) {\\n return getMapData(this, key).get(key);\\n }\\n\\n /**\\n * Checks if a map value for `key` exists.\\n *\\n * @private\\n * @name has\\n * @memberOf MapCache\\n * @param {string} key The key of the entry to check.\\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\\n */\\n function mapCacheHas(key) {\\n return getMapData(this, key).has(key);\\n }\\n\\n /**\\n * Sets the map `key` to `value`.\\n *\\n * @private\\n * @name set\\n * @memberOf MapCache\\n * @param {string} key The key of the value to set.\\n * @param {*} value The value to set.\\n * @returns {Object} Returns the map cache instance.\\n */\\n function mapCacheSet(key, value) {\\n var data = getMapData(this, key),\\n size = data.size;\\n\\n data.set(key, value);\\n this.size += data.size == size ? 0 : 1;\\n return this;\\n }\\n\\n // Add methods to `MapCache`.\\n MapCache.prototype.clear = mapCacheClear;\\n MapCache.prototype['delete'] = mapCacheDelete;\\n MapCache.prototype.get = mapCacheGet;\\n MapCache.prototype.has = mapCacheHas;\\n MapCache.prototype.set = mapCacheSet;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n *\\n * Creates an array cache object to store unique values.\\n *\\n * @private\\n * @constructor\\n * @param {Array} [values] The values to cache.\\n */\\n function SetCache(values) {\\n var index = -1,\\n length = values == null ? 0 : values.length;\\n\\n this.__data__ = new MapCache;\\n while (++index < length) {\\n this.add(values[index]);\\n }\\n }\\n\\n /**\\n * Adds `value` to the array cache.\\n *\\n * @private\\n * @name add\\n * @memberOf SetCache\\n * @alias push\\n * @param {*} value The value to cache.\\n * @returns {Object} Returns the cache instance.\\n */\\n function setCacheAdd(value) {\\n this.__data__.set(value, HASH_UNDEFINED);\\n return this;\\n }\\n\\n /**\\n * Checks if `value` is in the array cache.\\n *\\n * @private\\n * @name has\\n * @memberOf SetCache\\n * @param {*} value The value to search for.\\n * @returns {number} Returns `true` if `value` is found, else `false`.\\n */\\n function setCacheHas(value) {\\n return this.__data__.has(value);\\n }\\n\\n // Add methods to `SetCache`.\\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\\n SetCache.prototype.has = setCacheHas;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a stack cache object to store key-value pairs.\\n *\\n * @private\\n * @constructor\\n * @param {Array} [entries] The key-value pairs to cache.\\n */\\n function Stack(entries) {\\n var data = this.__data__ = new ListCache(entries);\\n this.size = data.size;\\n }\\n\\n /**\\n * Removes all key-value entries from the stack.\\n *\\n * @private\\n * @name clear\\n * @memberOf Stack\\n */\\n function stackClear() {\\n this.__data__ = new ListCache;\\n this.size = 0;\\n }\\n\\n /**\\n * Removes `key` and its value from the stack.\\n *\\n * @private\\n * @name delete\\n * @memberOf Stack\\n * @param {string} key The key of the value to remove.\\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\\n */\\n function stackDelete(key) {\\n var data = this.__data__,\\n result = data['delete'](key);\\n\\n this.size = data.size;\\n return result;\\n }\\n\\n /**\\n * Gets the stack value for `key`.\\n *\\n * @private\\n * @name get\\n * @memberOf Stack\\n * @param {string} key The key of the value to get.\\n * @returns {*} Returns the entry value.\\n */\\n function stackGet(key) {\\n return this.__data__.get(key);\\n }\\n\\n /**\\n * Checks if a stack value for `key` exists.\\n *\\n * @private\\n * @name has\\n * @memberOf Stack\\n * @param {string} key The key of the entry to check.\\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\\n */\\n function stackHas(key) {\\n return this.__data__.has(key);\\n }\\n\\n /**\\n * Sets the stack `key` to `value`.\\n *\\n * @private\\n * @name set\\n * @memberOf Stack\\n * @param {string} key The key of the value to set.\\n * @param {*} value The value to set.\\n * @returns {Object} Returns the stack cache instance.\\n */\\n function stackSet(key, value) {\\n var data = this.__data__;\\n if (data instanceof ListCache) {\\n var pairs = data.__data__;\\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\\n pairs.push([key, value]);\\n this.size = ++data.size;\\n return this;\\n }\\n data = this.__data__ = new MapCache(pairs);\\n }\\n data.set(key, value);\\n this.size = data.size;\\n return this;\\n }\\n\\n // Add methods to `Stack`.\\n Stack.prototype.clear = stackClear;\\n Stack.prototype['delete'] = stackDelete;\\n Stack.prototype.get = stackGet;\\n Stack.prototype.has = stackHas;\\n Stack.prototype.set = stackSet;\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates an array of the enumerable property names of the array-like `value`.\\n *\\n * @private\\n * @param {*} value The value to query.\\n * @param {boolean} inherited Specify returning inherited property names.\\n * @returns {Array} Returns the array of property names.\\n */\\n function arrayLikeKeys(value, inherited) {\\n var isArr = isArray(value),\\n isArg = !isArr && isArguments(value),\\n isBuff = !isArr && !isArg && isBuffer(value),\\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\\n skipIndexes = isArr || isArg || isBuff || isType,\\n result = skipIndexes ? baseTimes(value.length, String) : [],\\n length = result.length;\\n\\n for (var key in value) {\\n if ((inherited || hasOwnProperty.call(value, key)) &&\\n !(skipIndexes && (\\n // Safari 9 has enumerable `arguments.length` in strict mode.\\n key == 'length' ||\\n // Node.js 0.10 has enumerable non-index properties on buffers.\\n (isBuff && (key == 'offset' || key == 'parent')) ||\\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\\n // Skip index properties.\\n isIndex(key, length)\\n ))) {\\n result.push(key);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * A specialized version of `_.sample` for arrays.\\n *\\n * @private\\n * @param {Array} array The array to sample.\\n * @returns {*} Returns the random element.\\n */\\n function arraySample(array) {\\n var length = array.length;\\n return length ? array[baseRandom(0, length - 1)] : undefined;\\n }\\n\\n /**\\n * A specialized version of `_.sampleSize` for arrays.\\n *\\n * @private\\n * @param {Array} array The array to sample.\\n * @param {number} n The number of elements to sample.\\n * @returns {Array} Returns the random elements.\\n */\\n function arraySampleSize(array, n) {\\n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\\n }\\n\\n /**\\n * A specialized version of `_.shuffle` for arrays.\\n *\\n * @private\\n * @param {Array} array The array to shuffle.\\n * @returns {Array} Returns the new shuffled array.\\n */\\n function arrayShuffle(array) {\\n return shuffleSelf(copyArray(array));\\n }\\n\\n /**\\n * This function is like `assignValue` except that it doesn't assign\\n * `undefined` values.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {string} key The key of the property to assign.\\n * @param {*} value The value to assign.\\n */\\n function assignMergeValue(object, key, value) {\\n if ((value !== undefined && !eq(object[key], value)) ||\\n (value === undefined && !(key in object))) {\\n baseAssignValue(object, key, value);\\n }\\n }\\n\\n /**\\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {string} key The key of the property to assign.\\n * @param {*} value The value to assign.\\n */\\n function assignValue(object, key, value) {\\n var objValue = object[key];\\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\\n (value === undefined && !(key in object))) {\\n baseAssignValue(object, key, value);\\n }\\n }\\n\\n /**\\n * Gets the index at which the `key` is found in `array` of key-value pairs.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {*} key The key to search for.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n */\\n function assocIndexOf(array, key) {\\n var length = array.length;\\n while (length--) {\\n if (eq(array[length][0], key)) {\\n return length;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * Aggregates elements of `collection` on `accumulator` with keys transformed\\n * by `iteratee` and values set by `setter`.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} setter The function to set `accumulator` values.\\n * @param {Function} iteratee The iteratee to transform keys.\\n * @param {Object} accumulator The initial aggregated object.\\n * @returns {Function} Returns `accumulator`.\\n */\\n function baseAggregator(collection, setter, iteratee, accumulator) {\\n baseEach(collection, function(value, key, collection) {\\n setter(accumulator, value, iteratee(value), collection);\\n });\\n return accumulator;\\n }\\n\\n /**\\n * The base implementation of `_.assign` without support for multiple sources\\n * or `customizer` functions.\\n *\\n * @private\\n * @param {Object} object The destination object.\\n * @param {Object} source The source object.\\n * @returns {Object} Returns `object`.\\n */\\n function baseAssign(object, source) {\\n return object && copyObject(source, keys(source), object);\\n }\\n\\n /**\\n * The base implementation of `_.assignIn` without support for multiple sources\\n * or `customizer` functions.\\n *\\n * @private\\n * @param {Object} object The destination object.\\n * @param {Object} source The source object.\\n * @returns {Object} Returns `object`.\\n */\\n function baseAssignIn(object, source) {\\n return object && copyObject(source, keysIn(source), object);\\n }\\n\\n /**\\n * The base implementation of `assignValue` and `assignMergeValue` without\\n * value checks.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {string} key The key of the property to assign.\\n * @param {*} value The value to assign.\\n */\\n function baseAssignValue(object, key, value) {\\n if (key == '__proto__' && defineProperty) {\\n defineProperty(object, key, {\\n 'configurable': true,\\n 'enumerable': true,\\n 'value': value,\\n 'writable': true\\n });\\n } else {\\n object[key] = value;\\n }\\n }\\n\\n /**\\n * The base implementation of `_.at` without support for individual paths.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {string[]} paths The property paths to pick.\\n * @returns {Array} Returns the picked elements.\\n */\\n function baseAt(object, paths) {\\n var index = -1,\\n length = paths.length,\\n result = Array(length),\\n skip = object == null;\\n\\n while (++index < length) {\\n result[index] = skip ? undefined : get(object, paths[index]);\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.clamp` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {number} number The number to clamp.\\n * @param {number} [lower] The lower bound.\\n * @param {number} upper The upper bound.\\n * @returns {number} Returns the clamped number.\\n */\\n function baseClamp(number, lower, upper) {\\n if (number === number) {\\n if (upper !== undefined) {\\n number = number <= upper ? number : upper;\\n }\\n if (lower !== undefined) {\\n number = number >= lower ? number : lower;\\n }\\n }\\n return number;\\n }\\n\\n /**\\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\\n * traversed objects.\\n *\\n * @private\\n * @param {*} value The value to clone.\\n * @param {boolean} bitmask The bitmask flags.\\n * 1 - Deep clone\\n * 2 - Flatten inherited properties\\n * 4 - Clone symbols\\n * @param {Function} [customizer] The function to customize cloning.\\n * @param {string} [key] The key of `value`.\\n * @param {Object} [object] The parent object of `value`.\\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\\n * @returns {*} Returns the cloned value.\\n */\\n function baseClone(value, bitmask, customizer, key, object, stack) {\\n var result,\\n isDeep = bitmask & CLONE_DEEP_FLAG,\\n isFlat = bitmask & CLONE_FLAT_FLAG,\\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\\n\\n if (customizer) {\\n result = object ? customizer(value, key, object, stack) : customizer(value);\\n }\\n if (result !== undefined) {\\n return result;\\n }\\n if (!isObject(value)) {\\n return value;\\n }\\n var isArr = isArray(value);\\n if (isArr) {\\n result = initCloneArray(value);\\n if (!isDeep) {\\n return copyArray(value, result);\\n }\\n } else {\\n var tag = getTag(value),\\n isFunc = tag == funcTag || tag == genTag;\\n\\n if (isBuffer(value)) {\\n return cloneBuffer(value, isDeep);\\n }\\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\\n if (!isDeep) {\\n return isFlat\\n ? copySymbolsIn(value, baseAssignIn(result, value))\\n : copySymbols(value, baseAssign(result, value));\\n }\\n } else {\\n if (!cloneableTags[tag]) {\\n return object ? value : {};\\n }\\n result = initCloneByTag(value, tag, baseClone, isDeep);\\n }\\n }\\n // Check for circular references and return its corresponding clone.\\n stack || (stack = new Stack);\\n var stacked = stack.get(value);\\n if (stacked) {\\n return stacked;\\n }\\n stack.set(value, result);\\n\\n var keysFunc = isFull\\n ? (isFlat ? getAllKeysIn : getAllKeys)\\n : (isFlat ? keysIn : keys);\\n\\n var props = isArr ? undefined : keysFunc(value);\\n arrayEach(props || value, function(subValue, key) {\\n if (props) {\\n key = subValue;\\n subValue = value[key];\\n }\\n // Recursively populate clone (susceptible to call stack limits).\\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\\n });\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.conforms` which doesn't clone `source`.\\n *\\n * @private\\n * @param {Object} source The object of property predicates to conform to.\\n * @returns {Function} Returns the new spec function.\\n */\\n function baseConforms(source) {\\n var props = keys(source);\\n return function(object) {\\n return baseConformsTo(object, source, props);\\n };\\n }\\n\\n /**\\n * The base implementation of `_.conformsTo` which accepts `props` to check.\\n *\\n * @private\\n * @param {Object} object The object to inspect.\\n * @param {Object} source The object of property predicates to conform to.\\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\\n */\\n function baseConformsTo(object, source, props) {\\n var length = props.length;\\n if (object == null) {\\n return !length;\\n }\\n object = Object(object);\\n while (length--) {\\n var key = props[length],\\n predicate = source[key],\\n value = object[key];\\n\\n if ((value === undefined && !(key in object)) || !predicate(value)) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\\n * to provide to `func`.\\n *\\n * @private\\n * @param {Function} func The function to delay.\\n * @param {number} wait The number of milliseconds to delay invocation.\\n * @param {Array} args The arguments to provide to `func`.\\n * @returns {number|Object} Returns the timer id or timeout object.\\n */\\n function baseDelay(func, wait, args) {\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n return setTimeout(function() { func.apply(undefined, args); }, wait);\\n }\\n\\n /**\\n * The base implementation of methods like `_.difference` without support\\n * for excluding multiple arrays or iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {Array} values The values to exclude.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of filtered values.\\n */\\n function baseDifference(array, values, iteratee, comparator) {\\n var index = -1,\\n includes = arrayIncludes,\\n isCommon = true,\\n length = array.length,\\n result = [],\\n valuesLength = values.length;\\n\\n if (!length) {\\n return result;\\n }\\n if (iteratee) {\\n values = arrayMap(values, baseUnary(iteratee));\\n }\\n if (comparator) {\\n includes = arrayIncludesWith;\\n isCommon = false;\\n }\\n else if (values.length >= LARGE_ARRAY_SIZE) {\\n includes = cacheHas;\\n isCommon = false;\\n values = new SetCache(values);\\n }\\n outer:\\n while (++index < length) {\\n var value = array[index],\\n computed = iteratee == null ? value : iteratee(value);\\n\\n value = (comparator || value !== 0) ? value : 0;\\n if (isCommon && computed === computed) {\\n var valuesIndex = valuesLength;\\n while (valuesIndex--) {\\n if (values[valuesIndex] === computed) {\\n continue outer;\\n }\\n }\\n result.push(value);\\n }\\n else if (!includes(values, computed, comparator)) {\\n result.push(value);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.forEach` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array|Object} Returns `collection`.\\n */\\n var baseEach = createBaseEach(baseForOwn);\\n\\n /**\\n * The base implementation of `_.forEachRight` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array|Object} Returns `collection`.\\n */\\n var baseEachRight = createBaseEach(baseForOwnRight, true);\\n\\n /**\\n * The base implementation of `_.every` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\\n * else `false`\\n */\\n function baseEvery(collection, predicate) {\\n var result = true;\\n baseEach(collection, function(value, index, collection) {\\n result = !!predicate(value, index, collection);\\n return result;\\n });\\n return result;\\n }\\n\\n /**\\n * The base implementation of methods like `_.max` and `_.min` which accepts a\\n * `comparator` to determine the extremum value.\\n *\\n * @private\\n * @param {Array} array The array to iterate over.\\n * @param {Function} iteratee The iteratee invoked per iteration.\\n * @param {Function} comparator The comparator used to compare values.\\n * @returns {*} Returns the extremum value.\\n */\\n function baseExtremum(array, iteratee, comparator) {\\n var index = -1,\\n length = array.length;\\n\\n while (++index < length) {\\n var value = array[index],\\n current = iteratee(value);\\n\\n if (current != null && (computed === undefined\\n ? (current === current && !isSymbol(current))\\n : comparator(current, computed)\\n )) {\\n var computed = current,\\n result = value;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.fill` without an iteratee call guard.\\n *\\n * @private\\n * @param {Array} array The array to fill.\\n * @param {*} value The value to fill `array` with.\\n * @param {number} [start=0] The start position.\\n * @param {number} [end=array.length] The end position.\\n * @returns {Array} Returns `array`.\\n */\\n function baseFill(array, value, start, end) {\\n var length = array.length;\\n\\n start = toInteger(start);\\n if (start < 0) {\\n start = -start > length ? 0 : (length + start);\\n }\\n end = (end === undefined || end > length) ? length : toInteger(end);\\n if (end < 0) {\\n end += length;\\n }\\n end = start > end ? 0 : toLength(end);\\n while (start < end) {\\n array[start++] = value;\\n }\\n return array;\\n }\\n\\n /**\\n * The base implementation of `_.filter` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {Array} Returns the new filtered array.\\n */\\n function baseFilter(collection, predicate) {\\n var result = [];\\n baseEach(collection, function(value, index, collection) {\\n if (predicate(value, index, collection)) {\\n result.push(value);\\n }\\n });\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.flatten` with support for restricting flattening.\\n *\\n * @private\\n * @param {Array} array The array to flatten.\\n * @param {number} depth The maximum recursion depth.\\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\\n * @param {Array} [result=[]] The initial result value.\\n * @returns {Array} Returns the new flattened array.\\n */\\n function baseFlatten(array, depth, predicate, isStrict, result) {\\n var index = -1,\\n length = array.length;\\n\\n predicate || (predicate = isFlattenable);\\n result || (result = []);\\n\\n while (++index < length) {\\n var value = array[index];\\n if (depth > 0 && predicate(value)) {\\n if (depth > 1) {\\n // Recursively flatten arrays (susceptible to call stack limits).\\n baseFlatten(value, depth - 1, predicate, isStrict, result);\\n } else {\\n arrayPush(result, value);\\n }\\n } else if (!isStrict) {\\n result[result.length] = value;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `baseForOwn` which iterates over `object`\\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\\n * Iteratee functions may exit iteration early by explicitly returning `false`.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @param {Function} keysFunc The function to get the keys of `object`.\\n * @returns {Object} Returns `object`.\\n */\\n var baseFor = createBaseFor();\\n\\n /**\\n * This function is like `baseFor` except that it iterates over properties\\n * in the opposite order.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @param {Function} keysFunc The function to get the keys of `object`.\\n * @returns {Object} Returns `object`.\\n */\\n var baseForRight = createBaseFor(true);\\n\\n /**\\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n */\\n function baseForOwn(object, iteratee) {\\n return object && baseFor(object, iteratee, keys);\\n }\\n\\n /**\\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n */\\n function baseForOwnRight(object, iteratee) {\\n return object && baseForRight(object, iteratee, keys);\\n }\\n\\n /**\\n * The base implementation of `_.functions` which creates an array of\\n * `object` function property names filtered from `props`.\\n *\\n * @private\\n * @param {Object} object The object to inspect.\\n * @param {Array} props The property names to filter.\\n * @returns {Array} Returns the function names.\\n */\\n function baseFunctions(object, props) {\\n return arrayFilter(props, function(key) {\\n return isFunction(object[key]);\\n });\\n }\\n\\n /**\\n * The base implementation of `_.get` without support for default values.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path of the property to get.\\n * @returns {*} Returns the resolved value.\\n */\\n function baseGet(object, path) {\\n path = castPath(path, object);\\n\\n var index = 0,\\n length = path.length;\\n\\n while (object != null && index < length) {\\n object = object[toKey(path[index++])];\\n }\\n return (index && index == length) ? object : undefined;\\n }\\n\\n /**\\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\\n * symbols of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Function} keysFunc The function to get the keys of `object`.\\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\\n * @returns {Array} Returns the array of property names and symbols.\\n */\\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\\n var result = keysFunc(object);\\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\\n }\\n\\n /**\\n * The base implementation of `getTag` without fallbacks for buggy environments.\\n *\\n * @private\\n * @param {*} value The value to query.\\n * @returns {string} Returns the `toStringTag`.\\n */\\n function baseGetTag(value) {\\n if (value == null) {\\n return value === undefined ? undefinedTag : nullTag;\\n }\\n return (symToStringTag && symToStringTag in Object(value))\\n ? getRawTag(value)\\n : objectToString(value);\\n }\\n\\n /**\\n * The base implementation of `_.gt` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\\n * else `false`.\\n */\\n function baseGt(value, other) {\\n return value > other;\\n }\\n\\n /**\\n * The base implementation of `_.has` without support for deep paths.\\n *\\n * @private\\n * @param {Object} [object] The object to query.\\n * @param {Array|string} key The key to check.\\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\\n */\\n function baseHas(object, key) {\\n return object != null && hasOwnProperty.call(object, key);\\n }\\n\\n /**\\n * The base implementation of `_.hasIn` without support for deep paths.\\n *\\n * @private\\n * @param {Object} [object] The object to query.\\n * @param {Array|string} key The key to check.\\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\\n */\\n function baseHasIn(object, key) {\\n return object != null && key in Object(object);\\n }\\n\\n /**\\n * The base implementation of `_.inRange` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {number} number The number to check.\\n * @param {number} start The start of the range.\\n * @param {number} end The end of the range.\\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\\n */\\n function baseInRange(number, start, end) {\\n return number >= nativeMin(start, end) && number < nativeMax(start, end);\\n }\\n\\n /**\\n * The base implementation of methods like `_.intersection`, without support\\n * for iteratee shorthands, that accepts an array of arrays to inspect.\\n *\\n * @private\\n * @param {Array} arrays The arrays to inspect.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of shared values.\\n */\\n function baseIntersection(arrays, iteratee, comparator) {\\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\\n length = arrays[0].length,\\n othLength = arrays.length,\\n othIndex = othLength,\\n caches = Array(othLength),\\n maxLength = Infinity,\\n result = [];\\n\\n while (othIndex--) {\\n var array = arrays[othIndex];\\n if (othIndex && iteratee) {\\n array = arrayMap(array, baseUnary(iteratee));\\n }\\n maxLength = nativeMin(array.length, maxLength);\\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\\n ? new SetCache(othIndex && array)\\n : undefined;\\n }\\n array = arrays[0];\\n\\n var index = -1,\\n seen = caches[0];\\n\\n outer:\\n while (++index < length && result.length < maxLength) {\\n var value = array[index],\\n computed = iteratee ? iteratee(value) : value;\\n\\n value = (comparator || value !== 0) ? value : 0;\\n if (!(seen\\n ? cacheHas(seen, computed)\\n : includes(result, computed, comparator)\\n )) {\\n othIndex = othLength;\\n while (--othIndex) {\\n var cache = caches[othIndex];\\n if (!(cache\\n ? cacheHas(cache, computed)\\n : includes(arrays[othIndex], computed, comparator))\\n ) {\\n continue outer;\\n }\\n }\\n if (seen) {\\n seen.push(computed);\\n }\\n result.push(value);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.invert` and `_.invertBy` which inverts\\n * `object` with values transformed by `iteratee` and set by `setter`.\\n *\\n * @private\\n * @param {Object} object The object to iterate over.\\n * @param {Function} setter The function to set `accumulator` values.\\n * @param {Function} iteratee The iteratee to transform values.\\n * @param {Object} accumulator The initial inverted object.\\n * @returns {Function} Returns `accumulator`.\\n */\\n function baseInverter(object, setter, iteratee, accumulator) {\\n baseForOwn(object, function(value, key, object) {\\n setter(accumulator, iteratee(value), key, object);\\n });\\n return accumulator;\\n }\\n\\n /**\\n * The base implementation of `_.invoke` without support for individual\\n * method arguments.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path of the method to invoke.\\n * @param {Array} args The arguments to invoke the method with.\\n * @returns {*} Returns the result of the invoked method.\\n */\\n function baseInvoke(object, path, args) {\\n path = castPath(path, object);\\n object = parent(object, path);\\n var func = object == null ? object : object[toKey(last(path))];\\n return func == null ? undefined : apply(func, object, args);\\n }\\n\\n /**\\n * The base implementation of `_.isArguments`.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\\n */\\n function baseIsArguments(value) {\\n return isObjectLike(value) && baseGetTag(value) == argsTag;\\n }\\n\\n /**\\n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\\n */\\n function baseIsArrayBuffer(value) {\\n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\\n }\\n\\n /**\\n * The base implementation of `_.isDate` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\\n */\\n function baseIsDate(value) {\\n return isObjectLike(value) && baseGetTag(value) == dateTag;\\n }\\n\\n /**\\n * The base implementation of `_.isEqual` which supports partial comparisons\\n * and tracks traversed objects.\\n *\\n * @private\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @param {boolean} bitmask The bitmask flags.\\n * 1 - Unordered comparison\\n * 2 - Partial comparison\\n * @param {Function} [customizer] The function to customize comparisons.\\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\\n */\\n function baseIsEqual(value, other, bitmask, customizer, stack) {\\n if (value === other) {\\n return true;\\n }\\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\\n return value !== value && other !== other;\\n }\\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\\n }\\n\\n /**\\n * A specialized version of `baseIsEqual` for arrays and objects which performs\\n * deep comparisons and tracks traversed objects enabling objects with circular\\n * references to be compared.\\n *\\n * @private\\n * @param {Object} object The object to compare.\\n * @param {Object} other The other object to compare.\\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\\n * @param {Function} customizer The function to customize comparisons.\\n * @param {Function} equalFunc The function to determine equivalents of values.\\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\\n */\\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\\n var objIsArr = isArray(object),\\n othIsArr = isArray(other),\\n objTag = objIsArr ? arrayTag : getTag(object),\\n othTag = othIsArr ? arrayTag : getTag(other);\\n\\n objTag = objTag == argsTag ? objectTag : objTag;\\n othTag = othTag == argsTag ? objectTag : othTag;\\n\\n var objIsObj = objTag == objectTag,\\n othIsObj = othTag == objectTag,\\n isSameTag = objTag == othTag;\\n\\n if (isSameTag && isBuffer(object)) {\\n if (!isBuffer(other)) {\\n return false;\\n }\\n objIsArr = true;\\n objIsObj = false;\\n }\\n if (isSameTag && !objIsObj) {\\n stack || (stack = new Stack);\\n return (objIsArr || isTypedArray(object))\\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\\n }\\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\\n\\n if (objIsWrapped || othIsWrapped) {\\n var objUnwrapped = objIsWrapped ? object.value() : object,\\n othUnwrapped = othIsWrapped ? other.value() : other;\\n\\n stack || (stack = new Stack);\\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\\n }\\n }\\n if (!isSameTag) {\\n return false;\\n }\\n stack || (stack = new Stack);\\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\\n }\\n\\n /**\\n * The base implementation of `_.isMap` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\\n */\\n function baseIsMap(value) {\\n return isObjectLike(value) && getTag(value) == mapTag;\\n }\\n\\n /**\\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Object} object The object to inspect.\\n * @param {Object} source The object of property values to match.\\n * @param {Array} matchData The property names, values, and compare flags to match.\\n * @param {Function} [customizer] The function to customize comparisons.\\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\\n */\\n function baseIsMatch(object, source, matchData, customizer) {\\n var index = matchData.length,\\n length = index,\\n noCustomizer = !customizer;\\n\\n if (object == null) {\\n return !length;\\n }\\n object = Object(object);\\n while (index--) {\\n var data = matchData[index];\\n if ((noCustomizer && data[2])\\n ? data[1] !== object[data[0]]\\n : !(data[0] in object)\\n ) {\\n return false;\\n }\\n }\\n while (++index < length) {\\n data = matchData[index];\\n var key = data[0],\\n objValue = object[key],\\n srcValue = data[1];\\n\\n if (noCustomizer && data[2]) {\\n if (objValue === undefined && !(key in object)) {\\n return false;\\n }\\n } else {\\n var stack = new Stack;\\n if (customizer) {\\n var result = customizer(objValue, srcValue, key, object, source, stack);\\n }\\n if (!(result === undefined\\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\\n : result\\n )) {\\n return false;\\n }\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * The base implementation of `_.isNative` without bad shim checks.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a native function,\\n * else `false`.\\n */\\n function baseIsNative(value) {\\n if (!isObject(value) || isMasked(value)) {\\n return false;\\n }\\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\\n return pattern.test(toSource(value));\\n }\\n\\n /**\\n * The base implementation of `_.isRegExp` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\\n */\\n function baseIsRegExp(value) {\\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\\n }\\n\\n /**\\n * The base implementation of `_.isSet` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\\n */\\n function baseIsSet(value) {\\n return isObjectLike(value) && getTag(value) == setTag;\\n }\\n\\n /**\\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\\n */\\n function baseIsTypedArray(value) {\\n return isObjectLike(value) &&\\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\\n }\\n\\n /**\\n * The base implementation of `_.iteratee`.\\n *\\n * @private\\n * @param {*} [value=_.identity] The value to convert to an iteratee.\\n * @returns {Function} Returns the iteratee.\\n */\\n function baseIteratee(value) {\\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\\n if (typeof value == 'function') {\\n return value;\\n }\\n if (value == null) {\\n return identity;\\n }\\n if (typeof value == 'object') {\\n return isArray(value)\\n ? baseMatchesProperty(value[0], value[1])\\n : baseMatches(value);\\n }\\n return property(value);\\n }\\n\\n /**\\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names.\\n */\\n function baseKeys(object) {\\n if (!isPrototype(object)) {\\n return nativeKeys(object);\\n }\\n var result = [];\\n for (var key in Object(object)) {\\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\\n result.push(key);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names.\\n */\\n function baseKeysIn(object) {\\n if (!isObject(object)) {\\n return nativeKeysIn(object);\\n }\\n var isProto = isPrototype(object),\\n result = [];\\n\\n for (var key in object) {\\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\\n result.push(key);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.lt` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is less than `other`,\\n * else `false`.\\n */\\n function baseLt(value, other) {\\n return value < other;\\n }\\n\\n /**\\n * The base implementation of `_.map` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} iteratee The function invoked per iteration.\\n * @returns {Array} Returns the new mapped array.\\n */\\n function baseMap(collection, iteratee) {\\n var index = -1,\\n result = isArrayLike(collection) ? Array(collection.length) : [];\\n\\n baseEach(collection, function(value, key, collection) {\\n result[++index] = iteratee(value, key, collection);\\n });\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.matches` which doesn't clone `source`.\\n *\\n * @private\\n * @param {Object} source The object of property values to match.\\n * @returns {Function} Returns the new spec function.\\n */\\n function baseMatches(source) {\\n var matchData = getMatchData(source);\\n if (matchData.length == 1 && matchData[0][2]) {\\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\\n }\\n return function(object) {\\n return object === source || baseIsMatch(object, source, matchData);\\n };\\n }\\n\\n /**\\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\\n *\\n * @private\\n * @param {string} path The path of the property to get.\\n * @param {*} srcValue The value to match.\\n * @returns {Function} Returns the new spec function.\\n */\\n function baseMatchesProperty(path, srcValue) {\\n if (isKey(path) && isStrictComparable(srcValue)) {\\n return matchesStrictComparable(toKey(path), srcValue);\\n }\\n return function(object) {\\n var objValue = get(object, path);\\n return (objValue === undefined && objValue === srcValue)\\n ? hasIn(object, path)\\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\\n };\\n }\\n\\n /**\\n * The base implementation of `_.merge` without support for multiple sources.\\n *\\n * @private\\n * @param {Object} object The destination object.\\n * @param {Object} source The source object.\\n * @param {number} srcIndex The index of `source`.\\n * @param {Function} [customizer] The function to customize merged values.\\n * @param {Object} [stack] Tracks traversed source values and their merged\\n * counterparts.\\n */\\n function baseMerge(object, source, srcIndex, customizer, stack) {\\n if (object === source) {\\n return;\\n }\\n baseFor(source, function(srcValue, key) {\\n if (isObject(srcValue)) {\\n stack || (stack = new Stack);\\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\\n }\\n else {\\n var newValue = customizer\\n ? customizer(object[key], srcValue, (key + ''), object, source, stack)\\n : undefined;\\n\\n if (newValue === undefined) {\\n newValue = srcValue;\\n }\\n assignMergeValue(object, key, newValue);\\n }\\n }, keysIn);\\n }\\n\\n /**\\n * A specialized version of `baseMerge` for arrays and objects which performs\\n * deep merges and tracks traversed objects enabling objects with circular\\n * references to be merged.\\n *\\n * @private\\n * @param {Object} object The destination object.\\n * @param {Object} source The source object.\\n * @param {string} key The key of the value to merge.\\n * @param {number} srcIndex The index of `source`.\\n * @param {Function} mergeFunc The function to merge values.\\n * @param {Function} [customizer] The function to customize assigned values.\\n * @param {Object} [stack] Tracks traversed source values and their merged\\n * counterparts.\\n */\\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\\n var objValue = object[key],\\n srcValue = source[key],\\n stacked = stack.get(srcValue);\\n\\n if (stacked) {\\n assignMergeValue(object, key, stacked);\\n return;\\n }\\n var newValue = customizer\\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\\n : undefined;\\n\\n var isCommon = newValue === undefined;\\n\\n if (isCommon) {\\n var isArr = isArray(srcValue),\\n isBuff = !isArr && isBuffer(srcValue),\\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\\n\\n newValue = srcValue;\\n if (isArr || isBuff || isTyped) {\\n if (isArray(objValue)) {\\n newValue = objValue;\\n }\\n else if (isArrayLikeObject(objValue)) {\\n newValue = copyArray(objValue);\\n }\\n else if (isBuff) {\\n isCommon = false;\\n newValue = cloneBuffer(srcValue, true);\\n }\\n else if (isTyped) {\\n isCommon = false;\\n newValue = cloneTypedArray(srcValue, true);\\n }\\n else {\\n newValue = [];\\n }\\n }\\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\\n newValue = objValue;\\n if (isArguments(objValue)) {\\n newValue = toPlainObject(objValue);\\n }\\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\\n newValue = initCloneObject(srcValue);\\n }\\n }\\n else {\\n isCommon = false;\\n }\\n }\\n if (isCommon) {\\n // Recursively merge objects and arrays (susceptible to call stack limits).\\n stack.set(srcValue, newValue);\\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\\n stack['delete'](srcValue);\\n }\\n assignMergeValue(object, key, newValue);\\n }\\n\\n /**\\n * The base implementation of `_.nth` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {Array} array The array to query.\\n * @param {number} n The index of the element to return.\\n * @returns {*} Returns the nth element of `array`.\\n */\\n function baseNth(array, n) {\\n var length = array.length;\\n if (!length) {\\n return;\\n }\\n n += n < 0 ? length : 0;\\n return isIndex(n, length) ? array[n] : undefined;\\n }\\n\\n /**\\n * The base implementation of `_.orderBy` without param guards.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\\n * @param {string[]} orders The sort orders of `iteratees`.\\n * @returns {Array} Returns the new sorted array.\\n */\\n function baseOrderBy(collection, iteratees, orders) {\\n var index = -1;\\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));\\n\\n var result = baseMap(collection, function(value, key, collection) {\\n var criteria = arrayMap(iteratees, function(iteratee) {\\n return iteratee(value);\\n });\\n return { 'criteria': criteria, 'index': ++index, 'value': value };\\n });\\n\\n return baseSortBy(result, function(object, other) {\\n return compareMultiple(object, other, orders);\\n });\\n }\\n\\n /**\\n * The base implementation of `_.pick` without support for individual\\n * property identifiers.\\n *\\n * @private\\n * @param {Object} object The source object.\\n * @param {string[]} paths The property paths to pick.\\n * @returns {Object} Returns the new object.\\n */\\n function basePick(object, paths) {\\n return basePickBy(object, paths, function(value, path) {\\n return hasIn(object, path);\\n });\\n }\\n\\n /**\\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Object} object The source object.\\n * @param {string[]} paths The property paths to pick.\\n * @param {Function} predicate The function invoked per property.\\n * @returns {Object} Returns the new object.\\n */\\n function basePickBy(object, paths, predicate) {\\n var index = -1,\\n length = paths.length,\\n result = {};\\n\\n while (++index < length) {\\n var path = paths[index],\\n value = baseGet(object, path);\\n\\n if (predicate(value, path)) {\\n baseSet(result, castPath(path, object), value);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * A specialized version of `baseProperty` which supports deep paths.\\n *\\n * @private\\n * @param {Array|string} path The path of the property to get.\\n * @returns {Function} Returns the new accessor function.\\n */\\n function basePropertyDeep(path) {\\n return function(object) {\\n return baseGet(object, path);\\n };\\n }\\n\\n /**\\n * The base implementation of `_.pullAllBy` without support for iteratee\\n * shorthands.\\n *\\n * @private\\n * @param {Array} array The array to modify.\\n * @param {Array} values The values to remove.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns `array`.\\n */\\n function basePullAll(array, values, iteratee, comparator) {\\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\\n index = -1,\\n length = values.length,\\n seen = array;\\n\\n if (array === values) {\\n values = copyArray(values);\\n }\\n if (iteratee) {\\n seen = arrayMap(array, baseUnary(iteratee));\\n }\\n while (++index < length) {\\n var fromIndex = 0,\\n value = values[index],\\n computed = iteratee ? iteratee(value) : value;\\n\\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\\n if (seen !== array) {\\n splice.call(seen, fromIndex, 1);\\n }\\n splice.call(array, fromIndex, 1);\\n }\\n }\\n return array;\\n }\\n\\n /**\\n * The base implementation of `_.pullAt` without support for individual\\n * indexes or capturing the removed elements.\\n *\\n * @private\\n * @param {Array} array The array to modify.\\n * @param {number[]} indexes The indexes of elements to remove.\\n * @returns {Array} Returns `array`.\\n */\\n function basePullAt(array, indexes) {\\n var length = array ? indexes.length : 0,\\n lastIndex = length - 1;\\n\\n while (length--) {\\n var index = indexes[length];\\n if (length == lastIndex || index !== previous) {\\n var previous = index;\\n if (isIndex(index)) {\\n splice.call(array, index, 1);\\n } else {\\n baseUnset(array, index);\\n }\\n }\\n }\\n return array;\\n }\\n\\n /**\\n * The base implementation of `_.random` without support for returning\\n * floating-point numbers.\\n *\\n * @private\\n * @param {number} lower The lower bound.\\n * @param {number} upper The upper bound.\\n * @returns {number} Returns the random number.\\n */\\n function baseRandom(lower, upper) {\\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\\n }\\n\\n /**\\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\\n * coerce arguments.\\n *\\n * @private\\n * @param {number} start The start of the range.\\n * @param {number} end The end of the range.\\n * @param {number} step The value to increment or decrement by.\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Array} Returns the range of numbers.\\n */\\n function baseRange(start, end, step, fromRight) {\\n var index = -1,\\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\\n result = Array(length);\\n\\n while (length--) {\\n result[fromRight ? length : ++index] = start;\\n start += step;\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.repeat` which doesn't coerce arguments.\\n *\\n * @private\\n * @param {string} string The string to repeat.\\n * @param {number} n The number of times to repeat the string.\\n * @returns {string} Returns the repeated string.\\n */\\n function baseRepeat(string, n) {\\n var result = '';\\n if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\\n return result;\\n }\\n // Leverage the exponentiation by squaring algorithm for a faster repeat.\\n // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\\n do {\\n if (n % 2) {\\n result += string;\\n }\\n n = nativeFloor(n / 2);\\n if (n) {\\n string += string;\\n }\\n } while (n);\\n\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\\n *\\n * @private\\n * @param {Function} func The function to apply a rest parameter to.\\n * @param {number} [start=func.length-1] The start position of the rest parameter.\\n * @returns {Function} Returns the new function.\\n */\\n function baseRest(func, start) {\\n return setToString(overRest(func, start, identity), func + '');\\n }\\n\\n /**\\n * The base implementation of `_.sample`.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to sample.\\n * @returns {*} Returns the random element.\\n */\\n function baseSample(collection) {\\n return arraySample(values(collection));\\n }\\n\\n /**\\n * The base implementation of `_.sampleSize` without param guards.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to sample.\\n * @param {number} n The number of elements to sample.\\n * @returns {Array} Returns the random elements.\\n */\\n function baseSampleSize(collection, n) {\\n var array = values(collection);\\n return shuffleSelf(array, baseClamp(n, 0, array.length));\\n }\\n\\n /**\\n * The base implementation of `_.set`.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to set.\\n * @param {*} value The value to set.\\n * @param {Function} [customizer] The function to customize path creation.\\n * @returns {Object} Returns `object`.\\n */\\n function baseSet(object, path, value, customizer) {\\n if (!isObject(object)) {\\n return object;\\n }\\n path = castPath(path, object);\\n\\n var index = -1,\\n length = path.length,\\n lastIndex = length - 1,\\n nested = object;\\n\\n while (nested != null && ++index < length) {\\n var key = toKey(path[index]),\\n newValue = value;\\n\\n if (index != lastIndex) {\\n var objValue = nested[key];\\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\\n if (newValue === undefined) {\\n newValue = isObject(objValue)\\n ? objValue\\n : (isIndex(path[index + 1]) ? [] : {});\\n }\\n }\\n assignValue(nested, key, newValue);\\n nested = nested[key];\\n }\\n return object;\\n }\\n\\n /**\\n * The base implementation of `setData` without support for hot loop shorting.\\n *\\n * @private\\n * @param {Function} func The function to associate metadata with.\\n * @param {*} data The metadata.\\n * @returns {Function} Returns `func`.\\n */\\n var baseSetData = !metaMap ? identity : function(func, data) {\\n metaMap.set(func, data);\\n return func;\\n };\\n\\n /**\\n * The base implementation of `setToString` without support for hot loop shorting.\\n *\\n * @private\\n * @param {Function} func The function to modify.\\n * @param {Function} string The `toString` result.\\n * @returns {Function} Returns `func`.\\n */\\n var baseSetToString = !defineProperty ? identity : function(func, string) {\\n return defineProperty(func, 'toString', {\\n 'configurable': true,\\n 'enumerable': false,\\n 'value': constant(string),\\n 'writable': true\\n });\\n };\\n\\n /**\\n * The base implementation of `_.shuffle`.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to shuffle.\\n * @returns {Array} Returns the new shuffled array.\\n */\\n function baseShuffle(collection) {\\n return shuffleSelf(values(collection));\\n }\\n\\n /**\\n * The base implementation of `_.slice` without an iteratee call guard.\\n *\\n * @private\\n * @param {Array} array The array to slice.\\n * @param {number} [start=0] The start position.\\n * @param {number} [end=array.length] The end position.\\n * @returns {Array} Returns the slice of `array`.\\n */\\n function baseSlice(array, start, end) {\\n var index = -1,\\n length = array.length;\\n\\n if (start < 0) {\\n start = -start > length ? 0 : (length + start);\\n }\\n end = end > length ? length : end;\\n if (end < 0) {\\n end += length;\\n }\\n length = start > end ? 0 : ((end - start) >>> 0);\\n start >>>= 0;\\n\\n var result = Array(length);\\n while (++index < length) {\\n result[index] = array[index + start];\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.some` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} predicate The function invoked per iteration.\\n * @returns {boolean} Returns `true` if any element passes the predicate check,\\n * else `false`.\\n */\\n function baseSome(collection, predicate) {\\n var result;\\n\\n baseEach(collection, function(value, index, collection) {\\n result = predicate(value, index, collection);\\n return !result;\\n });\\n return !!result;\\n }\\n\\n /**\\n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\\n * performs a binary search of `array` to determine the index at which `value`\\n * should be inserted into `array` in order to maintain its sort order.\\n *\\n * @private\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n */\\n function baseSortedIndex(array, value, retHighest) {\\n var low = 0,\\n high = array == null ? low : array.length;\\n\\n if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\\n while (low < high) {\\n var mid = (low + high) >>> 1,\\n computed = array[mid];\\n\\n if (computed !== null && !isSymbol(computed) &&\\n (retHighest ? (computed <= value) : (computed < value))) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return high;\\n }\\n return baseSortedIndexBy(array, value, identity, retHighest);\\n }\\n\\n /**\\n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\\n * which invokes `iteratee` for `value` and each element of `array` to compute\\n * their sort ranking. The iteratee is invoked with one argument; (value).\\n *\\n * @private\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @param {Function} iteratee The iteratee invoked per element.\\n * @param {boolean} [retHighest] Specify returning the highest qualified index.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n */\\n function baseSortedIndexBy(array, value, iteratee, retHighest) {\\n value = iteratee(value);\\n\\n var low = 0,\\n high = array == null ? 0 : array.length,\\n valIsNaN = value !== value,\\n valIsNull = value === null,\\n valIsSymbol = isSymbol(value),\\n valIsUndefined = value === undefined;\\n\\n while (low < high) {\\n var mid = nativeFloor((low + high) / 2),\\n computed = iteratee(array[mid]),\\n othIsDefined = computed !== undefined,\\n othIsNull = computed === null,\\n othIsReflexive = computed === computed,\\n othIsSymbol = isSymbol(computed);\\n\\n if (valIsNaN) {\\n var setLow = retHighest || othIsReflexive;\\n } else if (valIsUndefined) {\\n setLow = othIsReflexive && (retHighest || othIsDefined);\\n } else if (valIsNull) {\\n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\\n } else if (valIsSymbol) {\\n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\\n } else if (othIsNull || othIsSymbol) {\\n setLow = false;\\n } else {\\n setLow = retHighest ? (computed <= value) : (computed < value);\\n }\\n if (setLow) {\\n low = mid + 1;\\n } else {\\n high = mid;\\n }\\n }\\n return nativeMin(high, MAX_ARRAY_INDEX);\\n }\\n\\n /**\\n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\\n * support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @returns {Array} Returns the new duplicate free array.\\n */\\n function baseSortedUniq(array, iteratee) {\\n var index = -1,\\n length = array.length,\\n resIndex = 0,\\n result = [];\\n\\n while (++index < length) {\\n var value = array[index],\\n computed = iteratee ? iteratee(value) : value;\\n\\n if (!index || !eq(computed, seen)) {\\n var seen = computed;\\n result[resIndex++] = value === 0 ? 0 : value;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.toNumber` which doesn't ensure correct\\n * conversions of binary, hexadecimal, or octal string values.\\n *\\n * @private\\n * @param {*} value The value to process.\\n * @returns {number} Returns the number.\\n */\\n function baseToNumber(value) {\\n if (typeof value == 'number') {\\n return value;\\n }\\n if (isSymbol(value)) {\\n return NAN;\\n }\\n return +value;\\n }\\n\\n /**\\n * The base implementation of `_.toString` which doesn't convert nullish\\n * values to empty strings.\\n *\\n * @private\\n * @param {*} value The value to process.\\n * @returns {string} Returns the string.\\n */\\n function baseToString(value) {\\n // Exit early for strings to avoid a performance hit in some environments.\\n if (typeof value == 'string') {\\n return value;\\n }\\n if (isArray(value)) {\\n // Recursively convert values (susceptible to call stack limits).\\n return arrayMap(value, baseToString) + '';\\n }\\n if (isSymbol(value)) {\\n return symbolToString ? symbolToString.call(value) : '';\\n }\\n var result = (value + '');\\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\\n }\\n\\n /**\\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new duplicate free array.\\n */\\n function baseUniq(array, iteratee, comparator) {\\n var index = -1,\\n includes = arrayIncludes,\\n length = array.length,\\n isCommon = true,\\n result = [],\\n seen = result;\\n\\n if (comparator) {\\n isCommon = false;\\n includes = arrayIncludesWith;\\n }\\n else if (length >= LARGE_ARRAY_SIZE) {\\n var set = iteratee ? null : createSet(array);\\n if (set) {\\n return setToArray(set);\\n }\\n isCommon = false;\\n includes = cacheHas;\\n seen = new SetCache;\\n }\\n else {\\n seen = iteratee ? [] : result;\\n }\\n outer:\\n while (++index < length) {\\n var value = array[index],\\n computed = iteratee ? iteratee(value) : value;\\n\\n value = (comparator || value !== 0) ? value : 0;\\n if (isCommon && computed === computed) {\\n var seenIndex = seen.length;\\n while (seenIndex--) {\\n if (seen[seenIndex] === computed) {\\n continue outer;\\n }\\n }\\n if (iteratee) {\\n seen.push(computed);\\n }\\n result.push(value);\\n }\\n else if (!includes(seen, computed, comparator)) {\\n if (seen !== result) {\\n seen.push(computed);\\n }\\n result.push(value);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * The base implementation of `_.unset`.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The property path to unset.\\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\\n */\\n function baseUnset(object, path) {\\n path = castPath(path, object);\\n object = parent(object, path);\\n return object == null || delete object[toKey(last(path))];\\n }\\n\\n /**\\n * The base implementation of `_.update`.\\n *\\n * @private\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to update.\\n * @param {Function} updater The function to produce the updated value.\\n * @param {Function} [customizer] The function to customize path creation.\\n * @returns {Object} Returns `object`.\\n */\\n function baseUpdate(object, path, updater, customizer) {\\n return baseSet(object, path, updater(baseGet(object, path)), customizer);\\n }\\n\\n /**\\n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\\n * without support for iteratee shorthands.\\n *\\n * @private\\n * @param {Array} array The array to query.\\n * @param {Function} predicate The function invoked per iteration.\\n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Array} Returns the slice of `array`.\\n */\\n function baseWhile(array, predicate, isDrop, fromRight) {\\n var length = array.length,\\n index = fromRight ? length : -1;\\n\\n while ((fromRight ? index-- : ++index < length) &&\\n predicate(array[index], index, array)) {}\\n\\n return isDrop\\n ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\\n : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\\n }\\n\\n /**\\n * The base implementation of `wrapperValue` which returns the result of\\n * performing a sequence of actions on the unwrapped `value`, where each\\n * successive action is supplied the return value of the previous.\\n *\\n * @private\\n * @param {*} value The unwrapped value.\\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\\n * @returns {*} Returns the resolved value.\\n */\\n function baseWrapperValue(value, actions) {\\n var result = value;\\n if (result instanceof LazyWrapper) {\\n result = result.value();\\n }\\n return arrayReduce(actions, function(result, action) {\\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\\n }, result);\\n }\\n\\n /**\\n * The base implementation of methods like `_.xor`, without support for\\n * iteratee shorthands, that accepts an array of arrays to inspect.\\n *\\n * @private\\n * @param {Array} arrays The arrays to inspect.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of values.\\n */\\n function baseXor(arrays, iteratee, comparator) {\\n var length = arrays.length;\\n if (length < 2) {\\n return length ? baseUniq(arrays[0]) : [];\\n }\\n var index = -1,\\n result = Array(length);\\n\\n while (++index < length) {\\n var array = arrays[index],\\n othIndex = -1;\\n\\n while (++othIndex < length) {\\n if (othIndex != index) {\\n result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\\n }\\n }\\n }\\n return baseUniq(baseFlatten(result, 1), iteratee, comparator);\\n }\\n\\n /**\\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\\n *\\n * @private\\n * @param {Array} props The property identifiers.\\n * @param {Array} values The property values.\\n * @param {Function} assignFunc The function to assign values.\\n * @returns {Object} Returns the new object.\\n */\\n function baseZipObject(props, values, assignFunc) {\\n var index = -1,\\n length = props.length,\\n valsLength = values.length,\\n result = {};\\n\\n while (++index < length) {\\n var value = index < valsLength ? values[index] : undefined;\\n assignFunc(result, props[index], value);\\n }\\n return result;\\n }\\n\\n /**\\n * Casts `value` to an empty array if it's not an array like object.\\n *\\n * @private\\n * @param {*} value The value to inspect.\\n * @returns {Array|Object} Returns the cast array-like object.\\n */\\n function castArrayLikeObject(value) {\\n return isArrayLikeObject(value) ? value : [];\\n }\\n\\n /**\\n * Casts `value` to `identity` if it's not a function.\\n *\\n * @private\\n * @param {*} value The value to inspect.\\n * @returns {Function} Returns cast function.\\n */\\n function castFunction(value) {\\n return typeof value == 'function' ? value : identity;\\n }\\n\\n /**\\n * Casts `value` to a path array if it's not one.\\n *\\n * @private\\n * @param {*} value The value to inspect.\\n * @param {Object} [object] The object to query keys on.\\n * @returns {Array} Returns the cast property path array.\\n */\\n function castPath(value, object) {\\n if (isArray(value)) {\\n return value;\\n }\\n return isKey(value, object) ? [value] : stringToPath(toString(value));\\n }\\n\\n /**\\n * A `baseRest` alias which can be replaced with `identity` by module\\n * replacement plugins.\\n *\\n * @private\\n * @type {Function}\\n * @param {Function} func The function to apply a rest parameter to.\\n * @returns {Function} Returns the new function.\\n */\\n var castRest = baseRest;\\n\\n /**\\n * Casts `array` to a slice if it's needed.\\n *\\n * @private\\n * @param {Array} array The array to inspect.\\n * @param {number} start The start position.\\n * @param {number} [end=array.length] The end position.\\n * @returns {Array} Returns the cast slice.\\n */\\n function castSlice(array, start, end) {\\n var length = array.length;\\n end = end === undefined ? length : end;\\n return (!start && end >= length) ? array : baseSlice(array, start, end);\\n }\\n\\n /**\\n * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\\n *\\n * @private\\n * @param {number|Object} id The timer id or timeout object of the timer to clear.\\n */\\n var clearTimeout = ctxClearTimeout || function(id) {\\n return root.clearTimeout(id);\\n };\\n\\n /**\\n * Creates a clone of `buffer`.\\n *\\n * @private\\n * @param {Buffer} buffer The buffer to clone.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Buffer} Returns the cloned buffer.\\n */\\n function cloneBuffer(buffer, isDeep) {\\n if (isDeep) {\\n return buffer.slice();\\n }\\n var length = buffer.length,\\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\\n\\n buffer.copy(result);\\n return result;\\n }\\n\\n /**\\n * Creates a clone of `arrayBuffer`.\\n *\\n * @private\\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\\n * @returns {ArrayBuffer} Returns the cloned array buffer.\\n */\\n function cloneArrayBuffer(arrayBuffer) {\\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\\n return result;\\n }\\n\\n /**\\n * Creates a clone of `dataView`.\\n *\\n * @private\\n * @param {Object} dataView The data view to clone.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Object} Returns the cloned data view.\\n */\\n function cloneDataView(dataView, isDeep) {\\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\\n }\\n\\n /**\\n * Creates a clone of `map`.\\n *\\n * @private\\n * @param {Object} map The map to clone.\\n * @param {Function} cloneFunc The function to clone values.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Object} Returns the cloned map.\\n */\\n function cloneMap(map, isDeep, cloneFunc) {\\n var array = isDeep ? cloneFunc(mapToArray(map), CLONE_DEEP_FLAG) : mapToArray(map);\\n return arrayReduce(array, addMapEntry, new map.constructor);\\n }\\n\\n /**\\n * Creates a clone of `regexp`.\\n *\\n * @private\\n * @param {Object} regexp The regexp to clone.\\n * @returns {Object} Returns the cloned regexp.\\n */\\n function cloneRegExp(regexp) {\\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\\n result.lastIndex = regexp.lastIndex;\\n return result;\\n }\\n\\n /**\\n * Creates a clone of `set`.\\n *\\n * @private\\n * @param {Object} set The set to clone.\\n * @param {Function} cloneFunc The function to clone values.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Object} Returns the cloned set.\\n */\\n function cloneSet(set, isDeep, cloneFunc) {\\n var array = isDeep ? cloneFunc(setToArray(set), CLONE_DEEP_FLAG) : setToArray(set);\\n return arrayReduce(array, addSetEntry, new set.constructor);\\n }\\n\\n /**\\n * Creates a clone of the `symbol` object.\\n *\\n * @private\\n * @param {Object} symbol The symbol object to clone.\\n * @returns {Object} Returns the cloned symbol object.\\n */\\n function cloneSymbol(symbol) {\\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\\n }\\n\\n /**\\n * Creates a clone of `typedArray`.\\n *\\n * @private\\n * @param {Object} typedArray The typed array to clone.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Object} Returns the cloned typed array.\\n */\\n function cloneTypedArray(typedArray, isDeep) {\\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\\n }\\n\\n /**\\n * Compares values to sort them in ascending order.\\n *\\n * @private\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {number} Returns the sort order indicator for `value`.\\n */\\n function compareAscending(value, other) {\\n if (value !== other) {\\n var valIsDefined = value !== undefined,\\n valIsNull = value === null,\\n valIsReflexive = value === value,\\n valIsSymbol = isSymbol(value);\\n\\n var othIsDefined = other !== undefined,\\n othIsNull = other === null,\\n othIsReflexive = other === other,\\n othIsSymbol = isSymbol(other);\\n\\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\\n (valIsNull && othIsDefined && othIsReflexive) ||\\n (!valIsDefined && othIsReflexive) ||\\n !valIsReflexive) {\\n return 1;\\n }\\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\\n (othIsNull && valIsDefined && valIsReflexive) ||\\n (!othIsDefined && valIsReflexive) ||\\n !othIsReflexive) {\\n return -1;\\n }\\n }\\n return 0;\\n }\\n\\n /**\\n * Used by `_.orderBy` to compare multiple properties of a value to another\\n * and stable sort them.\\n *\\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\\n * specify an order of \\\"desc\\\" for descending or \\\"asc\\\" for ascending sort order\\n * of corresponding values.\\n *\\n * @private\\n * @param {Object} object The object to compare.\\n * @param {Object} other The other object to compare.\\n * @param {boolean[]|string[]} orders The order to sort by for each property.\\n * @returns {number} Returns the sort order indicator for `object`.\\n */\\n function compareMultiple(object, other, orders) {\\n var index = -1,\\n objCriteria = object.criteria,\\n othCriteria = other.criteria,\\n length = objCriteria.length,\\n ordersLength = orders.length;\\n\\n while (++index < length) {\\n var result = compareAscending(objCriteria[index], othCriteria[index]);\\n if (result) {\\n if (index >= ordersLength) {\\n return result;\\n }\\n var order = orders[index];\\n return result * (order == 'desc' ? -1 : 1);\\n }\\n }\\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\\n // that causes it, under certain circumstances, to provide the same value for\\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\\n // for more details.\\n //\\n // This also ensures a stable sort in V8 and other engines.\\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\\n return object.index - other.index;\\n }\\n\\n /**\\n * Creates an array that is the composition of partially applied arguments,\\n * placeholders, and provided arguments into a single array of arguments.\\n *\\n * @private\\n * @param {Array} args The provided arguments.\\n * @param {Array} partials The arguments to prepend to those provided.\\n * @param {Array} holders The `partials` placeholder indexes.\\n * @params {boolean} [isCurried] Specify composing for a curried function.\\n * @returns {Array} Returns the new array of composed arguments.\\n */\\n function composeArgs(args, partials, holders, isCurried) {\\n var argsIndex = -1,\\n argsLength = args.length,\\n holdersLength = holders.length,\\n leftIndex = -1,\\n leftLength = partials.length,\\n rangeLength = nativeMax(argsLength - holdersLength, 0),\\n result = Array(leftLength + rangeLength),\\n isUncurried = !isCurried;\\n\\n while (++leftIndex < leftLength) {\\n result[leftIndex] = partials[leftIndex];\\n }\\n while (++argsIndex < holdersLength) {\\n if (isUncurried || argsIndex < argsLength) {\\n result[holders[argsIndex]] = args[argsIndex];\\n }\\n }\\n while (rangeLength--) {\\n result[leftIndex++] = args[argsIndex++];\\n }\\n return result;\\n }\\n\\n /**\\n * This function is like `composeArgs` except that the arguments composition\\n * is tailored for `_.partialRight`.\\n *\\n * @private\\n * @param {Array} args The provided arguments.\\n * @param {Array} partials The arguments to append to those provided.\\n * @param {Array} holders The `partials` placeholder indexes.\\n * @params {boolean} [isCurried] Specify composing for a curried function.\\n * @returns {Array} Returns the new array of composed arguments.\\n */\\n function composeArgsRight(args, partials, holders, isCurried) {\\n var argsIndex = -1,\\n argsLength = args.length,\\n holdersIndex = -1,\\n holdersLength = holders.length,\\n rightIndex = -1,\\n rightLength = partials.length,\\n rangeLength = nativeMax(argsLength - holdersLength, 0),\\n result = Array(rangeLength + rightLength),\\n isUncurried = !isCurried;\\n\\n while (++argsIndex < rangeLength) {\\n result[argsIndex] = args[argsIndex];\\n }\\n var offset = argsIndex;\\n while (++rightIndex < rightLength) {\\n result[offset + rightIndex] = partials[rightIndex];\\n }\\n while (++holdersIndex < holdersLength) {\\n if (isUncurried || argsIndex < argsLength) {\\n result[offset + holders[holdersIndex]] = args[argsIndex++];\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Copies the values of `source` to `array`.\\n *\\n * @private\\n * @param {Array} source The array to copy values from.\\n * @param {Array} [array=[]] The array to copy values to.\\n * @returns {Array} Returns `array`.\\n */\\n function copyArray(source, array) {\\n var index = -1,\\n length = source.length;\\n\\n array || (array = Array(length));\\n while (++index < length) {\\n array[index] = source[index];\\n }\\n return array;\\n }\\n\\n /**\\n * Copies properties of `source` to `object`.\\n *\\n * @private\\n * @param {Object} source The object to copy properties from.\\n * @param {Array} props The property identifiers to copy.\\n * @param {Object} [object={}] The object to copy properties to.\\n * @param {Function} [customizer] The function to customize copied values.\\n * @returns {Object} Returns `object`.\\n */\\n function copyObject(source, props, object, customizer) {\\n var isNew = !object;\\n object || (object = {});\\n\\n var index = -1,\\n length = props.length;\\n\\n while (++index < length) {\\n var key = props[index];\\n\\n var newValue = customizer\\n ? customizer(object[key], source[key], key, object, source)\\n : undefined;\\n\\n if (newValue === undefined) {\\n newValue = source[key];\\n }\\n if (isNew) {\\n baseAssignValue(object, key, newValue);\\n } else {\\n assignValue(object, key, newValue);\\n }\\n }\\n return object;\\n }\\n\\n /**\\n * Copies own symbols of `source` to `object`.\\n *\\n * @private\\n * @param {Object} source The object to copy symbols from.\\n * @param {Object} [object={}] The object to copy symbols to.\\n * @returns {Object} Returns `object`.\\n */\\n function copySymbols(source, object) {\\n return copyObject(source, getSymbols(source), object);\\n }\\n\\n /**\\n * Copies own and inherited symbols of `source` to `object`.\\n *\\n * @private\\n * @param {Object} source The object to copy symbols from.\\n * @param {Object} [object={}] The object to copy symbols to.\\n * @returns {Object} Returns `object`.\\n */\\n function copySymbolsIn(source, object) {\\n return copyObject(source, getSymbolsIn(source), object);\\n }\\n\\n /**\\n * Creates a function like `_.groupBy`.\\n *\\n * @private\\n * @param {Function} setter The function to set accumulator values.\\n * @param {Function} [initializer] The accumulator object initializer.\\n * @returns {Function} Returns the new aggregator function.\\n */\\n function createAggregator(setter, initializer) {\\n return function(collection, iteratee) {\\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\\n accumulator = initializer ? initializer() : {};\\n\\n return func(collection, setter, getIteratee(iteratee, 2), accumulator);\\n };\\n }\\n\\n /**\\n * Creates a function like `_.assign`.\\n *\\n * @private\\n * @param {Function} assigner The function to assign values.\\n * @returns {Function} Returns the new assigner function.\\n */\\n function createAssigner(assigner) {\\n return baseRest(function(object, sources) {\\n var index = -1,\\n length = sources.length,\\n customizer = length > 1 ? sources[length - 1] : undefined,\\n guard = length > 2 ? sources[2] : undefined;\\n\\n customizer = (assigner.length > 3 && typeof customizer == 'function')\\n ? (length--, customizer)\\n : undefined;\\n\\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\\n customizer = length < 3 ? undefined : customizer;\\n length = 1;\\n }\\n object = Object(object);\\n while (++index < length) {\\n var source = sources[index];\\n if (source) {\\n assigner(object, source, index, customizer);\\n }\\n }\\n return object;\\n });\\n }\\n\\n /**\\n * Creates a `baseEach` or `baseEachRight` function.\\n *\\n * @private\\n * @param {Function} eachFunc The function to iterate over a collection.\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Function} Returns the new base function.\\n */\\n function createBaseEach(eachFunc, fromRight) {\\n return function(collection, iteratee) {\\n if (collection == null) {\\n return collection;\\n }\\n if (!isArrayLike(collection)) {\\n return eachFunc(collection, iteratee);\\n }\\n var length = collection.length,\\n index = fromRight ? length : -1,\\n iterable = Object(collection);\\n\\n while ((fromRight ? index-- : ++index < length)) {\\n if (iteratee(iterable[index], index, iterable) === false) {\\n break;\\n }\\n }\\n return collection;\\n };\\n }\\n\\n /**\\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\\n *\\n * @private\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Function} Returns the new base function.\\n */\\n function createBaseFor(fromRight) {\\n return function(object, iteratee, keysFunc) {\\n var index = -1,\\n iterable = Object(object),\\n props = keysFunc(object),\\n length = props.length;\\n\\n while (length--) {\\n var key = props[fromRight ? length : ++index];\\n if (iteratee(iterable[key], key, iterable) === false) {\\n break;\\n }\\n }\\n return object;\\n };\\n }\\n\\n /**\\n * Creates a function that wraps `func` to invoke it with the optional `this`\\n * binding of `thisArg`.\\n *\\n * @private\\n * @param {Function} func The function to wrap.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @param {*} [thisArg] The `this` binding of `func`.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createBind(func, bitmask, thisArg) {\\n var isBind = bitmask & WRAP_BIND_FLAG,\\n Ctor = createCtor(func);\\n\\n function wrapper() {\\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\\n return fn.apply(isBind ? thisArg : this, arguments);\\n }\\n return wrapper;\\n }\\n\\n /**\\n * Creates a function like `_.lowerFirst`.\\n *\\n * @private\\n * @param {string} methodName The name of the `String` case method to use.\\n * @returns {Function} Returns the new case function.\\n */\\n function createCaseFirst(methodName) {\\n return function(string) {\\n string = toString(string);\\n\\n var strSymbols = hasUnicode(string)\\n ? stringToArray(string)\\n : undefined;\\n\\n var chr = strSymbols\\n ? strSymbols[0]\\n : string.charAt(0);\\n\\n var trailing = strSymbols\\n ? castSlice(strSymbols, 1).join('')\\n : string.slice(1);\\n\\n return chr[methodName]() + trailing;\\n };\\n }\\n\\n /**\\n * Creates a function like `_.camelCase`.\\n *\\n * @private\\n * @param {Function} callback The function to combine each word.\\n * @returns {Function} Returns the new compounder function.\\n */\\n function createCompounder(callback) {\\n return function(string) {\\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\\n };\\n }\\n\\n /**\\n * Creates a function that produces an instance of `Ctor` regardless of\\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\\n *\\n * @private\\n * @param {Function} Ctor The constructor to wrap.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createCtor(Ctor) {\\n return function() {\\n // Use a `switch` statement to work with class constructors. See\\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\\n // for more details.\\n var args = arguments;\\n switch (args.length) {\\n case 0: return new Ctor;\\n case 1: return new Ctor(args[0]);\\n case 2: return new Ctor(args[0], args[1]);\\n case 3: return new Ctor(args[0], args[1], args[2]);\\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\\n }\\n var thisBinding = baseCreate(Ctor.prototype),\\n result = Ctor.apply(thisBinding, args);\\n\\n // Mimic the constructor's `return` behavior.\\n // See https://es5.github.io/#x13.2.2 for more details.\\n return isObject(result) ? result : thisBinding;\\n };\\n }\\n\\n /**\\n * Creates a function that wraps `func` to enable currying.\\n *\\n * @private\\n * @param {Function} func The function to wrap.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @param {number} arity The arity of `func`.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createCurry(func, bitmask, arity) {\\n var Ctor = createCtor(func);\\n\\n function wrapper() {\\n var length = arguments.length,\\n args = Array(length),\\n index = length,\\n placeholder = getHolder(wrapper);\\n\\n while (index--) {\\n args[index] = arguments[index];\\n }\\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\\n ? []\\n : replaceHolders(args, placeholder);\\n\\n length -= holders.length;\\n if (length < arity) {\\n return createRecurry(\\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\\n args, holders, undefined, undefined, arity - length);\\n }\\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\\n return apply(fn, this, args);\\n }\\n return wrapper;\\n }\\n\\n /**\\n * Creates a `_.find` or `_.findLast` function.\\n *\\n * @private\\n * @param {Function} findIndexFunc The function to find the collection index.\\n * @returns {Function} Returns the new find function.\\n */\\n function createFind(findIndexFunc) {\\n return function(collection, predicate, fromIndex) {\\n var iterable = Object(collection);\\n if (!isArrayLike(collection)) {\\n var iteratee = getIteratee(predicate, 3);\\n collection = keys(collection);\\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\\n }\\n var index = findIndexFunc(collection, predicate, fromIndex);\\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\\n };\\n }\\n\\n /**\\n * Creates a `_.flow` or `_.flowRight` function.\\n *\\n * @private\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Function} Returns the new flow function.\\n */\\n function createFlow(fromRight) {\\n return flatRest(function(funcs) {\\n var length = funcs.length,\\n index = length,\\n prereq = LodashWrapper.prototype.thru;\\n\\n if (fromRight) {\\n funcs.reverse();\\n }\\n while (index--) {\\n var func = funcs[index];\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\\n var wrapper = new LodashWrapper([], true);\\n }\\n }\\n index = wrapper ? index : length;\\n while (++index < length) {\\n func = funcs[index];\\n\\n var funcName = getFuncName(func),\\n data = funcName == 'wrapper' ? getData(func) : undefined;\\n\\n if (data && isLaziable(data[0]) &&\\n data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\\n !data[4].length && data[9] == 1\\n ) {\\n wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\\n } else {\\n wrapper = (func.length == 1 && isLaziable(func))\\n ? wrapper[funcName]()\\n : wrapper.thru(func);\\n }\\n }\\n return function() {\\n var args = arguments,\\n value = args[0];\\n\\n if (wrapper && args.length == 1 && isArray(value)) {\\n return wrapper.plant(value).value();\\n }\\n var index = 0,\\n result = length ? funcs[index].apply(this, args) : value;\\n\\n while (++index < length) {\\n result = funcs[index].call(this, result);\\n }\\n return result;\\n };\\n });\\n }\\n\\n /**\\n * Creates a function that wraps `func` to invoke it with optional `this`\\n * binding of `thisArg`, partial application, and currying.\\n *\\n * @private\\n * @param {Function|string} func The function or method name to wrap.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @param {*} [thisArg] The `this` binding of `func`.\\n * @param {Array} [partials] The arguments to prepend to those provided to\\n * the new function.\\n * @param {Array} [holders] The `partials` placeholder indexes.\\n * @param {Array} [partialsRight] The arguments to append to those provided\\n * to the new function.\\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\\n * @param {Array} [argPos] The argument positions of the new function.\\n * @param {number} [ary] The arity cap of `func`.\\n * @param {number} [arity] The arity of `func`.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\\n var isAry = bitmask & WRAP_ARY_FLAG,\\n isBind = bitmask & WRAP_BIND_FLAG,\\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\\n isFlip = bitmask & WRAP_FLIP_FLAG,\\n Ctor = isBindKey ? undefined : createCtor(func);\\n\\n function wrapper() {\\n var length = arguments.length,\\n args = Array(length),\\n index = length;\\n\\n while (index--) {\\n args[index] = arguments[index];\\n }\\n if (isCurried) {\\n var placeholder = getHolder(wrapper),\\n holdersCount = countHolders(args, placeholder);\\n }\\n if (partials) {\\n args = composeArgs(args, partials, holders, isCurried);\\n }\\n if (partialsRight) {\\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\\n }\\n length -= holdersCount;\\n if (isCurried && length < arity) {\\n var newHolders = replaceHolders(args, placeholder);\\n return createRecurry(\\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\\n args, newHolders, argPos, ary, arity - length\\n );\\n }\\n var thisBinding = isBind ? thisArg : this,\\n fn = isBindKey ? thisBinding[func] : func;\\n\\n length = args.length;\\n if (argPos) {\\n args = reorder(args, argPos);\\n } else if (isFlip && length > 1) {\\n args.reverse();\\n }\\n if (isAry && ary < length) {\\n args.length = ary;\\n }\\n if (this && this !== root && this instanceof wrapper) {\\n fn = Ctor || createCtor(fn);\\n }\\n return fn.apply(thisBinding, args);\\n }\\n return wrapper;\\n }\\n\\n /**\\n * Creates a function like `_.invertBy`.\\n *\\n * @private\\n * @param {Function} setter The function to set accumulator values.\\n * @param {Function} toIteratee The function to resolve iteratees.\\n * @returns {Function} Returns the new inverter function.\\n */\\n function createInverter(setter, toIteratee) {\\n return function(object, iteratee) {\\n return baseInverter(object, setter, toIteratee(iteratee), {});\\n };\\n }\\n\\n /**\\n * Creates a function that performs a mathematical operation on two values.\\n *\\n * @private\\n * @param {Function} operator The function to perform the operation.\\n * @param {number} [defaultValue] The value used for `undefined` arguments.\\n * @returns {Function} Returns the new mathematical operation function.\\n */\\n function createMathOperation(operator, defaultValue) {\\n return function(value, other) {\\n var result;\\n if (value === undefined && other === undefined) {\\n return defaultValue;\\n }\\n if (value !== undefined) {\\n result = value;\\n }\\n if (other !== undefined) {\\n if (result === undefined) {\\n return other;\\n }\\n if (typeof value == 'string' || typeof other == 'string') {\\n value = baseToString(value);\\n other = baseToString(other);\\n } else {\\n value = baseToNumber(value);\\n other = baseToNumber(other);\\n }\\n result = operator(value, other);\\n }\\n return result;\\n };\\n }\\n\\n /**\\n * Creates a function like `_.over`.\\n *\\n * @private\\n * @param {Function} arrayFunc The function to iterate over iteratees.\\n * @returns {Function} Returns the new over function.\\n */\\n function createOver(arrayFunc) {\\n return flatRest(function(iteratees) {\\n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\\n return baseRest(function(args) {\\n var thisArg = this;\\n return arrayFunc(iteratees, function(iteratee) {\\n return apply(iteratee, thisArg, args);\\n });\\n });\\n });\\n }\\n\\n /**\\n * Creates the padding for `string` based on `length`. The `chars` string\\n * is truncated if the number of characters exceeds `length`.\\n *\\n * @private\\n * @param {number} length The padding length.\\n * @param {string} [chars=' '] The string used as padding.\\n * @returns {string} Returns the padding for `string`.\\n */\\n function createPadding(length, chars) {\\n chars = chars === undefined ? ' ' : baseToString(chars);\\n\\n var charsLength = chars.length;\\n if (charsLength < 2) {\\n return charsLength ? baseRepeat(chars, length) : chars;\\n }\\n var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\\n return hasUnicode(chars)\\n ? castSlice(stringToArray(result), 0, length).join('')\\n : result.slice(0, length);\\n }\\n\\n /**\\n * Creates a function that wraps `func` to invoke it with the `this` binding\\n * of `thisArg` and `partials` prepended to the arguments it receives.\\n *\\n * @private\\n * @param {Function} func The function to wrap.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @param {*} thisArg The `this` binding of `func`.\\n * @param {Array} partials The arguments to prepend to those provided to\\n * the new function.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createPartial(func, bitmask, thisArg, partials) {\\n var isBind = bitmask & WRAP_BIND_FLAG,\\n Ctor = createCtor(func);\\n\\n function wrapper() {\\n var argsIndex = -1,\\n argsLength = arguments.length,\\n leftIndex = -1,\\n leftLength = partials.length,\\n args = Array(leftLength + argsLength),\\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\\n\\n while (++leftIndex < leftLength) {\\n args[leftIndex] = partials[leftIndex];\\n }\\n while (argsLength--) {\\n args[leftIndex++] = arguments[++argsIndex];\\n }\\n return apply(fn, isBind ? thisArg : this, args);\\n }\\n return wrapper;\\n }\\n\\n /**\\n * Creates a `_.range` or `_.rangeRight` function.\\n *\\n * @private\\n * @param {boolean} [fromRight] Specify iterating from right to left.\\n * @returns {Function} Returns the new range function.\\n */\\n function createRange(fromRight) {\\n return function(start, end, step) {\\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\\n end = step = undefined;\\n }\\n // Ensure the sign of `-0` is preserved.\\n start = toFinite(start);\\n if (end === undefined) {\\n end = start;\\n start = 0;\\n } else {\\n end = toFinite(end);\\n }\\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\\n return baseRange(start, end, step, fromRight);\\n };\\n }\\n\\n /**\\n * Creates a function that performs a relational operation on two values.\\n *\\n * @private\\n * @param {Function} operator The function to perform the operation.\\n * @returns {Function} Returns the new relational operation function.\\n */\\n function createRelationalOperation(operator) {\\n return function(value, other) {\\n if (!(typeof value == 'string' && typeof other == 'string')) {\\n value = toNumber(value);\\n other = toNumber(other);\\n }\\n return operator(value, other);\\n };\\n }\\n\\n /**\\n * Creates a function that wraps `func` to continue currying.\\n *\\n * @private\\n * @param {Function} func The function to wrap.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @param {Function} wrapFunc The function to create the `func` wrapper.\\n * @param {*} placeholder The placeholder value.\\n * @param {*} [thisArg] The `this` binding of `func`.\\n * @param {Array} [partials] The arguments to prepend to those provided to\\n * the new function.\\n * @param {Array} [holders] The `partials` placeholder indexes.\\n * @param {Array} [argPos] The argument positions of the new function.\\n * @param {number} [ary] The arity cap of `func`.\\n * @param {number} [arity] The arity of `func`.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\\n var isCurry = bitmask & WRAP_CURRY_FLAG,\\n newHolders = isCurry ? holders : undefined,\\n newHoldersRight = isCurry ? undefined : holders,\\n newPartials = isCurry ? partials : undefined,\\n newPartialsRight = isCurry ? undefined : partials;\\n\\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\\n\\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\\n }\\n var newData = [\\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\\n newHoldersRight, argPos, ary, arity\\n ];\\n\\n var result = wrapFunc.apply(undefined, newData);\\n if (isLaziable(func)) {\\n setData(result, newData);\\n }\\n result.placeholder = placeholder;\\n return setWrapToString(result, func, bitmask);\\n }\\n\\n /**\\n * Creates a function like `_.round`.\\n *\\n * @private\\n * @param {string} methodName The name of the `Math` method to use when rounding.\\n * @returns {Function} Returns the new round function.\\n */\\n function createRound(methodName) {\\n var func = Math[methodName];\\n return function(number, precision) {\\n number = toNumber(number);\\n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\\n if (precision) {\\n // Shift with exponential notation to avoid floating-point issues.\\n // See [MDN](https://mdn.io/round#Examples) for more details.\\n var pair = (toString(number) + 'e').split('e'),\\n value = func(pair[0] + 'e' + (+pair[1] + precision));\\n\\n pair = (toString(value) + 'e').split('e');\\n return +(pair[0] + 'e' + (+pair[1] - precision));\\n }\\n return func(number);\\n };\\n }\\n\\n /**\\n * Creates a set object of `values`.\\n *\\n * @private\\n * @param {Array} values The values to add to the set.\\n * @returns {Object} Returns the new set.\\n */\\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\\n return new Set(values);\\n };\\n\\n /**\\n * Creates a `_.toPairs` or `_.toPairsIn` function.\\n *\\n * @private\\n * @param {Function} keysFunc The function to get the keys of a given object.\\n * @returns {Function} Returns the new pairs function.\\n */\\n function createToPairs(keysFunc) {\\n return function(object) {\\n var tag = getTag(object);\\n if (tag == mapTag) {\\n return mapToArray(object);\\n }\\n if (tag == setTag) {\\n return setToPairs(object);\\n }\\n return baseToPairs(object, keysFunc(object));\\n };\\n }\\n\\n /**\\n * Creates a function that either curries or invokes `func` with optional\\n * `this` binding and partially applied arguments.\\n *\\n * @private\\n * @param {Function|string} func The function or method name to wrap.\\n * @param {number} bitmask The bitmask flags.\\n * 1 - `_.bind`\\n * 2 - `_.bindKey`\\n * 4 - `_.curry` or `_.curryRight` of a bound function\\n * 8 - `_.curry`\\n * 16 - `_.curryRight`\\n * 32 - `_.partial`\\n * 64 - `_.partialRight`\\n * 128 - `_.rearg`\\n * 256 - `_.ary`\\n * 512 - `_.flip`\\n * @param {*} [thisArg] The `this` binding of `func`.\\n * @param {Array} [partials] The arguments to be partially applied.\\n * @param {Array} [holders] The `partials` placeholder indexes.\\n * @param {Array} [argPos] The argument positions of the new function.\\n * @param {number} [ary] The arity cap of `func`.\\n * @param {number} [arity] The arity of `func`.\\n * @returns {Function} Returns the new wrapped function.\\n */\\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\\n if (!isBindKey && typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n var length = partials ? partials.length : 0;\\n if (!length) {\\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\\n partials = holders = undefined;\\n }\\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\\n arity = arity === undefined ? arity : toInteger(arity);\\n length -= holders ? holders.length : 0;\\n\\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\\n var partialsRight = partials,\\n holdersRight = holders;\\n\\n partials = holders = undefined;\\n }\\n var data = isBindKey ? undefined : getData(func);\\n\\n var newData = [\\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\\n argPos, ary, arity\\n ];\\n\\n if (data) {\\n mergeData(newData, data);\\n }\\n func = newData[0];\\n bitmask = newData[1];\\n thisArg = newData[2];\\n partials = newData[3];\\n holders = newData[4];\\n arity = newData[9] = newData[9] === undefined\\n ? (isBindKey ? 0 : func.length)\\n : nativeMax(newData[9] - length, 0);\\n\\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\\n }\\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\\n var result = createBind(func, bitmask, thisArg);\\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\\n result = createCurry(func, bitmask, arity);\\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\\n result = createPartial(func, bitmask, thisArg, partials);\\n } else {\\n result = createHybrid.apply(undefined, newData);\\n }\\n var setter = data ? baseSetData : setData;\\n return setWrapToString(setter(result, newData), func, bitmask);\\n }\\n\\n /**\\n * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\\n * of source objects to the destination object for all destination properties\\n * that resolve to `undefined`.\\n *\\n * @private\\n * @param {*} objValue The destination value.\\n * @param {*} srcValue The source value.\\n * @param {string} key The key of the property to assign.\\n * @param {Object} object The parent object of `objValue`.\\n * @returns {*} Returns the value to assign.\\n */\\n function customDefaultsAssignIn(objValue, srcValue, key, object) {\\n if (objValue === undefined ||\\n (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\\n return srcValue;\\n }\\n return objValue;\\n }\\n\\n /**\\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\\n * objects into destination objects that are passed thru.\\n *\\n * @private\\n * @param {*} objValue The destination value.\\n * @param {*} srcValue The source value.\\n * @param {string} key The key of the property to merge.\\n * @param {Object} object The parent object of `objValue`.\\n * @param {Object} source The parent object of `srcValue`.\\n * @param {Object} [stack] Tracks traversed source values and their merged\\n * counterparts.\\n * @returns {*} Returns the value to assign.\\n */\\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\\n if (isObject(objValue) && isObject(srcValue)) {\\n // Recursively merge objects and arrays (susceptible to call stack limits).\\n stack.set(srcValue, objValue);\\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\\n stack['delete'](srcValue);\\n }\\n return objValue;\\n }\\n\\n /**\\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\\n * objects.\\n *\\n * @private\\n * @param {*} value The value to inspect.\\n * @param {string} key The key of the property to inspect.\\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\\n */\\n function customOmitClone(value) {\\n return isPlainObject(value) ? undefined : value;\\n }\\n\\n /**\\n * A specialized version of `baseIsEqualDeep` for arrays with support for\\n * partial deep comparisons.\\n *\\n * @private\\n * @param {Array} array The array to compare.\\n * @param {Array} other The other array to compare.\\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\\n * @param {Function} customizer The function to customize comparisons.\\n * @param {Function} equalFunc The function to determine equivalents of values.\\n * @param {Object} stack Tracks traversed `array` and `other` objects.\\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\\n */\\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\\n arrLength = array.length,\\n othLength = other.length;\\n\\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\\n return false;\\n }\\n // Assume cyclic values are equal.\\n var stacked = stack.get(array);\\n if (stacked && stack.get(other)) {\\n return stacked == other;\\n }\\n var index = -1,\\n result = true,\\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\\n\\n stack.set(array, other);\\n stack.set(other, array);\\n\\n // Ignore non-index properties.\\n while (++index < arrLength) {\\n var arrValue = array[index],\\n othValue = other[index];\\n\\n if (customizer) {\\n var compared = isPartial\\n ? customizer(othValue, arrValue, index, other, array, stack)\\n : customizer(arrValue, othValue, index, array, other, stack);\\n }\\n if (compared !== undefined) {\\n if (compared) {\\n continue;\\n }\\n result = false;\\n break;\\n }\\n // Recursively compare arrays (susceptible to call stack limits).\\n if (seen) {\\n if (!arraySome(other, function(othValue, othIndex) {\\n if (!cacheHas(seen, othIndex) &&\\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\\n return seen.push(othIndex);\\n }\\n })) {\\n result = false;\\n break;\\n }\\n } else if (!(\\n arrValue === othValue ||\\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\\n )) {\\n result = false;\\n break;\\n }\\n }\\n stack['delete'](array);\\n stack['delete'](other);\\n return result;\\n }\\n\\n /**\\n * A specialized version of `baseIsEqualDeep` for comparing objects of\\n * the same `toStringTag`.\\n *\\n * **Note:** This function only supports comparing values with tags of\\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\\n *\\n * @private\\n * @param {Object} object The object to compare.\\n * @param {Object} other The other object to compare.\\n * @param {string} tag The `toStringTag` of the objects to compare.\\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\\n * @param {Function} customizer The function to customize comparisons.\\n * @param {Function} equalFunc The function to determine equivalents of values.\\n * @param {Object} stack Tracks traversed `object` and `other` objects.\\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\\n */\\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\\n switch (tag) {\\n case dataViewTag:\\n if ((object.byteLength != other.byteLength) ||\\n (object.byteOffset != other.byteOffset)) {\\n return false;\\n }\\n object = object.buffer;\\n other = other.buffer;\\n\\n case arrayBufferTag:\\n if ((object.byteLength != other.byteLength) ||\\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\\n return false;\\n }\\n return true;\\n\\n case boolTag:\\n case dateTag:\\n case numberTag:\\n // Coerce booleans to `1` or `0` and dates to milliseconds.\\n // Invalid dates are coerced to `NaN`.\\n return eq(+object, +other);\\n\\n case errorTag:\\n return object.name == other.name && object.message == other.message;\\n\\n case regexpTag:\\n case stringTag:\\n // Coerce regexes to strings and treat strings, primitives and objects,\\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\\n // for more details.\\n return object == (other + '');\\n\\n case mapTag:\\n var convert = mapToArray;\\n\\n case setTag:\\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\\n convert || (convert = setToArray);\\n\\n if (object.size != other.size && !isPartial) {\\n return false;\\n }\\n // Assume cyclic values are equal.\\n var stacked = stack.get(object);\\n if (stacked) {\\n return stacked == other;\\n }\\n bitmask |= COMPARE_UNORDERED_FLAG;\\n\\n // Recursively compare objects (susceptible to call stack limits).\\n stack.set(object, other);\\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\\n stack['delete'](object);\\n return result;\\n\\n case symbolTag:\\n if (symbolValueOf) {\\n return symbolValueOf.call(object) == symbolValueOf.call(other);\\n }\\n }\\n return false;\\n }\\n\\n /**\\n * A specialized version of `baseIsEqualDeep` for objects with support for\\n * partial deep comparisons.\\n *\\n * @private\\n * @param {Object} object The object to compare.\\n * @param {Object} other The other object to compare.\\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\\n * @param {Function} customizer The function to customize comparisons.\\n * @param {Function} equalFunc The function to determine equivalents of values.\\n * @param {Object} stack Tracks traversed `object` and `other` objects.\\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\\n */\\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\\n objProps = getAllKeys(object),\\n objLength = objProps.length,\\n othProps = getAllKeys(other),\\n othLength = othProps.length;\\n\\n if (objLength != othLength && !isPartial) {\\n return false;\\n }\\n var index = objLength;\\n while (index--) {\\n var key = objProps[index];\\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\\n return false;\\n }\\n }\\n // Assume cyclic values are equal.\\n var stacked = stack.get(object);\\n if (stacked && stack.get(other)) {\\n return stacked == other;\\n }\\n var result = true;\\n stack.set(object, other);\\n stack.set(other, object);\\n\\n var skipCtor = isPartial;\\n while (++index < objLength) {\\n key = objProps[index];\\n var objValue = object[key],\\n othValue = other[key];\\n\\n if (customizer) {\\n var compared = isPartial\\n ? customizer(othValue, objValue, key, other, object, stack)\\n : customizer(objValue, othValue, key, object, other, stack);\\n }\\n // Recursively compare objects (susceptible to call stack limits).\\n if (!(compared === undefined\\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\\n : compared\\n )) {\\n result = false;\\n break;\\n }\\n skipCtor || (skipCtor = key == 'constructor');\\n }\\n if (result && !skipCtor) {\\n var objCtor = object.constructor,\\n othCtor = other.constructor;\\n\\n // Non `Object` object instances with different constructors are not equal.\\n if (objCtor != othCtor &&\\n ('constructor' in object && 'constructor' in other) &&\\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\\n result = false;\\n }\\n }\\n stack['delete'](object);\\n stack['delete'](other);\\n return result;\\n }\\n\\n /**\\n * A specialized version of `baseRest` which flattens the rest array.\\n *\\n * @private\\n * @param {Function} func The function to apply a rest parameter to.\\n * @returns {Function} Returns the new function.\\n */\\n function flatRest(func) {\\n return setToString(overRest(func, undefined, flatten), func + '');\\n }\\n\\n /**\\n * Creates an array of own enumerable property names and symbols of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names and symbols.\\n */\\n function getAllKeys(object) {\\n return baseGetAllKeys(object, keys, getSymbols);\\n }\\n\\n /**\\n * Creates an array of own and inherited enumerable property names and\\n * symbols of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names and symbols.\\n */\\n function getAllKeysIn(object) {\\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\\n }\\n\\n /**\\n * Gets metadata for `func`.\\n *\\n * @private\\n * @param {Function} func The function to query.\\n * @returns {*} Returns the metadata for `func`.\\n */\\n var getData = !metaMap ? noop : function(func) {\\n return metaMap.get(func);\\n };\\n\\n /**\\n * Gets the name of `func`.\\n *\\n * @private\\n * @param {Function} func The function to query.\\n * @returns {string} Returns the function name.\\n */\\n function getFuncName(func) {\\n var result = (func.name + ''),\\n array = realNames[result],\\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\\n\\n while (length--) {\\n var data = array[length],\\n otherFunc = data.func;\\n if (otherFunc == null || otherFunc == func) {\\n return data.name;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Gets the argument placeholder value for `func`.\\n *\\n * @private\\n * @param {Function} func The function to inspect.\\n * @returns {*} Returns the placeholder value.\\n */\\n function getHolder(func) {\\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\\n return object.placeholder;\\n }\\n\\n /**\\n * Gets the appropriate \\\"iteratee\\\" function. If `_.iteratee` is customized,\\n * this function returns the custom method, otherwise it returns `baseIteratee`.\\n * If arguments are provided, the chosen function is invoked with them and\\n * its result is returned.\\n *\\n * @private\\n * @param {*} [value] The value to convert to an iteratee.\\n * @param {number} [arity] The arity of the created iteratee.\\n * @returns {Function} Returns the chosen function or its result.\\n */\\n function getIteratee() {\\n var result = lodash.iteratee || iteratee;\\n result = result === iteratee ? baseIteratee : result;\\n return arguments.length ? result(arguments[0], arguments[1]) : result;\\n }\\n\\n /**\\n * Gets the data for `map`.\\n *\\n * @private\\n * @param {Object} map The map to query.\\n * @param {string} key The reference key.\\n * @returns {*} Returns the map data.\\n */\\n function getMapData(map, key) {\\n var data = map.__data__;\\n return isKeyable(key)\\n ? data[typeof key == 'string' ? 'string' : 'hash']\\n : data.map;\\n }\\n\\n /**\\n * Gets the property names, values, and compare flags of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the match data of `object`.\\n */\\n function getMatchData(object) {\\n var result = keys(object),\\n length = result.length;\\n\\n while (length--) {\\n var key = result[length],\\n value = object[key];\\n\\n result[length] = [key, value, isStrictComparable(value)];\\n }\\n return result;\\n }\\n\\n /**\\n * Gets the native function at `key` of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {string} key The key of the method to get.\\n * @returns {*} Returns the function if it's native, else `undefined`.\\n */\\n function getNative(object, key) {\\n var value = getValue(object, key);\\n return baseIsNative(value) ? value : undefined;\\n }\\n\\n /**\\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\\n *\\n * @private\\n * @param {*} value The value to query.\\n * @returns {string} Returns the raw `toStringTag`.\\n */\\n function getRawTag(value) {\\n var isOwn = hasOwnProperty.call(value, symToStringTag),\\n tag = value[symToStringTag];\\n\\n try {\\n value[symToStringTag] = undefined;\\n var unmasked = true;\\n } catch (e) {}\\n\\n var result = nativeObjectToString.call(value);\\n if (unmasked) {\\n if (isOwn) {\\n value[symToStringTag] = tag;\\n } else {\\n delete value[symToStringTag];\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Creates an array of the own enumerable symbols of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of symbols.\\n */\\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\\n if (object == null) {\\n return [];\\n }\\n object = Object(object);\\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\\n return propertyIsEnumerable.call(object, symbol);\\n });\\n };\\n\\n /**\\n * Creates an array of the own and inherited enumerable symbols of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of symbols.\\n */\\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\\n var result = [];\\n while (object) {\\n arrayPush(result, getSymbols(object));\\n object = getPrototype(object);\\n }\\n return result;\\n };\\n\\n /**\\n * Gets the `toStringTag` of `value`.\\n *\\n * @private\\n * @param {*} value The value to query.\\n * @returns {string} Returns the `toStringTag`.\\n */\\n var getTag = baseGetTag;\\n\\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\\n (Map && getTag(new Map) != mapTag) ||\\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\\n (Set && getTag(new Set) != setTag) ||\\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\\n getTag = function(value) {\\n var result = baseGetTag(value),\\n Ctor = result == objectTag ? value.constructor : undefined,\\n ctorString = Ctor ? toSource(Ctor) : '';\\n\\n if (ctorString) {\\n switch (ctorString) {\\n case dataViewCtorString: return dataViewTag;\\n case mapCtorString: return mapTag;\\n case promiseCtorString: return promiseTag;\\n case setCtorString: return setTag;\\n case weakMapCtorString: return weakMapTag;\\n }\\n }\\n return result;\\n };\\n }\\n\\n /**\\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\\n *\\n * @private\\n * @param {number} start The start of the view.\\n * @param {number} end The end of the view.\\n * @param {Array} transforms The transformations to apply to the view.\\n * @returns {Object} Returns an object containing the `start` and `end`\\n * positions of the view.\\n */\\n function getView(start, end, transforms) {\\n var index = -1,\\n length = transforms.length;\\n\\n while (++index < length) {\\n var data = transforms[index],\\n size = data.size;\\n\\n switch (data.type) {\\n case 'drop': start += size; break;\\n case 'dropRight': end -= size; break;\\n case 'take': end = nativeMin(end, start + size); break;\\n case 'takeRight': start = nativeMax(start, end - size); break;\\n }\\n }\\n return { 'start': start, 'end': end };\\n }\\n\\n /**\\n * Extracts wrapper details from the `source` body comment.\\n *\\n * @private\\n * @param {string} source The source to inspect.\\n * @returns {Array} Returns the wrapper details.\\n */\\n function getWrapDetails(source) {\\n var match = source.match(reWrapDetails);\\n return match ? match[1].split(reSplitDetails) : [];\\n }\\n\\n /**\\n * Checks if `path` exists on `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path to check.\\n * @param {Function} hasFunc The function to check properties.\\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\\n */\\n function hasPath(object, path, hasFunc) {\\n path = castPath(path, object);\\n\\n var index = -1,\\n length = path.length,\\n result = false;\\n\\n while (++index < length) {\\n var key = toKey(path[index]);\\n if (!(result = object != null && hasFunc(object, key))) {\\n break;\\n }\\n object = object[key];\\n }\\n if (result || ++index != length) {\\n return result;\\n }\\n length = object == null ? 0 : object.length;\\n return !!length && isLength(length) && isIndex(key, length) &&\\n (isArray(object) || isArguments(object));\\n }\\n\\n /**\\n * Initializes an array clone.\\n *\\n * @private\\n * @param {Array} array The array to clone.\\n * @returns {Array} Returns the initialized clone.\\n */\\n function initCloneArray(array) {\\n var length = array.length,\\n result = array.constructor(length);\\n\\n // Add properties assigned by `RegExp#exec`.\\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\\n result.index = array.index;\\n result.input = array.input;\\n }\\n return result;\\n }\\n\\n /**\\n * Initializes an object clone.\\n *\\n * @private\\n * @param {Object} object The object to clone.\\n * @returns {Object} Returns the initialized clone.\\n */\\n function initCloneObject(object) {\\n return (typeof object.constructor == 'function' && !isPrototype(object))\\n ? baseCreate(getPrototype(object))\\n : {};\\n }\\n\\n /**\\n * Initializes an object clone based on its `toStringTag`.\\n *\\n * **Note:** This function only supports cloning values with tags of\\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\\n *\\n * @private\\n * @param {Object} object The object to clone.\\n * @param {string} tag The `toStringTag` of the object to clone.\\n * @param {Function} cloneFunc The function to clone values.\\n * @param {boolean} [isDeep] Specify a deep clone.\\n * @returns {Object} Returns the initialized clone.\\n */\\n function initCloneByTag(object, tag, cloneFunc, isDeep) {\\n var Ctor = object.constructor;\\n switch (tag) {\\n case arrayBufferTag:\\n return cloneArrayBuffer(object);\\n\\n case boolTag:\\n case dateTag:\\n return new Ctor(+object);\\n\\n case dataViewTag:\\n return cloneDataView(object, isDeep);\\n\\n case float32Tag: case float64Tag:\\n case int8Tag: case int16Tag: case int32Tag:\\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\\n return cloneTypedArray(object, isDeep);\\n\\n case mapTag:\\n return cloneMap(object, isDeep, cloneFunc);\\n\\n case numberTag:\\n case stringTag:\\n return new Ctor(object);\\n\\n case regexpTag:\\n return cloneRegExp(object);\\n\\n case setTag:\\n return cloneSet(object, isDeep, cloneFunc);\\n\\n case symbolTag:\\n return cloneSymbol(object);\\n }\\n }\\n\\n /**\\n * Inserts wrapper `details` in a comment at the top of the `source` body.\\n *\\n * @private\\n * @param {string} source The source to modify.\\n * @returns {Array} details The details to insert.\\n * @returns {string} Returns the modified source.\\n */\\n function insertWrapDetails(source, details) {\\n var length = details.length;\\n if (!length) {\\n return source;\\n }\\n var lastIndex = length - 1;\\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\\n details = details.join(length > 2 ? ', ' : ' ');\\n return source.replace(reWrapComment, '{\\\\n/* [wrapped with ' + details + '] */\\\\n');\\n }\\n\\n /**\\n * Checks if `value` is a flattenable `arguments` object or array.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\\n */\\n function isFlattenable(value) {\\n return isArray(value) || isArguments(value) ||\\n !!(spreadableSymbol && value && value[spreadableSymbol]);\\n }\\n\\n /**\\n * Checks if `value` is a valid array-like index.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\\n */\\n function isIndex(value, length) {\\n length = length == null ? MAX_SAFE_INTEGER : length;\\n return !!length &&\\n (typeof value == 'number' || reIsUint.test(value)) &&\\n (value > -1 && value % 1 == 0 && value < length);\\n }\\n\\n /**\\n * Checks if the given arguments are from an iteratee call.\\n *\\n * @private\\n * @param {*} value The potential iteratee value argument.\\n * @param {*} index The potential iteratee index or key argument.\\n * @param {*} object The potential iteratee object argument.\\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\\n * else `false`.\\n */\\n function isIterateeCall(value, index, object) {\\n if (!isObject(object)) {\\n return false;\\n }\\n var type = typeof index;\\n if (type == 'number'\\n ? (isArrayLike(object) && isIndex(index, object.length))\\n : (type == 'string' && index in object)\\n ) {\\n return eq(object[index], value);\\n }\\n return false;\\n }\\n\\n /**\\n * Checks if `value` is a property name and not a property path.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @param {Object} [object] The object to query keys on.\\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\\n */\\n function isKey(value, object) {\\n if (isArray(value)) {\\n return false;\\n }\\n var type = typeof value;\\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\\n value == null || isSymbol(value)) {\\n return true;\\n }\\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\\n (object != null && value in Object(object));\\n }\\n\\n /**\\n * Checks if `value` is suitable for use as unique object key.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\\n */\\n function isKeyable(value) {\\n var type = typeof value;\\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\\n ? (value !== '__proto__')\\n : (value === null);\\n }\\n\\n /**\\n * Checks if `func` has a lazy counterpart.\\n *\\n * @private\\n * @param {Function} func The function to check.\\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\\n * else `false`.\\n */\\n function isLaziable(func) {\\n var funcName = getFuncName(func),\\n other = lodash[funcName];\\n\\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\\n return false;\\n }\\n if (func === other) {\\n return true;\\n }\\n var data = getData(other);\\n return !!data && func === data[0];\\n }\\n\\n /**\\n * Checks if `func` has its source masked.\\n *\\n * @private\\n * @param {Function} func The function to check.\\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\\n */\\n function isMasked(func) {\\n return !!maskSrcKey && (maskSrcKey in func);\\n }\\n\\n /**\\n * Checks if `func` is capable of being masked.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\\n */\\n var isMaskable = coreJsData ? isFunction : stubFalse;\\n\\n /**\\n * Checks if `value` is likely a prototype object.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\\n */\\n function isPrototype(value) {\\n var Ctor = value && value.constructor,\\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\\n\\n return value === proto;\\n }\\n\\n /**\\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\\n *\\n * @private\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` if suitable for strict\\n * equality comparisons, else `false`.\\n */\\n function isStrictComparable(value) {\\n return value === value && !isObject(value);\\n }\\n\\n /**\\n * A specialized version of `matchesProperty` for source values suitable\\n * for strict equality comparisons, i.e. `===`.\\n *\\n * @private\\n * @param {string} key The key of the property to get.\\n * @param {*} srcValue The value to match.\\n * @returns {Function} Returns the new spec function.\\n */\\n function matchesStrictComparable(key, srcValue) {\\n return function(object) {\\n if (object == null) {\\n return false;\\n }\\n return object[key] === srcValue &&\\n (srcValue !== undefined || (key in Object(object)));\\n };\\n }\\n\\n /**\\n * A specialized version of `_.memoize` which clears the memoized function's\\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\\n *\\n * @private\\n * @param {Function} func The function to have its output memoized.\\n * @returns {Function} Returns the new memoized function.\\n */\\n function memoizeCapped(func) {\\n var result = memoize(func, function(key) {\\n if (cache.size === MAX_MEMOIZE_SIZE) {\\n cache.clear();\\n }\\n return key;\\n });\\n\\n var cache = result.cache;\\n return result;\\n }\\n\\n /**\\n * Merges the function metadata of `source` into `data`.\\n *\\n * Merging metadata reduces the number of wrappers used to invoke a function.\\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\\n * may be applied regardless of execution order. Methods like `_.ary` and\\n * `_.rearg` modify function arguments, making the order in which they are\\n * executed important, preventing the merging of metadata. However, we make\\n * an exception for a safe combined case where curried functions have `_.ary`\\n * and or `_.rearg` applied.\\n *\\n * @private\\n * @param {Array} data The destination metadata.\\n * @param {Array} source The source metadata.\\n * @returns {Array} Returns `data`.\\n */\\n function mergeData(data, source) {\\n var bitmask = data[1],\\n srcBitmask = source[1],\\n newBitmask = bitmask | srcBitmask,\\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\\n\\n var isCombo =\\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\\n\\n // Exit early if metadata can't be merged.\\n if (!(isCommon || isCombo)) {\\n return data;\\n }\\n // Use source `thisArg` if available.\\n if (srcBitmask & WRAP_BIND_FLAG) {\\n data[2] = source[2];\\n // Set when currying a bound function.\\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\\n }\\n // Compose partial arguments.\\n var value = source[3];\\n if (value) {\\n var partials = data[3];\\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\\n }\\n // Compose partial right arguments.\\n value = source[5];\\n if (value) {\\n partials = data[5];\\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\\n }\\n // Use source `argPos` if available.\\n value = source[7];\\n if (value) {\\n data[7] = value;\\n }\\n // Use source `ary` if it's smaller.\\n if (srcBitmask & WRAP_ARY_FLAG) {\\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\\n }\\n // Use source `arity` if one is not provided.\\n if (data[9] == null) {\\n data[9] = source[9];\\n }\\n // Use source `func` and merge bitmasks.\\n data[0] = source[0];\\n data[1] = newBitmask;\\n\\n return data;\\n }\\n\\n /**\\n * This function is like\\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\\n * except that it includes inherited enumerable properties.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names.\\n */\\n function nativeKeysIn(object) {\\n var result = [];\\n if (object != null) {\\n for (var key in Object(object)) {\\n result.push(key);\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Converts `value` to a string using `Object.prototype.toString`.\\n *\\n * @private\\n * @param {*} value The value to convert.\\n * @returns {string} Returns the converted string.\\n */\\n function objectToString(value) {\\n return nativeObjectToString.call(value);\\n }\\n\\n /**\\n * A specialized version of `baseRest` which transforms the rest array.\\n *\\n * @private\\n * @param {Function} func The function to apply a rest parameter to.\\n * @param {number} [start=func.length-1] The start position of the rest parameter.\\n * @param {Function} transform The rest array transform.\\n * @returns {Function} Returns the new function.\\n */\\n function overRest(func, start, transform) {\\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\\n return function() {\\n var args = arguments,\\n index = -1,\\n length = nativeMax(args.length - start, 0),\\n array = Array(length);\\n\\n while (++index < length) {\\n array[index] = args[start + index];\\n }\\n index = -1;\\n var otherArgs = Array(start + 1);\\n while (++index < start) {\\n otherArgs[index] = args[index];\\n }\\n otherArgs[start] = transform(array);\\n return apply(func, this, otherArgs);\\n };\\n }\\n\\n /**\\n * Gets the parent value at `path` of `object`.\\n *\\n * @private\\n * @param {Object} object The object to query.\\n * @param {Array} path The path to get the parent value of.\\n * @returns {*} Returns the parent value.\\n */\\n function parent(object, path) {\\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\\n }\\n\\n /**\\n * Reorder `array` according to the specified indexes where the element at\\n * the first index is assigned as the first element, the element at\\n * the second index is assigned as the second element, and so on.\\n *\\n * @private\\n * @param {Array} array The array to reorder.\\n * @param {Array} indexes The arranged array indexes.\\n * @returns {Array} Returns `array`.\\n */\\n function reorder(array, indexes) {\\n var arrLength = array.length,\\n length = nativeMin(indexes.length, arrLength),\\n oldArray = copyArray(array);\\n\\n while (length--) {\\n var index = indexes[length];\\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\\n }\\n return array;\\n }\\n\\n /**\\n * Sets metadata for `func`.\\n *\\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\\n * period of time, it will trip its breaker and transition to an identity\\n * function to avoid garbage collection pauses in V8. See\\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\\n * for more details.\\n *\\n * @private\\n * @param {Function} func The function to associate metadata with.\\n * @param {*} data The metadata.\\n * @returns {Function} Returns `func`.\\n */\\n var setData = shortOut(baseSetData);\\n\\n /**\\n * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\\n *\\n * @private\\n * @param {Function} func The function to delay.\\n * @param {number} wait The number of milliseconds to delay invocation.\\n * @returns {number|Object} Returns the timer id or timeout object.\\n */\\n var setTimeout = ctxSetTimeout || function(func, wait) {\\n return root.setTimeout(func, wait);\\n };\\n\\n /**\\n * Sets the `toString` method of `func` to return `string`.\\n *\\n * @private\\n * @param {Function} func The function to modify.\\n * @param {Function} string The `toString` result.\\n * @returns {Function} Returns `func`.\\n */\\n var setToString = shortOut(baseSetToString);\\n\\n /**\\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\\n * with wrapper details in a comment at the top of the source body.\\n *\\n * @private\\n * @param {Function} wrapper The function to modify.\\n * @param {Function} reference The reference function.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @returns {Function} Returns `wrapper`.\\n */\\n function setWrapToString(wrapper, reference, bitmask) {\\n var source = (reference + '');\\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\\n }\\n\\n /**\\n * Creates a function that'll short out and invoke `identity` instead\\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\\n * milliseconds.\\n *\\n * @private\\n * @param {Function} func The function to restrict.\\n * @returns {Function} Returns the new shortable function.\\n */\\n function shortOut(func) {\\n var count = 0,\\n lastCalled = 0;\\n\\n return function() {\\n var stamp = nativeNow(),\\n remaining = HOT_SPAN - (stamp - lastCalled);\\n\\n lastCalled = stamp;\\n if (remaining > 0) {\\n if (++count >= HOT_COUNT) {\\n return arguments[0];\\n }\\n } else {\\n count = 0;\\n }\\n return func.apply(undefined, arguments);\\n };\\n }\\n\\n /**\\n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\\n *\\n * @private\\n * @param {Array} array The array to shuffle.\\n * @param {number} [size=array.length] The size of `array`.\\n * @returns {Array} Returns `array`.\\n */\\n function shuffleSelf(array, size) {\\n var index = -1,\\n length = array.length,\\n lastIndex = length - 1;\\n\\n size = size === undefined ? length : size;\\n while (++index < size) {\\n var rand = baseRandom(index, lastIndex),\\n value = array[rand];\\n\\n array[rand] = array[index];\\n array[index] = value;\\n }\\n array.length = size;\\n return array;\\n }\\n\\n /**\\n * Converts `string` to a property path array.\\n *\\n * @private\\n * @param {string} string The string to convert.\\n * @returns {Array} Returns the property path array.\\n */\\n var stringToPath = memoizeCapped(function(string) {\\n var result = [];\\n if (reLeadingDot.test(string)) {\\n result.push('');\\n }\\n string.replace(rePropName, function(match, number, quote, string) {\\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\\n });\\n return result;\\n });\\n\\n /**\\n * Converts `value` to a string key if it's not a string or symbol.\\n *\\n * @private\\n * @param {*} value The value to inspect.\\n * @returns {string|symbol} Returns the key.\\n */\\n function toKey(value) {\\n if (typeof value == 'string' || isSymbol(value)) {\\n return value;\\n }\\n var result = (value + '');\\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\\n }\\n\\n /**\\n * Converts `func` to its source code.\\n *\\n * @private\\n * @param {Function} func The function to convert.\\n * @returns {string} Returns the source code.\\n */\\n function toSource(func) {\\n if (func != null) {\\n try {\\n return funcToString.call(func);\\n } catch (e) {}\\n try {\\n return (func + '');\\n } catch (e) {}\\n }\\n return '';\\n }\\n\\n /**\\n * Updates wrapper `details` based on `bitmask` flags.\\n *\\n * @private\\n * @returns {Array} details The details to modify.\\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\\n * @returns {Array} Returns `details`.\\n */\\n function updateWrapDetails(details, bitmask) {\\n arrayEach(wrapFlags, function(pair) {\\n var value = '_.' + pair[0];\\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\\n details.push(value);\\n }\\n });\\n return details.sort();\\n }\\n\\n /**\\n * Creates a clone of `wrapper`.\\n *\\n * @private\\n * @param {Object} wrapper The wrapper to clone.\\n * @returns {Object} Returns the cloned wrapper.\\n */\\n function wrapperClone(wrapper) {\\n if (wrapper instanceof LazyWrapper) {\\n return wrapper.clone();\\n }\\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\\n result.__actions__ = copyArray(wrapper.__actions__);\\n result.__index__ = wrapper.__index__;\\n result.__values__ = wrapper.__values__;\\n return result;\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates an array of elements split into groups the length of `size`.\\n * If `array` can't be split evenly, the final chunk will be the remaining\\n * elements.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to process.\\n * @param {number} [size=1] The length of each chunk\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the new array of chunks.\\n * @example\\n *\\n * _.chunk(['a', 'b', 'c', 'd'], 2);\\n * // => [['a', 'b'], ['c', 'd']]\\n *\\n * _.chunk(['a', 'b', 'c', 'd'], 3);\\n * // => [['a', 'b', 'c'], ['d']]\\n */\\n function chunk(array, size, guard) {\\n if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\\n size = 1;\\n } else {\\n size = nativeMax(toInteger(size), 0);\\n }\\n var length = array == null ? 0 : array.length;\\n if (!length || size < 1) {\\n return [];\\n }\\n var index = 0,\\n resIndex = 0,\\n result = Array(nativeCeil(length / size));\\n\\n while (index < length) {\\n result[resIndex++] = baseSlice(array, index, (index += size));\\n }\\n return result;\\n }\\n\\n /**\\n * Creates an array with all falsey values removed. The values `false`, `null`,\\n * `0`, `\\\"\\\"`, `undefined`, and `NaN` are falsey.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to compact.\\n * @returns {Array} Returns the new array of filtered values.\\n * @example\\n *\\n * _.compact([0, 1, false, 2, '', 3]);\\n * // => [1, 2, 3]\\n */\\n function compact(array) {\\n var index = -1,\\n length = array == null ? 0 : array.length,\\n resIndex = 0,\\n result = [];\\n\\n while (++index < length) {\\n var value = array[index];\\n if (value) {\\n result[resIndex++] = value;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * Creates a new array concatenating `array` with any additional arrays\\n * and/or values.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to concatenate.\\n * @param {...*} [values] The values to concatenate.\\n * @returns {Array} Returns the new concatenated array.\\n * @example\\n *\\n * var array = [1];\\n * var other = _.concat(array, 2, [3], [[4]]);\\n *\\n * console.log(other);\\n * // => [1, 2, 3, [4]]\\n *\\n * console.log(array);\\n * // => [1]\\n */\\n function concat() {\\n var length = arguments.length;\\n if (!length) {\\n return [];\\n }\\n var args = Array(length - 1),\\n array = arguments[0],\\n index = length;\\n\\n while (index--) {\\n args[index - 1] = arguments[index];\\n }\\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\\n }\\n\\n /**\\n * Creates an array of `array` values not included in the other given arrays\\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons. The order and references of result values are\\n * determined by the first array.\\n *\\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {...Array} [values] The values to exclude.\\n * @returns {Array} Returns the new array of filtered values.\\n * @see _.without, _.xor\\n * @example\\n *\\n * _.difference([2, 1], [2, 3]);\\n * // => [1]\\n */\\n var difference = baseRest(function(array, values) {\\n return isArrayLikeObject(array)\\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\\n : [];\\n });\\n\\n /**\\n * This method is like `_.difference` except that it accepts `iteratee` which\\n * is invoked for each element of `array` and `values` to generate the criterion\\n * by which they're compared. The order and references of result values are\\n * determined by the first array. The iteratee is invoked with one argument:\\n * (value).\\n *\\n * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {...Array} [values] The values to exclude.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns the new array of filtered values.\\n * @example\\n *\\n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\\n * // => [1.2]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\\n * // => [{ 'x': 2 }]\\n */\\n var differenceBy = baseRest(function(array, values) {\\n var iteratee = last(values);\\n if (isArrayLikeObject(iteratee)) {\\n iteratee = undefined;\\n }\\n return isArrayLikeObject(array)\\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\\n : [];\\n });\\n\\n /**\\n * This method is like `_.difference` except that it accepts `comparator`\\n * which is invoked to compare elements of `array` to `values`. The order and\\n * references of result values are determined by the first array. The comparator\\n * is invoked with two arguments: (arrVal, othVal).\\n *\\n * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {...Array} [values] The values to exclude.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of filtered values.\\n * @example\\n *\\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\\n *\\n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\\n * // => [{ 'x': 2, 'y': 1 }]\\n */\\n var differenceWith = baseRest(function(array, values) {\\n var comparator = last(values);\\n if (isArrayLikeObject(comparator)) {\\n comparator = undefined;\\n }\\n return isArrayLikeObject(array)\\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\\n : [];\\n });\\n\\n /**\\n * Creates a slice of `array` with `n` elements dropped from the beginning.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.5.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {number} [n=1] The number of elements to drop.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.drop([1, 2, 3]);\\n * // => [2, 3]\\n *\\n * _.drop([1, 2, 3], 2);\\n * // => [3]\\n *\\n * _.drop([1, 2, 3], 5);\\n * // => []\\n *\\n * _.drop([1, 2, 3], 0);\\n * // => [1, 2, 3]\\n */\\n function drop(array, n, guard) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n n = (guard || n === undefined) ? 1 : toInteger(n);\\n return baseSlice(array, n < 0 ? 0 : n, length);\\n }\\n\\n /**\\n * Creates a slice of `array` with `n` elements dropped from the end.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {number} [n=1] The number of elements to drop.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.dropRight([1, 2, 3]);\\n * // => [1, 2]\\n *\\n * _.dropRight([1, 2, 3], 2);\\n * // => [1]\\n *\\n * _.dropRight([1, 2, 3], 5);\\n * // => []\\n *\\n * _.dropRight([1, 2, 3], 0);\\n * // => [1, 2, 3]\\n */\\n function dropRight(array, n, guard) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n n = (guard || n === undefined) ? 1 : toInteger(n);\\n n = length - n;\\n return baseSlice(array, 0, n < 0 ? 0 : n);\\n }\\n\\n /**\\n * Creates a slice of `array` excluding elements dropped from the end.\\n * Elements are dropped until `predicate` returns falsey. The predicate is\\n * invoked with three arguments: (value, index, array).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': true },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': false }\\n * ];\\n *\\n * _.dropRightWhile(users, function(o) { return !o.active; });\\n * // => objects for ['barney']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\\n * // => objects for ['barney', 'fred']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.dropRightWhile(users, ['active', false]);\\n * // => objects for ['barney']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.dropRightWhile(users, 'active');\\n * // => objects for ['barney', 'fred', 'pebbles']\\n */\\n function dropRightWhile(array, predicate) {\\n return (array && array.length)\\n ? baseWhile(array, getIteratee(predicate, 3), true, true)\\n : [];\\n }\\n\\n /**\\n * Creates a slice of `array` excluding elements dropped from the beginning.\\n * Elements are dropped until `predicate` returns falsey. The predicate is\\n * invoked with three arguments: (value, index, array).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': false },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': true }\\n * ];\\n *\\n * _.dropWhile(users, function(o) { return !o.active; });\\n * // => objects for ['pebbles']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.dropWhile(users, { 'user': 'barney', 'active': false });\\n * // => objects for ['fred', 'pebbles']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.dropWhile(users, ['active', false]);\\n * // => objects for ['pebbles']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.dropWhile(users, 'active');\\n * // => objects for ['barney', 'fred', 'pebbles']\\n */\\n function dropWhile(array, predicate) {\\n return (array && array.length)\\n ? baseWhile(array, getIteratee(predicate, 3), true)\\n : [];\\n }\\n\\n /**\\n * Fills elements of `array` with `value` from `start` up to, but not\\n * including, `end`.\\n *\\n * **Note:** This method mutates `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.2.0\\n * @category Array\\n * @param {Array} array The array to fill.\\n * @param {*} value The value to fill `array` with.\\n * @param {number} [start=0] The start position.\\n * @param {number} [end=array.length] The end position.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = [1, 2, 3];\\n *\\n * _.fill(array, 'a');\\n * console.log(array);\\n * // => ['a', 'a', 'a']\\n *\\n * _.fill(Array(3), 2);\\n * // => [2, 2, 2]\\n *\\n * _.fill([4, 6, 8, 10], '*', 1, 3);\\n * // => [4, '*', '*', 10]\\n */\\n function fill(array, value, start, end) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\\n start = 0;\\n end = length;\\n }\\n return baseFill(array, value, start, end);\\n }\\n\\n /**\\n * This method is like `_.find` except that it returns the index of the first\\n * element `predicate` returns truthy for instead of the element itself.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param {number} [fromIndex=0] The index to search from.\\n * @returns {number} Returns the index of the found element, else `-1`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': false },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': true }\\n * ];\\n *\\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\\n * // => 0\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.findIndex(users, { 'user': 'fred', 'active': false });\\n * // => 1\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.findIndex(users, ['active', false]);\\n * // => 0\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.findIndex(users, 'active');\\n * // => 2\\n */\\n function findIndex(array, predicate, fromIndex) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return -1;\\n }\\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\\n if (index < 0) {\\n index = nativeMax(length + index, 0);\\n }\\n return baseFindIndex(array, getIteratee(predicate, 3), index);\\n }\\n\\n /**\\n * This method is like `_.findIndex` except that it iterates over elements\\n * of `collection` from right to left.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param {number} [fromIndex=array.length-1] The index to search from.\\n * @returns {number} Returns the index of the found element, else `-1`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': true },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': false }\\n * ];\\n *\\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\\n * // => 2\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\\n * // => 0\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.findLastIndex(users, ['active', false]);\\n * // => 2\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.findLastIndex(users, 'active');\\n * // => 0\\n */\\n function findLastIndex(array, predicate, fromIndex) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return -1;\\n }\\n var index = length - 1;\\n if (fromIndex !== undefined) {\\n index = toInteger(fromIndex);\\n index = fromIndex < 0\\n ? nativeMax(length + index, 0)\\n : nativeMin(index, length - 1);\\n }\\n return baseFindIndex(array, getIteratee(predicate, 3), index, true);\\n }\\n\\n /**\\n * Flattens `array` a single level deep.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to flatten.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * _.flatten([1, [2, [3, [4]], 5]]);\\n * // => [1, 2, [3, [4]], 5]\\n */\\n function flatten(array) {\\n var length = array == null ? 0 : array.length;\\n return length ? baseFlatten(array, 1) : [];\\n }\\n\\n /**\\n * Recursively flattens `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to flatten.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\\n * // => [1, 2, 3, 4, 5]\\n */\\n function flattenDeep(array) {\\n var length = array == null ? 0 : array.length;\\n return length ? baseFlatten(array, INFINITY) : [];\\n }\\n\\n /**\\n * Recursively flatten `array` up to `depth` times.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.4.0\\n * @category Array\\n * @param {Array} array The array to flatten.\\n * @param {number} [depth=1] The maximum recursion depth.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * var array = [1, [2, [3, [4]], 5]];\\n *\\n * _.flattenDepth(array, 1);\\n * // => [1, 2, [3, [4]], 5]\\n *\\n * _.flattenDepth(array, 2);\\n * // => [1, 2, 3, [4], 5]\\n */\\n function flattenDepth(array, depth) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n depth = depth === undefined ? 1 : toInteger(depth);\\n return baseFlatten(array, depth);\\n }\\n\\n /**\\n * The inverse of `_.toPairs`; this method returns an object composed\\n * from key-value `pairs`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} pairs The key-value pairs.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * _.fromPairs([['a', 1], ['b', 2]]);\\n * // => { 'a': 1, 'b': 2 }\\n */\\n function fromPairs(pairs) {\\n var index = -1,\\n length = pairs == null ? 0 : pairs.length,\\n result = {};\\n\\n while (++index < length) {\\n var pair = pairs[index];\\n result[pair[0]] = pair[1];\\n }\\n return result;\\n }\\n\\n /**\\n * Gets the first element of `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @alias first\\n * @category Array\\n * @param {Array} array The array to query.\\n * @returns {*} Returns the first element of `array`.\\n * @example\\n *\\n * _.head([1, 2, 3]);\\n * // => 1\\n *\\n * _.head([]);\\n * // => undefined\\n */\\n function head(array) {\\n return (array && array.length) ? array[0] : undefined;\\n }\\n\\n /**\\n * Gets the index at which the first occurrence of `value` is found in `array`\\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons. If `fromIndex` is negative, it's used as the\\n * offset from the end of `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} [fromIndex=0] The index to search from.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n * @example\\n *\\n * _.indexOf([1, 2, 1, 2], 2);\\n * // => 1\\n *\\n * // Search from the `fromIndex`.\\n * _.indexOf([1, 2, 1, 2], 2, 2);\\n * // => 3\\n */\\n function indexOf(array, value, fromIndex) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return -1;\\n }\\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\\n if (index < 0) {\\n index = nativeMax(length + index, 0);\\n }\\n return baseIndexOf(array, value, index);\\n }\\n\\n /**\\n * Gets all but the last element of `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.initial([1, 2, 3]);\\n * // => [1, 2]\\n */\\n function initial(array) {\\n var length = array == null ? 0 : array.length;\\n return length ? baseSlice(array, 0, -1) : [];\\n }\\n\\n /**\\n * Creates an array of unique values that are included in all given arrays\\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons. The order and references of result values are\\n * determined by the first array.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @returns {Array} Returns the new array of intersecting values.\\n * @example\\n *\\n * _.intersection([2, 1], [2, 3]);\\n * // => [2]\\n */\\n var intersection = baseRest(function(arrays) {\\n var mapped = arrayMap(arrays, castArrayLikeObject);\\n return (mapped.length && mapped[0] === arrays[0])\\n ? baseIntersection(mapped)\\n : [];\\n });\\n\\n /**\\n * This method is like `_.intersection` except that it accepts `iteratee`\\n * which is invoked for each element of each `arrays` to generate the criterion\\n * by which they're compared. The order and references of result values are\\n * determined by the first array. The iteratee is invoked with one argument:\\n * (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns the new array of intersecting values.\\n * @example\\n *\\n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\\n * // => [2.1]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\\n * // => [{ 'x': 1 }]\\n */\\n var intersectionBy = baseRest(function(arrays) {\\n var iteratee = last(arrays),\\n mapped = arrayMap(arrays, castArrayLikeObject);\\n\\n if (iteratee === last(mapped)) {\\n iteratee = undefined;\\n } else {\\n mapped.pop();\\n }\\n return (mapped.length && mapped[0] === arrays[0])\\n ? baseIntersection(mapped, getIteratee(iteratee, 2))\\n : [];\\n });\\n\\n /**\\n * This method is like `_.intersection` except that it accepts `comparator`\\n * which is invoked to compare elements of `arrays`. The order and references\\n * of result values are determined by the first array. The comparator is\\n * invoked with two arguments: (arrVal, othVal).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of intersecting values.\\n * @example\\n *\\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\\n *\\n * _.intersectionWith(objects, others, _.isEqual);\\n * // => [{ 'x': 1, 'y': 2 }]\\n */\\n var intersectionWith = baseRest(function(arrays) {\\n var comparator = last(arrays),\\n mapped = arrayMap(arrays, castArrayLikeObject);\\n\\n comparator = typeof comparator == 'function' ? comparator : undefined;\\n if (comparator) {\\n mapped.pop();\\n }\\n return (mapped.length && mapped[0] === arrays[0])\\n ? baseIntersection(mapped, undefined, comparator)\\n : [];\\n });\\n\\n /**\\n * Converts all elements in `array` into a string separated by `separator`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to convert.\\n * @param {string} [separator=','] The element separator.\\n * @returns {string} Returns the joined string.\\n * @example\\n *\\n * _.join(['a', 'b', 'c'], '~');\\n * // => 'a~b~c'\\n */\\n function join(array, separator) {\\n return array == null ? '' : nativeJoin.call(array, separator);\\n }\\n\\n /**\\n * Gets the last element of `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @returns {*} Returns the last element of `array`.\\n * @example\\n *\\n * _.last([1, 2, 3]);\\n * // => 3\\n */\\n function last(array) {\\n var length = array == null ? 0 : array.length;\\n return length ? array[length - 1] : undefined;\\n }\\n\\n /**\\n * This method is like `_.indexOf` except that it iterates over elements of\\n * `array` from right to left.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} [fromIndex=array.length-1] The index to search from.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n * @example\\n *\\n * _.lastIndexOf([1, 2, 1, 2], 2);\\n * // => 3\\n *\\n * // Search from the `fromIndex`.\\n * _.lastIndexOf([1, 2, 1, 2], 2, 2);\\n * // => 1\\n */\\n function lastIndexOf(array, value, fromIndex) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return -1;\\n }\\n var index = length;\\n if (fromIndex !== undefined) {\\n index = toInteger(fromIndex);\\n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\\n }\\n return value === value\\n ? strictLastIndexOf(array, value, index)\\n : baseFindIndex(array, baseIsNaN, index, true);\\n }\\n\\n /**\\n * Gets the element at index `n` of `array`. If `n` is negative, the nth\\n * element from the end is returned.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.11.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {number} [n=0] The index of the element to return.\\n * @returns {*} Returns the nth element of `array`.\\n * @example\\n *\\n * var array = ['a', 'b', 'c', 'd'];\\n *\\n * _.nth(array, 1);\\n * // => 'b'\\n *\\n * _.nth(array, -2);\\n * // => 'c';\\n */\\n function nth(array, n) {\\n return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\\n }\\n\\n /**\\n * Removes all given values from `array` using\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons.\\n *\\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\\n * to remove elements from an array by predicate.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {...*} [values] The values to remove.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\\n *\\n * _.pull(array, 'a', 'c');\\n * console.log(array);\\n * // => ['b', 'b']\\n */\\n var pull = baseRest(pullAll);\\n\\n /**\\n * This method is like `_.pull` except that it accepts an array of values to remove.\\n *\\n * **Note:** Unlike `_.difference`, this method mutates `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {Array} values The values to remove.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\\n *\\n * _.pullAll(array, ['a', 'c']);\\n * console.log(array);\\n * // => ['b', 'b']\\n */\\n function pullAll(array, values) {\\n return (array && array.length && values && values.length)\\n ? basePullAll(array, values)\\n : array;\\n }\\n\\n /**\\n * This method is like `_.pullAll` except that it accepts `iteratee` which is\\n * invoked for each element of `array` and `values` to generate the criterion\\n * by which they're compared. The iteratee is invoked with one argument: (value).\\n *\\n * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {Array} values The values to remove.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\\n *\\n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\\n * console.log(array);\\n * // => [{ 'x': 2 }]\\n */\\n function pullAllBy(array, values, iteratee) {\\n return (array && array.length && values && values.length)\\n ? basePullAll(array, values, getIteratee(iteratee, 2))\\n : array;\\n }\\n\\n /**\\n * This method is like `_.pullAll` except that it accepts `comparator` which\\n * is invoked to compare elements of `array` to `values`. The comparator is\\n * invoked with two arguments: (arrVal, othVal).\\n *\\n * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.6.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {Array} values The values to remove.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\\n *\\n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\\n * console.log(array);\\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\\n */\\n function pullAllWith(array, values, comparator) {\\n return (array && array.length && values && values.length)\\n ? basePullAll(array, values, undefined, comparator)\\n : array;\\n }\\n\\n /**\\n * Removes elements from `array` corresponding to `indexes` and returns an\\n * array of removed elements.\\n *\\n * **Note:** Unlike `_.at`, this method mutates `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {...(number|number[])} [indexes] The indexes of elements to remove.\\n * @returns {Array} Returns the new array of removed elements.\\n * @example\\n *\\n * var array = ['a', 'b', 'c', 'd'];\\n * var pulled = _.pullAt(array, [1, 3]);\\n *\\n * console.log(array);\\n * // => ['a', 'c']\\n *\\n * console.log(pulled);\\n * // => ['b', 'd']\\n */\\n var pullAt = flatRest(function(array, indexes) {\\n var length = array == null ? 0 : array.length,\\n result = baseAt(array, indexes);\\n\\n basePullAt(array, arrayMap(indexes, function(index) {\\n return isIndex(index, length) ? +index : index;\\n }).sort(compareAscending));\\n\\n return result;\\n });\\n\\n /**\\n * Removes all elements from `array` that `predicate` returns truthy for\\n * and returns an array of the removed elements. The predicate is invoked\\n * with three arguments: (value, index, array).\\n *\\n * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\\n * to pull elements from an array by value.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new array of removed elements.\\n * @example\\n *\\n * var array = [1, 2, 3, 4];\\n * var evens = _.remove(array, function(n) {\\n * return n % 2 == 0;\\n * });\\n *\\n * console.log(array);\\n * // => [1, 3]\\n *\\n * console.log(evens);\\n * // => [2, 4]\\n */\\n function remove(array, predicate) {\\n var result = [];\\n if (!(array && array.length)) {\\n return result;\\n }\\n var index = -1,\\n indexes = [],\\n length = array.length;\\n\\n predicate = getIteratee(predicate, 3);\\n while (++index < length) {\\n var value = array[index];\\n if (predicate(value, index, array)) {\\n result.push(value);\\n indexes.push(index);\\n }\\n }\\n basePullAt(array, indexes);\\n return result;\\n }\\n\\n /**\\n * Reverses `array` so that the first element becomes the last, the second\\n * element becomes the second to last, and so on.\\n *\\n * **Note:** This method mutates `array` and is based on\\n * [`Array#reverse`](https://mdn.io/Array/reverse).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to modify.\\n * @returns {Array} Returns `array`.\\n * @example\\n *\\n * var array = [1, 2, 3];\\n *\\n * _.reverse(array);\\n * // => [3, 2, 1]\\n *\\n * console.log(array);\\n * // => [3, 2, 1]\\n */\\n function reverse(array) {\\n return array == null ? array : nativeReverse.call(array);\\n }\\n\\n /**\\n * Creates a slice of `array` from `start` up to, but not including, `end`.\\n *\\n * **Note:** This method is used instead of\\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\\n * returned.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to slice.\\n * @param {number} [start=0] The start position.\\n * @param {number} [end=array.length] The end position.\\n * @returns {Array} Returns the slice of `array`.\\n */\\n function slice(array, start, end) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\\n start = 0;\\n end = length;\\n }\\n else {\\n start = start == null ? 0 : toInteger(start);\\n end = end === undefined ? length : toInteger(end);\\n }\\n return baseSlice(array, start, end);\\n }\\n\\n /**\\n * Uses a binary search to determine the lowest index at which `value`\\n * should be inserted into `array` in order to maintain its sort order.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n * @example\\n *\\n * _.sortedIndex([30, 50], 40);\\n * // => 1\\n */\\n function sortedIndex(array, value) {\\n return baseSortedIndex(array, value);\\n }\\n\\n /**\\n * This method is like `_.sortedIndex` except that it accepts `iteratee`\\n * which is invoked for `value` and each element of `array` to compute their\\n * sort ranking. The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n * @example\\n *\\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\\n *\\n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\\n * // => 0\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\\n * // => 0\\n */\\n function sortedIndexBy(array, value, iteratee) {\\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\\n }\\n\\n /**\\n * This method is like `_.indexOf` except that it performs a binary\\n * search on a sorted `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n * @example\\n *\\n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\\n * // => 1\\n */\\n function sortedIndexOf(array, value) {\\n var length = array == null ? 0 : array.length;\\n if (length) {\\n var index = baseSortedIndex(array, value);\\n if (index < length && eq(array[index], value)) {\\n return index;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * This method is like `_.sortedIndex` except that it returns the highest\\n * index at which `value` should be inserted into `array` in order to\\n * maintain its sort order.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n * @example\\n *\\n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\\n * // => 4\\n */\\n function sortedLastIndex(array, value) {\\n return baseSortedIndex(array, value, true);\\n }\\n\\n /**\\n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\\n * which is invoked for `value` and each element of `array` to compute their\\n * sort ranking. The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The sorted array to inspect.\\n * @param {*} value The value to evaluate.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {number} Returns the index at which `value` should be inserted\\n * into `array`.\\n * @example\\n *\\n * var objects = [{ 'x': 4 }, { 'x': 5 }];\\n *\\n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\\n * // => 1\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\\n * // => 1\\n */\\n function sortedLastIndexBy(array, value, iteratee) {\\n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\\n }\\n\\n /**\\n * This method is like `_.lastIndexOf` except that it performs a binary\\n * search on a sorted `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {*} value The value to search for.\\n * @returns {number} Returns the index of the matched value, else `-1`.\\n * @example\\n *\\n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\\n * // => 3\\n */\\n function sortedLastIndexOf(array, value) {\\n var length = array == null ? 0 : array.length;\\n if (length) {\\n var index = baseSortedIndex(array, value, true) - 1;\\n if (eq(array[index], value)) {\\n return index;\\n }\\n }\\n return -1;\\n }\\n\\n /**\\n * This method is like `_.uniq` except that it's designed and optimized\\n * for sorted arrays.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @returns {Array} Returns the new duplicate free array.\\n * @example\\n *\\n * _.sortedUniq([1, 1, 2]);\\n * // => [1, 2]\\n */\\n function sortedUniq(array) {\\n return (array && array.length)\\n ? baseSortedUniq(array)\\n : [];\\n }\\n\\n /**\\n * This method is like `_.uniqBy` except that it's designed and optimized\\n * for sorted arrays.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {Function} [iteratee] The iteratee invoked per element.\\n * @returns {Array} Returns the new duplicate free array.\\n * @example\\n *\\n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\\n * // => [1.1, 2.3]\\n */\\n function sortedUniqBy(array, iteratee) {\\n return (array && array.length)\\n ? baseSortedUniq(array, getIteratee(iteratee, 2))\\n : [];\\n }\\n\\n /**\\n * Gets all but the first element of `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.tail([1, 2, 3]);\\n * // => [2, 3]\\n */\\n function tail(array) {\\n var length = array == null ? 0 : array.length;\\n return length ? baseSlice(array, 1, length) : [];\\n }\\n\\n /**\\n * Creates a slice of `array` with `n` elements taken from the beginning.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {number} [n=1] The number of elements to take.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.take([1, 2, 3]);\\n * // => [1]\\n *\\n * _.take([1, 2, 3], 2);\\n * // => [1, 2]\\n *\\n * _.take([1, 2, 3], 5);\\n * // => [1, 2, 3]\\n *\\n * _.take([1, 2, 3], 0);\\n * // => []\\n */\\n function take(array, n, guard) {\\n if (!(array && array.length)) {\\n return [];\\n }\\n n = (guard || n === undefined) ? 1 : toInteger(n);\\n return baseSlice(array, 0, n < 0 ? 0 : n);\\n }\\n\\n /**\\n * Creates a slice of `array` with `n` elements taken from the end.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {number} [n=1] The number of elements to take.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * _.takeRight([1, 2, 3]);\\n * // => [3]\\n *\\n * _.takeRight([1, 2, 3], 2);\\n * // => [2, 3]\\n *\\n * _.takeRight([1, 2, 3], 5);\\n * // => [1, 2, 3]\\n *\\n * _.takeRight([1, 2, 3], 0);\\n * // => []\\n */\\n function takeRight(array, n, guard) {\\n var length = array == null ? 0 : array.length;\\n if (!length) {\\n return [];\\n }\\n n = (guard || n === undefined) ? 1 : toInteger(n);\\n n = length - n;\\n return baseSlice(array, n < 0 ? 0 : n, length);\\n }\\n\\n /**\\n * Creates a slice of `array` with elements taken from the end. Elements are\\n * taken until `predicate` returns falsey. The predicate is invoked with\\n * three arguments: (value, index, array).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': true },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': false }\\n * ];\\n *\\n * _.takeRightWhile(users, function(o) { return !o.active; });\\n * // => objects for ['fred', 'pebbles']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\\n * // => objects for ['pebbles']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.takeRightWhile(users, ['active', false]);\\n * // => objects for ['fred', 'pebbles']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.takeRightWhile(users, 'active');\\n * // => []\\n */\\n function takeRightWhile(array, predicate) {\\n return (array && array.length)\\n ? baseWhile(array, getIteratee(predicate, 3), false, true)\\n : [];\\n }\\n\\n /**\\n * Creates a slice of `array` with elements taken from the beginning. Elements\\n * are taken until `predicate` returns falsey. The predicate is invoked with\\n * three arguments: (value, index, array).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Array\\n * @param {Array} array The array to query.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the slice of `array`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': false },\\n * { 'user': 'fred', 'active': false },\\n * { 'user': 'pebbles', 'active': true }\\n * ];\\n *\\n * _.takeWhile(users, function(o) { return !o.active; });\\n * // => objects for ['barney', 'fred']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.takeWhile(users, { 'user': 'barney', 'active': false });\\n * // => objects for ['barney']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.takeWhile(users, ['active', false]);\\n * // => objects for ['barney', 'fred']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.takeWhile(users, 'active');\\n * // => []\\n */\\n function takeWhile(array, predicate) {\\n return (array && array.length)\\n ? baseWhile(array, getIteratee(predicate, 3))\\n : [];\\n }\\n\\n /**\\n * Creates an array of unique values, in order, from all given arrays using\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @returns {Array} Returns the new array of combined values.\\n * @example\\n *\\n * _.union([2], [1, 2]);\\n * // => [2, 1]\\n */\\n var union = baseRest(function(arrays) {\\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\\n });\\n\\n /**\\n * This method is like `_.union` except that it accepts `iteratee` which is\\n * invoked for each element of each `arrays` to generate the criterion by\\n * which uniqueness is computed. Result values are chosen from the first\\n * array in which the value occurs. The iteratee is invoked with one argument:\\n * (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns the new array of combined values.\\n * @example\\n *\\n * _.unionBy([2.1], [1.2, 2.3], Math.floor);\\n * // => [2.1, 1.2]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\\n * // => [{ 'x': 1 }, { 'x': 2 }]\\n */\\n var unionBy = baseRest(function(arrays) {\\n var iteratee = last(arrays);\\n if (isArrayLikeObject(iteratee)) {\\n iteratee = undefined;\\n }\\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\\n });\\n\\n /**\\n * This method is like `_.union` except that it accepts `comparator` which\\n * is invoked to compare elements of `arrays`. Result values are chosen from\\n * the first array in which the value occurs. The comparator is invoked\\n * with two arguments: (arrVal, othVal).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of combined values.\\n * @example\\n *\\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\\n *\\n * _.unionWith(objects, others, _.isEqual);\\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\\n */\\n var unionWith = baseRest(function(arrays) {\\n var comparator = last(arrays);\\n comparator = typeof comparator == 'function' ? comparator : undefined;\\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\\n });\\n\\n /**\\n * Creates a duplicate-free version of an array, using\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons, in which only the first occurrence of each element\\n * is kept. The order of result values is determined by the order they occur\\n * in the array.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @returns {Array} Returns the new duplicate free array.\\n * @example\\n *\\n * _.uniq([2, 1, 2]);\\n * // => [2, 1]\\n */\\n function uniq(array) {\\n return (array && array.length) ? baseUniq(array) : [];\\n }\\n\\n /**\\n * This method is like `_.uniq` except that it accepts `iteratee` which is\\n * invoked for each element in `array` to generate the criterion by which\\n * uniqueness is computed. The order of result values is determined by the\\n * order they occur in the array. The iteratee is invoked with one argument:\\n * (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns the new duplicate free array.\\n * @example\\n *\\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\\n * // => [2.1, 1.2]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\\n * // => [{ 'x': 1 }, { 'x': 2 }]\\n */\\n function uniqBy(array, iteratee) {\\n return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\\n }\\n\\n /**\\n * This method is like `_.uniq` except that it accepts `comparator` which\\n * is invoked to compare elements of `array`. The order of result values is\\n * determined by the order they occur in the array.The comparator is invoked\\n * with two arguments: (arrVal, othVal).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new duplicate free array.\\n * @example\\n *\\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\\n *\\n * _.uniqWith(objects, _.isEqual);\\n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\\n */\\n function uniqWith(array, comparator) {\\n comparator = typeof comparator == 'function' ? comparator : undefined;\\n return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\\n }\\n\\n /**\\n * This method is like `_.zip` except that it accepts an array of grouped\\n * elements and creates an array regrouping the elements to their pre-zip\\n * configuration.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.2.0\\n * @category Array\\n * @param {Array} array The array of grouped elements to process.\\n * @returns {Array} Returns the new array of regrouped elements.\\n * @example\\n *\\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\\n * // => [['a', 1, true], ['b', 2, false]]\\n *\\n * _.unzip(zipped);\\n * // => [['a', 'b'], [1, 2], [true, false]]\\n */\\n function unzip(array) {\\n if (!(array && array.length)) {\\n return [];\\n }\\n var length = 0;\\n array = arrayFilter(array, function(group) {\\n if (isArrayLikeObject(group)) {\\n length = nativeMax(group.length, length);\\n return true;\\n }\\n });\\n return baseTimes(length, function(index) {\\n return arrayMap(array, baseProperty(index));\\n });\\n }\\n\\n /**\\n * This method is like `_.unzip` except that it accepts `iteratee` to specify\\n * how regrouped values should be combined. The iteratee is invoked with the\\n * elements of each group: (...group).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.8.0\\n * @category Array\\n * @param {Array} array The array of grouped elements to process.\\n * @param {Function} [iteratee=_.identity] The function to combine\\n * regrouped values.\\n * @returns {Array} Returns the new array of regrouped elements.\\n * @example\\n *\\n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\\n * // => [[1, 10, 100], [2, 20, 200]]\\n *\\n * _.unzipWith(zipped, _.add);\\n * // => [3, 30, 300]\\n */\\n function unzipWith(array, iteratee) {\\n if (!(array && array.length)) {\\n return [];\\n }\\n var result = unzip(array);\\n if (iteratee == null) {\\n return result;\\n }\\n return arrayMap(result, function(group) {\\n return apply(iteratee, undefined, group);\\n });\\n }\\n\\n /**\\n * Creates an array excluding all given values using\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * for equality comparisons.\\n *\\n * **Note:** Unlike `_.pull`, this method returns a new array.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {Array} array The array to inspect.\\n * @param {...*} [values] The values to exclude.\\n * @returns {Array} Returns the new array of filtered values.\\n * @see _.difference, _.xor\\n * @example\\n *\\n * _.without([2, 1, 2, 3], 1, 2);\\n * // => [3]\\n */\\n var without = baseRest(function(array, values) {\\n return isArrayLikeObject(array)\\n ? baseDifference(array, values)\\n : [];\\n });\\n\\n /**\\n * Creates an array of unique values that is the\\n * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\\n * of the given arrays. The order of result values is determined by the order\\n * they occur in the arrays.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.4.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @returns {Array} Returns the new array of filtered values.\\n * @see _.difference, _.without\\n * @example\\n *\\n * _.xor([2, 1], [2, 3]);\\n * // => [1, 3]\\n */\\n var xor = baseRest(function(arrays) {\\n return baseXor(arrayFilter(arrays, isArrayLikeObject));\\n });\\n\\n /**\\n * This method is like `_.xor` except that it accepts `iteratee` which is\\n * invoked for each element of each `arrays` to generate the criterion by\\n * which by which they're compared. The order of result values is determined\\n * by the order they occur in the arrays. The iteratee is invoked with one\\n * argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Array} Returns the new array of filtered values.\\n * @example\\n *\\n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\\n * // => [1.2, 3.4]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\\n * // => [{ 'x': 2 }]\\n */\\n var xorBy = baseRest(function(arrays) {\\n var iteratee = last(arrays);\\n if (isArrayLikeObject(iteratee)) {\\n iteratee = undefined;\\n }\\n return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\\n });\\n\\n /**\\n * This method is like `_.xor` except that it accepts `comparator` which is\\n * invoked to compare elements of `arrays`. The order of result values is\\n * determined by the order they occur in the arrays. The comparator is invoked\\n * with two arguments: (arrVal, othVal).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to inspect.\\n * @param {Function} [comparator] The comparator invoked per element.\\n * @returns {Array} Returns the new array of filtered values.\\n * @example\\n *\\n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\\n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\\n *\\n * _.xorWith(objects, others, _.isEqual);\\n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\\n */\\n var xorWith = baseRest(function(arrays) {\\n var comparator = last(arrays);\\n comparator = typeof comparator == 'function' ? comparator : undefined;\\n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\\n });\\n\\n /**\\n * Creates an array of grouped elements, the first of which contains the\\n * first elements of the given arrays, the second of which contains the\\n * second elements of the given arrays, and so on.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to process.\\n * @returns {Array} Returns the new array of grouped elements.\\n * @example\\n *\\n * _.zip(['a', 'b'], [1, 2], [true, false]);\\n * // => [['a', 1, true], ['b', 2, false]]\\n */\\n var zip = baseRest(unzip);\\n\\n /**\\n * This method is like `_.fromPairs` except that it accepts two arrays,\\n * one of property identifiers and one of corresponding values.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.4.0\\n * @category Array\\n * @param {Array} [props=[]] The property identifiers.\\n * @param {Array} [values=[]] The property values.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * _.zipObject(['a', 'b'], [1, 2]);\\n * // => { 'a': 1, 'b': 2 }\\n */\\n function zipObject(props, values) {\\n return baseZipObject(props || [], values || [], assignValue);\\n }\\n\\n /**\\n * This method is like `_.zipObject` except that it supports property paths.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.1.0\\n * @category Array\\n * @param {Array} [props=[]] The property identifiers.\\n * @param {Array} [values=[]] The property values.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\\n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\\n */\\n function zipObjectDeep(props, values) {\\n return baseZipObject(props || [], values || [], baseSet);\\n }\\n\\n /**\\n * This method is like `_.zip` except that it accepts `iteratee` to specify\\n * how grouped values should be combined. The iteratee is invoked with the\\n * elements of each group: (...group).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.8.0\\n * @category Array\\n * @param {...Array} [arrays] The arrays to process.\\n * @param {Function} [iteratee=_.identity] The function to combine\\n * grouped values.\\n * @returns {Array} Returns the new array of grouped elements.\\n * @example\\n *\\n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\\n * return a + b + c;\\n * });\\n * // => [111, 222]\\n */\\n var zipWith = baseRest(function(arrays) {\\n var length = arrays.length,\\n iteratee = length > 1 ? arrays[length - 1] : undefined;\\n\\n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\\n return unzipWith(arrays, iteratee);\\n });\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\\n * chain sequences enabled. The result of such sequences must be unwrapped\\n * with `_#value`.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.3.0\\n * @category Seq\\n * @param {*} value The value to wrap.\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36 },\\n * { 'user': 'fred', 'age': 40 },\\n * { 'user': 'pebbles', 'age': 1 }\\n * ];\\n *\\n * var youngest = _\\n * .chain(users)\\n * .sortBy('age')\\n * .map(function(o) {\\n * return o.user + ' is ' + o.age;\\n * })\\n * .head()\\n * .value();\\n * // => 'pebbles is 1'\\n */\\n function chain(value) {\\n var result = lodash(value);\\n result.__chain__ = true;\\n return result;\\n }\\n\\n /**\\n * This method invokes `interceptor` and returns `value`. The interceptor\\n * is invoked with one argument; (value). The purpose of this method is to\\n * \\\"tap into\\\" a method chain sequence in order to modify intermediate results.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Seq\\n * @param {*} value The value to provide to `interceptor`.\\n * @param {Function} interceptor The function to invoke.\\n * @returns {*} Returns `value`.\\n * @example\\n *\\n * _([1, 2, 3])\\n * .tap(function(array) {\\n * // Mutate input array.\\n * array.pop();\\n * })\\n * .reverse()\\n * .value();\\n * // => [2, 1]\\n */\\n function tap(value, interceptor) {\\n interceptor(value);\\n return value;\\n }\\n\\n /**\\n * This method is like `_.tap` except that it returns the result of `interceptor`.\\n * The purpose of this method is to \\\"pass thru\\\" values replacing intermediate\\n * results in a method chain sequence.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Seq\\n * @param {*} value The value to provide to `interceptor`.\\n * @param {Function} interceptor The function to invoke.\\n * @returns {*} Returns the result of `interceptor`.\\n * @example\\n *\\n * _(' abc ')\\n * .chain()\\n * .trim()\\n * .thru(function(value) {\\n * return [value];\\n * })\\n * .value();\\n * // => ['abc']\\n */\\n function thru(value, interceptor) {\\n return interceptor(value);\\n }\\n\\n /**\\n * This method is the wrapper version of `_.at`.\\n *\\n * @name at\\n * @memberOf _\\n * @since 1.0.0\\n * @category Seq\\n * @param {...(string|string[])} [paths] The property paths to pick.\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\\n *\\n * _(object).at(['a[0].b.c', 'a[1]']).value();\\n * // => [3, 4]\\n */\\n var wrapperAt = flatRest(function(paths) {\\n var length = paths.length,\\n start = length ? paths[0] : 0,\\n value = this.__wrapped__,\\n interceptor = function(object) { return baseAt(object, paths); };\\n\\n if (length > 1 || this.__actions__.length ||\\n !(value instanceof LazyWrapper) || !isIndex(start)) {\\n return this.thru(interceptor);\\n }\\n value = value.slice(start, +start + (length ? 1 : 0));\\n value.__actions__.push({\\n 'func': thru,\\n 'args': [interceptor],\\n 'thisArg': undefined\\n });\\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\\n if (length && !array.length) {\\n array.push(undefined);\\n }\\n return array;\\n });\\n });\\n\\n /**\\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\\n *\\n * @name chain\\n * @memberOf _\\n * @since 0.1.0\\n * @category Seq\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36 },\\n * { 'user': 'fred', 'age': 40 }\\n * ];\\n *\\n * // A sequence without explicit chaining.\\n * _(users).head();\\n * // => { 'user': 'barney', 'age': 36 }\\n *\\n * // A sequence with explicit chaining.\\n * _(users)\\n * .chain()\\n * .head()\\n * .pick('user')\\n * .value();\\n * // => { 'user': 'barney' }\\n */\\n function wrapperChain() {\\n return chain(this);\\n }\\n\\n /**\\n * Executes the chain sequence and returns the wrapped result.\\n *\\n * @name commit\\n * @memberOf _\\n * @since 3.2.0\\n * @category Seq\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * var array = [1, 2];\\n * var wrapped = _(array).push(3);\\n *\\n * console.log(array);\\n * // => [1, 2]\\n *\\n * wrapped = wrapped.commit();\\n * console.log(array);\\n * // => [1, 2, 3]\\n *\\n * wrapped.last();\\n * // => 3\\n *\\n * console.log(array);\\n * // => [1, 2, 3]\\n */\\n function wrapperCommit() {\\n return new LodashWrapper(this.value(), this.__chain__);\\n }\\n\\n /**\\n * Gets the next value on a wrapped object following the\\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\\n *\\n * @name next\\n * @memberOf _\\n * @since 4.0.0\\n * @category Seq\\n * @returns {Object} Returns the next iterator value.\\n * @example\\n *\\n * var wrapped = _([1, 2]);\\n *\\n * wrapped.next();\\n * // => { 'done': false, 'value': 1 }\\n *\\n * wrapped.next();\\n * // => { 'done': false, 'value': 2 }\\n *\\n * wrapped.next();\\n * // => { 'done': true, 'value': undefined }\\n */\\n function wrapperNext() {\\n if (this.__values__ === undefined) {\\n this.__values__ = toArray(this.value());\\n }\\n var done = this.__index__ >= this.__values__.length,\\n value = done ? undefined : this.__values__[this.__index__++];\\n\\n return { 'done': done, 'value': value };\\n }\\n\\n /**\\n * Enables the wrapper to be iterable.\\n *\\n * @name Symbol.iterator\\n * @memberOf _\\n * @since 4.0.0\\n * @category Seq\\n * @returns {Object} Returns the wrapper object.\\n * @example\\n *\\n * var wrapped = _([1, 2]);\\n *\\n * wrapped[Symbol.iterator]() === wrapped;\\n * // => true\\n *\\n * Array.from(wrapped);\\n * // => [1, 2]\\n */\\n function wrapperToIterator() {\\n return this;\\n }\\n\\n /**\\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\\n *\\n * @name plant\\n * @memberOf _\\n * @since 3.2.0\\n * @category Seq\\n * @param {*} value The value to plant.\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * var wrapped = _([1, 2]).map(square);\\n * var other = wrapped.plant([3, 4]);\\n *\\n * other.value();\\n * // => [9, 16]\\n *\\n * wrapped.value();\\n * // => [1, 4]\\n */\\n function wrapperPlant(value) {\\n var result,\\n parent = this;\\n\\n while (parent instanceof baseLodash) {\\n var clone = wrapperClone(parent);\\n clone.__index__ = 0;\\n clone.__values__ = undefined;\\n if (result) {\\n previous.__wrapped__ = clone;\\n } else {\\n result = clone;\\n }\\n var previous = clone;\\n parent = parent.__wrapped__;\\n }\\n previous.__wrapped__ = value;\\n return result;\\n }\\n\\n /**\\n * This method is the wrapper version of `_.reverse`.\\n *\\n * **Note:** This method mutates the wrapped array.\\n *\\n * @name reverse\\n * @memberOf _\\n * @since 0.1.0\\n * @category Seq\\n * @returns {Object} Returns the new `lodash` wrapper instance.\\n * @example\\n *\\n * var array = [1, 2, 3];\\n *\\n * _(array).reverse().value()\\n * // => [3, 2, 1]\\n *\\n * console.log(array);\\n * // => [3, 2, 1]\\n */\\n function wrapperReverse() {\\n var value = this.__wrapped__;\\n if (value instanceof LazyWrapper) {\\n var wrapped = value;\\n if (this.__actions__.length) {\\n wrapped = new LazyWrapper(this);\\n }\\n wrapped = wrapped.reverse();\\n wrapped.__actions__.push({\\n 'func': thru,\\n 'args': [reverse],\\n 'thisArg': undefined\\n });\\n return new LodashWrapper(wrapped, this.__chain__);\\n }\\n return this.thru(reverse);\\n }\\n\\n /**\\n * Executes the chain sequence to resolve the unwrapped value.\\n *\\n * @name value\\n * @memberOf _\\n * @since 0.1.0\\n * @alias toJSON, valueOf\\n * @category Seq\\n * @returns {*} Returns the resolved unwrapped value.\\n * @example\\n *\\n * _([1, 2, 3]).value();\\n * // => [1, 2, 3]\\n */\\n function wrapperValue() {\\n return baseWrapperValue(this.__wrapped__, this.__actions__);\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Creates an object composed of keys generated from the results of running\\n * each element of `collection` thru `iteratee`. The corresponding value of\\n * each key is the number of times the key was returned by `iteratee`. The\\n * iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.5.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\\n * @returns {Object} Returns the composed aggregate object.\\n * @example\\n *\\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\\n * // => { '4': 1, '6': 2 }\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.countBy(['one', 'two', 'three'], 'length');\\n * // => { '3': 2, '5': 1 }\\n */\\n var countBy = createAggregator(function(result, value, key) {\\n if (hasOwnProperty.call(result, key)) {\\n ++result[key];\\n } else {\\n baseAssignValue(result, key, 1);\\n }\\n });\\n\\n /**\\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\\n * Iteration is stopped once `predicate` returns falsey. The predicate is\\n * invoked with three arguments: (value, index|key, collection).\\n *\\n * **Note:** This method returns `true` for\\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\\n * elements of empty collections.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\\n * else `false`.\\n * @example\\n *\\n * _.every([true, 1, null, 'yes'], Boolean);\\n * // => false\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': false },\\n * { 'user': 'fred', 'age': 40, 'active': false }\\n * ];\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.every(users, { 'user': 'barney', 'active': false });\\n * // => false\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.every(users, ['active', false]);\\n * // => true\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.every(users, 'active');\\n * // => false\\n */\\n function every(collection, predicate, guard) {\\n var func = isArray(collection) ? arrayEvery : baseEvery;\\n if (guard && isIterateeCall(collection, predicate, guard)) {\\n predicate = undefined;\\n }\\n return func(collection, getIteratee(predicate, 3));\\n }\\n\\n /**\\n * Iterates over elements of `collection`, returning an array of all elements\\n * `predicate` returns truthy for. The predicate is invoked with three\\n * arguments: (value, index|key, collection).\\n *\\n * **Note:** Unlike `_.remove`, this method returns a new array.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new filtered array.\\n * @see _.reject\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': true },\\n * { 'user': 'fred', 'age': 40, 'active': false }\\n * ];\\n *\\n * _.filter(users, function(o) { return !o.active; });\\n * // => objects for ['fred']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.filter(users, { 'age': 36, 'active': true });\\n * // => objects for ['barney']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.filter(users, ['active', false]);\\n * // => objects for ['fred']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.filter(users, 'active');\\n * // => objects for ['barney']\\n */\\n function filter(collection, predicate) {\\n var func = isArray(collection) ? arrayFilter : baseFilter;\\n return func(collection, getIteratee(predicate, 3));\\n }\\n\\n /**\\n * Iterates over elements of `collection`, returning the first element\\n * `predicate` returns truthy for. The predicate is invoked with three\\n * arguments: (value, index|key, collection).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param {number} [fromIndex=0] The index to search from.\\n * @returns {*} Returns the matched element, else `undefined`.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': true },\\n * { 'user': 'fred', 'age': 40, 'active': false },\\n * { 'user': 'pebbles', 'age': 1, 'active': true }\\n * ];\\n *\\n * _.find(users, function(o) { return o.age < 40; });\\n * // => object for 'barney'\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.find(users, { 'age': 1, 'active': true });\\n * // => object for 'pebbles'\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.find(users, ['active', false]);\\n * // => object for 'fred'\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.find(users, 'active');\\n * // => object for 'barney'\\n */\\n var find = createFind(findIndex);\\n\\n /**\\n * This method is like `_.find` except that it iterates over elements of\\n * `collection` from right to left.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param {number} [fromIndex=collection.length-1] The index to search from.\\n * @returns {*} Returns the matched element, else `undefined`.\\n * @example\\n *\\n * _.findLast([1, 2, 3, 4], function(n) {\\n * return n % 2 == 1;\\n * });\\n * // => 3\\n */\\n var findLast = createFind(findLastIndex);\\n\\n /**\\n * Creates a flattened array of values by running each element in `collection`\\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\\n * with three arguments: (value, index|key, collection).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * function duplicate(n) {\\n * return [n, n];\\n * }\\n *\\n * _.flatMap([1, 2], duplicate);\\n * // => [1, 1, 2, 2]\\n */\\n function flatMap(collection, iteratee) {\\n return baseFlatten(map(collection, iteratee), 1);\\n }\\n\\n /**\\n * This method is like `_.flatMap` except that it recursively flattens the\\n * mapped results.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.7.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * function duplicate(n) {\\n * return [[[n, n]]];\\n * }\\n *\\n * _.flatMapDeep([1, 2], duplicate);\\n * // => [1, 1, 2, 2]\\n */\\n function flatMapDeep(collection, iteratee) {\\n return baseFlatten(map(collection, iteratee), INFINITY);\\n }\\n\\n /**\\n * This method is like `_.flatMap` except that it recursively flattens the\\n * mapped results up to `depth` times.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.7.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @param {number} [depth=1] The maximum recursion depth.\\n * @returns {Array} Returns the new flattened array.\\n * @example\\n *\\n * function duplicate(n) {\\n * return [[[n, n]]];\\n * }\\n *\\n * _.flatMapDepth([1, 2], duplicate, 2);\\n * // => [[1, 1], [2, 2]]\\n */\\n function flatMapDepth(collection, iteratee, depth) {\\n depth = depth === undefined ? 1 : toInteger(depth);\\n return baseFlatten(map(collection, iteratee), depth);\\n }\\n\\n /**\\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\\n * The iteratee is invoked with three arguments: (value, index|key, collection).\\n * Iteratee functions may exit iteration early by explicitly returning `false`.\\n *\\n * **Note:** As with other \\\"Collections\\\" methods, objects with a \\\"length\\\"\\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\\n * or `_.forOwn` for object iteration.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @alias each\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array|Object} Returns `collection`.\\n * @see _.forEachRight\\n * @example\\n *\\n * _.forEach([1, 2], function(value) {\\n * console.log(value);\\n * });\\n * // => Logs `1` then `2`.\\n *\\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\\n * console.log(key);\\n * });\\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\\n */\\n function forEach(collection, iteratee) {\\n var func = isArray(collection) ? arrayEach : baseEach;\\n return func(collection, getIteratee(iteratee, 3));\\n }\\n\\n /**\\n * This method is like `_.forEach` except that it iterates over elements of\\n * `collection` from right to left.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @alias eachRight\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array|Object} Returns `collection`.\\n * @see _.forEach\\n * @example\\n *\\n * _.forEachRight([1, 2], function(value) {\\n * console.log(value);\\n * });\\n * // => Logs `2` then `1`.\\n */\\n function forEachRight(collection, iteratee) {\\n var func = isArray(collection) ? arrayEachRight : baseEachRight;\\n return func(collection, getIteratee(iteratee, 3));\\n }\\n\\n /**\\n * Creates an object composed of keys generated from the results of running\\n * each element of `collection` thru `iteratee`. The order of grouped values\\n * is determined by the order they occur in `collection`. The corresponding\\n * value of each key is an array of elements responsible for generating the\\n * key. The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\\n * @returns {Object} Returns the composed aggregate object.\\n * @example\\n *\\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\\n * // => { '4': [4.2], '6': [6.1, 6.3] }\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.groupBy(['one', 'two', 'three'], 'length');\\n * // => { '3': ['one', 'two'], '5': ['three'] }\\n */\\n var groupBy = createAggregator(function(result, value, key) {\\n if (hasOwnProperty.call(result, key)) {\\n result[key].push(value);\\n } else {\\n baseAssignValue(result, key, [value]);\\n }\\n });\\n\\n /**\\n * Checks if `value` is in `collection`. If `collection` is a string, it's\\n * checked for a substring of `value`, otherwise\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\\n * the offset from the end of `collection`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object|string} collection The collection to inspect.\\n * @param {*} value The value to search for.\\n * @param {number} [fromIndex=0] The index to search from.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\\n * @example\\n *\\n * _.includes([1, 2, 3], 1);\\n * // => true\\n *\\n * _.includes([1, 2, 3], 1, 2);\\n * // => false\\n *\\n * _.includes({ 'a': 1, 'b': 2 }, 1);\\n * // => true\\n *\\n * _.includes('abcd', 'bc');\\n * // => true\\n */\\n function includes(collection, value, fromIndex, guard) {\\n collection = isArrayLike(collection) ? collection : values(collection);\\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\\n\\n var length = collection.length;\\n if (fromIndex < 0) {\\n fromIndex = nativeMax(length + fromIndex, 0);\\n }\\n return isString(collection)\\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\\n }\\n\\n /**\\n * Invokes the method at `path` of each element in `collection`, returning\\n * an array of the results of each invoked method. Any additional arguments\\n * are provided to each invoked method. If `path` is a function, it's invoked\\n * for, and `this` bound to, each element in `collection`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Array|Function|string} path The path of the method to invoke or\\n * the function invoked per iteration.\\n * @param {...*} [args] The arguments to invoke each method with.\\n * @returns {Array} Returns the array of results.\\n * @example\\n *\\n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\\n * // => [[1, 5, 7], [1, 2, 3]]\\n *\\n * _.invokeMap([123, 456], String.prototype.split, '');\\n * // => [['1', '2', '3'], ['4', '5', '6']]\\n */\\n var invokeMap = baseRest(function(collection, path, args) {\\n var index = -1,\\n isFunc = typeof path == 'function',\\n result = isArrayLike(collection) ? Array(collection.length) : [];\\n\\n baseEach(collection, function(value) {\\n result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\\n });\\n return result;\\n });\\n\\n /**\\n * Creates an object composed of keys generated from the results of running\\n * each element of `collection` thru `iteratee`. The corresponding value of\\n * each key is the last element responsible for generating the key. The\\n * iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\\n * @returns {Object} Returns the composed aggregate object.\\n * @example\\n *\\n * var array = [\\n * { 'dir': 'left', 'code': 97 },\\n * { 'dir': 'right', 'code': 100 }\\n * ];\\n *\\n * _.keyBy(array, function(o) {\\n * return String.fromCharCode(o.code);\\n * });\\n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\\n *\\n * _.keyBy(array, 'dir');\\n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\\n */\\n var keyBy = createAggregator(function(result, value, key) {\\n baseAssignValue(result, key, value);\\n });\\n\\n /**\\n * Creates an array of values by running each element in `collection` thru\\n * `iteratee`. The iteratee is invoked with three arguments:\\n * (value, index|key, collection).\\n *\\n * Many lodash methods are guarded to work as iteratees for methods like\\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\\n *\\n * The guarded methods are:\\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new mapped array.\\n * @example\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * _.map([4, 8], square);\\n * // => [16, 64]\\n *\\n * _.map({ 'a': 4, 'b': 8 }, square);\\n * // => [16, 64] (iteration order is not guaranteed)\\n *\\n * var users = [\\n * { 'user': 'barney' },\\n * { 'user': 'fred' }\\n * ];\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.map(users, 'user');\\n * // => ['barney', 'fred']\\n */\\n function map(collection, iteratee) {\\n var func = isArray(collection) ? arrayMap : baseMap;\\n return func(collection, getIteratee(iteratee, 3));\\n }\\n\\n /**\\n * This method is like `_.sortBy` except that it allows specifying the sort\\n * orders of the iteratees to sort by. If `orders` is unspecified, all values\\n * are sorted in ascending order. Otherwise, specify an order of \\\"desc\\\" for\\n * descending or \\\"asc\\\" for ascending sort order of corresponding values.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\\n * The iteratees to sort by.\\n * @param {string[]} [orders] The sort orders of `iteratees`.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\\n * @returns {Array} Returns the new sorted array.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'fred', 'age': 48 },\\n * { 'user': 'barney', 'age': 34 },\\n * { 'user': 'fred', 'age': 40 },\\n * { 'user': 'barney', 'age': 36 }\\n * ];\\n *\\n * // Sort by `user` in ascending order and by `age` in descending order.\\n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\\n */\\n function orderBy(collection, iteratees, orders, guard) {\\n if (collection == null) {\\n return [];\\n }\\n if (!isArray(iteratees)) {\\n iteratees = iteratees == null ? [] : [iteratees];\\n }\\n orders = guard ? undefined : orders;\\n if (!isArray(orders)) {\\n orders = orders == null ? [] : [orders];\\n }\\n return baseOrderBy(collection, iteratees, orders);\\n }\\n\\n /**\\n * Creates an array of elements split into two groups, the first of which\\n * contains elements `predicate` returns truthy for, the second of which\\n * contains elements `predicate` returns falsey for. The predicate is\\n * invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the array of grouped elements.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': false },\\n * { 'user': 'fred', 'age': 40, 'active': true },\\n * { 'user': 'pebbles', 'age': 1, 'active': false }\\n * ];\\n *\\n * _.partition(users, function(o) { return o.active; });\\n * // => objects for [['fred'], ['barney', 'pebbles']]\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.partition(users, { 'age': 1, 'active': false });\\n * // => objects for [['pebbles'], ['barney', 'fred']]\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.partition(users, ['active', false]);\\n * // => objects for [['barney', 'pebbles'], ['fred']]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.partition(users, 'active');\\n * // => objects for [['fred'], ['barney', 'pebbles']]\\n */\\n var partition = createAggregator(function(result, value, key) {\\n result[key ? 0 : 1].push(value);\\n }, function() { return [[], []]; });\\n\\n /**\\n * Reduces `collection` to a value which is the accumulated result of running\\n * each element in `collection` thru `iteratee`, where each successive\\n * invocation is supplied the return value of the previous. If `accumulator`\\n * is not given, the first element of `collection` is used as the initial\\n * value. The iteratee is invoked with four arguments:\\n * (accumulator, value, index|key, collection).\\n *\\n * Many lodash methods are guarded to work as iteratees for methods like\\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\\n *\\n * The guarded methods are:\\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\\n * and `sortBy`\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @param {*} [accumulator] The initial value.\\n * @returns {*} Returns the accumulated value.\\n * @see _.reduceRight\\n * @example\\n *\\n * _.reduce([1, 2], function(sum, n) {\\n * return sum + n;\\n * }, 0);\\n * // => 3\\n *\\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\\n * (result[value] || (result[value] = [])).push(key);\\n * return result;\\n * }, {});\\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\\n */\\n function reduce(collection, iteratee, accumulator) {\\n var func = isArray(collection) ? arrayReduce : baseReduce,\\n initAccum = arguments.length < 3;\\n\\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\\n }\\n\\n /**\\n * This method is like `_.reduce` except that it iterates over elements of\\n * `collection` from right to left.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @param {*} [accumulator] The initial value.\\n * @returns {*} Returns the accumulated value.\\n * @see _.reduce\\n * @example\\n *\\n * var array = [[0, 1], [2, 3], [4, 5]];\\n *\\n * _.reduceRight(array, function(flattened, other) {\\n * return flattened.concat(other);\\n * }, []);\\n * // => [4, 5, 2, 3, 0, 1]\\n */\\n function reduceRight(collection, iteratee, accumulator) {\\n var func = isArray(collection) ? arrayReduceRight : baseReduce,\\n initAccum = arguments.length < 3;\\n\\n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\\n }\\n\\n /**\\n * The opposite of `_.filter`; this method returns the elements of `collection`\\n * that `predicate` does **not** return truthy for.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the new filtered array.\\n * @see _.filter\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': false },\\n * { 'user': 'fred', 'age': 40, 'active': true }\\n * ];\\n *\\n * _.reject(users, function(o) { return !o.active; });\\n * // => objects for ['fred']\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.reject(users, { 'age': 40, 'active': true });\\n * // => objects for ['barney']\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.reject(users, ['active', false]);\\n * // => objects for ['fred']\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.reject(users, 'active');\\n * // => objects for ['barney']\\n */\\n function reject(collection, predicate) {\\n var func = isArray(collection) ? arrayFilter : baseFilter;\\n return func(collection, negate(getIteratee(predicate, 3)));\\n }\\n\\n /**\\n * Gets a random element from `collection`.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to sample.\\n * @returns {*} Returns the random element.\\n * @example\\n *\\n * _.sample([1, 2, 3, 4]);\\n * // => 2\\n */\\n function sample(collection) {\\n var func = isArray(collection) ? arraySample : baseSample;\\n return func(collection);\\n }\\n\\n /**\\n * Gets `n` random elements at unique keys from `collection` up to the\\n * size of `collection`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to sample.\\n * @param {number} [n=1] The number of elements to sample.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the random elements.\\n * @example\\n *\\n * _.sampleSize([1, 2, 3], 2);\\n * // => [3, 1]\\n *\\n * _.sampleSize([1, 2, 3], 4);\\n * // => [2, 3, 1]\\n */\\n function sampleSize(collection, n, guard) {\\n if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\\n n = 1;\\n } else {\\n n = toInteger(n);\\n }\\n var func = isArray(collection) ? arraySampleSize : baseSampleSize;\\n return func(collection, n);\\n }\\n\\n /**\\n * Creates an array of shuffled values, using a version of the\\n * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to shuffle.\\n * @returns {Array} Returns the new shuffled array.\\n * @example\\n *\\n * _.shuffle([1, 2, 3, 4]);\\n * // => [4, 1, 3, 2]\\n */\\n function shuffle(collection) {\\n var func = isArray(collection) ? arrayShuffle : baseShuffle;\\n return func(collection);\\n }\\n\\n /**\\n * Gets the size of `collection` by returning its length for array-like\\n * values or the number of own enumerable string keyed properties for objects.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object|string} collection The collection to inspect.\\n * @returns {number} Returns the collection size.\\n * @example\\n *\\n * _.size([1, 2, 3]);\\n * // => 3\\n *\\n * _.size({ 'a': 1, 'b': 2 });\\n * // => 2\\n *\\n * _.size('pebbles');\\n * // => 7\\n */\\n function size(collection) {\\n if (collection == null) {\\n return 0;\\n }\\n if (isArrayLike(collection)) {\\n return isString(collection) ? stringSize(collection) : collection.length;\\n }\\n var tag = getTag(collection);\\n if (tag == mapTag || tag == setTag) {\\n return collection.size;\\n }\\n return baseKeys(collection).length;\\n }\\n\\n /**\\n * Checks if `predicate` returns truthy for **any** element of `collection`.\\n * Iteration is stopped once `predicate` returns truthy. The predicate is\\n * invoked with three arguments: (value, index|key, collection).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {boolean} Returns `true` if any element passes the predicate check,\\n * else `false`.\\n * @example\\n *\\n * _.some([null, 0, 'yes', false], Boolean);\\n * // => true\\n *\\n * var users = [\\n * { 'user': 'barney', 'active': true },\\n * { 'user': 'fred', 'active': false }\\n * ];\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.some(users, { 'user': 'barney', 'active': false });\\n * // => false\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.some(users, ['active', false]);\\n * // => true\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.some(users, 'active');\\n * // => true\\n */\\n function some(collection, predicate, guard) {\\n var func = isArray(collection) ? arraySome : baseSome;\\n if (guard && isIterateeCall(collection, predicate, guard)) {\\n predicate = undefined;\\n }\\n return func(collection, getIteratee(predicate, 3));\\n }\\n\\n /**\\n * Creates an array of elements, sorted in ascending order by the results of\\n * running each element in a collection thru each iteratee. This method\\n * performs a stable sort, that is, it preserves the original sort order of\\n * equal elements. The iteratees are invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Collection\\n * @param {Array|Object} collection The collection to iterate over.\\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\\n * The iteratees to sort by.\\n * @returns {Array} Returns the new sorted array.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'fred', 'age': 48 },\\n * { 'user': 'barney', 'age': 36 },\\n * { 'user': 'fred', 'age': 40 },\\n * { 'user': 'barney', 'age': 34 }\\n * ];\\n *\\n * _.sortBy(users, [function(o) { return o.user; }]);\\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\\n *\\n * _.sortBy(users, ['user', 'age']);\\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\\n */\\n var sortBy = baseRest(function(collection, iteratees) {\\n if (collection == null) {\\n return [];\\n }\\n var length = iteratees.length;\\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\\n iteratees = [];\\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\\n iteratees = [iteratees[0]];\\n }\\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\\n });\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Gets the timestamp of the number of milliseconds that have elapsed since\\n * the Unix epoch (1 January 1970 00:00:00 UTC).\\n *\\n * @static\\n * @memberOf _\\n * @since 2.4.0\\n * @category Date\\n * @returns {number} Returns the timestamp.\\n * @example\\n *\\n * _.defer(function(stamp) {\\n * console.log(_.now() - stamp);\\n * }, _.now());\\n * // => Logs the number of milliseconds it took for the deferred invocation.\\n */\\n var now = ctxNow || function() {\\n return root.Date.now();\\n };\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * The opposite of `_.before`; this method creates a function that invokes\\n * `func` once it's called `n` or more times.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {number} n The number of calls before `func` is invoked.\\n * @param {Function} func The function to restrict.\\n * @returns {Function} Returns the new restricted function.\\n * @example\\n *\\n * var saves = ['profile', 'settings'];\\n *\\n * var done = _.after(saves.length, function() {\\n * console.log('done saving!');\\n * });\\n *\\n * _.forEach(saves, function(type) {\\n * asyncSave({ 'type': type, 'complete': done });\\n * });\\n * // => Logs 'done saving!' after the two async saves have completed.\\n */\\n function after(n, func) {\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n n = toInteger(n);\\n return function() {\\n if (--n < 1) {\\n return func.apply(this, arguments);\\n }\\n };\\n }\\n\\n /**\\n * Creates a function that invokes `func`, with up to `n` arguments,\\n * ignoring any additional arguments.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Function\\n * @param {Function} func The function to cap arguments for.\\n * @param {number} [n=func.length] The arity cap.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Function} Returns the new capped function.\\n * @example\\n *\\n * _.map(['6', '8', '10'], _.ary(parseInt, 1));\\n * // => [6, 8, 10]\\n */\\n function ary(func, n, guard) {\\n n = guard ? undefined : n;\\n n = (func && n == null) ? func.length : n;\\n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\\n }\\n\\n /**\\n * Creates a function that invokes `func`, with the `this` binding and arguments\\n * of the created function, while it's called less than `n` times. Subsequent\\n * calls to the created function return the result of the last `func` invocation.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Function\\n * @param {number} n The number of calls at which `func` is no longer invoked.\\n * @param {Function} func The function to restrict.\\n * @returns {Function} Returns the new restricted function.\\n * @example\\n *\\n * jQuery(element).on('click', _.before(5, addContactToList));\\n * // => Allows adding up to 4 contacts to the list.\\n */\\n function before(n, func) {\\n var result;\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n n = toInteger(n);\\n return function() {\\n if (--n > 0) {\\n result = func.apply(this, arguments);\\n }\\n if (n <= 1) {\\n func = undefined;\\n }\\n return result;\\n };\\n }\\n\\n /**\\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\\n * and `partials` prepended to the arguments it receives.\\n *\\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\\n * may be used as a placeholder for partially applied arguments.\\n *\\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \\\"length\\\"\\n * property of bound functions.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to bind.\\n * @param {*} thisArg The `this` binding of `func`.\\n * @param {...*} [partials] The arguments to be partially applied.\\n * @returns {Function} Returns the new bound function.\\n * @example\\n *\\n * function greet(greeting, punctuation) {\\n * return greeting + ' ' + this.user + punctuation;\\n * }\\n *\\n * var object = { 'user': 'fred' };\\n *\\n * var bound = _.bind(greet, object, 'hi');\\n * bound('!');\\n * // => 'hi fred!'\\n *\\n * // Bound with placeholders.\\n * var bound = _.bind(greet, object, _, '!');\\n * bound('hi');\\n * // => 'hi fred!'\\n */\\n var bind = baseRest(function(func, thisArg, partials) {\\n var bitmask = WRAP_BIND_FLAG;\\n if (partials.length) {\\n var holders = replaceHolders(partials, getHolder(bind));\\n bitmask |= WRAP_PARTIAL_FLAG;\\n }\\n return createWrap(func, bitmask, thisArg, partials, holders);\\n });\\n\\n /**\\n * Creates a function that invokes the method at `object[key]` with `partials`\\n * prepended to the arguments it receives.\\n *\\n * This method differs from `_.bind` by allowing bound functions to reference\\n * methods that may be redefined or don't yet exist. See\\n * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\\n * for more details.\\n *\\n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\\n * builds, may be used as a placeholder for partially applied arguments.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.10.0\\n * @category Function\\n * @param {Object} object The object to invoke the method on.\\n * @param {string} key The key of the method.\\n * @param {...*} [partials] The arguments to be partially applied.\\n * @returns {Function} Returns the new bound function.\\n * @example\\n *\\n * var object = {\\n * 'user': 'fred',\\n * 'greet': function(greeting, punctuation) {\\n * return greeting + ' ' + this.user + punctuation;\\n * }\\n * };\\n *\\n * var bound = _.bindKey(object, 'greet', 'hi');\\n * bound('!');\\n * // => 'hi fred!'\\n *\\n * object.greet = function(greeting, punctuation) {\\n * return greeting + 'ya ' + this.user + punctuation;\\n * };\\n *\\n * bound('!');\\n * // => 'hiya fred!'\\n *\\n * // Bound with placeholders.\\n * var bound = _.bindKey(object, 'greet', _, '!');\\n * bound('hi');\\n * // => 'hiya fred!'\\n */\\n var bindKey = baseRest(function(object, key, partials) {\\n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\\n if (partials.length) {\\n var holders = replaceHolders(partials, getHolder(bindKey));\\n bitmask |= WRAP_PARTIAL_FLAG;\\n }\\n return createWrap(key, bitmask, object, partials, holders);\\n });\\n\\n /**\\n * Creates a function that accepts arguments of `func` and either invokes\\n * `func` returning its result, if at least `arity` number of arguments have\\n * been provided, or returns a function that accepts the remaining `func`\\n * arguments, and so on. The arity of `func` may be specified if `func.length`\\n * is not sufficient.\\n *\\n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\\n * may be used as a placeholder for provided arguments.\\n *\\n * **Note:** This method doesn't set the \\\"length\\\" property of curried functions.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Function\\n * @param {Function} func The function to curry.\\n * @param {number} [arity=func.length] The arity of `func`.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Function} Returns the new curried function.\\n * @example\\n *\\n * var abc = function(a, b, c) {\\n * return [a, b, c];\\n * };\\n *\\n * var curried = _.curry(abc);\\n *\\n * curried(1)(2)(3);\\n * // => [1, 2, 3]\\n *\\n * curried(1, 2)(3);\\n * // => [1, 2, 3]\\n *\\n * curried(1, 2, 3);\\n * // => [1, 2, 3]\\n *\\n * // Curried with placeholders.\\n * curried(1)(_, 3)(2);\\n * // => [1, 2, 3]\\n */\\n function curry(func, arity, guard) {\\n arity = guard ? undefined : arity;\\n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\\n result.placeholder = curry.placeholder;\\n return result;\\n }\\n\\n /**\\n * This method is like `_.curry` except that arguments are applied to `func`\\n * in the manner of `_.partialRight` instead of `_.partial`.\\n *\\n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\\n * builds, may be used as a placeholder for provided arguments.\\n *\\n * **Note:** This method doesn't set the \\\"length\\\" property of curried functions.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Function\\n * @param {Function} func The function to curry.\\n * @param {number} [arity=func.length] The arity of `func`.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Function} Returns the new curried function.\\n * @example\\n *\\n * var abc = function(a, b, c) {\\n * return [a, b, c];\\n * };\\n *\\n * var curried = _.curryRight(abc);\\n *\\n * curried(3)(2)(1);\\n * // => [1, 2, 3]\\n *\\n * curried(2, 3)(1);\\n * // => [1, 2, 3]\\n *\\n * curried(1, 2, 3);\\n * // => [1, 2, 3]\\n *\\n * // Curried with placeholders.\\n * curried(3)(1, _)(2);\\n * // => [1, 2, 3]\\n */\\n function curryRight(func, arity, guard) {\\n arity = guard ? undefined : arity;\\n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\\n result.placeholder = curryRight.placeholder;\\n return result;\\n }\\n\\n /**\\n * Creates a debounced function that delays invoking `func` until after `wait`\\n * milliseconds have elapsed since the last time the debounced function was\\n * invoked. The debounced function comes with a `cancel` method to cancel\\n * delayed `func` invocations and a `flush` method to immediately invoke them.\\n * Provide `options` to indicate whether `func` should be invoked on the\\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\\n * with the last arguments provided to the debounced function. Subsequent\\n * calls to the debounced function return the result of the last `func`\\n * invocation.\\n *\\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\\n * invoked on the trailing edge of the timeout only if the debounced function\\n * is invoked more than once during the `wait` timeout.\\n *\\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\\n *\\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\\n * for details over the differences between `_.debounce` and `_.throttle`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to debounce.\\n * @param {number} [wait=0] The number of milliseconds to delay.\\n * @param {Object} [options={}] The options object.\\n * @param {boolean} [options.leading=false]\\n * Specify invoking on the leading edge of the timeout.\\n * @param {number} [options.maxWait]\\n * The maximum time `func` is allowed to be delayed before it's invoked.\\n * @param {boolean} [options.trailing=true]\\n * Specify invoking on the trailing edge of the timeout.\\n * @returns {Function} Returns the new debounced function.\\n * @example\\n *\\n * // Avoid costly calculations while the window size is in flux.\\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\\n *\\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\\n * 'leading': true,\\n * 'trailing': false\\n * }));\\n *\\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\\n * var source = new EventSource('/stream');\\n * jQuery(source).on('message', debounced);\\n *\\n * // Cancel the trailing debounced invocation.\\n * jQuery(window).on('popstate', debounced.cancel);\\n */\\n function debounce(func, wait, options) {\\n var lastArgs,\\n lastThis,\\n maxWait,\\n result,\\n timerId,\\n lastCallTime,\\n lastInvokeTime = 0,\\n leading = false,\\n maxing = false,\\n trailing = true;\\n\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n wait = toNumber(wait) || 0;\\n if (isObject(options)) {\\n leading = !!options.leading;\\n maxing = 'maxWait' in options;\\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\\n trailing = 'trailing' in options ? !!options.trailing : trailing;\\n }\\n\\n function invokeFunc(time) {\\n var args = lastArgs,\\n thisArg = lastThis;\\n\\n lastArgs = lastThis = undefined;\\n lastInvokeTime = time;\\n result = func.apply(thisArg, args);\\n return result;\\n }\\n\\n function leadingEdge(time) {\\n // Reset any `maxWait` timer.\\n lastInvokeTime = time;\\n // Start the timer for the trailing edge.\\n timerId = setTimeout(timerExpired, wait);\\n // Invoke the leading edge.\\n return leading ? invokeFunc(time) : result;\\n }\\n\\n function remainingWait(time) {\\n var timeSinceLastCall = time - lastCallTime,\\n timeSinceLastInvoke = time - lastInvokeTime,\\n result = wait - timeSinceLastCall;\\n\\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\\n }\\n\\n function shouldInvoke(time) {\\n var timeSinceLastCall = time - lastCallTime,\\n timeSinceLastInvoke = time - lastInvokeTime;\\n\\n // Either this is the first call, activity has stopped and we're at the\\n // trailing edge, the system time has gone backwards and we're treating\\n // it as the trailing edge, or we've hit the `maxWait` limit.\\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\\n }\\n\\n function timerExpired() {\\n var time = now();\\n if (shouldInvoke(time)) {\\n return trailingEdge(time);\\n }\\n // Restart the timer.\\n timerId = setTimeout(timerExpired, remainingWait(time));\\n }\\n\\n function trailingEdge(time) {\\n timerId = undefined;\\n\\n // Only invoke if we have `lastArgs` which means `func` has been\\n // debounced at least once.\\n if (trailing && lastArgs) {\\n return invokeFunc(time);\\n }\\n lastArgs = lastThis = undefined;\\n return result;\\n }\\n\\n function cancel() {\\n if (timerId !== undefined) {\\n clearTimeout(timerId);\\n }\\n lastInvokeTime = 0;\\n lastArgs = lastCallTime = lastThis = timerId = undefined;\\n }\\n\\n function flush() {\\n return timerId === undefined ? result : trailingEdge(now());\\n }\\n\\n function debounced() {\\n var time = now(),\\n isInvoking = shouldInvoke(time);\\n\\n lastArgs = arguments;\\n lastThis = this;\\n lastCallTime = time;\\n\\n if (isInvoking) {\\n if (timerId === undefined) {\\n return leadingEdge(lastCallTime);\\n }\\n if (maxing) {\\n // Handle invocations in a tight loop.\\n timerId = setTimeout(timerExpired, wait);\\n return invokeFunc(lastCallTime);\\n }\\n }\\n if (timerId === undefined) {\\n timerId = setTimeout(timerExpired, wait);\\n }\\n return result;\\n }\\n debounced.cancel = cancel;\\n debounced.flush = flush;\\n return debounced;\\n }\\n\\n /**\\n * Defers invoking the `func` until the current call stack has cleared. Any\\n * additional arguments are provided to `func` when it's invoked.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to defer.\\n * @param {...*} [args] The arguments to invoke `func` with.\\n * @returns {number} Returns the timer id.\\n * @example\\n *\\n * _.defer(function(text) {\\n * console.log(text);\\n * }, 'deferred');\\n * // => Logs 'deferred' after one millisecond.\\n */\\n var defer = baseRest(function(func, args) {\\n return baseDelay(func, 1, args);\\n });\\n\\n /**\\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\\n * provided to `func` when it's invoked.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to delay.\\n * @param {number} wait The number of milliseconds to delay invocation.\\n * @param {...*} [args] The arguments to invoke `func` with.\\n * @returns {number} Returns the timer id.\\n * @example\\n *\\n * _.delay(function(text) {\\n * console.log(text);\\n * }, 1000, 'later');\\n * // => Logs 'later' after one second.\\n */\\n var delay = baseRest(function(func, wait, args) {\\n return baseDelay(func, toNumber(wait) || 0, args);\\n });\\n\\n /**\\n * Creates a function that invokes `func` with arguments reversed.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Function\\n * @param {Function} func The function to flip arguments for.\\n * @returns {Function} Returns the new flipped function.\\n * @example\\n *\\n * var flipped = _.flip(function() {\\n * return _.toArray(arguments);\\n * });\\n *\\n * flipped('a', 'b', 'c', 'd');\\n * // => ['d', 'c', 'b', 'a']\\n */\\n function flip(func) {\\n return createWrap(func, WRAP_FLIP_FLAG);\\n }\\n\\n /**\\n * Creates a function that memoizes the result of `func`. If `resolver` is\\n * provided, it determines the cache key for storing the result based on the\\n * arguments provided to the memoized function. By default, the first argument\\n * provided to the memoized function is used as the map cache key. The `func`\\n * is invoked with the `this` binding of the memoized function.\\n *\\n * **Note:** The cache is exposed as the `cache` property on the memoized\\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\\n * constructor with one whose instances implement the\\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to have its output memoized.\\n * @param {Function} [resolver] The function to resolve the cache key.\\n * @returns {Function} Returns the new memoized function.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': 2 };\\n * var other = { 'c': 3, 'd': 4 };\\n *\\n * var values = _.memoize(_.values);\\n * values(object);\\n * // => [1, 2]\\n *\\n * values(other);\\n * // => [3, 4]\\n *\\n * object.a = 2;\\n * values(object);\\n * // => [1, 2]\\n *\\n * // Modify the result cache.\\n * values.cache.set(object, ['a', 'b']);\\n * values(object);\\n * // => ['a', 'b']\\n *\\n * // Replace `_.memoize.Cache`.\\n * _.memoize.Cache = WeakMap;\\n */\\n function memoize(func, resolver) {\\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n var memoized = function() {\\n var args = arguments,\\n key = resolver ? resolver.apply(this, args) : args[0],\\n cache = memoized.cache;\\n\\n if (cache.has(key)) {\\n return cache.get(key);\\n }\\n var result = func.apply(this, args);\\n memoized.cache = cache.set(key, result) || cache;\\n return result;\\n };\\n memoized.cache = new (memoize.Cache || MapCache);\\n return memoized;\\n }\\n\\n // Expose `MapCache`.\\n memoize.Cache = MapCache;\\n\\n /**\\n * Creates a function that negates the result of the predicate `func`. The\\n * `func` predicate is invoked with the `this` binding and arguments of the\\n * created function.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Function\\n * @param {Function} predicate The predicate to negate.\\n * @returns {Function} Returns the new negated function.\\n * @example\\n *\\n * function isEven(n) {\\n * return n % 2 == 0;\\n * }\\n *\\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\\n * // => [1, 3, 5]\\n */\\n function negate(predicate) {\\n if (typeof predicate != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n return function() {\\n var args = arguments;\\n switch (args.length) {\\n case 0: return !predicate.call(this);\\n case 1: return !predicate.call(this, args[0]);\\n case 2: return !predicate.call(this, args[0], args[1]);\\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\\n }\\n return !predicate.apply(this, args);\\n };\\n }\\n\\n /**\\n * Creates a function that is restricted to invoking `func` once. Repeat calls\\n * to the function return the value of the first invocation. The `func` is\\n * invoked with the `this` binding and arguments of the created function.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to restrict.\\n * @returns {Function} Returns the new restricted function.\\n * @example\\n *\\n * var initialize = _.once(createApplication);\\n * initialize();\\n * initialize();\\n * // => `createApplication` is invoked once\\n */\\n function once(func) {\\n return before(2, func);\\n }\\n\\n /**\\n * Creates a function that invokes `func` with its arguments transformed.\\n *\\n * @static\\n * @since 4.0.0\\n * @memberOf _\\n * @category Function\\n * @param {Function} func The function to wrap.\\n * @param {...(Function|Function[])} [transforms=[_.identity]]\\n * The argument transforms.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * function doubled(n) {\\n * return n * 2;\\n * }\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * var func = _.overArgs(function(x, y) {\\n * return [x, y];\\n * }, [square, doubled]);\\n *\\n * func(9, 3);\\n * // => [81, 6]\\n *\\n * func(10, 5);\\n * // => [100, 10]\\n */\\n var overArgs = castRest(function(func, transforms) {\\n transforms = (transforms.length == 1 && isArray(transforms[0]))\\n ? arrayMap(transforms[0], baseUnary(getIteratee()))\\n : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\\n\\n var funcsLength = transforms.length;\\n return baseRest(function(args) {\\n var index = -1,\\n length = nativeMin(args.length, funcsLength);\\n\\n while (++index < length) {\\n args[index] = transforms[index].call(this, args[index]);\\n }\\n return apply(func, this, args);\\n });\\n });\\n\\n /**\\n * Creates a function that invokes `func` with `partials` prepended to the\\n * arguments it receives. This method is like `_.bind` except it does **not**\\n * alter the `this` binding.\\n *\\n * The `_.partial.placeholder` value, which defaults to `_` in monolithic\\n * builds, may be used as a placeholder for partially applied arguments.\\n *\\n * **Note:** This method doesn't set the \\\"length\\\" property of partially\\n * applied functions.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.2.0\\n * @category Function\\n * @param {Function} func The function to partially apply arguments to.\\n * @param {...*} [partials] The arguments to be partially applied.\\n * @returns {Function} Returns the new partially applied function.\\n * @example\\n *\\n * function greet(greeting, name) {\\n * return greeting + ' ' + name;\\n * }\\n *\\n * var sayHelloTo = _.partial(greet, 'hello');\\n * sayHelloTo('fred');\\n * // => 'hello fred'\\n *\\n * // Partially applied with placeholders.\\n * var greetFred = _.partial(greet, _, 'fred');\\n * greetFred('hi');\\n * // => 'hi fred'\\n */\\n var partial = baseRest(function(func, partials) {\\n var holders = replaceHolders(partials, getHolder(partial));\\n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\\n });\\n\\n /**\\n * This method is like `_.partial` except that partially applied arguments\\n * are appended to the arguments it receives.\\n *\\n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\\n * builds, may be used as a placeholder for partially applied arguments.\\n *\\n * **Note:** This method doesn't set the \\\"length\\\" property of partially\\n * applied functions.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.0.0\\n * @category Function\\n * @param {Function} func The function to partially apply arguments to.\\n * @param {...*} [partials] The arguments to be partially applied.\\n * @returns {Function} Returns the new partially applied function.\\n * @example\\n *\\n * function greet(greeting, name) {\\n * return greeting + ' ' + name;\\n * }\\n *\\n * var greetFred = _.partialRight(greet, 'fred');\\n * greetFred('hi');\\n * // => 'hi fred'\\n *\\n * // Partially applied with placeholders.\\n * var sayHelloTo = _.partialRight(greet, 'hello', _);\\n * sayHelloTo('fred');\\n * // => 'hello fred'\\n */\\n var partialRight = baseRest(function(func, partials) {\\n var holders = replaceHolders(partials, getHolder(partialRight));\\n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\\n });\\n\\n /**\\n * Creates a function that invokes `func` with arguments arranged according\\n * to the specified `indexes` where the argument value at the first index is\\n * provided as the first argument, the argument value at the second index is\\n * provided as the second argument, and so on.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Function\\n * @param {Function} func The function to rearrange arguments for.\\n * @param {...(number|number[])} indexes The arranged argument indexes.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var rearged = _.rearg(function(a, b, c) {\\n * return [a, b, c];\\n * }, [2, 0, 1]);\\n *\\n * rearged('b', 'c', 'a')\\n * // => ['a', 'b', 'c']\\n */\\n var rearg = flatRest(function(func, indexes) {\\n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\\n });\\n\\n /**\\n * Creates a function that invokes `func` with the `this` binding of the\\n * created function and arguments from `start` and beyond provided as\\n * an array.\\n *\\n * **Note:** This method is based on the\\n * [rest parameter](https://mdn.io/rest_parameters).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Function\\n * @param {Function} func The function to apply a rest parameter to.\\n * @param {number} [start=func.length-1] The start position of the rest parameter.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var say = _.rest(function(what, names) {\\n * return what + ' ' + _.initial(names).join(', ') +\\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\\n * });\\n *\\n * say('hello', 'fred', 'barney', 'pebbles');\\n * // => 'hello fred, barney, & pebbles'\\n */\\n function rest(func, start) {\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n start = start === undefined ? start : toInteger(start);\\n return baseRest(func, start);\\n }\\n\\n /**\\n * Creates a function that invokes `func` with the `this` binding of the\\n * create function and an array of arguments much like\\n * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\\n *\\n * **Note:** This method is based on the\\n * [spread operator](https://mdn.io/spread_operator).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.2.0\\n * @category Function\\n * @param {Function} func The function to spread arguments over.\\n * @param {number} [start=0] The start position of the spread.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var say = _.spread(function(who, what) {\\n * return who + ' says ' + what;\\n * });\\n *\\n * say(['fred', 'hello']);\\n * // => 'fred says hello'\\n *\\n * var numbers = Promise.all([\\n * Promise.resolve(40),\\n * Promise.resolve(36)\\n * ]);\\n *\\n * numbers.then(_.spread(function(x, y) {\\n * return x + y;\\n * }));\\n * // => a Promise of 76\\n */\\n function spread(func, start) {\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n start = start == null ? 0 : nativeMax(toInteger(start), 0);\\n return baseRest(function(args) {\\n var array = args[start],\\n otherArgs = castSlice(args, 0, start);\\n\\n if (array) {\\n arrayPush(otherArgs, array);\\n }\\n return apply(func, this, otherArgs);\\n });\\n }\\n\\n /**\\n * Creates a throttled function that only invokes `func` at most once per\\n * every `wait` milliseconds. The throttled function comes with a `cancel`\\n * method to cancel delayed `func` invocations and a `flush` method to\\n * immediately invoke them. Provide `options` to indicate whether `func`\\n * should be invoked on the leading and/or trailing edge of the `wait`\\n * timeout. The `func` is invoked with the last arguments provided to the\\n * throttled function. Subsequent calls to the throttled function return the\\n * result of the last `func` invocation.\\n *\\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\\n * invoked on the trailing edge of the timeout only if the throttled function\\n * is invoked more than once during the `wait` timeout.\\n *\\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\\n *\\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\\n * for details over the differences between `_.throttle` and `_.debounce`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {Function} func The function to throttle.\\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\\n * @param {Object} [options={}] The options object.\\n * @param {boolean} [options.leading=true]\\n * Specify invoking on the leading edge of the timeout.\\n * @param {boolean} [options.trailing=true]\\n * Specify invoking on the trailing edge of the timeout.\\n * @returns {Function} Returns the new throttled function.\\n * @example\\n *\\n * // Avoid excessively updating the position while scrolling.\\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\\n *\\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\\n * jQuery(element).on('click', throttled);\\n *\\n * // Cancel the trailing throttled invocation.\\n * jQuery(window).on('popstate', throttled.cancel);\\n */\\n function throttle(func, wait, options) {\\n var leading = true,\\n trailing = true;\\n\\n if (typeof func != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n if (isObject(options)) {\\n leading = 'leading' in options ? !!options.leading : leading;\\n trailing = 'trailing' in options ? !!options.trailing : trailing;\\n }\\n return debounce(func, wait, {\\n 'leading': leading,\\n 'maxWait': wait,\\n 'trailing': trailing\\n });\\n }\\n\\n /**\\n * Creates a function that accepts up to one argument, ignoring any\\n * additional arguments.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Function\\n * @param {Function} func The function to cap arguments for.\\n * @returns {Function} Returns the new capped function.\\n * @example\\n *\\n * _.map(['6', '8', '10'], _.unary(parseInt));\\n * // => [6, 8, 10]\\n */\\n function unary(func) {\\n return ary(func, 1);\\n }\\n\\n /**\\n * Creates a function that provides `value` to `wrapper` as its first\\n * argument. Any additional arguments provided to the function are appended\\n * to those provided to the `wrapper`. The wrapper is invoked with the `this`\\n * binding of the created function.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Function\\n * @param {*} value The value to wrap.\\n * @param {Function} [wrapper=identity] The wrapper function.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var p = _.wrap(_.escape, function(func, text) {\\n * return '<p>' + func(text) + '</p>';\\n * });\\n *\\n * p('fred, barney, & pebbles');\\n * // => '<p>fred, barney, &amp; pebbles</p>'\\n */\\n function wrap(value, wrapper) {\\n return partial(castFunction(wrapper), value);\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Casts `value` as an array if it's not one.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.4.0\\n * @category Lang\\n * @param {*} value The value to inspect.\\n * @returns {Array} Returns the cast array.\\n * @example\\n *\\n * _.castArray(1);\\n * // => [1]\\n *\\n * _.castArray({ 'a': 1 });\\n * // => [{ 'a': 1 }]\\n *\\n * _.castArray('abc');\\n * // => ['abc']\\n *\\n * _.castArray(null);\\n * // => [null]\\n *\\n * _.castArray(undefined);\\n * // => [undefined]\\n *\\n * _.castArray();\\n * // => []\\n *\\n * var array = [1, 2, 3];\\n * console.log(_.castArray(array) === array);\\n * // => true\\n */\\n function castArray() {\\n if (!arguments.length) {\\n return [];\\n }\\n var value = arguments[0];\\n return isArray(value) ? value : [value];\\n }\\n\\n /**\\n * Creates a shallow clone of `value`.\\n *\\n * **Note:** This method is loosely based on the\\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\\n * arrays. The own enumerable properties of `arguments` objects are cloned\\n * as plain objects. An empty object is returned for uncloneable values such\\n * as error objects, functions, DOM nodes, and WeakMaps.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to clone.\\n * @returns {*} Returns the cloned value.\\n * @see _.cloneDeep\\n * @example\\n *\\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\\n *\\n * var shallow = _.clone(objects);\\n * console.log(shallow[0] === objects[0]);\\n * // => true\\n */\\n function clone(value) {\\n return baseClone(value, CLONE_SYMBOLS_FLAG);\\n }\\n\\n /**\\n * This method is like `_.clone` except that it accepts `customizer` which\\n * is invoked to produce the cloned value. If `customizer` returns `undefined`,\\n * cloning is handled by the method instead. The `customizer` is invoked with\\n * up to four arguments; (value [, index|key, object, stack]).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to clone.\\n * @param {Function} [customizer] The function to customize cloning.\\n * @returns {*} Returns the cloned value.\\n * @see _.cloneDeepWith\\n * @example\\n *\\n * function customizer(value) {\\n * if (_.isElement(value)) {\\n * return value.cloneNode(false);\\n * }\\n * }\\n *\\n * var el = _.cloneWith(document.body, customizer);\\n *\\n * console.log(el === document.body);\\n * // => false\\n * console.log(el.nodeName);\\n * // => 'BODY'\\n * console.log(el.childNodes.length);\\n * // => 0\\n */\\n function cloneWith(value, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\\n }\\n\\n /**\\n * This method is like `_.clone` except that it recursively clones `value`.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.0.0\\n * @category Lang\\n * @param {*} value The value to recursively clone.\\n * @returns {*} Returns the deep cloned value.\\n * @see _.clone\\n * @example\\n *\\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\\n *\\n * var deep = _.cloneDeep(objects);\\n * console.log(deep[0] === objects[0]);\\n * // => false\\n */\\n function cloneDeep(value) {\\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\\n }\\n\\n /**\\n * This method is like `_.cloneWith` except that it recursively clones `value`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to recursively clone.\\n * @param {Function} [customizer] The function to customize cloning.\\n * @returns {*} Returns the deep cloned value.\\n * @see _.cloneWith\\n * @example\\n *\\n * function customizer(value) {\\n * if (_.isElement(value)) {\\n * return value.cloneNode(true);\\n * }\\n * }\\n *\\n * var el = _.cloneDeepWith(document.body, customizer);\\n *\\n * console.log(el === document.body);\\n * // => false\\n * console.log(el.nodeName);\\n * // => 'BODY'\\n * console.log(el.childNodes.length);\\n * // => 20\\n */\\n function cloneDeepWith(value, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\\n }\\n\\n /**\\n * Checks if `object` conforms to `source` by invoking the predicate\\n * properties of `source` with the corresponding property values of `object`.\\n *\\n * **Note:** This method is equivalent to `_.conforms` when `source` is\\n * partially applied.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.14.0\\n * @category Lang\\n * @param {Object} object The object to inspect.\\n * @param {Object} source The object of property predicates to conform to.\\n * @returns {boolean} Returns `true` if `object` conforms, else `false`.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': 2 };\\n *\\n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\\n * // => true\\n *\\n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\\n * // => false\\n */\\n function conformsTo(object, source) {\\n return source == null || baseConformsTo(object, source, keys(source));\\n }\\n\\n /**\\n * Performs a\\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\\n * comparison between two values to determine if they are equivalent.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\\n * @example\\n *\\n * var object = { 'a': 1 };\\n * var other = { 'a': 1 };\\n *\\n * _.eq(object, object);\\n * // => true\\n *\\n * _.eq(object, other);\\n * // => false\\n *\\n * _.eq('a', 'a');\\n * // => true\\n *\\n * _.eq('a', Object('a'));\\n * // => false\\n *\\n * _.eq(NaN, NaN);\\n * // => true\\n */\\n function eq(value, other) {\\n return value === other || (value !== value && other !== other);\\n }\\n\\n /**\\n * Checks if `value` is greater than `other`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.9.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\\n * else `false`.\\n * @see _.lt\\n * @example\\n *\\n * _.gt(3, 1);\\n * // => true\\n *\\n * _.gt(3, 3);\\n * // => false\\n *\\n * _.gt(1, 3);\\n * // => false\\n */\\n var gt = createRelationalOperation(baseGt);\\n\\n /**\\n * Checks if `value` is greater than or equal to `other`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.9.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is greater than or equal to\\n * `other`, else `false`.\\n * @see _.lte\\n * @example\\n *\\n * _.gte(3, 1);\\n * // => true\\n *\\n * _.gte(3, 3);\\n * // => true\\n *\\n * _.gte(1, 3);\\n * // => false\\n */\\n var gte = createRelationalOperation(function(value, other) {\\n return value >= other;\\n });\\n\\n /**\\n * Checks if `value` is likely an `arguments` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\\n * else `false`.\\n * @example\\n *\\n * _.isArguments(function() { return arguments; }());\\n * // => true\\n *\\n * _.isArguments([1, 2, 3]);\\n * // => false\\n */\\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\\n !propertyIsEnumerable.call(value, 'callee');\\n };\\n\\n /**\\n * Checks if `value` is classified as an `Array` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\\n * @example\\n *\\n * _.isArray([1, 2, 3]);\\n * // => true\\n *\\n * _.isArray(document.body.children);\\n * // => false\\n *\\n * _.isArray('abc');\\n * // => false\\n *\\n * _.isArray(_.noop);\\n * // => false\\n */\\n var isArray = Array.isArray;\\n\\n /**\\n * Checks if `value` is classified as an `ArrayBuffer` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\\n * @example\\n *\\n * _.isArrayBuffer(new ArrayBuffer(2));\\n * // => true\\n *\\n * _.isArrayBuffer(new Array(2));\\n * // => false\\n */\\n var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\\n\\n /**\\n * Checks if `value` is array-like. A value is considered array-like if it's\\n * not a function and has a `value.length` that's an integer greater than or\\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\\n * @example\\n *\\n * _.isArrayLike([1, 2, 3]);\\n * // => true\\n *\\n * _.isArrayLike(document.body.children);\\n * // => true\\n *\\n * _.isArrayLike('abc');\\n * // => true\\n *\\n * _.isArrayLike(_.noop);\\n * // => false\\n */\\n function isArrayLike(value) {\\n return value != null && isLength(value.length) && !isFunction(value);\\n }\\n\\n /**\\n * This method is like `_.isArrayLike` except that it also checks if `value`\\n * is an object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an array-like object,\\n * else `false`.\\n * @example\\n *\\n * _.isArrayLikeObject([1, 2, 3]);\\n * // => true\\n *\\n * _.isArrayLikeObject(document.body.children);\\n * // => true\\n *\\n * _.isArrayLikeObject('abc');\\n * // => false\\n *\\n * _.isArrayLikeObject(_.noop);\\n * // => false\\n */\\n function isArrayLikeObject(value) {\\n return isObjectLike(value) && isArrayLike(value);\\n }\\n\\n /**\\n * Checks if `value` is classified as a boolean primitive or object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\\n * @example\\n *\\n * _.isBoolean(false);\\n * // => true\\n *\\n * _.isBoolean(null);\\n * // => false\\n */\\n function isBoolean(value) {\\n return value === true || value === false ||\\n (isObjectLike(value) && baseGetTag(value) == boolTag);\\n }\\n\\n /**\\n * Checks if `value` is a buffer.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\\n * @example\\n *\\n * _.isBuffer(new Buffer(2));\\n * // => true\\n *\\n * _.isBuffer(new Uint8Array(2));\\n * // => false\\n */\\n var isBuffer = nativeIsBuffer || stubFalse;\\n\\n /**\\n * Checks if `value` is classified as a `Date` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\\n * @example\\n *\\n * _.isDate(new Date);\\n * // => true\\n *\\n * _.isDate('Mon April 23 2012');\\n * // => false\\n */\\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\\n\\n /**\\n * Checks if `value` is likely a DOM element.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\\n * @example\\n *\\n * _.isElement(document.body);\\n * // => true\\n *\\n * _.isElement('<body>');\\n * // => false\\n */\\n function isElement(value) {\\n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\\n }\\n\\n /**\\n * Checks if `value` is an empty object, collection, map, or set.\\n *\\n * Objects are considered empty if they have no own enumerable string keyed\\n * properties.\\n *\\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\\n * jQuery-like collections are considered empty if they have a `length` of `0`.\\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\\n * @example\\n *\\n * _.isEmpty(null);\\n * // => true\\n *\\n * _.isEmpty(true);\\n * // => true\\n *\\n * _.isEmpty(1);\\n * // => true\\n *\\n * _.isEmpty([1, 2, 3]);\\n * // => false\\n *\\n * _.isEmpty({ 'a': 1 });\\n * // => false\\n */\\n function isEmpty(value) {\\n if (value == null) {\\n return true;\\n }\\n if (isArrayLike(value) &&\\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\\n return !value.length;\\n }\\n var tag = getTag(value);\\n if (tag == mapTag || tag == setTag) {\\n return !value.size;\\n }\\n if (isPrototype(value)) {\\n return !baseKeys(value).length;\\n }\\n for (var key in value) {\\n if (hasOwnProperty.call(value, key)) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * Performs a deep comparison between two values to determine if they are\\n * equivalent.\\n *\\n * **Note:** This method supports comparing arrays, array buffers, booleans,\\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\\n * by their own, not inherited, enumerable properties. Functions and DOM\\n * nodes are compared by strict equality, i.e. `===`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\\n * @example\\n *\\n * var object = { 'a': 1 };\\n * var other = { 'a': 1 };\\n *\\n * _.isEqual(object, other);\\n * // => true\\n *\\n * object === other;\\n * // => false\\n */\\n function isEqual(value, other) {\\n return baseIsEqual(value, other);\\n }\\n\\n /**\\n * This method is like `_.isEqual` except that it accepts `customizer` which\\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\\n * are handled by the method instead. The `customizer` is invoked with up to\\n * six arguments: (objValue, othValue [, index|key, object, other, stack]).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @param {Function} [customizer] The function to customize comparisons.\\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\\n * @example\\n *\\n * function isGreeting(value) {\\n * return /^h(?:i|ello)$/.test(value);\\n * }\\n *\\n * function customizer(objValue, othValue) {\\n * if (isGreeting(objValue) && isGreeting(othValue)) {\\n * return true;\\n * }\\n * }\\n *\\n * var array = ['hello', 'goodbye'];\\n * var other = ['hi', 'goodbye'];\\n *\\n * _.isEqualWith(array, other, customizer);\\n * // => true\\n */\\n function isEqualWith(value, other, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n var result = customizer ? customizer(value, other) : undefined;\\n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\\n }\\n\\n /**\\n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\\n * `SyntaxError`, `TypeError`, or `URIError` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\\n * @example\\n *\\n * _.isError(new Error);\\n * // => true\\n *\\n * _.isError(Error);\\n * // => false\\n */\\n function isError(value) {\\n if (!isObjectLike(value)) {\\n return false;\\n }\\n var tag = baseGetTag(value);\\n return tag == errorTag || tag == domExcTag ||\\n (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\\n }\\n\\n /**\\n * Checks if `value` is a finite primitive number.\\n *\\n * **Note:** This method is based on\\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\\n * @example\\n *\\n * _.isFinite(3);\\n * // => true\\n *\\n * _.isFinite(Number.MIN_VALUE);\\n * // => true\\n *\\n * _.isFinite(Infinity);\\n * // => false\\n *\\n * _.isFinite('3');\\n * // => false\\n */\\n function isFinite(value) {\\n return typeof value == 'number' && nativeIsFinite(value);\\n }\\n\\n /**\\n * Checks if `value` is classified as a `Function` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\\n * @example\\n *\\n * _.isFunction(_);\\n * // => true\\n *\\n * _.isFunction(/abc/);\\n * // => false\\n */\\n function isFunction(value) {\\n if (!isObject(value)) {\\n return false;\\n }\\n // The use of `Object#toString` avoids issues with the `typeof` operator\\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\\n var tag = baseGetTag(value);\\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\\n }\\n\\n /**\\n * Checks if `value` is an integer.\\n *\\n * **Note:** This method is based on\\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\\n * @example\\n *\\n * _.isInteger(3);\\n * // => true\\n *\\n * _.isInteger(Number.MIN_VALUE);\\n * // => false\\n *\\n * _.isInteger(Infinity);\\n * // => false\\n *\\n * _.isInteger('3');\\n * // => false\\n */\\n function isInteger(value) {\\n return typeof value == 'number' && value == toInteger(value);\\n }\\n\\n /**\\n * Checks if `value` is a valid array-like length.\\n *\\n * **Note:** This method is loosely based on\\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\\n * @example\\n *\\n * _.isLength(3);\\n * // => true\\n *\\n * _.isLength(Number.MIN_VALUE);\\n * // => false\\n *\\n * _.isLength(Infinity);\\n * // => false\\n *\\n * _.isLength('3');\\n * // => false\\n */\\n function isLength(value) {\\n return typeof value == 'number' &&\\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\\n }\\n\\n /**\\n * Checks if `value` is the\\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\\n * @example\\n *\\n * _.isObject({});\\n * // => true\\n *\\n * _.isObject([1, 2, 3]);\\n * // => true\\n *\\n * _.isObject(_.noop);\\n * // => true\\n *\\n * _.isObject(null);\\n * // => false\\n */\\n function isObject(value) {\\n var type = typeof value;\\n return value != null && (type == 'object' || type == 'function');\\n }\\n\\n /**\\n * Checks if `value` is object-like. A value is object-like if it's not `null`\\n * and has a `typeof` result of \\\"object\\\".\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\\n * @example\\n *\\n * _.isObjectLike({});\\n * // => true\\n *\\n * _.isObjectLike([1, 2, 3]);\\n * // => true\\n *\\n * _.isObjectLike(_.noop);\\n * // => false\\n *\\n * _.isObjectLike(null);\\n * // => false\\n */\\n function isObjectLike(value) {\\n return value != null && typeof value == 'object';\\n }\\n\\n /**\\n * Checks if `value` is classified as a `Map` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\\n * @example\\n *\\n * _.isMap(new Map);\\n * // => true\\n *\\n * _.isMap(new WeakMap);\\n * // => false\\n */\\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\\n\\n /**\\n * Performs a partial deep comparison between `object` and `source` to\\n * determine if `object` contains equivalent property values.\\n *\\n * **Note:** This method is equivalent to `_.matches` when `source` is\\n * partially applied.\\n *\\n * Partial comparisons will match empty array and empty object `source`\\n * values against any array or object value, respectively. See `_.isEqual`\\n * for a list of supported value comparisons.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Lang\\n * @param {Object} object The object to inspect.\\n * @param {Object} source The object of property values to match.\\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': 2 };\\n *\\n * _.isMatch(object, { 'b': 2 });\\n * // => true\\n *\\n * _.isMatch(object, { 'b': 1 });\\n * // => false\\n */\\n function isMatch(object, source) {\\n return object === source || baseIsMatch(object, source, getMatchData(source));\\n }\\n\\n /**\\n * This method is like `_.isMatch` except that it accepts `customizer` which\\n * is invoked to compare values. If `customizer` returns `undefined`, comparisons\\n * are handled by the method instead. The `customizer` is invoked with five\\n * arguments: (objValue, srcValue, index|key, object, source).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {Object} object The object to inspect.\\n * @param {Object} source The object of property values to match.\\n * @param {Function} [customizer] The function to customize comparisons.\\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\\n * @example\\n *\\n * function isGreeting(value) {\\n * return /^h(?:i|ello)$/.test(value);\\n * }\\n *\\n * function customizer(objValue, srcValue) {\\n * if (isGreeting(objValue) && isGreeting(srcValue)) {\\n * return true;\\n * }\\n * }\\n *\\n * var object = { 'greeting': 'hello' };\\n * var source = { 'greeting': 'hi' };\\n *\\n * _.isMatchWith(object, source, customizer);\\n * // => true\\n */\\n function isMatchWith(object, source, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n return baseIsMatch(object, source, getMatchData(source), customizer);\\n }\\n\\n /**\\n * Checks if `value` is `NaN`.\\n *\\n * **Note:** This method is based on\\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\\n * `undefined` and other non-number values.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\\n * @example\\n *\\n * _.isNaN(NaN);\\n * // => true\\n *\\n * _.isNaN(new Number(NaN));\\n * // => true\\n *\\n * isNaN(undefined);\\n * // => true\\n *\\n * _.isNaN(undefined);\\n * // => false\\n */\\n function isNaN(value) {\\n // An `NaN` primitive is the only value that is not equal to itself.\\n // Perform the `toStringTag` check first to avoid errors with some\\n // ActiveX objects in IE.\\n return isNumber(value) && value != +value;\\n }\\n\\n /**\\n * Checks if `value` is a pristine native function.\\n *\\n * **Note:** This method can't reliably detect native functions in the presence\\n * of the core-js package because core-js circumvents this kind of detection.\\n * Despite multiple requests, the core-js maintainer has made it clear: any\\n * attempt to fix the detection will be obstructed. As a result, we're left\\n * with little choice but to throw an error. Unfortunately, this also affects\\n * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\\n * which rely on core-js.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a native function,\\n * else `false`.\\n * @example\\n *\\n * _.isNative(Array.prototype.push);\\n * // => true\\n *\\n * _.isNative(_);\\n * // => false\\n */\\n function isNative(value) {\\n if (isMaskable(value)) {\\n throw new Error(CORE_ERROR_TEXT);\\n }\\n return baseIsNative(value);\\n }\\n\\n /**\\n * Checks if `value` is `null`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\\n * @example\\n *\\n * _.isNull(null);\\n * // => true\\n *\\n * _.isNull(void 0);\\n * // => false\\n */\\n function isNull(value) {\\n return value === null;\\n }\\n\\n /**\\n * Checks if `value` is `null` or `undefined`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\\n * @example\\n *\\n * _.isNil(null);\\n * // => true\\n *\\n * _.isNil(void 0);\\n * // => true\\n *\\n * _.isNil(NaN);\\n * // => false\\n */\\n function isNil(value) {\\n return value == null;\\n }\\n\\n /**\\n * Checks if `value` is classified as a `Number` primitive or object.\\n *\\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\\n * classified as numbers, use the `_.isFinite` method.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\\n * @example\\n *\\n * _.isNumber(3);\\n * // => true\\n *\\n * _.isNumber(Number.MIN_VALUE);\\n * // => true\\n *\\n * _.isNumber(Infinity);\\n * // => true\\n *\\n * _.isNumber('3');\\n * // => false\\n */\\n function isNumber(value) {\\n return typeof value == 'number' ||\\n (isObjectLike(value) && baseGetTag(value) == numberTag);\\n }\\n\\n /**\\n * Checks if `value` is a plain object, that is, an object created by the\\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.8.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * }\\n *\\n * _.isPlainObject(new Foo);\\n * // => false\\n *\\n * _.isPlainObject([1, 2, 3]);\\n * // => false\\n *\\n * _.isPlainObject({ 'x': 0, 'y': 0 });\\n * // => true\\n *\\n * _.isPlainObject(Object.create(null));\\n * // => true\\n */\\n function isPlainObject(value) {\\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\\n return false;\\n }\\n var proto = getPrototype(value);\\n if (proto === null) {\\n return true;\\n }\\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\\n funcToString.call(Ctor) == objectCtorString;\\n }\\n\\n /**\\n * Checks if `value` is classified as a `RegExp` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.1.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\\n * @example\\n *\\n * _.isRegExp(/abc/);\\n * // => true\\n *\\n * _.isRegExp('/abc/');\\n * // => false\\n */\\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\\n\\n /**\\n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\\n * double precision number which isn't the result of a rounded unsafe integer.\\n *\\n * **Note:** This method is based on\\n * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\\n * @example\\n *\\n * _.isSafeInteger(3);\\n * // => true\\n *\\n * _.isSafeInteger(Number.MIN_VALUE);\\n * // => false\\n *\\n * _.isSafeInteger(Infinity);\\n * // => false\\n *\\n * _.isSafeInteger('3');\\n * // => false\\n */\\n function isSafeInteger(value) {\\n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\\n }\\n\\n /**\\n * Checks if `value` is classified as a `Set` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\\n * @example\\n *\\n * _.isSet(new Set);\\n * // => true\\n *\\n * _.isSet(new WeakSet);\\n * // => false\\n */\\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\\n\\n /**\\n * Checks if `value` is classified as a `String` primitive or object.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\\n * @example\\n *\\n * _.isString('abc');\\n * // => true\\n *\\n * _.isString(1);\\n * // => false\\n */\\n function isString(value) {\\n return typeof value == 'string' ||\\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\\n }\\n\\n /**\\n * Checks if `value` is classified as a `Symbol` primitive or object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\\n * @example\\n *\\n * _.isSymbol(Symbol.iterator);\\n * // => true\\n *\\n * _.isSymbol('abc');\\n * // => false\\n */\\n function isSymbol(value) {\\n return typeof value == 'symbol' ||\\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\\n }\\n\\n /**\\n * Checks if `value` is classified as a typed array.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\\n * @example\\n *\\n * _.isTypedArray(new Uint8Array);\\n * // => true\\n *\\n * _.isTypedArray([]);\\n * // => false\\n */\\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\\n\\n /**\\n * Checks if `value` is `undefined`.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\\n * @example\\n *\\n * _.isUndefined(void 0);\\n * // => true\\n *\\n * _.isUndefined(null);\\n * // => false\\n */\\n function isUndefined(value) {\\n return value === undefined;\\n }\\n\\n /**\\n * Checks if `value` is classified as a `WeakMap` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\\n * @example\\n *\\n * _.isWeakMap(new WeakMap);\\n * // => true\\n *\\n * _.isWeakMap(new Map);\\n * // => false\\n */\\n function isWeakMap(value) {\\n return isObjectLike(value) && getTag(value) == weakMapTag;\\n }\\n\\n /**\\n * Checks if `value` is classified as a `WeakSet` object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.3.0\\n * @category Lang\\n * @param {*} value The value to check.\\n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\\n * @example\\n *\\n * _.isWeakSet(new WeakSet);\\n * // => true\\n *\\n * _.isWeakSet(new Set);\\n * // => false\\n */\\n function isWeakSet(value) {\\n return isObjectLike(value) && baseGetTag(value) == weakSetTag;\\n }\\n\\n /**\\n * Checks if `value` is less than `other`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.9.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is less than `other`,\\n * else `false`.\\n * @see _.gt\\n * @example\\n *\\n * _.lt(1, 3);\\n * // => true\\n *\\n * _.lt(3, 3);\\n * // => false\\n *\\n * _.lt(3, 1);\\n * // => false\\n */\\n var lt = createRelationalOperation(baseLt);\\n\\n /**\\n * Checks if `value` is less than or equal to `other`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.9.0\\n * @category Lang\\n * @param {*} value The value to compare.\\n * @param {*} other The other value to compare.\\n * @returns {boolean} Returns `true` if `value` is less than or equal to\\n * `other`, else `false`.\\n * @see _.gte\\n * @example\\n *\\n * _.lte(1, 3);\\n * // => true\\n *\\n * _.lte(3, 3);\\n * // => true\\n *\\n * _.lte(3, 1);\\n * // => false\\n */\\n var lte = createRelationalOperation(function(value, other) {\\n return value <= other;\\n });\\n\\n /**\\n * Converts `value` to an array.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {Array} Returns the converted array.\\n * @example\\n *\\n * _.toArray({ 'a': 1, 'b': 2 });\\n * // => [1, 2]\\n *\\n * _.toArray('abc');\\n * // => ['a', 'b', 'c']\\n *\\n * _.toArray(1);\\n * // => []\\n *\\n * _.toArray(null);\\n * // => []\\n */\\n function toArray(value) {\\n if (!value) {\\n return [];\\n }\\n if (isArrayLike(value)) {\\n return isString(value) ? stringToArray(value) : copyArray(value);\\n }\\n if (symIterator && value[symIterator]) {\\n return iteratorToArray(value[symIterator]());\\n }\\n var tag = getTag(value),\\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\\n\\n return func(value);\\n }\\n\\n /**\\n * Converts `value` to a finite number.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.12.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {number} Returns the converted number.\\n * @example\\n *\\n * _.toFinite(3.2);\\n * // => 3.2\\n *\\n * _.toFinite(Number.MIN_VALUE);\\n * // => 5e-324\\n *\\n * _.toFinite(Infinity);\\n * // => 1.7976931348623157e+308\\n *\\n * _.toFinite('3.2');\\n * // => 3.2\\n */\\n function toFinite(value) {\\n if (!value) {\\n return value === 0 ? value : 0;\\n }\\n value = toNumber(value);\\n if (value === INFINITY || value === -INFINITY) {\\n var sign = (value < 0 ? -1 : 1);\\n return sign * MAX_INTEGER;\\n }\\n return value === value ? value : 0;\\n }\\n\\n /**\\n * Converts `value` to an integer.\\n *\\n * **Note:** This method is loosely based on\\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {number} Returns the converted integer.\\n * @example\\n *\\n * _.toInteger(3.2);\\n * // => 3\\n *\\n * _.toInteger(Number.MIN_VALUE);\\n * // => 0\\n *\\n * _.toInteger(Infinity);\\n * // => 1.7976931348623157e+308\\n *\\n * _.toInteger('3.2');\\n * // => 3\\n */\\n function toInteger(value) {\\n var result = toFinite(value),\\n remainder = result % 1;\\n\\n return result === result ? (remainder ? result - remainder : result) : 0;\\n }\\n\\n /**\\n * Converts `value` to an integer suitable for use as the length of an\\n * array-like object.\\n *\\n * **Note:** This method is based on\\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {number} Returns the converted integer.\\n * @example\\n *\\n * _.toLength(3.2);\\n * // => 3\\n *\\n * _.toLength(Number.MIN_VALUE);\\n * // => 0\\n *\\n * _.toLength(Infinity);\\n * // => 4294967295\\n *\\n * _.toLength('3.2');\\n * // => 3\\n */\\n function toLength(value) {\\n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\\n }\\n\\n /**\\n * Converts `value` to a number.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to process.\\n * @returns {number} Returns the number.\\n * @example\\n *\\n * _.toNumber(3.2);\\n * // => 3.2\\n *\\n * _.toNumber(Number.MIN_VALUE);\\n * // => 5e-324\\n *\\n * _.toNumber(Infinity);\\n * // => Infinity\\n *\\n * _.toNumber('3.2');\\n * // => 3.2\\n */\\n function toNumber(value) {\\n if (typeof value == 'number') {\\n return value;\\n }\\n if (isSymbol(value)) {\\n return NAN;\\n }\\n if (isObject(value)) {\\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\\n value = isObject(other) ? (other + '') : other;\\n }\\n if (typeof value != 'string') {\\n return value === 0 ? value : +value;\\n }\\n value = value.replace(reTrim, '');\\n var isBinary = reIsBinary.test(value);\\n return (isBinary || reIsOctal.test(value))\\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\\n : (reIsBadHex.test(value) ? NAN : +value);\\n }\\n\\n /**\\n * Converts `value` to a plain object flattening inherited enumerable string\\n * keyed properties of `value` to own properties of the plain object.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {Object} Returns the converted plain object.\\n * @example\\n *\\n * function Foo() {\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.assign({ 'a': 1 }, new Foo);\\n * // => { 'a': 1, 'b': 2 }\\n *\\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\\n * // => { 'a': 1, 'b': 2, 'c': 3 }\\n */\\n function toPlainObject(value) {\\n return copyObject(value, keysIn(value));\\n }\\n\\n /**\\n * Converts `value` to a safe integer. A safe integer can be compared and\\n * represented correctly.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {number} Returns the converted integer.\\n * @example\\n *\\n * _.toSafeInteger(3.2);\\n * // => 3\\n *\\n * _.toSafeInteger(Number.MIN_VALUE);\\n * // => 0\\n *\\n * _.toSafeInteger(Infinity);\\n * // => 9007199254740991\\n *\\n * _.toSafeInteger('3.2');\\n * // => 3\\n */\\n function toSafeInteger(value) {\\n return value\\n ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\\n : (value === 0 ? value : 0);\\n }\\n\\n /**\\n * Converts `value` to a string. An empty string is returned for `null`\\n * and `undefined` values. The sign of `-0` is preserved.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Lang\\n * @param {*} value The value to convert.\\n * @returns {string} Returns the converted string.\\n * @example\\n *\\n * _.toString(null);\\n * // => ''\\n *\\n * _.toString(-0);\\n * // => '-0'\\n *\\n * _.toString([1, 2, 3]);\\n * // => '1,2,3'\\n */\\n function toString(value) {\\n return value == null ? '' : baseToString(value);\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Assigns own enumerable string keyed properties of source objects to the\\n * destination object. Source objects are applied from left to right.\\n * Subsequent sources overwrite property assignments of previous sources.\\n *\\n * **Note:** This method mutates `object` and is loosely based on\\n * [`Object.assign`](https://mdn.io/Object/assign).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.10.0\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} [sources] The source objects.\\n * @returns {Object} Returns `object`.\\n * @see _.assignIn\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * }\\n *\\n * function Bar() {\\n * this.c = 3;\\n * }\\n *\\n * Foo.prototype.b = 2;\\n * Bar.prototype.d = 4;\\n *\\n * _.assign({ 'a': 0 }, new Foo, new Bar);\\n * // => { 'a': 1, 'c': 3 }\\n */\\n var assign = createAssigner(function(object, source) {\\n if (isPrototype(source) || isArrayLike(source)) {\\n copyObject(source, keys(source), object);\\n return;\\n }\\n for (var key in source) {\\n if (hasOwnProperty.call(source, key)) {\\n assignValue(object, key, source[key]);\\n }\\n }\\n });\\n\\n /**\\n * This method is like `_.assign` except that it iterates over own and\\n * inherited source properties.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @alias extend\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} [sources] The source objects.\\n * @returns {Object} Returns `object`.\\n * @see _.assign\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * }\\n *\\n * function Bar() {\\n * this.c = 3;\\n * }\\n *\\n * Foo.prototype.b = 2;\\n * Bar.prototype.d = 4;\\n *\\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\\n */\\n var assignIn = createAssigner(function(object, source) {\\n copyObject(source, keysIn(source), object);\\n });\\n\\n /**\\n * This method is like `_.assignIn` except that it accepts `customizer`\\n * which is invoked to produce the assigned values. If `customizer` returns\\n * `undefined`, assignment is handled by the method instead. The `customizer`\\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @alias extendWith\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} sources The source objects.\\n * @param {Function} [customizer] The function to customize assigned values.\\n * @returns {Object} Returns `object`.\\n * @see _.assignWith\\n * @example\\n *\\n * function customizer(objValue, srcValue) {\\n * return _.isUndefined(objValue) ? srcValue : objValue;\\n * }\\n *\\n * var defaults = _.partialRight(_.assignInWith, customizer);\\n *\\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\\n * // => { 'a': 1, 'b': 2 }\\n */\\n var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\\n copyObject(source, keysIn(source), object, customizer);\\n });\\n\\n /**\\n * This method is like `_.assign` except that it accepts `customizer`\\n * which is invoked to produce the assigned values. If `customizer` returns\\n * `undefined`, assignment is handled by the method instead. The `customizer`\\n * is invoked with five arguments: (objValue, srcValue, key, object, source).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} sources The source objects.\\n * @param {Function} [customizer] The function to customize assigned values.\\n * @returns {Object} Returns `object`.\\n * @see _.assignInWith\\n * @example\\n *\\n * function customizer(objValue, srcValue) {\\n * return _.isUndefined(objValue) ? srcValue : objValue;\\n * }\\n *\\n * var defaults = _.partialRight(_.assignWith, customizer);\\n *\\n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\\n * // => { 'a': 1, 'b': 2 }\\n */\\n var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\\n copyObject(source, keys(source), object, customizer);\\n });\\n\\n /**\\n * Creates an array of values corresponding to `paths` of `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.0.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {...(string|string[])} [paths] The property paths to pick.\\n * @returns {Array} Returns the picked values.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\\n *\\n * _.at(object, ['a[0].b.c', 'a[1]']);\\n * // => [3, 4]\\n */\\n var at = flatRest(baseAt);\\n\\n /**\\n * Creates an object that inherits from the `prototype` object. If a\\n * `properties` object is given, its own enumerable string keyed properties\\n * are assigned to the created object.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.3.0\\n * @category Object\\n * @param {Object} prototype The object to inherit from.\\n * @param {Object} [properties] The properties to assign to the object.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * function Shape() {\\n * this.x = 0;\\n * this.y = 0;\\n * }\\n *\\n * function Circle() {\\n * Shape.call(this);\\n * }\\n *\\n * Circle.prototype = _.create(Shape.prototype, {\\n * 'constructor': Circle\\n * });\\n *\\n * var circle = new Circle;\\n * circle instanceof Circle;\\n * // => true\\n *\\n * circle instanceof Shape;\\n * // => true\\n */\\n function create(prototype, properties) {\\n var result = baseCreate(prototype);\\n return properties == null ? result : baseAssign(result, properties);\\n }\\n\\n /**\\n * Assigns own and inherited enumerable string keyed properties of source\\n * objects to the destination object for all destination properties that\\n * resolve to `undefined`. Source objects are applied from left to right.\\n * Once a property is set, additional values of the same property are ignored.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} [sources] The source objects.\\n * @returns {Object} Returns `object`.\\n * @see _.defaultsDeep\\n * @example\\n *\\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\\n * // => { 'a': 1, 'b': 2 }\\n */\\n var defaults = baseRest(function(args) {\\n args.push(undefined, customDefaultsAssignIn);\\n return apply(assignInWith, undefined, args);\\n });\\n\\n /**\\n * This method is like `_.defaults` except that it recursively assigns\\n * default properties.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.10.0\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} [sources] The source objects.\\n * @returns {Object} Returns `object`.\\n * @see _.defaults\\n * @example\\n *\\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\\n * // => { 'a': { 'b': 2, 'c': 3 } }\\n */\\n var defaultsDeep = baseRest(function(args) {\\n args.push(undefined, customDefaultsMerge);\\n return apply(mergeWith, undefined, args);\\n });\\n\\n /**\\n * This method is like `_.find` except that it returns the key of the first\\n * element `predicate` returns truthy for instead of the element itself.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.1.0\\n * @category Object\\n * @param {Object} object The object to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {string|undefined} Returns the key of the matched element,\\n * else `undefined`.\\n * @example\\n *\\n * var users = {\\n * 'barney': { 'age': 36, 'active': true },\\n * 'fred': { 'age': 40, 'active': false },\\n * 'pebbles': { 'age': 1, 'active': true }\\n * };\\n *\\n * _.findKey(users, function(o) { return o.age < 40; });\\n * // => 'barney' (iteration order is not guaranteed)\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.findKey(users, { 'age': 1, 'active': true });\\n * // => 'pebbles'\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.findKey(users, ['active', false]);\\n * // => 'fred'\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.findKey(users, 'active');\\n * // => 'barney'\\n */\\n function findKey(object, predicate) {\\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\\n }\\n\\n /**\\n * This method is like `_.findKey` except that it iterates over elements of\\n * a collection in the opposite order.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Object\\n * @param {Object} object The object to inspect.\\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\\n * @returns {string|undefined} Returns the key of the matched element,\\n * else `undefined`.\\n * @example\\n *\\n * var users = {\\n * 'barney': { 'age': 36, 'active': true },\\n * 'fred': { 'age': 40, 'active': false },\\n * 'pebbles': { 'age': 1, 'active': true }\\n * };\\n *\\n * _.findLastKey(users, function(o) { return o.age < 40; });\\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.findLastKey(users, { 'age': 36, 'active': true });\\n * // => 'barney'\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.findLastKey(users, ['active', false]);\\n * // => 'fred'\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.findLastKey(users, 'active');\\n * // => 'pebbles'\\n */\\n function findLastKey(object, predicate) {\\n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\\n }\\n\\n /**\\n * Iterates over own and inherited enumerable string keyed properties of an\\n * object and invokes `iteratee` for each property. The iteratee is invoked\\n * with three arguments: (value, key, object). Iteratee functions may exit\\n * iteration early by explicitly returning `false`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.3.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n * @see _.forInRight\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.forIn(new Foo, function(value, key) {\\n * console.log(key);\\n * });\\n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\\n */\\n function forIn(object, iteratee) {\\n return object == null\\n ? object\\n : baseFor(object, getIteratee(iteratee, 3), keysIn);\\n }\\n\\n /**\\n * This method is like `_.forIn` except that it iterates over properties of\\n * `object` in the opposite order.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n * @see _.forIn\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.forInRight(new Foo, function(value, key) {\\n * console.log(key);\\n * });\\n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\\n */\\n function forInRight(object, iteratee) {\\n return object == null\\n ? object\\n : baseForRight(object, getIteratee(iteratee, 3), keysIn);\\n }\\n\\n /**\\n * Iterates over own enumerable string keyed properties of an object and\\n * invokes `iteratee` for each property. The iteratee is invoked with three\\n * arguments: (value, key, object). Iteratee functions may exit iteration\\n * early by explicitly returning `false`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.3.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n * @see _.forOwnRight\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.forOwn(new Foo, function(value, key) {\\n * console.log(key);\\n * });\\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\\n */\\n function forOwn(object, iteratee) {\\n return object && baseForOwn(object, getIteratee(iteratee, 3));\\n }\\n\\n /**\\n * This method is like `_.forOwn` except that it iterates over properties of\\n * `object` in the opposite order.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.0.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns `object`.\\n * @see _.forOwn\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.forOwnRight(new Foo, function(value, key) {\\n * console.log(key);\\n * });\\n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\\n */\\n function forOwnRight(object, iteratee) {\\n return object && baseForOwnRight(object, getIteratee(iteratee, 3));\\n }\\n\\n /**\\n * Creates an array of function property names from own enumerable properties\\n * of `object`.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The object to inspect.\\n * @returns {Array} Returns the function names.\\n * @see _.functionsIn\\n * @example\\n *\\n * function Foo() {\\n * this.a = _.constant('a');\\n * this.b = _.constant('b');\\n * }\\n *\\n * Foo.prototype.c = _.constant('c');\\n *\\n * _.functions(new Foo);\\n * // => ['a', 'b']\\n */\\n function functions(object) {\\n return object == null ? [] : baseFunctions(object, keys(object));\\n }\\n\\n /**\\n * Creates an array of function property names from own and inherited\\n * enumerable properties of `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The object to inspect.\\n * @returns {Array} Returns the function names.\\n * @see _.functions\\n * @example\\n *\\n * function Foo() {\\n * this.a = _.constant('a');\\n * this.b = _.constant('b');\\n * }\\n *\\n * Foo.prototype.c = _.constant('c');\\n *\\n * _.functionsIn(new Foo);\\n * // => ['a', 'b', 'c']\\n */\\n function functionsIn(object) {\\n return object == null ? [] : baseFunctions(object, keysIn(object));\\n }\\n\\n /**\\n * Gets the value at `path` of `object`. If the resolved value is\\n * `undefined`, the `defaultValue` is returned in its place.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.7.0\\n * @category Object\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path of the property to get.\\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\\n * @returns {*} Returns the resolved value.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\\n *\\n * _.get(object, 'a[0].b.c');\\n * // => 3\\n *\\n * _.get(object, ['a', '0', 'b', 'c']);\\n * // => 3\\n *\\n * _.get(object, 'a.b.c', 'default');\\n * // => 'default'\\n */\\n function get(object, path, defaultValue) {\\n var result = object == null ? undefined : baseGet(object, path);\\n return result === undefined ? defaultValue : result;\\n }\\n\\n /**\\n * Checks if `path` is a direct property of `object`.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path to check.\\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\\n * @example\\n *\\n * var object = { 'a': { 'b': 2 } };\\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\\n *\\n * _.has(object, 'a');\\n * // => true\\n *\\n * _.has(object, 'a.b');\\n * // => true\\n *\\n * _.has(object, ['a', 'b']);\\n * // => true\\n *\\n * _.has(other, 'a');\\n * // => false\\n */\\n function has(object, path) {\\n return object != null && hasPath(object, path, baseHas);\\n }\\n\\n /**\\n * Checks if `path` is a direct or inherited property of `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path to check.\\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\\n * @example\\n *\\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\\n *\\n * _.hasIn(object, 'a');\\n * // => true\\n *\\n * _.hasIn(object, 'a.b');\\n * // => true\\n *\\n * _.hasIn(object, ['a', 'b']);\\n * // => true\\n *\\n * _.hasIn(object, 'b');\\n * // => false\\n */\\n function hasIn(object, path) {\\n return object != null && hasPath(object, path, baseHasIn);\\n }\\n\\n /**\\n * Creates an object composed of the inverted keys and values of `object`.\\n * If `object` contains duplicate values, subsequent values overwrite\\n * property assignments of previous values.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.7.0\\n * @category Object\\n * @param {Object} object The object to invert.\\n * @returns {Object} Returns the new inverted object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\\n *\\n * _.invert(object);\\n * // => { '1': 'c', '2': 'b' }\\n */\\n var invert = createInverter(function(result, value, key) {\\n result[value] = key;\\n }, constant(identity));\\n\\n /**\\n * This method is like `_.invert` except that the inverted object is generated\\n * from the results of running each element of `object` thru `iteratee`. The\\n * corresponding inverted value of each inverted key is an array of keys\\n * responsible for generating the inverted value. The iteratee is invoked\\n * with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.1.0\\n * @category Object\\n * @param {Object} object The object to invert.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {Object} Returns the new inverted object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\\n *\\n * _.invertBy(object);\\n * // => { '1': ['a', 'c'], '2': ['b'] }\\n *\\n * _.invertBy(object, function(value) {\\n * return 'group' + value;\\n * });\\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\\n */\\n var invertBy = createInverter(function(result, value, key) {\\n if (hasOwnProperty.call(result, value)) {\\n result[value].push(key);\\n } else {\\n result[value] = [key];\\n }\\n }, getIteratee);\\n\\n /**\\n * Invokes the method at `path` of `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path of the method to invoke.\\n * @param {...*} [args] The arguments to invoke the method with.\\n * @returns {*} Returns the result of the invoked method.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\\n *\\n * _.invoke(object, 'a[0].b.c.slice', 1, 3);\\n * // => [2, 3]\\n */\\n var invoke = baseRest(baseInvoke);\\n\\n /**\\n * Creates an array of the own enumerable property names of `object`.\\n *\\n * **Note:** Non-object values are coerced to objects. See the\\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\\n * for more details.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.keys(new Foo);\\n * // => ['a', 'b'] (iteration order is not guaranteed)\\n *\\n * _.keys('hi');\\n * // => ['0', '1']\\n */\\n function keys(object) {\\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\\n }\\n\\n /**\\n * Creates an array of the own and inherited enumerable property names of `object`.\\n *\\n * **Note:** Non-object values are coerced to objects.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property names.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.keysIn(new Foo);\\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\\n */\\n function keysIn(object) {\\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\\n }\\n\\n /**\\n * The opposite of `_.mapValues`; this method creates an object with the\\n * same values as `object` and keys generated by running each own enumerable\\n * string keyed property of `object` thru `iteratee`. The iteratee is invoked\\n * with three arguments: (value, key, object).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.8.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns the new mapped object.\\n * @see _.mapValues\\n * @example\\n *\\n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\\n * return key + value;\\n * });\\n * // => { 'a1': 1, 'b2': 2 }\\n */\\n function mapKeys(object, iteratee) {\\n var result = {};\\n iteratee = getIteratee(iteratee, 3);\\n\\n baseForOwn(object, function(value, key, object) {\\n baseAssignValue(result, iteratee(value, key, object), value);\\n });\\n return result;\\n }\\n\\n /**\\n * Creates an object with the same keys as `object` and values generated\\n * by running each own enumerable string keyed property of `object` thru\\n * `iteratee`. The iteratee is invoked with three arguments:\\n * (value, key, object).\\n *\\n * @static\\n * @memberOf _\\n * @since 2.4.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Object} Returns the new mapped object.\\n * @see _.mapKeys\\n * @example\\n *\\n * var users = {\\n * 'fred': { 'user': 'fred', 'age': 40 },\\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\\n * };\\n *\\n * _.mapValues(users, function(o) { return o.age; });\\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.mapValues(users, 'age');\\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\\n */\\n function mapValues(object, iteratee) {\\n var result = {};\\n iteratee = getIteratee(iteratee, 3);\\n\\n baseForOwn(object, function(value, key, object) {\\n baseAssignValue(result, key, iteratee(value, key, object));\\n });\\n return result;\\n }\\n\\n /**\\n * This method is like `_.assign` except that it recursively merges own and\\n * inherited enumerable string keyed properties of source objects into the\\n * destination object. Source properties that resolve to `undefined` are\\n * skipped if a destination value exists. Array and plain object properties\\n * are merged recursively. Other objects and value types are overridden by\\n * assignment. Source objects are applied from left to right. Subsequent\\n * sources overwrite property assignments of previous sources.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.5.0\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} [sources] The source objects.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var object = {\\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\\n * };\\n *\\n * var other = {\\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\\n * };\\n *\\n * _.merge(object, other);\\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\\n */\\n var merge = createAssigner(function(object, source, srcIndex) {\\n baseMerge(object, source, srcIndex);\\n });\\n\\n /**\\n * This method is like `_.merge` except that it accepts `customizer` which\\n * is invoked to produce the merged values of the destination and source\\n * properties. If `customizer` returns `undefined`, merging is handled by the\\n * method instead. The `customizer` is invoked with six arguments:\\n * (objValue, srcValue, key, object, source, stack).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The destination object.\\n * @param {...Object} sources The source objects.\\n * @param {Function} customizer The function to customize assigned values.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * function customizer(objValue, srcValue) {\\n * if (_.isArray(objValue)) {\\n * return objValue.concat(srcValue);\\n * }\\n * }\\n *\\n * var object = { 'a': [1], 'b': [2] };\\n * var other = { 'a': [3], 'b': [4] };\\n *\\n * _.mergeWith(object, other, customizer);\\n * // => { 'a': [1, 3], 'b': [2, 4] }\\n */\\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\\n baseMerge(object, source, srcIndex, customizer);\\n });\\n\\n /**\\n * The opposite of `_.pick`; this method creates an object composed of the\\n * own and inherited enumerable property paths of `object` that are not omitted.\\n *\\n * **Note:** This method is considerably slower than `_.pick`.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The source object.\\n * @param {...(string|string[])} [paths] The property paths to omit.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\\n *\\n * _.omit(object, ['a', 'c']);\\n * // => { 'b': '2' }\\n */\\n var omit = flatRest(function(object, paths) {\\n var result = {};\\n if (object == null) {\\n return result;\\n }\\n var isDeep = false;\\n paths = arrayMap(paths, function(path) {\\n path = castPath(path, object);\\n isDeep || (isDeep = path.length > 1);\\n return path;\\n });\\n copyObject(object, getAllKeysIn(object), result);\\n if (isDeep) {\\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\\n }\\n var length = paths.length;\\n while (length--) {\\n baseUnset(result, paths[length]);\\n }\\n return result;\\n });\\n\\n /**\\n * The opposite of `_.pickBy`; this method creates an object composed of\\n * the own and inherited enumerable string keyed properties of `object` that\\n * `predicate` doesn't return truthy for. The predicate is invoked with two\\n * arguments: (value, key).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The source object.\\n * @param {Function} [predicate=_.identity] The function invoked per property.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\\n *\\n * _.omitBy(object, _.isNumber);\\n * // => { 'b': '2' }\\n */\\n function omitBy(object, predicate) {\\n return pickBy(object, negate(getIteratee(predicate)));\\n }\\n\\n /**\\n * Creates an object composed of the picked `object` properties.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The source object.\\n * @param {...(string|string[])} [paths] The property paths to pick.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\\n *\\n * _.pick(object, ['a', 'c']);\\n * // => { 'a': 1, 'c': 3 }\\n */\\n var pick = flatRest(function(object, paths) {\\n return object == null ? {} : basePick(object, paths);\\n });\\n\\n /**\\n * Creates an object composed of the `object` properties `predicate` returns\\n * truthy for. The predicate is invoked with two arguments: (value, key).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The source object.\\n * @param {Function} [predicate=_.identity] The function invoked per property.\\n * @returns {Object} Returns the new object.\\n * @example\\n *\\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\\n *\\n * _.pickBy(object, _.isNumber);\\n * // => { 'a': 1, 'c': 3 }\\n */\\n function pickBy(object, predicate) {\\n if (object == null) {\\n return {};\\n }\\n var props = arrayMap(getAllKeysIn(object), function(prop) {\\n return [prop];\\n });\\n predicate = getIteratee(predicate);\\n return basePickBy(object, props, function(value, path) {\\n return predicate(value, path[0]);\\n });\\n }\\n\\n /**\\n * This method is like `_.get` except that if the resolved value is a\\n * function it's invoked with the `this` binding of its parent object and\\n * its result is returned.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The object to query.\\n * @param {Array|string} path The path of the property to resolve.\\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\\n * @returns {*} Returns the resolved value.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\\n *\\n * _.result(object, 'a[0].b.c1');\\n * // => 3\\n *\\n * _.result(object, 'a[0].b.c2');\\n * // => 4\\n *\\n * _.result(object, 'a[0].b.c3', 'default');\\n * // => 'default'\\n *\\n * _.result(object, 'a[0].b.c3', _.constant('default'));\\n * // => 'default'\\n */\\n function result(object, path, defaultValue) {\\n path = castPath(path, object);\\n\\n var index = -1,\\n length = path.length;\\n\\n // Ensure the loop is entered when path is empty.\\n if (!length) {\\n length = 1;\\n object = undefined;\\n }\\n while (++index < length) {\\n var value = object == null ? undefined : object[toKey(path[index])];\\n if (value === undefined) {\\n index = length;\\n value = defaultValue;\\n }\\n object = isFunction(value) ? value.call(object) : value;\\n }\\n return object;\\n }\\n\\n /**\\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\\n * it's created. Arrays are created for missing index properties while objects\\n * are created for all other missing properties. Use `_.setWith` to customize\\n * `path` creation.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.7.0\\n * @category Object\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to set.\\n * @param {*} value The value to set.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\\n *\\n * _.set(object, 'a[0].b.c', 4);\\n * console.log(object.a[0].b.c);\\n * // => 4\\n *\\n * _.set(object, ['x', '0', 'y', 'z'], 5);\\n * console.log(object.x[0].y.z);\\n * // => 5\\n */\\n function set(object, path, value) {\\n return object == null ? object : baseSet(object, path, value);\\n }\\n\\n /**\\n * This method is like `_.set` except that it accepts `customizer` which is\\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\\n * path creation is handled by the method instead. The `customizer` is invoked\\n * with three arguments: (nsValue, key, nsObject).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to set.\\n * @param {*} value The value to set.\\n * @param {Function} [customizer] The function to customize assigned values.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var object = {};\\n *\\n * _.setWith(object, '[0][1]', 'a', Object);\\n * // => { '0': { '1': 'a' } }\\n */\\n function setWith(object, path, value, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n return object == null ? object : baseSet(object, path, value, customizer);\\n }\\n\\n /**\\n * Creates an array of own enumerable string keyed-value pairs for `object`\\n * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\\n * entries are returned.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @alias entries\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the key-value pairs.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.toPairs(new Foo);\\n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\\n */\\n var toPairs = createToPairs(keys);\\n\\n /**\\n * Creates an array of own and inherited enumerable string keyed-value pairs\\n * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\\n * or set, its entries are returned.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @alias entriesIn\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the key-value pairs.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.toPairsIn(new Foo);\\n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\\n */\\n var toPairsIn = createToPairs(keysIn);\\n\\n /**\\n * An alternative to `_.reduce`; this method transforms `object` to a new\\n * `accumulator` object which is the result of running each of its own\\n * enumerable string keyed properties thru `iteratee`, with each invocation\\n * potentially mutating the `accumulator` object. If `accumulator` is not\\n * provided, a new object with the same `[[Prototype]]` will be used. The\\n * iteratee is invoked with four arguments: (accumulator, value, key, object).\\n * Iteratee functions may exit iteration early by explicitly returning `false`.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.3.0\\n * @category Object\\n * @param {Object} object The object to iterate over.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @param {*} [accumulator] The custom accumulator value.\\n * @returns {*} Returns the accumulated value.\\n * @example\\n *\\n * _.transform([2, 3, 4], function(result, n) {\\n * result.push(n *= n);\\n * return n % 2 == 0;\\n * }, []);\\n * // => [4, 9]\\n *\\n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\\n * (result[value] || (result[value] = [])).push(key);\\n * }, {});\\n * // => { '1': ['a', 'c'], '2': ['b'] }\\n */\\n function transform(object, iteratee, accumulator) {\\n var isArr = isArray(object),\\n isArrLike = isArr || isBuffer(object) || isTypedArray(object);\\n\\n iteratee = getIteratee(iteratee, 4);\\n if (accumulator == null) {\\n var Ctor = object && object.constructor;\\n if (isArrLike) {\\n accumulator = isArr ? new Ctor : [];\\n }\\n else if (isObject(object)) {\\n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\\n }\\n else {\\n accumulator = {};\\n }\\n }\\n (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\\n return iteratee(accumulator, value, index, object);\\n });\\n return accumulator;\\n }\\n\\n /**\\n * Removes the property at `path` of `object`.\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Object\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to unset.\\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 7 } }] };\\n * _.unset(object, 'a[0].b.c');\\n * // => true\\n *\\n * console.log(object);\\n * // => { 'a': [{ 'b': {} }] };\\n *\\n * _.unset(object, ['a', '0', 'b', 'c']);\\n * // => true\\n *\\n * console.log(object);\\n * // => { 'a': [{ 'b': {} }] };\\n */\\n function unset(object, path) {\\n return object == null ? true : baseUnset(object, path);\\n }\\n\\n /**\\n * This method is like `_.set` except that accepts `updater` to produce the\\n * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\\n * is invoked with one argument: (value).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.6.0\\n * @category Object\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to set.\\n * @param {Function} updater The function to produce the updated value.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\\n *\\n * _.update(object, 'a[0].b.c', function(n) { return n * n; });\\n * console.log(object.a[0].b.c);\\n * // => 9\\n *\\n * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\\n * console.log(object.x[0].y.z);\\n * // => 0\\n */\\n function update(object, path, updater) {\\n return object == null ? object : baseUpdate(object, path, castFunction(updater));\\n }\\n\\n /**\\n * This method is like `_.update` except that it accepts `customizer` which is\\n * invoked to produce the objects of `path`. If `customizer` returns `undefined`\\n * path creation is handled by the method instead. The `customizer` is invoked\\n * with three arguments: (nsValue, key, nsObject).\\n *\\n * **Note:** This method mutates `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.6.0\\n * @category Object\\n * @param {Object} object The object to modify.\\n * @param {Array|string} path The path of the property to set.\\n * @param {Function} updater The function to produce the updated value.\\n * @param {Function} [customizer] The function to customize assigned values.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var object = {};\\n *\\n * _.updateWith(object, '[0][1]', _.constant('a'), Object);\\n * // => { '0': { '1': 'a' } }\\n */\\n function updateWith(object, path, updater, customizer) {\\n customizer = typeof customizer == 'function' ? customizer : undefined;\\n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\\n }\\n\\n /**\\n * Creates an array of the own enumerable string keyed property values of `object`.\\n *\\n * **Note:** Non-object values are coerced to objects.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property values.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.values(new Foo);\\n * // => [1, 2] (iteration order is not guaranteed)\\n *\\n * _.values('hi');\\n * // => ['h', 'i']\\n */\\n function values(object) {\\n return object == null ? [] : baseValues(object, keys(object));\\n }\\n\\n /**\\n * Creates an array of the own and inherited enumerable string keyed property\\n * values of `object`.\\n *\\n * **Note:** Non-object values are coerced to objects.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Object\\n * @param {Object} object The object to query.\\n * @returns {Array} Returns the array of property values.\\n * @example\\n *\\n * function Foo() {\\n * this.a = 1;\\n * this.b = 2;\\n * }\\n *\\n * Foo.prototype.c = 3;\\n *\\n * _.valuesIn(new Foo);\\n * // => [1, 2, 3] (iteration order is not guaranteed)\\n */\\n function valuesIn(object) {\\n return object == null ? [] : baseValues(object, keysIn(object));\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Number\\n * @param {number} number The number to clamp.\\n * @param {number} [lower] The lower bound.\\n * @param {number} upper The upper bound.\\n * @returns {number} Returns the clamped number.\\n * @example\\n *\\n * _.clamp(-10, -5, 5);\\n * // => -5\\n *\\n * _.clamp(10, -5, 5);\\n * // => 5\\n */\\n function clamp(number, lower, upper) {\\n if (upper === undefined) {\\n upper = lower;\\n lower = undefined;\\n }\\n if (upper !== undefined) {\\n upper = toNumber(upper);\\n upper = upper === upper ? upper : 0;\\n }\\n if (lower !== undefined) {\\n lower = toNumber(lower);\\n lower = lower === lower ? lower : 0;\\n }\\n return baseClamp(toNumber(number), lower, upper);\\n }\\n\\n /**\\n * Checks if `n` is between `start` and up to, but not including, `end`. If\\n * `end` is not specified, it's set to `start` with `start` then set to `0`.\\n * If `start` is greater than `end` the params are swapped to support\\n * negative ranges.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.3.0\\n * @category Number\\n * @param {number} number The number to check.\\n * @param {number} [start=0] The start of the range.\\n * @param {number} end The end of the range.\\n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\\n * @see _.range, _.rangeRight\\n * @example\\n *\\n * _.inRange(3, 2, 4);\\n * // => true\\n *\\n * _.inRange(4, 8);\\n * // => true\\n *\\n * _.inRange(4, 2);\\n * // => false\\n *\\n * _.inRange(2, 2);\\n * // => false\\n *\\n * _.inRange(1.2, 2);\\n * // => true\\n *\\n * _.inRange(5.2, 4);\\n * // => false\\n *\\n * _.inRange(-3, -2, -6);\\n * // => true\\n */\\n function inRange(number, start, end) {\\n start = toFinite(start);\\n if (end === undefined) {\\n end = start;\\n start = 0;\\n } else {\\n end = toFinite(end);\\n }\\n number = toNumber(number);\\n return baseInRange(number, start, end);\\n }\\n\\n /**\\n * Produces a random number between the inclusive `lower` and `upper` bounds.\\n * If only one argument is provided a number between `0` and the given number\\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\\n * floats, a floating-point number is returned instead of an integer.\\n *\\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\\n * floating-point values which can produce unexpected results.\\n *\\n * @static\\n * @memberOf _\\n * @since 0.7.0\\n * @category Number\\n * @param {number} [lower=0] The lower bound.\\n * @param {number} [upper=1] The upper bound.\\n * @param {boolean} [floating] Specify returning a floating-point number.\\n * @returns {number} Returns the random number.\\n * @example\\n *\\n * _.random(0, 5);\\n * // => an integer between 0 and 5\\n *\\n * _.random(5);\\n * // => also an integer between 0 and 5\\n *\\n * _.random(5, true);\\n * // => a floating-point number between 0 and 5\\n *\\n * _.random(1.2, 5.2);\\n * // => a floating-point number between 1.2 and 5.2\\n */\\n function random(lower, upper, floating) {\\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\\n upper = floating = undefined;\\n }\\n if (floating === undefined) {\\n if (typeof upper == 'boolean') {\\n floating = upper;\\n upper = undefined;\\n }\\n else if (typeof lower == 'boolean') {\\n floating = lower;\\n lower = undefined;\\n }\\n }\\n if (lower === undefined && upper === undefined) {\\n lower = 0;\\n upper = 1;\\n }\\n else {\\n lower = toFinite(lower);\\n if (upper === undefined) {\\n upper = lower;\\n lower = 0;\\n } else {\\n upper = toFinite(upper);\\n }\\n }\\n if (lower > upper) {\\n var temp = lower;\\n lower = upper;\\n upper = temp;\\n }\\n if (floating || lower % 1 || upper % 1) {\\n var rand = nativeRandom();\\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\\n }\\n return baseRandom(lower, upper);\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the camel cased string.\\n * @example\\n *\\n * _.camelCase('Foo Bar');\\n * // => 'fooBar'\\n *\\n * _.camelCase('--foo-bar--');\\n * // => 'fooBar'\\n *\\n * _.camelCase('__FOO_BAR__');\\n * // => 'fooBar'\\n */\\n var camelCase = createCompounder(function(result, word, index) {\\n word = word.toLowerCase();\\n return result + (index ? capitalize(word) : word);\\n });\\n\\n /**\\n * Converts the first character of `string` to upper case and the remaining\\n * to lower case.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to capitalize.\\n * @returns {string} Returns the capitalized string.\\n * @example\\n *\\n * _.capitalize('FRED');\\n * // => 'Fred'\\n */\\n function capitalize(string) {\\n return upperFirst(toString(string).toLowerCase());\\n }\\n\\n /**\\n * Deburrs `string` by converting\\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\\n * letters to basic Latin letters and removing\\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to deburr.\\n * @returns {string} Returns the deburred string.\\n * @example\\n *\\n * _.deburr('déjà vu');\\n * // => 'deja vu'\\n */\\n function deburr(string) {\\n string = toString(string);\\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\\n }\\n\\n /**\\n * Checks if `string` ends with the given target string.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to inspect.\\n * @param {string} [target] The string to search for.\\n * @param {number} [position=string.length] The position to search up to.\\n * @returns {boolean} Returns `true` if `string` ends with `target`,\\n * else `false`.\\n * @example\\n *\\n * _.endsWith('abc', 'c');\\n * // => true\\n *\\n * _.endsWith('abc', 'b');\\n * // => false\\n *\\n * _.endsWith('abc', 'b', 2);\\n * // => true\\n */\\n function endsWith(string, target, position) {\\n string = toString(string);\\n target = baseToString(target);\\n\\n var length = string.length;\\n position = position === undefined\\n ? length\\n : baseClamp(toInteger(position), 0, length);\\n\\n var end = position;\\n position -= target.length;\\n return position >= 0 && string.slice(position, end) == target;\\n }\\n\\n /**\\n * Converts the characters \\\"&\\\", \\\"<\\\", \\\">\\\", '\\\"', and \\\"'\\\" in `string` to their\\n * corresponding HTML entities.\\n *\\n * **Note:** No other characters are escaped. To escape additional\\n * characters use a third-party library like [_he_](https://mths.be/he).\\n *\\n * Though the \\\">\\\" character is escaped for symmetry, characters like\\n * \\\">\\\" and \\\"/\\\" don't need escaping in HTML and have no special meaning\\n * unless they're part of a tag or unquoted attribute value. See\\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\\n * (under \\\"semi-related fun fact\\\") for more details.\\n *\\n * When working with HTML you should always\\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\\n * XSS vectors.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category String\\n * @param {string} [string=''] The string to escape.\\n * @returns {string} Returns the escaped string.\\n * @example\\n *\\n * _.escape('fred, barney, & pebbles');\\n * // => 'fred, barney, &amp; pebbles'\\n */\\n function escape(string) {\\n string = toString(string);\\n return (string && reHasUnescapedHtml.test(string))\\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\\n : string;\\n }\\n\\n /**\\n * Escapes the `RegExp` special characters \\\"^\\\", \\\"$\\\", \\\"\\\\\\\", \\\".\\\", \\\"*\\\", \\\"+\\\",\\n * \\\"?\\\", \\\"(\\\", \\\")\\\", \\\"[\\\", \\\"]\\\", \\\"{\\\", \\\"}\\\", and \\\"|\\\" in `string`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to escape.\\n * @returns {string} Returns the escaped string.\\n * @example\\n *\\n * _.escapeRegExp('[lodash](https://lodash.com/)');\\n * // => '\\\\[lodash\\\\]\\\\(https://lodash\\\\.com/\\\\)'\\n */\\n function escapeRegExp(string) {\\n string = toString(string);\\n return (string && reHasRegExpChar.test(string))\\n ? string.replace(reRegExpChar, '\\\\\\\\$&')\\n : string;\\n }\\n\\n /**\\n * Converts `string` to\\n * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the kebab cased string.\\n * @example\\n *\\n * _.kebabCase('Foo Bar');\\n * // => 'foo-bar'\\n *\\n * _.kebabCase('fooBar');\\n * // => 'foo-bar'\\n *\\n * _.kebabCase('__FOO_BAR__');\\n * // => 'foo-bar'\\n */\\n var kebabCase = createCompounder(function(result, word, index) {\\n return result + (index ? '-' : '') + word.toLowerCase();\\n });\\n\\n /**\\n * Converts `string`, as space separated words, to lower case.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the lower cased string.\\n * @example\\n *\\n * _.lowerCase('--Foo-Bar--');\\n * // => 'foo bar'\\n *\\n * _.lowerCase('fooBar');\\n * // => 'foo bar'\\n *\\n * _.lowerCase('__FOO_BAR__');\\n * // => 'foo bar'\\n */\\n var lowerCase = createCompounder(function(result, word, index) {\\n return result + (index ? ' ' : '') + word.toLowerCase();\\n });\\n\\n /**\\n * Converts the first character of `string` to lower case.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the converted string.\\n * @example\\n *\\n * _.lowerFirst('Fred');\\n * // => 'fred'\\n *\\n * _.lowerFirst('FRED');\\n * // => 'fRED'\\n */\\n var lowerFirst = createCaseFirst('toLowerCase');\\n\\n /**\\n * Pads `string` on the left and right sides if it's shorter than `length`.\\n * Padding characters are truncated if they can't be evenly divided by `length`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to pad.\\n * @param {number} [length=0] The padding length.\\n * @param {string} [chars=' '] The string used as padding.\\n * @returns {string} Returns the padded string.\\n * @example\\n *\\n * _.pad('abc', 8);\\n * // => ' abc '\\n *\\n * _.pad('abc', 8, '_-');\\n * // => '_-abc_-_'\\n *\\n * _.pad('abc', 3);\\n * // => 'abc'\\n */\\n function pad(string, length, chars) {\\n string = toString(string);\\n length = toInteger(length);\\n\\n var strLength = length ? stringSize(string) : 0;\\n if (!length || strLength >= length) {\\n return string;\\n }\\n var mid = (length - strLength) / 2;\\n return (\\n createPadding(nativeFloor(mid), chars) +\\n string +\\n createPadding(nativeCeil(mid), chars)\\n );\\n }\\n\\n /**\\n * Pads `string` on the right side if it's shorter than `length`. Padding\\n * characters are truncated if they exceed `length`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to pad.\\n * @param {number} [length=0] The padding length.\\n * @param {string} [chars=' '] The string used as padding.\\n * @returns {string} Returns the padded string.\\n * @example\\n *\\n * _.padEnd('abc', 6);\\n * // => 'abc '\\n *\\n * _.padEnd('abc', 6, '_-');\\n * // => 'abc_-_'\\n *\\n * _.padEnd('abc', 3);\\n * // => 'abc'\\n */\\n function padEnd(string, length, chars) {\\n string = toString(string);\\n length = toInteger(length);\\n\\n var strLength = length ? stringSize(string) : 0;\\n return (length && strLength < length)\\n ? (string + createPadding(length - strLength, chars))\\n : string;\\n }\\n\\n /**\\n * Pads `string` on the left side if it's shorter than `length`. Padding\\n * characters are truncated if they exceed `length`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to pad.\\n * @param {number} [length=0] The padding length.\\n * @param {string} [chars=' '] The string used as padding.\\n * @returns {string} Returns the padded string.\\n * @example\\n *\\n * _.padStart('abc', 6);\\n * // => ' abc'\\n *\\n * _.padStart('abc', 6, '_-');\\n * // => '_-_abc'\\n *\\n * _.padStart('abc', 3);\\n * // => 'abc'\\n */\\n function padStart(string, length, chars) {\\n string = toString(string);\\n length = toInteger(length);\\n\\n var strLength = length ? stringSize(string) : 0;\\n return (length && strLength < length)\\n ? (createPadding(length - strLength, chars) + string)\\n : string;\\n }\\n\\n /**\\n * Converts `string` to an integer of the specified radix. If `radix` is\\n * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\\n * hexadecimal, in which case a `radix` of `16` is used.\\n *\\n * **Note:** This method aligns with the\\n * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\\n *\\n * @static\\n * @memberOf _\\n * @since 1.1.0\\n * @category String\\n * @param {string} string The string to convert.\\n * @param {number} [radix=10] The radix to interpret `value` by.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {number} Returns the converted integer.\\n * @example\\n *\\n * _.parseInt('08');\\n * // => 8\\n *\\n * _.map(['6', '08', '10'], _.parseInt);\\n * // => [6, 8, 10]\\n */\\n function parseInt(string, radix, guard) {\\n if (guard || radix == null) {\\n radix = 0;\\n } else if (radix) {\\n radix = +radix;\\n }\\n return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\\n }\\n\\n /**\\n * Repeats the given string `n` times.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to repeat.\\n * @param {number} [n=1] The number of times to repeat the string.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {string} Returns the repeated string.\\n * @example\\n *\\n * _.repeat('*', 3);\\n * // => '***'\\n *\\n * _.repeat('abc', 2);\\n * // => 'abcabc'\\n *\\n * _.repeat('abc', 0);\\n * // => ''\\n */\\n function repeat(string, n, guard) {\\n if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\\n n = 1;\\n } else {\\n n = toInteger(n);\\n }\\n return baseRepeat(toString(string), n);\\n }\\n\\n /**\\n * Replaces matches for `pattern` in `string` with `replacement`.\\n *\\n * **Note:** This method is based on\\n * [`String#replace`](https://mdn.io/String/replace).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to modify.\\n * @param {RegExp|string} pattern The pattern to replace.\\n * @param {Function|string} replacement The match replacement.\\n * @returns {string} Returns the modified string.\\n * @example\\n *\\n * _.replace('Hi Fred', 'Fred', 'Barney');\\n * // => 'Hi Barney'\\n */\\n function replace() {\\n var args = arguments,\\n string = toString(args[0]);\\n\\n return args.length < 3 ? string : string.replace(args[1], args[2]);\\n }\\n\\n /**\\n * Converts `string` to\\n * [snake case](https://en.wikipedia.org/wiki/Snake_case).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the snake cased string.\\n * @example\\n *\\n * _.snakeCase('Foo Bar');\\n * // => 'foo_bar'\\n *\\n * _.snakeCase('fooBar');\\n * // => 'foo_bar'\\n *\\n * _.snakeCase('--FOO-BAR--');\\n * // => 'foo_bar'\\n */\\n var snakeCase = createCompounder(function(result, word, index) {\\n return result + (index ? '_' : '') + word.toLowerCase();\\n });\\n\\n /**\\n * Splits `string` by `separator`.\\n *\\n * **Note:** This method is based on\\n * [`String#split`](https://mdn.io/String/split).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to split.\\n * @param {RegExp|string} separator The separator pattern to split by.\\n * @param {number} [limit] The length to truncate results to.\\n * @returns {Array} Returns the string segments.\\n * @example\\n *\\n * _.split('a-b-c', '-', 2);\\n * // => ['a', 'b']\\n */\\n function split(string, separator, limit) {\\n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\\n separator = limit = undefined;\\n }\\n limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\\n if (!limit) {\\n return [];\\n }\\n string = toString(string);\\n if (string && (\\n typeof separator == 'string' ||\\n (separator != null && !isRegExp(separator))\\n )) {\\n separator = baseToString(separator);\\n if (!separator && hasUnicode(string)) {\\n return castSlice(stringToArray(string), 0, limit);\\n }\\n }\\n return string.split(separator, limit);\\n }\\n\\n /**\\n * Converts `string` to\\n * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\\n *\\n * @static\\n * @memberOf _\\n * @since 3.1.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the start cased string.\\n * @example\\n *\\n * _.startCase('--foo-bar--');\\n * // => 'Foo Bar'\\n *\\n * _.startCase('fooBar');\\n * // => 'Foo Bar'\\n *\\n * _.startCase('__FOO_BAR__');\\n * // => 'FOO BAR'\\n */\\n var startCase = createCompounder(function(result, word, index) {\\n return result + (index ? ' ' : '') + upperFirst(word);\\n });\\n\\n /**\\n * Checks if `string` starts with the given target string.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to inspect.\\n * @param {string} [target] The string to search for.\\n * @param {number} [position=0] The position to search from.\\n * @returns {boolean} Returns `true` if `string` starts with `target`,\\n * else `false`.\\n * @example\\n *\\n * _.startsWith('abc', 'a');\\n * // => true\\n *\\n * _.startsWith('abc', 'b');\\n * // => false\\n *\\n * _.startsWith('abc', 'b', 1);\\n * // => true\\n */\\n function startsWith(string, target, position) {\\n string = toString(string);\\n position = position == null\\n ? 0\\n : baseClamp(toInteger(position), 0, string.length);\\n\\n target = baseToString(target);\\n return string.slice(position, position + target.length) == target;\\n }\\n\\n /**\\n * Creates a compiled template function that can interpolate data properties\\n * in \\\"interpolate\\\" delimiters, HTML-escape interpolated data properties in\\n * \\\"escape\\\" delimiters, and execute JavaScript in \\\"evaluate\\\" delimiters. Data\\n * properties may be accessed as free variables in the template. If a setting\\n * object is given, it takes precedence over `_.templateSettings` values.\\n *\\n * **Note:** In the development build `_.template` utilizes\\n * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\\n * for easier debugging.\\n *\\n * For more information on precompiling templates see\\n * [lodash's custom builds documentation](https://lodash.com/custom-builds).\\n *\\n * For more information on Chrome extension sandboxes see\\n * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category String\\n * @param {string} [string=''] The template string.\\n * @param {Object} [options={}] The options object.\\n * @param {RegExp} [options.escape=_.templateSettings.escape]\\n * The HTML \\\"escape\\\" delimiter.\\n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\\n * The \\\"evaluate\\\" delimiter.\\n * @param {Object} [options.imports=_.templateSettings.imports]\\n * An object to import into the template as free variables.\\n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\\n * The \\\"interpolate\\\" delimiter.\\n * @param {string} [options.sourceURL='lodash.templateSources[n]']\\n * The sourceURL of the compiled template.\\n * @param {string} [options.variable='obj']\\n * The data object variable name.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Function} Returns the compiled template function.\\n * @example\\n *\\n * // Use the \\\"interpolate\\\" delimiter to create a compiled template.\\n * var compiled = _.template('hello <%= user %>!');\\n * compiled({ 'user': 'fred' });\\n * // => 'hello fred!'\\n *\\n * // Use the HTML \\\"escape\\\" delimiter to escape data property values.\\n * var compiled = _.template('<b><%- value %></b>');\\n * compiled({ 'value': '<script>' });\\n * // => '<b>&lt;script&gt;</b>'\\n *\\n * // Use the \\\"evaluate\\\" delimiter to execute JavaScript and generate HTML.\\n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\\n * compiled({ 'users': ['fred', 'barney'] });\\n * // => '<li>fred</li><li>barney</li>'\\n *\\n * // Use the internal `print` function in \\\"evaluate\\\" delimiters.\\n * var compiled = _.template('<% print(\\\"hello \\\" + user); %>!');\\n * compiled({ 'user': 'barney' });\\n * // => 'hello barney!'\\n *\\n * // Use the ES template literal delimiter as an \\\"interpolate\\\" delimiter.\\n * // Disable support by replacing the \\\"interpolate\\\" delimiter.\\n * var compiled = _.template('hello ${ user }!');\\n * compiled({ 'user': 'pebbles' });\\n * // => 'hello pebbles!'\\n *\\n * // Use backslashes to treat delimiters as plain text.\\n * var compiled = _.template('<%= \\\"\\\\\\\\<%- value %\\\\\\\\>\\\" %>');\\n * compiled({ 'value': 'ignored' });\\n * // => '<%- value %>'\\n *\\n * // Use the `imports` option to import `jQuery` as `jq`.\\n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\\n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\\n * compiled({ 'users': ['fred', 'barney'] });\\n * // => '<li>fred</li><li>barney</li>'\\n *\\n * // Use the `sourceURL` option to specify a custom sourceURL for the template.\\n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\\n * compiled(data);\\n * // => Find the source of \\\"greeting.jst\\\" under the Sources tab or Resources panel of the web inspector.\\n *\\n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\\n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\\n * compiled.source;\\n * // => function(data) {\\n * // var __t, __p = '';\\n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\\n * // return __p;\\n * // }\\n *\\n * // Use custom template delimiters.\\n * _.templateSettings.interpolate = /{{([\\\\s\\\\S]+?)}}/g;\\n * var compiled = _.template('hello {{ user }}!');\\n * compiled({ 'user': 'mustache' });\\n * // => 'hello mustache!'\\n *\\n * // Use the `source` property to inline compiled templates for meaningful\\n * // line numbers in error messages and stack traces.\\n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\\\\n * var JST = {\\\\\\n * \\\"main\\\": ' + _.template(mainText).source + '\\\\\\n * };\\\\\\n * ');\\n */\\n function template(string, options, guard) {\\n // Based on John Resig's `tmpl` implementation\\n // (http://ejohn.org/blog/javascript-micro-templating/)\\n // and Laura Doktorova's doT.js (https://github.com/olado/doT).\\n var settings = lodash.templateSettings;\\n\\n if (guard && isIterateeCall(string, options, guard)) {\\n options = undefined;\\n }\\n string = toString(string);\\n options = assignInWith({}, options, settings, customDefaultsAssignIn);\\n\\n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\\n importsKeys = keys(imports),\\n importsValues = baseValues(imports, importsKeys);\\n\\n var isEscaping,\\n isEvaluating,\\n index = 0,\\n interpolate = options.interpolate || reNoMatch,\\n source = \\\"__p += '\\\";\\n\\n // Compile the regexp to match each delimiter.\\n var reDelimiters = RegExp(\\n (options.escape || reNoMatch).source + '|' +\\n interpolate.source + '|' +\\n (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\\n (options.evaluate || reNoMatch).source + '|$'\\n , 'g');\\n\\n // Use a sourceURL for easier debugging.\\n var sourceURL = '//# sourceURL=' +\\n ('sourceURL' in options\\n ? options.sourceURL\\n : ('lodash.templateSources[' + (++templateCounter) + ']')\\n ) + '\\\\n';\\n\\n string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\\n interpolateValue || (interpolateValue = esTemplateValue);\\n\\n // Escape characters that can't be included in string literals.\\n source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\\n\\n // Replace delimiters with snippets.\\n if (escapeValue) {\\n isEscaping = true;\\n source += \\\"' +\\\\n__e(\\\" + escapeValue + \\\") +\\\\n'\\\";\\n }\\n if (evaluateValue) {\\n isEvaluating = true;\\n source += \\\"';\\\\n\\\" + evaluateValue + \\\";\\\\n__p += '\\\";\\n }\\n if (interpolateValue) {\\n source += \\\"' +\\\\n((__t = (\\\" + interpolateValue + \\\")) == null ? '' : __t) +\\\\n'\\\";\\n }\\n index = offset + match.length;\\n\\n // The JS engine embedded in Adobe products needs `match` returned in\\n // order to produce the correct `offset` value.\\n return match;\\n });\\n\\n source += \\\"';\\\\n\\\";\\n\\n // If `variable` is not specified wrap a with-statement around the generated\\n // code to add the data object to the top of the scope chain.\\n var variable = options.variable;\\n if (!variable) {\\n source = 'with (obj) {\\\\n' + source + '\\\\n}\\\\n';\\n }\\n // Cleanup code by stripping empty strings.\\n source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\\n .replace(reEmptyStringMiddle, '$1')\\n .replace(reEmptyStringTrailing, '$1;');\\n\\n // Frame code as the function body.\\n source = 'function(' + (variable || 'obj') + ') {\\\\n' +\\n (variable\\n ? ''\\n : 'obj || (obj = {});\\\\n'\\n ) +\\n \\\"var __t, __p = ''\\\" +\\n (isEscaping\\n ? ', __e = _.escape'\\n : ''\\n ) +\\n (isEvaluating\\n ? ', __j = Array.prototype.join;\\\\n' +\\n \\\"function print() { __p += __j.call(arguments, '') }\\\\n\\\"\\n : ';\\\\n'\\n ) +\\n source +\\n 'return __p\\\\n}';\\n\\n var result = attempt(function() {\\n return Function(importsKeys, sourceURL + 'return ' + source)\\n .apply(undefined, importsValues);\\n });\\n\\n // Provide the compiled function's source by its `toString` method or\\n // the `source` property as a convenience for inlining compiled templates.\\n result.source = source;\\n if (isError(result)) {\\n throw result;\\n }\\n return result;\\n }\\n\\n /**\\n * Converts `string`, as a whole, to lower case just like\\n * [String#toLowerCase](https://mdn.io/toLowerCase).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the lower cased string.\\n * @example\\n *\\n * _.toLower('--Foo-Bar--');\\n * // => '--foo-bar--'\\n *\\n * _.toLower('fooBar');\\n * // => 'foobar'\\n *\\n * _.toLower('__FOO_BAR__');\\n * // => '__foo_bar__'\\n */\\n function toLower(value) {\\n return toString(value).toLowerCase();\\n }\\n\\n /**\\n * Converts `string`, as a whole, to upper case just like\\n * [String#toUpperCase](https://mdn.io/toUpperCase).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the upper cased string.\\n * @example\\n *\\n * _.toUpper('--foo-bar--');\\n * // => '--FOO-BAR--'\\n *\\n * _.toUpper('fooBar');\\n * // => 'FOOBAR'\\n *\\n * _.toUpper('__foo_bar__');\\n * // => '__FOO_BAR__'\\n */\\n function toUpper(value) {\\n return toString(value).toUpperCase();\\n }\\n\\n /**\\n * Removes leading and trailing whitespace or specified characters from `string`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to trim.\\n * @param {string} [chars=whitespace] The characters to trim.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {string} Returns the trimmed string.\\n * @example\\n *\\n * _.trim(' abc ');\\n * // => 'abc'\\n *\\n * _.trim('-_-abc-_-', '_-');\\n * // => 'abc'\\n *\\n * _.map([' foo ', ' bar '], _.trim);\\n * // => ['foo', 'bar']\\n */\\n function trim(string, chars, guard) {\\n string = toString(string);\\n if (string && (guard || chars === undefined)) {\\n return string.replace(reTrim, '');\\n }\\n if (!string || !(chars = baseToString(chars))) {\\n return string;\\n }\\n var strSymbols = stringToArray(string),\\n chrSymbols = stringToArray(chars),\\n start = charsStartIndex(strSymbols, chrSymbols),\\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\\n\\n return castSlice(strSymbols, start, end).join('');\\n }\\n\\n /**\\n * Removes trailing whitespace or specified characters from `string`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to trim.\\n * @param {string} [chars=whitespace] The characters to trim.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {string} Returns the trimmed string.\\n * @example\\n *\\n * _.trimEnd(' abc ');\\n * // => ' abc'\\n *\\n * _.trimEnd('-_-abc-_-', '_-');\\n * // => '-_-abc'\\n */\\n function trimEnd(string, chars, guard) {\\n string = toString(string);\\n if (string && (guard || chars === undefined)) {\\n return string.replace(reTrimEnd, '');\\n }\\n if (!string || !(chars = baseToString(chars))) {\\n return string;\\n }\\n var strSymbols = stringToArray(string),\\n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\\n\\n return castSlice(strSymbols, 0, end).join('');\\n }\\n\\n /**\\n * Removes leading whitespace or specified characters from `string`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to trim.\\n * @param {string} [chars=whitespace] The characters to trim.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {string} Returns the trimmed string.\\n * @example\\n *\\n * _.trimStart(' abc ');\\n * // => 'abc '\\n *\\n * _.trimStart('-_-abc-_-', '_-');\\n * // => 'abc-_-'\\n */\\n function trimStart(string, chars, guard) {\\n string = toString(string);\\n if (string && (guard || chars === undefined)) {\\n return string.replace(reTrimStart, '');\\n }\\n if (!string || !(chars = baseToString(chars))) {\\n return string;\\n }\\n var strSymbols = stringToArray(string),\\n start = charsStartIndex(strSymbols, stringToArray(chars));\\n\\n return castSlice(strSymbols, start).join('');\\n }\\n\\n /**\\n * Truncates `string` if it's longer than the given maximum string length.\\n * The last characters of the truncated string are replaced with the omission\\n * string which defaults to \\\"...\\\".\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to truncate.\\n * @param {Object} [options={}] The options object.\\n * @param {number} [options.length=30] The maximum string length.\\n * @param {string} [options.omission='...'] The string to indicate text is omitted.\\n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\\n * @returns {string} Returns the truncated string.\\n * @example\\n *\\n * _.truncate('hi-diddly-ho there, neighborino');\\n * // => 'hi-diddly-ho there, neighbo...'\\n *\\n * _.truncate('hi-diddly-ho there, neighborino', {\\n * 'length': 24,\\n * 'separator': ' '\\n * });\\n * // => 'hi-diddly-ho there,...'\\n *\\n * _.truncate('hi-diddly-ho there, neighborino', {\\n * 'length': 24,\\n * 'separator': /,? +/\\n * });\\n * // => 'hi-diddly-ho there...'\\n *\\n * _.truncate('hi-diddly-ho there, neighborino', {\\n * 'omission': ' [...]'\\n * });\\n * // => 'hi-diddly-ho there, neig [...]'\\n */\\n function truncate(string, options) {\\n var length = DEFAULT_TRUNC_LENGTH,\\n omission = DEFAULT_TRUNC_OMISSION;\\n\\n if (isObject(options)) {\\n var separator = 'separator' in options ? options.separator : separator;\\n length = 'length' in options ? toInteger(options.length) : length;\\n omission = 'omission' in options ? baseToString(options.omission) : omission;\\n }\\n string = toString(string);\\n\\n var strLength = string.length;\\n if (hasUnicode(string)) {\\n var strSymbols = stringToArray(string);\\n strLength = strSymbols.length;\\n }\\n if (length >= strLength) {\\n return string;\\n }\\n var end = length - stringSize(omission);\\n if (end < 1) {\\n return omission;\\n }\\n var result = strSymbols\\n ? castSlice(strSymbols, 0, end).join('')\\n : string.slice(0, end);\\n\\n if (separator === undefined) {\\n return result + omission;\\n }\\n if (strSymbols) {\\n end += (result.length - end);\\n }\\n if (isRegExp(separator)) {\\n if (string.slice(end).search(separator)) {\\n var match,\\n substring = result;\\n\\n if (!separator.global) {\\n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\\n }\\n separator.lastIndex = 0;\\n while ((match = separator.exec(substring))) {\\n var newEnd = match.index;\\n }\\n result = result.slice(0, newEnd === undefined ? end : newEnd);\\n }\\n } else if (string.indexOf(baseToString(separator), end) != end) {\\n var index = result.lastIndexOf(separator);\\n if (index > -1) {\\n result = result.slice(0, index);\\n }\\n }\\n return result + omission;\\n }\\n\\n /**\\n * The inverse of `_.escape`; this method converts the HTML entities\\n * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\\n * their corresponding characters.\\n *\\n * **Note:** No other HTML entities are unescaped. To unescape additional\\n * HTML entities use a third-party library like [_he_](https://mths.be/he).\\n *\\n * @static\\n * @memberOf _\\n * @since 0.6.0\\n * @category String\\n * @param {string} [string=''] The string to unescape.\\n * @returns {string} Returns the unescaped string.\\n * @example\\n *\\n * _.unescape('fred, barney, &amp; pebbles');\\n * // => 'fred, barney, & pebbles'\\n */\\n function unescape(string) {\\n string = toString(string);\\n return (string && reHasEscapedHtml.test(string))\\n ? string.replace(reEscapedHtml, unescapeHtmlChar)\\n : string;\\n }\\n\\n /**\\n * Converts `string`, as space separated words, to upper case.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the upper cased string.\\n * @example\\n *\\n * _.upperCase('--foo-bar');\\n * // => 'FOO BAR'\\n *\\n * _.upperCase('fooBar');\\n * // => 'FOO BAR'\\n *\\n * _.upperCase('__foo_bar__');\\n * // => 'FOO BAR'\\n */\\n var upperCase = createCompounder(function(result, word, index) {\\n return result + (index ? ' ' : '') + word.toUpperCase();\\n });\\n\\n /**\\n * Converts the first character of `string` to upper case.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category String\\n * @param {string} [string=''] The string to convert.\\n * @returns {string} Returns the converted string.\\n * @example\\n *\\n * _.upperFirst('fred');\\n * // => 'Fred'\\n *\\n * _.upperFirst('FRED');\\n * // => 'FRED'\\n */\\n var upperFirst = createCaseFirst('toUpperCase');\\n\\n /**\\n * Splits `string` into an array of its words.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category String\\n * @param {string} [string=''] The string to inspect.\\n * @param {RegExp|string} [pattern] The pattern to match words.\\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\\n * @returns {Array} Returns the words of `string`.\\n * @example\\n *\\n * _.words('fred, barney, & pebbles');\\n * // => ['fred', 'barney', 'pebbles']\\n *\\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\\n * // => ['fred', 'barney', '&', 'pebbles']\\n */\\n function words(string, pattern, guard) {\\n string = toString(string);\\n pattern = guard ? undefined : pattern;\\n\\n if (pattern === undefined) {\\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\\n }\\n return string.match(pattern) || [];\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Attempts to invoke `func`, returning either the result or the caught error\\n * object. Any additional arguments are provided to `func` when it's invoked.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Util\\n * @param {Function} func The function to attempt.\\n * @param {...*} [args] The arguments to invoke `func` with.\\n * @returns {*} Returns the `func` result or error object.\\n * @example\\n *\\n * // Avoid throwing errors for invalid selectors.\\n * var elements = _.attempt(function(selector) {\\n * return document.querySelectorAll(selector);\\n * }, '>_>');\\n *\\n * if (_.isError(elements)) {\\n * elements = [];\\n * }\\n */\\n var attempt = baseRest(function(func, args) {\\n try {\\n return apply(func, undefined, args);\\n } catch (e) {\\n return isError(e) ? e : new Error(e);\\n }\\n });\\n\\n /**\\n * Binds methods of an object to the object itself, overwriting the existing\\n * method.\\n *\\n * **Note:** This method doesn't set the \\\"length\\\" property of bound functions.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {Object} object The object to bind and assign the bound methods to.\\n * @param {...(string|string[])} methodNames The object method names to bind.\\n * @returns {Object} Returns `object`.\\n * @example\\n *\\n * var view = {\\n * 'label': 'docs',\\n * 'click': function() {\\n * console.log('clicked ' + this.label);\\n * }\\n * };\\n *\\n * _.bindAll(view, ['click']);\\n * jQuery(element).on('click', view.click);\\n * // => Logs 'clicked docs' when clicked.\\n */\\n var bindAll = flatRest(function(object, methodNames) {\\n arrayEach(methodNames, function(key) {\\n key = toKey(key);\\n baseAssignValue(object, key, bind(object[key], object));\\n });\\n return object;\\n });\\n\\n /**\\n * Creates a function that iterates over `pairs` and invokes the corresponding\\n * function of the first predicate to return truthy. The predicate-function\\n * pairs are invoked with the `this` binding and arguments of the created\\n * function.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {Array} pairs The predicate-function pairs.\\n * @returns {Function} Returns the new composite function.\\n * @example\\n *\\n * var func = _.cond([\\n * [_.matches({ 'a': 1 }), _.constant('matches A')],\\n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\\n * [_.stubTrue, _.constant('no match')]\\n * ]);\\n *\\n * func({ 'a': 1, 'b': 2 });\\n * // => 'matches A'\\n *\\n * func({ 'a': 0, 'b': 1 });\\n * // => 'matches B'\\n *\\n * func({ 'a': '1', 'b': '2' });\\n * // => 'no match'\\n */\\n function cond(pairs) {\\n var length = pairs == null ? 0 : pairs.length,\\n toIteratee = getIteratee();\\n\\n pairs = !length ? [] : arrayMap(pairs, function(pair) {\\n if (typeof pair[1] != 'function') {\\n throw new TypeError(FUNC_ERROR_TEXT);\\n }\\n return [toIteratee(pair[0]), pair[1]];\\n });\\n\\n return baseRest(function(args) {\\n var index = -1;\\n while (++index < length) {\\n var pair = pairs[index];\\n if (apply(pair[0], this, args)) {\\n return apply(pair[1], this, args);\\n }\\n }\\n });\\n }\\n\\n /**\\n * Creates a function that invokes the predicate properties of `source` with\\n * the corresponding property values of a given object, returning `true` if\\n * all predicates return truthy, else `false`.\\n *\\n * **Note:** The created function is equivalent to `_.conformsTo` with\\n * `source` partially applied.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {Object} source The object of property predicates to conform to.\\n * @returns {Function} Returns the new spec function.\\n * @example\\n *\\n * var objects = [\\n * { 'a': 2, 'b': 1 },\\n * { 'a': 1, 'b': 2 }\\n * ];\\n *\\n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\\n * // => [{ 'a': 1, 'b': 2 }]\\n */\\n function conforms(source) {\\n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\\n }\\n\\n /**\\n * Creates a function that returns `value`.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.4.0\\n * @category Util\\n * @param {*} value The value to return from the new function.\\n * @returns {Function} Returns the new constant function.\\n * @example\\n *\\n * var objects = _.times(2, _.constant({ 'a': 1 }));\\n *\\n * console.log(objects);\\n * // => [{ 'a': 1 }, { 'a': 1 }]\\n *\\n * console.log(objects[0] === objects[1]);\\n * // => true\\n */\\n function constant(value) {\\n return function() {\\n return value;\\n };\\n }\\n\\n /**\\n * Checks `value` to determine whether a default value should be returned in\\n * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\\n * or `undefined`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.14.0\\n * @category Util\\n * @param {*} value The value to check.\\n * @param {*} defaultValue The default value.\\n * @returns {*} Returns the resolved value.\\n * @example\\n *\\n * _.defaultTo(1, 10);\\n * // => 1\\n *\\n * _.defaultTo(undefined, 10);\\n * // => 10\\n */\\n function defaultTo(value, defaultValue) {\\n return (value == null || value !== value) ? defaultValue : value;\\n }\\n\\n /**\\n * Creates a function that returns the result of invoking the given functions\\n * with the `this` binding of the created function, where each successive\\n * invocation is supplied the return value of the previous.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Util\\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\\n * @returns {Function} Returns the new composite function.\\n * @see _.flowRight\\n * @example\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * var addSquare = _.flow([_.add, square]);\\n * addSquare(1, 2);\\n * // => 9\\n */\\n var flow = createFlow();\\n\\n /**\\n * This method is like `_.flow` except that it creates a function that\\n * invokes the given functions from right to left.\\n *\\n * @static\\n * @since 3.0.0\\n * @memberOf _\\n * @category Util\\n * @param {...(Function|Function[])} [funcs] The functions to invoke.\\n * @returns {Function} Returns the new composite function.\\n * @see _.flow\\n * @example\\n *\\n * function square(n) {\\n * return n * n;\\n * }\\n *\\n * var addSquare = _.flowRight([square, _.add]);\\n * addSquare(1, 2);\\n * // => 9\\n */\\n var flowRight = createFlow(true);\\n\\n /**\\n * This method returns the first argument it receives.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {*} value Any value.\\n * @returns {*} Returns `value`.\\n * @example\\n *\\n * var object = { 'a': 1 };\\n *\\n * console.log(_.identity(object) === object);\\n * // => true\\n */\\n function identity(value) {\\n return value;\\n }\\n\\n /**\\n * Creates a function that invokes `func` with the arguments of the created\\n * function. If `func` is a property name, the created function returns the\\n * property value for a given element. If `func` is an array or object, the\\n * created function returns `true` for elements that contain the equivalent\\n * source properties, otherwise it returns `false`.\\n *\\n * @static\\n * @since 4.0.0\\n * @memberOf _\\n * @category Util\\n * @param {*} [func=_.identity] The value to convert to a callback.\\n * @returns {Function} Returns the callback.\\n * @example\\n *\\n * var users = [\\n * { 'user': 'barney', 'age': 36, 'active': true },\\n * { 'user': 'fred', 'age': 40, 'active': false }\\n * ];\\n *\\n * // The `_.matches` iteratee shorthand.\\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\\n *\\n * // The `_.matchesProperty` iteratee shorthand.\\n * _.filter(users, _.iteratee(['user', 'fred']));\\n * // => [{ 'user': 'fred', 'age': 40 }]\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.map(users, _.iteratee('user'));\\n * // => ['barney', 'fred']\\n *\\n * // Create custom iteratee shorthands.\\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\\n * return func.test(string);\\n * };\\n * });\\n *\\n * _.filter(['abc', 'def'], /ef/);\\n * // => ['def']\\n */\\n function iteratee(func) {\\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\\n }\\n\\n /**\\n * Creates a function that performs a partial deep comparison between a given\\n * object and `source`, returning `true` if the given object has equivalent\\n * property values, else `false`.\\n *\\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\\n * partially applied.\\n *\\n * Partial comparisons will match empty array and empty object `source`\\n * values against any array or object value, respectively. See `_.isEqual`\\n * for a list of supported value comparisons.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Util\\n * @param {Object} source The object of property values to match.\\n * @returns {Function} Returns the new spec function.\\n * @example\\n *\\n * var objects = [\\n * { 'a': 1, 'b': 2, 'c': 3 },\\n * { 'a': 4, 'b': 5, 'c': 6 }\\n * ];\\n *\\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\\n */\\n function matches(source) {\\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\\n }\\n\\n /**\\n * Creates a function that performs a partial deep comparison between the\\n * value at `path` of a given object to `srcValue`, returning `true` if the\\n * object value is equivalent, else `false`.\\n *\\n * **Note:** Partial comparisons will match empty array and empty object\\n * `srcValue` values against any array or object value, respectively. See\\n * `_.isEqual` for a list of supported value comparisons.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.2.0\\n * @category Util\\n * @param {Array|string} path The path of the property to get.\\n * @param {*} srcValue The value to match.\\n * @returns {Function} Returns the new spec function.\\n * @example\\n *\\n * var objects = [\\n * { 'a': 1, 'b': 2, 'c': 3 },\\n * { 'a': 4, 'b': 5, 'c': 6 }\\n * ];\\n *\\n * _.find(objects, _.matchesProperty('a', 4));\\n * // => { 'a': 4, 'b': 5, 'c': 6 }\\n */\\n function matchesProperty(path, srcValue) {\\n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\\n }\\n\\n /**\\n * Creates a function that invokes the method at `path` of a given object.\\n * Any additional arguments are provided to the invoked method.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.7.0\\n * @category Util\\n * @param {Array|string} path The path of the method to invoke.\\n * @param {...*} [args] The arguments to invoke the method with.\\n * @returns {Function} Returns the new invoker function.\\n * @example\\n *\\n * var objects = [\\n * { 'a': { 'b': _.constant(2) } },\\n * { 'a': { 'b': _.constant(1) } }\\n * ];\\n *\\n * _.map(objects, _.method('a.b'));\\n * // => [2, 1]\\n *\\n * _.map(objects, _.method(['a', 'b']));\\n * // => [2, 1]\\n */\\n var method = baseRest(function(path, args) {\\n return function(object) {\\n return baseInvoke(object, path, args);\\n };\\n });\\n\\n /**\\n * The opposite of `_.method`; this method creates a function that invokes\\n * the method at a given path of `object`. Any additional arguments are\\n * provided to the invoked method.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.7.0\\n * @category Util\\n * @param {Object} object The object to query.\\n * @param {...*} [args] The arguments to invoke the method with.\\n * @returns {Function} Returns the new invoker function.\\n * @example\\n *\\n * var array = _.times(3, _.constant),\\n * object = { 'a': array, 'b': array, 'c': array };\\n *\\n * _.map(['a[2]', 'c[0]'], _.methodOf(object));\\n * // => [2, 0]\\n *\\n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\\n * // => [2, 0]\\n */\\n var methodOf = baseRest(function(object, args) {\\n return function(path) {\\n return baseInvoke(object, path, args);\\n };\\n });\\n\\n /**\\n * Adds all own enumerable string keyed function properties of a source\\n * object to the destination object. If `object` is a function, then methods\\n * are added to its prototype as well.\\n *\\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\\n * avoid conflicts caused by modifying the original.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {Function|Object} [object=lodash] The destination object.\\n * @param {Object} source The object of functions to add.\\n * @param {Object} [options={}] The options object.\\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\\n * @returns {Function|Object} Returns `object`.\\n * @example\\n *\\n * function vowels(string) {\\n * return _.filter(string, function(v) {\\n * return /[aeiou]/i.test(v);\\n * });\\n * }\\n *\\n * _.mixin({ 'vowels': vowels });\\n * _.vowels('fred');\\n * // => ['e']\\n *\\n * _('fred').vowels().value();\\n * // => ['e']\\n *\\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\\n * _('fred').vowels();\\n * // => ['e']\\n */\\n function mixin(object, source, options) {\\n var props = keys(source),\\n methodNames = baseFunctions(source, props);\\n\\n if (options == null &&\\n !(isObject(source) && (methodNames.length || !props.length))) {\\n options = source;\\n source = object;\\n object = this;\\n methodNames = baseFunctions(source, keys(source));\\n }\\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\\n isFunc = isFunction(object);\\n\\n arrayEach(methodNames, function(methodName) {\\n var func = source[methodName];\\n object[methodName] = func;\\n if (isFunc) {\\n object.prototype[methodName] = function() {\\n var chainAll = this.__chain__;\\n if (chain || chainAll) {\\n var result = object(this.__wrapped__),\\n actions = result.__actions__ = copyArray(this.__actions__);\\n\\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\\n result.__chain__ = chainAll;\\n return result;\\n }\\n return func.apply(object, arrayPush([this.value()], arguments));\\n };\\n }\\n });\\n\\n return object;\\n }\\n\\n /**\\n * Reverts the `_` variable to its previous value and returns a reference to\\n * the `lodash` function.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @returns {Function} Returns the `lodash` function.\\n * @example\\n *\\n * var lodash = _.noConflict();\\n */\\n function noConflict() {\\n if (root._ === this) {\\n root._ = oldDash;\\n }\\n return this;\\n }\\n\\n /**\\n * This method returns `undefined`.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.3.0\\n * @category Util\\n * @example\\n *\\n * _.times(2, _.noop);\\n * // => [undefined, undefined]\\n */\\n function noop() {\\n // No operation performed.\\n }\\n\\n /**\\n * Creates a function that gets the argument at index `n`. If `n` is negative,\\n * the nth argument from the end is returned.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {number} [n=0] The index of the argument to return.\\n * @returns {Function} Returns the new pass-thru function.\\n * @example\\n *\\n * var func = _.nthArg(1);\\n * func('a', 'b', 'c', 'd');\\n * // => 'b'\\n *\\n * var func = _.nthArg(-2);\\n * func('a', 'b', 'c', 'd');\\n * // => 'c'\\n */\\n function nthArg(n) {\\n n = toInteger(n);\\n return baseRest(function(args) {\\n return baseNth(args, n);\\n });\\n }\\n\\n /**\\n * Creates a function that invokes `iteratees` with the arguments it receives\\n * and returns their results.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\\n * The iteratees to invoke.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var func = _.over([Math.max, Math.min]);\\n *\\n * func(1, 2, 3, 4);\\n * // => [4, 1]\\n */\\n var over = createOver(arrayMap);\\n\\n /**\\n * Creates a function that checks if **all** of the `predicates` return\\n * truthy when invoked with the arguments it receives.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {...(Function|Function[])} [predicates=[_.identity]]\\n * The predicates to check.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var func = _.overEvery([Boolean, isFinite]);\\n *\\n * func('1');\\n * // => true\\n *\\n * func(null);\\n * // => false\\n *\\n * func(NaN);\\n * // => false\\n */\\n var overEvery = createOver(arrayEvery);\\n\\n /**\\n * Creates a function that checks if **any** of the `predicates` return\\n * truthy when invoked with the arguments it receives.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {...(Function|Function[])} [predicates=[_.identity]]\\n * The predicates to check.\\n * @returns {Function} Returns the new function.\\n * @example\\n *\\n * var func = _.overSome([Boolean, isFinite]);\\n *\\n * func('1');\\n * // => true\\n *\\n * func(null);\\n * // => true\\n *\\n * func(NaN);\\n * // => false\\n */\\n var overSome = createOver(arraySome);\\n\\n /**\\n * Creates a function that returns the value at `path` of a given object.\\n *\\n * @static\\n * @memberOf _\\n * @since 2.4.0\\n * @category Util\\n * @param {Array|string} path The path of the property to get.\\n * @returns {Function} Returns the new accessor function.\\n * @example\\n *\\n * var objects = [\\n * { 'a': { 'b': 2 } },\\n * { 'a': { 'b': 1 } }\\n * ];\\n *\\n * _.map(objects, _.property('a.b'));\\n * // => [2, 1]\\n *\\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\\n * // => [1, 2]\\n */\\n function property(path) {\\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\\n }\\n\\n /**\\n * The opposite of `_.property`; this method creates a function that returns\\n * the value at a given path of `object`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.0.0\\n * @category Util\\n * @param {Object} object The object to query.\\n * @returns {Function} Returns the new accessor function.\\n * @example\\n *\\n * var array = [0, 1, 2],\\n * object = { 'a': array, 'b': array, 'c': array };\\n *\\n * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\\n * // => [2, 0]\\n *\\n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\\n * // => [2, 0]\\n */\\n function propertyOf(object) {\\n return function(path) {\\n return object == null ? undefined : baseGet(object, path);\\n };\\n }\\n\\n /**\\n * Creates an array of numbers (positive and/or negative) progressing from\\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\\n * `start` is specified without an `end` or `step`. If `end` is not specified,\\n * it's set to `start` with `start` then set to `0`.\\n *\\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\\n * floating-point values which can produce unexpected results.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {number} [start=0] The start of the range.\\n * @param {number} end The end of the range.\\n * @param {number} [step=1] The value to increment or decrement by.\\n * @returns {Array} Returns the range of numbers.\\n * @see _.inRange, _.rangeRight\\n * @example\\n *\\n * _.range(4);\\n * // => [0, 1, 2, 3]\\n *\\n * _.range(-4);\\n * // => [0, -1, -2, -3]\\n *\\n * _.range(1, 5);\\n * // => [1, 2, 3, 4]\\n *\\n * _.range(0, 20, 5);\\n * // => [0, 5, 10, 15]\\n *\\n * _.range(0, -4, -1);\\n * // => [0, -1, -2, -3]\\n *\\n * _.range(1, 4, 0);\\n * // => [1, 1, 1]\\n *\\n * _.range(0);\\n * // => []\\n */\\n var range = createRange();\\n\\n /**\\n * This method is like `_.range` except that it populates values in\\n * descending order.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {number} [start=0] The start of the range.\\n * @param {number} end The end of the range.\\n * @param {number} [step=1] The value to increment or decrement by.\\n * @returns {Array} Returns the range of numbers.\\n * @see _.inRange, _.range\\n * @example\\n *\\n * _.rangeRight(4);\\n * // => [3, 2, 1, 0]\\n *\\n * _.rangeRight(-4);\\n * // => [-3, -2, -1, 0]\\n *\\n * _.rangeRight(1, 5);\\n * // => [4, 3, 2, 1]\\n *\\n * _.rangeRight(0, 20, 5);\\n * // => [15, 10, 5, 0]\\n *\\n * _.rangeRight(0, -4, -1);\\n * // => [-3, -2, -1, 0]\\n *\\n * _.rangeRight(1, 4, 0);\\n * // => [1, 1, 1]\\n *\\n * _.rangeRight(0);\\n * // => []\\n */\\n var rangeRight = createRange(true);\\n\\n /**\\n * This method returns a new empty array.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.13.0\\n * @category Util\\n * @returns {Array} Returns the new empty array.\\n * @example\\n *\\n * var arrays = _.times(2, _.stubArray);\\n *\\n * console.log(arrays);\\n * // => [[], []]\\n *\\n * console.log(arrays[0] === arrays[1]);\\n * // => false\\n */\\n function stubArray() {\\n return [];\\n }\\n\\n /**\\n * This method returns `false`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.13.0\\n * @category Util\\n * @returns {boolean} Returns `false`.\\n * @example\\n *\\n * _.times(2, _.stubFalse);\\n * // => [false, false]\\n */\\n function stubFalse() {\\n return false;\\n }\\n\\n /**\\n * This method returns a new empty object.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.13.0\\n * @category Util\\n * @returns {Object} Returns the new empty object.\\n * @example\\n *\\n * var objects = _.times(2, _.stubObject);\\n *\\n * console.log(objects);\\n * // => [{}, {}]\\n *\\n * console.log(objects[0] === objects[1]);\\n * // => false\\n */\\n function stubObject() {\\n return {};\\n }\\n\\n /**\\n * This method returns an empty string.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.13.0\\n * @category Util\\n * @returns {string} Returns the empty string.\\n * @example\\n *\\n * _.times(2, _.stubString);\\n * // => ['', '']\\n */\\n function stubString() {\\n return '';\\n }\\n\\n /**\\n * This method returns `true`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.13.0\\n * @category Util\\n * @returns {boolean} Returns `true`.\\n * @example\\n *\\n * _.times(2, _.stubTrue);\\n * // => [true, true]\\n */\\n function stubTrue() {\\n return true;\\n }\\n\\n /**\\n * Invokes the iteratee `n` times, returning an array of the results of\\n * each invocation. The iteratee is invoked with one argument; (index).\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {number} n The number of times to invoke `iteratee`.\\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\\n * @returns {Array} Returns the array of results.\\n * @example\\n *\\n * _.times(3, String);\\n * // => ['0', '1', '2']\\n *\\n * _.times(4, _.constant(0));\\n * // => [0, 0, 0, 0]\\n */\\n function times(n, iteratee) {\\n n = toInteger(n);\\n if (n < 1 || n > MAX_SAFE_INTEGER) {\\n return [];\\n }\\n var index = MAX_ARRAY_LENGTH,\\n length = nativeMin(n, MAX_ARRAY_LENGTH);\\n\\n iteratee = getIteratee(iteratee);\\n n -= MAX_ARRAY_LENGTH;\\n\\n var result = baseTimes(length, iteratee);\\n while (++index < n) {\\n iteratee(index);\\n }\\n return result;\\n }\\n\\n /**\\n * Converts `value` to a property path array.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Util\\n * @param {*} value The value to convert.\\n * @returns {Array} Returns the new property path array.\\n * @example\\n *\\n * _.toPath('a.b.c');\\n * // => ['a', 'b', 'c']\\n *\\n * _.toPath('a[0].b.c');\\n * // => ['a', '0', 'b', 'c']\\n */\\n function toPath(value) {\\n if (isArray(value)) {\\n return arrayMap(value, toKey);\\n }\\n return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\\n }\\n\\n /**\\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Util\\n * @param {string} [prefix=''] The value to prefix the ID with.\\n * @returns {string} Returns the unique ID.\\n * @example\\n *\\n * _.uniqueId('contact_');\\n * // => 'contact_104'\\n *\\n * _.uniqueId();\\n * // => '105'\\n */\\n function uniqueId(prefix) {\\n var id = ++idCounter;\\n return toString(prefix) + id;\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * Adds two numbers.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.4.0\\n * @category Math\\n * @param {number} augend The first number in an addition.\\n * @param {number} addend The second number in an addition.\\n * @returns {number} Returns the total.\\n * @example\\n *\\n * _.add(6, 4);\\n * // => 10\\n */\\n var add = createMathOperation(function(augend, addend) {\\n return augend + addend;\\n }, 0);\\n\\n /**\\n * Computes `number` rounded up to `precision`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.10.0\\n * @category Math\\n * @param {number} number The number to round up.\\n * @param {number} [precision=0] The precision to round up to.\\n * @returns {number} Returns the rounded up number.\\n * @example\\n *\\n * _.ceil(4.006);\\n * // => 5\\n *\\n * _.ceil(6.004, 2);\\n * // => 6.01\\n *\\n * _.ceil(6040, -2);\\n * // => 6100\\n */\\n var ceil = createRound('ceil');\\n\\n /**\\n * Divide two numbers.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.7.0\\n * @category Math\\n * @param {number} dividend The first number in a division.\\n * @param {number} divisor The second number in a division.\\n * @returns {number} Returns the quotient.\\n * @example\\n *\\n * _.divide(6, 4);\\n * // => 1.5\\n */\\n var divide = createMathOperation(function(dividend, divisor) {\\n return dividend / divisor;\\n }, 1);\\n\\n /**\\n * Computes `number` rounded down to `precision`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.10.0\\n * @category Math\\n * @param {number} number The number to round down.\\n * @param {number} [precision=0] The precision to round down to.\\n * @returns {number} Returns the rounded down number.\\n * @example\\n *\\n * _.floor(4.006);\\n * // => 4\\n *\\n * _.floor(0.046, 2);\\n * // => 0.04\\n *\\n * _.floor(4060, -2);\\n * // => 4000\\n */\\n var floor = createRound('floor');\\n\\n /**\\n * Computes the maximum value of `array`. If `array` is empty or falsey,\\n * `undefined` is returned.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @returns {*} Returns the maximum value.\\n * @example\\n *\\n * _.max([4, 2, 8, 6]);\\n * // => 8\\n *\\n * _.max([]);\\n * // => undefined\\n */\\n function max(array) {\\n return (array && array.length)\\n ? baseExtremum(array, identity, baseGt)\\n : undefined;\\n }\\n\\n /**\\n * This method is like `_.max` except that it accepts `iteratee` which is\\n * invoked for each element in `array` to generate the criterion by which\\n * the value is ranked. The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {*} Returns the maximum value.\\n * @example\\n *\\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\\n *\\n * _.maxBy(objects, function(o) { return o.n; });\\n * // => { 'n': 2 }\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.maxBy(objects, 'n');\\n * // => { 'n': 2 }\\n */\\n function maxBy(array, iteratee) {\\n return (array && array.length)\\n ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\\n : undefined;\\n }\\n\\n /**\\n * Computes the mean of the values in `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @returns {number} Returns the mean.\\n * @example\\n *\\n * _.mean([4, 2, 8, 6]);\\n * // => 5\\n */\\n function mean(array) {\\n return baseMean(array, identity);\\n }\\n\\n /**\\n * This method is like `_.mean` except that it accepts `iteratee` which is\\n * invoked for each element in `array` to generate the value to be averaged.\\n * The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.7.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {number} Returns the mean.\\n * @example\\n *\\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\\n *\\n * _.meanBy(objects, function(o) { return o.n; });\\n * // => 5\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.meanBy(objects, 'n');\\n * // => 5\\n */\\n function meanBy(array, iteratee) {\\n return baseMean(array, getIteratee(iteratee, 2));\\n }\\n\\n /**\\n * Computes the minimum value of `array`. If `array` is empty or falsey,\\n * `undefined` is returned.\\n *\\n * @static\\n * @since 0.1.0\\n * @memberOf _\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @returns {*} Returns the minimum value.\\n * @example\\n *\\n * _.min([4, 2, 8, 6]);\\n * // => 2\\n *\\n * _.min([]);\\n * // => undefined\\n */\\n function min(array) {\\n return (array && array.length)\\n ? baseExtremum(array, identity, baseLt)\\n : undefined;\\n }\\n\\n /**\\n * This method is like `_.min` except that it accepts `iteratee` which is\\n * invoked for each element in `array` to generate the criterion by which\\n * the value is ranked. The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {*} Returns the minimum value.\\n * @example\\n *\\n * var objects = [{ 'n': 1 }, { 'n': 2 }];\\n *\\n * _.minBy(objects, function(o) { return o.n; });\\n * // => { 'n': 1 }\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.minBy(objects, 'n');\\n * // => { 'n': 1 }\\n */\\n function minBy(array, iteratee) {\\n return (array && array.length)\\n ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\\n : undefined;\\n }\\n\\n /**\\n * Multiply two numbers.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.7.0\\n * @category Math\\n * @param {number} multiplier The first number in a multiplication.\\n * @param {number} multiplicand The second number in a multiplication.\\n * @returns {number} Returns the product.\\n * @example\\n *\\n * _.multiply(6, 4);\\n * // => 24\\n */\\n var multiply = createMathOperation(function(multiplier, multiplicand) {\\n return multiplier * multiplicand;\\n }, 1);\\n\\n /**\\n * Computes `number` rounded to `precision`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.10.0\\n * @category Math\\n * @param {number} number The number to round.\\n * @param {number} [precision=0] The precision to round to.\\n * @returns {number} Returns the rounded number.\\n * @example\\n *\\n * _.round(4.006);\\n * // => 4\\n *\\n * _.round(4.006, 2);\\n * // => 4.01\\n *\\n * _.round(4060, -2);\\n * // => 4100\\n */\\n var round = createRound('round');\\n\\n /**\\n * Subtract two numbers.\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Math\\n * @param {number} minuend The first number in a subtraction.\\n * @param {number} subtrahend The second number in a subtraction.\\n * @returns {number} Returns the difference.\\n * @example\\n *\\n * _.subtract(6, 4);\\n * // => 2\\n */\\n var subtract = createMathOperation(function(minuend, subtrahend) {\\n return minuend - subtrahend;\\n }, 0);\\n\\n /**\\n * Computes the sum of the values in `array`.\\n *\\n * @static\\n * @memberOf _\\n * @since 3.4.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @returns {number} Returns the sum.\\n * @example\\n *\\n * _.sum([4, 2, 8, 6]);\\n * // => 20\\n */\\n function sum(array) {\\n return (array && array.length)\\n ? baseSum(array, identity)\\n : 0;\\n }\\n\\n /**\\n * This method is like `_.sum` except that it accepts `iteratee` which is\\n * invoked for each element in `array` to generate the value to be summed.\\n * The iteratee is invoked with one argument: (value).\\n *\\n * @static\\n * @memberOf _\\n * @since 4.0.0\\n * @category Math\\n * @param {Array} array The array to iterate over.\\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\\n * @returns {number} Returns the sum.\\n * @example\\n *\\n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\\n *\\n * _.sumBy(objects, function(o) { return o.n; });\\n * // => 20\\n *\\n * // The `_.property` iteratee shorthand.\\n * _.sumBy(objects, 'n');\\n * // => 20\\n */\\n function sumBy(array, iteratee) {\\n return (array && array.length)\\n ? baseSum(array, getIteratee(iteratee, 2))\\n : 0;\\n }\\n\\n /*------------------------------------------------------------------------*/\\n\\n // Add methods that return wrapped values in chain sequences.\\n lodash.after = after;\\n lodash.ary = ary;\\n lodash.assign = assign;\\n lodash.assignIn = assignIn;\\n lodash.assignInWith = assignInWith;\\n lodash.assignWith = assignWith;\\n lodash.at = at;\\n lodash.before = before;\\n lodash.bind = bind;\\n lodash.bindAll = bindAll;\\n lodash.bindKey = bindKey;\\n lodash.castArray = castArray;\\n lodash.chain = chain;\\n lodash.chunk = chunk;\\n lodash.compact = compact;\\n lodash.concat = concat;\\n lodash.cond = cond;\\n lodash.conforms = conforms;\\n lodash.constant = constant;\\n lodash.countBy = countBy;\\n lodash.create = create;\\n lodash.curry = curry;\\n lodash.curryRight = curryRight;\\n lodash.debounce = debounce;\\n lodash.defaults = defaults;\\n lodash.defaultsDeep = defaultsDeep;\\n lodash.defer = defer;\\n lodash.delay = delay;\\n lodash.difference = difference;\\n lodash.differenceBy = differenceBy;\\n lodash.differenceWith = differenceWith;\\n lodash.drop = drop;\\n lodash.dropRight = dropRight;\\n lodash.dropRightWhile = dropRightWhile;\\n lodash.dropWhile = dropWhile;\\n lodash.fill = fill;\\n lodash.filter = filter;\\n lodash.flatMap = flatMap;\\n lodash.flatMapDeep = flatMapDeep;\\n lodash.flatMapDepth = flatMapDepth;\\n lodash.flatten = flatten;\\n lodash.flattenDeep = flattenDeep;\\n lodash.flattenDepth = flattenDepth;\\n lodash.flip = flip;\\n lodash.flow = flow;\\n lodash.flowRight = flowRight;\\n lodash.fromPairs = fromPairs;\\n lodash.functions = functions;\\n lodash.functionsIn = functionsIn;\\n lodash.groupBy = groupBy;\\n lodash.initial = initial;\\n lodash.intersection = intersection;\\n lodash.intersectionBy = intersectionBy;\\n lodash.intersectionWith = intersectionWith;\\n lodash.invert = invert;\\n lodash.invertBy = invertBy;\\n lodash.invokeMap = invokeMap;\\n lodash.iteratee = iteratee;\\n lodash.keyBy = keyBy;\\n lodash.keys = keys;\\n lodash.keysIn = keysIn;\\n lodash.map = map;\\n lodash.mapKeys = mapKeys;\\n lodash.mapValues = mapValues;\\n lodash.matches = matches;\\n lodash.matchesProperty = matchesProperty;\\n lodash.memoize = memoize;\\n lodash.merge = merge;\\n lodash.mergeWith = mergeWith;\\n lodash.method = method;\\n lodash.methodOf = methodOf;\\n lodash.mixin = mixin;\\n lodash.negate = negate;\\n lodash.nthArg = nthArg;\\n lodash.omit = omit;\\n lodash.omitBy = omitBy;\\n lodash.once = once;\\n lodash.orderBy = orderBy;\\n lodash.over = over;\\n lodash.overArgs = overArgs;\\n lodash.overEvery = overEvery;\\n lodash.overSome = overSome;\\n lodash.partial = partial;\\n lodash.partialRight = partialRight;\\n lodash.partition = partition;\\n lodash.pick = pick;\\n lodash.pickBy = pickBy;\\n lodash.property = property;\\n lodash.propertyOf = propertyOf;\\n lodash.pull = pull;\\n lodash.pullAll = pullAll;\\n lodash.pullAllBy = pullAllBy;\\n lodash.pullAllWith = pullAllWith;\\n lodash.pullAt = pullAt;\\n lodash.range = range;\\n lodash.rangeRight = rangeRight;\\n lodash.rearg = rearg;\\n lodash.reject = reject;\\n lodash.remove = remove;\\n lodash.rest = rest;\\n lodash.reverse = reverse;\\n lodash.sampleSize = sampleSize;\\n lodash.set = set;\\n lodash.setWith = setWith;\\n lodash.shuffle = shuffle;\\n lodash.slice = slice;\\n lodash.sortBy = sortBy;\\n lodash.sortedUniq = sortedUniq;\\n lodash.sortedUniqBy = sortedUniqBy;\\n lodash.split = split;\\n lodash.spread = spread;\\n lodash.tail = tail;\\n lodash.take = take;\\n lodash.takeRight = takeRight;\\n lodash.takeRightWhile = takeRightWhile;\\n lodash.takeWhile = takeWhile;\\n lodash.tap = tap;\\n lodash.throttle = throttle;\\n lodash.thru = thru;\\n lodash.toArray = toArray;\\n lodash.toPairs = toPairs;\\n lodash.toPairsIn = toPairsIn;\\n lodash.toPath = toPath;\\n lodash.toPlainObject = toPlainObject;\\n lodash.transform = transform;\\n lodash.unary = unary;\\n lodash.union = union;\\n lodash.unionBy = unionBy;\\n lodash.unionWith = unionWith;\\n lodash.uniq = uniq;\\n lodash.uniqBy = uniqBy;\\n lodash.uniqWith = uniqWith;\\n lodash.unset = unset;\\n lodash.unzip = unzip;\\n lodash.unzipWith = unzipWith;\\n lodash.update = update;\\n lodash.updateWith = updateWith;\\n lodash.values = values;\\n lodash.valuesIn = valuesIn;\\n lodash.without = without;\\n lodash.words = words;\\n lodash.wrap = wrap;\\n lodash.xor = xor;\\n lodash.xorBy = xorBy;\\n lodash.xorWith = xorWith;\\n lodash.zip = zip;\\n lodash.zipObject = zipObject;\\n lodash.zipObjectDeep = zipObjectDeep;\\n lodash.zipWith = zipWith;\\n\\n // Add aliases.\\n lodash.entries = toPairs;\\n lodash.entriesIn = toPairsIn;\\n lodash.extend = assignIn;\\n lodash.extendWith = assignInWith;\\n\\n // Add methods to `lodash.prototype`.\\n mixin(lodash, lodash);\\n\\n /*------------------------------------------------------------------------*/\\n\\n // Add methods that return unwrapped values in chain sequences.\\n lodash.add = add;\\n lodash.attempt = attempt;\\n lodash.camelCase = camelCase;\\n lodash.capitalize = capitalize;\\n lodash.ceil = ceil;\\n lodash.clamp = clamp;\\n lodash.clone = clone;\\n lodash.cloneDeep = cloneDeep;\\n lodash.cloneDeepWith = cloneDeepWith;\\n lodash.cloneWith = cloneWith;\\n lodash.conformsTo = conformsTo;\\n lodash.deburr = deburr;\\n lodash.defaultTo = defaultTo;\\n lodash.divide = divide;\\n lodash.endsWith = endsWith;\\n lodash.eq = eq;\\n lodash.escape = escape;\\n lodash.escapeRegExp = escapeRegExp;\\n lodash.every = every;\\n lodash.find = find;\\n lodash.findIndex = findIndex;\\n lodash.findKey = findKey;\\n lodash.findLast = findLast;\\n lodash.findLastIndex = findLastIndex;\\n lodash.findLastKey = findLastKey;\\n lodash.floor = floor;\\n lodash.forEach = forEach;\\n lodash.forEachRight = forEachRight;\\n lodash.forIn = forIn;\\n lodash.forInRight = forInRight;\\n lodash.forOwn = forOwn;\\n lodash.forOwnRight = forOwnRight;\\n lodash.get = get;\\n lodash.gt = gt;\\n lodash.gte = gte;\\n lodash.has = has;\\n lodash.hasIn = hasIn;\\n lodash.head = head;\\n lodash.identity = identity;\\n lodash.includes = includes;\\n lodash.indexOf = indexOf;\\n lodash.inRange = inRange;\\n lodash.invoke = invoke;\\n lodash.isArguments = isArguments;\\n lodash.isArray = isArray;\\n lodash.isArrayBuffer = isArrayBuffer;\\n lodash.isArrayLike = isArrayLike;\\n lodash.isArrayLikeObject = isArrayLikeObject;\\n lodash.isBoolean = isBoolean;\\n lodash.isBuffer = isBuffer;\\n lodash.isDate = isDate;\\n lodash.isElement = isElement;\\n lodash.isEmpty = isEmpty;\\n lodash.isEqual = isEqual;\\n lodash.isEqualWith = isEqualWith;\\n lodash.isError = isError;\\n lodash.isFinite = isFinite;\\n lodash.isFunction = isFunction;\\n lodash.isInteger = isInteger;\\n lodash.isLength = isLength;\\n lodash.isMap = isMap;\\n lodash.isMatch = isMatch;\\n lodash.isMatchWith = isMatchWith;\\n lodash.isNaN = isNaN;\\n lodash.isNative = isNative;\\n lodash.isNil = isNil;\\n lodash.isNull = isNull;\\n lodash.isNumber = isNumber;\\n lodash.isObject = isObject;\\n lodash.isObjectLike = isObjectLike;\\n lodash.isPlainObject = isPlainObject;\\n lodash.isRegExp = isRegExp;\\n lodash.isSafeInteger = isSafeInteger;\\n lodash.isSet = isSet;\\n lodash.isString = isString;\\n lodash.isSymbol = isSymbol;\\n lodash.isTypedArray = isTypedArray;\\n lodash.isUndefined = isUndefined;\\n lodash.isWeakMap = isWeakMap;\\n lodash.isWeakSet = isWeakSet;\\n lodash.join = join;\\n lodash.kebabCase = kebabCase;\\n lodash.last = last;\\n lodash.lastIndexOf = lastIndexOf;\\n lodash.lowerCase = lowerCase;\\n lodash.lowerFirst = lowerFirst;\\n lodash.lt = lt;\\n lodash.lte = lte;\\n lodash.max = max;\\n lodash.maxBy = maxBy;\\n lodash.mean = mean;\\n lodash.meanBy = meanBy;\\n lodash.min = min;\\n lodash.minBy = minBy;\\n lodash.stubArray = stubArray;\\n lodash.stubFalse = stubFalse;\\n lodash.stubObject = stubObject;\\n lodash.stubString = stubString;\\n lodash.stubTrue = stubTrue;\\n lodash.multiply = multiply;\\n lodash.nth = nth;\\n lodash.noConflict = noConflict;\\n lodash.noop = noop;\\n lodash.now = now;\\n lodash.pad = pad;\\n lodash.padEnd = padEnd;\\n lodash.padStart = padStart;\\n lodash.parseInt = parseInt;\\n lodash.random = random;\\n lodash.reduce = reduce;\\n lodash.reduceRight = reduceRight;\\n lodash.repeat = repeat;\\n lodash.replace = replace;\\n lodash.result = result;\\n lodash.round = round;\\n lodash.runInContext = runInContext;\\n lodash.sample = sample;\\n lodash.size = size;\\n lodash.snakeCase = snakeCase;\\n lodash.some = some;\\n lodash.sortedIndex = sortedIndex;\\n lodash.sortedIndexBy = sortedIndexBy;\\n lodash.sortedIndexOf = sortedIndexOf;\\n lodash.sortedLastIndex = sortedLastIndex;\\n lodash.sortedLastIndexBy = sortedLastIndexBy;\\n lodash.sortedLastIndexOf = sortedLastIndexOf;\\n lodash.startCase = startCase;\\n lodash.startsWith = startsWith;\\n lodash.subtract = subtract;\\n lodash.sum = sum;\\n lodash.sumBy = sumBy;\\n lodash.template = template;\\n lodash.times = times;\\n lodash.toFinite = toFinite;\\n lodash.toInteger = toInteger;\\n lodash.toLength = toLength;\\n lodash.toLower = toLower;\\n lodash.toNumber = toNumber;\\n lodash.toSafeInteger = toSafeInteger;\\n lodash.toString = toString;\\n lodash.toUpper = toUpper;\\n lodash.trim = trim;\\n lodash.trimEnd = trimEnd;\\n lodash.trimStart = trimStart;\\n lodash.truncate = truncate;\\n lodash.unescape = unescape;\\n lodash.uniqueId = uniqueId;\\n lodash.upperCase = upperCase;\\n lodash.upperFirst = upperFirst;\\n\\n // Add aliases.\\n lodash.each = forEach;\\n lodash.eachRight = forEachRight;\\n lodash.first = head;\\n\\n mixin(lodash, (function() {\\n var source = {};\\n baseForOwn(lodash, function(func, methodName) {\\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\\n source[methodName] = func;\\n }\\n });\\n return source;\\n }()), { 'chain': false });\\n\\n /*------------------------------------------------------------------------*/\\n\\n /**\\n * The semantic version number.\\n *\\n * @static\\n * @memberOf _\\n * @type {string}\\n */\\n lodash.VERSION = VERSION;\\n\\n // Assign default placeholders.\\n arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\\n lodash[methodName].placeholder = lodash;\\n });\\n\\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\\n arrayEach(['drop', 'take'], function(methodName, index) {\\n LazyWrapper.prototype[methodName] = function(n) {\\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\\n\\n var result = (this.__filtered__ && !index)\\n ? new LazyWrapper(this)\\n : this.clone();\\n\\n if (result.__filtered__) {\\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\\n } else {\\n result.__views__.push({\\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\\n });\\n }\\n return result;\\n };\\n\\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\\n return this.reverse()[methodName](n).reverse();\\n };\\n });\\n\\n // Add `LazyWrapper` methods that accept an `iteratee` value.\\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\\n var type = index + 1,\\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\\n\\n LazyWrapper.prototype[methodName] = function(iteratee) {\\n var result = this.clone();\\n result.__iteratees__.push({\\n 'iteratee': getIteratee(iteratee, 3),\\n 'type': type\\n });\\n result.__filtered__ = result.__filtered__ || isFilter;\\n return result;\\n };\\n });\\n\\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\\n arrayEach(['head', 'last'], function(methodName, index) {\\n var takeName = 'take' + (index ? 'Right' : '');\\n\\n LazyWrapper.prototype[methodName] = function() {\\n return this[takeName](1).value()[0];\\n };\\n });\\n\\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\\n arrayEach(['initial', 'tail'], function(methodName, index) {\\n var dropName = 'drop' + (index ? '' : 'Right');\\n\\n LazyWrapper.prototype[methodName] = function() {\\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\\n };\\n });\\n\\n LazyWrapper.prototype.compact = function() {\\n return this.filter(identity);\\n };\\n\\n LazyWrapper.prototype.find = function(predicate) {\\n return this.filter(predicate).head();\\n };\\n\\n LazyWrapper.prototype.findLast = function(predicate) {\\n return this.reverse().find(predicate);\\n };\\n\\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\\n if (typeof path == 'function') {\\n return new LazyWrapper(this);\\n }\\n return this.map(function(value) {\\n return baseInvoke(value, path, args);\\n });\\n });\\n\\n LazyWrapper.prototype.reject = function(predicate) {\\n return this.filter(negate(getIteratee(predicate)));\\n };\\n\\n LazyWrapper.prototype.slice = function(start, end) {\\n start = toInteger(start);\\n\\n var result = this;\\n if (result.__filtered__ && (start > 0 || end < 0)) {\\n return new LazyWrapper(result);\\n }\\n if (start < 0) {\\n result = result.takeRight(-start);\\n } else if (start) {\\n result = result.drop(start);\\n }\\n if (end !== undefined) {\\n end = toInteger(end);\\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\\n }\\n return result;\\n };\\n\\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\\n return this.reverse().takeWhile(predicate).reverse();\\n };\\n\\n LazyWrapper.prototype.toArray = function() {\\n return this.take(MAX_ARRAY_LENGTH);\\n };\\n\\n // Add `LazyWrapper` methods to `lodash.prototype`.\\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\\n isTaker = /^(?:head|last)$/.test(methodName),\\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\\n retUnwrapped = isTaker || /^find/.test(methodName);\\n\\n if (!lodashFunc) {\\n return;\\n }\\n lodash.prototype[methodName] = function() {\\n var value = this.__wrapped__,\\n args = isTaker ? [1] : arguments,\\n isLazy = value instanceof LazyWrapper,\\n iteratee = args[0],\\n useLazy = isLazy || isArray(value);\\n\\n var interceptor = function(value) {\\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\\n return (isTaker && chainAll) ? result[0] : result;\\n };\\n\\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\\n // Avoid lazy use if the iteratee has a \\\"length\\\" value other than `1`.\\n isLazy = useLazy = false;\\n }\\n var chainAll = this.__chain__,\\n isHybrid = !!this.__actions__.length,\\n isUnwrapped = retUnwrapped && !chainAll,\\n onlyLazy = isLazy && !isHybrid;\\n\\n if (!retUnwrapped && useLazy) {\\n value = onlyLazy ? value : new LazyWrapper(this);\\n var result = func.apply(value, args);\\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\\n return new LodashWrapper(result, chainAll);\\n }\\n if (isUnwrapped && onlyLazy) {\\n return func.apply(this, args);\\n }\\n result = this.thru(interceptor);\\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\\n };\\n });\\n\\n // Add `Array` methods to `lodash.prototype`.\\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\\n var func = arrayProto[methodName],\\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\\n\\n lodash.prototype[methodName] = function() {\\n var args = arguments;\\n if (retUnwrapped && !this.__chain__) {\\n var value = this.value();\\n return func.apply(isArray(value) ? value : [], args);\\n }\\n return this[chainName](function(value) {\\n return func.apply(isArray(value) ? value : [], args);\\n });\\n };\\n });\\n\\n // Map minified method names to their real names.\\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\\n var lodashFunc = lodash[methodName];\\n if (lodashFunc) {\\n var key = (lodashFunc.name + ''),\\n names = realNames[key] || (realNames[key] = []);\\n\\n names.push({ 'name': methodName, 'func': lodashFunc });\\n }\\n });\\n\\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\\n 'name': 'wrapper',\\n 'func': undefined\\n }];\\n\\n // Add methods to `LazyWrapper`.\\n LazyWrapper.prototype.clone = lazyClone;\\n LazyWrapper.prototype.reverse = lazyReverse;\\n LazyWrapper.prototype.value = lazyValue;\\n\\n // Add chain sequence methods to the `lodash` wrapper.\\n lodash.prototype.at = wrapperAt;\\n lodash.prototype.chain = wrapperChain;\\n lodash.prototype.commit = wrapperCommit;\\n lodash.prototype.next = wrapperNext;\\n lodash.prototype.plant = wrapperPlant;\\n lodash.prototype.reverse = wrapperReverse;\\n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\\n\\n // Add lazy aliases.\\n lodash.prototype.first = lodash.prototype.head;\\n\\n if (symIterator) {\\n lodash.prototype[symIterator] = wrapperToIterator;\\n }\\n return lodash;\\n });\\n\\n /*--------------------------------------------------------------------------*/\\n\\n // Export lodash.\\n var _ = runInContext();\\n\\n // Some AMD build optimizers, like r.js, check for condition patterns like:\\n if (true) {\\n // Expose Lodash on the global object to prevent errors when Lodash is\\n // loaded by a script tag in the presence of an AMD loader.\\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\\n // Use `_.noConflict` to remove Lodash from the global object.\\n root._ = _;\\n\\n // Define as an anonymous module so, through path mapping, it can be\\n // referenced as the \\\"underscore\\\" module.\\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function() {\\n return _;\\n }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\n }\\n // Check for `exports` after `define` in case a build optimizer adds it.\\n else if (freeModule) {\\n // Export for Node.js.\\n (freeModule.exports = _)._ = _;\\n // Export for CommonJS support.\\n freeExports._ = _;\\n }\\n else {\\n // Export to the global object.\\n root._ = _;\\n }\\n}.call(this));\\n\\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4), __webpack_require__(28)(module)))//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L2xvZGFzaC9sb2Rhc2guanM/MDNjYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBsaWNlbnNlXG4gKiBMb2Rhc2ggPGh0dHBzOi8vbG9kYXNoLmNvbS8+XG4gKiBDb3B5cmlnaHQgSlMgRm91bmRhdGlvbiBhbmQgb3RoZXIgY29udHJpYnV0b3JzIDxodHRwczovL2pzLmZvdW5kYXRpb24vPlxuICogUmVsZWFzZWQgdW5kZXIgTUlUIGxpY2Vuc2UgPGh0dHBzOi8vbG9kYXNoLmNvbS9saWNlbnNlPlxuICogQmFzZWQgb24gVW5kZXJzY29yZS5qcyAxLjguMyA8aHR0cDovL3VuZGVyc2NvcmVqcy5vcmcvTElDRU5TRT5cbiAqIENvcHlyaWdodCBKZXJlbXkgQXNoa2VuYXMsIERvY3VtZW50Q2xvdWQgYW5kIEludmVzdGlnYXRpdmUgUmVwb3J0ZXJzICYgRWRpdG9yc1xuICovXG47KGZ1bmN0aW9uKCkge1xuXG4gIC8qKiBVc2VkIGFzIGEgc2FmZSByZWZlcmVuY2UgZm9yIGB1bmRlZmluZWRgIGluIHByZS1FUzUgZW52aXJvbm1lbnRzLiAqL1xuICB2YXIgdW5kZWZpbmVkO1xuXG4gIC8qKiBVc2VkIGFzIHRoZSBzZW1hbnRpYyB2ZXJzaW9uIG51bWJlci4gKi9cbiAgdmFyIFZFUlNJT04gPSAnNC4xNy40JztcblxuICAvKiogVXNlZCBhcyB0aGUgc2l6ZSB0byBlbmFibGUgbGFyZ2UgYXJyYXkgb3B0aW1pemF0aW9ucy4gKi9cbiAgdmFyIExBUkdFX0FSUkFZX1NJWkUgPSAyMDA7XG5cbiAgLyoqIEVyc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gICAgICAgICAgbGVuZ3RoID0gcGF0aHMubGVuZ3RoLFxuICAgICAgICAgIHJlc3VsdCA9IEFycmF5KGxlbmd0aCksXG4gICAgICAgICAgc2tpcCA9IG9iamVjdCA9PSBudWxsO1xuXG4gICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkge1xuICAgICAgICByZXN1bHRbaW5kZXhdID0gc2tpcCA/IHVuZGVmaW5lZCA6IGdldChvYmplY3QsIHBhdGhzW2luZGV4XSk7XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmNsYW1wYCB3aGljaCBkb2Vzbid0IGNvZXJjZSBhcmd1bWVudHMuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7bnVtYmVyfSBudW1iZXIgVGhlIG51bWJlciB0byBjbGFtcC5cbiAgICAgKiBAcGFyYW0ge251bWJlcn0gW2xvd2VyXSBUaGUgbG93ZXIgYm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IHVwcGVyIFRoZSB1cHBlciBib3VuZC5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSBjbGFtcGVkIG51bWJlci5cbiAgICAgKi9cbiAgICBmdW5jdGlvbiBiYXNlQ2xhbXAobnVtYmVyLCBsb3dlciwgdXBwZXIpIHtcbiAgICAgIGlmIChudW1iZXIgPT09IG51bWJlcikge1xuICAgICAgICBpZiAodXBwZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIG51bWJlciA9IG51bWJlciA8PSB1cHBlciA/IG51bWJlciA6IHVwcGVyO1xuICAgICAgICB9XG4gICAgICAgIGlmIChsb3dlciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgbnVtYmVyID0gbnVtYmVyID49IGxvd2VyID8gbnVtYmVyIDogbG93ZXI7XG4gICA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JheVtpbmRleF0sXG4gICAgICAgICAgICBjb21wdXRlZCA9IGl0ZXJhdGVlID8gaXRlcmF0ZWUodmFsdWUpIDogdmFsdWU7XG5cbiAgICAgICAgdmFsdWUgPSAoY29tcGFyYXRvciB8fCB2YWx1ZSAhPT0gMCkgPyB2YWx1ZSA6IDA7XG4gICAgICAgIGlmICghKHNlZW5cbiAgICAgICAgICAgICAgPyBjYWNoZUhhcyhzZWVuLCBjb21wdXRlZClcbiAgICAgICAgICAgICAgOiBpbmNsdWRlcyhyZXN1bHQsIGNvbXB1dGVkLCBjb21wYXJhdG9yKVxuICAgICAgICAgICAgKSkge1xuICAgICAgICAgIG90aEluZGV4ID0gb3RoTGVuZ3RoO1xuICAgICAgICAgIHdoaWxlICgtLW90aEluZGV4KSB7XG4gICAgICAgICAgICB2YXIgY2FjaGUgPSBjYWNoZXNbb3RoSW5kZXhdO1xuICAgICAgICAgICAgaWYgKCEoY2FjaGVcbiAgICAgICAgICAgICAgICAgID8gY2FjaGVIYXMoY2FjaGUsIGNvbXB1dGVkKVxuICAgICAgICAgICAgICAgICAgOiBpbmNsdWRlcyhhcnJheXNbb3RoSW5kZXhdLCBjb21wdXRlZCwgY29tcGFyYXRvcikpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc2Vlbikge1xuICAgICAgICAgICAgc2Vlbi5wdXNoKGNvbXB1dGVkKTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmludmVydGAgYW5kIGBfLmludmVydEJ5YCB3aGljaCBpbnZlcnRzXG4gICAgICogYG9iamVjdGAgd2l0aCB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ICAgIHN0YWNrIHx8IChzdGFjayA9IG5ldyBTdGFjayk7XG4gICAgICAgIHJldHVybiAob2JqSXNBcnIgfHwgaXNUeXBlZEFycmF5KG9iamVjdCkpXG4gICAgICAgICAgPyBlcXVhbEFycmF5cyhvYmplY3QsIG90aGVyLCBiaXRtYXNrLCBjdXN0b21pemVyLCBlcXVhbEZ1bmMsIHN0YWNrKVxuICAgICAgICAgIDogZXF1YWxCeVRhZyhvYmplY3QsIG90aGVyLCBvYmpUYWcsIGJpdG1hc2ssIGN1c3RvbWl6ZXIsIGVxdWFsRnVuYywgc3RhY2spO1xuICAgICAgfVxuICAgICAgaWYgKCEoYml0bWFzayAmIENPTVBBUkVfUEFSVElBTF9GTEFHKSkge1xuICAgICAgICB2YXIgb2JqSXNXcmFwcGVkID0gb2JqSXNPYmogJiYgaGFzT3duUHJvcGVydHkuY2FsbChvYmplY3QsICdfX3dyYXBwZWRfXycpLFxuICAgICAgICAgICAgb3RoSXNXcmFwcGVkID0gb3RoSXNPYmogJiYgaGFzT3duUHJvcGVydHkuY2FsbChvdGhlciwgJ19fd3JhcHBlZF9fJyk7XG5cbiAgICAgICAgaWYgKG9iaklzV3JhcHBlZCB8fCBvdGhJc1dyYXBwZWQpIHtcbiAgICAgICAgICB2YXIgb2JqVW53cmFwcGVkID0gb2JqSXNXcmFwcGVkID8gb2JqZWN0LnZhbHVlKCkgOiBvYmplY3QsXG4gICAgICAgICAgICAgIG90aFVud3JhcHBlZCA9IG90aElzV3JhcHBlZCA/IG90aGVyLnZhbHVlKCkgOiBvdGhlcjtcblxuICAgICAgICAgIHN0YWNrIHx8IChzdGFjayA9IG5ldyBTdGFjayk7XG4gICAgICAgICAgcmV0dXJuIGVxdWFsRnVuYyhvYmpVbndyYXBwZWQsIG90aFVud3JhcHBlZCwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoIWlzU2FtZVRhZykge1xuICAgICAgICByZXR1cm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gICAgICBzcmNWYWx1ZSA9IGRhdGFbMV07XG5cbiAgICAgICAgaWYgKG5vQ3VzdG9taXplciAmJiBkYXRhWzJdKSB7XG4gICAgICAgICAgaWYgKG9ialZhbHVlID09PSB1bmRlZmluZWQgJiYgIShrZXkgaW4gb2JqZWN0KSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB2YXIgc3RhY2sgPSBuZXcgU3RhY2s7XG4gICAgICAgICAgaWYgKGN1c3RvbWl6ZXIpIHtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBjdXN0b21pemVyKG9ialZhbHVlLCBzcmNWYWx1ZSwga2V5LCBvYmplY3QsIHNvdXJjZSwgc3RhY2spO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoIShyZXN1bHQgPT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgID8gYmFzZUlzRXF1YWwoc3JjVmFsdWUsIG9ialZhbHVlLCBDT01QQVJFX1BBUlRJQUxfRkxBRyB8IENPTVBBUkVfVU5PUkRFUkVEX0ZMQUcsIGN1c3RvbWl6ZXIsIHN0YWNrKVxuICAgICAgICAgICAgICAgIDogcmVzdWx0XG4gICAgICAgICAgICAgICkpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmlzTmF0aXZlYCB3aXRob3V0IGJhZCBzaGltIGNoZWNrcy5cbiAgICAgKlxuICAgICAqIEBwcml2YXRlXG4gICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2hlY2suXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGB2YWx1ZWAgaX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bGUgKHNlZW5JbmRleC0tKSB7XG4gICAgICAgICAgICBpZiAoc2VlbltzZWVuSW5kZXhdID09PSBjb21wdXRlZCkge1xuICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGl0ZXJhdGVlKSB7XG4gICAgICAgICAgICBzZWVuLnB1c2goY29tcHV0ZWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAoIWluY2x1ZGVzKHNlZW4sIGNvbXB1dGVkLCBjb21wYXJhdG9yKSkge1xuICAgICAgICAgIGlmIChzZWVuICE9PSByZXN1bHQpIHtcbiAgICAgICAgICAgIHNlZW4ucHVzaChjb21wdXRlZCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBUaGUgYmFzZSBpbXBsZW1lbnRhdGlvbiBvZiBgXy51bnNldGAuXG4gICAgICpcbiAgICAgKiBAcHJpdmF0ZVxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBtb2RpZnkuXG4gICAgICogQHBhcmFtIHtBcnJheXxzdHJpbmd9IHBhdGggVGhlIHByb3BlcnR5IHBhdGggdG8gdW5zZXQuXG4gICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIHRoZSBwcm9wZXJ0eSBpcyBkZWxldGVkLCBlbHNlIGBmYWxzZWAuXG4gICAgICovXG4gICAgZnVuY3Rpb24gYmFzZVVuc2V0KG9iamVjdCwgcGF0aCkge1xuICAgICAgcGF0aCA9IGNhc3RQYXRoKHBhdGgsIG9iamVjdCk7XG4gICAgICBvYmplY3QgPSB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AgICAgICByZXR1cm4gc3RhY2tlZCA9PSBvdGhlcjtcbiAgICAgIH1cbiAgICAgIHZhciBpbmRleCA9IC0xLFxuICAgICAgICAgIHJlc3VsdCA9IHRydWUsXG4gICAgICAgICAgc2VlbiA9IChiaXRtYXNrICYgQ09NUEFSRV9VTk9SREVSRURfRkxBRykgPyBuZXcgU2V0Q2FjaGUgOiB1bmRlZmluZWQ7XG5cbiAgICAgIHN0YWNrLnNldChhcnJheSwgb3RoZXIpO1xuICAgICAgc3RhY2suc2V0KG90aGVyLCBhcnJheSk7XG5cbiAgICAgIC8vIElnbm9yZSBub24taW5kZXggcHJvcGVydGllcy5cbiAgICAgIHdoaWxlICgrK2luZGV4IDwgYXJyTGVuZ3RoKSB7XG4gICAgICAgIHZhciBhcnJWYWx1ZSA9IGFycmF5W2luZGV4XSxcbiAgICAgICAgICAgIG90aFZhbHVlID0gb3RoZXJbaW5kZXhdO1xuXG4gICAgICAgIGlmIChjdXN0b21pemVyKSB7XG4gICAgICAgICAgdmFyIGNvbXBhcmVkID0gaXNQYXJ0aWFsXG4gICAgICAgICAgICA/IGN1c3RvbWl6ZXIob3RoVmFsdWUsIGFyclZhbHVlLCBpbmRleCwgb3RoZXIsIGFycmF5LCBzdGFjaylcbiAgICAgICAgICAgIDogY3VzdG9taXplcihhcnJWYWx1ZSwgb3RoVmFsdWUsIGluZGV4LCBhcnJheSwgb3RoZXIsIHN0YWNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29tcGFyZWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIGlmIChjb21wYXJlZCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJlc3VsdCA9IGZhbHNlO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIC8vIFJlY3Vyc2l2ZWx5IGNvbXBhcmUgYXJyYXlzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0cykuXG4gICAgICAgIGlmIChzZWVuKSB7XG4gICAgICAgICAgaWYgKCFhcnJheVNvbWUob3RoZXIsIGZ1bmN0aW9uKG90aFZhbHVlLCBvdGhJbmRleCkge1xuICAgICAgICAgICAgICAgIGlmICghY2FjaGVIYXMoc2Vlbiwgb3RoSW5kZXgpICYmXG4gICAgICAgICAgICAgICAgICAgIChhcnJWYWx1ZSA9PT0gb3RoVmFsdWUgfHwgZXF1YWxGdW5jKGFyclZhbHVlLCBvdGhWYWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spKSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHNlZW4ucHVzaChvdGhJbmRleCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KSkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoIShcbiAgICAgICAgICAgICAgYXJyVmFsdWUgPT09IG90aFZhbHVlIHx8XG4gICAgICAgICAgICAgICAgZXF1YWxGdW5jKGFyclZhbHVlLCBvdGhWYWx1ZSwgYml0bWFzaywgY3VzdG9taXplciwgc3RhY2spXG4gICAgICAgICAgICApKSB7XG4gICAgICAgICAgcmVzdWx0ID0gZmFsc2U7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIHN0YWNrWydkZWxldGUnXShhcnJheSk7XG4gICAgICBzdGFja1snZGVsZXRlJ10ob3RoZXIpO1xuICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBBIHNwZWNpYWxpemVkIHZlcnNpb24gb2YgYGJhc2VJc0VxdWFsRGVlcGAgZm9yIGNvbXBhcmluZyBvYmplY3RzIG9mXG4gICAgICogdGhlIHNhbWUgYHRvU3RyaW5nVGFnYC5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIGZ1bmN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lgIHdpdGggYG5gIGVsZW1lbnRzIHRha2VuIGZyb20gdGhlIGVuZC5cbiAgICAgKlxuICAgICAqIEBzdGF0aWNcbiAgICAgKiBAbWVtYmVyT2YgX1xuICAgICAqIEBzaW5jZSAzLjAuMFxuICAgICAqIEBjYXRlZ29yeSBBcnJheVxuICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBxdWVyeS5cbiAgICAgKiBAcGFyYW0ge251bWJlcn0gW249MV0gVGhlIG51bWJlciBvZiBlbGVtZW50cyB0byB0YWtlLlxuICAgICAqIEBwYXJhbS0ge09iamVjdH0gW2d1YXJkXSBFbmFibGVzIHVzZSBhcyBhbiBpdGVyYXRlZSBmb3IgbWV0aG9kcyBsaWtlIGBfLm1hcGAuXG4gICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIHRoZSBzbGljZSBvZiBgYXJyYXlgLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBfLnRha2VSaWdodChbMSwgMiwgM10pO1xuICAgICAqIC8vID0+IFszXVxuICAgICAqXG4gICAgICogXy50YWtlUmlnaHQoWzEsIDIsIDNdLCAyKTtcbiAgICAgKiAvLyA9PiBbMiwgM11cbiAgICAgKlxuICAgICAqIF8udGFrZVJpZ2h0KFsxLCAyLCAzXSwgNSk7XG4gICAgICogLy8gPT4gWzEsIDIsIDNdXG4gICAgICpcbiAgICAgKiBfLnRha2VSaWdodChbMSwgMiwgM10sIDApO1xuICAgICAqIC8vID0+IFtdXG4gICAgICovXG4gICAgZnVuY3Rpb24gdGFrZVJpZ2h0KGFycmF5LCBuLCBndWFyZCkge1xuICAgICAgdmFyIGxlbmd0aCA9IGFycmF5ID09IG51bGwgPyAwIDogYXJyYXkubGVuZ3RoO1xuICAgICAgaWYgKCFsZW5ndGgpIHtcbiAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgfVxuICAgICAgbiA9IChndWFyZCB8fCBuID09PSB1bmRlZmluZWQpID8gMS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VhbScpO1xuICAgICAqIGpRdWVyeShzb3VyY2UpLm9uKCdtZXNzYWdlJywgZGVib3VuY2VkKTtcbiAgICAgKlxuICAgICAqIC8vIENhbmNlbCB0aGUgdHJhaWxpbmcgZGVib3VuY2VkIGludm9jYXRpb24uXG4gICAgICogalF1ZXJ5KHdpbmRvdykub24oJ3BvcHN0YXRlJywgZGVib3VuY2VkLmNhbmNlbCk7XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGVib3VuY2UoZnVuYywgd2FpdCwgb3B0aW9ucykge1xuICAgICAgdmFyIGxhc3RBcmdzLFxuICAgICAgICAgIGxhc3RUaGlzLFxuICAgICAgICAgIG1heFdhaXQsXG4gICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgIHRpbWVySWQsXG4gICAgICAgICAgbGFzdENhbGxUaW1lLFxuICAgICAgICAgIGxhc3RJbnZva2VUaW1lID0gMCxcbiAgICAgICAgICBsZWFkaW5nID0gZmFsc2UsXG4gICAgICAgICAgbWF4aW5nID0gZmFsc2UsXG4gICAgICAgICAgdHJhaWxpbmcgPSB0cnVlO1xuXG4gICAgICBpZiAodHlwZW9mIGZ1bmMgIT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKEZVTkNfRVJST1JfVEVYVCk7XG4gICAgICB9XG4gICAgICB3YWl0ID0gdG9OdW1iZXIod2FpdCkgfHwgMDtcbiAgICAgIGlmIChpc09iamVjdChvcHRpb25zKSkge1xuICAgICAgICBsZWFkaW5nID0gISFvcHRpb25zLmxlYWRpbmc7XG4gICAgICAgIG1heGluZyA9ICdtYXhXYWl0JyBpbiBvcHRpb25zO1xuICAgICAgICBtYXhXYWl0ID0gbWF4aW5nID8gbmF0aXZlTWF4KHRvTnVtYmVyKG9wdGlvbnMubWF4V2FpdCkgfHwgMCwgd2FpdCkgOiBtYXhXYWl0O1xuICAgICAgICB0cmFpbGluZyA9ICd0cmFpbGluZycgaW4gb3B0aW9ucyA/ICEhb3B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VudCwgZWxzZSBgZmFsc2VgLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBpc0dyZWV0aW5nKHZhbHVlKSB7XG4gICAgICogICByZXR1cm4gL15oKD86aXxlbGxvKSQvLnRlc3QodmFsdWUpO1xuICAgICAqIH1cbiAgICAgKlxuICAgICAqIGZ1bmN0aW9uIGN1c3RvbWl6ZXIob2JqVmFsdWUsIG90aFZhbHVlKSB7XG4gICAgICogICBpZiAoaXNHcmVldGluZyhvYmpWYWx1ZSkgJiYgaXNHcmVldGluZyhvdGhWYWx1ZSkpIHtcbiAgICAgKiAgICAgcmV0dXJuIHRydWU7XG4gICAgICogICB9XG4gICAgICogfVxuICAgICAqXG4gICAgICogdmFyIGFycmF5ID0gWydoZWxsbycsICdnb29kYnllJ107XG4gICAgICogdmFyIG90aGVyID0gWydoaScsICdnb29kYnllJ107XG4gICAgICpcbiAgICAgKiBfLmlzRXF1YWxXaXRoKGFycmF5LCBvdGhlciwgY3VzdG9taXplcik7XG4gICAgICogLy8gPT4gdHJ1ZVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzRXF1YWxXaXRoKHZhbHVlLCBvdGhlciwgY3VzdG9taXplcikge1xuICAgICAgY3VzdG9taXplciA9IHR5cGVvZiBjdXN0b21pemVyID09ICdmdW5jdGlvbicgPyBjdXN0b21pemVyIDogdW5kZWZpbmVkO1xuICAgICAgdmFyIHJlc3VsdCA9IGN1c3RvbWl6ZXIgPyBjdXN0b21pemVyKHZhbHVlLCBvdGhlcikgOiB1bmRlZmluZWQ7XG4gICAgICByZXR1cm4gcmVzdWx0ID09PSB1bmRlZmluZWQgPyBiYXNlSXNFcXVhbCh2YWx1ZSwgb3RoZXIsIHVuZGVmaW5lZCwgY3VzdG9taXplcikgOiAhIXJlc3VsdDtcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBDaGVja3MgaWYgYHZhbHVlYCBpcyBhbiBgRXJyb3JgLCBgRXZhbEVycm9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gICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy50b0xlbmd0aCgzLjIpO1xuICAgICAqIC8vID0+IDNcbiAgICAgKlxuICAgICAqIF8udG9MZW5ndGgoTnVtYmVyLk1JTl9WQUxVRSk7XG4gICAgICogLy8gPT4gMFxuICAgICAqXG4gICAgICogXy50b0xlbmd0aChJbmZpbml0eSk7XG4gICAgICogLy8gPT4gNDI5NDk2NzI5NVxuICAgICAqXG4gICAgICogXy50b0xlbmd0aCgnMy4yJyk7XG4gICAgICogLy8gPT4gM1xuICAgICAqL1xuICAgIGZ1bmN0aW9uIHRvTGVuZ3RoKHZhbHVlKSB7XG4gICAgICByZXR1cm4gdmFsdWUgPyBiYXNlQ2xhbXAodG9JbnRlZ2VyKHZhbHVlKSwgMCwgTUFYX0FSUkFZX0xFTkdUSCkgOiAwO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIENvbnZlcnRzIGB2YWx1ZWAgdG8gYSBudW1iZXIuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgNC4wLjBcbiAgICAgKiBAY2F0ZWdvcnkgTGFuZ1xuICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUgVGhlIHZhbHVlIHRvIHByb2Nlc3MuXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgbnVtYmVyLlxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBfLnRvTnVtYmVyKDMuMik7XG4gICAgICogLy8gPT4gMy4yXG4gICAgICpcbiAgICAgKiBfLnRvTnVtYmVyKE51bWJlci5NSU5fVkFMVUUpO1xuICAgICAqIC8vID0+IDVlLTMyNFxuICAgICAqXG4gICAgICogXy50b051bWJlcihJbmZpbml0eSk7XG4gICAgICogLy8gPT4gSW5maW5pdHlcbiAgICAgKlxuICAgICAqIF8udG9OdW1iZXIoJzMuMicpO1xuICAgICAqIC8vID0+IDMuMlxuICAgIC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AgICAgICAgaWYgKGhhc093blByb3BlcnR5LmNhbGwoc291cmNlLCBrZXkpKSB7XG4gICAgICAgICAgYXNzaWduVmFsdWUob2JqZWN0LCBrZXksIHNvdXJjZVtrZXldKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5hc3NpZ25gIGV4Y2VwdCB0aGF0IGl0IGl0ZXJhdGVzIG92ZXIgb3duIGFuZFxuICAgICAqIGluaGVyaXRlZCBzb3VyY2UgcHJvcGVydGllcy5cbiAgICAgKlxuICAgICAqICoqTm90ZToqKiBUaGlzIG1ldGhvZCBtdXRhdGVzIGBvYmplY3RgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDQuMC4wXG4gICAgICogQGFsaWFzIGV4dGVuZFxuICAgICAqIEBjYXRlZ29yeSBPYmplY3RcbiAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBkZXN0aW5hdGlvbiBvYmplY3QuXG4gICAgICogQHBhcmFtIHsuLi5PYmplY3R9IFtzb3VyY2VzXSBUaGUgc291cmNlIG9iamVjdHMuXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAc2VlIF8uYXNzaWduXG4gICAgICogQGV4YW1wbGVcbiAgICAgKlxuICAgICAqIGZ1bmN0aW9uIEZvbygpIHtcbiAgICAgKiAgIHRoaXMuYSA9IDE7XG4gICAgICogfVxuICAgICAqXG4gICAgICogZnVuY3Rpb24gQmFyKCkge1xuICAgICAqICAgdGhpcy5jID0gMztcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBGb28ucHJvdG90eXBlLmIgPSAyO1xuICAgICAqIEJhci5wcm90b3R5cGUuZCA9IDQ7XG4gICAgICpcbiAgICAgKiBfLmFzc2lnbkluKHsgJ2EnOiAwIH0s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HJldHVybmluZyBgZmFsc2VgLlxuICAgICAqXG4gICAgICogQHN0YXRpY1xuICAgICAqIEBtZW1iZXJPZiBfXG4gICAgICogQHNpbmNlIDAuMy4wXG4gICAgICogQGNhdGVnb3J5IE9iamVjdFxuICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpdGVyYXRlIG92ZXIuXG4gICAgICogQHBhcmFtIHtGdW5jdGlvbn0gW2l0ZXJhdGVlPV8uaWRlbnRpdHldIFRoZSBmdW5jdGlvbiBpbnZva2VkIHBlciBpdGVyYXRpb24uXG4gICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC5cbiAgICAgKiBAc2VlIF8uZm9ySW5SaWdodFxuICAgICAqIEBleGFtcGxlXG4gICAgICpcbiAgICAgKiBmdW5jdGlvbiBGb28oKSB7XG4gICAgICogICB0aGlzLmEgPSAxO1xuICAgICAqICAgdGhpcy5iID0gMjtcbiAgICAgKiB9XG4gICAgICpcbiAgICAgKiBGb28ucHJvdG90eXBlLmMgPSAzO1xuICAgICAqXG4gICAgICogXy5mb3JJbihuZXcgRm9vLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7XG4gICAgICogICBjb25zb2xlLmxvZyhrZXkpO1xuICAgICAqIH0pO1xuICAgICAqIC8vID0+IExvZ3MgJ2EnLCAnYicsIHRoZW4gJ2MnIChpdGVyYXRpb24gb3JkZXIgaXMgbm90IGd1YXJhbnRlZWQpLlxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGZvckluKG9iamVjdCwgaXRlcmF0ZWUpIHtcbiAgICAgIHJldHVybiBvYmplY3QgPT0gbnVsbFxuICAgICAgICA/IG9iamVjdFxuICAgICAgICA6IGJhc2VGb3Iob2JqZWN0LCBnZXRJdGVyYXRlZShpdGVyYXRlZSwgMyksIGtleXNJbik7XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5mb3JJb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tcbiAgICAgICAgaWYgKHR5cGVvZiB1cHBlciA9PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICBmbG9hdGluZyA9IHVwcGVyO1xuICAgICAgICAgIHVwcGVyID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHR5cGVvZiBsb3dlciA9PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICBmbG9hdGluZyA9IGxvd2VyO1xuICAgICAgICAgIGxvd2VyID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAobG93ZXIgPT09IHVuZGVmaW5lZCAmJiB1cHBlciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGxvd2VyID0gMDtcbiAgICAgICAgdXBwZXIgPSAxO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGxvd2VyID0gdG9GaW5pdGUobG93ZXIpO1xuICAgICAgICBpZiAodXBwZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHVwcGVyID0gbG93ZXI7XG4gICAgICAgICAgbG93ZXIgPSAwO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHVwcGVyID0gdG9GaW5pdGUodXBwZXIpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAobG93ZXIgPiB1cHBlcikge1xuICAgICAgICB2YXIgdGVtcCA9IGxvd2VyO1xuICAgICAgICBsb3dlciA9IHVwcGVyO1xuICAgICAgICB1cHBlciA9IHRlbXA7XG4gICAgICB9XG4gICAgICBpZiAoZmxvYXRpbmcgfHwgbG93ZXIgJSAxIHx8IHVwcGVyICUgMSkge1xuICAgICAgICB2YXIgcmFuZCA9IG5hdGl2ZVJhbmRvbSgpO1xuICAgICAgICByZXR1cm4gbmF0aXZlTWluKGxvd2VyICsgKHJhbmQgKiAodXBwZXIgLSBsb3dlciArIGZyZWVQYXJzZUZsb2F0KCcxZS0nICsgKChyYW5kICsgJycpLmxlbmd0aCAtIDE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ztcbiAgICAgIH1cbiAgICAgIC8vIENsZWFudXAgY29kZSBieSBzdHJpcHBpbmcgZW1wdHkgc3RyaW5ncy5cbiAgICAgIHNvdXJjZSA9IChpc0V2YWx1YXRpbmcgPyBzb3VyY2UucmVwbGFjZShyZUVtcHR5U3RyaW5nTGVhZGluZywgJycpIDogc291cmNlKVxuICAgICAgICAucmVwbGFjZShyZUVtcHR5U3RyaW5nTWlkZGxlLCAnJDEnKVxuICAgICAgICAucmVwbGFjZShyZUVtcHR5U3RyaW5nVHJhaWxpbmcsICckMTsnKTtcblxuICAgICAgLy8gRnJhbWUgY29kZSBhcyB0aGUgZnVuY3Rpb24gYm9keS5cbiAgICAgIHNvdXJjZSA9ICdmdW5jdGlvbignICsgKHZhcmlhYmxlIHx8ICdvYmonKSArICcpIHtcXG4nICtcbiAgICAgICAgKHZhcmlhYmxlXG4gICAgICAgICAgPyAnJ1xuICAgICAgICAgIDogJ29iaiB8fCAob2JqID0ge30pO1xcbidcbiAgICAgICAgKSArXG4gICAgICAgIFwidmFyIF9fdCwgX19wID0gJydcIiArXG4gICAgICAgIChpc0VzY2FwaW5nXG4gICAgICAgICAgID8gJywgX19lID0gXy5lc2NhcGUnXG4gICAgICAgICAgIDogJydcbiAgICAgICAgKSArXG4gICAgICAgIChpc0V2YWx1YXRpbmdcbiAgICAgICAgICA/ICcsIF9faiA9IEFycmF5LnByb3RvdHlwZS5qb2luO1xcbicgK1xuICAgICAgICAgICAgXCJmdW5jdGlvbiBwcmludCgpIHsgX19wICs9IF9fai5jYWxsKGFyZ3VtZW50cywgJycpIH1cXG5cIlxuICAgICAgICAgIDogJztcXG4nXG4gICAgICAgICkgK1xuICAgICAgICBzb3VyY2UgK1xuICAgICAgICAncmV0dXJuIF9fcFxcbn0nO1xuXG4gICAgICB2YXIgcmVzdWx0ID0gYXR0ZW1wdChmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIEZ1bmN0aW9uKGltcG9ydHNLZXlzLCBzb3VyY2VVU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XVsdGlwbGljYXRpb24uXG4gICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgcHJvZHVjdC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5tdWx0aXBseSg2LCA0KTtcbiAgICAgKiAvLyA9PiAyNFxuICAgICAqL1xuICAgIHZhciBtdWx0aXBseSA9IGNyZWF0ZU1hdGhPcGVyYXRpb24oZnVuY3Rpb24obXVsdGlwbGllciwgbXVsdGlwbGljYW5kKSB7XG4gICAgICByZXR1cm4gbXVsdGlwbGllciAqIG11bHRpcGxpY2FuZDtcbiAgICB9LCAxKTtcblxuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGBudW1iZXJgIHJvdW5kZWQgdG8gYHByZWNpc2lvbmAuXG4gICAgICpcbiAgICAgKiBAc3RhdGljXG4gICAgICogQG1lbWJlck9mIF9cbiAgICAgKiBAc2luY2UgMy4xMC4wXG4gICAgICogQGNhdGVnb3J5IE1hdGhcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbnVtYmVyIFRoZSBudW1iZXIgdG8gcm91bmQuXG4gICAgICogQHBhcmFtIHtudW1iZXJ9IFtwcmVjaXNpb249MF0gVGhlIHByZWNpc2lvbiB0byByb3VuZCB0by5cbiAgICAgKiBAcmV0dXJucyB7bnVtYmVyfSBSZXR1cm5zIHRoZSByb3VuZGVkIG51bWJlci5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNik7XG4gICAgICogLy8gPT4gNFxuICAgICAqXG4gICAgICogXy5yb3VuZCg0LjAwNiwgMik7XG4gICAgICogLy8gPT4gNC4wMVxuICAgICAqXG4gICAgICogXy5yb3VuZCg0MDYwLCAtMik7XG4gICAgICogLy8gPT4gNDEwMFxuICAgICAqL1xuICAgIHZhciByb3VuZCA9IGNyZWF0ZVJvdW5kKCdyb3VuZCcpO1xuXG4gICAgLyoqXG4gICAgICogU3VidHJhY3QgdHdvIG51bWJlcnMuX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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;var require;var require;/*!\\r\\n * Select2 4.0.3\\r\\n * https://select2.github.io\\r\\n *\\r\\n * Released under the MIT license\\r\\n * https://github.com/select2/select2/blob/master/LICENSE.md\\r\\n */\\r\\n(function (factory) {\\r\\n if (true) {\\r\\n // AMD. Register as an anonymous module.\\r\\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(3)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\\r\\n } else if (typeof exports === 'object') {\\r\\n // Node/CommonJS\\r\\n factory(require('jquery'));\\r\\n } else {\\r\\n // Browser globals\\r\\n factory(jQuery);\\r\\n }\\r\\n}(function (jQuery) {\\r\\n // This is needed so we can catch the AMD loader configuration and use it\\r\\n // The inner file should be wrapped (by `banner.start.js`) in a function that\\r\\n // returns the AMD loader references.\\r\\n var S2 =\\r\\n(function () {\\r\\n // Restore the Select2 AMD loader so it can be used\\r\\n // Needed mostly in the language files, where the loader is not inserted\\r\\n if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\\r\\n var S2 = jQuery.fn.select2.amd;\\r\\n }\\r\\nvar S2;(function () { if (!S2 || !S2.requirejs) {\\nif (!S2) { S2 = {}; } else { require = S2; }\\n/**\\n * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.\\n * Available via the MIT or new BSD license.\\n * see: http://github.com/jrburke/almond for details\\n */\\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\\n//be followed.\\n/*jslint sloppy: true */\\n/*global setTimeout: false */\\n\\nvar requirejs, require, define;\\n(function (undef) {\\n var main, req, makeMap, handlers,\\n defined = {},\\n waiting = {},\\n config = {},\\n defining = {},\\n hasOwn = Object.prototype.hasOwnProperty,\\n aps = [].slice,\\n jsSuffixRegExp = /\\\\.js$/;\\n\\n function hasProp(obj, prop) {\\n return hasOwn.call(obj, prop);\\n }\\n\\n /**\\n * Given a relative module name, like ./something, normalize it to\\n * a real name that can be mapped to a path.\\n * @param {String} name the relative name\\n * @param {String} baseName a real name that the name arg is relative\\n * to.\\n * @returns {String} normalized name\\n */\\n function normalize(name, baseName) {\\n var nameParts, nameSegment, mapValue, foundMap, lastIndex,\\n foundI, foundStarMap, starI, i, j, part,\\n baseParts = baseName && baseName.split(\\\"/\\\"),\\n map = config.map,\\n starMap = (map && map['*']) || {};\\n\\n //Adjust any relative paths.\\n if (name && name.charAt(0) === \\\".\\\") {\\n //If have a base name, try to normalize against it,\\n //otherwise, assume it is a top-level require that will\\n //be relative to baseUrl in the end.\\n if (baseName) {\\n name = name.split('/');\\n lastIndex = name.length - 1;\\n\\n // Node .js allowance:\\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\\n }\\n\\n //Lop off the last part of baseParts, so that . matches the\\n //\\\"directory\\\" and not name of the baseName's module. For instance,\\n //baseName of \\\"one/two/three\\\", maps to \\\"one/two/three.js\\\", but we\\n //want the directory, \\\"one/two\\\" for this normalization.\\n name = baseParts.slice(0, baseParts.length - 1).concat(name);\\n\\n //start trimDots\\n for (i = 0; i < name.length; i += 1) {\\n part = name[i];\\n if (part === \\\".\\\") {\\n name.splice(i, 1);\\n i -= 1;\\n } else if (part === \\\"..\\\") {\\n if (i === 1 && (name[2] === '..' || name[0] === '..')) {\\n //End of the line. Keep at least one non-dot\\n //path segment at the front so it can be mapped\\n //correctly to disk. Otherwise, there is likely\\n //no path mapping for a path starting with '..'.\\n //This can still fail, but catches the most reasonable\\n //uses of ..\\n break;\\n } else if (i > 0) {\\n name.splice(i - 1, 2);\\n i -= 2;\\n }\\n }\\n }\\n //end trimDots\\n\\n name = name.join(\\\"/\\\");\\n } else if (name.indexOf('./') === 0) {\\n // No baseName, so this is ID is resolved relative\\n // to baseUrl, pull off the leading dot.\\n name = name.substring(2);\\n }\\n }\\n\\n //Apply map config if available.\\n if ((baseParts || starMap) && map) {\\n nameParts = name.split('/');\\n\\n for (i = nameParts.length; i > 0; i -= 1) {\\n nameSegment = nameParts.slice(0, i).join(\\\"/\\\");\\n\\n if (baseParts) {\\n //Find the longest baseName segment match in the config.\\n //So, do joins on the biggest to smallest lengths of baseParts.\\n for (j = baseParts.length; j > 0; j -= 1) {\\n mapValue = map[baseParts.slice(0, j).join('/')];\\n\\n //baseName segment has config, find if it has one for\\n //this name.\\n if (mapValue) {\\n mapValue = mapValue[nameSegment];\\n if (mapValue) {\\n //Match, update name to the new value.\\n foundMap = mapValue;\\n foundI = i;\\n break;\\n }\\n }\\n }\\n }\\n\\n if (foundMap) {\\n break;\\n }\\n\\n //Check for a star map match, but just hold on to it,\\n //if there is a shorter segment match later in a matching\\n //config, then favor over this star map.\\n if (!foundStarMap && starMap && starMap[nameSegment]) {\\n foundStarMap = starMap[nameSegment];\\n starI = i;\\n }\\n }\\n\\n if (!foundMap && foundStarMap) {\\n foundMap = foundStarMap;\\n foundI = starI;\\n }\\n\\n if (foundMap) {\\n nameParts.splice(0, foundI, foundMap);\\n name = nameParts.join('/');\\n }\\n }\\n\\n return name;\\n }\\n\\n function makeRequire(relName, forceSync) {\\n return function () {\\n //A version of a require function that passes a moduleName\\n //value for items that may need to\\n //look up paths relative to the moduleName\\n var args = aps.call(arguments, 0);\\n\\n //If first arg is not require('string'), and there is only\\n //one arg, it is the array form without a callback. Insert\\n //a null so that the following concat is correct.\\n if (typeof args[0] !== 'string' && args.length === 1) {\\n args.push(null);\\n }\\n return req.apply(undef, args.concat([relName, forceSync]));\\n };\\n }\\n\\n function makeNormalize(relName) {\\n return function (name) {\\n return normalize(name, relName);\\n };\\n }\\n\\n function makeLoad(depName) {\\n return function (value) {\\n defined[depName] = value;\\n };\\n }\\n\\n function callDep(name) {\\n if (hasProp(waiting, name)) {\\n var args = waiting[name];\\n delete waiting[name];\\n defining[name] = true;\\n main.apply(undef, args);\\n }\\n\\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\\n throw new Error('No ' + name);\\n }\\n return defined[name];\\n }\\n\\n //Turns a plugin!resource to [plugin, resource]\\n //with the plugin being undefined if the name\\n //did not have a plugin prefix.\\n function splitPrefix(name) {\\n var prefix,\\n index = name ? name.indexOf('!') : -1;\\n if (index > -1) {\\n prefix = name.substring(0, index);\\n name = name.substring(index + 1, name.length);\\n }\\n return [prefix, name];\\n }\\n\\n /**\\n * Makes a name map, normalizing the name, and using a plugin\\n * for normalization if necessary. Grabs a ref to plugin\\n * too, as an optimization.\\n */\\n makeMap = function (name, relName) {\\n var plugin,\\n parts = splitPrefix(name),\\n prefix = parts[0];\\n\\n name = parts[1];\\n\\n if (prefix) {\\n prefix = normalize(prefix, relName);\\n plugin = callDep(prefix);\\n }\\n\\n //Normalize according\\n if (prefix) {\\n if (plugin && plugin.normalize) {\\n name = plugin.normalize(name, makeNormalize(relName));\\n } else {\\n name = normalize(name, relName);\\n }\\n } else {\\n name = normalize(name, relName);\\n parts = splitPrefix(name);\\n prefix = parts[0];\\n name = parts[1];\\n if (prefix) {\\n plugin = callDep(prefix);\\n }\\n }\\n\\n //Using ridiculous property names for space reasons\\n return {\\n f: prefix ? prefix + '!' + name : name, //fullName\\n n: name,\\n pr: prefix,\\n p: plugin\\n };\\n };\\n\\n function makeConfig(name) {\\n return function () {\\n return (config && config.config && config.config[name]) || {};\\n };\\n }\\n\\n handlers = {\\n require: function (name) {\\n return makeRequire(name);\\n },\\n exports: function (name) {\\n var e = defined[name];\\n if (typeof e !== 'undefined') {\\n return e;\\n } else {\\n return (defined[name] = {});\\n }\\n },\\n module: function (name) {\\n return {\\n id: name,\\n uri: '',\\n exports: defined[name],\\n config: makeConfig(name)\\n };\\n }\\n };\\n\\n main = function (name, deps, callback, relName) {\\n var cjsModule, depName, ret, map, i,\\n args = [],\\n callbackType = typeof callback,\\n usingExports;\\n\\n //Use name if no relName\\n relName = relName || name;\\n\\n //Call the callback to define the module, if necessary.\\n if (callbackType === 'undefined' || callbackType === 'function') {\\n //Pull out the defined dependencies and pass the ordered\\n //values to the callback.\\n //Default to [require, exports, module] if no deps\\n deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\\n for (i = 0; i < deps.length; i += 1) {\\n map = makeMap(deps[i], relName);\\n depName = map.f;\\n\\n //Fast path CommonJS standard dependencies.\\n if (depName === \\\"require\\\") {\\n args[i] = handlers.require(name);\\n } else if (depName === \\\"exports\\\") {\\n //CommonJS module spec 1.1\\n args[i] = handlers.exports(name);\\n usingExports = true;\\n } else if (depName === \\\"module\\\") {\\n //CommonJS module spec 1.1\\n cjsModule = args[i] = handlers.module(name);\\n } else if (hasProp(defined, depName) ||\\n hasProp(waiting, depName) ||\\n hasProp(defining, depName)) {\\n args[i] = callDep(depName);\\n } else if (map.p) {\\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\\n args[i] = defined[depName];\\n } else {\\n throw new Error(name + ' missing ' + depName);\\n }\\n }\\n\\n ret = callback ? callback.apply(defined[name], args) : undefined;\\n\\n if (name) {\\n //If setting exports via \\\"module\\\" is in play,\\n //favor that over return value and exports. After that,\\n //favor a non-undefined return value over exports use.\\n if (cjsModule && cjsModule.exports !== undef &&\\n cjsModule.exports !== defined[name]) {\\n defined[name] = cjsModule.exports;\\n } else if (ret !== undef || !usingExports) {\\n //Use the return value from the function.\\n defined[name] = ret;\\n }\\n }\\n } else if (name) {\\n //May just be an object definition for the module. Only\\n //worry about defining if have a module name.\\n defined[name] = callback;\\n }\\n };\\n\\n requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\\n if (typeof deps === \\\"string\\\") {\\n if (handlers[deps]) {\\n //callback in this case is really relName\\n return handlers[deps](callback);\\n }\\n //Just return the module wanted. In this scenario, the\\n //deps arg is the module name, and second arg (if passed)\\n //is just the relName.\\n //Normalize module name, if it contains . or ..\\n return callDep(makeMap(deps, callback).f);\\n } else if (!deps.splice) {\\n //deps is a config object, not an array.\\n config = deps;\\n if (config.deps) {\\n req(config.deps, config.callback);\\n }\\n if (!callback) {\\n return;\\n }\\n\\n if (callback.splice) {\\n //callback is an array, which means it is a dependency list.\\n //Adjust args if there are dependencies\\n deps = callback;\\n callback = relName;\\n relName = null;\\n } else {\\n deps = undef;\\n }\\n }\\n\\n //Support require(['a'])\\n callback = callback || function () {};\\n\\n //If relName is a function, it is an errback handler,\\n //so remove it.\\n if (typeof relName === 'function') {\\n relName = forceSync;\\n forceSync = alt;\\n }\\n\\n //Simulate async callback;\\n if (forceSync) {\\n main(undef, deps, callback, relName);\\n } else {\\n //Using a non-zero value because of concern for what old browsers\\n //do, and latest browsers \\\"upgrade\\\" to 4 if lower value is used:\\n //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\\n //If want a value immediately, use require('id') instead -- something\\n //that works in almond on the global level, but not guaranteed and\\n //unlikely to work in other AMD implementations.\\n setTimeout(function () {\\n main(undef, deps, callback, relName);\\n }, 4);\\n }\\n\\n return req;\\n };\\n\\n /**\\n * Just drops the config on the floor, but returns req in case\\n * the config return value is used.\\n */\\n req.config = function (cfg) {\\n return req(cfg);\\n };\\n\\n /**\\n * Expose module registry for debugging and tooling\\n */\\n requirejs._defined = defined;\\n\\n define = function (name, deps, callback) {\\n if (typeof name !== 'string') {\\n throw new Error('See almond README: incorrect module build, no module name');\\n }\\n\\n //This module may not have dependencies\\n if (!deps.splice) {\\n //deps is not an array, so probably means\\n //an object literal or factory function for\\n //the value. Adjust args.\\n callback = deps;\\n deps = [];\\n }\\n\\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\\n waiting[name] = [name, deps, callback];\\n }\\n };\\n\\n define.amd = {\\n jQuery: true\\n };\\n}());\\n\\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\\n}\\n}());\\nS2.define(\\\"almond\\\", function(){});\\n\\n/* global jQuery:false, $:false */\\r\\nS2.define('jquery',[],function () {\\r\\n var _$ = jQuery || $;\\r\\n\\r\\n if (_$ == null && console && console.error) {\\r\\n console.error(\\r\\n 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\\r\\n 'found. Make sure that you are including jQuery before Select2 on your ' +\\r\\n 'web page.'\\r\\n );\\r\\n }\\r\\n\\r\\n return _$;\\r\\n});\\r\\n\\nS2.define('select2/utils',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n var Utils = {};\\r\\n\\r\\n Utils.Extend = function (ChildClass, SuperClass) {\\r\\n var __hasProp = {}.hasOwnProperty;\\r\\n\\r\\n function BaseConstructor () {\\r\\n this.constructor = ChildClass;\\r\\n }\\r\\n\\r\\n for (var key in SuperClass) {\\r\\n if (__hasProp.call(SuperClass, key)) {\\r\\n ChildClass[key] = SuperClass[key];\\r\\n }\\r\\n }\\r\\n\\r\\n BaseConstructor.prototype = SuperClass.prototype;\\r\\n ChildClass.prototype = new BaseConstructor();\\r\\n ChildClass.__super__ = SuperClass.prototype;\\r\\n\\r\\n return ChildClass;\\r\\n };\\r\\n\\r\\n function getMethods (theClass) {\\r\\n var proto = theClass.prototype;\\r\\n\\r\\n var methods = [];\\r\\n\\r\\n for (var methodName in proto) {\\r\\n var m = proto[methodName];\\r\\n\\r\\n if (typeof m !== 'function') {\\r\\n continue;\\r\\n }\\r\\n\\r\\n if (methodName === 'constructor') {\\r\\n continue;\\r\\n }\\r\\n\\r\\n methods.push(methodName);\\r\\n }\\r\\n\\r\\n return methods;\\r\\n }\\r\\n\\r\\n Utils.Decorate = function (SuperClass, DecoratorClass) {\\r\\n var decoratedMethods = getMethods(DecoratorClass);\\r\\n var superMethods = getMethods(SuperClass);\\r\\n\\r\\n function DecoratedClass () {\\r\\n var unshift = Array.prototype.unshift;\\r\\n\\r\\n var argCount = DecoratorClass.prototype.constructor.length;\\r\\n\\r\\n var calledConstructor = SuperClass.prototype.constructor;\\r\\n\\r\\n if (argCount > 0) {\\r\\n unshift.call(arguments, SuperClass.prototype.constructor);\\r\\n\\r\\n calledConstructor = DecoratorClass.prototype.constructor;\\r\\n }\\r\\n\\r\\n calledConstructor.apply(this, arguments);\\r\\n }\\r\\n\\r\\n DecoratorClass.displayName = SuperClass.displayName;\\r\\n\\r\\n function ctr () {\\r\\n this.constructor = DecoratedClass;\\r\\n }\\r\\n\\r\\n DecoratedClass.prototype = new ctr();\\r\\n\\r\\n for (var m = 0; m < superMethods.length; m++) {\\r\\n var superMethod = superMethods[m];\\r\\n\\r\\n DecoratedClass.prototype[superMethod] =\\r\\n SuperClass.prototype[superMethod];\\r\\n }\\r\\n\\r\\n var calledMethod = function (methodName) {\\r\\n // Stub out the original method if it's not decorating an actual method\\r\\n var originalMethod = function () {};\\r\\n\\r\\n if (methodName in DecoratedClass.prototype) {\\r\\n originalMethod = DecoratedClass.prototype[methodName];\\r\\n }\\r\\n\\r\\n var decoratedMethod = DecoratorClass.prototype[methodName];\\r\\n\\r\\n return function () {\\r\\n var unshift = Array.prototype.unshift;\\r\\n\\r\\n unshift.call(arguments, originalMethod);\\r\\n\\r\\n return decoratedMethod.apply(this, arguments);\\r\\n };\\r\\n };\\r\\n\\r\\n for (var d = 0; d < decoratedMethods.length; d++) {\\r\\n var decoratedMethod = decoratedMethods[d];\\r\\n\\r\\n DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\\r\\n }\\r\\n\\r\\n return DecoratedClass;\\r\\n };\\r\\n\\r\\n var Observable = function () {\\r\\n this.listeners = {};\\r\\n };\\r\\n\\r\\n Observable.prototype.on = function (event, callback) {\\r\\n this.listeners = this.listeners || {};\\r\\n\\r\\n if (event in this.listeners) {\\r\\n this.listeners[event].push(callback);\\r\\n } else {\\r\\n this.listeners[event] = [callback];\\r\\n }\\r\\n };\\r\\n\\r\\n Observable.prototype.trigger = function (event) {\\r\\n var slice = Array.prototype.slice;\\r\\n var params = slice.call(arguments, 1);\\r\\n\\r\\n this.listeners = this.listeners || {};\\r\\n\\r\\n // Params should always come in as an array\\r\\n if (params == null) {\\r\\n params = [];\\r\\n }\\r\\n\\r\\n // If there are no arguments to the event, use a temporary object\\r\\n if (params.length === 0) {\\r\\n params.push({});\\r\\n }\\r\\n\\r\\n // Set the `_type` of the first object to the event\\r\\n params[0]._type = event;\\r\\n\\r\\n if (event in this.listeners) {\\r\\n this.invoke(this.listeners[event], slice.call(arguments, 1));\\r\\n }\\r\\n\\r\\n if ('*' in this.listeners) {\\r\\n this.invoke(this.listeners['*'], arguments);\\r\\n }\\r\\n };\\r\\n\\r\\n Observable.prototype.invoke = function (listeners, params) {\\r\\n for (var i = 0, len = listeners.length; i < len; i++) {\\r\\n listeners[i].apply(this, params);\\r\\n }\\r\\n };\\r\\n\\r\\n Utils.Observable = Observable;\\r\\n\\r\\n Utils.generateChars = function (length) {\\r\\n var chars = '';\\r\\n\\r\\n for (var i = 0; i < length; i++) {\\r\\n var randomChar = Math.floor(Math.random() * 36);\\r\\n chars += randomChar.toString(36);\\r\\n }\\r\\n\\r\\n return chars;\\r\\n };\\r\\n\\r\\n Utils.bind = function (func, context) {\\r\\n return function () {\\r\\n func.apply(context, arguments);\\r\\n };\\r\\n };\\r\\n\\r\\n Utils._convertData = function (data) {\\r\\n for (var originalKey in data) {\\r\\n var keys = originalKey.split('-');\\r\\n\\r\\n var dataLevel = data;\\r\\n\\r\\n if (keys.length === 1) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n for (var k = 0; k < keys.length; k++) {\\r\\n var key = keys[k];\\r\\n\\r\\n // Lowercase the first letter\\r\\n // By default, dash-separated becomes camelCase\\r\\n key = key.substring(0, 1).toLowerCase() + key.substring(1);\\r\\n\\r\\n if (!(key in dataLevel)) {\\r\\n dataLevel[key] = {};\\r\\n }\\r\\n\\r\\n if (k == keys.length - 1) {\\r\\n dataLevel[key] = data[originalKey];\\r\\n }\\r\\n\\r\\n dataLevel = dataLevel[key];\\r\\n }\\r\\n\\r\\n delete data[originalKey];\\r\\n }\\r\\n\\r\\n return data;\\r\\n };\\r\\n\\r\\n Utils.hasScroll = function (index, el) {\\r\\n // Adapted from the function created by @ShadowScripter\\r\\n // and adapted by @BillBarry on the Stack Exchange Code Review website.\\r\\n // The original code can be found at\\r\\n // http://codereview.stackexchange.com/q/13338\\r\\n // and was designed to be used with the Sizzle selector engine.\\r\\n\\r\\n var $el = $(el);\\r\\n var overflowX = el.style.overflowX;\\r\\n var overflowY = el.style.overflowY;\\r\\n\\r\\n //Check both x and y declarations\\r\\n if (overflowX === overflowY &&\\r\\n (overflowY === 'hidden' || overflowY === 'visible')) {\\r\\n return false;\\r\\n }\\r\\n\\r\\n if (overflowX === 'scroll' || overflowY === 'scroll') {\\r\\n return true;\\r\\n }\\r\\n\\r\\n return ($el.innerHeight() < el.scrollHeight ||\\r\\n $el.innerWidth() < el.scrollWidth);\\r\\n };\\r\\n\\r\\n Utils.escapeMarkup = function (markup) {\\r\\n var replaceMap = {\\r\\n '\\\\\\\\': '&#92;',\\r\\n '&': '&amp;',\\r\\n '<': '&lt;',\\r\\n '>': '&gt;',\\r\\n '\\\"': '&quot;',\\r\\n '\\\\'': '&#39;',\\r\\n '/': '&#47;'\\r\\n };\\r\\n\\r\\n // Do not try to escape the markup if it's not a string\\r\\n if (typeof markup !== 'string') {\\r\\n return markup;\\r\\n }\\r\\n\\r\\n return String(markup).replace(/[&<>\\\"'\\\\/\\\\\\\\]/g, function (match) {\\r\\n return replaceMap[match];\\r\\n });\\r\\n };\\r\\n\\r\\n // Append an array of jQuery nodes to a given element.\\r\\n Utils.appendMany = function ($element, $nodes) {\\r\\n // jQuery 1.7.x does not support $.fn.append() with an array\\r\\n // Fall back to a jQuery object collection using $.fn.add()\\r\\n if ($.fn.jquery.substr(0, 3) === '1.7') {\\r\\n var $jqNodes = $();\\r\\n\\r\\n $.map($nodes, function (node) {\\r\\n $jqNodes = $jqNodes.add(node);\\r\\n });\\r\\n\\r\\n $nodes = $jqNodes;\\r\\n }\\r\\n\\r\\n $element.append($nodes);\\r\\n };\\r\\n\\r\\n return Utils;\\r\\n});\\r\\n\\nS2.define('select2/results',[\\r\\n 'jquery',\\r\\n './utils'\\r\\n], function ($, Utils) {\\r\\n function Results ($element, options, dataAdapter) {\\r\\n this.$element = $element;\\r\\n this.data = dataAdapter;\\r\\n this.options = options;\\r\\n\\r\\n Results.__super__.constructor.call(this);\\r\\n }\\r\\n\\r\\n Utils.Extend(Results, Utils.Observable);\\r\\n\\r\\n Results.prototype.render = function () {\\r\\n var $results = $(\\r\\n '<ul class=\\\"select2-results__options\\\" role=\\\"tree\\\"></ul>'\\r\\n );\\r\\n\\r\\n if (this.options.get('multiple')) {\\r\\n $results.attr('aria-multiselectable', 'true');\\r\\n }\\r\\n\\r\\n this.$results = $results;\\r\\n\\r\\n return $results;\\r\\n };\\r\\n\\r\\n Results.prototype.clear = function () {\\r\\n this.$results.empty();\\r\\n };\\r\\n\\r\\n Results.prototype.displayMessage = function (params) {\\r\\n var escapeMarkup = this.options.get('escapeMarkup');\\r\\n\\r\\n this.clear();\\r\\n this.hideLoading();\\r\\n\\r\\n var $message = $(\\r\\n '<li role=\\\"treeitem\\\" aria-live=\\\"assertive\\\"' +\\r\\n ' class=\\\"select2-results__option\\\"></li>'\\r\\n );\\r\\n\\r\\n var message = this.options.get('translations').get(params.message);\\r\\n\\r\\n $message.append(\\r\\n escapeMarkup(\\r\\n message(params.args)\\r\\n )\\r\\n );\\r\\n\\r\\n $message[0].className += ' select2-results__message';\\r\\n\\r\\n this.$results.append($message);\\r\\n };\\r\\n\\r\\n Results.prototype.hideMessages = function () {\\r\\n this.$results.find('.select2-results__message').remove();\\r\\n };\\r\\n\\r\\n Results.prototype.append = function (data) {\\r\\n this.hideLoading();\\r\\n\\r\\n var $options = [];\\r\\n\\r\\n if (data.results == null || data.results.length === 0) {\\r\\n if (this.$results.children().length === 0) {\\r\\n this.trigger('results:message', {\\r\\n message: 'noResults'\\r\\n });\\r\\n }\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n data.results = this.sort(data.results);\\r\\n\\r\\n for (var d = 0; d < data.results.length; d++) {\\r\\n var item = data.results[d];\\r\\n\\r\\n var $option = this.option(item);\\r\\n\\r\\n $options.push($option);\\r\\n }\\r\\n\\r\\n this.$results.append($options);\\r\\n };\\r\\n\\r\\n Results.prototype.position = function ($results, $dropdown) {\\r\\n var $resultsContainer = $dropdown.find('.select2-results');\\r\\n $resultsContainer.append($results);\\r\\n };\\r\\n\\r\\n Results.prototype.sort = function (data) {\\r\\n var sorter = this.options.get('sorter');\\r\\n\\r\\n return sorter(data);\\r\\n };\\r\\n\\r\\n Results.prototype.highlightFirstItem = function () {\\r\\n var $options = this.$results\\r\\n .find('.select2-results__option[aria-selected]');\\r\\n\\r\\n var $selected = $options.filter('[aria-selected=true]');\\r\\n\\r\\n // Check if there are any selected options\\r\\n if ($selected.length > 0) {\\r\\n // If there are selected options, highlight the first\\r\\n $selected.first().trigger('mouseenter');\\r\\n } else {\\r\\n // If there are no selected options, highlight the first option\\r\\n // in the dropdown\\r\\n $options.first().trigger('mouseenter');\\r\\n }\\r\\n\\r\\n this.ensureHighlightVisible();\\r\\n };\\r\\n\\r\\n Results.prototype.setClasses = function () {\\r\\n var self = this;\\r\\n\\r\\n this.data.current(function (selected) {\\r\\n var selectedIds = $.map(selected, function (s) {\\r\\n return s.id.toString();\\r\\n });\\r\\n\\r\\n var $options = self.$results\\r\\n .find('.select2-results__option[aria-selected]');\\r\\n\\r\\n $options.each(function () {\\r\\n var $option = $(this);\\r\\n\\r\\n var item = $.data(this, 'data');\\r\\n\\r\\n // id needs to be converted to a string when comparing\\r\\n var id = '' + item.id;\\r\\n\\r\\n if ((item.element != null && item.element.selected) ||\\r\\n (item.element == null && $.inArray(id, selectedIds) > -1)) {\\r\\n $option.attr('aria-selected', 'true');\\r\\n } else {\\r\\n $option.attr('aria-selected', 'false');\\r\\n }\\r\\n });\\r\\n\\r\\n });\\r\\n };\\r\\n\\r\\n Results.prototype.showLoading = function (params) {\\r\\n this.hideLoading();\\r\\n\\r\\n var loadingMore = this.options.get('translations').get('searching');\\r\\n\\r\\n var loading = {\\r\\n disabled: true,\\r\\n loading: true,\\r\\n text: loadingMore(params)\\r\\n };\\r\\n var $loading = this.option(loading);\\r\\n $loading.className += ' loading-results';\\r\\n\\r\\n this.$results.prepend($loading);\\r\\n };\\r\\n\\r\\n Results.prototype.hideLoading = function () {\\r\\n this.$results.find('.loading-results').remove();\\r\\n };\\r\\n\\r\\n Results.prototype.option = function (data) {\\r\\n var option = document.createElement('li');\\r\\n option.className = 'select2-results__option';\\r\\n\\r\\n var attrs = {\\r\\n 'role': 'treeitem',\\r\\n 'aria-selected': 'false'\\r\\n };\\r\\n\\r\\n if (data.disabled) {\\r\\n delete attrs['aria-selected'];\\r\\n attrs['aria-disabled'] = 'true';\\r\\n }\\r\\n\\r\\n if (data.id == null) {\\r\\n delete attrs['aria-selected'];\\r\\n }\\r\\n\\r\\n if (data._resultId != null) {\\r\\n option.id = data._resultId;\\r\\n }\\r\\n\\r\\n if (data.title) {\\r\\n option.title = data.title;\\r\\n }\\r\\n\\r\\n if (data.children) {\\r\\n attrs.role = 'group';\\r\\n attrs['aria-label'] = data.text;\\r\\n delete attrs['aria-selected'];\\r\\n }\\r\\n\\r\\n for (var attr in attrs) {\\r\\n var val = attrs[attr];\\r\\n\\r\\n option.setAttribute(attr, val);\\r\\n }\\r\\n\\r\\n if (data.children) {\\r\\n var $option = $(option);\\r\\n\\r\\n var label = document.createElement('strong');\\r\\n label.className = 'select2-results__group';\\r\\n\\r\\n var $label = $(label);\\r\\n this.template(data, label);\\r\\n\\r\\n var $children = [];\\r\\n\\r\\n for (var c = 0; c < data.children.length; c++) {\\r\\n var child = data.children[c];\\r\\n\\r\\n var $child = this.option(child);\\r\\n\\r\\n $children.push($child);\\r\\n }\\r\\n\\r\\n var $childrenContainer = $('<ul></ul>', {\\r\\n 'class': 'select2-results__options select2-results__options--nested'\\r\\n });\\r\\n\\r\\n $childrenContainer.append($children);\\r\\n\\r\\n $option.append(label);\\r\\n $option.append($childrenContainer);\\r\\n } else {\\r\\n this.template(data, option);\\r\\n }\\r\\n\\r\\n $.data(option, 'data', data);\\r\\n\\r\\n return option;\\r\\n };\\r\\n\\r\\n Results.prototype.bind = function (container, $container) {\\r\\n var self = this;\\r\\n\\r\\n var id = container.id + '-results';\\r\\n\\r\\n this.$results.attr('id', id);\\r\\n\\r\\n container.on('results:all', function (params) {\\r\\n self.clear();\\r\\n self.append(params.data);\\r\\n\\r\\n if (container.isOpen()) {\\r\\n self.setClasses();\\r\\n self.highlightFirstItem();\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:append', function (params) {\\r\\n self.append(params.data);\\r\\n\\r\\n if (container.isOpen()) {\\r\\n self.setClasses();\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('query', function (params) {\\r\\n self.hideMessages();\\r\\n self.showLoading(params);\\r\\n });\\r\\n\\r\\n container.on('select', function () {\\r\\n if (!container.isOpen()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.setClasses();\\r\\n self.highlightFirstItem();\\r\\n });\\r\\n\\r\\n container.on('unselect', function () {\\r\\n if (!container.isOpen()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.setClasses();\\r\\n self.highlightFirstItem();\\r\\n });\\r\\n\\r\\n container.on('open', function () {\\r\\n // When the dropdown is open, aria-expended=\\\"true\\\"\\r\\n self.$results.attr('aria-expanded', 'true');\\r\\n self.$results.attr('aria-hidden', 'false');\\r\\n\\r\\n self.setClasses();\\r\\n self.ensureHighlightVisible();\\r\\n });\\r\\n\\r\\n container.on('close', function () {\\r\\n // When the dropdown is closed, aria-expended=\\\"false\\\"\\r\\n self.$results.attr('aria-expanded', 'false');\\r\\n self.$results.attr('aria-hidden', 'true');\\r\\n self.$results.removeAttr('aria-activedescendant');\\r\\n });\\r\\n\\r\\n container.on('results:toggle', function () {\\r\\n var $highlighted = self.getHighlightedResults();\\r\\n\\r\\n if ($highlighted.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n $highlighted.trigger('mouseup');\\r\\n });\\r\\n\\r\\n container.on('results:select', function () {\\r\\n var $highlighted = self.getHighlightedResults();\\r\\n\\r\\n if ($highlighted.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var data = $highlighted.data('data');\\r\\n\\r\\n if ($highlighted.attr('aria-selected') == 'true') {\\r\\n self.trigger('close', {});\\r\\n } else {\\r\\n self.trigger('select', {\\r\\n data: data\\r\\n });\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:previous', function () {\\r\\n var $highlighted = self.getHighlightedResults();\\r\\n\\r\\n var $options = self.$results.find('[aria-selected]');\\r\\n\\r\\n var currentIndex = $options.index($highlighted);\\r\\n\\r\\n // If we are already at te top, don't move further\\r\\n if (currentIndex === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var nextIndex = currentIndex - 1;\\r\\n\\r\\n // If none are highlighted, highlight the first\\r\\n if ($highlighted.length === 0) {\\r\\n nextIndex = 0;\\r\\n }\\r\\n\\r\\n var $next = $options.eq(nextIndex);\\r\\n\\r\\n $next.trigger('mouseenter');\\r\\n\\r\\n var currentOffset = self.$results.offset().top;\\r\\n var nextTop = $next.offset().top;\\r\\n var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\\r\\n\\r\\n if (nextIndex === 0) {\\r\\n self.$results.scrollTop(0);\\r\\n } else if (nextTop - currentOffset < 0) {\\r\\n self.$results.scrollTop(nextOffset);\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:next', function () {\\r\\n var $highlighted = self.getHighlightedResults();\\r\\n\\r\\n var $options = self.$results.find('[aria-selected]');\\r\\n\\r\\n var currentIndex = $options.index($highlighted);\\r\\n\\r\\n var nextIndex = currentIndex + 1;\\r\\n\\r\\n // If we are at the last option, stay there\\r\\n if (nextIndex >= $options.length) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $next = $options.eq(nextIndex);\\r\\n\\r\\n $next.trigger('mouseenter');\\r\\n\\r\\n var currentOffset = self.$results.offset().top +\\r\\n self.$results.outerHeight(false);\\r\\n var nextBottom = $next.offset().top + $next.outerHeight(false);\\r\\n var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\\r\\n\\r\\n if (nextIndex === 0) {\\r\\n self.$results.scrollTop(0);\\r\\n } else if (nextBottom > currentOffset) {\\r\\n self.$results.scrollTop(nextOffset);\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:focus', function (params) {\\r\\n params.element.addClass('select2-results__option--highlighted');\\r\\n });\\r\\n\\r\\n container.on('results:message', function (params) {\\r\\n self.displayMessage(params);\\r\\n });\\r\\n\\r\\n if ($.fn.mousewheel) {\\r\\n this.$results.on('mousewheel', function (e) {\\r\\n var top = self.$results.scrollTop();\\r\\n\\r\\n var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\\r\\n\\r\\n var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\\r\\n var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\\r\\n\\r\\n if (isAtTop) {\\r\\n self.$results.scrollTop(0);\\r\\n\\r\\n e.preventDefault();\\r\\n e.stopPropagation();\\r\\n } else if (isAtBottom) {\\r\\n self.$results.scrollTop(\\r\\n self.$results.get(0).scrollHeight - self.$results.height()\\r\\n );\\r\\n\\r\\n e.preventDefault();\\r\\n e.stopPropagation();\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n this.$results.on('mouseup', '.select2-results__option[aria-selected]',\\r\\n function (evt) {\\r\\n var $this = $(this);\\r\\n\\r\\n var data = $this.data('data');\\r\\n\\r\\n if ($this.attr('aria-selected') === 'true') {\\r\\n if (self.options.get('multiple')) {\\r\\n self.trigger('unselect', {\\r\\n originalEvent: evt,\\r\\n data: data\\r\\n });\\r\\n } else {\\r\\n self.trigger('close', {});\\r\\n }\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n self.trigger('select', {\\r\\n originalEvent: evt,\\r\\n data: data\\r\\n });\\r\\n });\\r\\n\\r\\n this.$results.on('mouseenter', '.select2-results__option[aria-selected]',\\r\\n function (evt) {\\r\\n var data = $(this).data('data');\\r\\n\\r\\n self.getHighlightedResults()\\r\\n .removeClass('select2-results__option--highlighted');\\r\\n\\r\\n self.trigger('results:focus', {\\r\\n data: data,\\r\\n element: $(this)\\r\\n });\\r\\n });\\r\\n };\\r\\n\\r\\n Results.prototype.getHighlightedResults = function () {\\r\\n var $highlighted = this.$results\\r\\n .find('.select2-results__option--highlighted');\\r\\n\\r\\n return $highlighted;\\r\\n };\\r\\n\\r\\n Results.prototype.destroy = function () {\\r\\n this.$results.remove();\\r\\n };\\r\\n\\r\\n Results.prototype.ensureHighlightVisible = function () {\\r\\n var $highlighted = this.getHighlightedResults();\\r\\n\\r\\n if ($highlighted.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $options = this.$results.find('[aria-selected]');\\r\\n\\r\\n var currentIndex = $options.index($highlighted);\\r\\n\\r\\n var currentOffset = this.$results.offset().top;\\r\\n var nextTop = $highlighted.offset().top;\\r\\n var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\\r\\n\\r\\n var offsetDelta = nextTop - currentOffset;\\r\\n nextOffset -= $highlighted.outerHeight(false) * 2;\\r\\n\\r\\n if (currentIndex <= 2) {\\r\\n this.$results.scrollTop(0);\\r\\n } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\\r\\n this.$results.scrollTop(nextOffset);\\r\\n }\\r\\n };\\r\\n\\r\\n Results.prototype.template = function (result, container) {\\r\\n var template = this.options.get('templateResult');\\r\\n var escapeMarkup = this.options.get('escapeMarkup');\\r\\n\\r\\n var content = template(result, container);\\r\\n\\r\\n if (content == null) {\\r\\n container.style.display = 'none';\\r\\n } else if (typeof content === 'string') {\\r\\n container.innerHTML = escapeMarkup(content);\\r\\n } else {\\r\\n $(container).append(content);\\r\\n }\\r\\n };\\r\\n\\r\\n return Results;\\r\\n});\\r\\n\\nS2.define('select2/keys',[\\r\\n\\r\\n], function () {\\r\\n var KEYS = {\\r\\n BACKSPACE: 8,\\r\\n TAB: 9,\\r\\n ENTER: 13,\\r\\n SHIFT: 16,\\r\\n CTRL: 17,\\r\\n ALT: 18,\\r\\n ESC: 27,\\r\\n SPACE: 32,\\r\\n PAGE_UP: 33,\\r\\n PAGE_DOWN: 34,\\r\\n END: 35,\\r\\n HOME: 36,\\r\\n LEFT: 37,\\r\\n UP: 38,\\r\\n RIGHT: 39,\\r\\n DOWN: 40,\\r\\n DELETE: 46\\r\\n };\\r\\n\\r\\n return KEYS;\\r\\n});\\r\\n\\nS2.define('select2/selection/base',[\\r\\n 'jquery',\\r\\n '../utils',\\r\\n '../keys'\\r\\n], function ($, Utils, KEYS) {\\r\\n function BaseSelection ($element, options) {\\r\\n this.$element = $element;\\r\\n this.options = options;\\r\\n\\r\\n BaseSelection.__super__.constructor.call(this);\\r\\n }\\r\\n\\r\\n Utils.Extend(BaseSelection, Utils.Observable);\\r\\n\\r\\n BaseSelection.prototype.render = function () {\\r\\n var $selection = $(\\r\\n '<span class=\\\"select2-selection\\\" role=\\\"combobox\\\" ' +\\r\\n ' aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\">' +\\r\\n '</span>'\\r\\n );\\r\\n\\r\\n this._tabindex = 0;\\r\\n\\r\\n if (this.$element.data('old-tabindex') != null) {\\r\\n this._tabindex = this.$element.data('old-tabindex');\\r\\n } else if (this.$element.attr('tabindex') != null) {\\r\\n this._tabindex = this.$element.attr('tabindex');\\r\\n }\\r\\n\\r\\n $selection.attr('title', this.$element.attr('title'));\\r\\n $selection.attr('tabindex', this._tabindex);\\r\\n\\r\\n this.$selection = $selection;\\r\\n\\r\\n return $selection;\\r\\n };\\r\\n\\r\\n BaseSelection.prototype.bind = function (container, $container) {\\r\\n var self = this;\\r\\n\\r\\n var id = container.id + '-container';\\r\\n var resultsId = container.id + '-results';\\r\\n\\r\\n this.container = container;\\r\\n\\r\\n this.$selection.on('focus', function (evt) {\\r\\n self.trigger('focus', evt);\\r\\n });\\r\\n\\r\\n this.$selection.on('blur', function (evt) {\\r\\n self._handleBlur(evt);\\r\\n });\\r\\n\\r\\n this.$selection.on('keydown', function (evt) {\\r\\n self.trigger('keypress', evt);\\r\\n\\r\\n if (evt.which === KEYS.SPACE) {\\r\\n evt.preventDefault();\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:focus', function (params) {\\r\\n self.$selection.attr('aria-activedescendant', params.data._resultId);\\r\\n });\\r\\n\\r\\n container.on('selection:update', function (params) {\\r\\n self.update(params.data);\\r\\n });\\r\\n\\r\\n container.on('open', function () {\\r\\n // When the dropdown is open, aria-expanded=\\\"true\\\"\\r\\n self.$selection.attr('aria-expanded', 'true');\\r\\n self.$selection.attr('aria-owns', resultsId);\\r\\n\\r\\n self._attachCloseHandler(container);\\r\\n });\\r\\n\\r\\n container.on('close', function () {\\r\\n // When the dropdown is closed, aria-expanded=\\\"false\\\"\\r\\n self.$selection.attr('aria-expanded', 'false');\\r\\n self.$selection.removeAttr('aria-activedescendant');\\r\\n self.$selection.removeAttr('aria-owns');\\r\\n\\r\\n self.$selection.focus();\\r\\n\\r\\n self._detachCloseHandler(container);\\r\\n });\\r\\n\\r\\n container.on('enable', function () {\\r\\n self.$selection.attr('tabindex', self._tabindex);\\r\\n });\\r\\n\\r\\n container.on('disable', function () {\\r\\n self.$selection.attr('tabindex', '-1');\\r\\n });\\r\\n };\\r\\n\\r\\n BaseSelection.prototype._handleBlur = function (evt) {\\r\\n var self = this;\\r\\n\\r\\n // This needs to be delayed as the active element is the body when the tab\\r\\n // key is pressed, possibly along with others.\\r\\n window.setTimeout(function () {\\r\\n // Don't trigger `blur` if the focus is still in the selection\\r\\n if (\\r\\n (document.activeElement == self.$selection[0]) ||\\r\\n ($.contains(self.$selection[0], document.activeElement))\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.trigger('blur', evt);\\r\\n }, 1);\\r\\n };\\r\\n\\r\\n BaseSelection.prototype._attachCloseHandler = function (container) {\\r\\n var self = this;\\r\\n\\r\\n $(document.body).on('mousedown.select2.' + container.id, function (e) {\\r\\n var $target = $(e.target);\\r\\n\\r\\n var $select = $target.closest('.select2');\\r\\n\\r\\n var $all = $('.select2.select2-container--open');\\r\\n\\r\\n $all.each(function () {\\r\\n var $this = $(this);\\r\\n\\r\\n if (this == $select[0]) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $element = $this.data('element');\\r\\n\\r\\n $element.select2('close');\\r\\n });\\r\\n });\\r\\n };\\r\\n\\r\\n BaseSelection.prototype._detachCloseHandler = function (container) {\\r\\n $(document.body).off('mousedown.select2.' + container.id);\\r\\n };\\r\\n\\r\\n BaseSelection.prototype.position = function ($selection, $container) {\\r\\n var $selectionContainer = $container.find('.selection');\\r\\n $selectionContainer.append($selection);\\r\\n };\\r\\n\\r\\n BaseSelection.prototype.destroy = function () {\\r\\n this._detachCloseHandler(this.container);\\r\\n };\\r\\n\\r\\n BaseSelection.prototype.update = function (data) {\\r\\n throw new Error('The `update` method must be defined in child classes.');\\r\\n };\\r\\n\\r\\n return BaseSelection;\\r\\n});\\r\\n\\nS2.define('select2/selection/single',[\\r\\n 'jquery',\\r\\n './base',\\r\\n '../utils',\\r\\n '../keys'\\r\\n], function ($, BaseSelection, Utils, KEYS) {\\r\\n function SingleSelection () {\\r\\n SingleSelection.__super__.constructor.apply(this, arguments);\\r\\n }\\r\\n\\r\\n Utils.Extend(SingleSelection, BaseSelection);\\r\\n\\r\\n SingleSelection.prototype.render = function () {\\r\\n var $selection = SingleSelection.__super__.render.call(this);\\r\\n\\r\\n $selection.addClass('select2-selection--single');\\r\\n\\r\\n $selection.html(\\r\\n '<span class=\\\"select2-selection__rendered\\\"></span>' +\\r\\n '<span class=\\\"select2-selection__arrow\\\" role=\\\"presentation\\\">' +\\r\\n '<b role=\\\"presentation\\\"></b>' +\\r\\n '</span>'\\r\\n );\\r\\n\\r\\n return $selection;\\r\\n };\\r\\n\\r\\n SingleSelection.prototype.bind = function (container, $container) {\\r\\n var self = this;\\r\\n\\r\\n SingleSelection.__super__.bind.apply(this, arguments);\\r\\n\\r\\n var id = container.id + '-container';\\r\\n\\r\\n this.$selection.find('.select2-selection__rendered').attr('id', id);\\r\\n this.$selection.attr('aria-labelledby', id);\\r\\n\\r\\n this.$selection.on('mousedown', function (evt) {\\r\\n // Only respond to left clicks\\r\\n if (evt.which !== 1) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.trigger('toggle', {\\r\\n originalEvent: evt\\r\\n });\\r\\n });\\r\\n\\r\\n this.$selection.on('focus', function (evt) {\\r\\n // User focuses on the container\\r\\n });\\r\\n\\r\\n this.$selection.on('blur', function (evt) {\\r\\n // User exits the container\\r\\n });\\r\\n\\r\\n container.on('focus', function (evt) {\\r\\n if (!container.isOpen()) {\\r\\n self.$selection.focus();\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('selection:update', function (params) {\\r\\n self.update(params.data);\\r\\n });\\r\\n };\\r\\n\\r\\n SingleSelection.prototype.clear = function () {\\r\\n this.$selection.find('.select2-selection__rendered').empty();\\r\\n };\\r\\n\\r\\n SingleSelection.prototype.display = function (data, container) {\\r\\n var template = this.options.get('templateSelection');\\r\\n var escapeMarkup = this.options.get('escapeMarkup');\\r\\n\\r\\n return escapeMarkup(template(data, container));\\r\\n };\\r\\n\\r\\n SingleSelection.prototype.selectionContainer = function () {\\r\\n return $('<span></span>');\\r\\n };\\r\\n\\r\\n SingleSelection.prototype.update = function (data) {\\r\\n if (data.length === 0) {\\r\\n this.clear();\\r\\n return;\\r\\n }\\r\\n\\r\\n var selection = data[0];\\r\\n\\r\\n var $rendered = this.$selection.find('.select2-selection__rendered');\\r\\n var formatted = this.display(selection, $rendered);\\r\\n\\r\\n $rendered.empty().append(formatted);\\r\\n $rendered.prop('title', selection.title || selection.text);\\r\\n };\\r\\n\\r\\n return SingleSelection;\\r\\n});\\r\\n\\nS2.define('select2/selection/multiple',[\\r\\n 'jquery',\\r\\n './base',\\r\\n '../utils'\\r\\n], function ($, BaseSelection, Utils) {\\r\\n function MultipleSelection ($element, options) {\\r\\n MultipleSelection.__super__.constructor.apply(this, arguments);\\r\\n }\\r\\n\\r\\n Utils.Extend(MultipleSelection, BaseSelection);\\r\\n\\r\\n MultipleSelection.prototype.render = function () {\\r\\n var $selection = MultipleSelection.__super__.render.call(this);\\r\\n\\r\\n $selection.addClass('select2-selection--multiple');\\r\\n\\r\\n $selection.html(\\r\\n '<ul class=\\\"select2-selection__rendered\\\"></ul>'\\r\\n );\\r\\n\\r\\n return $selection;\\r\\n };\\r\\n\\r\\n MultipleSelection.prototype.bind = function (container, $container) {\\r\\n var self = this;\\r\\n\\r\\n MultipleSelection.__super__.bind.apply(this, arguments);\\r\\n\\r\\n this.$selection.on('click', function (evt) {\\r\\n self.trigger('toggle', {\\r\\n originalEvent: evt\\r\\n });\\r\\n });\\r\\n\\r\\n this.$selection.on(\\r\\n 'click',\\r\\n '.select2-selection__choice__remove',\\r\\n function (evt) {\\r\\n // Ignore the event if it is disabled\\r\\n if (self.options.get('disabled')) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $remove = $(this);\\r\\n var $selection = $remove.parent();\\r\\n\\r\\n var data = $selection.data('data');\\r\\n\\r\\n self.trigger('unselect', {\\r\\n originalEvent: evt,\\r\\n data: data\\r\\n });\\r\\n }\\r\\n );\\r\\n };\\r\\n\\r\\n MultipleSelection.prototype.clear = function () {\\r\\n this.$selection.find('.select2-selection__rendered').empty();\\r\\n };\\r\\n\\r\\n MultipleSelection.prototype.display = function (data, container) {\\r\\n var template = this.options.get('templateSelection');\\r\\n var escapeMarkup = this.options.get('escapeMarkup');\\r\\n\\r\\n return escapeMarkup(template(data, container));\\r\\n };\\r\\n\\r\\n MultipleSelection.prototype.selectionContainer = function () {\\r\\n var $container = $(\\r\\n '<li class=\\\"select2-selection__choice\\\">' +\\r\\n '<span class=\\\"select2-selection__choice__remove\\\" role=\\\"presentation\\\">' +\\r\\n '&times;' +\\r\\n '</span>' +\\r\\n '</li>'\\r\\n );\\r\\n\\r\\n return $container;\\r\\n };\\r\\n\\r\\n MultipleSelection.prototype.update = function (data) {\\r\\n this.clear();\\r\\n\\r\\n if (data.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $selections = [];\\r\\n\\r\\n for (var d = 0; d < data.length; d++) {\\r\\n var selection = data[d];\\r\\n\\r\\n var $selection = this.selectionContainer();\\r\\n var formatted = this.display(selection, $selection);\\r\\n\\r\\n $selection.append(formatted);\\r\\n $selection.prop('title', selection.title || selection.text);\\r\\n\\r\\n $selection.data('data', selection);\\r\\n\\r\\n $selections.push($selection);\\r\\n }\\r\\n\\r\\n var $rendered = this.$selection.find('.select2-selection__rendered');\\r\\n\\r\\n Utils.appendMany($rendered, $selections);\\r\\n };\\r\\n\\r\\n return MultipleSelection;\\r\\n});\\r\\n\\nS2.define('select2/selection/placeholder',[\\r\\n '../utils'\\r\\n], function (Utils) {\\r\\n function Placeholder (decorated, $element, options) {\\r\\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\\r\\n\\r\\n decorated.call(this, $element, options);\\r\\n }\\r\\n\\r\\n Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\\r\\n if (typeof placeholder === 'string') {\\r\\n placeholder = {\\r\\n id: '',\\r\\n text: placeholder\\r\\n };\\r\\n }\\r\\n\\r\\n return placeholder;\\r\\n };\\r\\n\\r\\n Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\\r\\n var $placeholder = this.selectionContainer();\\r\\n\\r\\n $placeholder.html(this.display(placeholder));\\r\\n $placeholder.addClass('select2-selection__placeholder')\\r\\n .removeClass('select2-selection__choice');\\r\\n\\r\\n return $placeholder;\\r\\n };\\r\\n\\r\\n Placeholder.prototype.update = function (decorated, data) {\\r\\n var singlePlaceholder = (\\r\\n data.length == 1 && data[0].id != this.placeholder.id\\r\\n );\\r\\n var multipleSelections = data.length > 1;\\r\\n\\r\\n if (multipleSelections || singlePlaceholder) {\\r\\n return decorated.call(this, data);\\r\\n }\\r\\n\\r\\n this.clear();\\r\\n\\r\\n var $placeholder = this.createPlaceholder(this.placeholder);\\r\\n\\r\\n this.$selection.find('.select2-selection__rendered').append($placeholder);\\r\\n };\\r\\n\\r\\n return Placeholder;\\r\\n});\\r\\n\\nS2.define('select2/selection/allowClear',[\\r\\n 'jquery',\\r\\n '../keys'\\r\\n], function ($, KEYS) {\\r\\n function AllowClear () { }\\r\\n\\r\\n AllowClear.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n if (this.placeholder == null) {\\r\\n if (this.options.get('debug') && window.console && console.error) {\\r\\n console.error(\\r\\n 'Select2: The `allowClear` option should be used in combination ' +\\r\\n 'with the `placeholder` option.'\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n this.$selection.on('mousedown', '.select2-selection__clear',\\r\\n function (evt) {\\r\\n self._handleClear(evt);\\r\\n });\\r\\n\\r\\n container.on('keypress', function (evt) {\\r\\n self._handleKeyboardClear(evt, container);\\r\\n });\\r\\n };\\r\\n\\r\\n AllowClear.prototype._handleClear = function (_, evt) {\\r\\n // Ignore the event if it is disabled\\r\\n if (this.options.get('disabled')) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $clear = this.$selection.find('.select2-selection__clear');\\r\\n\\r\\n // Ignore the event if nothing has been selected\\r\\n if ($clear.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n evt.stopPropagation();\\r\\n\\r\\n var data = $clear.data('data');\\r\\n\\r\\n for (var d = 0; d < data.length; d++) {\\r\\n var unselectData = {\\r\\n data: data[d]\\r\\n };\\r\\n\\r\\n // Trigger the `unselect` event, so people can prevent it from being\\r\\n // cleared.\\r\\n this.trigger('unselect', unselectData);\\r\\n\\r\\n // If the event was prevented, don't clear it out.\\r\\n if (unselectData.prevented) {\\r\\n return;\\r\\n }\\r\\n }\\r\\n\\r\\n this.$element.val(this.placeholder.id).trigger('change');\\r\\n\\r\\n this.trigger('toggle', {});\\r\\n };\\r\\n\\r\\n AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\\r\\n if (container.isOpen()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\\r\\n this._handleClear(evt);\\r\\n }\\r\\n };\\r\\n\\r\\n AllowClear.prototype.update = function (decorated, data) {\\r\\n decorated.call(this, data);\\r\\n\\r\\n if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\\r\\n data.length === 0) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var $remove = $(\\r\\n '<span class=\\\"select2-selection__clear\\\">' +\\r\\n '&times;' +\\r\\n '</span>'\\r\\n );\\r\\n $remove.data('data', data);\\r\\n\\r\\n this.$selection.find('.select2-selection__rendered').prepend($remove);\\r\\n };\\r\\n\\r\\n return AllowClear;\\r\\n});\\r\\n\\nS2.define('select2/selection/search',[\\r\\n 'jquery',\\r\\n '../utils',\\r\\n '../keys'\\r\\n], function ($, Utils, KEYS) {\\r\\n function Search (decorated, $element, options) {\\r\\n decorated.call(this, $element, options);\\r\\n }\\r\\n\\r\\n Search.prototype.render = function (decorated) {\\r\\n var $search = $(\\r\\n '<li class=\\\"select2-search select2-search--inline\\\">' +\\r\\n '<input class=\\\"select2-search__field\\\" type=\\\"search\\\" tabindex=\\\"-1\\\"' +\\r\\n ' autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\"' +\\r\\n ' spellcheck=\\\"false\\\" role=\\\"textbox\\\" aria-autocomplete=\\\"list\\\" />' +\\r\\n '</li>'\\r\\n );\\r\\n\\r\\n this.$searchContainer = $search;\\r\\n this.$search = $search.find('input');\\r\\n\\r\\n var $rendered = decorated.call(this);\\r\\n\\r\\n this._transferTabIndex();\\r\\n\\r\\n return $rendered;\\r\\n };\\r\\n\\r\\n Search.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('open', function () {\\r\\n self.$search.trigger('focus');\\r\\n });\\r\\n\\r\\n container.on('close', function () {\\r\\n self.$search.val('');\\r\\n self.$search.removeAttr('aria-activedescendant');\\r\\n self.$search.trigger('focus');\\r\\n });\\r\\n\\r\\n container.on('enable', function () {\\r\\n self.$search.prop('disabled', false);\\r\\n\\r\\n self._transferTabIndex();\\r\\n });\\r\\n\\r\\n container.on('disable', function () {\\r\\n self.$search.prop('disabled', true);\\r\\n });\\r\\n\\r\\n container.on('focus', function (evt) {\\r\\n self.$search.trigger('focus');\\r\\n });\\r\\n\\r\\n container.on('results:focus', function (params) {\\r\\n self.$search.attr('aria-activedescendant', params.id);\\r\\n });\\r\\n\\r\\n this.$selection.on('focusin', '.select2-search--inline', function (evt) {\\r\\n self.trigger('focus', evt);\\r\\n });\\r\\n\\r\\n this.$selection.on('focusout', '.select2-search--inline', function (evt) {\\r\\n self._handleBlur(evt);\\r\\n });\\r\\n\\r\\n this.$selection.on('keydown', '.select2-search--inline', function (evt) {\\r\\n evt.stopPropagation();\\r\\n\\r\\n self.trigger('keypress', evt);\\r\\n\\r\\n self._keyUpPrevented = evt.isDefaultPrevented();\\r\\n\\r\\n var key = evt.which;\\r\\n\\r\\n if (key === KEYS.BACKSPACE && self.$search.val() === '') {\\r\\n var $previousChoice = self.$searchContainer\\r\\n .prev('.select2-selection__choice');\\r\\n\\r\\n if ($previousChoice.length > 0) {\\r\\n var item = $previousChoice.data('data');\\r\\n\\r\\n self.searchRemoveChoice(item);\\r\\n\\r\\n evt.preventDefault();\\r\\n }\\r\\n }\\r\\n });\\r\\n\\r\\n // Try to detect the IE version should the `documentMode` property that\\r\\n // is stored on the document. This is only implemented in IE and is\\r\\n // slightly cleaner than doing a user agent check.\\r\\n // This property is not available in Edge, but Edge also doesn't have\\r\\n // this bug.\\r\\n var msie = document.documentMode;\\r\\n var disableInputEvents = msie && msie <= 11;\\r\\n\\r\\n // Workaround for browsers which do not support the `input` event\\r\\n // This will prevent double-triggering of events for browsers which support\\r\\n // both the `keyup` and `input` events.\\r\\n this.$selection.on(\\r\\n 'input.searchcheck',\\r\\n '.select2-search--inline',\\r\\n function (evt) {\\r\\n // IE will trigger the `input` event when a placeholder is used on a\\r\\n // search box. To get around this issue, we are forced to ignore all\\r\\n // `input` events in IE and keep using `keyup`.\\r\\n if (disableInputEvents) {\\r\\n self.$selection.off('input.search input.searchcheck');\\r\\n return;\\r\\n }\\r\\n\\r\\n // Unbind the duplicated `keyup` event\\r\\n self.$selection.off('keyup.search');\\r\\n }\\r\\n );\\r\\n\\r\\n this.$selection.on(\\r\\n 'keyup.search input.search',\\r\\n '.select2-search--inline',\\r\\n function (evt) {\\r\\n // IE will trigger the `input` event when a placeholder is used on a\\r\\n // search box. To get around this issue, we are forced to ignore all\\r\\n // `input` events in IE and keep using `keyup`.\\r\\n if (disableInputEvents && evt.type === 'input') {\\r\\n self.$selection.off('input.search input.searchcheck');\\r\\n return;\\r\\n }\\r\\n\\r\\n var key = evt.which;\\r\\n\\r\\n // We can freely ignore events from modifier keys\\r\\n if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\\r\\n return;\\r\\n }\\r\\n\\r\\n // Tabbing will be handled during the `keydown` phase\\r\\n if (key == KEYS.TAB) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.handleSearch(evt);\\r\\n }\\r\\n );\\r\\n };\\r\\n\\r\\n /**\\r\\n * This method will transfer the tabindex attribute from the rendered\\r\\n * selection to the search box. This allows for the search box to be used as\\r\\n * the primary focus instead of the selection container.\\r\\n *\\r\\n * @private\\r\\n */\\r\\n Search.prototype._transferTabIndex = function (decorated) {\\r\\n this.$search.attr('tabindex', this.$selection.attr('tabindex'));\\r\\n this.$selection.attr('tabindex', '-1');\\r\\n };\\r\\n\\r\\n Search.prototype.createPlaceholder = function (decorated, placeholder) {\\r\\n this.$search.attr('placeholder', placeholder.text);\\r\\n };\\r\\n\\r\\n Search.prototype.update = function (decorated, data) {\\r\\n var searchHadFocus = this.$search[0] == document.activeElement;\\r\\n\\r\\n this.$search.attr('placeholder', '');\\r\\n\\r\\n decorated.call(this, data);\\r\\n\\r\\n this.$selection.find('.select2-selection__rendered')\\r\\n .append(this.$searchContainer);\\r\\n\\r\\n this.resizeSearch();\\r\\n if (searchHadFocus) {\\r\\n this.$search.focus();\\r\\n }\\r\\n };\\r\\n\\r\\n Search.prototype.handleSearch = function () {\\r\\n this.resizeSearch();\\r\\n\\r\\n if (!this._keyUpPrevented) {\\r\\n var input = this.$search.val();\\r\\n\\r\\n this.trigger('query', {\\r\\n term: input\\r\\n });\\r\\n }\\r\\n\\r\\n this._keyUpPrevented = false;\\r\\n };\\r\\n\\r\\n Search.prototype.searchRemoveChoice = function (decorated, item) {\\r\\n this.trigger('unselect', {\\r\\n data: item\\r\\n });\\r\\n\\r\\n this.$search.val(item.text);\\r\\n this.handleSearch();\\r\\n };\\r\\n\\r\\n Search.prototype.resizeSearch = function () {\\r\\n this.$search.css('width', '25px');\\r\\n\\r\\n var width = '';\\r\\n\\r\\n if (this.$search.attr('placeholder') !== '') {\\r\\n width = this.$selection.find('.select2-selection__rendered').innerWidth();\\r\\n } else {\\r\\n var minimumWidth = this.$search.val().length + 1;\\r\\n\\r\\n width = (minimumWidth * 0.75) + 'em';\\r\\n }\\r\\n\\r\\n this.$search.css('width', width);\\r\\n };\\r\\n\\r\\n return Search;\\r\\n});\\r\\n\\nS2.define('select2/selection/eventRelay',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n function EventRelay () { }\\r\\n\\r\\n EventRelay.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n var relayEvents = [\\r\\n 'open', 'opening',\\r\\n 'close', 'closing',\\r\\n 'select', 'selecting',\\r\\n 'unselect', 'unselecting'\\r\\n ];\\r\\n\\r\\n var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('*', function (name, params) {\\r\\n // Ignore events that should not be relayed\\r\\n if ($.inArray(name, relayEvents) === -1) {\\r\\n return;\\r\\n }\\r\\n\\r\\n // The parameters should always be an object\\r\\n params = params || {};\\r\\n\\r\\n // Generate the jQuery event for the Select2 event\\r\\n var evt = $.Event('select2:' + name, {\\r\\n params: params\\r\\n });\\r\\n\\r\\n self.$element.trigger(evt);\\r\\n\\r\\n // Only handle preventable events if it was one\\r\\n if ($.inArray(name, preventableEvents) === -1) {\\r\\n return;\\r\\n }\\r\\n\\r\\n params.prevented = evt.isDefaultPrevented();\\r\\n });\\r\\n };\\r\\n\\r\\n return EventRelay;\\r\\n});\\r\\n\\nS2.define('select2/translation',[\\r\\n 'jquery',\\r\\n 'require'\\r\\n], function ($, require) {\\r\\n function Translation (dict) {\\r\\n this.dict = dict || {};\\r\\n }\\r\\n\\r\\n Translation.prototype.all = function () {\\r\\n return this.dict;\\r\\n };\\r\\n\\r\\n Translation.prototype.get = function (key) {\\r\\n return this.dict[key];\\r\\n };\\r\\n\\r\\n Translation.prototype.extend = function (translation) {\\r\\n this.dict = $.extend({}, translation.all(), this.dict);\\r\\n };\\r\\n\\r\\n // Static functions\\r\\n\\r\\n Translation._cache = {};\\r\\n\\r\\n Translation.loadPath = function (path) {\\r\\n if (!(path in Translation._cache)) {\\r\\n var translations = require(path);\\r\\n\\r\\n Translation._cache[path] = translations;\\r\\n }\\r\\n\\r\\n return new Translation(Translation._cache[path]);\\r\\n };\\r\\n\\r\\n return Translation;\\r\\n});\\r\\n\\nS2.define('select2/diacritics',[\\r\\n\\r\\n], function () {\\r\\n var diacritics = {\\r\\n '\\\\u24B6': 'A',\\r\\n '\\\\uFF21': 'A',\\r\\n '\\\\u00C0': 'A',\\r\\n '\\\\u00C1': 'A',\\r\\n '\\\\u00C2': 'A',\\r\\n '\\\\u1EA6': 'A',\\r\\n '\\\\u1EA4': 'A',\\r\\n '\\\\u1EAA': 'A',\\r\\n '\\\\u1EA8': 'A',\\r\\n '\\\\u00C3': 'A',\\r\\n '\\\\u0100': 'A',\\r\\n '\\\\u0102': 'A',\\r\\n '\\\\u1EB0': 'A',\\r\\n '\\\\u1EAE': 'A',\\r\\n '\\\\u1EB4': 'A',\\r\\n '\\\\u1EB2': 'A',\\r\\n '\\\\u0226': 'A',\\r\\n '\\\\u01E0': 'A',\\r\\n '\\\\u00C4': 'A',\\r\\n '\\\\u01DE': 'A',\\r\\n '\\\\u1EA2': 'A',\\r\\n '\\\\u00C5': 'A',\\r\\n '\\\\u01FA': 'A',\\r\\n '\\\\u01CD': 'A',\\r\\n '\\\\u0200': 'A',\\r\\n '\\\\u0202': 'A',\\r\\n '\\\\u1EA0': 'A',\\r\\n '\\\\u1EAC': 'A',\\r\\n '\\\\u1EB6': 'A',\\r\\n '\\\\u1E00': 'A',\\r\\n '\\\\u0104': 'A',\\r\\n '\\\\u023A': 'A',\\r\\n '\\\\u2C6F': 'A',\\r\\n '\\\\uA732': 'AA',\\r\\n '\\\\u00C6': 'AE',\\r\\n '\\\\u01FC': 'AE',\\r\\n '\\\\u01E2': 'AE',\\r\\n '\\\\uA734': 'AO',\\r\\n '\\\\uA736': 'AU',\\r\\n '\\\\uA738': 'AV',\\r\\n '\\\\uA73A': 'AV',\\r\\n '\\\\uA73C': 'AY',\\r\\n '\\\\u24B7': 'B',\\r\\n '\\\\uFF22': 'B',\\r\\n '\\\\u1E02': 'B',\\r\\n '\\\\u1E04': 'B',\\r\\n '\\\\u1E06': 'B',\\r\\n '\\\\u0243': 'B',\\r\\n '\\\\u0182': 'B',\\r\\n '\\\\u0181': 'B',\\r\\n '\\\\u24B8': 'C',\\r\\n '\\\\uFF23': 'C',\\r\\n '\\\\u0106': 'C',\\r\\n '\\\\u0108': 'C',\\r\\n '\\\\u010A': 'C',\\r\\n '\\\\u010C': 'C',\\r\\n '\\\\u00C7': 'C',\\r\\n '\\\\u1E08': 'C',\\r\\n '\\\\u0187': 'C',\\r\\n '\\\\u023B': 'C',\\r\\n '\\\\uA73E': 'C',\\r\\n '\\\\u24B9': 'D',\\r\\n '\\\\uFF24': 'D',\\r\\n '\\\\u1E0A': 'D',\\r\\n '\\\\u010E': 'D',\\r\\n '\\\\u1E0C': 'D',\\r\\n '\\\\u1E10': 'D',\\r\\n '\\\\u1E12': 'D',\\r\\n '\\\\u1E0E': 'D',\\r\\n '\\\\u0110': 'D',\\r\\n '\\\\u018B': 'D',\\r\\n '\\\\u018A': 'D',\\r\\n '\\\\u0189': 'D',\\r\\n '\\\\uA779': 'D',\\r\\n '\\\\u01F1': 'DZ',\\r\\n '\\\\u01C4': 'DZ',\\r\\n '\\\\u01F2': 'Dz',\\r\\n '\\\\u01C5': 'Dz',\\r\\n '\\\\u24BA': 'E',\\r\\n '\\\\uFF25': 'E',\\r\\n '\\\\u00C8': 'E',\\r\\n '\\\\u00C9': 'E',\\r\\n '\\\\u00CA': 'E',\\r\\n '\\\\u1EC0': 'E',\\r\\n '\\\\u1EBE': 'E',\\r\\n '\\\\u1EC4': 'E',\\r\\n '\\\\u1EC2': 'E',\\r\\n '\\\\u1EBC': 'E',\\r\\n '\\\\u0112': 'E',\\r\\n '\\\\u1E14': 'E',\\r\\n '\\\\u1E16': 'E',\\r\\n '\\\\u0114': 'E',\\r\\n '\\\\u0116': 'E',\\r\\n '\\\\u00CB': 'E',\\r\\n '\\\\u1EBA': 'E',\\r\\n '\\\\u011A': 'E',\\r\\n '\\\\u0204': 'E',\\r\\n '\\\\u0206': 'E',\\r\\n '\\\\u1EB8': 'E',\\r\\n '\\\\u1EC6': 'E',\\r\\n '\\\\u0228': 'E',\\r\\n '\\\\u1E1C': 'E',\\r\\n '\\\\u0118': 'E',\\r\\n '\\\\u1E18': 'E',\\r\\n '\\\\u1E1A': 'E',\\r\\n '\\\\u0190': 'E',\\r\\n '\\\\u018E': 'E',\\r\\n '\\\\u24BB': 'F',\\r\\n '\\\\uFF26': 'F',\\r\\n '\\\\u1E1E': 'F',\\r\\n '\\\\u0191': 'F',\\r\\n '\\\\uA77B': 'F',\\r\\n '\\\\u24BC': 'G',\\r\\n '\\\\uFF27': 'G',\\r\\n '\\\\u01F4': 'G',\\r\\n '\\\\u011C': 'G',\\r\\n '\\\\u1E20': 'G',\\r\\n '\\\\u011E': 'G',\\r\\n '\\\\u0120': 'G',\\r\\n '\\\\u01E6': 'G',\\r\\n '\\\\u0122': 'G',\\r\\n '\\\\u01E4': 'G',\\r\\n '\\\\u0193': 'G',\\r\\n '\\\\uA7A0': 'G',\\r\\n '\\\\uA77D': 'G',\\r\\n '\\\\uA77E': 'G',\\r\\n '\\\\u24BD': 'H',\\r\\n '\\\\uFF28': 'H',\\r\\n '\\\\u0124': 'H',\\r\\n '\\\\u1E22': 'H',\\r\\n '\\\\u1E26': 'H',\\r\\n '\\\\u021E': 'H',\\r\\n '\\\\u1E24': 'H',\\r\\n '\\\\u1E28': 'H',\\r\\n '\\\\u1E2A': 'H',\\r\\n '\\\\u0126': 'H',\\r\\n '\\\\u2C67': 'H',\\r\\n '\\\\u2C75': 'H',\\r\\n '\\\\uA78D': 'H',\\r\\n '\\\\u24BE': 'I',\\r\\n '\\\\uFF29': 'I',\\r\\n '\\\\u00CC': 'I',\\r\\n '\\\\u00CD': 'I',\\r\\n '\\\\u00CE': 'I',\\r\\n '\\\\u0128': 'I',\\r\\n '\\\\u012A': 'I',\\r\\n '\\\\u012C': 'I',\\r\\n '\\\\u0130': 'I',\\r\\n '\\\\u00CF': 'I',\\r\\n '\\\\u1E2E': 'I',\\r\\n '\\\\u1EC8': 'I',\\r\\n '\\\\u01CF': 'I',\\r\\n '\\\\u0208': 'I',\\r\\n '\\\\u020A': 'I',\\r\\n '\\\\u1ECA': 'I',\\r\\n '\\\\u012E': 'I',\\r\\n '\\\\u1E2C': 'I',\\r\\n '\\\\u0197': 'I',\\r\\n '\\\\u24BF': 'J',\\r\\n '\\\\uFF2A': 'J',\\r\\n '\\\\u0134': 'J',\\r\\n '\\\\u0248': 'J',\\r\\n '\\\\u24C0': 'K',\\r\\n '\\\\uFF2B': 'K',\\r\\n '\\\\u1E30': 'K',\\r\\n '\\\\u01E8': 'K',\\r\\n '\\\\u1E32': 'K',\\r\\n '\\\\u0136': 'K',\\r\\n '\\\\u1E34': 'K',\\r\\n '\\\\u0198': 'K',\\r\\n '\\\\u2C69': 'K',\\r\\n '\\\\uA740': 'K',\\r\\n '\\\\uA742': 'K',\\r\\n '\\\\uA744': 'K',\\r\\n '\\\\uA7A2': 'K',\\r\\n '\\\\u24C1': 'L',\\r\\n '\\\\uFF2C': 'L',\\r\\n '\\\\u013F': 'L',\\r\\n '\\\\u0139': 'L',\\r\\n '\\\\u013D': 'L',\\r\\n '\\\\u1E36': 'L',\\r\\n '\\\\u1E38': 'L',\\r\\n '\\\\u013B': 'L',\\r\\n '\\\\u1E3C': 'L',\\r\\n '\\\\u1E3A': 'L',\\r\\n '\\\\u0141': 'L',\\r\\n '\\\\u023D': 'L',\\r\\n '\\\\u2C62': 'L',\\r\\n '\\\\u2C60': 'L',\\r\\n '\\\\uA748': 'L',\\r\\n '\\\\uA746': 'L',\\r\\n '\\\\uA780': 'L',\\r\\n '\\\\u01C7': 'LJ',\\r\\n '\\\\u01C8': 'Lj',\\r\\n '\\\\u24C2': 'M',\\r\\n '\\\\uFF2D': 'M',\\r\\n '\\\\u1E3E': 'M',\\r\\n '\\\\u1E40': 'M',\\r\\n '\\\\u1E42': 'M',\\r\\n '\\\\u2C6E': 'M',\\r\\n '\\\\u019C': 'M',\\r\\n '\\\\u24C3': 'N',\\r\\n '\\\\uFF2E': 'N',\\r\\n '\\\\u01F8': 'N',\\r\\n '\\\\u0143': 'N',\\r\\n '\\\\u00D1': 'N',\\r\\n '\\\\u1E44': 'N',\\r\\n '\\\\u0147': 'N',\\r\\n '\\\\u1E46': 'N',\\r\\n '\\\\u0145': 'N',\\r\\n '\\\\u1E4A': 'N',\\r\\n '\\\\u1E48': 'N',\\r\\n '\\\\u0220': 'N',\\r\\n '\\\\u019D': 'N',\\r\\n '\\\\uA790': 'N',\\r\\n '\\\\uA7A4': 'N',\\r\\n '\\\\u01CA': 'NJ',\\r\\n '\\\\u01CB': 'Nj',\\r\\n '\\\\u24C4': 'O',\\r\\n '\\\\uFF2F': 'O',\\r\\n '\\\\u00D2': 'O',\\r\\n '\\\\u00D3': 'O',\\r\\n '\\\\u00D4': 'O',\\r\\n '\\\\u1ED2': 'O',\\r\\n '\\\\u1ED0': 'O',\\r\\n '\\\\u1ED6': 'O',\\r\\n '\\\\u1ED4': 'O',\\r\\n '\\\\u00D5': 'O',\\r\\n '\\\\u1E4C': 'O',\\r\\n '\\\\u022C': 'O',\\r\\n '\\\\u1E4E': 'O',\\r\\n '\\\\u014C': 'O',\\r\\n '\\\\u1E50': 'O',\\r\\n '\\\\u1E52': 'O',\\r\\n '\\\\u014E': 'O',\\r\\n '\\\\u022E': 'O',\\r\\n '\\\\u0230': 'O',\\r\\n '\\\\u00D6': 'O',\\r\\n '\\\\u022A': 'O',\\r\\n '\\\\u1ECE': 'O',\\r\\n '\\\\u0150': 'O',\\r\\n '\\\\u01D1': 'O',\\r\\n '\\\\u020C': 'O',\\r\\n '\\\\u020E': 'O',\\r\\n '\\\\u01A0': 'O',\\r\\n '\\\\u1EDC': 'O',\\r\\n '\\\\u1EDA': 'O',\\r\\n '\\\\u1EE0': 'O',\\r\\n '\\\\u1EDE': 'O',\\r\\n '\\\\u1EE2': 'O',\\r\\n '\\\\u1ECC': 'O',\\r\\n '\\\\u1ED8': 'O',\\r\\n '\\\\u01EA': 'O',\\r\\n '\\\\u01EC': 'O',\\r\\n '\\\\u00D8': 'O',\\r\\n '\\\\u01FE': 'O',\\r\\n '\\\\u0186': 'O',\\r\\n '\\\\u019F': 'O',\\r\\n '\\\\uA74A': 'O',\\r\\n '\\\\uA74C': 'O',\\r\\n '\\\\u01A2': 'OI',\\r\\n '\\\\uA74E': 'OO',\\r\\n '\\\\u0222': 'OU',\\r\\n '\\\\u24C5': 'P',\\r\\n '\\\\uFF30': 'P',\\r\\n '\\\\u1E54': 'P',\\r\\n '\\\\u1E56': 'P',\\r\\n '\\\\u01A4': 'P',\\r\\n '\\\\u2C63': 'P',\\r\\n '\\\\uA750': 'P',\\r\\n '\\\\uA752': 'P',\\r\\n '\\\\uA754': 'P',\\r\\n '\\\\u24C6': 'Q',\\r\\n '\\\\uFF31': 'Q',\\r\\n '\\\\uA756': 'Q',\\r\\n '\\\\uA758': 'Q',\\r\\n '\\\\u024A': 'Q',\\r\\n '\\\\u24C7': 'R',\\r\\n '\\\\uFF32': 'R',\\r\\n '\\\\u0154': 'R',\\r\\n '\\\\u1E58': 'R',\\r\\n '\\\\u0158': 'R',\\r\\n '\\\\u0210': 'R',\\r\\n '\\\\u0212': 'R',\\r\\n '\\\\u1E5A': 'R',\\r\\n '\\\\u1E5C': 'R',\\r\\n '\\\\u0156': 'R',\\r\\n '\\\\u1E5E': 'R',\\r\\n '\\\\u024C': 'R',\\r\\n '\\\\u2C64': 'R',\\r\\n '\\\\uA75A': 'R',\\r\\n '\\\\uA7A6': 'R',\\r\\n '\\\\uA782': 'R',\\r\\n '\\\\u24C8': 'S',\\r\\n '\\\\uFF33': 'S',\\r\\n '\\\\u1E9E': 'S',\\r\\n '\\\\u015A': 'S',\\r\\n '\\\\u1E64': 'S',\\r\\n '\\\\u015C': 'S',\\r\\n '\\\\u1E60': 'S',\\r\\n '\\\\u0160': 'S',\\r\\n '\\\\u1E66': 'S',\\r\\n '\\\\u1E62': 'S',\\r\\n '\\\\u1E68': 'S',\\r\\n '\\\\u0218': 'S',\\r\\n '\\\\u015E': 'S',\\r\\n '\\\\u2C7E': 'S',\\r\\n '\\\\uA7A8': 'S',\\r\\n '\\\\uA784': 'S',\\r\\n '\\\\u24C9': 'T',\\r\\n '\\\\uFF34': 'T',\\r\\n '\\\\u1E6A': 'T',\\r\\n '\\\\u0164': 'T',\\r\\n '\\\\u1E6C': 'T',\\r\\n '\\\\u021A': 'T',\\r\\n '\\\\u0162': 'T',\\r\\n '\\\\u1E70': 'T',\\r\\n '\\\\u1E6E': 'T',\\r\\n '\\\\u0166': 'T',\\r\\n '\\\\u01AC': 'T',\\r\\n '\\\\u01AE': 'T',\\r\\n '\\\\u023E': 'T',\\r\\n '\\\\uA786': 'T',\\r\\n '\\\\uA728': 'TZ',\\r\\n '\\\\u24CA': 'U',\\r\\n '\\\\uFF35': 'U',\\r\\n '\\\\u00D9': 'U',\\r\\n '\\\\u00DA': 'U',\\r\\n '\\\\u00DB': 'U',\\r\\n '\\\\u0168': 'U',\\r\\n '\\\\u1E78': 'U',\\r\\n '\\\\u016A': 'U',\\r\\n '\\\\u1E7A': 'U',\\r\\n '\\\\u016C': 'U',\\r\\n '\\\\u00DC': 'U',\\r\\n '\\\\u01DB': 'U',\\r\\n '\\\\u01D7': 'U',\\r\\n '\\\\u01D5': 'U',\\r\\n '\\\\u01D9': 'U',\\r\\n '\\\\u1EE6': 'U',\\r\\n '\\\\u016E': 'U',\\r\\n '\\\\u0170': 'U',\\r\\n '\\\\u01D3': 'U',\\r\\n '\\\\u0214': 'U',\\r\\n '\\\\u0216': 'U',\\r\\n '\\\\u01AF': 'U',\\r\\n '\\\\u1EEA': 'U',\\r\\n '\\\\u1EE8': 'U',\\r\\n '\\\\u1EEE': 'U',\\r\\n '\\\\u1EEC': 'U',\\r\\n '\\\\u1EF0': 'U',\\r\\n '\\\\u1EE4': 'U',\\r\\n '\\\\u1E72': 'U',\\r\\n '\\\\u0172': 'U',\\r\\n '\\\\u1E76': 'U',\\r\\n '\\\\u1E74': 'U',\\r\\n '\\\\u0244': 'U',\\r\\n '\\\\u24CB': 'V',\\r\\n '\\\\uFF36': 'V',\\r\\n '\\\\u1E7C': 'V',\\r\\n '\\\\u1E7E': 'V',\\r\\n '\\\\u01B2': 'V',\\r\\n '\\\\uA75E': 'V',\\r\\n '\\\\u0245': 'V',\\r\\n '\\\\uA760': 'VY',\\r\\n '\\\\u24CC': 'W',\\r\\n '\\\\uFF37': 'W',\\r\\n '\\\\u1E80': 'W',\\r\\n '\\\\u1E82': 'W',\\r\\n '\\\\u0174': 'W',\\r\\n '\\\\u1E86': 'W',\\r\\n '\\\\u1E84': 'W',\\r\\n '\\\\u1E88': 'W',\\r\\n '\\\\u2C72': 'W',\\r\\n '\\\\u24CD': 'X',\\r\\n '\\\\uFF38': 'X',\\r\\n '\\\\u1E8A': 'X',\\r\\n '\\\\u1E8C': 'X',\\r\\n '\\\\u24CE': 'Y',\\r\\n '\\\\uFF39': 'Y',\\r\\n '\\\\u1EF2': 'Y',\\r\\n '\\\\u00DD': 'Y',\\r\\n '\\\\u0176': 'Y',\\r\\n '\\\\u1EF8': 'Y',\\r\\n '\\\\u0232': 'Y',\\r\\n '\\\\u1E8E': 'Y',\\r\\n '\\\\u0178': 'Y',\\r\\n '\\\\u1EF6': 'Y',\\r\\n '\\\\u1EF4': 'Y',\\r\\n '\\\\u01B3': 'Y',\\r\\n '\\\\u024E': 'Y',\\r\\n '\\\\u1EFE': 'Y',\\r\\n '\\\\u24CF': 'Z',\\r\\n '\\\\uFF3A': 'Z',\\r\\n '\\\\u0179': 'Z',\\r\\n '\\\\u1E90': 'Z',\\r\\n '\\\\u017B': 'Z',\\r\\n '\\\\u017D': 'Z',\\r\\n '\\\\u1E92': 'Z',\\r\\n '\\\\u1E94': 'Z',\\r\\n '\\\\u01B5': 'Z',\\r\\n '\\\\u0224': 'Z',\\r\\n '\\\\u2C7F': 'Z',\\r\\n '\\\\u2C6B': 'Z',\\r\\n '\\\\uA762': 'Z',\\r\\n '\\\\u24D0': 'a',\\r\\n '\\\\uFF41': 'a',\\r\\n '\\\\u1E9A': 'a',\\r\\n '\\\\u00E0': 'a',\\r\\n '\\\\u00E1': 'a',\\r\\n '\\\\u00E2': 'a',\\r\\n '\\\\u1EA7': 'a',\\r\\n '\\\\u1EA5': 'a',\\r\\n '\\\\u1EAB': 'a',\\r\\n '\\\\u1EA9': 'a',\\r\\n '\\\\u00E3': 'a',\\r\\n '\\\\u0101': 'a',\\r\\n '\\\\u0103': 'a',\\r\\n '\\\\u1EB1': 'a',\\r\\n '\\\\u1EAF': 'a',\\r\\n '\\\\u1EB5': 'a',\\r\\n '\\\\u1EB3': 'a',\\r\\n '\\\\u0227': 'a',\\r\\n '\\\\u01E1': 'a',\\r\\n '\\\\u00E4': 'a',\\r\\n '\\\\u01DF': 'a',\\r\\n '\\\\u1EA3': 'a',\\r\\n '\\\\u00E5': 'a',\\r\\n '\\\\u01FB': 'a',\\r\\n '\\\\u01CE': 'a',\\r\\n '\\\\u0201': 'a',\\r\\n '\\\\u0203': 'a',\\r\\n '\\\\u1EA1': 'a',\\r\\n '\\\\u1EAD': 'a',\\r\\n '\\\\u1EB7': 'a',\\r\\n '\\\\u1E01': 'a',\\r\\n '\\\\u0105': 'a',\\r\\n '\\\\u2C65': 'a',\\r\\n '\\\\u0250': 'a',\\r\\n '\\\\uA733': 'aa',\\r\\n '\\\\u00E6': 'ae',\\r\\n '\\\\u01FD': 'ae',\\r\\n '\\\\u01E3': 'ae',\\r\\n '\\\\uA735': 'ao',\\r\\n '\\\\uA737': 'au',\\r\\n '\\\\uA739': 'av',\\r\\n '\\\\uA73B': 'av',\\r\\n '\\\\uA73D': 'ay',\\r\\n '\\\\u24D1': 'b',\\r\\n '\\\\uFF42': 'b',\\r\\n '\\\\u1E03': 'b',\\r\\n '\\\\u1E05': 'b',\\r\\n '\\\\u1E07': 'b',\\r\\n '\\\\u0180': 'b',\\r\\n '\\\\u0183': 'b',\\r\\n '\\\\u0253': 'b',\\r\\n '\\\\u24D2': 'c',\\r\\n '\\\\uFF43': 'c',\\r\\n '\\\\u0107': 'c',\\r\\n '\\\\u0109': 'c',\\r\\n '\\\\u010B': 'c',\\r\\n '\\\\u010D': 'c',\\r\\n '\\\\u00E7': 'c',\\r\\n '\\\\u1E09': 'c',\\r\\n '\\\\u0188': 'c',\\r\\n '\\\\u023C': 'c',\\r\\n '\\\\uA73F': 'c',\\r\\n '\\\\u2184': 'c',\\r\\n '\\\\u24D3': 'd',\\r\\n '\\\\uFF44': 'd',\\r\\n '\\\\u1E0B': 'd',\\r\\n '\\\\u010F': 'd',\\r\\n '\\\\u1E0D': 'd',\\r\\n '\\\\u1E11': 'd',\\r\\n '\\\\u1E13': 'd',\\r\\n '\\\\u1E0F': 'd',\\r\\n '\\\\u0111': 'd',\\r\\n '\\\\u018C': 'd',\\r\\n '\\\\u0256': 'd',\\r\\n '\\\\u0257': 'd',\\r\\n '\\\\uA77A': 'd',\\r\\n '\\\\u01F3': 'dz',\\r\\n '\\\\u01C6': 'dz',\\r\\n '\\\\u24D4': 'e',\\r\\n '\\\\uFF45': 'e',\\r\\n '\\\\u00E8': 'e',\\r\\n '\\\\u00E9': 'e',\\r\\n '\\\\u00EA': 'e',\\r\\n '\\\\u1EC1': 'e',\\r\\n '\\\\u1EBF': 'e',\\r\\n '\\\\u1EC5': 'e',\\r\\n '\\\\u1EC3': 'e',\\r\\n '\\\\u1EBD': 'e',\\r\\n '\\\\u0113': 'e',\\r\\n '\\\\u1E15': 'e',\\r\\n '\\\\u1E17': 'e',\\r\\n '\\\\u0115': 'e',\\r\\n '\\\\u0117': 'e',\\r\\n '\\\\u00EB': 'e',\\r\\n '\\\\u1EBB': 'e',\\r\\n '\\\\u011B': 'e',\\r\\n '\\\\u0205': 'e',\\r\\n '\\\\u0207': 'e',\\r\\n '\\\\u1EB9': 'e',\\r\\n '\\\\u1EC7': 'e',\\r\\n '\\\\u0229': 'e',\\r\\n '\\\\u1E1D': 'e',\\r\\n '\\\\u0119': 'e',\\r\\n '\\\\u1E19': 'e',\\r\\n '\\\\u1E1B': 'e',\\r\\n '\\\\u0247': 'e',\\r\\n '\\\\u025B': 'e',\\r\\n '\\\\u01DD': 'e',\\r\\n '\\\\u24D5': 'f',\\r\\n '\\\\uFF46': 'f',\\r\\n '\\\\u1E1F': 'f',\\r\\n '\\\\u0192': 'f',\\r\\n '\\\\uA77C': 'f',\\r\\n '\\\\u24D6': 'g',\\r\\n '\\\\uFF47': 'g',\\r\\n '\\\\u01F5': 'g',\\r\\n '\\\\u011D': 'g',\\r\\n '\\\\u1E21': 'g',\\r\\n '\\\\u011F': 'g',\\r\\n '\\\\u0121': 'g',\\r\\n '\\\\u01E7': 'g',\\r\\n '\\\\u0123': 'g',\\r\\n '\\\\u01E5': 'g',\\r\\n '\\\\u0260': 'g',\\r\\n '\\\\uA7A1': 'g',\\r\\n '\\\\u1D79': 'g',\\r\\n '\\\\uA77F': 'g',\\r\\n '\\\\u24D7': 'h',\\r\\n '\\\\uFF48': 'h',\\r\\n '\\\\u0125': 'h',\\r\\n '\\\\u1E23': 'h',\\r\\n '\\\\u1E27': 'h',\\r\\n '\\\\u021F': 'h',\\r\\n '\\\\u1E25': 'h',\\r\\n '\\\\u1E29': 'h',\\r\\n '\\\\u1E2B': 'h',\\r\\n '\\\\u1E96': 'h',\\r\\n '\\\\u0127': 'h',\\r\\n '\\\\u2C68': 'h',\\r\\n '\\\\u2C76': 'h',\\r\\n '\\\\u0265': 'h',\\r\\n '\\\\u0195': 'hv',\\r\\n '\\\\u24D8': 'i',\\r\\n '\\\\uFF49': 'i',\\r\\n '\\\\u00EC': 'i',\\r\\n '\\\\u00ED': 'i',\\r\\n '\\\\u00EE': 'i',\\r\\n '\\\\u0129': 'i',\\r\\n '\\\\u012B': 'i',\\r\\n '\\\\u012D': 'i',\\r\\n '\\\\u00EF': 'i',\\r\\n '\\\\u1E2F': 'i',\\r\\n '\\\\u1EC9': 'i',\\r\\n '\\\\u01D0': 'i',\\r\\n '\\\\u0209': 'i',\\r\\n '\\\\u020B': 'i',\\r\\n '\\\\u1ECB': 'i',\\r\\n '\\\\u012F': 'i',\\r\\n '\\\\u1E2D': 'i',\\r\\n '\\\\u0268': 'i',\\r\\n '\\\\u0131': 'i',\\r\\n '\\\\u24D9': 'j',\\r\\n '\\\\uFF4A': 'j',\\r\\n '\\\\u0135': 'j',\\r\\n '\\\\u01F0': 'j',\\r\\n '\\\\u0249': 'j',\\r\\n '\\\\u24DA': 'k',\\r\\n '\\\\uFF4B': 'k',\\r\\n '\\\\u1E31': 'k',\\r\\n '\\\\u01E9': 'k',\\r\\n '\\\\u1E33': 'k',\\r\\n '\\\\u0137': 'k',\\r\\n '\\\\u1E35': 'k',\\r\\n '\\\\u0199': 'k',\\r\\n '\\\\u2C6A': 'k',\\r\\n '\\\\uA741': 'k',\\r\\n '\\\\uA743': 'k',\\r\\n '\\\\uA745': 'k',\\r\\n '\\\\uA7A3': 'k',\\r\\n '\\\\u24DB': 'l',\\r\\n '\\\\uFF4C': 'l',\\r\\n '\\\\u0140': 'l',\\r\\n '\\\\u013A': 'l',\\r\\n '\\\\u013E': 'l',\\r\\n '\\\\u1E37': 'l',\\r\\n '\\\\u1E39': 'l',\\r\\n '\\\\u013C': 'l',\\r\\n '\\\\u1E3D': 'l',\\r\\n '\\\\u1E3B': 'l',\\r\\n '\\\\u017F': 'l',\\r\\n '\\\\u0142': 'l',\\r\\n '\\\\u019A': 'l',\\r\\n '\\\\u026B': 'l',\\r\\n '\\\\u2C61': 'l',\\r\\n '\\\\uA749': 'l',\\r\\n '\\\\uA781': 'l',\\r\\n '\\\\uA747': 'l',\\r\\n '\\\\u01C9': 'lj',\\r\\n '\\\\u24DC': 'm',\\r\\n '\\\\uFF4D': 'm',\\r\\n '\\\\u1E3F': 'm',\\r\\n '\\\\u1E41': 'm',\\r\\n '\\\\u1E43': 'm',\\r\\n '\\\\u0271': 'm',\\r\\n '\\\\u026F': 'm',\\r\\n '\\\\u24DD': 'n',\\r\\n '\\\\uFF4E': 'n',\\r\\n '\\\\u01F9': 'n',\\r\\n '\\\\u0144': 'n',\\r\\n '\\\\u00F1': 'n',\\r\\n '\\\\u1E45': 'n',\\r\\n '\\\\u0148': 'n',\\r\\n '\\\\u1E47': 'n',\\r\\n '\\\\u0146': 'n',\\r\\n '\\\\u1E4B': 'n',\\r\\n '\\\\u1E49': 'n',\\r\\n '\\\\u019E': 'n',\\r\\n '\\\\u0272': 'n',\\r\\n '\\\\u0149': 'n',\\r\\n '\\\\uA791': 'n',\\r\\n '\\\\uA7A5': 'n',\\r\\n '\\\\u01CC': 'nj',\\r\\n '\\\\u24DE': 'o',\\r\\n '\\\\uFF4F': 'o',\\r\\n '\\\\u00F2': 'o',\\r\\n '\\\\u00F3': 'o',\\r\\n '\\\\u00F4': 'o',\\r\\n '\\\\u1ED3': 'o',\\r\\n '\\\\u1ED1': 'o',\\r\\n '\\\\u1ED7': 'o',\\r\\n '\\\\u1ED5': 'o',\\r\\n '\\\\u00F5': 'o',\\r\\n '\\\\u1E4D': 'o',\\r\\n '\\\\u022D': 'o',\\r\\n '\\\\u1E4F': 'o',\\r\\n '\\\\u014D': 'o',\\r\\n '\\\\u1E51': 'o',\\r\\n '\\\\u1E53': 'o',\\r\\n '\\\\u014F': 'o',\\r\\n '\\\\u022F': 'o',\\r\\n '\\\\u0231': 'o',\\r\\n '\\\\u00F6': 'o',\\r\\n '\\\\u022B': 'o',\\r\\n '\\\\u1ECF': 'o',\\r\\n '\\\\u0151': 'o',\\r\\n '\\\\u01D2': 'o',\\r\\n '\\\\u020D': 'o',\\r\\n '\\\\u020F': 'o',\\r\\n '\\\\u01A1': 'o',\\r\\n '\\\\u1EDD': 'o',\\r\\n '\\\\u1EDB': 'o',\\r\\n '\\\\u1EE1': 'o',\\r\\n '\\\\u1EDF': 'o',\\r\\n '\\\\u1EE3': 'o',\\r\\n '\\\\u1ECD': 'o',\\r\\n '\\\\u1ED9': 'o',\\r\\n '\\\\u01EB': 'o',\\r\\n '\\\\u01ED': 'o',\\r\\n '\\\\u00F8': 'o',\\r\\n '\\\\u01FF': 'o',\\r\\n '\\\\u0254': 'o',\\r\\n '\\\\uA74B': 'o',\\r\\n '\\\\uA74D': 'o',\\r\\n '\\\\u0275': 'o',\\r\\n '\\\\u01A3': 'oi',\\r\\n '\\\\u0223': 'ou',\\r\\n '\\\\uA74F': 'oo',\\r\\n '\\\\u24DF': 'p',\\r\\n '\\\\uFF50': 'p',\\r\\n '\\\\u1E55': 'p',\\r\\n '\\\\u1E57': 'p',\\r\\n '\\\\u01A5': 'p',\\r\\n '\\\\u1D7D': 'p',\\r\\n '\\\\uA751': 'p',\\r\\n '\\\\uA753': 'p',\\r\\n '\\\\uA755': 'p',\\r\\n '\\\\u24E0': 'q',\\r\\n '\\\\uFF51': 'q',\\r\\n '\\\\u024B': 'q',\\r\\n '\\\\uA757': 'q',\\r\\n '\\\\uA759': 'q',\\r\\n '\\\\u24E1': 'r',\\r\\n '\\\\uFF52': 'r',\\r\\n '\\\\u0155': 'r',\\r\\n '\\\\u1E59': 'r',\\r\\n '\\\\u0159': 'r',\\r\\n '\\\\u0211': 'r',\\r\\n '\\\\u0213': 'r',\\r\\n '\\\\u1E5B': 'r',\\r\\n '\\\\u1E5D': 'r',\\r\\n '\\\\u0157': 'r',\\r\\n '\\\\u1E5F': 'r',\\r\\n '\\\\u024D': 'r',\\r\\n '\\\\u027D': 'r',\\r\\n '\\\\uA75B': 'r',\\r\\n '\\\\uA7A7': 'r',\\r\\n '\\\\uA783': 'r',\\r\\n '\\\\u24E2': 's',\\r\\n '\\\\uFF53': 's',\\r\\n '\\\\u00DF': 's',\\r\\n '\\\\u015B': 's',\\r\\n '\\\\u1E65': 's',\\r\\n '\\\\u015D': 's',\\r\\n '\\\\u1E61': 's',\\r\\n '\\\\u0161': 's',\\r\\n '\\\\u1E67': 's',\\r\\n '\\\\u1E63': 's',\\r\\n '\\\\u1E69': 's',\\r\\n '\\\\u0219': 's',\\r\\n '\\\\u015F': 's',\\r\\n '\\\\u023F': 's',\\r\\n '\\\\uA7A9': 's',\\r\\n '\\\\uA785': 's',\\r\\n '\\\\u1E9B': 's',\\r\\n '\\\\u24E3': 't',\\r\\n '\\\\uFF54': 't',\\r\\n '\\\\u1E6B': 't',\\r\\n '\\\\u1E97': 't',\\r\\n '\\\\u0165': 't',\\r\\n '\\\\u1E6D': 't',\\r\\n '\\\\u021B': 't',\\r\\n '\\\\u0163': 't',\\r\\n '\\\\u1E71': 't',\\r\\n '\\\\u1E6F': 't',\\r\\n '\\\\u0167': 't',\\r\\n '\\\\u01AD': 't',\\r\\n '\\\\u0288': 't',\\r\\n '\\\\u2C66': 't',\\r\\n '\\\\uA787': 't',\\r\\n '\\\\uA729': 'tz',\\r\\n '\\\\u24E4': 'u',\\r\\n '\\\\uFF55': 'u',\\r\\n '\\\\u00F9': 'u',\\r\\n '\\\\u00FA': 'u',\\r\\n '\\\\u00FB': 'u',\\r\\n '\\\\u0169': 'u',\\r\\n '\\\\u1E79': 'u',\\r\\n '\\\\u016B': 'u',\\r\\n '\\\\u1E7B': 'u',\\r\\n '\\\\u016D': 'u',\\r\\n '\\\\u00FC': 'u',\\r\\n '\\\\u01DC': 'u',\\r\\n '\\\\u01D8': 'u',\\r\\n '\\\\u01D6': 'u',\\r\\n '\\\\u01DA': 'u',\\r\\n '\\\\u1EE7': 'u',\\r\\n '\\\\u016F': 'u',\\r\\n '\\\\u0171': 'u',\\r\\n '\\\\u01D4': 'u',\\r\\n '\\\\u0215': 'u',\\r\\n '\\\\u0217': 'u',\\r\\n '\\\\u01B0': 'u',\\r\\n '\\\\u1EEB': 'u',\\r\\n '\\\\u1EE9': 'u',\\r\\n '\\\\u1EEF': 'u',\\r\\n '\\\\u1EED': 'u',\\r\\n '\\\\u1EF1': 'u',\\r\\n '\\\\u1EE5': 'u',\\r\\n '\\\\u1E73': 'u',\\r\\n '\\\\u0173': 'u',\\r\\n '\\\\u1E77': 'u',\\r\\n '\\\\u1E75': 'u',\\r\\n '\\\\u0289': 'u',\\r\\n '\\\\u24E5': 'v',\\r\\n '\\\\uFF56': 'v',\\r\\n '\\\\u1E7D': 'v',\\r\\n '\\\\u1E7F': 'v',\\r\\n '\\\\u028B': 'v',\\r\\n '\\\\uA75F': 'v',\\r\\n '\\\\u028C': 'v',\\r\\n '\\\\uA761': 'vy',\\r\\n '\\\\u24E6': 'w',\\r\\n '\\\\uFF57': 'w',\\r\\n '\\\\u1E81': 'w',\\r\\n '\\\\u1E83': 'w',\\r\\n '\\\\u0175': 'w',\\r\\n '\\\\u1E87': 'w',\\r\\n '\\\\u1E85': 'w',\\r\\n '\\\\u1E98': 'w',\\r\\n '\\\\u1E89': 'w',\\r\\n '\\\\u2C73': 'w',\\r\\n '\\\\u24E7': 'x',\\r\\n '\\\\uFF58': 'x',\\r\\n '\\\\u1E8B': 'x',\\r\\n '\\\\u1E8D': 'x',\\r\\n '\\\\u24E8': 'y',\\r\\n '\\\\uFF59': 'y',\\r\\n '\\\\u1EF3': 'y',\\r\\n '\\\\u00FD': 'y',\\r\\n '\\\\u0177': 'y',\\r\\n '\\\\u1EF9': 'y',\\r\\n '\\\\u0233': 'y',\\r\\n '\\\\u1E8F': 'y',\\r\\n '\\\\u00FF': 'y',\\r\\n '\\\\u1EF7': 'y',\\r\\n '\\\\u1E99': 'y',\\r\\n '\\\\u1EF5': 'y',\\r\\n '\\\\u01B4': 'y',\\r\\n '\\\\u024F': 'y',\\r\\n '\\\\u1EFF': 'y',\\r\\n '\\\\u24E9': 'z',\\r\\n '\\\\uFF5A': 'z',\\r\\n '\\\\u017A': 'z',\\r\\n '\\\\u1E91': 'z',\\r\\n '\\\\u017C': 'z',\\r\\n '\\\\u017E': 'z',\\r\\n '\\\\u1E93': 'z',\\r\\n '\\\\u1E95': 'z',\\r\\n '\\\\u01B6': 'z',\\r\\n '\\\\u0225': 'z',\\r\\n '\\\\u0240': 'z',\\r\\n '\\\\u2C6C': 'z',\\r\\n '\\\\uA763': 'z',\\r\\n '\\\\u0386': '\\\\u0391',\\r\\n '\\\\u0388': '\\\\u0395',\\r\\n '\\\\u0389': '\\\\u0397',\\r\\n '\\\\u038A': '\\\\u0399',\\r\\n '\\\\u03AA': '\\\\u0399',\\r\\n '\\\\u038C': '\\\\u039F',\\r\\n '\\\\u038E': '\\\\u03A5',\\r\\n '\\\\u03AB': '\\\\u03A5',\\r\\n '\\\\u038F': '\\\\u03A9',\\r\\n '\\\\u03AC': '\\\\u03B1',\\r\\n '\\\\u03AD': '\\\\u03B5',\\r\\n '\\\\u03AE': '\\\\u03B7',\\r\\n '\\\\u03AF': '\\\\u03B9',\\r\\n '\\\\u03CA': '\\\\u03B9',\\r\\n '\\\\u0390': '\\\\u03B9',\\r\\n '\\\\u03CC': '\\\\u03BF',\\r\\n '\\\\u03CD': '\\\\u03C5',\\r\\n '\\\\u03CB': '\\\\u03C5',\\r\\n '\\\\u03B0': '\\\\u03C5',\\r\\n '\\\\u03C9': '\\\\u03C9',\\r\\n '\\\\u03C2': '\\\\u03C3'\\r\\n };\\r\\n\\r\\n return diacritics;\\r\\n});\\r\\n\\nS2.define('select2/data/base',[\\r\\n '../utils'\\r\\n], function (Utils) {\\r\\n function BaseAdapter ($element, options) {\\r\\n BaseAdapter.__super__.constructor.call(this);\\r\\n }\\r\\n\\r\\n Utils.Extend(BaseAdapter, Utils.Observable);\\r\\n\\r\\n BaseAdapter.prototype.current = function (callback) {\\r\\n throw new Error('The `current` method must be defined in child classes.');\\r\\n };\\r\\n\\r\\n BaseAdapter.prototype.query = function (params, callback) {\\r\\n throw new Error('The `query` method must be defined in child classes.');\\r\\n };\\r\\n\\r\\n BaseAdapter.prototype.bind = function (container, $container) {\\r\\n // Can be implemented in subclasses\\r\\n };\\r\\n\\r\\n BaseAdapter.prototype.destroy = function () {\\r\\n // Can be implemented in subclasses\\r\\n };\\r\\n\\r\\n BaseAdapter.prototype.generateResultId = function (container, data) {\\r\\n var id = container.id + '-result-';\\r\\n\\r\\n id += Utils.generateChars(4);\\r\\n\\r\\n if (data.id != null) {\\r\\n id += '-' + data.id.toString();\\r\\n } else {\\r\\n id += '-' + Utils.generateChars(4);\\r\\n }\\r\\n return id;\\r\\n };\\r\\n\\r\\n return BaseAdapter;\\r\\n});\\r\\n\\nS2.define('select2/data/select',[\\r\\n './base',\\r\\n '../utils',\\r\\n 'jquery'\\r\\n], function (BaseAdapter, Utils, $) {\\r\\n function SelectAdapter ($element, options) {\\r\\n this.$element = $element;\\r\\n this.options = options;\\r\\n\\r\\n SelectAdapter.__super__.constructor.call(this);\\r\\n }\\r\\n\\r\\n Utils.Extend(SelectAdapter, BaseAdapter);\\r\\n\\r\\n SelectAdapter.prototype.current = function (callback) {\\r\\n var data = [];\\r\\n var self = this;\\r\\n\\r\\n this.$element.find(':selected').each(function () {\\r\\n var $option = $(this);\\r\\n\\r\\n var option = self.item($option);\\r\\n\\r\\n data.push(option);\\r\\n });\\r\\n\\r\\n callback(data);\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.select = function (data) {\\r\\n var self = this;\\r\\n\\r\\n data.selected = true;\\r\\n\\r\\n // If data.element is a DOM node, use it instead\\r\\n if ($(data.element).is('option')) {\\r\\n data.element.selected = true;\\r\\n\\r\\n this.$element.trigger('change');\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n if (this.$element.prop('multiple')) {\\r\\n this.current(function (currentData) {\\r\\n var val = [];\\r\\n\\r\\n data = [data];\\r\\n data.push.apply(data, currentData);\\r\\n\\r\\n for (var d = 0; d < data.length; d++) {\\r\\n var id = data[d].id;\\r\\n\\r\\n if ($.inArray(id, val) === -1) {\\r\\n val.push(id);\\r\\n }\\r\\n }\\r\\n\\r\\n self.$element.val(val);\\r\\n self.$element.trigger('change');\\r\\n });\\r\\n } else {\\r\\n var val = data.id;\\r\\n\\r\\n this.$element.val(val);\\r\\n this.$element.trigger('change');\\r\\n }\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.unselect = function (data) {\\r\\n var self = this;\\r\\n\\r\\n if (!this.$element.prop('multiple')) {\\r\\n return;\\r\\n }\\r\\n\\r\\n data.selected = false;\\r\\n\\r\\n if ($(data.element).is('option')) {\\r\\n data.element.selected = false;\\r\\n\\r\\n this.$element.trigger('change');\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n this.current(function (currentData) {\\r\\n var val = [];\\r\\n\\r\\n for (var d = 0; d < currentData.length; d++) {\\r\\n var id = currentData[d].id;\\r\\n\\r\\n if (id !== data.id && $.inArray(id, val) === -1) {\\r\\n val.push(id);\\r\\n }\\r\\n }\\r\\n\\r\\n self.$element.val(val);\\r\\n\\r\\n self.$element.trigger('change');\\r\\n });\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.bind = function (container, $container) {\\r\\n var self = this;\\r\\n\\r\\n this.container = container;\\r\\n\\r\\n container.on('select', function (params) {\\r\\n self.select(params.data);\\r\\n });\\r\\n\\r\\n container.on('unselect', function (params) {\\r\\n self.unselect(params.data);\\r\\n });\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.destroy = function () {\\r\\n // Remove anything added to child elements\\r\\n this.$element.find('*').each(function () {\\r\\n // Remove any custom data set by Select2\\r\\n $.removeData(this, 'data');\\r\\n });\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.query = function (params, callback) {\\r\\n var data = [];\\r\\n var self = this;\\r\\n\\r\\n var $options = this.$element.children();\\r\\n\\r\\n $options.each(function () {\\r\\n var $option = $(this);\\r\\n\\r\\n if (!$option.is('option') && !$option.is('optgroup')) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var option = self.item($option);\\r\\n\\r\\n var matches = self.matches(params, option);\\r\\n\\r\\n if (matches !== null) {\\r\\n data.push(matches);\\r\\n }\\r\\n });\\r\\n\\r\\n callback({\\r\\n results: data\\r\\n });\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.addOptions = function ($options) {\\r\\n Utils.appendMany(this.$element, $options);\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.option = function (data) {\\r\\n var option;\\r\\n\\r\\n if (data.children) {\\r\\n option = document.createElement('optgroup');\\r\\n option.label = data.text;\\r\\n } else {\\r\\n option = document.createElement('option');\\r\\n\\r\\n if (option.textContent !== undefined) {\\r\\n option.textContent = data.text;\\r\\n } else {\\r\\n option.innerText = data.text;\\r\\n }\\r\\n }\\r\\n\\r\\n if (data.id) {\\r\\n option.value = data.id;\\r\\n }\\r\\n\\r\\n if (data.disabled) {\\r\\n option.disabled = true;\\r\\n }\\r\\n\\r\\n if (data.selected) {\\r\\n option.selected = true;\\r\\n }\\r\\n\\r\\n if (data.title) {\\r\\n option.title = data.title;\\r\\n }\\r\\n\\r\\n var $option = $(option);\\r\\n\\r\\n var normalizedData = this._normalizeItem(data);\\r\\n normalizedData.element = option;\\r\\n\\r\\n // Override the option's data with the combined data\\r\\n $.data(option, 'data', normalizedData);\\r\\n\\r\\n return $option;\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.item = function ($option) {\\r\\n var data = {};\\r\\n\\r\\n data = $.data($option[0], 'data');\\r\\n\\r\\n if (data != null) {\\r\\n return data;\\r\\n }\\r\\n\\r\\n if ($option.is('option')) {\\r\\n data = {\\r\\n id: $option.val(),\\r\\n text: $option.text(),\\r\\n disabled: $option.prop('disabled'),\\r\\n selected: $option.prop('selected'),\\r\\n title: $option.prop('title')\\r\\n };\\r\\n } else if ($option.is('optgroup')) {\\r\\n data = {\\r\\n text: $option.prop('label'),\\r\\n children: [],\\r\\n title: $option.prop('title')\\r\\n };\\r\\n\\r\\n var $children = $option.children('option');\\r\\n var children = [];\\r\\n\\r\\n for (var c = 0; c < $children.length; c++) {\\r\\n var $child = $($children[c]);\\r\\n\\r\\n var child = this.item($child);\\r\\n\\r\\n children.push(child);\\r\\n }\\r\\n\\r\\n data.children = children;\\r\\n }\\r\\n\\r\\n data = this._normalizeItem(data);\\r\\n data.element = $option[0];\\r\\n\\r\\n $.data($option[0], 'data', data);\\r\\n\\r\\n return data;\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype._normalizeItem = function (item) {\\r\\n if (!$.isPlainObject(item)) {\\r\\n item = {\\r\\n id: item,\\r\\n text: item\\r\\n };\\r\\n }\\r\\n\\r\\n item = $.extend({}, {\\r\\n text: ''\\r\\n }, item);\\r\\n\\r\\n var defaults = {\\r\\n selected: false,\\r\\n disabled: false\\r\\n };\\r\\n\\r\\n if (item.id != null) {\\r\\n item.id = item.id.toString();\\r\\n }\\r\\n\\r\\n if (item.text != null) {\\r\\n item.text = item.text.toString();\\r\\n }\\r\\n\\r\\n if (item._resultId == null && item.id && this.container != null) {\\r\\n item._resultId = this.generateResultId(this.container, item);\\r\\n }\\r\\n\\r\\n return $.extend({}, defaults, item);\\r\\n };\\r\\n\\r\\n SelectAdapter.prototype.matches = function (params, data) {\\r\\n var matcher = this.options.get('matcher');\\r\\n\\r\\n return matcher(params, data);\\r\\n };\\r\\n\\r\\n return SelectAdapter;\\r\\n});\\r\\n\\nS2.define('select2/data/array',[\\r\\n './select',\\r\\n '../utils',\\r\\n 'jquery'\\r\\n], function (SelectAdapter, Utils, $) {\\r\\n function ArrayAdapter ($element, options) {\\r\\n var data = options.get('data') || [];\\r\\n\\r\\n ArrayAdapter.__super__.constructor.call(this, $element, options);\\r\\n\\r\\n this.addOptions(this.convertToOptions(data));\\r\\n }\\r\\n\\r\\n Utils.Extend(ArrayAdapter, SelectAdapter);\\r\\n\\r\\n ArrayAdapter.prototype.select = function (data) {\\r\\n var $option = this.$element.find('option').filter(function (i, elm) {\\r\\n return elm.value == data.id.toString();\\r\\n });\\r\\n\\r\\n if ($option.length === 0) {\\r\\n $option = this.option(data);\\r\\n\\r\\n this.addOptions($option);\\r\\n }\\r\\n\\r\\n ArrayAdapter.__super__.select.call(this, data);\\r\\n };\\r\\n\\r\\n ArrayAdapter.prototype.convertToOptions = function (data) {\\r\\n var self = this;\\r\\n\\r\\n var $existing = this.$element.find('option');\\r\\n var existingIds = $existing.map(function () {\\r\\n return self.item($(this)).id;\\r\\n }).get();\\r\\n\\r\\n var $options = [];\\r\\n\\r\\n // Filter out all items except for the one passed in the argument\\r\\n function onlyItem (item) {\\r\\n return function () {\\r\\n return $(this).val() == item.id;\\r\\n };\\r\\n }\\r\\n\\r\\n for (var d = 0; d < data.length; d++) {\\r\\n var item = this._normalizeItem(data[d]);\\r\\n\\r\\n // Skip items which were pre-loaded, only merge the data\\r\\n if ($.inArray(item.id, existingIds) >= 0) {\\r\\n var $existingOption = $existing.filter(onlyItem(item));\\r\\n\\r\\n var existingData = this.item($existingOption);\\r\\n var newData = $.extend(true, {}, item, existingData);\\r\\n\\r\\n var $newOption = this.option(newData);\\r\\n\\r\\n $existingOption.replaceWith($newOption);\\r\\n\\r\\n continue;\\r\\n }\\r\\n\\r\\n var $option = this.option(item);\\r\\n\\r\\n if (item.children) {\\r\\n var $children = this.convertToOptions(item.children);\\r\\n\\r\\n Utils.appendMany($option, $children);\\r\\n }\\r\\n\\r\\n $options.push($option);\\r\\n }\\r\\n\\r\\n return $options;\\r\\n };\\r\\n\\r\\n return ArrayAdapter;\\r\\n});\\r\\n\\nS2.define('select2/data/ajax',[\\r\\n './array',\\r\\n '../utils',\\r\\n 'jquery'\\r\\n], function (ArrayAdapter, Utils, $) {\\r\\n function AjaxAdapter ($element, options) {\\r\\n this.ajaxOptions = this._applyDefaults(options.get('ajax'));\\r\\n\\r\\n if (this.ajaxOptions.processResults != null) {\\r\\n this.processResults = this.ajaxOptions.processResults;\\r\\n }\\r\\n\\r\\n AjaxAdapter.__super__.constructor.call(this, $element, options);\\r\\n }\\r\\n\\r\\n Utils.Extend(AjaxAdapter, ArrayAdapter);\\r\\n\\r\\n AjaxAdapter.prototype._applyDefaults = function (options) {\\r\\n var defaults = {\\r\\n data: function (params) {\\r\\n return $.extend({}, params, {\\r\\n q: params.term\\r\\n });\\r\\n },\\r\\n transport: function (params, success, failure) {\\r\\n var $request = $.ajax(params);\\r\\n\\r\\n $request.then(success);\\r\\n $request.fail(failure);\\r\\n\\r\\n return $request;\\r\\n }\\r\\n };\\r\\n\\r\\n return $.extend({}, defaults, options, true);\\r\\n };\\r\\n\\r\\n AjaxAdapter.prototype.processResults = function (results) {\\r\\n return results;\\r\\n };\\r\\n\\r\\n AjaxAdapter.prototype.query = function (params, callback) {\\r\\n var matches = [];\\r\\n var self = this;\\r\\n\\r\\n if (this._request != null) {\\r\\n // JSONP requests cannot always be aborted\\r\\n if ($.isFunction(this._request.abort)) {\\r\\n this._request.abort();\\r\\n }\\r\\n\\r\\n this._request = null;\\r\\n }\\r\\n\\r\\n var options = $.extend({\\r\\n type: 'GET'\\r\\n }, this.ajaxOptions);\\r\\n\\r\\n if (typeof options.url === 'function') {\\r\\n options.url = options.url.call(this.$element, params);\\r\\n }\\r\\n\\r\\n if (typeof options.data === 'function') {\\r\\n options.data = options.data.call(this.$element, params);\\r\\n }\\r\\n\\r\\n function request () {\\r\\n var $request = options.transport(options, function (data) {\\r\\n var results = self.processResults(data, params);\\r\\n\\r\\n if (self.options.get('debug') && window.console && console.error) {\\r\\n // Check to make sure that the response included a `results` key.\\r\\n if (!results || !results.results || !$.isArray(results.results)) {\\r\\n console.error(\\r\\n 'Select2: The AJAX results did not return an array in the ' +\\r\\n '`results` key of the response.'\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n callback(results);\\r\\n }, function () {\\r\\n // Attempt to detect if a request was aborted\\r\\n // Only works if the transport exposes a status property\\r\\n if ($request.status && $request.status === '0') {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.trigger('results:message', {\\r\\n message: 'errorLoading'\\r\\n });\\r\\n });\\r\\n\\r\\n self._request = $request;\\r\\n }\\r\\n\\r\\n if (this.ajaxOptions.delay && params.term != null) {\\r\\n if (this._queryTimeout) {\\r\\n window.clearTimeout(this._queryTimeout);\\r\\n }\\r\\n\\r\\n this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\\r\\n } else {\\r\\n request();\\r\\n }\\r\\n };\\r\\n\\r\\n return AjaxAdapter;\\r\\n});\\r\\n\\nS2.define('select2/data/tags',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n function Tags (decorated, $element, options) {\\r\\n var tags = options.get('tags');\\r\\n\\r\\n var createTag = options.get('createTag');\\r\\n\\r\\n if (createTag !== undefined) {\\r\\n this.createTag = createTag;\\r\\n }\\r\\n\\r\\n var insertTag = options.get('insertTag');\\r\\n\\r\\n if (insertTag !== undefined) {\\r\\n this.insertTag = insertTag;\\r\\n }\\r\\n\\r\\n decorated.call(this, $element, options);\\r\\n\\r\\n if ($.isArray(tags)) {\\r\\n for (var t = 0; t < tags.length; t++) {\\r\\n var tag = tags[t];\\r\\n var item = this._normalizeItem(tag);\\r\\n\\r\\n var $option = this.option(item);\\r\\n\\r\\n this.$element.append($option);\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n Tags.prototype.query = function (decorated, params, callback) {\\r\\n var self = this;\\r\\n\\r\\n this._removeOldTags();\\r\\n\\r\\n if (params.term == null || params.page != null) {\\r\\n decorated.call(this, params, callback);\\r\\n return;\\r\\n }\\r\\n\\r\\n function wrapper (obj, child) {\\r\\n var data = obj.results;\\r\\n\\r\\n for (var i = 0; i < data.length; i++) {\\r\\n var option = data[i];\\r\\n\\r\\n var checkChildren = (\\r\\n option.children != null &&\\r\\n !wrapper({\\r\\n results: option.children\\r\\n }, true)\\r\\n );\\r\\n\\r\\n var checkText = option.text === params.term;\\r\\n\\r\\n if (checkText || checkChildren) {\\r\\n if (child) {\\r\\n return false;\\r\\n }\\r\\n\\r\\n obj.data = data;\\r\\n callback(obj);\\r\\n\\r\\n return;\\r\\n }\\r\\n }\\r\\n\\r\\n if (child) {\\r\\n return true;\\r\\n }\\r\\n\\r\\n var tag = self.createTag(params);\\r\\n\\r\\n if (tag != null) {\\r\\n var $option = self.option(tag);\\r\\n $option.attr('data-select2-tag', true);\\r\\n\\r\\n self.addOptions([$option]);\\r\\n\\r\\n self.insertTag(data, tag);\\r\\n }\\r\\n\\r\\n obj.results = data;\\r\\n\\r\\n callback(obj);\\r\\n }\\r\\n\\r\\n decorated.call(this, params, wrapper);\\r\\n };\\r\\n\\r\\n Tags.prototype.createTag = function (decorated, params) {\\r\\n var term = $.trim(params.term);\\r\\n\\r\\n if (term === '') {\\r\\n return null;\\r\\n }\\r\\n\\r\\n return {\\r\\n id: term,\\r\\n text: term\\r\\n };\\r\\n };\\r\\n\\r\\n Tags.prototype.insertTag = function (_, data, tag) {\\r\\n data.unshift(tag);\\r\\n };\\r\\n\\r\\n Tags.prototype._removeOldTags = function (_) {\\r\\n var tag = this._lastTag;\\r\\n\\r\\n var $options = this.$element.find('option[data-select2-tag]');\\r\\n\\r\\n $options.each(function () {\\r\\n if (this.selected) {\\r\\n return;\\r\\n }\\r\\n\\r\\n $(this).remove();\\r\\n });\\r\\n };\\r\\n\\r\\n return Tags;\\r\\n});\\r\\n\\nS2.define('select2/data/tokenizer',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n function Tokenizer (decorated, $element, options) {\\r\\n var tokenizer = options.get('tokenizer');\\r\\n\\r\\n if (tokenizer !== undefined) {\\r\\n this.tokenizer = tokenizer;\\r\\n }\\r\\n\\r\\n decorated.call(this, $element, options);\\r\\n }\\r\\n\\r\\n Tokenizer.prototype.bind = function (decorated, container, $container) {\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n this.$search = container.dropdown.$search || container.selection.$search ||\\r\\n $container.find('.select2-search__field');\\r\\n };\\r\\n\\r\\n Tokenizer.prototype.query = function (decorated, params, callback) {\\r\\n var self = this;\\r\\n\\r\\n function createAndSelect (data) {\\r\\n // Normalize the data object so we can use it for checks\\r\\n var item = self._normalizeItem(data);\\r\\n\\r\\n // Check if the data object already exists as a tag\\r\\n // Select it if it doesn't\\r\\n var $existingOptions = self.$element.find('option').filter(function () {\\r\\n return $(this).val() === item.id;\\r\\n });\\r\\n\\r\\n // If an existing option wasn't found for it, create the option\\r\\n if (!$existingOptions.length) {\\r\\n var $option = self.option(item);\\r\\n $option.attr('data-select2-tag', true);\\r\\n\\r\\n self._removeOldTags();\\r\\n self.addOptions([$option]);\\r\\n }\\r\\n\\r\\n // Select the item, now that we know there is an option for it\\r\\n select(item);\\r\\n }\\r\\n\\r\\n function select (data) {\\r\\n self.trigger('select', {\\r\\n data: data\\r\\n });\\r\\n }\\r\\n\\r\\n params.term = params.term || '';\\r\\n\\r\\n var tokenData = this.tokenizer(params, this.options, createAndSelect);\\r\\n\\r\\n if (tokenData.term !== params.term) {\\r\\n // Replace the search term if we have the search box\\r\\n if (this.$search.length) {\\r\\n this.$search.val(tokenData.term);\\r\\n this.$search.focus();\\r\\n }\\r\\n\\r\\n params.term = tokenData.term;\\r\\n }\\r\\n\\r\\n decorated.call(this, params, callback);\\r\\n };\\r\\n\\r\\n Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\\r\\n var separators = options.get('tokenSeparators') || [];\\r\\n var term = params.term;\\r\\n var i = 0;\\r\\n\\r\\n var createTag = this.createTag || function (params) {\\r\\n return {\\r\\n id: params.term,\\r\\n text: params.term\\r\\n };\\r\\n };\\r\\n\\r\\n while (i < term.length) {\\r\\n var termChar = term[i];\\r\\n\\r\\n if ($.inArray(termChar, separators) === -1) {\\r\\n i++;\\r\\n\\r\\n continue;\\r\\n }\\r\\n\\r\\n var part = term.substr(0, i);\\r\\n var partParams = $.extend({}, params, {\\r\\n term: part\\r\\n });\\r\\n\\r\\n var data = createTag(partParams);\\r\\n\\r\\n if (data == null) {\\r\\n i++;\\r\\n continue;\\r\\n }\\r\\n\\r\\n callback(data);\\r\\n\\r\\n // Reset the term to not include the tokenized portion\\r\\n term = term.substr(i + 1) || '';\\r\\n i = 0;\\r\\n }\\r\\n\\r\\n return {\\r\\n term: term\\r\\n };\\r\\n };\\r\\n\\r\\n return Tokenizer;\\r\\n});\\r\\n\\nS2.define('select2/data/minimumInputLength',[\\r\\n\\r\\n], function () {\\r\\n function MinimumInputLength (decorated, $e, options) {\\r\\n this.minimumInputLength = options.get('minimumInputLength');\\r\\n\\r\\n decorated.call(this, $e, options);\\r\\n }\\r\\n\\r\\n MinimumInputLength.prototype.query = function (decorated, params, callback) {\\r\\n params.term = params.term || '';\\r\\n\\r\\n if (params.term.length < this.minimumInputLength) {\\r\\n this.trigger('results:message', {\\r\\n message: 'inputTooShort',\\r\\n args: {\\r\\n minimum: this.minimumInputLength,\\r\\n input: params.term,\\r\\n params: params\\r\\n }\\r\\n });\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n decorated.call(this, params, callback);\\r\\n };\\r\\n\\r\\n return MinimumInputLength;\\r\\n});\\r\\n\\nS2.define('select2/data/maximumInputLength',[\\r\\n\\r\\n], function () {\\r\\n function MaximumInputLength (decorated, $e, options) {\\r\\n this.maximumInputLength = options.get('maximumInputLength');\\r\\n\\r\\n decorated.call(this, $e, options);\\r\\n }\\r\\n\\r\\n MaximumInputLength.prototype.query = function (decorated, params, callback) {\\r\\n params.term = params.term || '';\\r\\n\\r\\n if (this.maximumInputLength > 0 &&\\r\\n params.term.length > this.maximumInputLength) {\\r\\n this.trigger('results:message', {\\r\\n message: 'inputTooLong',\\r\\n args: {\\r\\n maximum: this.maximumInputLength,\\r\\n input: params.term,\\r\\n params: params\\r\\n }\\r\\n });\\r\\n\\r\\n return;\\r\\n }\\r\\n\\r\\n decorated.call(this, params, callback);\\r\\n };\\r\\n\\r\\n return MaximumInputLength;\\r\\n});\\r\\n\\nS2.define('select2/data/maximumSelectionLength',[\\r\\n\\r\\n], function (){\\r\\n function MaximumSelectionLength (decorated, $e, options) {\\r\\n this.maximumSelectionLength = options.get('maximumSelectionLength');\\r\\n\\r\\n decorated.call(this, $e, options);\\r\\n }\\r\\n\\r\\n MaximumSelectionLength.prototype.query =\\r\\n function (decorated, params, callback) {\\r\\n var self = this;\\r\\n\\r\\n this.current(function (currentData) {\\r\\n var count = currentData != null ? currentData.length : 0;\\r\\n if (self.maximumSelectionLength > 0 &&\\r\\n count >= self.maximumSelectionLength) {\\r\\n self.trigger('results:message', {\\r\\n message: 'maximumSelected',\\r\\n args: {\\r\\n maximum: self.maximumSelectionLength\\r\\n }\\r\\n });\\r\\n return;\\r\\n }\\r\\n decorated.call(self, params, callback);\\r\\n });\\r\\n };\\r\\n\\r\\n return MaximumSelectionLength;\\r\\n});\\r\\n\\nS2.define('select2/dropdown',[\\r\\n 'jquery',\\r\\n './utils'\\r\\n], function ($, Utils) {\\r\\n function Dropdown ($element, options) {\\r\\n this.$element = $element;\\r\\n this.options = options;\\r\\n\\r\\n Dropdown.__super__.constructor.call(this);\\r\\n }\\r\\n\\r\\n Utils.Extend(Dropdown, Utils.Observable);\\r\\n\\r\\n Dropdown.prototype.render = function () {\\r\\n var $dropdown = $(\\r\\n '<span class=\\\"select2-dropdown\\\">' +\\r\\n '<span class=\\\"select2-results\\\"></span>' +\\r\\n '</span>'\\r\\n );\\r\\n\\r\\n $dropdown.attr('dir', this.options.get('dir'));\\r\\n\\r\\n this.$dropdown = $dropdown;\\r\\n\\r\\n return $dropdown;\\r\\n };\\r\\n\\r\\n Dropdown.prototype.bind = function () {\\r\\n // Should be implemented in subclasses\\r\\n };\\r\\n\\r\\n Dropdown.prototype.position = function ($dropdown, $container) {\\r\\n // Should be implmented in subclasses\\r\\n };\\r\\n\\r\\n Dropdown.prototype.destroy = function () {\\r\\n // Remove the dropdown from the DOM\\r\\n this.$dropdown.remove();\\r\\n };\\r\\n\\r\\n return Dropdown;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/search',[\\r\\n 'jquery',\\r\\n '../utils'\\r\\n], function ($, Utils) {\\r\\n function Search () { }\\r\\n\\r\\n Search.prototype.render = function (decorated) {\\r\\n var $rendered = decorated.call(this);\\r\\n\\r\\n var $search = $(\\r\\n '<span class=\\\"select2-search select2-search--dropdown\\\">' +\\r\\n '<input class=\\\"select2-search__field\\\" type=\\\"search\\\" tabindex=\\\"-1\\\"' +\\r\\n ' autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\"' +\\r\\n ' spellcheck=\\\"false\\\" role=\\\"textbox\\\" />' +\\r\\n '</span>'\\r\\n );\\r\\n\\r\\n this.$searchContainer = $search;\\r\\n this.$search = $search.find('input');\\r\\n\\r\\n $rendered.prepend($search);\\r\\n\\r\\n return $rendered;\\r\\n };\\r\\n\\r\\n Search.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n this.$search.on('keydown', function (evt) {\\r\\n self.trigger('keypress', evt);\\r\\n\\r\\n self._keyUpPrevented = evt.isDefaultPrevented();\\r\\n });\\r\\n\\r\\n // Workaround for browsers which do not support the `input` event\\r\\n // This will prevent double-triggering of events for browsers which support\\r\\n // both the `keyup` and `input` events.\\r\\n this.$search.on('input', function (evt) {\\r\\n // Unbind the duplicated `keyup` event\\r\\n $(this).off('keyup');\\r\\n });\\r\\n\\r\\n this.$search.on('keyup input', function (evt) {\\r\\n self.handleSearch(evt);\\r\\n });\\r\\n\\r\\n container.on('open', function () {\\r\\n self.$search.attr('tabindex', 0);\\r\\n\\r\\n self.$search.focus();\\r\\n\\r\\n window.setTimeout(function () {\\r\\n self.$search.focus();\\r\\n }, 0);\\r\\n });\\r\\n\\r\\n container.on('close', function () {\\r\\n self.$search.attr('tabindex', -1);\\r\\n\\r\\n self.$search.val('');\\r\\n });\\r\\n\\r\\n container.on('focus', function () {\\r\\n if (container.isOpen()) {\\r\\n self.$search.focus();\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('results:all', function (params) {\\r\\n if (params.query.term == null || params.query.term === '') {\\r\\n var showSearch = self.showSearch(params);\\r\\n\\r\\n if (showSearch) {\\r\\n self.$searchContainer.removeClass('select2-search--hide');\\r\\n } else {\\r\\n self.$searchContainer.addClass('select2-search--hide');\\r\\n }\\r\\n }\\r\\n });\\r\\n };\\r\\n\\r\\n Search.prototype.handleSearch = function (evt) {\\r\\n if (!this._keyUpPrevented) {\\r\\n var input = this.$search.val();\\r\\n\\r\\n this.trigger('query', {\\r\\n term: input\\r\\n });\\r\\n }\\r\\n\\r\\n this._keyUpPrevented = false;\\r\\n };\\r\\n\\r\\n Search.prototype.showSearch = function (_, params) {\\r\\n return true;\\r\\n };\\r\\n\\r\\n return Search;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/hidePlaceholder',[\\r\\n\\r\\n], function () {\\r\\n function HidePlaceholder (decorated, $element, options, dataAdapter) {\\r\\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\\r\\n\\r\\n decorated.call(this, $element, options, dataAdapter);\\r\\n }\\r\\n\\r\\n HidePlaceholder.prototype.append = function (decorated, data) {\\r\\n data.results = this.removePlaceholder(data.results);\\r\\n\\r\\n decorated.call(this, data);\\r\\n };\\r\\n\\r\\n HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\\r\\n if (typeof placeholder === 'string') {\\r\\n placeholder = {\\r\\n id: '',\\r\\n text: placeholder\\r\\n };\\r\\n }\\r\\n\\r\\n return placeholder;\\r\\n };\\r\\n\\r\\n HidePlaceholder.prototype.removePlaceholder = function (_, data) {\\r\\n var modifiedData = data.slice(0);\\r\\n\\r\\n for (var d = data.length - 1; d >= 0; d--) {\\r\\n var item = data[d];\\r\\n\\r\\n if (this.placeholder.id === item.id) {\\r\\n modifiedData.splice(d, 1);\\r\\n }\\r\\n }\\r\\n\\r\\n return modifiedData;\\r\\n };\\r\\n\\r\\n return HidePlaceholder;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/infiniteScroll',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n function InfiniteScroll (decorated, $element, options, dataAdapter) {\\r\\n this.lastParams = {};\\r\\n\\r\\n decorated.call(this, $element, options, dataAdapter);\\r\\n\\r\\n this.$loadingMore = this.createLoadingMore();\\r\\n this.loading = false;\\r\\n }\\r\\n\\r\\n InfiniteScroll.prototype.append = function (decorated, data) {\\r\\n this.$loadingMore.remove();\\r\\n this.loading = false;\\r\\n\\r\\n decorated.call(this, data);\\r\\n\\r\\n if (this.showLoadingMore(data)) {\\r\\n this.$results.append(this.$loadingMore);\\r\\n }\\r\\n };\\r\\n\\r\\n InfiniteScroll.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('query', function (params) {\\r\\n self.lastParams = params;\\r\\n self.loading = true;\\r\\n });\\r\\n\\r\\n container.on('query:append', function (params) {\\r\\n self.lastParams = params;\\r\\n self.loading = true;\\r\\n });\\r\\n\\r\\n this.$results.on('scroll', function () {\\r\\n var isLoadMoreVisible = $.contains(\\r\\n document.documentElement,\\r\\n self.$loadingMore[0]\\r\\n );\\r\\n\\r\\n if (self.loading || !isLoadMoreVisible) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var currentOffset = self.$results.offset().top +\\r\\n self.$results.outerHeight(false);\\r\\n var loadingMoreOffset = self.$loadingMore.offset().top +\\r\\n self.$loadingMore.outerHeight(false);\\r\\n\\r\\n if (currentOffset + 50 >= loadingMoreOffset) {\\r\\n self.loadMore();\\r\\n }\\r\\n });\\r\\n };\\r\\n\\r\\n InfiniteScroll.prototype.loadMore = function () {\\r\\n this.loading = true;\\r\\n\\r\\n var params = $.extend({}, {page: 1}, this.lastParams);\\r\\n\\r\\n params.page++;\\r\\n\\r\\n this.trigger('query:append', params);\\r\\n };\\r\\n\\r\\n InfiniteScroll.prototype.showLoadingMore = function (_, data) {\\r\\n return data.pagination && data.pagination.more;\\r\\n };\\r\\n\\r\\n InfiniteScroll.prototype.createLoadingMore = function () {\\r\\n var $option = $(\\r\\n '<li ' +\\r\\n 'class=\\\"select2-results__option select2-results__option--load-more\\\"' +\\r\\n 'role=\\\"treeitem\\\" aria-disabled=\\\"true\\\"></li>'\\r\\n );\\r\\n\\r\\n var message = this.options.get('translations').get('loadingMore');\\r\\n\\r\\n $option.html(message(this.lastParams));\\r\\n\\r\\n return $option;\\r\\n };\\r\\n\\r\\n return InfiniteScroll;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/attachBody',[\\r\\n 'jquery',\\r\\n '../utils'\\r\\n], function ($, Utils) {\\r\\n function AttachBody (decorated, $element, options) {\\r\\n this.$dropdownParent = options.get('dropdownParent') || $(document.body);\\r\\n\\r\\n decorated.call(this, $element, options);\\r\\n }\\r\\n\\r\\n AttachBody.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n var setupResultsEvents = false;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('open', function () {\\r\\n self._showDropdown();\\r\\n self._attachPositioningHandler(container);\\r\\n\\r\\n if (!setupResultsEvents) {\\r\\n setupResultsEvents = true;\\r\\n\\r\\n container.on('results:all', function () {\\r\\n self._positionDropdown();\\r\\n self._resizeDropdown();\\r\\n });\\r\\n\\r\\n container.on('results:append', function () {\\r\\n self._positionDropdown();\\r\\n self._resizeDropdown();\\r\\n });\\r\\n }\\r\\n });\\r\\n\\r\\n container.on('close', function () {\\r\\n self._hideDropdown();\\r\\n self._detachPositioningHandler(container);\\r\\n });\\r\\n\\r\\n this.$dropdownContainer.on('mousedown', function (evt) {\\r\\n evt.stopPropagation();\\r\\n });\\r\\n };\\r\\n\\r\\n AttachBody.prototype.destroy = function (decorated) {\\r\\n decorated.call(this);\\r\\n\\r\\n this.$dropdownContainer.remove();\\r\\n };\\r\\n\\r\\n AttachBody.prototype.position = function (decorated, $dropdown, $container) {\\r\\n // Clone all of the container classes\\r\\n $dropdown.attr('class', $container.attr('class'));\\r\\n\\r\\n $dropdown.removeClass('select2');\\r\\n $dropdown.addClass('select2-container--open');\\r\\n\\r\\n $dropdown.css({\\r\\n position: 'absolute',\\r\\n top: -999999\\r\\n });\\r\\n\\r\\n this.$container = $container;\\r\\n };\\r\\n\\r\\n AttachBody.prototype.render = function (decorated) {\\r\\n var $container = $('<span></span>');\\r\\n\\r\\n var $dropdown = decorated.call(this);\\r\\n $container.append($dropdown);\\r\\n\\r\\n this.$dropdownContainer = $container;\\r\\n\\r\\n return $container;\\r\\n };\\r\\n\\r\\n AttachBody.prototype._hideDropdown = function (decorated) {\\r\\n this.$dropdownContainer.detach();\\r\\n };\\r\\n\\r\\n AttachBody.prototype._attachPositioningHandler =\\r\\n function (decorated, container) {\\r\\n var self = this;\\r\\n\\r\\n var scrollEvent = 'scroll.select2.' + container.id;\\r\\n var resizeEvent = 'resize.select2.' + container.id;\\r\\n var orientationEvent = 'orientationchange.select2.' + container.id;\\r\\n\\r\\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\\r\\n $watchers.each(function () {\\r\\n $(this).data('select2-scroll-position', {\\r\\n x: $(this).scrollLeft(),\\r\\n y: $(this).scrollTop()\\r\\n });\\r\\n });\\r\\n\\r\\n $watchers.on(scrollEvent, function (ev) {\\r\\n var position = $(this).data('select2-scroll-position');\\r\\n $(this).scrollTop(position.y);\\r\\n });\\r\\n\\r\\n $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\\r\\n function (e) {\\r\\n self._positionDropdown();\\r\\n self._resizeDropdown();\\r\\n });\\r\\n };\\r\\n\\r\\n AttachBody.prototype._detachPositioningHandler =\\r\\n function (decorated, container) {\\r\\n var scrollEvent = 'scroll.select2.' + container.id;\\r\\n var resizeEvent = 'resize.select2.' + container.id;\\r\\n var orientationEvent = 'orientationchange.select2.' + container.id;\\r\\n\\r\\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\\r\\n $watchers.off(scrollEvent);\\r\\n\\r\\n $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\\r\\n };\\r\\n\\r\\n AttachBody.prototype._positionDropdown = function () {\\r\\n var $window = $(window);\\r\\n\\r\\n var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\\r\\n var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\\r\\n\\r\\n var newDirection = null;\\r\\n\\r\\n var offset = this.$container.offset();\\r\\n\\r\\n offset.bottom = offset.top + this.$container.outerHeight(false);\\r\\n\\r\\n var container = {\\r\\n height: this.$container.outerHeight(false)\\r\\n };\\r\\n\\r\\n container.top = offset.top;\\r\\n container.bottom = offset.top + container.height;\\r\\n\\r\\n var dropdown = {\\r\\n height: this.$dropdown.outerHeight(false)\\r\\n };\\r\\n\\r\\n var viewport = {\\r\\n top: $window.scrollTop(),\\r\\n bottom: $window.scrollTop() + $window.height()\\r\\n };\\r\\n\\r\\n var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\\r\\n var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\\r\\n\\r\\n var css = {\\r\\n left: offset.left,\\r\\n top: container.bottom\\r\\n };\\r\\n\\r\\n // Determine what the parent element is to use for calciulating the offset\\r\\n var $offsetParent = this.$dropdownParent;\\r\\n\\r\\n // For statically positoned elements, we need to get the element\\r\\n // that is determining the offset\\r\\n if ($offsetParent.css('position') === 'static') {\\r\\n $offsetParent = $offsetParent.offsetParent();\\r\\n }\\r\\n\\r\\n var parentOffset = $offsetParent.offset();\\r\\n\\r\\n css.top -= parentOffset.top;\\r\\n css.left -= parentOffset.left;\\r\\n\\r\\n if (!isCurrentlyAbove && !isCurrentlyBelow) {\\r\\n newDirection = 'below';\\r\\n }\\r\\n\\r\\n if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\\r\\n newDirection = 'above';\\r\\n } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\\r\\n newDirection = 'below';\\r\\n }\\r\\n\\r\\n if (newDirection == 'above' ||\\r\\n (isCurrentlyAbove && newDirection !== 'below')) {\\r\\n css.top = container.top - parentOffset.top - dropdown.height;\\r\\n }\\r\\n\\r\\n if (newDirection != null) {\\r\\n this.$dropdown\\r\\n .removeClass('select2-dropdown--below select2-dropdown--above')\\r\\n .addClass('select2-dropdown--' + newDirection);\\r\\n this.$container\\r\\n .removeClass('select2-container--below select2-container--above')\\r\\n .addClass('select2-container--' + newDirection);\\r\\n }\\r\\n\\r\\n this.$dropdownContainer.css(css);\\r\\n };\\r\\n\\r\\n AttachBody.prototype._resizeDropdown = function () {\\r\\n var css = {\\r\\n width: this.$container.outerWidth(false) + 'px'\\r\\n };\\r\\n\\r\\n if (this.options.get('dropdownAutoWidth')) {\\r\\n css.minWidth = css.width;\\r\\n css.position = 'relative';\\r\\n css.width = 'auto';\\r\\n }\\r\\n\\r\\n this.$dropdown.css(css);\\r\\n };\\r\\n\\r\\n AttachBody.prototype._showDropdown = function (decorated) {\\r\\n this.$dropdownContainer.appendTo(this.$dropdownParent);\\r\\n\\r\\n this._positionDropdown();\\r\\n this._resizeDropdown();\\r\\n };\\r\\n\\r\\n return AttachBody;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/minimumResultsForSearch',[\\r\\n\\r\\n], function () {\\r\\n function countResults (data) {\\r\\n var count = 0;\\r\\n\\r\\n for (var d = 0; d < data.length; d++) {\\r\\n var item = data[d];\\r\\n\\r\\n if (item.children) {\\r\\n count += countResults(item.children);\\r\\n } else {\\r\\n count++;\\r\\n }\\r\\n }\\r\\n\\r\\n return count;\\r\\n }\\r\\n\\r\\n function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\\r\\n this.minimumResultsForSearch = options.get('minimumResultsForSearch');\\r\\n\\r\\n if (this.minimumResultsForSearch < 0) {\\r\\n this.minimumResultsForSearch = Infinity;\\r\\n }\\r\\n\\r\\n decorated.call(this, $element, options, dataAdapter);\\r\\n }\\r\\n\\r\\n MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\\r\\n if (countResults(params.data.results) < this.minimumResultsForSearch) {\\r\\n return false;\\r\\n }\\r\\n\\r\\n return decorated.call(this, params);\\r\\n };\\r\\n\\r\\n return MinimumResultsForSearch;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/selectOnClose',[\\r\\n\\r\\n], function () {\\r\\n function SelectOnClose () { }\\r\\n\\r\\n SelectOnClose.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('close', function (params) {\\r\\n self._handleSelectOnClose(params);\\r\\n });\\r\\n };\\r\\n\\r\\n SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\\r\\n if (params && params.originalSelect2Event != null) {\\r\\n var event = params.originalSelect2Event;\\r\\n\\r\\n // Don't select an item if the close event was triggered from a select or\\r\\n // unselect event\\r\\n if (event._type === 'select' || event._type === 'unselect') {\\r\\n return;\\r\\n }\\r\\n }\\r\\n\\r\\n var $highlightedResults = this.getHighlightedResults();\\r\\n\\r\\n // Only select highlighted results\\r\\n if ($highlightedResults.length < 1) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var data = $highlightedResults.data('data');\\r\\n\\r\\n // Don't re-select already selected resulte\\r\\n if (\\r\\n (data.element != null && data.element.selected) ||\\r\\n (data.element == null && data.selected)\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.trigger('select', {\\r\\n data: data\\r\\n });\\r\\n };\\r\\n\\r\\n return SelectOnClose;\\r\\n});\\r\\n\\nS2.define('select2/dropdown/closeOnSelect',[\\r\\n\\r\\n], function () {\\r\\n function CloseOnSelect () { }\\r\\n\\r\\n CloseOnSelect.prototype.bind = function (decorated, container, $container) {\\r\\n var self = this;\\r\\n\\r\\n decorated.call(this, container, $container);\\r\\n\\r\\n container.on('select', function (evt) {\\r\\n self._selectTriggered(evt);\\r\\n });\\r\\n\\r\\n container.on('unselect', function (evt) {\\r\\n self._selectTriggered(evt);\\r\\n });\\r\\n };\\r\\n\\r\\n CloseOnSelect.prototype._selectTriggered = function (_, evt) {\\r\\n var originalEvent = evt.originalEvent;\\r\\n\\r\\n // Don't close if the control key is being held\\r\\n if (originalEvent && originalEvent.ctrlKey) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.trigger('close', {\\r\\n originalEvent: originalEvent,\\r\\n originalSelect2Event: evt\\r\\n });\\r\\n };\\r\\n\\r\\n return CloseOnSelect;\\r\\n});\\r\\n\\nS2.define('select2/i18n/en',[],function () {\\r\\n // English\\r\\n return {\\r\\n errorLoading: function () {\\r\\n return 'The results could not be loaded.';\\r\\n },\\r\\n inputTooLong: function (args) {\\r\\n var overChars = args.input.length - args.maximum;\\r\\n\\r\\n var message = 'Please delete ' + overChars + ' character';\\r\\n\\r\\n if (overChars != 1) {\\r\\n message += 's';\\r\\n }\\r\\n\\r\\n return message;\\r\\n },\\r\\n inputTooShort: function (args) {\\r\\n var remainingChars = args.minimum - args.input.length;\\r\\n\\r\\n var message = 'Please enter ' + remainingChars + ' or more characters';\\r\\n\\r\\n return message;\\r\\n },\\r\\n loadingMore: function () {\\r\\n return 'Loading more results…';\\r\\n },\\r\\n maximumSelected: function (args) {\\r\\n var message = 'You can only select ' + args.maximum + ' item';\\r\\n\\r\\n if (args.maximum != 1) {\\r\\n message += 's';\\r\\n }\\r\\n\\r\\n return message;\\r\\n },\\r\\n noResults: function () {\\r\\n return 'No results found';\\r\\n },\\r\\n searching: function () {\\r\\n return 'Searching…';\\r\\n }\\r\\n };\\r\\n});\\r\\n\\nS2.define('select2/defaults',[\\r\\n 'jquery',\\r\\n 'require',\\r\\n\\r\\n './results',\\r\\n\\r\\n './selection/single',\\r\\n './selection/multiple',\\r\\n './selection/placeholder',\\r\\n './selection/allowClear',\\r\\n './selection/search',\\r\\n './selection/eventRelay',\\r\\n\\r\\n './utils',\\r\\n './translation',\\r\\n './diacritics',\\r\\n\\r\\n './data/select',\\r\\n './data/array',\\r\\n './data/ajax',\\r\\n './data/tags',\\r\\n './data/tokenizer',\\r\\n './data/minimumInputLength',\\r\\n './data/maximumInputLength',\\r\\n './data/maximumSelectionLength',\\r\\n\\r\\n './dropdown',\\r\\n './dropdown/search',\\r\\n './dropdown/hidePlaceholder',\\r\\n './dropdown/infiniteScroll',\\r\\n './dropdown/attachBody',\\r\\n './dropdown/minimumResultsForSearch',\\r\\n './dropdown/selectOnClose',\\r\\n './dropdown/closeOnSelect',\\r\\n\\r\\n './i18n/en'\\r\\n], function ($, require,\\r\\n\\r\\n ResultsList,\\r\\n\\r\\n SingleSelection, MultipleSelection, Placeholder, AllowClear,\\r\\n SelectionSearch, EventRelay,\\r\\n\\r\\n Utils, Translation, DIACRITICS,\\r\\n\\r\\n SelectData, ArrayData, AjaxData, Tags, Tokenizer,\\r\\n MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\\r\\n\\r\\n Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\\r\\n AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\\r\\n\\r\\n EnglishTranslation) {\\r\\n function Defaults () {\\r\\n this.reset();\\r\\n }\\r\\n\\r\\n Defaults.prototype.apply = function (options) {\\r\\n options = $.extend(true, {}, this.defaults, options);\\r\\n\\r\\n if (options.dataAdapter == null) {\\r\\n if (options.ajax != null) {\\r\\n options.dataAdapter = AjaxData;\\r\\n } else if (options.data != null) {\\r\\n options.dataAdapter = ArrayData;\\r\\n } else {\\r\\n options.dataAdapter = SelectData;\\r\\n }\\r\\n\\r\\n if (options.minimumInputLength > 0) {\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n MinimumInputLength\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.maximumInputLength > 0) {\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n MaximumInputLength\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.maximumSelectionLength > 0) {\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n MaximumSelectionLength\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.tags) {\\r\\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\\r\\n }\\r\\n\\r\\n if (options.tokenSeparators != null || options.tokenizer != null) {\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n Tokenizer\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.query != null) {\\r\\n var Query = require(options.amdBase + 'compat/query');\\r\\n\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n Query\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.initSelection != null) {\\r\\n var InitSelection = require(options.amdBase + 'compat/initSelection');\\r\\n\\r\\n options.dataAdapter = Utils.Decorate(\\r\\n options.dataAdapter,\\r\\n InitSelection\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n if (options.resultsAdapter == null) {\\r\\n options.resultsAdapter = ResultsList;\\r\\n\\r\\n if (options.ajax != null) {\\r\\n options.resultsAdapter = Utils.Decorate(\\r\\n options.resultsAdapter,\\r\\n InfiniteScroll\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.placeholder != null) {\\r\\n options.resultsAdapter = Utils.Decorate(\\r\\n options.resultsAdapter,\\r\\n HidePlaceholder\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.selectOnClose) {\\r\\n options.resultsAdapter = Utils.Decorate(\\r\\n options.resultsAdapter,\\r\\n SelectOnClose\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n if (options.dropdownAdapter == null) {\\r\\n if (options.multiple) {\\r\\n options.dropdownAdapter = Dropdown;\\r\\n } else {\\r\\n var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\\r\\n\\r\\n options.dropdownAdapter = SearchableDropdown;\\r\\n }\\r\\n\\r\\n if (options.minimumResultsForSearch !== 0) {\\r\\n options.dropdownAdapter = Utils.Decorate(\\r\\n options.dropdownAdapter,\\r\\n MinimumResultsForSearch\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.closeOnSelect) {\\r\\n options.dropdownAdapter = Utils.Decorate(\\r\\n options.dropdownAdapter,\\r\\n CloseOnSelect\\r\\n );\\r\\n }\\r\\n\\r\\n if (\\r\\n options.dropdownCssClass != null ||\\r\\n options.dropdownCss != null ||\\r\\n options.adaptDropdownCssClass != null\\r\\n ) {\\r\\n var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\\r\\n\\r\\n options.dropdownAdapter = Utils.Decorate(\\r\\n options.dropdownAdapter,\\r\\n DropdownCSS\\r\\n );\\r\\n }\\r\\n\\r\\n options.dropdownAdapter = Utils.Decorate(\\r\\n options.dropdownAdapter,\\r\\n AttachBody\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.selectionAdapter == null) {\\r\\n if (options.multiple) {\\r\\n options.selectionAdapter = MultipleSelection;\\r\\n } else {\\r\\n options.selectionAdapter = SingleSelection;\\r\\n }\\r\\n\\r\\n // Add the placeholder mixin if a placeholder was specified\\r\\n if (options.placeholder != null) {\\r\\n options.selectionAdapter = Utils.Decorate(\\r\\n options.selectionAdapter,\\r\\n Placeholder\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.allowClear) {\\r\\n options.selectionAdapter = Utils.Decorate(\\r\\n options.selectionAdapter,\\r\\n AllowClear\\r\\n );\\r\\n }\\r\\n\\r\\n if (options.multiple) {\\r\\n options.selectionAdapter = Utils.Decorate(\\r\\n options.selectionAdapter,\\r\\n SelectionSearch\\r\\n );\\r\\n }\\r\\n\\r\\n if (\\r\\n options.containerCssClass != null ||\\r\\n options.containerCss != null ||\\r\\n options.adaptContainerCssClass != null\\r\\n ) {\\r\\n var ContainerCSS = require(options.amdBase + 'compat/containerCss');\\r\\n\\r\\n options.selectionAdapter = Utils.Decorate(\\r\\n options.selectionAdapter,\\r\\n ContainerCSS\\r\\n );\\r\\n }\\r\\n\\r\\n options.selectionAdapter = Utils.Decorate(\\r\\n options.selectionAdapter,\\r\\n EventRelay\\r\\n );\\r\\n }\\r\\n\\r\\n if (typeof options.language === 'string') {\\r\\n // Check if the language is specified with a region\\r\\n if (options.language.indexOf('-') > 0) {\\r\\n // Extract the region information if it is included\\r\\n var languageParts = options.language.split('-');\\r\\n var baseLanguage = languageParts[0];\\r\\n\\r\\n options.language = [options.language, baseLanguage];\\r\\n } else {\\r\\n options.language = [options.language];\\r\\n }\\r\\n }\\r\\n\\r\\n if ($.isArray(options.language)) {\\r\\n var languages = new Translation();\\r\\n options.language.push('en');\\r\\n\\r\\n var languageNames = options.language;\\r\\n\\r\\n for (var l = 0; l < languageNames.length; l++) {\\r\\n var name = languageNames[l];\\r\\n var language = {};\\r\\n\\r\\n try {\\r\\n // Try to load it with the original name\\r\\n language = Translation.loadPath(name);\\r\\n } catch (e) {\\r\\n try {\\r\\n // If we couldn't load it, check if it wasn't the full path\\r\\n name = this.defaults.amdLanguageBase + name;\\r\\n language = Translation.loadPath(name);\\r\\n } catch (ex) {\\r\\n // The translation could not be loaded at all. Sometimes this is\\r\\n // because of a configuration problem, other times this can be\\r\\n // because of how Select2 helps load all possible translation files.\\r\\n if (options.debug && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: The language file for \\\"' + name + '\\\" could not be ' +\\r\\n 'automatically loaded. A fallback will be used instead.'\\r\\n );\\r\\n }\\r\\n\\r\\n continue;\\r\\n }\\r\\n }\\r\\n\\r\\n languages.extend(language);\\r\\n }\\r\\n\\r\\n options.translations = languages;\\r\\n } else {\\r\\n var baseTranslation = Translation.loadPath(\\r\\n this.defaults.amdLanguageBase + 'en'\\r\\n );\\r\\n var customTranslation = new Translation(options.language);\\r\\n\\r\\n customTranslation.extend(baseTranslation);\\r\\n\\r\\n options.translations = customTranslation;\\r\\n }\\r\\n\\r\\n return options;\\r\\n };\\r\\n\\r\\n Defaults.prototype.reset = function () {\\r\\n function stripDiacritics (text) {\\r\\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\\r\\n function match(a) {\\r\\n return DIACRITICS[a] || a;\\r\\n }\\r\\n\\r\\n return text.replace(/[^\\\\u0000-\\\\u007E]/g, match);\\r\\n }\\r\\n\\r\\n function matcher (params, data) {\\r\\n // Always return the object if there is nothing to compare\\r\\n if ($.trim(params.term) === '') {\\r\\n return data;\\r\\n }\\r\\n\\r\\n // Do a recursive check for options with children\\r\\n if (data.children && data.children.length > 0) {\\r\\n // Clone the data object if there are children\\r\\n // This is required as we modify the object to remove any non-matches\\r\\n var match = $.extend(true, {}, data);\\r\\n\\r\\n // Check each child of the option\\r\\n for (var c = data.children.length - 1; c >= 0; c--) {\\r\\n var child = data.children[c];\\r\\n\\r\\n var matches = matcher(params, child);\\r\\n\\r\\n // If there wasn't a match, remove the object in the array\\r\\n if (matches == null) {\\r\\n match.children.splice(c, 1);\\r\\n }\\r\\n }\\r\\n\\r\\n // If any children matched, return the new object\\r\\n if (match.children.length > 0) {\\r\\n return match;\\r\\n }\\r\\n\\r\\n // If there were no matching children, check just the plain object\\r\\n return matcher(params, match);\\r\\n }\\r\\n\\r\\n var original = stripDiacritics(data.text).toUpperCase();\\r\\n var term = stripDiacritics(params.term).toUpperCase();\\r\\n\\r\\n // Check if the text contains the term\\r\\n if (original.indexOf(term) > -1) {\\r\\n return data;\\r\\n }\\r\\n\\r\\n // If it doesn't contain the term, don't return anything\\r\\n return null;\\r\\n }\\r\\n\\r\\n this.defaults = {\\r\\n amdBase: './',\\r\\n amdLanguageBase: './i18n/',\\r\\n closeOnSelect: true,\\r\\n debug: false,\\r\\n dropdownAutoWidth: false,\\r\\n escapeMarkup: Utils.escapeMarkup,\\r\\n language: EnglishTranslation,\\r\\n matcher: matcher,\\r\\n minimumInputLength: 0,\\r\\n maximumInputLength: 0,\\r\\n maximumSelectionLength: 0,\\r\\n minimumResultsForSearch: 0,\\r\\n selectOnClose: false,\\r\\n sorter: function (data) {\\r\\n return data;\\r\\n },\\r\\n templateResult: function (result) {\\r\\n return result.text;\\r\\n },\\r\\n templateSelection: function (selection) {\\r\\n return selection.text;\\r\\n },\\r\\n theme: 'default',\\r\\n width: 'resolve'\\r\\n };\\r\\n };\\r\\n\\r\\n Defaults.prototype.set = function (key, value) {\\r\\n var camelKey = $.camelCase(key);\\r\\n\\r\\n var data = {};\\r\\n data[camelKey] = value;\\r\\n\\r\\n var convertedData = Utils._convertData(data);\\r\\n\\r\\n $.extend(this.defaults, convertedData);\\r\\n };\\r\\n\\r\\n var defaults = new Defaults();\\r\\n\\r\\n return defaults;\\r\\n});\\r\\n\\nS2.define('select2/options',[\\r\\n 'require',\\r\\n 'jquery',\\r\\n './defaults',\\r\\n './utils'\\r\\n], function (require, $, Defaults, Utils) {\\r\\n function Options (options, $element) {\\r\\n this.options = options;\\r\\n\\r\\n if ($element != null) {\\r\\n this.fromElement($element);\\r\\n }\\r\\n\\r\\n this.options = Defaults.apply(this.options);\\r\\n\\r\\n if ($element && $element.is('input')) {\\r\\n var InputCompat = require(this.get('amdBase') + 'compat/inputData');\\r\\n\\r\\n this.options.dataAdapter = Utils.Decorate(\\r\\n this.options.dataAdapter,\\r\\n InputCompat\\r\\n );\\r\\n }\\r\\n }\\r\\n\\r\\n Options.prototype.fromElement = function ($e) {\\r\\n var excludedData = ['select2'];\\r\\n\\r\\n if (this.options.multiple == null) {\\r\\n this.options.multiple = $e.prop('multiple');\\r\\n }\\r\\n\\r\\n if (this.options.disabled == null) {\\r\\n this.options.disabled = $e.prop('disabled');\\r\\n }\\r\\n\\r\\n if (this.options.language == null) {\\r\\n if ($e.prop('lang')) {\\r\\n this.options.language = $e.prop('lang').toLowerCase();\\r\\n } else if ($e.closest('[lang]').prop('lang')) {\\r\\n this.options.language = $e.closest('[lang]').prop('lang');\\r\\n }\\r\\n }\\r\\n\\r\\n if (this.options.dir == null) {\\r\\n if ($e.prop('dir')) {\\r\\n this.options.dir = $e.prop('dir');\\r\\n } else if ($e.closest('[dir]').prop('dir')) {\\r\\n this.options.dir = $e.closest('[dir]').prop('dir');\\r\\n } else {\\r\\n this.options.dir = 'ltr';\\r\\n }\\r\\n }\\r\\n\\r\\n $e.prop('disabled', this.options.disabled);\\r\\n $e.prop('multiple', this.options.multiple);\\r\\n\\r\\n if ($e.data('select2Tags')) {\\r\\n if (this.options.debug && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: The `data-select2-tags` attribute has been changed to ' +\\r\\n 'use the `data-data` and `data-tags=\\\"true\\\"` attributes and will be ' +\\r\\n 'removed in future versions of Select2.'\\r\\n );\\r\\n }\\r\\n\\r\\n $e.data('data', $e.data('select2Tags'));\\r\\n $e.data('tags', true);\\r\\n }\\r\\n\\r\\n if ($e.data('ajaxUrl')) {\\r\\n if (this.options.debug && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: The `data-ajax-url` attribute has been changed to ' +\\r\\n '`data-ajax--url` and support for the old attribute will be removed' +\\r\\n ' in future versions of Select2.'\\r\\n );\\r\\n }\\r\\n\\r\\n $e.attr('ajax--url', $e.data('ajaxUrl'));\\r\\n $e.data('ajax--url', $e.data('ajaxUrl'));\\r\\n }\\r\\n\\r\\n var dataset = {};\\r\\n\\r\\n // Prefer the element's `dataset` attribute if it exists\\r\\n // jQuery 1.x does not correctly handle data attributes with multiple dashes\\r\\n if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\\r\\n dataset = $.extend(true, {}, $e[0].dataset, $e.data());\\r\\n } else {\\r\\n dataset = $e.data();\\r\\n }\\r\\n\\r\\n var data = $.extend(true, {}, dataset);\\r\\n\\r\\n data = Utils._convertData(data);\\r\\n\\r\\n for (var key in data) {\\r\\n if ($.inArray(key, excludedData) > -1) {\\r\\n continue;\\r\\n }\\r\\n\\r\\n if ($.isPlainObject(this.options[key])) {\\r\\n $.extend(this.options[key], data[key]);\\r\\n } else {\\r\\n this.options[key] = data[key];\\r\\n }\\r\\n }\\r\\n\\r\\n return this;\\r\\n };\\r\\n\\r\\n Options.prototype.get = function (key) {\\r\\n return this.options[key];\\r\\n };\\r\\n\\r\\n Options.prototype.set = function (key, val) {\\r\\n this.options[key] = val;\\r\\n };\\r\\n\\r\\n return Options;\\r\\n});\\r\\n\\nS2.define('select2/core',[\\r\\n 'jquery',\\r\\n './options',\\r\\n './utils',\\r\\n './keys'\\r\\n], function ($, Options, Utils, KEYS) {\\r\\n var Select2 = function ($element, options) {\\r\\n if ($element.data('select2') != null) {\\r\\n $element.data('select2').destroy();\\r\\n }\\r\\n\\r\\n this.$element = $element;\\r\\n\\r\\n this.id = this._generateId($element);\\r\\n\\r\\n options = options || {};\\r\\n\\r\\n this.options = new Options(options, $element);\\r\\n\\r\\n Select2.__super__.constructor.call(this);\\r\\n\\r\\n // Set up the tabindex\\r\\n\\r\\n var tabindex = $element.attr('tabindex') || 0;\\r\\n $element.data('old-tabindex', tabindex);\\r\\n $element.attr('tabindex', '-1');\\r\\n\\r\\n // Set up containers and adapters\\r\\n\\r\\n var DataAdapter = this.options.get('dataAdapter');\\r\\n this.dataAdapter = new DataAdapter($element, this.options);\\r\\n\\r\\n var $container = this.render();\\r\\n\\r\\n this._placeContainer($container);\\r\\n\\r\\n var SelectionAdapter = this.options.get('selectionAdapter');\\r\\n this.selection = new SelectionAdapter($element, this.options);\\r\\n this.$selection = this.selection.render();\\r\\n\\r\\n this.selection.position(this.$selection, $container);\\r\\n\\r\\n var DropdownAdapter = this.options.get('dropdownAdapter');\\r\\n this.dropdown = new DropdownAdapter($element, this.options);\\r\\n this.$dropdown = this.dropdown.render();\\r\\n\\r\\n this.dropdown.position(this.$dropdown, $container);\\r\\n\\r\\n var ResultsAdapter = this.options.get('resultsAdapter');\\r\\n this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\\r\\n this.$results = this.results.render();\\r\\n\\r\\n this.results.position(this.$results, this.$dropdown);\\r\\n\\r\\n // Bind events\\r\\n\\r\\n var self = this;\\r\\n\\r\\n // Bind the container to all of the adapters\\r\\n this._bindAdapters();\\r\\n\\r\\n // Register any DOM event handlers\\r\\n this._registerDomEvents();\\r\\n\\r\\n // Register any internal event handlers\\r\\n this._registerDataEvents();\\r\\n this._registerSelectionEvents();\\r\\n this._registerDropdownEvents();\\r\\n this._registerResultsEvents();\\r\\n this._registerEvents();\\r\\n\\r\\n // Set the initial state\\r\\n this.dataAdapter.current(function (initialData) {\\r\\n self.trigger('selection:update', {\\r\\n data: initialData\\r\\n });\\r\\n });\\r\\n\\r\\n // Hide the original select\\r\\n $element.addClass('select2-hidden-accessible');\\r\\n $element.attr('aria-hidden', 'true');\\r\\n\\r\\n // Synchronize any monitored attributes\\r\\n this._syncAttributes();\\r\\n\\r\\n $element.data('select2', this);\\r\\n };\\r\\n\\r\\n Utils.Extend(Select2, Utils.Observable);\\r\\n\\r\\n Select2.prototype._generateId = function ($element) {\\r\\n var id = '';\\r\\n\\r\\n if ($element.attr('id') != null) {\\r\\n id = $element.attr('id');\\r\\n } else if ($element.attr('name') != null) {\\r\\n id = $element.attr('name') + '-' + Utils.generateChars(2);\\r\\n } else {\\r\\n id = Utils.generateChars(4);\\r\\n }\\r\\n\\r\\n id = id.replace(/(:|\\\\.|\\\\[|\\\\]|,)/g, '');\\r\\n id = 'select2-' + id;\\r\\n\\r\\n return id;\\r\\n };\\r\\n\\r\\n Select2.prototype._placeContainer = function ($container) {\\r\\n $container.insertAfter(this.$element);\\r\\n\\r\\n var width = this._resolveWidth(this.$element, this.options.get('width'));\\r\\n\\r\\n if (width != null) {\\r\\n $container.css('width', width);\\r\\n }\\r\\n };\\r\\n\\r\\n Select2.prototype._resolveWidth = function ($element, method) {\\r\\n var WIDTH = /^width:(([-+]?([0-9]*\\\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\\r\\n\\r\\n if (method == 'resolve') {\\r\\n var styleWidth = this._resolveWidth($element, 'style');\\r\\n\\r\\n if (styleWidth != null) {\\r\\n return styleWidth;\\r\\n }\\r\\n\\r\\n return this._resolveWidth($element, 'element');\\r\\n }\\r\\n\\r\\n if (method == 'element') {\\r\\n var elementWidth = $element.outerWidth(false);\\r\\n\\r\\n if (elementWidth <= 0) {\\r\\n return 'auto';\\r\\n }\\r\\n\\r\\n return elementWidth + 'px';\\r\\n }\\r\\n\\r\\n if (method == 'style') {\\r\\n var style = $element.attr('style');\\r\\n\\r\\n if (typeof(style) !== 'string') {\\r\\n return null;\\r\\n }\\r\\n\\r\\n var attrs = style.split(';');\\r\\n\\r\\n for (var i = 0, l = attrs.length; i < l; i = i + 1) {\\r\\n var attr = attrs[i].replace(/\\\\s/g, '');\\r\\n var matches = attr.match(WIDTH);\\r\\n\\r\\n if (matches !== null && matches.length >= 1) {\\r\\n return matches[1];\\r\\n }\\r\\n }\\r\\n\\r\\n return null;\\r\\n }\\r\\n\\r\\n return method;\\r\\n };\\r\\n\\r\\n Select2.prototype._bindAdapters = function () {\\r\\n this.dataAdapter.bind(this, this.$container);\\r\\n this.selection.bind(this, this.$container);\\r\\n\\r\\n this.dropdown.bind(this, this.$container);\\r\\n this.results.bind(this, this.$container);\\r\\n };\\r\\n\\r\\n Select2.prototype._registerDomEvents = function () {\\r\\n var self = this;\\r\\n\\r\\n this.$element.on('change.select2', function () {\\r\\n self.dataAdapter.current(function (data) {\\r\\n self.trigger('selection:update', {\\r\\n data: data\\r\\n });\\r\\n });\\r\\n });\\r\\n\\r\\n this.$element.on('focus.select2', function (evt) {\\r\\n self.trigger('focus', evt);\\r\\n });\\r\\n\\r\\n this._syncA = Utils.bind(this._syncAttributes, this);\\r\\n this._syncS = Utils.bind(this._syncSubtree, this);\\r\\n\\r\\n if (this.$element[0].attachEvent) {\\r\\n this.$element[0].attachEvent('onpropertychange', this._syncA);\\r\\n }\\r\\n\\r\\n var observer = window.MutationObserver ||\\r\\n window.WebKitMutationObserver ||\\r\\n window.MozMutationObserver\\r\\n ;\\r\\n\\r\\n if (observer != null) {\\r\\n this._observer = new observer(function (mutations) {\\r\\n $.each(mutations, self._syncA);\\r\\n $.each(mutations, self._syncS);\\r\\n });\\r\\n this._observer.observe(this.$element[0], {\\r\\n attributes: true,\\r\\n childList: true,\\r\\n subtree: false\\r\\n });\\r\\n } else if (this.$element[0].addEventListener) {\\r\\n this.$element[0].addEventListener(\\r\\n 'DOMAttrModified',\\r\\n self._syncA,\\r\\n false\\r\\n );\\r\\n this.$element[0].addEventListener(\\r\\n 'DOMNodeInserted',\\r\\n self._syncS,\\r\\n false\\r\\n );\\r\\n this.$element[0].addEventListener(\\r\\n 'DOMNodeRemoved',\\r\\n self._syncS,\\r\\n false\\r\\n );\\r\\n }\\r\\n };\\r\\n\\r\\n Select2.prototype._registerDataEvents = function () {\\r\\n var self = this;\\r\\n\\r\\n this.dataAdapter.on('*', function (name, params) {\\r\\n self.trigger(name, params);\\r\\n });\\r\\n };\\r\\n\\r\\n Select2.prototype._registerSelectionEvents = function () {\\r\\n var self = this;\\r\\n var nonRelayEvents = ['toggle', 'focus'];\\r\\n\\r\\n this.selection.on('toggle', function () {\\r\\n self.toggleDropdown();\\r\\n });\\r\\n\\r\\n this.selection.on('focus', function (params) {\\r\\n self.focus(params);\\r\\n });\\r\\n\\r\\n this.selection.on('*', function (name, params) {\\r\\n if ($.inArray(name, nonRelayEvents) !== -1) {\\r\\n return;\\r\\n }\\r\\n\\r\\n self.trigger(name, params);\\r\\n });\\r\\n };\\r\\n\\r\\n Select2.prototype._registerDropdownEvents = function () {\\r\\n var self = this;\\r\\n\\r\\n this.dropdown.on('*', function (name, params) {\\r\\n self.trigger(name, params);\\r\\n });\\r\\n };\\r\\n\\r\\n Select2.prototype._registerResultsEvents = function () {\\r\\n var self = this;\\r\\n\\r\\n this.results.on('*', function (name, params) {\\r\\n self.trigger(name, params);\\r\\n });\\r\\n };\\r\\n\\r\\n Select2.prototype._registerEvents = function () {\\r\\n var self = this;\\r\\n\\r\\n this.on('open', function () {\\r\\n self.$container.addClass('select2-container--open');\\r\\n });\\r\\n\\r\\n this.on('close', function () {\\r\\n self.$container.removeClass('select2-container--open');\\r\\n });\\r\\n\\r\\n this.on('enable', function () {\\r\\n self.$container.removeClass('select2-container--disabled');\\r\\n });\\r\\n\\r\\n this.on('disable', function () {\\r\\n self.$container.addClass('select2-container--disabled');\\r\\n });\\r\\n\\r\\n this.on('blur', function () {\\r\\n self.$container.removeClass('select2-container--focus');\\r\\n });\\r\\n\\r\\n this.on('query', function (params) {\\r\\n if (!self.isOpen()) {\\r\\n self.trigger('open', {});\\r\\n }\\r\\n\\r\\n this.dataAdapter.query(params, function (data) {\\r\\n self.trigger('results:all', {\\r\\n data: data,\\r\\n query: params\\r\\n });\\r\\n });\\r\\n });\\r\\n\\r\\n this.on('query:append', function (params) {\\r\\n this.dataAdapter.query(params, function (data) {\\r\\n self.trigger('results:append', {\\r\\n data: data,\\r\\n query: params\\r\\n });\\r\\n });\\r\\n });\\r\\n\\r\\n this.on('keypress', function (evt) {\\r\\n var key = evt.which;\\r\\n\\r\\n if (self.isOpen()) {\\r\\n if (key === KEYS.ESC || key === KEYS.TAB ||\\r\\n (key === KEYS.UP && evt.altKey)) {\\r\\n self.close();\\r\\n\\r\\n evt.preventDefault();\\r\\n } else if (key === KEYS.ENTER) {\\r\\n self.trigger('results:select', {});\\r\\n\\r\\n evt.preventDefault();\\r\\n } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\\r\\n self.trigger('results:toggle', {});\\r\\n\\r\\n evt.preventDefault();\\r\\n } else if (key === KEYS.UP) {\\r\\n self.trigger('results:previous', {});\\r\\n\\r\\n evt.preventDefault();\\r\\n } else if (key === KEYS.DOWN) {\\r\\n self.trigger('results:next', {});\\r\\n\\r\\n evt.preventDefault();\\r\\n }\\r\\n } else {\\r\\n if (key === KEYS.ENTER || key === KEYS.SPACE ||\\r\\n (key === KEYS.DOWN && evt.altKey)) {\\r\\n self.open();\\r\\n\\r\\n evt.preventDefault();\\r\\n }\\r\\n }\\r\\n });\\r\\n };\\r\\n\\r\\n Select2.prototype._syncAttributes = function () {\\r\\n this.options.set('disabled', this.$element.prop('disabled'));\\r\\n\\r\\n if (this.options.get('disabled')) {\\r\\n if (this.isOpen()) {\\r\\n this.close();\\r\\n }\\r\\n\\r\\n this.trigger('disable', {});\\r\\n } else {\\r\\n this.trigger('enable', {});\\r\\n }\\r\\n };\\r\\n\\r\\n Select2.prototype._syncSubtree = function (evt, mutations) {\\r\\n var changed = false;\\r\\n var self = this;\\r\\n\\r\\n // Ignore any mutation events raised for elements that aren't options or\\r\\n // optgroups. This handles the case when the select element is destroyed\\r\\n if (\\r\\n evt && evt.target && (\\r\\n evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'\\r\\n )\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (!mutations) {\\r\\n // If mutation events aren't supported, then we can only assume that the\\r\\n // change affected the selections\\r\\n changed = true;\\r\\n } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {\\r\\n for (var n = 0; n < mutations.addedNodes.length; n++) {\\r\\n var node = mutations.addedNodes[n];\\r\\n\\r\\n if (node.selected) {\\r\\n changed = true;\\r\\n }\\r\\n }\\r\\n } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\\r\\n changed = true;\\r\\n }\\r\\n\\r\\n // Only re-pull the data if we think there is a change\\r\\n if (changed) {\\r\\n this.dataAdapter.current(function (currentData) {\\r\\n self.trigger('selection:update', {\\r\\n data: currentData\\r\\n });\\r\\n });\\r\\n }\\r\\n };\\r\\n\\r\\n /**\\r\\n * Override the trigger method to automatically trigger pre-events when\\r\\n * there are events that can be prevented.\\r\\n */\\r\\n Select2.prototype.trigger = function (name, args) {\\r\\n var actualTrigger = Select2.__super__.trigger;\\r\\n var preTriggerMap = {\\r\\n 'open': 'opening',\\r\\n 'close': 'closing',\\r\\n 'select': 'selecting',\\r\\n 'unselect': 'unselecting'\\r\\n };\\r\\n\\r\\n if (args === undefined) {\\r\\n args = {};\\r\\n }\\r\\n\\r\\n if (name in preTriggerMap) {\\r\\n var preTriggerName = preTriggerMap[name];\\r\\n var preTriggerArgs = {\\r\\n prevented: false,\\r\\n name: name,\\r\\n args: args\\r\\n };\\r\\n\\r\\n actualTrigger.call(this, preTriggerName, preTriggerArgs);\\r\\n\\r\\n if (preTriggerArgs.prevented) {\\r\\n args.prevented = true;\\r\\n\\r\\n return;\\r\\n }\\r\\n }\\r\\n\\r\\n actualTrigger.call(this, name, args);\\r\\n };\\r\\n\\r\\n Select2.prototype.toggleDropdown = function () {\\r\\n if (this.options.get('disabled')) {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (this.isOpen()) {\\r\\n this.close();\\r\\n } else {\\r\\n this.open();\\r\\n }\\r\\n };\\r\\n\\r\\n Select2.prototype.open = function () {\\r\\n if (this.isOpen()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.trigger('query', {});\\r\\n };\\r\\n\\r\\n Select2.prototype.close = function () {\\r\\n if (!this.isOpen()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.trigger('close', {});\\r\\n };\\r\\n\\r\\n Select2.prototype.isOpen = function () {\\r\\n return this.$container.hasClass('select2-container--open');\\r\\n };\\r\\n\\r\\n Select2.prototype.hasFocus = function () {\\r\\n return this.$container.hasClass('select2-container--focus');\\r\\n };\\r\\n\\r\\n Select2.prototype.focus = function (data) {\\r\\n // No need to re-trigger focus events if we are already focused\\r\\n if (this.hasFocus()) {\\r\\n return;\\r\\n }\\r\\n\\r\\n this.$container.addClass('select2-container--focus');\\r\\n this.trigger('focus', {});\\r\\n };\\r\\n\\r\\n Select2.prototype.enable = function (args) {\\r\\n if (this.options.get('debug') && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: The `select2(\\\"enable\\\")` method has been deprecated and will' +\\r\\n ' be removed in later Select2 versions. Use $element.prop(\\\"disabled\\\")' +\\r\\n ' instead.'\\r\\n );\\r\\n }\\r\\n\\r\\n if (args == null || args.length === 0) {\\r\\n args = [true];\\r\\n }\\r\\n\\r\\n var disabled = !args[0];\\r\\n\\r\\n this.$element.prop('disabled', disabled);\\r\\n };\\r\\n\\r\\n Select2.prototype.data = function () {\\r\\n if (this.options.get('debug') &&\\r\\n arguments.length > 0 && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: Data can no longer be set using `select2(\\\"data\\\")`. You ' +\\r\\n 'should consider setting the value instead using `$element.val()`.'\\r\\n );\\r\\n }\\r\\n\\r\\n var data = [];\\r\\n\\r\\n this.dataAdapter.current(function (currentData) {\\r\\n data = currentData;\\r\\n });\\r\\n\\r\\n return data;\\r\\n };\\r\\n\\r\\n Select2.prototype.val = function (args) {\\r\\n if (this.options.get('debug') && window.console && console.warn) {\\r\\n console.warn(\\r\\n 'Select2: The `select2(\\\"val\\\")` method has been deprecated and will be' +\\r\\n ' removed in later Select2 versions. Use $element.val() instead.'\\r\\n );\\r\\n }\\r\\n\\r\\n if (args == null || args.length === 0) {\\r\\n return this.$element.val();\\r\\n }\\r\\n\\r\\n var newVal = args[0];\\r\\n\\r\\n if ($.isArray(newVal)) {\\r\\n newVal = $.map(newVal, function (obj) {\\r\\n return obj.toString();\\r\\n });\\r\\n }\\r\\n\\r\\n this.$element.val(newVal).trigger('change');\\r\\n };\\r\\n\\r\\n Select2.prototype.destroy = function () {\\r\\n this.$container.remove();\\r\\n\\r\\n if (this.$element[0].detachEvent) {\\r\\n this.$element[0].detachEvent('onpropertychange', this._syncA);\\r\\n }\\r\\n\\r\\n if (this._observer != null) {\\r\\n this._observer.disconnect();\\r\\n this._observer = null;\\r\\n } else if (this.$element[0].removeEventListener) {\\r\\n this.$element[0]\\r\\n .removeEventListener('DOMAttrModified', this._syncA, false);\\r\\n this.$element[0]\\r\\n .removeEventListener('DOMNodeInserted', this._syncS, false);\\r\\n this.$element[0]\\r\\n .removeEventListener('DOMNodeRemoved', this._syncS, false);\\r\\n }\\r\\n\\r\\n this._syncA = null;\\r\\n this._syncS = null;\\r\\n\\r\\n this.$element.off('.select2');\\r\\n this.$element.attr('tabindex', this.$element.data('old-tabindex'));\\r\\n\\r\\n this.$element.removeClass('select2-hidden-accessible');\\r\\n this.$element.attr('aria-hidden', 'false');\\r\\n this.$element.removeData('select2');\\r\\n\\r\\n this.dataAdapter.destroy();\\r\\n this.selection.destroy();\\r\\n this.dropdown.destroy();\\r\\n this.results.destroy();\\r\\n\\r\\n this.dataAdapter = null;\\r\\n this.selection = null;\\r\\n this.dropdown = null;\\r\\n this.results = null;\\r\\n };\\r\\n\\r\\n Select2.prototype.render = function () {\\r\\n var $container = $(\\r\\n '<span class=\\\"select2 select2-container\\\">' +\\r\\n '<span class=\\\"selection\\\"></span>' +\\r\\n '<span class=\\\"dropdown-wrapper\\\" aria-hidden=\\\"true\\\"></span>' +\\r\\n '</span>'\\r\\n );\\r\\n\\r\\n $container.attr('dir', this.options.get('dir'));\\r\\n\\r\\n this.$container = $container;\\r\\n\\r\\n this.$container.addClass('select2-container--' + this.options.get('theme'));\\r\\n\\r\\n $container.data('element', this.$element);\\r\\n\\r\\n return $container;\\r\\n };\\r\\n\\r\\n return Select2;\\r\\n});\\r\\n\\nS2.define('jquery-mousewheel',[\\r\\n 'jquery'\\r\\n], function ($) {\\r\\n // Used to shim jQuery.mousewheel for non-full builds.\\r\\n return $;\\r\\n});\\r\\n\\nS2.define('jquery.select2',[\\r\\n 'jquery',\\r\\n 'jquery-mousewheel',\\r\\n\\r\\n './select2/core',\\r\\n './select2/defaults'\\r\\n], function ($, _, Select2, Defaults) {\\r\\n if ($.fn.select2 == null) {\\r\\n // All methods that should return the element\\r\\n var thisMethods = ['open', 'close', 'destroy'];\\r\\n\\r\\n $.fn.select2 = function (options) {\\r\\n options = options || {};\\r\\n\\r\\n if (typeof options === 'object') {\\r\\n this.each(function () {\\r\\n var instanceOptions = $.extend(true, {}, options);\\r\\n\\r\\n var instance = new Select2($(this), instanceOptions);\\r\\n });\\r\\n\\r\\n return this;\\r\\n } else if (typeof options === 'string') {\\r\\n var ret;\\r\\n var args = Array.prototype.slice.call(arguments, 1);\\r\\n\\r\\n this.each(function () {\\r\\n var instance = $(this).data('select2');\\r\\n\\r\\n if (instance == null && window.console && console.error) {\\r\\n console.error(\\r\\n 'The select2(\\\\'' + options + '\\\\') method was called on an ' +\\r\\n 'element that is not using Select2.'\\r\\n );\\r\\n }\\r\\n\\r\\n ret = instance[options].apply(instance, args);\\r\\n });\\r\\n\\r\\n // Check if we should be returning `this`\\r\\n if ($.inArray(options, thisMethods) > -1) {\\r\\n return this;\\r\\n }\\r\\n\\r\\n return ret;\\r\\n } else {\\r\\n throw new Error('Invalid arguments for Select2: ' + options);\\r\\n }\\r\\n };\\r\\n }\\r\\n\\r\\n if ($.fn.select2.defaults == null) {\\r\\n $.fn.select2.defaults = Defaults;\\r\\n }\\r\\n\\r\\n return Select2;\\r\\n});\\r\\n\\n // Return the AMD loader configuration so it can be used outside of this file\\r\\n return {\\r\\n define: S2.define,\\r\\n require: S2.require\\r\\n };\\r\\n}());\\r\\n\\r\\n // Autoload the jQuery bindings\\r\\n // We know that all of the modules exist above this, so we're safe\\r\\n var select2 = S2.require('jquery.select2');\\r\\n\\r\\n // Hold the AMD module references on the jQuery function that was just loaded\\r\\n // This allows Select2 to use the internal loader outside of this file, such\\r\\n // as in the language files.\\r\\n jQuery.fn.select2.amd = S2;\\r\\n\\r\\n // Return the Select2 instance for anyone who is importing it.\\r\\n return select2;\\r\\n}));\\r\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L3NlbGVjdDIvZGlzdC9qcy9zZWxlY3QyLmpzPzdiNzAiXSwic291cmNlc0NvbnRlbnQiOlsiLyohXHJcbiAqIFNlbGVjdDIgNC4wLjNcclxuICogaHR0cHM6Ly9zZWxlY3QyLmdpdGh1Yi5pb1xyXG4gKlxyXG4gKiBSZWxlYXNlZCB1bmRlciB0aGUgTUlUIGxpY2Vuc2VcclxuICogaHR0cHM6Ly9naXRodWIuY29tL3NlbGVjdDIvc2VsZWN0Mi9ibG9iL21hc3Rlci9MSUNFTlNFLm1kXHJcbiAqL1xyXG4oZnVuY3Rpb24gKGZhY3RvcnkpIHtcclxuICBpZi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2UoMCwgYmFzZVBhcnRzLmxlbmd0aCAtIDEpLmNvbmNhdChuYW1lKTtcblxuICAgICAgICAgICAgICAgIC8vc3RhcnQgdHJpbURvdHNcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbmFtZS5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBwYXJ0ID0gbmFtZVtpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnQgPT09IFwiLlwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgLT0gMTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJ0ID09PSBcIi4uXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAxICYmIChuYW1lWzJdID09PSAnLi4nIHx8IG5hbWVbMF0gPT09ICcuLicpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9FbmQgb2YgdGhlIGxpbmUuIEtlZXAgYXQgbGVhc3Qgb25lIG5vbi1kb3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3BhdGggc2VnbWVudCBhdCB0aGUgZnJvbnQgc28gaXQgY2FuIGJlIG1hcHBlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29ycmVjdGx5IHRvIGRpc2suIE90aGVyd2lzZSwgdGhlcmUgaXMgbGlrZWx5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9ubyBwYXRoIG1hcHBpbmcgZm9yIGEgcGF0aCBzdGFydGluZyB3aXRoICcuLicuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9UaGlzIGNhbiBzdGlsbCBmYWlsLCBidXQgY2F0Y2hlcyB0aGUgbW9zdCByZWFzb25hYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy91c2VzIG9mIC4uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGkgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZS5zcGxpY2UoaSAtIDEsIDIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgLT0gMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvL2VuZCB0cmltRG90c1xuXG4gICAgICAgICAgICAgICAgbmFtZSA9IG5hbWUuam9pbihcIi9cIik7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUuaW5kZXhPZignLi8nKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIC8vIE5vIGJhc2VOYW1lLCBzbyB0aGlzIGlzIElEIGlzIHJlc29sdmVkIHJlbGF0aXZlXG4gICAgICAgICAgICAgICAgLy8gdG8gYmFzZVVybCwgcHVsbCBvZmYgdGhlIGxlYWRpbmcgZG90LlxuICAgICAgICAgICAgICAgIG5hbWUgPSBuYW1lLnN1YnN0cmluZygyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vQXBwbHkgbWFwIGNvbmZpZyBpZiBhdmFpbGFibGUuXG4gICAgICAgIGlmICgoYmFzZVBhcnRzIHx8IHN0YXJNYXApICYmIG1hcCkge1xuICAgICAgICAgICAgbmFtZVBhcnRzID0gbmFtZS5zcGxpdCgnLycpO1xuXG4gICAgICAgICAgICBmb3IgKGkgPSBuYW1lUGFydHMubGVuZ3RoOyBpID4gMDsgaSAtPSAxKSB7XG4gICAgICAgICAgICAgICAgbmFtZVNlZ21lbnQgPSBuYW1lUGFydHMuc2xpY2UoMCwgaSkuam9pbihcIi9cIik7XG5cbiAgICAgICAgICAgICAgICBpZiAoYmFzZVBhcnRzKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vRmluZCB0aGUgbG9uZ2VzdCBiYXNlTmFtZSBzZWdtZW50IG1hdGNoIGluIHRoZSBjb25maWcuXG4gICAgICAgICAgICAgICAgICAgIC8vU28sIGRvIGpvaW5zIG9uIHRoZSBiaWdnZXN0IHRvIHNtYWxsZXN0IGxlbmd0aHMgb2YgYmFzZVBhcnRzLlxuICAgICAgICAgICAgICAgICAgICBmb3IgKGogPSBiYXNlUGFydHMubGVuZ3RoOyBqID4gMDsgaiAtPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXBWYWx1ZSA9IG1hcFtiYXNlUGFydHMuc2xpY2UoMCwgaikuam9pbignLycpXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy9iYXNlTmFtZSBzZWdtZW50IGhhcyAgY29uZmlnLCBmaW5kIGlmIGl0IGhhcyBvbmUgZm9yXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3RoaXMgbmFtZS5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXBWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcFZhbHVlID0gbWFwVmFsdWVbbmFtZVNlZ21lbnRdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXBWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL01hdGNoLCB1cGRhdGUgbmFtZSB0byB0aGUgbmV3IHZhbHVlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZE1hcCA9IG1hcFZhbHVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZEkgPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoZm91bmRNYXApIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy9DaGVjayBmb3IgYSBzdGFyIG1hcCBtYXRjaCwgYnV0IGp1c3QgaG9sZCBvbiB0byBpdCxcbiAgICAgICAgICAgICAgICAvL2lmIHRoZXJlIGlzIGEgc2hvcnRlciBzZWdtZW50IG1hdGNoIGxhdGVyIGluIGEgbWF0Y2hpbmdcbiAgICAgICAgICAgICAgICAvL2NvbmZpZywgdGhlbiBmYXZvciBvdmVyIHRoaXMgc3RhciBtYXAuXG4gICAgICAgICAgICAgICAgaWYgKCFmb3VuZFN0YXJNYXAgJiYgc3Rhck1hcCAmJiBzdGFyTWFwW25hbWVTZWdtZW50XSkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZFN0YXJNYXAgPSBzdGFyTWFwW25hbWVTZWdtZW50XTtcbiAgICAgICAgICAgICAgICAgICAgc3RhckkgPSBpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFmb3VuZE1hcCAmJiBmb3VuZFN0YXJNYXApIHtcbiAgICAgICAgICAgICAgICBmb3VuZE1hcCA9IGZvdW5kU3Rhck1hcDtcbiAgICAgICAgICAgICAgICBmb3VuZEkgPSBzdGFySTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGZvdW5kTWFwKSB7XG4gICAgICAgICAgICAgICAgbmFtZVBhcnRzLnNwbGljZSgwLCBmb3VuZEksIGZvdW5kTWFwKTtcbiAgICAgICAgICAgICAgICBuYW1lID0gbmFtZVBhcnRzLmpvaW4oJy8nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBuYW1lO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIG1ha2VSZXF1aXJlKHJlbE5hbWUsIGZvcmNlU3luYykge1xuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICA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KTtcbiAgICAgICAgICAgIHBhcnRzID0gc3BsaXRQcmVmaXgobmFtZSk7XG4gICAgICAgICAgICBwcmVmaXggPSBwYXJ0c1swXTtcbiAgICAgICAgICAgIG5hbWUgPSBwYXJ0c1sxXTtcbiAgICAgICAgICAgIGlmIChwcmVmaXgpIHtcbiAgICAgICAgICAgICAgICBwbHVnaW4gPSBjYWxsRGVwKHByZWZpeCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvL1VzaW5nIHJpZGljdWxvdXMgcHJvcGVydHkgbmFtZXMgZm9yIHNwYWNlIHJlYXNvbnNcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGY6IHByZWZpeCA/IHByZWZpeCArICchJyArIG5hbWUgOiBuYW1lLCAvL2Z1bGxOYW1lXG4gICAgICAgICAgICBuOiBuYW1lLFxuICAgICAgICAgICAgcHI6IHByZWZpeCxcbiAgICAgICAgICAgIHA6IHBsdWdpblxuICAgICAgICB9O1xuICAgIH07XG5cbiAgICBmdW5jdGlvbiBtYWtlQ29uZmlnKG5hbWUpIHtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAoY29uZmlnICYmIGNvbmZpZy5jb25maWcgJiYgY29uZmlnLmNvbmZpZ1tuYW1lXSkgfHwge307XG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgaGFuZGxlcnMgPSB7XG4gICAgICAgIHJlcXVpcmU6IGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICByZXR1cm4gbWFrZVJlcXVpcmUobmFtZSk7XG4gICAgICAgIH0sXG4gICAgICAgIGV4cG9ydHM6IGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICB2YXIgZSA9IGRlZmluZWRbbmFtZV07XG4gICAgICAgICAgICBpZiAodHlwZW9mIGUgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiAoZGVmaW5lZFtuYW1lXSA9IHt9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbW9kdWxlOiBmdW5jdGlvbiAobmFtZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBpZDogbmFtZSxcbiAgICAgICAgICAgICAgICB1cmk6ICcnLFxuICAgICAgICAgICAgICAgIGV4cG9ydHM6IGRlZmluZWRbbmFtZV0sXG4gICAgICAgICAgICAgICAgY29uZmlnOiBtYWtlQ29uZmlnKG5hbWUpXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIG1haW4gPSBmdW5jdGlvbiAobmFtZSwgZGVwcywgY2FsbGJhY2ssIHJlbE5hbWUpIHtcbiAgICAgICAgdmFyIGNqc01vZHVsZSwgZGVwTmFtZSwgcmV0LCBtYXAsIGksXG4gICAgICAgICAgICBhcmdzID0gW10sXG4gICAgICAgICAgICBjYWxsYmFja1R5cGUgPSB0eXBlb2YgY2FsbGJhY2ssXG4gICAgICAgICAgICB1c2luZ0V4cG9ydHM7XG5cbiAgICAgICAgLy9Vc2UgbmFtZSBpZiBubyByZWxOYW1lXG4gICAgICAgIHJlbE5hbWUgPSByZWxOYW1lIHx8IG5hbWU7XG5cbiAgICAgICAgLy9DYWxsIHRoZSBjYWxsYmFjayB0byBkZWZpbmUgdGhlIG1vZHVsZSwgaWYgbmVjZXNzYXJ5LlxuICAgICAgICBpZiAoY2FsbGJhY2tUeXBlID09PSAndW5kZWZpbmVkJyB8fCBjYWxsYmFja1R5cGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIC8vUHVsbCBvdXQgdGhlIGRlZmluZWQgZGVwZW5kZW5jaWVzIGFuZCBwYXNzIHRoZSBvcmRlcmVkXG4gICAgICAgICAgICAvL3ZhbHVlcyB0byB0aGUgY2FsbGJhY2suXG4gICAgICAgICAgICAvL0RlZmF1bHQgdG8gW3JlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZV0gaWYgbm8gZGVwc1xuICAgICAgICAgICAgZGVwcyA9ICFkZXBzLmxlbmd0aCAmJiBjYWxsYmFjay5sZW5ndGggPyBbJ3JlcXVpcmUnLCAnZXhwb3J0cycsICdtb2R1bGUnXSA6IGRlcHM7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgZGVwcy5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgIG1hcCA9IG1ha2VNYXAoZGVwc1tpXSwgcmVsTmFtZSk7XG4gICAgICAgICAgICAgICAgZGVwTmFtZSA9IG1hcC5mO1xuXG4gICAgICAgICAgICAgICAgLy9GYXN0IHBhdGggQ29tbW9uSlMgc3RhbmRhcmQgZGVwZW5kZW5jaWVzLlxuICAgICAgICAgICAgICAgIGlmIChkZXBOYW1lID09PSBcInJlcXVpcmVcIikge1xuICAgICAgICAgICAgICAgICAgICBhcmdzW2ldID0gaGFuZGxlcnMucmVxdWlyZShuYW1lKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGRlcE5hbWUgPT09IFwiZXhwb3J0c1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vQ29tbW9uSlMgbW9kdWxlIHNwZWMgMS4xXG4gICAgICAgICAgICAgICAgICAgIGFyZ3NbaV0gPSBoYW5kbGVycy5leHBvcnRzKG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICB1c2luZ0V4cG9ydHMgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVwTmFtZSA9PT0gXCJtb2R1bGVcIikge1xuICAgICAgICAgICAgICAgICAgICAvL0NvbW1vbkpTIG1vZHVsZSBzcGVjIDEuMVxuICAgICAgICAgICAgICAgICAgICBjanNNb2R1bGUgPSBhcmdzW2ldID0gaGFuZGxlcnMubW9kdWxlKG5hbWUpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaGFzUHJvcChkZWZpbmVkLCBkZXBOYW1lKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzUHJvcCh3YWl0aW5nLCBkZXBOYW1lKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzUHJvcChkZWZpbmluZywgZGVwTmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXJnc1tpXSA9IGNhbGxEZXAoZGVwTmFtZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXAucCkge1xuICAgICAgICAgICAgICAgICAgICBtYXAucC5sb2FkKG1hcC5uLCBtYWtlUmVxdWlyZShyZWxOYW1lLCB0cnVlKSwgbWFrZUxvYWQoZGVwTmFtZSksIHt9KTtcbiAgICAgICAgICAgICAgICAgICAgYXJnc1tpXSA9IGRlZmluZWRbZGVwTmFtZV07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKG5hbWUgKyAnIG1pc3NpbmcgJyArIGRlcE5hbWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0ID0gY2FsbGJhY2sgPyBjYWxsYmFjay5hcHBseShkZWZpbmVkW25hbWVdLCBhcmdzKSA6IHVuZGVmaW5lZDtcblxuICAgICAgICAgICAgaWYgKG5hbWUpIHtcbiAgICAgICAgICAgICAgICAvL0lmIHNldHRpbmcgZXhwb3J0cyB2aWEgXCJtb2R1bGVcIiBpcyBpbiBwbGF5LFxuICAgICAgICAgICAgICAgIC8vZmF2b3IgdGhhdCBvdmVyIHJldHVybiB2YWx1ZSBhbmQgZXhwb3J0cy4gQWZ0ZXIgdGhhdCxcbiAgICAgICAgICAgICAgICAvL2Zhdm9yIGEgbm9uLXVuZGVmaW5lZCByZXR1cm4gdmFsdWUgb3ZlciBleHBvcnRzIHVzZS5cbiAgICAgICAgICAgICAgICBpZiAoY2pzTW9kdWxlICYmI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uICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy9KdXN0IHJldHVybiB0aGUgbW9kdWxlIHdhbnRlZC4gSW4gdGhpcyBzY2VuYXJpbywgdGhlXG4gICAgICAgICAgICAvL2RlcHMgYXJnIGlzIHRoZSBtb2R1bGUgbmFtZSwgYW5kIHNlY29uZCBhcmcgKGlmIHBhc3NlZClcbiAgICAgICAgICAgIC8vaXMganVzdCB0aGUgcmVsTmFtZS5cbiAgICAgICAgICAgIC8vTm9ybWFsaXplIG1vZHVsZSBuYW1lLCBpZiBpdCBjb250YWlucyAuIG9yIC4uXG4gICAgICAgICAgICByZXR1cm4gY2FsbERlcChtYWtlTWFwKGRlcHMsIGNhbGxiYWNrKS5mKTtcbiAgICAgICAgfSBlbHNlIGlmICghZGVwcy5zcGxpY2UpIHtcbiAgICAgICAgICAgIC8vZGVwcyBpcyBhIGNvbmZpZyBvYmplY3QsIG5vdCBhbiBhcnJheS5cbiAgICAgICAgICAgIGNvbmZpZyA9IGRlcHM7XG4gICAgICAgICAgICBpZiAoY29uZmlnLmRlcHMpIHtcbiAgICAgICAgICAgICAgICByZXEoY29uZmlnLmRlcHMsIGNvbmZpZy5jYWxsYmFjayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2FsbGJhY2suc3BsaWNlKSB7XG4gICAgICAgICAgICAgICAgLy9jYWxsYmFjayBpcyBhbiBhcnJheSwgd2hpY2ggbWVhbnMgaXQgaXMgYSBkZXBlbmRlbmN5IGxpc3QuXG4gICAgICAgICAgICAgICAgLy9BZGp1c3QgYXJncyBpZiB0aGVyZSBhcmUgZGVwZW5kZW5jaWVzXG4gICAgICAgICAgICAgICAgZGVwcyA9IGNhbGxiYWNrO1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrID0gcmVsTmFtZTtcbiAgICAgICAgICAgIC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gY2hpbGQpIHtcclxuICAgICAgdmFyIGRhdGEgPSBvYmoucmVzdWx0cztcclxuXHJcbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGF0YS5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIHZhciBvcHRpb24gPSBkYXRhW2ldO1xyXG5cclxuICAgICAgICB2YXIgY2hlY2tDaGlsZHJlbiA9IChcclxuICAgICAgICAgIG9wdGlvbi5jaGlsZHJlbiAhPSBudWxsICYmXHJcbiAgICAgICAgICAhd3JhcHBlcih7XHJcbiAgICAgICAgICAgIHJlc3VsdHM6IG9wdGlvbi5jaGlsZHJlblxyXG4gICAgICAgICAgfSwgdHJ1ZSlcclxuICAgICAgICApO1xyXG5cclxuICAgICAgICB2YXIgY2hlY2tUZXh0ID0gb3B0aW9uLnRleHQgPT09IHBhcmFtcy50ZXJtO1xyXG5cclxuICAgICAgICBpZiAoY2hlY2tUZXh0IHx8IGNoZWNrQ2hpbGRyZW4pIHtcclxuICAgICAgICAgIGlmIChjaGlsZCkge1xyXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgb2JqLmRhdGEgPSBkYXRhO1xyXG4gICAgICAgICAgY2FsbGJhY2sob2JqKTtcclxuXHJcbiAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAoY2hpbGQpIHtcclxuICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgdmFyIHRhZyA9IHNlbGYuY3JlYXRlVGFnKHBhcmFtcyk7XHJcblxyXG4gICAgICBpZiAodGFnICE9IG51bGwpIHtcclxuICAgICAgICB2YXIgJG9wdGlvbiA9IHNlbGYub3B0aW9uKHRhZyk7XHJcbiAgICAgICAgJG9wdGlvbi5hdHRyKCdkYXRhLXNlbGVjdDItdGFnJywgdHJ1ZSk7XHJcblxyXG4gICAgICAgIHNlbGYu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GFyYW1zLnRlcm0sXHJcbiAgICAgICAgdGV4dDogcGFyYW1zLnRlcm1cclxuICAgICAgfTtcclxuICAgIH07XHJcblxyXG4gICAgd2hpbGUgKGkgPCB0ZXJtLmxlbmd0aCkge1xyXG4gICAgICB2YXIgdGVybUNoYXIgPSB0ZXJtW2ldO1xyXG5cclxuICAgICAgaWYgKCQuaW5BcnJheSh0ZXJtQ2hhciwgc2VwYXJhdG9ycykgPT09IC0xKSB7XHJcbiAgICAgICAgaSsrO1xyXG5cclxuICAgICAgICBjb250aW51ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgdmFyIHBhcnQgPSB0ZXJtLnN1YnN0cigwLCBpKTtcclxuICAgICAgdmFyIHBhcnRQYXJhbXMgPSAkLmV4dGVuZCh7fSwgcGFyYW1zLCB7XHJcbiAgICAgICAgdGVybTogcGFydFxyXG4gICAgICB9KTtcclxuXHJcbiAgICAgIHZhciBkYXRhID0gY3JlYXRlVGFnKHBhcnRQYXJhbXMpO1xyXG5cclxuICAgICAgaWYgKGRhdGEgPT0gbnVsbCkge1xyXG4gICAgICAgIGkrKztcclxuICAgICAgICBjb250aW51ZTtcclxuICAgICAgfVxyXG5cclxuICAgICAgY2FsbGJhY2soZGF0YSk7XHJcblxyXG4gICAgICAvLyBSZXNldCB0aGUgdGVybSB0byBub3QgaW5jbHVkZSB0aGUgdG9rZW5pemVkIHBvcnRpb25cclxuICAgICAgdGVybSA9IHRlcm0uc3Vic3RyKGkgKyAxKSB8fCAnJztcclxuICAgICAgaSA9IDA7XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHtcclxuICAgICAgdGVybTogdGVybVxyXG4gICAgfTtcclxuICB9O1xyXG5cclxuICByZXR1cm4gVG9rZW5pemVyO1xyXG59KTtcclxuXG5TMi5kZWZpbmUoJ3NlbGVjdDIvZGF0YS9taW5pbXVtSW5wdXRMZW5ndGgnLFtcclxuXHJcbl0sIGZ1bmN0aW9uICgpIHtcclxuICBmdW5jdGlvbiBNa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iAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlciA9IEFqYXhEYXRhO1xyXG4gICAgICB9IGVsc2UgaWYgKG9wdGlvbnMuZGF0YSAhPSBudWxsKSB7XHJcbiAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlciA9IEFycmF5RGF0YTtcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICBvcHRpb25zLmRhdGFBZGFwdGVyID0gU2VsZWN0RGF0YTtcclxuICAgICAgfVxyXG5cclxuICAgICAgaWYgKG9wdGlvbnMubWluaW11bUlucHV0TGVuZ3RoID4gMCkge1xyXG4gICAgICAgIG9wdGlvbnMuZGF0YUFkYXB0ZXIgPSBVdGlscy5EZWNvcmF0ZShcclxuICAgICAgICAgIG9wdGlvbnMuZGF0YUFkYXB0ZXIsXHJcbiAgICAgICAgICBNaW5pbXVtSW5wdXRMZW5ndGhcclxuICAgICAgICApO1xyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAob3B0aW9ucy5tYXhpbXVtSW5wdXRMZW5ndGggPiAwKSB7XHJcbiAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlciA9IFV0aWxzLkRlY29yYXRlKFxyXG4gICAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlcixcclxuICAgICAgICAgIE1heGltdW1JbnB1dExlbmd0aFxyXG4gICAgICAgICk7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIGlmIChvcHRpb25zLm1heGltdW1TZWxlY3Rpb25MZW5ndGggPiAwKSB7XHJcbiAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlciA9IFV0aWxzLkRlY29yYXRlKFxyXG4gICAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlcixcclxuICAgICAgICAgIE1heGltdW1TZWxlY3Rpb25MZW5ndGhcclxuICAgICAgICApO1xyXG4gICAgICB9XHJcblxyXG4gICAgICBpZiAob3B0aW9ucy50YWdzKSB7XHJcbiAgICAgICAgb3B0aW9ucy5kYXRhQWRhcHRlci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__(1)(\\n /* script */\\n __webpack_require__(12),\\n /* template */\\n __webpack_require__(35),\\n /* scopeId */\\n \\\"data-v-3edef3ba\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/alert.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] alert.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-3edef3ba\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-3edef3ba\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlP2RjMTMiXSwic291cmNlc0NvbnRlbnQiOlsiXG4vKiBzdHlsZXMgKi9cbnJlcXVpcmUoXCIhIXZ1ZS1sb2FkZXIvbm9kZV9tb2R1bGVzL3Z1ZS1zdHlsZS1sb2FkZXIhY3NzLWxvYWRlcj9zb3VyY2VNYXAhLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc3R5bGUtcmV3cml0ZXI/aWQ9ZGF0YS12LTNlZGVmM2JhJnNjb3BlZD10cnVlIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yP3R5cGU9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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(44)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(13),\\n /* template */\\n __webpack_require__(37),\\n /* scopeId */\\n \\\"data-v-5667c312\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/importer/importer-errors.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] importer-errors.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-5667c312\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-5667c312\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXItZXJyb3JzLnZ1ZT9iZTViIl0sInN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LTU2NjdjMzEyXCIsIENvbXBvbmVudC5vcHRpb25zKVxuICB9IGVsc2Uge1xuICAgIGhvdEFQSS5yZWxvYWQoXCJkYXRhLXYtNTY2N2MzMTJcIiwgQ29tcG9uZW50Lm9wdGlvbnMpXG4gIH1cbn0pKCl9XG5cbm1vZHVsZS5leHBvcnRzID0gQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2ltcG9ydGVyL2ltcG9ydGVyLWVycm9ycy52dWVcbi8vIG1vZHVsZSBpZCA9IDMyXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/* styles */\\n__webpack_require__(47)\\n\\nvar Component = __webpack_require__(1)(\\n /* script */\\n __webpack_require__(18),\\n /* template */\\n __webpack_require__(40),\\n /* scopeId */\\n \\\"data-v-ff564a86\\\",\\n /* cssModules */\\n null\\n)\\nComponent.options.__file = \\\"/home/hydrogen/work/snipe-it/resources/assets/js/components/select2.vue\\\"\\nif (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== \\\"default\\\" && key !== \\\"__esModule\\\"})) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\nif (Component.options.functional) {console.error(\\\"[vue-loader] select2.vue: functional components are not supported with templates, they should use render functions.\\\")}\\n\\n/* hot reload */\\nif (false) {(function () {\\n var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n hotAPI.install(require(\\\"vue\\\"), false)\\n if (!hotAPI.compatible) return\\n module.hot.accept()\\n if (!module.hot.data) {\\n hotAPI.createRecord(\\\"data-v-ff564a86\\\", Component.options)\\n } else {\\n hotAPI.reload(\\\"data-v-ff564a86\\\", Component.options)\\n }\\n})()}\\n\\nmodule.exports = Component.exports\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvc2VsZWN0Mi52dWU/YjgxNyJdLCJzb3VyY2VzQ29udGVudCI6WyJcbi8qIHN0eWxlcyAqL1xucmVxdWlyZShcIiEhdnVlLWxvYWRlci9ub2RlX21vZHVsZXMvdnVlLXN0eWxlLWxvYWRlciFjc3MtbG9hZGVyP3NvdXJjZU1hcCEuLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlcj9pZD1kYXRhLXYtZmY1NjRhODYmc2NvcGVkPXRydWUhLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc2VsZWN0b3I/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL3NlbGVjdDIudnVlXCIpXG5cbnZhciBDb21wb25lbnQgPSByZXF1aXJlKFwiIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2NvbXBvbmVudC1ub3JtYWxpemVyXCIpKFxuICAvKiBzY3JpcHQgKi9cbiAgcmVxdWlyZShcIiEhYnVibGUtbG9hZGVyIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yP3R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){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', [_c('div', [_c('div', {\\n staticClass: \\\"panel panel-default\\\"\\n }, [_c('div', {\\n staticClass: \\\"panel-heading\\\"\\n }, [_c('div', {\\n staticStyle: {\\n \\\"display\\\": \\\"flex\\\",\\n \\\"justify-content\\\": \\\"space-between\\\",\\n \\\"align-items\\\": \\\"center\\\"\\n }\\n }, [_c('span', [_vm._v(\\\"\\\\n Personal Access Tokens\\\\n \\\")]), _vm._v(\\\" \\\"), _c('a', {\\n staticClass: \\\"action-link\\\",\\n on: {\\n \\\"click\\\": _vm.showCreateTokenForm\\n }\\n }, [_vm._v(\\\"\\\\n Create New Token\\\\n \\\")])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"panel-body\\\"\\n }, [(_vm.tokens.length === 0) ? _c('p', {\\n staticClass: \\\"m-b-none\\\"\\n }, [_vm._v(\\\"\\\\n You have not created any personal access tokens.\\\\n \\\")]) : _vm._e(), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), (_vm.tokens.length > 0) ? _c('table', {\\n staticClass: \\\"table table-borderless m-b-none\\\"\\n }, [_vm._m(0), _vm._v(\\\" \\\"), _c('tbody', _vm._l((_vm.tokens), function(token) {\\n return _c('tr', [_c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_vm._v(\\\"\\\\n \\\" + _vm._s(token.name) + \\\"\\\\n \\\")]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_c('a', {\\n staticClass: \\\"action-link text-danger\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.revoke(token)\\n }\\n }\\n }, [_vm._v(\\\"\\\\n Delete\\\\n \\\")])])])\\n }))]) : _vm._e()])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal fade\\\",\\n attrs: {\\n \\\"id\\\": \\\"modal-create-token\\\",\\n \\\"tabindex\\\": \\\"-1\\\",\\n \\\"role\\\": \\\"dialog\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"modal-dialog\\\"\\n }, [_c('div', {\\n staticClass: \\\"modal-content\\\"\\n }, [_vm._m(1), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-body\\\"\\n }, [(_vm.form.errors.length > 0) ? _c('div', {\\n staticClass: \\\"alert alert-danger\\\"\\n }, [_vm._m(2), _vm._v(\\\" \\\"), _c('br'), _vm._v(\\\" \\\"), _c('ul', _vm._l((_vm.form.errors), function(error) {\\n return _c('li', [_vm._v(\\\"\\\\n \\\" + _vm._s(error) + \\\"\\\\n \\\")])\\n }))]) : _vm._e(), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('form', {\\n staticClass: \\\"form-horizontal\\\",\\n attrs: {\\n \\\"role\\\": \\\"form\\\"\\n },\\n on: {\\n \\\"submit\\\": function($event) {\\n $event.preventDefault();\\n _vm.store($event)\\n }\\n }\\n }, [_c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-4 control-label\\\"\\n }, [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-6\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.form.name),\\n expression: \\\"form.name\\\"\\n }],\\n staticClass: \\\"form-control\\\",\\n attrs: {\\n \\\"id\\\": \\\"create-token-name\\\",\\n \\\"type\\\": \\\"text\\\",\\n \\\"name\\\": \\\"name\\\"\\n },\\n domProps: {\\n \\\"value\\\": _vm._s(_vm.form.name)\\n },\\n on: {\\n \\\"input\\\": function($event) {\\n if ($event.target.composing) { return; }\\n _vm.form.name = $event.target.value\\n }\\n }\\n })])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), (_vm.scopes.length > 0) ? _c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-4 control-label\\\"\\n }, [_vm._v(\\\"Scopes\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-6\\\"\\n }, _vm._l((_vm.scopes), function(scope) {\\n return _c('div', [_c('div', {\\n staticClass: \\\"checkbox\\\"\\n }, [_c('label', [_c('input', {\\n attrs: {\\n \\\"type\\\": \\\"checkbox\\\"\\n },\\n domProps: {\\n \\\"checked\\\": _vm.scopeIsAssigned(scope.id)\\n },\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.toggleScope(scope.id)\\n }\\n }\\n }), _vm._v(\\\"\\\\n\\\\n \\\" + _vm._s(scope.id) + \\\"\\\\n \\\")])])])\\n }))]) : _vm._e()])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-footer\\\"\\n }, [_c('button', {\\n staticClass: \\\"btn btn-default\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\",\\n \\\"data-dismiss\\\": \\\"modal\\\"\\n }\\n }, [_vm._v(\\\"Close\\\")]), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-primary\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\"\\n },\\n on: {\\n \\\"click\\\": _vm.store\\n }\\n }, [_vm._v(\\\"\\\\n Create\\\\n \\\")])])])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal fade\\\",\\n attrs: {\\n \\\"id\\\": \\\"modal-access-token\\\",\\n \\\"tabindex\\\": \\\"-1\\\",\\n \\\"role\\\": \\\"dialog\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"modal-dialog\\\"\\n }, [_c('div', {\\n staticClass: \\\"modal-content\\\"\\n }, [_vm._m(3), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-body\\\"\\n }, [_c('p', [_vm._v(\\\"\\\\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\\\\n You may now use this token to make API requests.\\\\n \\\")]), _vm._v(\\\" \\\"), _c('pre', [_c('code', [_vm._v(_vm._s(_vm.accessToken))])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _vm._m(4)])])])])\\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('thead', [_c('tr', [_c('th', [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('th')])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"modal-header\\\"\\n }, [_c('button', {\\n staticClass: \\\"close\\\",\\n attrs: {\\n \\\"type\\\": \\\"button \\\",\\n \\\"data-dismiss\\\": \\\"modal\\\",\\n \\\"aria-hidden\\\": \\\"true\\\"\\n }\\n }, [_vm._v(\\\"×\\\")]), _vm._v(\\\" \\\"), _c('h4', {\\n staticClass: \\\"modal-title\\\"\\n }, [_vm._v(\\\"\\\\n Create Token\\\\n \\\")])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('p', [_c('strong', [_vm._v(\\\"Whoops!\\\")]), _vm._v(\\\" Something went wrong!\\\")])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"modal-header\\\"\\n }, [_c('button', {\\n staticClass: \\\"close\\\",\\n attrs: {\\n \\\"type\\\": \\\"button \\\",\\n \\\"data-dismiss\\\": \\\"modal\\\",\\n \\\"aria-hidden\\\": \\\"true\\\"\\n }\\n }, [_vm._v(\\\"×\\\")]), _vm._v(\\\" \\\"), _c('h4', {\\n staticClass: \\\"modal-title\\\"\\n }, [_vm._v(\\\"\\\\n Personal Access Token\\\\n \\\")])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"modal-footer\\\"\\n }, [_c('button', {\\n staticClass: \\\"btn btn-default\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\",\\n \\\"data-dismiss\\\": \\\"modal\\\"\\n }\\n }, [_vm._v(\\\"Close\\\")])])\\n}]}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-225778c2\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvUGVyc29uYWxBY2Nlc3NUb2tlbnMudnVlPzA5OTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHM9e3JlbmRlcjpmdW5jdGlvbiAoKXt2YXIgX3ZtPXRoaXM7dmFyIF9oPV92bS4kY3JlYXRlRWxlbWVudDt2YXIgX2M9X3ZtLl9zZWxmLl9jfHxfaDtcbiAgcmV0dXJuIF9jKCdkaXYnLCBbX2MoJ2RpdicsIFtfYygnZGl2Jywge1xuICAgIHN0YXRpY0NsYXNzOiBcInBhbmVsIHBhbmVsLWRlZmF1bHRcIlxuICB9LCBbX2MoJ2RpdicsIHtcbiAgICBzdGF0aWNDbGFzczogXCJwYW5lbC1oZWFkaW5nXCJcbiAgfSwgW19jKCdkaXYnLCB7XG4gICAgc3RhdGljU3R5bGU6IHtcbiAgICAgIFwiZGlzcGxheVwiOiBcImZsZXhcIixcbiAgICAgIFwianVzdGlmeS1jb250ZW50XCI6IFwic3BhY2UtYmV0d2VlblwiLFxuICAgICAgXCJhbGlnbi1pdGVtc1wiOiBcImNlbnRlclwiXG4gICAgfVxuICB9LCBbX2MoJ3NwYW4nLCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgUGVyc29uYWwgQWNjZXNzIFRva2Vuc1xcbiAgICAgICAgICAgICAgICAgICAgXCIpXSksIF92bS5fdihcIiBcIiksIF9jKCdhJywge1xuICAgIHN0YXRpY0NsYXNzOiBcImFjdGlvbi1saW5rXCIsXG4gICAgb246IHtcbiAgICAgIFwiY2xpY2tcIjogX3ZtLnNob3dDcmVhdGVUb2tlbkZvcm1cbiAgICB9XG4gIH0sIFtfdm0uX3YoXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICBDcmVhdGUgTmV3IFRva2VuXFxuICAgICAgICAgICAgICAgICAgICBcIildKV0pXSksIF92bS5fdihcIiBcIiksIF9jKCdkaXYnLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwicGFuZWwtYm9keVwiXG4gIH0sIFsoX3ZtLnRva2Vucy5sZW5ndGggPT09IDApID8gX2MoJ3AnLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwibS1iLW5vbmVcIlxuICB9LCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICBZb3UgaGF2ZSBub3QgY3JlYXRlZCBhbnkgcGVyc29uYWwgYWNjZXNzIHRva2Vucy5cXG4gICAgICAgICAgICAgICAgXCIpXSkgOiBfdm0uX2UoKSwgX3ZtLl92KFwiIFwiKSwgX3ZtLl92KFwiIFwiKSwgKF92bS50b2tlbnMubGVuZ3RoID4gMCkgPyBfYygndGFibGUnLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwidGFibGUgdGFibGUtYm9yZGVybGVzcyBtLWItbm9uZVwiXG4gIH0sIFtfdm0uX20oMCksIF92bS5fdihcIiBcIiksIF9jKCd0Ym9keScsIF92bS5fbCgoX3ZtLnRva2VucyksIGZ1bmN0aW9uKHRva2VuKSB7XG4gICAgcmV0dXJuIF9jKCd0cicsIFtfYygndGQnLCB7XG4gICAgICBzdGF0aWNTdHlsZToge1xuICAgICAgICBcInZlcnRpY2FsLWFsaWduXCI6IFwibWlkZGxlXCJcbiAgICAgIH1cbiAgICB9LCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIiArIF92bS5fcyh0b2tlbi5uYW1lKSArIFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiKV0pLCBfdm0uX3YoXCIgXCIpLCBfdm0uX3YoXCIgXCIpLCBfYygndGQnLCB7XG4gICAgICBzdGF0aWNTdHlsZToge1xuICAgICAgICBcInZlcnRpY2FsLWFsaWduXCI6IFwibWlkZGxlXCJcbiAgICAgIH1cbiAgICB9LCBbX2MoJ2EnLCB7XG4gICAgICBzdGF0aWNDbGFzczogXCJhY3Rpb24tbGluayB0ZXh0LWRhbmdlclwiLFxuICAgICAgb246IHtcbiAgICAgICAgXCJjbGlja1wiOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICBfdm0ucmV2b2tlKHRva2VuKVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSwgW192bS5fdihcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlbGV0ZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIpXSldKV0pXG4gIH0pKV0pIDogX3ZtLl9lKCldKV0pXSksIF92bS5fdihcIiBcIiksIF92bS5fdihcIiBcIiksIF9jKCdkaXYnLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwibW9kYWwgZmFkZVwiLFxuICAgIGF0dHJzOiB7XG4gICAgICBcImlkXCI6IFwibW9kYWwtY3JlYXRlLXRva2VuXCIsXG4gICAgICBcInRhYmluZGV4XCI6IFwiLTFcIixcbiAgICAgIFwicm9sZVwiOiBcImRpYWxvZ1wiXG4gICAgfVxuICB9LCBbX2MoJ2RpdicsIHtcbiAgICBzdGF0aWNDbGFzczogXCJtb2RhbC1kaWFsb2dcIlxuICB9LCBbX2MoJ2RpdicsIHtcbiAgICBzdGF0aWNDbGFzczogXCJtb2RhbC1jb250ZW50XCJcbiAgfSwgW192bS5fbSgxKSwgX3ZtLl92KFwiIFwiKSwgX2MoJ2RpdicsIHtcbiA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MpLCBmdW5jdGlvbihzY29wZSkge1xuICAgIHJldHVybiBfYygnZGl2JywgW19jKCdkaXYnLCB7XG4gICAgICBzdGF0aWNDbGFzczogXCJjaGVja2JveFwiXG4gICAgfSwgW19jKCdsYWJlbCcsIFtfYygnaW5wdXQnLCB7XG4gICAgICBhdHRyczoge1xuICAgICAgICBcInR5cGVcIjogXCJjaGVja2JveFwiXG4gICAgICB9LFxuICAgICAgZG9tUHJvcHM6IHtcbiAgICAgICAgXCJjaGVja2VkXCI6IF92bS5zY29wZUlzQXNzaWduZWQoc2NvcGUuaWQpXG4gICAgICB9LFxuICAgICAgb246IHtcbiAgICAgICAgXCJjbGlja1wiOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICBfdm0udG9nZ2xlU2NvcGUoc2NvcGUuaWQpXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KSwgX3ZtLl92KFwiXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIgKyBfdm0uX3Moc2NvcGUuaWQpICsgXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIpXSldKV0pXG4gIH0pKV0pIDogX3ZtLl9lKCldKV0pLCBfdm0uX3YoXCIgXCIpLCBfdm0uX3YoXCIgXCIpLCBfYygnZGl2Jywge1xuICAgIHN0YXRpY0NsYXNzOiBcIm1vZGFsLWZvb3RlclwiXG4gIH0sIFtfYygnYnV0dG9uJywge1xuICAgIHN0YXRpY0NsYXNzOiBcImJ0biBidG4tZGVmYXVsdFwiLFxuICAgIGF0dHJzOiB7XG4gICAgICBcInR5cGVcIjogXCJidXR0b25cIixcbiAgICAgIFwiZGF0YS1kaXNtaXNzXCI6IFwibW9kYWxcIlxuICAgIH1cbiAgfSwgW192bS5fdihcIkNsb3NlXCIpXSksIF92bS5fdihcIiBcIiksIF9jKCdidXR0b24nLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwiYnRuIGJ0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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 35 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"col-md-12\\\",\\n class: _vm.alertType\\n }, [_c('div', {\\n staticClass: \\\"alert\\\",\\n class: _vm.alertClassName\\n }, [_c('button', {\\n staticClass: \\\"close\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\"\\n },\\n on: {\\n \\\"click\\\": _vm.hideEvent\\n }\\n }, [_vm._v(\\\"×\\\")]), _vm._v(\\\" \\\"), _c('i', {\\n directives: [{\\n name: \\\"show\\\",\\n rawName: \\\"v-show\\\",\\n value: (_vm.alertType == 'success'),\\n expression: \\\"alertType == 'success'\\\"\\n }],\\n staticClass: \\\"fa fa-check faa-pulse animated\\\"\\n }), _vm._v(\\\" \\\"), _c('strong', [_vm._v(_vm._s(_vm.title) + \\\" \\\")]), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\")], true)])\\n},staticRenderFns: []}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-3edef3ba\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlP2FjYTEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHM9e3JlbmRlcjpmdW5jdGlvbiAoKXt2YXIgX3ZtPXRoaXM7dmFyIF9oPV92bS4k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J1ZVxuaWYgKG1vZHVsZS5ob3QpIHtcbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAobW9kdWxlLmhvdC5kYXRhKSB7XG4gICAgIHJlcXVpcmUoXCJ2dWUtaG90LXJlbG9hZC1hcGlcIikucmVyZW5kZXIoXCJkYXRhLXYtM2VkZWYzYmFcIiwgbW9kdWxlLmV4cG9ydHMpXG4gIH1cbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vdnVlLWxvYWRlci9saWIvdGVtcGxhdGUtY29tcGlsZXIuanM/aWQ9ZGF0YS12LTNlZGVmM2JhIS4vfi92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXRlbXBsYXRlJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlXG4vLyBtb2R1bGUgaWQgPSAzNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 36 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"row\\\"\\n }, [_c('alert', {\\n directives: [{\\n name: \\\"show\\\",\\n rawName: \\\"v-show\\\",\\n value: (_vm.alert.visible),\\n expression: \\\"alert.visible\\\"\\n }],\\n attrs: {\\n \\\"alertType\\\": _vm.alert.type\\n },\\n on: {\\n \\\"hide\\\": function($event) {\\n _vm.alert.visible = false\\n }\\n }\\n }, [_vm._v(_vm._s(_vm.alert.message))]), _vm._v(\\\" \\\"), _c('errors', {\\n attrs: {\\n \\\"errors\\\": _vm.importErrors\\n }\\n }), _vm._v(\\\" \\\"), _c('modal', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.displayImportModal),\\n expression: \\\"displayImportModal\\\"\\n }],\\n attrs: {\\n \\\"effect\\\": \\\"fade\\\"\\n },\\n domProps: {\\n \\\"value\\\": (_vm.displayImportModal)\\n },\\n on: {\\n \\\"input\\\": function($event) {\\n _vm.displayImportModal = $event\\n }\\n }\\n }, [_c('div', {\\n staticClass: \\\"modal-header\\\",\\n slot: \\\"modal-header\\\"\\n }, [_c('h4', {\\n staticClass: \\\"modal-title\\\"\\n }, [_vm._v(\\\"Import File:\\\")])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-body\\\",\\n slot: \\\"modal-body\\\"\\n }, [_c('div', {\\n staticClass: \\\"dynamic-form-row\\\"\\n }, [_c('div', {\\n staticClass: \\\"col-md-4 col-xs-12\\\"\\n }, [_c('label', {\\n attrs: {\\n \\\"for\\\": \\\"import-type\\\"\\n }\\n }, [_vm._v(\\\"Import Type:\\\")])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-8 col-xs-12\\\"\\n }, [_c('select2', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.modal.importType),\\n expression: \\\"modal.importType\\\"\\n }],\\n attrs: {\\n \\\"options\\\": _vm.modal.importTypes\\n },\\n domProps: {\\n \\\"value\\\": (_vm.modal.importType)\\n },\\n on: {\\n \\\"input\\\": function($event) {\\n _vm.modal.importType = $event\\n }\\n }\\n }, [_c('option', {\\n attrs: {\\n \\\"disabled\\\": \\\"\\\",\\n \\\"value\\\": \\\"0\\\"\\n }\\n })])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"dynamic-form-row\\\"\\n }, [_c('div', {\\n staticClass: \\\"col-md-4 col-xs-12\\\"\\n }, [_c('label', {\\n attrs: {\\n \\\"for\\\": \\\"import-update\\\"\\n }\\n }, [_vm._v(\\\"Update Existing Values?:\\\")])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-8 col-xs-12\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.modal.update),\\n expression: \\\"modal.update\\\"\\n }],\\n attrs: {\\n \\\"type\\\": \\\"checkbox\\\",\\n \\\"name\\\": \\\"import-update\\\"\\n },\\n domProps: {\\n \\\"checked\\\": Array.isArray(_vm.modal.update) ? _vm._i(_vm.modal.update, null) > -1 : _vm._q(_vm.modal.update, true)\\n },\\n on: {\\n \\\"change\\\": function($event) {\\n var $$a = _vm.modal.update,\\n $$el = $event.target,\\n $$c = $$el.checked ? (true) : (false);\\n if (Array.isArray($$a)) {\\n var $$v = null,\\n $$i = _vm._i($$a, $$v);\\n if ($$c) {\\n $$i < 0 && (_vm.modal.update = $$a.concat($$v))\\n } else {\\n $$i > -1 && (_vm.modal.update = $$a.slice(0, $$i).concat($$a.slice($$i + 1)))\\n }\\n } else {\\n _vm.modal.update = $$c\\n }\\n }\\n }\\n })])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-footer\\\",\\n slot: \\\"modal-footer\\\"\\n }, [(_vm.modal.statusText) ? _c('div', {\\n staticClass: \\\"alert alert-success col-md-5 col-md-offset-1\\\",\\n staticStyle: {\\n \\\"text-align\\\": \\\"left\\\"\\n }\\n }, [_vm._v(_vm._s(this.modal.statusText))]) : _vm._e(), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-default\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\"\\n },\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.displayImportModal = false\\n }\\n }\\n }, [_vm._v(\\\"Cancel\\\")]), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-primary\\\",\\n attrs: {\\n \\\"type\\\": \\\"submit\\\"\\n },\\n on: {\\n \\\"click\\\": _vm.postSave\\n }\\n }, [_vm._v(\\\"Process\\\")])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-12\\\"\\n }, [_c('div', {\\n staticClass: \\\"box\\\"\\n }, [_c('div', {\\n staticClass: \\\"box-body\\\"\\n }, [_c('div', {\\n staticClass: \\\"row\\\"\\n }, [_vm._m(0), _vm._v(\\\" \\\"), _c('div', {\\n directives: [{\\n name: \\\"show\\\",\\n rawName: \\\"v-show\\\",\\n value: (_vm.progress.visible),\\n expression: \\\"progress.visible\\\"\\n }],\\n staticClass: \\\"col-md-9\\\",\\n staticStyle: {\\n \\\"padding-bottom\\\": \\\"20px\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"col-md-11\\\"\\n }, [_c('div', {\\n staticClass: \\\"progress progress-striped-active\\\",\\n staticStyle: {\\n \\\"margin-top\\\": \\\"8px\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"progress-bar\\\",\\n class: _vm.progress.currentClass,\\n style: (_vm.progressWidth),\\n attrs: {\\n \\\"role\\\": \\\"progressbar\\\"\\n }\\n }, [_c('span', [_vm._v(_vm._s(_vm.progress.statusText))])])])])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"row\\\"\\n }, [_c('div', {\\n staticClass: \\\"col-md-12\\\"\\n }, [_c('table', {\\n staticClass: \\\"table table-striped\\\",\\n attrs: {\\n \\\"id\\\": \\\"upload-table\\\"\\n }\\n }, [_vm._m(1), _vm._v(\\\" \\\"), _c('tbody', _vm._l((_vm.files), function(file) {\\n return _c('tr', [_c('td', [_vm._v(_vm._s(file.file_path))]), _vm._v(\\\" \\\"), _c('td', [_vm._v(_vm._s(file.created_at) + \\\" \\\")]), _vm._v(\\\" \\\"), _c('td', [_vm._v(_vm._s(file.filesize))]), _vm._v(\\\" \\\"), _c('td', [_c('button', {\\n staticClass: \\\"btn btn-sm btn-info\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.showModal(file)\\n }\\n }\\n }, [_c('i', {\\n staticClass: \\\"fa fa-spinner process\\\"\\n }), _vm._v(\\\"Process\\\")]), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-sm btn-danger\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.deleteFile(file)\\n }\\n }\\n }, [_c('i', {\\n staticClass: \\\"fa fa-trash icon-white\\\"\\n })])])])\\n }))])])])])])])])\\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"col-md-3\\\"\\n }, [_c('span', {\\n staticClass: \\\"btn btn-info fileinput-button\\\"\\n }, [_c('span', [_vm._v(\\\"Select Import File...\\\")]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('input', {\\n attrs: {\\n \\\"id\\\": \\\"fileupload\\\",\\n \\\"type\\\": \\\"file\\\",\\n \\\"name\\\": \\\"files[]\\\",\\n \\\"data-url\\\": \\\"/api/v1/imports\\\",\\n \\\"accept\\\": \\\"text/csv\\\"\\n }\\n })])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('thead', [_c('th', [_vm._v(\\\"File\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Created\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Size\\\")]), _vm._v(\\\" \\\"), _c('th')])\\n}]}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-5301a236\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzYuanMiLCJzb3V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O0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return (_vm.errors) ? _c('div', {\\n staticClass: \\\"box\\\"\\n }, [_c('div', {\\n staticClass: \\\"box-body\\\"\\n }, [_vm._m(0), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"errors-table\\\"\\n }, [_c('table', {\\n staticClass: \\\"table table-striped table-bordered\\\",\\n attrs: {\\n \\\"id\\\": \\\"errors-table\\\"\\n }\\n }, [_vm._m(1), _vm._v(\\\" \\\"), _c('tbody', _vm._l((_vm.errors), function(error, item) {\\n return _c('tr', [_c('td', [_vm._v(_vm._s(item))]), _vm._v(\\\" \\\"), _vm._l((error), function(value, field) {\\n return _c('td', [_c('b', [_vm._v(_vm._s(field) + \\\":\\\")]), _vm._v(\\\" \\\"), _vm._l((value), function(errorString) {\\n return _c('span', [_vm._v(_vm._s(errorString[0]))])\\n }), _vm._v(\\\" \\\"), _c('br')], true)\\n })], true)\\n }))])])])]) : _vm._e()\\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"alert alert-warning\\\"\\n }, [_c('strong', [_vm._v(\\\"Warning\\\")]), _vm._v(\\\" Some Errors occured while importing\\\\n \\\")])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('thead', [_c('th', [_vm._v(\\\"Item\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Errors\\\")])])\\n}]}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-5667c312\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXItZXJyb3JzLnZ1ZT9jMmMwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzPXtyZW5kZXI6ZnVuY3Rpb24gKCl7dmFyIF92bT10aGlzO3ZhciBfaD1fdm0uJGNyZ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wbGF0ZSZpbmRleD0wIS4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2ltcG9ydGVyL2ltcG9ydGVyLWVycm9ycy52dWVcbi8vIG1vZHVsZSBpZCA9IDM3XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', [(_vm.tokens.length > 0) ? _c('div', [_c('div', {\\n staticClass: \\\"panel panel-default\\\"\\n }, [_c('div', {\\n staticClass: \\\"panel-heading\\\"\\n }, [_vm._v(\\\"Authorized Applications\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"panel-body\\\"\\n }, [_c('table', {\\n staticClass: \\\"table table-borderless m-b-none\\\"\\n }, [_vm._m(0), _vm._v(\\\" \\\"), _c('tbody', _vm._l((_vm.tokens), function(token) {\\n return _c('tr', [_c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_vm._v(\\\"\\\\n \\\" + _vm._s(token.client.name) + \\\"\\\\n \\\")]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [(token.scopes.length > 0) ? _c('span', [_vm._v(\\\"\\\\n \\\" + _vm._s(token.scopes.join(', ')) + \\\"\\\\n \\\")]) : _vm._e()]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_c('a', {\\n staticClass: \\\"action-link text-danger\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.revoke(token)\\n }\\n }\\n }, [_vm._v(\\\"\\\\n Revoke\\\\n \\\")])])])\\n }))])])])]) : _vm._e()])\\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('thead', [_c('tr', [_c('th', [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Scopes\\\")]), _vm._v(\\\" \\\"), _c('th')])])\\n}]}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-de0d0e4e\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQXV0aG9yaXplZENsaWVudHMudnVlP2M4ODciXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHM9e3JlbmRlcjpmdW5jdGlvbiAoKXt2YXIgX3ZtPXRoaXM7dmFyIF9oPV92bS4kY3JlYXRlRWxlbWVudDt2YXIgX2M9X3ZtLl9zZWxmLl9jfHxfaDtcbiAgcmV0dXJuIF9jKCdkaXYnLCBbKF92bS50b2tlbnMubGVuZ3RoID4gMCkgPyBfYygnZGl2JywgW19jKCdkaXYnLCB7XG4gICAgc3RhdGljQ2xhc3M6IFwicGFuZWwgcGFuZWwtZGVmYXVsdFwiXG4gIH0sIFtfYygnZGl2Jywge1xuICAgIHN0YXRpY0NsYXNzOiBcInBhbmVsLWhlYWRpbmdcIlxuICB9LCBbX3ZtLl92KFwiQXV0aG9yaXplZCBBcHBsaWNhdGlvbnNcIildKSwgX3ZtLl92KFwiIFwiKSwgX2MoJ2RpdicsIHtcbiAgICBzdGF0aWNDbGFzczogXCJwYW5lbC1ib2R5XCJcbiAgfSwgW19jKCd0YWJsZScsIHtcbiAgICBzdGF0aWNDbGFzczogXCJ0YWJsZSB0YWJsZS1ib3JkZXJsZXNzIG0tYi1ub25lXCJcbiAgfSwgW192bS5fbSgwKSwgX3ZtLl92KFwiIFwiKSwgX2MoJ3Rib2R5JywgX3ZtLl9sKChfdm0udG9rZW5zKSwgZnVuY3Rpb24odG9rZW4pIHtcbiAgICByZXR1cm4gX2MoJ3RyJywgW19jKCd0ZCcsIHtcbiAgICAgIHN0YXRpY1N0eWxlOiB7XG4gICAgICAgIFwidmVydGljYWwtYWxpZ25cIjogXCJtaWRkbGVcIlxuICAgICAgfVxuICAgIH0sIFtfdm0uX3YoXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiICsgX3ZtLl9zKHRva2VuLmNsaWVudC5uYW1lKSArIFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiKV0pLCBfdm0uX3YoXCIgXCIpLCBfdm0uX3YoXCIgXCIpLCBfYygndGQnLCB7XG4gICAgICBzdGF0aWNTdHlsZToge1xuICAgICAgICBcInZlcnRpY2FsLWFsaWduXCI6IFwibWlkZGxlXCJcbiAgICAgIH1cbiAgICB9LCBbKHRva2VuLnNjb3Blcy5sZW5ndGggPiAwKSA/IF9jKCdzcGFuJywgW192bS5fdihcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiICsgX3ZtLl9zKHRva2VuLnNjb3Blcy5qb2luKCcsICcpKSArIFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIildKSA6IF92bS5fZSgpXSksIF92bS5fdihcIiBcIiksIF92bS5fdihcIiB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xuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L3Z1ZS1sb2FkZXIvbGliL3RlbXBsYXRlLWNvbXBpbGVyLmpzP2lkPWRhdGEtdi1kZTBkMGU0ZSEuL34vdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT10ZW1wbGF0ZSZpbmRleD0wIS4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL3Bhc3Nwb3J0L0F1dGhvcml6ZWRDbGllbnRzLnZ1ZVxuLy8gbW9kdWxlIGlkID0gMzhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', [_c('div', {\\n staticClass: \\\"panel panel-default\\\"\\n }, [_c('div', {\\n staticClass: \\\"panel-heading\\\"\\n }, [_c('div', {\\n staticStyle: {\\n \\\"display\\\": \\\"flex\\\",\\n \\\"justify-content\\\": \\\"space-between\\\",\\n \\\"align-items\\\": \\\"center\\\"\\n }\\n }, [_c('span', [_vm._v(\\\"\\\\n OAuth Clients\\\\n \\\")]), _vm._v(\\\" \\\"), _c('a', {\\n staticClass: \\\"action-link\\\",\\n on: {\\n \\\"click\\\": _vm.showCreateClientForm\\n }\\n }, [_vm._v(\\\"\\\\n Create New Client\\\\n \\\")])])]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"panel-body\\\"\\n }, [(_vm.clients.length === 0) ? _c('p', {\\n staticClass: \\\"m-b-none\\\"\\n }, [_vm._v(\\\"\\\\n You have not created any OAuth clients.\\\\n \\\")]) : _vm._e(), _vm._v(\\\" \\\"), (_vm.clients.length > 0) ? _c('table', {\\n staticClass: \\\"table table-borderless m-b-none\\\"\\n }, [_vm._m(0), _vm._v(\\\" \\\"), _c('tbody', _vm._l((_vm.clients), function(client) {\\n return _c('tr', [_c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_vm._v(\\\"\\\\n \\\" + _vm._s(client.id) + \\\"\\\\n \\\")]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_vm._v(\\\"\\\\n \\\" + _vm._s(client.name) + \\\"\\\\n \\\")]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_c('code', [_vm._v(_vm._s(client.secret))])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_c('a', {\\n staticClass: \\\"action-link\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.edit(client)\\n }\\n }\\n }, [_vm._v(\\\"\\\\n Edit\\\\n \\\")])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('td', {\\n staticStyle: {\\n \\\"vertical-align\\\": \\\"middle\\\"\\n }\\n }, [_c('a', {\\n staticClass: \\\"action-link text-danger\\\",\\n on: {\\n \\\"click\\\": function($event) {\\n _vm.destroy(client)\\n }\\n }\\n }, [_vm._v(\\\"\\\\n Delete\\\\n \\\")])])])\\n }))]) : _vm._e()])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal fade\\\",\\n attrs: {\\n \\\"id\\\": \\\"modal-create-client\\\",\\n \\\"tabindex\\\": \\\"-1\\\",\\n \\\"role\\\": \\\"dialog\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"modal-dialog\\\"\\n }, [_c('div', {\\n staticClass: \\\"modal-content\\\"\\n }, [_vm._m(1), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-body\\\"\\n }, [(_vm.createForm.errors.length > 0) ? _c('div', {\\n staticClass: \\\"alert alert-danger\\\"\\n }, [_vm._m(2), _vm._v(\\\" \\\"), _c('br'), _vm._v(\\\" \\\"), _c('ul', _vm._l((_vm.createForm.errors), function(error) {\\n return _c('li', [_vm._v(\\\"\\\\n \\\" + _vm._s(error) + \\\"\\\\n \\\")])\\n }))]) : _vm._e(), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('form', {\\n staticClass: \\\"form-horizontal\\\",\\n attrs: {\\n \\\"role\\\": \\\"form\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-3 control-label\\\"\\n }, [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-7\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.createForm.name),\\n expression: \\\"createForm.name\\\"\\n }],\\n staticClass: \\\"form-control\\\",\\n attrs: {\\n \\\"id\\\": \\\"create-client-name\\\",\\n \\\"type\\\": \\\"text\\\"\\n },\\n domProps: {\\n \\\"value\\\": _vm._s(_vm.createForm.name)\\n },\\n on: {\\n \\\"keyup\\\": function($event) {\\n if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n _vm.store($event)\\n },\\n \\\"input\\\": function($event) {\\n if ($event.target.composing) { return; }\\n _vm.createForm.name = $event.target.value\\n }\\n }\\n }), _vm._v(\\\" \\\"), _c('span', {\\n staticClass: \\\"help-block\\\"\\n }, [_vm._v(\\\"\\\\n Something your users will recognize and trust.\\\\n \\\")])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-3 control-label\\\"\\n }, [_vm._v(\\\"Redirect URL\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-7\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.createForm.redirect),\\n expression: \\\"createForm.redirect\\\"\\n }],\\n staticClass: \\\"form-control\\\",\\n attrs: {\\n \\\"type\\\": \\\"text\\\",\\n \\\"name\\\": \\\"redirect\\\"\\n },\\n domProps: {\\n \\\"value\\\": _vm._s(_vm.createForm.redirect)\\n },\\n on: {\\n \\\"keyup\\\": function($event) {\\n if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n _vm.store($event)\\n },\\n \\\"input\\\": function($event) {\\n if ($event.target.composing) { return; }\\n _vm.createForm.redirect = $event.target.value\\n }\\n }\\n }), _vm._v(\\\" \\\"), _c('span', {\\n staticClass: \\\"help-block\\\"\\n }, [_vm._v(\\\"\\\\n Your application's authorization callback URL.\\\\n \\\")])])])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-footer\\\"\\n }, [_c('button', {\\n staticClass: \\\"btn btn-default\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\",\\n \\\"data-dismiss\\\": \\\"modal\\\"\\n }\\n }, [_vm._v(\\\"Close\\\")]), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-primary\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\"\\n },\\n on: {\\n \\\"click\\\": _vm.store\\n }\\n }, [_vm._v(\\\"\\\\n Create\\\\n \\\")])])])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal fade\\\",\\n attrs: {\\n \\\"id\\\": \\\"modal-edit-client\\\",\\n \\\"tabindex\\\": \\\"-1\\\",\\n \\\"role\\\": \\\"dialog\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"modal-dialog\\\"\\n }, [_c('div', {\\n staticClass: \\\"modal-content\\\"\\n }, [_vm._m(3), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-body\\\"\\n }, [(_vm.editForm.errors.length > 0) ? _c('div', {\\n staticClass: \\\"alert alert-danger\\\"\\n }, [_vm._m(4), _vm._v(\\\" \\\"), _c('br'), _vm._v(\\\" \\\"), _c('ul', _vm._l((_vm.editForm.errors), function(error) {\\n return _c('li', [_vm._v(\\\"\\\\n \\\" + _vm._s(error) + \\\"\\\\n \\\")])\\n }))]) : _vm._e(), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('form', {\\n staticClass: \\\"form-horizontal\\\",\\n attrs: {\\n \\\"role\\\": \\\"form\\\"\\n }\\n }, [_c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-3 control-label\\\"\\n }, [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-7\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.editForm.name),\\n expression: \\\"editForm.name\\\"\\n }],\\n staticClass: \\\"form-control\\\",\\n attrs: {\\n \\\"id\\\": \\\"edit-client-name\\\",\\n \\\"type\\\": \\\"text\\\"\\n },\\n domProps: {\\n \\\"value\\\": _vm._s(_vm.editForm.name)\\n },\\n on: {\\n \\\"keyup\\\": function($event) {\\n if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n _vm.update($event)\\n },\\n \\\"input\\\": function($event) {\\n if ($event.target.composing) { return; }\\n _vm.editForm.name = $event.target.value\\n }\\n }\\n }), _vm._v(\\\" \\\"), _c('span', {\\n staticClass: \\\"help-block\\\"\\n }, [_vm._v(\\\"\\\\n Something your users will recognize and trust.\\\\n \\\")])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"form-group\\\"\\n }, [_c('label', {\\n staticClass: \\\"col-md-3 control-label\\\"\\n }, [_vm._v(\\\"Redirect URL\\\")]), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"col-md-7\\\"\\n }, [_c('input', {\\n directives: [{\\n name: \\\"model\\\",\\n rawName: \\\"v-model\\\",\\n value: (_vm.editForm.redirect),\\n expression: \\\"editForm.redirect\\\"\\n }],\\n staticClass: \\\"form-control\\\",\\n attrs: {\\n \\\"type\\\": \\\"text\\\",\\n \\\"name\\\": \\\"redirect\\\"\\n },\\n domProps: {\\n \\\"value\\\": _vm._s(_vm.editForm.redirect)\\n },\\n on: {\\n \\\"keyup\\\": function($event) {\\n if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n _vm.update($event)\\n },\\n \\\"input\\\": function($event) {\\n if ($event.target.composing) { return; }\\n _vm.editForm.redirect = $event.target.value\\n }\\n }\\n }), _vm._v(\\\" \\\"), _c('span', {\\n staticClass: \\\"help-block\\\"\\n }, [_vm._v(\\\"\\\\n Your application's authorization callback URL.\\\\n \\\")])])])])]), _vm._v(\\\" \\\"), _vm._v(\\\" \\\"), _c('div', {\\n staticClass: \\\"modal-footer\\\"\\n }, [_c('button', {\\n staticClass: \\\"btn btn-default\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\",\\n \\\"data-dismiss\\\": \\\"modal\\\"\\n }\\n }, [_vm._v(\\\"Close\\\")]), _vm._v(\\\" \\\"), _c('button', {\\n staticClass: \\\"btn btn-primary\\\",\\n attrs: {\\n \\\"type\\\": \\\"button\\\"\\n },\\n on: {\\n \\\"click\\\": _vm.update\\n }\\n }, [_vm._v(\\\"\\\\n Save Changes\\\\n \\\")])])])])])])\\n},staticRenderFns: [function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('thead', [_c('tr', [_c('th', [_vm._v(\\\"Client ID\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Name\\\")]), _vm._v(\\\" \\\"), _c('th', [_vm._v(\\\"Secret\\\")]), _vm._v(\\\" \\\"), _c('th'), _vm._v(\\\" \\\"), _c('th')])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"modal-header\\\"\\n }, [_c('button', {\\n staticClass: \\\"close\\\",\\n attrs: {\\n \\\"type\\\": \\\"button \\\",\\n \\\"data-dismiss\\\": \\\"modal\\\",\\n \\\"aria-hidden\\\": \\\"true\\\"\\n }\\n }, [_vm._v(\\\"×\\\")]), _vm._v(\\\" \\\"), _c('h4', {\\n staticClass: \\\"modal-title\\\"\\n }, [_vm._v(\\\"\\\\n Create Client\\\\n \\\")])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('p', [_c('strong', [_vm._v(\\\"Whoops!\\\")]), _vm._v(\\\" Something went wrong!\\\")])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('div', {\\n staticClass: \\\"modal-header\\\"\\n }, [_c('button', {\\n staticClass: \\\"close\\\",\\n attrs: {\\n \\\"type\\\": \\\"button \\\",\\n \\\"data-dismiss\\\": \\\"modal\\\",\\n \\\"aria-hidden\\\": \\\"true\\\"\\n }\\n }, [_vm._v(\\\"×\\\")]), _vm._v(\\\" \\\"), _c('h4', {\\n staticClass: \\\"modal-title\\\"\\n }, [_vm._v(\\\"\\\\n Edit Client\\\\n \\\")])])\\n},function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('p', [_c('strong', [_vm._v(\\\"Whoops!\\\")]), _vm._v(\\\" Something went wrong!\\\")])\\n}]}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-e9c80318\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQ2xpZW50cy52dWU/NDBlNyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cz17cmVuZGVyOmZ1bmN0aW9uICgpe3ZhciBfdm09dGhpczt2YXIgX2g9X3ZtLiRjcmVhdGVFbGVtZW50O3ZhciBfYz1fdm0uX3NlbGYuX2N8fF9oO1xuICByZXR1cm4gX2MoJ2RpdicsIFtfYygnZGl2Jywge1xuICAgIHN0YXRpY0NsYXNzOiBcInBhbmVsIHBhbmVsLWRlZmF1bHRcIlxuICB9LCBbX2MoJ2RpdicsIHtcbiAgICBzdGF0aWNDbGFzczogXCJwYW5lbC1oZWFkaW5nXCJcbiAgfSwgW19jKCdkaXYnLCB7XG4gICAgc3RhdGljU3R5bGU6IHtcbiAgICAgIFwiZGlzcGxheVwiOiBcImZsZXhcIixcbiAgICAgIFwianVzdGlmeS1jb250ZW50XCI6IFwic3BhY2UtYmV0d2VlblwiLFxuICAgICAgXCJhbGlnbi1pdGVtc1wiOiBcImNlbnRlclwiXG4gICAgfVxuICB9LCBbX2MoJ3NwYW4nLCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICBPQXV0aCBDbGllbnRzXFxuICAgICAgICAgICAgICAgIFwiKV0pLCBfdm0uX3YoXCIgXCIpLCBfYygnYScsIHtcbiAgICBzdGF0aWNDbGFzczogXCJhY3Rpb24tbGlua1wiLFxuICAgIG9uOiB7XG4gICAgICBcImNsa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ge1xuICAgICAgICBcInZlcnRpY2FsLWFsaWduXCI6IFwibWlkZGxlXCJcbiAgICAgIH1cbiAgICB9LCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiICsgX3ZtLl9zKGNsaWVudC5uYW1lKSArIFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgXCIpXSksIF92bS5fdihcIiBcIiksIF92bS5fdihcIiBcIiksIF9jKCd0ZCcsIHtcbiAgICAgIHN0YXRpY1N0eWxlOiB7XG4gICAgICAgIFwidmVydGljYWwtYWxpZ25cIjogXCJtaWRkbGVcIlxuICAgICAgfVxuICAgIH0sIFtfYygnY29kZScsIFtfdm0uX3YoX3ZtLl9zKGNsaWVudC5zZWNyZXQpKV0pXSksIF92bS5fdihcIiBcIiksIF92bS5fdihcIiBcIiksIF9jKCd0ZCcsIHtcbiAgICAgIHN0YXRpY1N0eWxlOiB7XG4gICAgICAgIFwidmVydGljYWwtYWxpZ25cIjogXCJtaWRkbGVcIlxuICAgICAgfVxuICAgIH0sIFtfYygnYScsIHtcbiAgICAgIHN0YXRpY0NsYXNzOiBcImFjdGlvbi1saW5rXCIsXG4gICAgICBvbjoge1xuICAgICAgICBcImNsaWNrXCI6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICAgIF92bS5lZGl0KGNsaWVudClcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sIFtfdm0uX3YoXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVkaXRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIpXSldKSwgX3ZtLl92KFwiIFwiKSwgX3ZtLl92KFwiIFwiKSwgX2MoJ3RkJywge1xuICAgICAgc3RhdGljU3R5bGU6IHtcbiAgICAgICAgXCJ2ZXJ0aWNhbC1hbGlnblwiOiBcIm1pZGRsZVwiXG4gICAgICB9XG4gICAgfSwgW19jKCdhJywge1xuICAgICAgc3RhdGljQ2xhc3M6IFwiYWN0aW9uLWx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Jtb2RlbFwiLFxuICAgICAgcmF3TmFtZTogXCJ2LW1vZGVsXCIsXG4gICAgICB2YWx1ZTogKF92bS5jcmVhdGVGb3JtLnJlZGlyZWN0KSxcbiAgICAgIGV4cHJlc3Npb246IFwiY3JlYXRlRm9ybS5yZWRpcmVjdFwiXG4gICAgfV0sXG4gICAgc3RhdGljQ2xhc3M6IFwiZm9ybS1jb250cm9sXCIsXG4gICAgYXR0cnM6IHtcbiAgICAgIFwidHlwZVwiOiBcInRleHRcIixcbiAgICAgIFwibmFtZVwiOiBcInJlZGlyZWN0XCJcbiAgICB9LFxuICAgIGRvbVByb3BzOiB7XG4gICAgICBcInZhbHVlXCI6IF92bS5fcyhfdm0uY3JlYXRlRm9ybS5yZWRpcmVjdClcbiAgICB9LFxuICAgIG9uOiB7XG4gICAgICBcImtleXVwXCI6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICBpZiAoX3ZtLl9rKCRldmVudC5rZXlDb2RlLCBcImVudGVyXCIsIDEzKSkgeyByZXR1cm47IH1cbiAgICAgICAgX3ZtLnN0b3JlKCRldmVudClcbiAgICAgIH0sXG4gICAgICBcImlucHV0XCI6IGZ1bmN0aW9uKCRldmVudCkge1xuICAgICAgICBpZiAoJGV2ZW50LnRhcmdldC5jb21wb3NpbmcpIHsgcmV0dXJuOyB9XG4gICAgICAgIF92bS5jcmVhdGVGb3JtLnJlZGlyZWN0ID0gJGV2ZW50LnRhcmdldC52YWx1ZVxuICAgICAgfVxuICAgIH1cbiAgfSksIF92bS5fdihcIiBcIiksIF9jKCdzcGFuJywge1xuICAgIHN0YXRpY0NsYXNzOiBcImhlbHAtYmxvY2tcIlxuICB9LCBbX3ZtLl92KFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWW91ciBhcHBsaWNhdGlvbidzIGF1dGhvcml6YXRpb24gY2FsbGJhY2sgVVJMLlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCIpXSldKV0pXSldKSw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0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;\\n return _c('select', {\\n staticStyle: {\\n \\\"width\\\": \\\"100%\\\"\\n }\\n }, [_vm._t(\\\"default\\\")], true)\\n},staticRenderFns: []}\\nmodule.exports.render._withStripped = true\\nif (false) {\\n module.hot.accept()\\n if (module.hot.data) {\\n require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-ff564a86\\\", module.exports)\\n }\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvd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tBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 41 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(19);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"01369aba\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-225778c2&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./PersonalAccessTokens.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-225778c2&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./PersonalAccessTokens.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvUGVyc29uYWxBY2Nlc3NUb2tlbnMudnVlP2IzYzgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gc3R5bGUtbG9hZGVyOiBBZGRzIHNvbWUgY3NzIHRvIHRoZSBET00gYnkgYWRkaW5nIGEgPHN0eWxlPiB0YWdcblxuLy8gbG9hZCB0aGUgc3R5bGVzXG52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0sgRk9PVEVSXG4vLyAuL34vdnVlLWxvYWRlci9+L3Z1ZS1zdHlsZS1sb2FkZXIhLi9+L2Nzcy1sb2FkZXI/c291cmNlTWFwIS4vfi92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlci5qcz9pZD1kYXRhLXYtMjI1Nzc4YzImc2NvcGVkPXRydWUhLi9+L3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvUGVyc29uYWxBY2Nlc3NUb2tlbnMudnVlXG4vLyBtb2R1bGUgaWQgPSA0MVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(20);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"2d9fd61e\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../node_modules/css-loader/index.js?sourceMap!./../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-3edef3ba&scoped=true!./../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./alert.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../node_modules/css-loader/index.js?sourceMap!./../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-3edef3ba&scoped=true!./../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./alert.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlPzYwZjEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gc3R5bGUtbG9hZGVyOiBBZGRzIHNvbWUgY3NzIHRvIHRoZSBET00gYnkgYWRkaW5nIGEgPHN0eWxlPiB0YWdcblxuLy8gbG9hZCB0aGUgc3R5bGVzXG52YXIgY29udGVudCA9IHJlcXVpcmUoXCIhIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/c291cmNlTWFwIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi0zZWRlZjNiYSZzY29wZWQ9dHJ1ZSEuLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXN0eWxlcyZpbmRleD0wIS4vYWxlcnQudnVlXCIpO1xuaWYodHlwZW9mIGNvbnRlbnQgPT09ICdzdHJpbmcnKSBjb250ZW50ID0gW1ttb2R1bGUuaWQsIGNvbnRlbnQsICcnXV07XG5pZihjb250ZW50LmxvY2FscykgbW9kdWxlLmV4cG9ydHMgPSBjb250ZW50LmxvY2Fscztcbi8vIGFkZCB0aGUgc3R5bGVzIHRvIHRoZSBET01cbnZhciB1cGRhdGUgPSByZXF1aXJlKFw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4vYWxlcnQudnVlXCIpO1xuICAgICBpZih0eXBlb2YgbmV3Q29udGVudCA9PT0gJ3N0cmluZycpIG5ld0NvbnRlbnQgPSBbW21vZHVsZS5pZCwgbmV3Q29udGVudCwgJyddXTtcbiAgICAgdXBkYXRlKG5ld0NvbnRlbnQpO1xuICAgfSk7XG4gfVxuIC8vIFdoZW4gdGhlIG1vZHVsZSBpcyBkaXNwb3NlZCwgcmVtb3ZlIHRoZSA8c3R5bGU+IHRhZ3NcbiBtb2R1bGUuaG90LmRpc3Bvc2UoZnVuY3Rpb24oKSB7IHVwZGF0ZSgpOyB9KTtcbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vdnVlLWxvYWRlci9+L3Z1ZS1zdHlsZS1sb2FkZXIhLi9+L2Nzcy1sb2FkZXI/c291cmNlTWFwIS4vfi92dWUtbG9hZGVyL2xpYi9zdHlsZS1yZXdyaXRlci5qcz9pZD1kYXRhLXYtM2VkZWYzYmEmc2NvcGVkPXRydWUhLi9+L3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvYWxlcnQudnVlXG4vLyBtb2R1bGUgaWQgPSA0MlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 43 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(21);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"1a2fffe5\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5301a236&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./importer.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5301a236&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./importer.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXIudnVlP2E2NjkiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gc3R5bGUtbG9hZGVyOiBBZGRzIHNvbWUgY3NzIHRvIHRoZSBET00gYnkgYWRkaW5nIGEgPHN0eWxlPiB0YWdcblxuLy8gbG9hZCB0aGUgc3R5bGVzXG52YXIgY29udGVudCA9IHJlcXVpcmUoXCIhIS4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/c291cmNlTWFwIS4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi01MzA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ZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvaW1wb3J0ZXIvaW1wb3J0ZXIudnVlXG4vLyBtb2R1bGUgaWQgPSA0M1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(22);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"410ebe92\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5667c312&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./importer-errors.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5667c312&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./importer-errors.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9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xuIH1cbiAvLyBXaGVuIHRoZSBtb2R1bGUgaXMgZGlzcG9zZWQsIHJlbW92ZSB0aGUgPHN0eWxlPiB0YWdzXG4gbW9kdWxlLmhvdC5kaXNwb3NlKGZ1bmN0aW9uKCkgeyB1cGRhdGUoKTsgfSk7XG59XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L3Z1ZS1sb2FkZXIvfi92dWUtc3R5bGUtbG9hZGVyIS4vfi9jc3MtbG9hZGVyP3NvdXJjZU1hcCEuL34vdnVlLWxvYWRlci9saWIvc3R5bGUtcmV3cml0ZXIuanM/aWQ9ZGF0YS12LTU2NjdjMzEyJnNjb3BlZD10cnVlIS4vfi92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXN0eWxlcyZpbmRleD0wIS4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9jb21wb25lbnRzL2ltcG9ydGVyL2ltcG9ydGVyLWVycm9ycy52dWVcbi8vIG1vZHVsZSBpZCA9IDQ0XG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 45 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(23);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"bdf57390\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-de0d0e4e&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./AuthorizedClients.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-de0d0e4e&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./AuthorizedClients.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQXV0aG9yaXplZENsaWVudHMudnVlP2U3YjciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gc3R5bGUtbG9hZGVyOiBBZGRzIHNvbWUgY3NzIHRvIHRoZSBET00gYnkgYWRkaW5nIGEgPHN0eWxlPiB0YWdcblxuLy8gbG9hZCB0aGUgc3R5bGVzXG52YXIgY29udGVudCA9IHJlcXVpcmUoXCIhIS4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/c291cmNlTWFwIS4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi1kZTBkMGU0ZSZzY29wZWQ9dHJ1ZSEuLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXN0eWxlcyZpbmRleD0wIS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0NVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\");\n\n/***/ },\n/* 46 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(24);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"09f161b5\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-e9c80318&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Clients.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../../node_modules/css-loader/index.js?sourceMap!./../../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-e9c80318&scoped=true!./../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Clients.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvcGFzc3BvcnQvQ2xpZW50cy52dWU/MmE0YyJdLCJzb3VyY2VzQ29udGV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i8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi92dWUtbG9hZGVyL34vdnVlLXN0eWxlLWxvYWRlciEuL34vY3NzLWxvYWRlcj9zb3VyY2VNYXAhLi9+L3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi1lOWM4MDMxOCZzY29wZWQ9dHJ1ZSEuL34vdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9wYXNzcG9ydC9DbGllbnRzLnZ1ZVxuLy8gbW9kdWxlIGlkID0gNDZcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 47 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\n// load the styles\\nvar content = __webpack_require__(25);\\nif(typeof content === 'string') content = [[module.i, content, '']];\\nif(content.locals) module.exports = content.locals;\\n// add the styles to the DOM\\nvar update = __webpack_require__(2)(\\\"7bb5c312\\\", content, false);\\n// Hot Module Replacement\\nif(false) {\\n // When the styles change, update the <style> tags\\n if(!content.locals) {\\n module.hot.accept(\\\"!!./../../../../node_modules/css-loader/index.js?sourceMap!./../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-ff564a86&scoped=true!./../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./select2.vue\\\", function() {\\n var newContent = require(\\\"!!./../../../../node_modules/css-loader/index.js?sourceMap!./../../../../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-ff564a86&scoped=true!./../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./select2.vue\\\");\\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n update(newContent);\\n });\\n }\\n // When the module is disposed, remove the <style> tags\\n module.hot.dispose(function() { update(); });\\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL2NvbXBvbmVudHMvc2VsZWN0Mi52dWU/MmZhMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBzdHlsZS1sb2FkZXI6IEFkZHMgc29tZSBjc3MgdG8gdGhlIERPTSBieSBhZGRpbmcgYSA8c3R5bGU+IHRhZ1xuXG4vLyBsb2FkIHRoZSBzdHlsZXNcbnZhciBjb250ZW50ID0gcmVxdWlyZShcIiEhLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvY3NzLWxvYWRlci9pbmRleC5qcz9zb3VyY2VNYXAhLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc3R5bGUtcmV3cml0ZXIuanM/aWQ9ZGF0YS12LWZmNTY0YTg2JnNjb3BlZD10cnVlIS4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3NlbGVjdG9yLmpzP3R5cGU9c3R5bGVzJmluZGV4PTAhLi9zZWxlY3QyLnZ1ZVwiKTtcbmlmKHR5cGVvZiBjb250ZW50ID09PSAnc3RyaW5nJykgY29udGVudCA9IFtbbW9kdWxlLmlkLCBjb250ZW50LCAnJ11dO1xuaWYoY29udGVudC5sb2NhbHMpIG1vZHVsZS5leHBvcnRzID0gY29udGVudC5sb2NhbHM7XG4vLyBhZGQgdGhlIHN0eWxlcyB0byB0aGUgRE9NXG52YXIgdXBkYX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4vc2VsZWN0Mi52dWVcIik7XG4gICAgIGlmKHR5cGVvZiBuZXdDb250ZW50ID09PSAnc3RyaW5nJykgbmV3Q29udGVudCA9IFtbbW9kdWxlLmlkLCBuZXdDb250ZW50LCAnJ11dO1xuICAgICB1cGRhdGUobmV3Q29udGVudCk7XG4gICB9KTtcbiB9XG4gLy8gV2hlbiB0aGUgbW9kdWxlIGlzIGRpc3Bvc2VkLCByZW1vdmUgdGhlIDxzdHlsZT4gdGFnc1xuIG1vZHVsZS5ob3QuZGlzcG9zZShmdW5jdGlvbigpIHsgdXBkYXRlKCk7IH0pO1xufVxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vfi92dWUtbG9hZGVyL34vdnVlLXN0eWxlLWxvYWRlciEuL34vY3NzLWxvYWRlcj9zb3VyY2VNYXAhLi9+L3Z1ZS1sb2FkZXIvbGliL3N0eWxlLXJld3JpdGVyLmpzP2lkPWRhdGEtdi1mZjU2NGE4NiZzY29wZWQ9dHJ1ZSEuL34vdnVlLWxvYWRlci9saWIvc2VsZWN0b3IuanM/dHlwZT1zdHlsZXMmaW5kZXg9MCEuL3Jlc291cmNlcy9hc3NldHMvanMvY29tcG9uZW50cy9zZWxlY3QyLnZ1ZVxuLy8gbW9kdWxlIGlkID0gNDdcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 48 */\n/***/ function(module, exports) {\n\neval(\"/**\\n * Translates the list format produced by css-loader into something\\n * easier to manipulate.\\n */\\nmodule.exports = function listToStyles (parentId, list) {\\n var styles = []\\n var newStyles = {}\\n for (var i = 0; i < list.length; i++) {\\n var item = list[i]\\n var id = item[0]\\n var css = item[1]\\n var media = item[2]\\n var sourceMap = item[3]\\n var part = {\\n id: parentId + ':' + i,\\n css: css,\\n media: media,\\n sourceMap: sourceMap\\n }\\n if (!newStyles[id]) {\\n styles.push(newStyles[id] = { id: id, parts: [part] })\\n } else {\\n newStyles[id].parts.push(part)\\n }\\n }\\n return styles\\n}\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L3Z1ZS1sb2FkZXIvfi92dWUtc3R5bGUtbG9hZGVyL2xpYi9saXN0VG9TdHlsZXMuanM/YTA4MiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRyYW5zbGF0ZXMgdGhlIGxpc3QgZm9ybWF0IHByb2R1Y2VkIGJ5IGNzcy1sb2FkZXIgaW50byBzb21ldGhpbmdcbiAqIGVhc2llciB0byBtYW5pcHVsYXRlLlxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGxpc3RUb1N0eWxlcyAocGFyZW50SWQsIGxpc3QpIHtcbiAgdmFyIHN0eWxlcyA9IFtdXG4gIHZhciBuZXdTdHlsZXMgPSB7fVxuICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcbiAgICB2YXIgaXRlbSA9IGxpc3RbaV1cbiAgICB2YXIgaWQgPSBpdGVtWzBdXG4gICAgdmFyIGNzcyA9IGl0ZW1bMV1cbiAgICB2YXIgbWVkaWEgPSBpdGVtWzJdXG4gICAgdmFyIHNvdXJjZU1hcCA9IGl0ZW1bM11cbiAgICB2YXIgcGFydCA9IHtcbiAgICAgIGlkOiBwYXJlbnRJZCArICc6JyArIGksXG4gICAgICBjc3M6IGNzcyxcbiAgICAgIG1lZGlhOiBtZWRpYSxcbiAgICAgIHNvdXJjZU1hcDogc291cmNlTWFwXG4gICAgfVxuICAgIGlmICghbmV3U3R5bGVzW2lkXSkge1xuICAgICAgc3R5bGVzLnB1c2gobmV3U3R5bGVzW2lkXSA9IHsgaWQ6IGlkLCBwYXJ0czogW3BhcnRdIH0pXG4gICAgfSBlbHNlIHtcbiAgICAgIG5ld1N0eWxlc1tpZF0ucGFydHMucHVzaChwYXJ0KVxuICAgIH1cbiAgfVxuICByZXR1cm4gc3R5bGVzXG59XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vdnVlLWxvYWRlci9+L3Z1ZS1zdHlsZS1sb2FkZXIvbGliL2xpc3RUb1N0eWxlcy5qc1xuLy8gbW9kdWxlIGlkID0gNDhcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 49 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\neval(\"/*!\\n * vue-resource v1.2.0\\n * https://github.com/pagekit/vue-resource\\n * Released under the MIT License.\\n */\\n\\n'use strict';\\n\\n/**\\n * Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis)\\n */\\n\\nvar RESOLVED = 0;\\nvar REJECTED = 1;\\nvar PENDING = 2;\\n\\nfunction Promise$1(executor) {\\n\\n this.state = PENDING;\\n this.value = undefined;\\n this.deferred = [];\\n\\n var promise = this;\\n\\n try {\\n executor(function (x) {\\n promise.resolve(x);\\n }, function (r) {\\n promise.reject(r);\\n });\\n } catch (e) {\\n promise.reject(e);\\n }\\n}\\n\\nPromise$1.reject = function (r) {\\n return new Promise$1(function (resolve, reject) {\\n reject(r);\\n });\\n};\\n\\nPromise$1.resolve = function (x) {\\n return new Promise$1(function (resolve, reject) {\\n resolve(x);\\n });\\n};\\n\\nPromise$1.all = function all(iterable) {\\n return new Promise$1(function (resolve, reject) {\\n var count = 0, result = [];\\n\\n if (iterable.length === 0) {\\n resolve(result);\\n }\\n\\n function resolver(i) {\\n return function (x) {\\n result[i] = x;\\n count += 1;\\n\\n if (count === iterable.length) {\\n resolve(result);\\n }\\n };\\n }\\n\\n for (var i = 0; i < iterable.length; i += 1) {\\n Promise$1.resolve(iterable[i]).then(resolver(i), reject);\\n }\\n });\\n};\\n\\nPromise$1.race = function race(iterable) {\\n return new Promise$1(function (resolve, reject) {\\n for (var i = 0; i < iterable.length; i += 1) {\\n Promise$1.resolve(iterable[i]).then(resolve, reject);\\n }\\n });\\n};\\n\\nvar p$1 = Promise$1.prototype;\\n\\np$1.resolve = function resolve(x) {\\n var promise = this;\\n\\n if (promise.state === PENDING) {\\n if (x === promise) {\\n throw new TypeError('Promise settled with itself.');\\n }\\n\\n var called = false;\\n\\n try {\\n var then = x && x['then'];\\n\\n if (x !== null && typeof x === 'object' && typeof then === 'function') {\\n then.call(x, function (x) {\\n if (!called) {\\n promise.resolve(x);\\n }\\n called = true;\\n\\n }, function (r) {\\n if (!called) {\\n promise.reject(r);\\n }\\n called = true;\\n });\\n return;\\n }\\n } catch (e) {\\n if (!called) {\\n promise.reject(e);\\n }\\n return;\\n }\\n\\n promise.state = RESOLVED;\\n promise.value = x;\\n promise.notify();\\n }\\n};\\n\\np$1.reject = function reject(reason) {\\n var promise = this;\\n\\n if (promise.state === PENDING) {\\n if (reason === promise) {\\n throw new TypeError('Promise settled with itself.');\\n }\\n\\n promise.state = REJECTED;\\n promise.value = reason;\\n promise.notify();\\n }\\n};\\n\\np$1.notify = function notify() {\\n var promise = this;\\n\\n nextTick(function () {\\n if (promise.state !== PENDING) {\\n while (promise.deferred.length) {\\n var deferred = promise.deferred.shift(),\\n onResolved = deferred[0],\\n onRejected = deferred[1],\\n resolve = deferred[2],\\n reject = deferred[3];\\n\\n try {\\n if (promise.state === RESOLVED) {\\n if (typeof onResolved === 'function') {\\n resolve(onResolved.call(undefined, promise.value));\\n } else {\\n resolve(promise.value);\\n }\\n } else if (promise.state === REJECTED) {\\n if (typeof onRejected === 'function') {\\n resolve(onRejected.call(undefined, promise.value));\\n } else {\\n reject(promise.value);\\n }\\n }\\n } catch (e) {\\n reject(e);\\n }\\n }\\n }\\n });\\n};\\n\\np$1.then = function then(onResolved, onRejected) {\\n var promise = this;\\n\\n return new Promise$1(function (resolve, reject) {\\n promise.deferred.push([onResolved, onRejected, resolve, reject]);\\n promise.notify();\\n });\\n};\\n\\np$1.catch = function (onRejected) {\\n return this.then(undefined, onRejected);\\n};\\n\\n/**\\n * Promise adapter.\\n */\\n\\nif (typeof Promise === 'undefined') {\\n window.Promise = Promise$1;\\n}\\n\\nfunction PromiseObj(executor, context) {\\n\\n if (executor instanceof Promise) {\\n this.promise = executor;\\n } else {\\n this.promise = new Promise(executor.bind(context));\\n }\\n\\n this.context = context;\\n}\\n\\nPromiseObj.all = function (iterable, context) {\\n return new PromiseObj(Promise.all(iterable), context);\\n};\\n\\nPromiseObj.resolve = function (value, context) {\\n return new PromiseObj(Promise.resolve(value), context);\\n};\\n\\nPromiseObj.reject = function (reason, context) {\\n return new PromiseObj(Promise.reject(reason), context);\\n};\\n\\nPromiseObj.race = function (iterable, context) {\\n return new PromiseObj(Promise.race(iterable), context);\\n};\\n\\nvar p = PromiseObj.prototype;\\n\\np.bind = function (context) {\\n this.context = context;\\n return this;\\n};\\n\\np.then = function (fulfilled, rejected) {\\n\\n if (fulfilled && fulfilled.bind && this.context) {\\n fulfilled = fulfilled.bind(this.context);\\n }\\n\\n if (rejected && rejected.bind && this.context) {\\n rejected = rejected.bind(this.context);\\n }\\n\\n return new PromiseObj(this.promise.then(fulfilled, rejected), this.context);\\n};\\n\\np.catch = function (rejected) {\\n\\n if (rejected && rejected.bind && this.context) {\\n rejected = rejected.bind(this.context);\\n }\\n\\n return new PromiseObj(this.promise.catch(rejected), this.context);\\n};\\n\\np.finally = function (callback) {\\n\\n return this.then(function (value) {\\n callback.call(this);\\n return value;\\n }, function (reason) {\\n callback.call(this);\\n return Promise.reject(reason);\\n }\\n );\\n};\\n\\n/**\\n * Utility functions.\\n */\\n\\nvar debug = false;\\nvar util = {};\\nvar ref = {};\\nvar hasOwnProperty = ref.hasOwnProperty;\\n\\nvar ref$1 = [];\\nvar slice = ref$1.slice;\\n\\nvar inBrowser = typeof window !== 'undefined';\\n\\nvar Util = function (Vue) {\\n util = Vue.util;\\n debug = Vue.config.debug || !Vue.config.silent;\\n};\\n\\nfunction warn(msg) {\\n if (typeof console !== 'undefined' && debug) {\\n console.warn('[VueResource warn]: ' + msg);\\n }\\n}\\n\\nfunction error(msg) {\\n if (typeof console !== 'undefined') {\\n console.error(msg);\\n }\\n}\\n\\nfunction nextTick(cb, ctx) {\\n return util.nextTick(cb, ctx);\\n}\\n\\nfunction trim(str) {\\n return str ? str.replace(/^\\\\s*|\\\\s*$/g, '') : '';\\n}\\n\\nfunction toLower(str) {\\n return str ? str.toLowerCase() : '';\\n}\\n\\nfunction toUpper(str) {\\n return str ? str.toUpperCase() : '';\\n}\\n\\nvar isArray = Array.isArray;\\n\\nfunction isString(val) {\\n return typeof val === 'string';\\n}\\n\\n\\n\\nfunction isFunction(val) {\\n return typeof val === 'function';\\n}\\n\\nfunction isObject(obj) {\\n return obj !== null && typeof obj === 'object';\\n}\\n\\nfunction isPlainObject(obj) {\\n return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype;\\n}\\n\\nfunction isBlob(obj) {\\n return typeof Blob !== 'undefined' && obj instanceof Blob;\\n}\\n\\nfunction isFormData(obj) {\\n return typeof FormData !== 'undefined' && obj instanceof FormData;\\n}\\n\\nfunction when(value, fulfilled, rejected) {\\n\\n var promise = PromiseObj.resolve(value);\\n\\n if (arguments.length < 2) {\\n return promise;\\n }\\n\\n return promise.then(fulfilled, rejected);\\n}\\n\\nfunction options(fn, obj, opts) {\\n\\n opts = opts || {};\\n\\n if (isFunction(opts)) {\\n opts = opts.call(obj);\\n }\\n\\n return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts});\\n}\\n\\nfunction each(obj, iterator) {\\n\\n var i, key;\\n\\n if (isArray(obj)) {\\n for (i = 0; i < obj.length; i++) {\\n iterator.call(obj[i], obj[i], i);\\n }\\n } else if (isObject(obj)) {\\n for (key in obj) {\\n if (hasOwnProperty.call(obj, key)) {\\n iterator.call(obj[key], obj[key], key);\\n }\\n }\\n }\\n\\n return obj;\\n}\\n\\nvar assign = Object.assign || _assign;\\n\\nfunction merge(target) {\\n\\n var args = slice.call(arguments, 1);\\n\\n args.forEach(function (source) {\\n _merge(target, source, true);\\n });\\n\\n return target;\\n}\\n\\nfunction defaults(target) {\\n\\n var args = slice.call(arguments, 1);\\n\\n args.forEach(function (source) {\\n\\n for (var key in source) {\\n if (target[key] === undefined) {\\n target[key] = source[key];\\n }\\n }\\n\\n });\\n\\n return target;\\n}\\n\\nfunction _assign(target) {\\n\\n var args = slice.call(arguments, 1);\\n\\n args.forEach(function (source) {\\n _merge(target, source);\\n });\\n\\n return target;\\n}\\n\\nfunction _merge(target, source, deep) {\\n for (var key in source) {\\n if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\\n if (isPlainObject(source[key]) && !isPlainObject(target[key])) {\\n target[key] = {};\\n }\\n if (isArray(source[key]) && !isArray(target[key])) {\\n target[key] = [];\\n }\\n _merge(target[key], source[key], deep);\\n } else if (source[key] !== undefined) {\\n target[key] = source[key];\\n }\\n }\\n}\\n\\n/**\\n * Root Prefix Transform.\\n */\\n\\nvar root = function (options$$1, next) {\\n\\n var url = next(options$$1);\\n\\n if (isString(options$$1.root) && !url.match(/^(https?:)?\\\\//)) {\\n url = options$$1.root + '/' + url;\\n }\\n\\n return url;\\n};\\n\\n/**\\n * Query Parameter Transform.\\n */\\n\\nvar query = function (options$$1, next) {\\n\\n var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1);\\n\\n each(options$$1.params, function (value, key) {\\n if (urlParams.indexOf(key) === -1) {\\n query[key] = value;\\n }\\n });\\n\\n query = Url.params(query);\\n\\n if (query) {\\n url += (url.indexOf('?') == -1 ? '?' : '&') + query;\\n }\\n\\n return url;\\n};\\n\\n/**\\n * URL Template v2.0.6 (https://github.com/bramstein/url-template)\\n */\\n\\nfunction expand(url, params, variables) {\\n\\n var tmpl = parse(url), expanded = tmpl.expand(params);\\n\\n if (variables) {\\n variables.push.apply(variables, tmpl.vars);\\n }\\n\\n return expanded;\\n}\\n\\nfunction parse(template) {\\n\\n var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = [];\\n\\n return {\\n vars: variables,\\n expand: function expand(context) {\\n return template.replace(/\\\\{([^\\\\{\\\\}]+)\\\\}|([^\\\\{\\\\}]+)/g, function (_, expression, literal) {\\n if (expression) {\\n\\n var operator = null, values = [];\\n\\n if (operators.indexOf(expression.charAt(0)) !== -1) {\\n operator = expression.charAt(0);\\n expression = expression.substr(1);\\n }\\n\\n expression.split(/,/g).forEach(function (variable) {\\n var tmp = /([^:\\\\*]*)(?::(\\\\d+)|(\\\\*))?/.exec(variable);\\n values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\\n variables.push(tmp[1]);\\n });\\n\\n if (operator && operator !== '+') {\\n\\n var separator = ',';\\n\\n if (operator === '?') {\\n separator = '&';\\n } else if (operator !== '#') {\\n separator = operator;\\n }\\n\\n return (values.length !== 0 ? operator : '') + values.join(separator);\\n } else {\\n return values.join(',');\\n }\\n\\n } else {\\n return encodeReserved(literal);\\n }\\n });\\n }\\n };\\n}\\n\\nfunction getValues(context, operator, key, modifier) {\\n\\n var value = context[key], result = [];\\n\\n if (isDefined(value) && value !== '') {\\n if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\\n value = value.toString();\\n\\n if (modifier && modifier !== '*') {\\n value = value.substring(0, parseInt(modifier, 10));\\n }\\n\\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));\\n } else {\\n if (modifier === '*') {\\n if (Array.isArray(value)) {\\n value.filter(isDefined).forEach(function (value) {\\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null));\\n });\\n } else {\\n Object.keys(value).forEach(function (k) {\\n if (isDefined(value[k])) {\\n result.push(encodeValue(operator, value[k], k));\\n }\\n });\\n }\\n } else {\\n var tmp = [];\\n\\n if (Array.isArray(value)) {\\n value.filter(isDefined).forEach(function (value) {\\n tmp.push(encodeValue(operator, value));\\n });\\n } else {\\n Object.keys(value).forEach(function (k) {\\n if (isDefined(value[k])) {\\n tmp.push(encodeURIComponent(k));\\n tmp.push(encodeValue(operator, value[k].toString()));\\n }\\n });\\n }\\n\\n if (isKeyOperator(operator)) {\\n result.push(encodeURIComponent(key) + '=' + tmp.join(','));\\n } else if (tmp.length !== 0) {\\n result.push(tmp.join(','));\\n }\\n }\\n }\\n } else {\\n if (operator === ';') {\\n result.push(encodeURIComponent(key));\\n } else if (value === '' && (operator === '&' || operator === '?')) {\\n result.push(encodeURIComponent(key) + '=');\\n } else if (value === '') {\\n result.push('');\\n }\\n }\\n\\n return result;\\n}\\n\\nfunction isDefined(value) {\\n return value !== undefined && value !== null;\\n}\\n\\nfunction isKeyOperator(operator) {\\n return operator === ';' || operator === '&' || operator === '?';\\n}\\n\\nfunction encodeValue(operator, value, key) {\\n\\n value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value);\\n\\n if (key) {\\n return encodeURIComponent(key) + '=' + value;\\n } else {\\n return value;\\n }\\n}\\n\\nfunction encodeReserved(str) {\\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\\n if (!/%[0-9A-Fa-f]/.test(part)) {\\n part = encodeURI(part);\\n }\\n return part;\\n }).join('');\\n}\\n\\n/**\\n * URL Template (RFC 6570) Transform.\\n */\\n\\nvar template = function (options) {\\n\\n var variables = [], url = expand(options.url, options.params, variables);\\n\\n variables.forEach(function (key) {\\n delete options.params[key];\\n });\\n\\n return url;\\n};\\n\\n/**\\n * Service for URL templating.\\n */\\n\\nfunction Url(url, params) {\\n\\n var self = this || {}, options$$1 = url, transform;\\n\\n if (isString(url)) {\\n options$$1 = {url: url, params: params};\\n }\\n\\n options$$1 = merge({}, Url.options, self.$options, options$$1);\\n\\n Url.transforms.forEach(function (handler) {\\n transform = factory(handler, transform, self.$vm);\\n });\\n\\n return transform(options$$1);\\n}\\n\\n/**\\n * Url options.\\n */\\n\\nUrl.options = {\\n url: '',\\n root: null,\\n params: {}\\n};\\n\\n/**\\n * Url transforms.\\n */\\n\\nUrl.transforms = [template, query, root];\\n\\n/**\\n * Encodes a Url parameter string.\\n *\\n * @param {Object} obj\\n */\\n\\nUrl.params = function (obj) {\\n\\n var params = [], escape = encodeURIComponent;\\n\\n params.add = function (key, value) {\\n\\n if (isFunction(value)) {\\n value = value();\\n }\\n\\n if (value === null) {\\n value = '';\\n }\\n\\n this.push(escape(key) + '=' + escape(value));\\n };\\n\\n serialize(params, obj);\\n\\n return params.join('&').replace(/%20/g, '+');\\n};\\n\\n/**\\n * Parse a URL and return its components.\\n *\\n * @param {String} url\\n */\\n\\nUrl.parse = function (url) {\\n\\n var el = document.createElement('a');\\n\\n if (document.documentMode) {\\n el.href = url;\\n url = el.href;\\n }\\n\\n el.href = url;\\n\\n return {\\n href: el.href,\\n protocol: el.protocol ? el.protocol.replace(/:$/, '') : '',\\n port: el.port,\\n host: el.host,\\n hostname: el.hostname,\\n pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname,\\n search: el.search ? el.search.replace(/^\\\\?/, '') : '',\\n hash: el.hash ? el.hash.replace(/^#/, '') : ''\\n };\\n};\\n\\nfunction factory(handler, next, vm) {\\n return function (options$$1) {\\n return handler.call(vm, options$$1, next);\\n };\\n}\\n\\nfunction serialize(params, obj, scope) {\\n\\n var array = isArray(obj), plain = isPlainObject(obj), hash;\\n\\n each(obj, function (value, key) {\\n\\n hash = isObject(value) || isArray(value);\\n\\n if (scope) {\\n key = scope + '[' + (plain || hash ? key : '') + ']';\\n }\\n\\n if (!scope && array) {\\n params.add(value.name, value.value);\\n } else if (hash) {\\n serialize(params, value, key);\\n } else {\\n params.add(key, value);\\n }\\n });\\n}\\n\\n/**\\n * XDomain client (Internet Explorer).\\n */\\n\\nvar xdrClient = function (request) {\\n return new PromiseObj(function (resolve) {\\n\\n var xdr = new XDomainRequest(), handler = function (ref) {\\n var type = ref.type;\\n\\n\\n var status = 0;\\n\\n if (type === 'load') {\\n status = 200;\\n } else if (type === 'error') {\\n status = 500;\\n }\\n\\n resolve(request.respondWith(xdr.responseText, {status: status}));\\n };\\n\\n request.abort = function () { return xdr.abort(); };\\n\\n xdr.open(request.method, request.getUrl());\\n\\n if (request.timeout) {\\n xdr.timeout = request.timeout;\\n }\\n\\n xdr.onload = handler;\\n xdr.onabort = handler;\\n xdr.onerror = handler;\\n xdr.ontimeout = handler;\\n xdr.onprogress = function () {};\\n xdr.send(request.getBody());\\n });\\n};\\n\\n/**\\n * CORS Interceptor.\\n */\\n\\nvar SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest();\\n\\nvar cors = function (request, next) {\\n\\n if (inBrowser) {\\n\\n var orgUrl = Url.parse(location.href);\\n var reqUrl = Url.parse(request.getUrl());\\n\\n if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) {\\n\\n request.crossOrigin = true;\\n request.emulateHTTP = false;\\n\\n if (!SUPPORTS_CORS) {\\n request.client = xdrClient;\\n }\\n }\\n }\\n\\n next();\\n};\\n\\n/**\\n * Body Interceptor.\\n */\\n\\nvar body = function (request, next) {\\n\\n if (isFormData(request.body)) {\\n\\n request.headers.delete('Content-Type');\\n\\n } else if (isObject(request.body) || isArray(request.body)) {\\n\\n if (request.emulateJSON) {\\n request.body = Url.params(request.body);\\n request.headers.set('Content-Type', 'application/x-www-form-urlencoded');\\n } else {\\n request.body = JSON.stringify(request.body);\\n }\\n }\\n\\n next(function (response) {\\n\\n Object.defineProperty(response, 'data', {\\n\\n get: function get() {\\n return this.body;\\n },\\n\\n set: function set(body) {\\n this.body = body;\\n }\\n\\n });\\n\\n return response.bodyText ? when(response.text(), function (text) {\\n\\n var type = response.headers.get('Content-Type') || '';\\n\\n if (type.indexOf('application/json') === 0 || isJson(text)) {\\n\\n try {\\n response.body = JSON.parse(text);\\n } catch (e) {\\n response.body = null;\\n }\\n\\n } else {\\n response.body = text;\\n }\\n\\n return response;\\n\\n }) : response;\\n\\n });\\n};\\n\\nfunction isJson(str) {\\n\\n var start = str.match(/^\\\\[|^\\\\{(?!\\\\{)/), end = {'[': /]$/, '{': /}$/};\\n\\n return start && end[start[0]].test(str);\\n}\\n\\n/**\\n * JSONP client (Browser).\\n */\\n\\nvar jsonpClient = function (request) {\\n return new PromiseObj(function (resolve) {\\n\\n var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script;\\n\\n handler = function (ref) {\\n var type = ref.type;\\n\\n\\n var status = 0;\\n\\n if (type === 'load' && body !== null) {\\n status = 200;\\n } else if (type === 'error') {\\n status = 500;\\n }\\n\\n if (status && window[callback]) {\\n delete window[callback];\\n document.body.removeChild(script);\\n }\\n\\n resolve(request.respondWith(body, {status: status}));\\n };\\n\\n window[callback] = function (result) {\\n body = JSON.stringify(result);\\n };\\n\\n request.abort = function () {\\n handler({type: 'abort'});\\n };\\n\\n request.params[name] = callback;\\n\\n if (request.timeout) {\\n setTimeout(request.abort, request.timeout);\\n }\\n\\n script = document.createElement('script');\\n script.src = request.getUrl();\\n script.type = 'text/javascript';\\n script.async = true;\\n script.onload = handler;\\n script.onerror = handler;\\n\\n document.body.appendChild(script);\\n });\\n};\\n\\n/**\\n * JSONP Interceptor.\\n */\\n\\nvar jsonp = function (request, next) {\\n\\n if (request.method == 'JSONP') {\\n request.client = jsonpClient;\\n }\\n\\n next();\\n};\\n\\n/**\\n * Before Interceptor.\\n */\\n\\nvar before = function (request, next) {\\n\\n if (isFunction(request.before)) {\\n request.before.call(this, request);\\n }\\n\\n next();\\n};\\n\\n/**\\n * HTTP method override Interceptor.\\n */\\n\\nvar method = function (request, next) {\\n\\n if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) {\\n request.headers.set('X-HTTP-Method-Override', request.method);\\n request.method = 'POST';\\n }\\n\\n next();\\n};\\n\\n/**\\n * Header Interceptor.\\n */\\n\\nvar header = function (request, next) {\\n\\n var headers = assign({}, Http.headers.common,\\n !request.crossOrigin ? Http.headers.custom : {},\\n Http.headers[toLower(request.method)]\\n );\\n\\n each(headers, function (value, name) {\\n if (!request.headers.has(name)) {\\n request.headers.set(name, value);\\n }\\n });\\n\\n next();\\n};\\n\\n/**\\n * XMLHttp client (Browser).\\n */\\n\\nvar SUPPORTS_BLOB = typeof Blob !== 'undefined' && typeof FileReader !== 'undefined';\\n\\nvar xhrClient = function (request) {\\n return new PromiseObj(function (resolve) {\\n\\n var xhr = new XMLHttpRequest(), handler = function (event) {\\n\\n var response = request.respondWith(\\n 'response' in xhr ? xhr.response : xhr.responseText, {\\n status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug\\n statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText)\\n }\\n );\\n\\n each(trim(xhr.getAllResponseHeaders()).split('\\\\n'), function (row) {\\n response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1));\\n });\\n\\n resolve(response);\\n };\\n\\n request.abort = function () { return xhr.abort(); };\\n\\n if (request.progress) {\\n if (request.method === 'GET') {\\n xhr.addEventListener('progress', request.progress);\\n } else if (/^(POST|PUT)$/i.test(request.method)) {\\n xhr.upload.addEventListener('progress', request.progress);\\n }\\n }\\n\\n xhr.open(request.method, request.getUrl(), true);\\n\\n if (request.timeout) {\\n xhr.timeout = request.timeout;\\n }\\n\\n if (request.credentials === true) {\\n xhr.withCredentials = true;\\n }\\n\\n if (!request.crossOrigin) {\\n request.headers.set('X-Requested-With', 'XMLHttpRequest');\\n }\\n\\n if ('responseType' in xhr && SUPPORTS_BLOB) {\\n xhr.responseType = 'blob';\\n }\\n\\n request.headers.forEach(function (value, name) {\\n xhr.setRequestHeader(name, value);\\n });\\n\\n xhr.onload = handler;\\n xhr.onabort = handler;\\n xhr.onerror = handler;\\n xhr.ontimeout = handler;\\n xhr.send(request.getBody());\\n });\\n};\\n\\n/**\\n * Http client (Node).\\n */\\n\\nvar nodeClient = function (request) {\\n\\n var client = __webpack_require__(52);\\n\\n return new PromiseObj(function (resolve) {\\n\\n var url = request.getUrl();\\n var body = request.getBody();\\n var method = request.method;\\n var headers = {}, handler;\\n\\n request.headers.forEach(function (value, name) {\\n headers[name] = value;\\n });\\n\\n client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) {\\n\\n var response = request.respondWith(resp.body, {\\n status: resp.statusCode,\\n statusText: trim(resp.statusMessage)\\n }\\n );\\n\\n each(resp.headers, function (value, name) {\\n response.headers.set(name, value);\\n });\\n\\n resolve(response);\\n\\n }, function (error$$1) { return handler(error$$1.response); });\\n });\\n};\\n\\n/**\\n * Base client.\\n */\\n\\nvar Client = function (context) {\\n\\n var reqHandlers = [sendRequest], resHandlers = [], handler;\\n\\n if (!isObject(context)) {\\n context = null;\\n }\\n\\n function Client(request) {\\n return new PromiseObj(function (resolve) {\\n\\n function exec() {\\n\\n handler = reqHandlers.pop();\\n\\n if (isFunction(handler)) {\\n handler.call(context, request, next);\\n } else {\\n warn((\\\"Invalid interceptor of type \\\" + (typeof handler) + \\\", must be a function\\\"));\\n next();\\n }\\n }\\n\\n function next(response) {\\n\\n if (isFunction(response)) {\\n\\n resHandlers.unshift(response);\\n\\n } else if (isObject(response)) {\\n\\n resHandlers.forEach(function (handler) {\\n response = when(response, function (response) {\\n return handler.call(context, response) || response;\\n });\\n });\\n\\n when(response, resolve);\\n\\n return;\\n }\\n\\n exec();\\n }\\n\\n exec();\\n\\n }, context);\\n }\\n\\n Client.use = function (handler) {\\n reqHandlers.push(handler);\\n };\\n\\n return Client;\\n};\\n\\nfunction sendRequest(request, resolve) {\\n\\n var client = request.client || (inBrowser ? xhrClient : nodeClient);\\n\\n resolve(client(request));\\n}\\n\\n/**\\n * HTTP Headers.\\n */\\n\\nvar Headers = function Headers(headers) {\\n var this$1 = this;\\n\\n\\n this.map = {};\\n\\n each(headers, function (value, name) { return this$1.append(name, value); });\\n};\\n\\nHeaders.prototype.has = function has (name) {\\n return getName(this.map, name) !== null;\\n};\\n\\nHeaders.prototype.get = function get (name) {\\n\\n var list = this.map[getName(this.map, name)];\\n\\n return list ? list[0] : null;\\n};\\n\\nHeaders.prototype.getAll = function getAll (name) {\\n return this.map[getName(this.map, name)] || [];\\n};\\n\\nHeaders.prototype.set = function set (name, value) {\\n this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)];\\n};\\n\\nHeaders.prototype.append = function append (name, value){\\n\\n var list = this.getAll(name);\\n\\n if (list.length) {\\n list.push(trim(value));\\n } else {\\n this.set(name, value);\\n }\\n};\\n\\nHeaders.prototype.delete = function delete$1 (name){\\n delete this.map[getName(this.map, name)];\\n};\\n\\nHeaders.prototype.deleteAll = function deleteAll (){\\n this.map = {};\\n};\\n\\nHeaders.prototype.forEach = function forEach (callback, thisArg) {\\n var this$1 = this;\\n\\n each(this.map, function (list, name) {\\n each(list, function (value) { return callback.call(thisArg, value, name, this$1); });\\n });\\n};\\n\\nfunction getName(map, name) {\\n return Object.keys(map).reduce(function (prev, curr) {\\n return toLower(name) === toLower(curr) ? curr : prev;\\n }, null);\\n}\\n\\nfunction normalizeName(name) {\\n\\n if (/[^a-z0-9\\\\-#$%&'*+.\\\\^_`|~]/i.test(name)) {\\n throw new TypeError('Invalid character in header field name');\\n }\\n\\n return trim(name);\\n}\\n\\n/**\\n * HTTP Response.\\n */\\n\\nvar Response = function Response(body, ref) {\\n var url = ref.url;\\n var headers = ref.headers;\\n var status = ref.status;\\n var statusText = ref.statusText;\\n\\n\\n this.url = url;\\n this.ok = status >= 200 && status < 300;\\n this.status = status || 0;\\n this.statusText = statusText || '';\\n this.headers = new Headers(headers);\\n this.body = body;\\n\\n if (isString(body)) {\\n\\n this.bodyText = body;\\n\\n } else if (isBlob(body)) {\\n\\n this.bodyBlob = body;\\n\\n if (isBlobText(body)) {\\n this.bodyText = blobText(body);\\n }\\n }\\n};\\n\\nResponse.prototype.blob = function blob () {\\n return when(this.bodyBlob);\\n};\\n\\nResponse.prototype.text = function text () {\\n return when(this.bodyText);\\n};\\n\\nResponse.prototype.json = function json () {\\n return when(this.text(), function (text) { return JSON.parse(text); });\\n};\\n\\nfunction blobText(body) {\\n return new PromiseObj(function (resolve) {\\n\\n var reader = new FileReader();\\n\\n reader.readAsText(body);\\n reader.onload = function () {\\n resolve(reader.result);\\n };\\n\\n });\\n}\\n\\nfunction isBlobText(body) {\\n return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1;\\n}\\n\\n/**\\n * HTTP Request.\\n */\\n\\nvar Request = function Request(options$$1) {\\n\\n this.body = null;\\n this.params = {};\\n\\n assign(this, options$$1, {\\n method: toUpper(options$$1.method || 'GET')\\n });\\n\\n if (!(this.headers instanceof Headers)) {\\n this.headers = new Headers(this.headers);\\n }\\n};\\n\\nRequest.prototype.getUrl = function getUrl (){\\n return Url(this);\\n};\\n\\nRequest.prototype.getBody = function getBody (){\\n return this.body;\\n};\\n\\nRequest.prototype.respondWith = function respondWith (body, options$$1) {\\n return new Response(body, assign(options$$1 || {}, {url: this.getUrl()}));\\n};\\n\\n/**\\n * Service for sending network requests.\\n */\\n\\nvar COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'};\\nvar JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'};\\n\\nfunction Http(options$$1) {\\n\\n var self = this || {}, client = Client(self.$vm);\\n\\n defaults(options$$1 || {}, self.$options, Http.options);\\n\\n Http.interceptors.forEach(function (handler) {\\n client.use(handler);\\n });\\n\\n return client(new Request(options$$1)).then(function (response) {\\n\\n return response.ok ? response : PromiseObj.reject(response);\\n\\n }, function (response) {\\n\\n if (response instanceof Error) {\\n error(response);\\n }\\n\\n return PromiseObj.reject(response);\\n });\\n}\\n\\nHttp.options = {};\\n\\nHttp.headers = {\\n put: JSON_CONTENT_TYPE,\\n post: JSON_CONTENT_TYPE,\\n patch: JSON_CONTENT_TYPE,\\n delete: JSON_CONTENT_TYPE,\\n common: COMMON_HEADERS,\\n custom: {}\\n};\\n\\nHttp.interceptors = [before, method, body, jsonp, header, cors];\\n\\n['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) {\\n\\n Http[method$$1] = function (url, options$$1) {\\n return this(assign(options$$1 || {}, {url: url, method: method$$1}));\\n };\\n\\n});\\n\\n['post', 'put', 'patch'].forEach(function (method$$1) {\\n\\n Http[method$$1] = function (url, body$$1, options$$1) {\\n return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body$$1}));\\n };\\n\\n});\\n\\n/**\\n * Service for interacting with RESTful services.\\n */\\n\\nfunction Resource(url, params, actions, options$$1) {\\n\\n var self = this || {}, resource = {};\\n\\n actions = assign({},\\n Resource.actions,\\n actions\\n );\\n\\n each(actions, function (action, name) {\\n\\n action = merge({url: url, params: assign({}, params)}, options$$1, action);\\n\\n resource[name] = function () {\\n return (self.$http || Http)(opts(action, arguments));\\n };\\n });\\n\\n return resource;\\n}\\n\\nfunction opts(action, args) {\\n\\n var options$$1 = assign({}, action), params = {}, body;\\n\\n switch (args.length) {\\n\\n case 2:\\n\\n params = args[0];\\n body = args[1];\\n\\n break;\\n\\n case 1:\\n\\n if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) {\\n body = args[0];\\n } else {\\n params = args[0];\\n }\\n\\n break;\\n\\n case 0:\\n\\n break;\\n\\n default:\\n\\n throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments';\\n }\\n\\n options$$1.body = body;\\n options$$1.params = assign({}, options$$1.params, params);\\n\\n return options$$1;\\n}\\n\\nResource.actions = {\\n\\n get: {method: 'GET'},\\n save: {method: 'POST'},\\n query: {method: 'GET'},\\n update: {method: 'PUT'},\\n remove: {method: 'DELETE'},\\n delete: {method: 'DELETE'}\\n\\n};\\n\\n/**\\n * Install plugin.\\n */\\n\\nfunction plugin(Vue) {\\n\\n if (plugin.installed) {\\n return;\\n }\\n\\n Util(Vue);\\n\\n Vue.url = Url;\\n Vue.http = Http;\\n Vue.resource = Resource;\\n Vue.Promise = PromiseObj;\\n\\n Object.defineProperties(Vue.prototype, {\\n\\n $url: {\\n get: function get() {\\n return options(Vue.url, this, this.$options.url);\\n }\\n },\\n\\n $http: {\\n get: function get() {\\n return options(Vue.http, this, this.$options.http);\\n }\\n },\\n\\n $resource: {\\n get: function get() {\\n return Vue.resource.bind(this);\\n }\\n },\\n\\n $promise: {\\n get: function get() {\\n var this$1 = this;\\n\\n return function (executor) { return new Vue.Promise(executor, this$1); };\\n }\\n }\\n\\n });\\n}\\n\\nif (typeof window !== 'undefined' && window.Vue) {\\n window.Vue.use(plugin);\\n}\\n\\nmodule.exports = plugin;\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNDkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L3Z1ZS1yZXNvdXJjZS9kaXN0L3Z1ZS1yZXNvdXJjZS5jb21tb24uanM/MmYxMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiFcbiAqIHZ1ZS1yZXNvdXJjZSB2MS4yLjBcbiAqIGh0dHBzOi8vZ2l0aHViLmNvbS9wYWdla2l0L3Z1ZS1yZXNvdXJjZVxuICogUmVsZWFzZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlLlxuICovXG5cbid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBQcm9taXNlcy9BKyBwb2x5ZmlsbCB2MS4xLjQgKGh0dHBzOi8vZ2l0aHViLmNvbS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VyYWJsZS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgIHJlc29sdmUocmVzdWx0KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHJlc29sdmVyKGkpIHtcbiAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgICAgIHJlc3VsdFtpXSA9IHg7XG4gICAgICAgICAgICAgICAgY291bnQgKz0gMTtcblxuICAgICAgICAgICAgICAgIGlmIChjb3VudCA9PT0gaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzdWx0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpdGVyYWJsZS5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgUHJvbWlzZSQxLnJlc29sdmUoaXRlcmFibGVbaV0pLnRoZW4ocmVzb2x2ZXIoaSksIHJlamVjdCk7XG4gICAgICAgIH1cbiAgICB9KTtcbn07XG5cblByb21pc2UkMS5yYWNlID0gZnVuY3Rpb24gcmFjZShpdGVyYWJsZSkge1xuICAgIHJldHVybiBuZXcgUHJvbWlzZSQxKGZ1bmN0aW9uIChyZXNvbHZlLCByZWplY3QpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBpdGVyYWJsZS5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgUHJvbWlzZSQxLnJlc29sdmUoaXRlcmFibGVbaV0pLnRoZW4ocmVzb2x2ZSwgcmVqZWN0KTtcbiAgICAgICAgfVxuICAgIH0pO1xufTtcblxudmFyIHAkMSA9IFByb21pc2UkMS5wcm90b3R5cGU7XG5cbnAkMS5yZXNvbHZlID0gZnVuY3Rpb24gcmVzb2x2ZSh4KSB7XG4gICAgdmFyIHByb21pc2UgPSB0aGlzO1xuXG4gICAgaWYgKHByb21pc2Uuc3RhdGUgPT09IFBFTkRJTkcpIHtcbiAgICAgICAgaWYgKHggPT09IHByb21pc2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ1Byb21pc2Ugc2V0dGxlZCB3aXRoIGl0c2VsZi4nKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBjYWxsZWQgPSBmYWxzZTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIHRoZW4gPSB4ICYmIHhbJ3RoZW4nXTtcblxuICAgICAgICAgICAgaWYgKHggIT09IG51bGwgJiYgdHlwZW9mIHggPT09ICdvYmplY3QnICYmIHR5cGVvZiB0aGVuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgdGhlbi5jYWxsKHgsIGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnJlc29sdmUoeCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2FsbGVkID0gdHJ1ZTtcblxuICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uIChyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnJlamVjdChyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgaWYgKCFjYWxsZWQpIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlLnJlamVjdChlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHByb21pc2Uuc3RhdGUgPSBSRVNPTFZFRDtcbiAgICAgICAgcHJvbWlzZS52YWx1ZSA9IHg7XG4gICAgICAgIHByb21pc2Uubm90aWZ5KCk7XG4gICAgfVxufTtcblxucCQxLnJlamVjdCA9IGZ1bmN0aW9uIHJlamVjdChyZWFzb24pIHtcbiAgICB2YXIgcHJvbWlzZSA9IHRoaXM7XG5cbiAgICBpZiAocHJvbWlzZS5zdGF0ZSA9PT0gUEVORElORykge1xuICAgICAgICBpZiAocmVhc29uID09PSBwcm9taXNlKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCdQcm9taXNlIHNldHRsZWQgd2l0aCBpdHNlbGYuJyk7XG4gICAgICAgIH1cblxuICAgICAgICBwcm9taXNlLnN0YXRlID0gUkVKRUNURUQ7XG4gICAgICAgIHByb21pc2UudmFsdWUgPSByZWFzb247XG4gICAgICAgIHByb21pc2Uubm90aWZ5KCk7XG4gICAgfVxufTtcblxucCQxLm5vdGlmeSA9IGZ1bmN0aW9uIG5vdGlmeSgpIHtcbiAgICB2YXIgcHJvbWlzZSA9IHRoaXM7XG5cbiAgICBuZXh0VGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmIChwcm9taXNlLnN0YXRlICE9PSBQRU5ESU5HKSB7XG4gICAgICAgICAgICB3aGlsZSAocHJvbWlzZS5kZWZlcnJlZC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgZGVmZXJyZWQgPSBwcm9taXNlLmRlZmVycmVkLnNoaWZ0KCksXG4gICAgICAgICAgICAgICAgICAgIG9uUmVzb2x2ZWQgPSBkZWZlcnJlZFswXSxcbiAgICAgICAgICAgICAgICAgICAgb25SZWplY3RlZCA9IGRlZmVycmVkWzFdLFxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlID0gZGVmZXJyZWRbMl0sXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdCA9IGRlZmVycmVkWzNdO1xuXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByb21pc2Uuc3RhdGUgPT09IFJFU09MVkVEKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uUmVzb2x2ZWQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKG9uUmVzb2x2ZWQuY2FsbCh1bmRlZmluZWQsIHByb21pc2UudmFsdWUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShwcm9taXNlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwcm9taXNlLnN0YXRlID09PSBSRUpFQ1RFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvblJlamVjdGVkID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShvblJlamVjdGVkLmNhbGwodW5kZWZpbmVkLCBwcm9taXNlLnZhbHVlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChwcm9taXNlLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xufTtcblxucCQxLnRoZW4gPSBmdW5jdGlvbiB0aGVuKG9uUmVzb2x2ZWQsIG9uUmVqZWN0ZWQpIHtcbiAgICB2YXIgcHJvbWlzZSA9IHRoaXM7XG5cbiAgICByZXR1cm4gbmV3IFByb21pc2UkM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biAgICByZXR1cm4gdGFyZ2V0O1xufVxuXG5mdW5jdGlvbiBfbWVyZ2UodGFyZ2V0LCBzb3VyY2UsIGRlZXApIHtcbiAgICBmb3IgKHZhciBrZXkgaW4gc291cmNlKSB7XG4gICAgICAgIGlmIChkZWVwICYmIChpc1BsYWluT2JqZWN0KHNvdXJjZVtrZXldKSB8fCBpc0FycmF5KHNvdXJjZVtrZXldKSkpIHtcbiAgICAgICAgICAgIGlmIChpc1BsYWluT2JqZWN0KHNvdXJjZVtrZXldKSAmJiAhaXNQbGFpbk9iamVjdCh0YXJnZXRba2V5XSkpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXRba2V5XSA9IHt9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzQXJyYXkoc291cmNlW2tleV0pICYmICFpc0FycmF5KHRhcmdldFtrZXldKSkge1xuICAgICAgICAgICAgICAgIHRhcmdldFtrZXldID0gW107XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfbWVyZ2UodGFyZ2V0W2tleV0sIHNvdXJjZVtrZXldLCBkZWVwKTtcbiAgICAgICAgfSBlbHNlIGlmIChzb3VyY2Vba2V5XSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB0YXJnZXRba2V5XSA9IHNvdXJjZVtrZXldO1xuICAgICAgICB9XG4gICAgfVxufVxuXG4vKipcbiAqIFJvb3QgUHJlZml4IFRyYW5zZm9ybS5cbiAqL1xuXG52YXIgcm9vdCA9IGZ1bmN0aW9uIChvcHRpb25zJCQxLCBuZXh0KSB7XG5cbiAgICB2YXIgdXJsID0gbmV4dChvcHRpb25zJCQxKTtcblxuICAgIGlmIChpc1N0cmluZyhvcHRpb25zJCQxLnJvb3QpICYmICF1cmwubWF0Y2goL14oaHR0cHM/Oik/XFwvLykpIHtcbiAgICAgICAgdXJsID0gb3B0aW9ucyQkMS5yb290ICsgJy8nICsgdXJsO1xuICAgIH1cblxuICAgIHJldHVybiB1cmw7XG59O1xuXG4vK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vcnMgPSBbJysnLCAnIycsICcuJywgJy8nLCAnOycsICc/JywgJyYnXSwgdmFyaWFibGVzID0gW107XG5cbiAgICByZXR1cm4ge1xuICAgICAgICB2YXJzOiB2YXJpYWJsZXMsXG4gICAgICAgIGV4cGFuZDogZnVuY3Rpb24gZXhwYW5kKGNvbnRleHQpIHtcbiAgICAgICAgICAgIHJldHVybiB0ZW1wbGF0ZS5yZXBsYWNlKC9cXHsoW15cXHtcXH1dKylcXH18KFteXFx7XFx9XSspL2csIGZ1bmN0aW9uIChfLCBleHByZXNzaW9uLCBsaXRlcmFsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4cHJlc3Npb24pIHtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgb3BlcmF0b3IgPSBudWxsLCB2YWx1ZXMgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3JzLmluZGV4T2YoZXhwcmVzc2lvbi5jaGFyQXQoMCkpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3IgPSBleHByZXNzaW9uLmNoYXJBdCgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb24gPSBleHByZXNzaW9uLnN1YnN0cigxKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb24uc3BsaXQoLywvZykuZm9yRWFjaChmdW5jdGlvbiAodmFyaWFibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0bXAgPSAvKFteOlxcKl0qKSg/OjooXFxkKyl8KFxcKikpPy8uZXhlYyh2YXJpYWJsZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXMucHVzaC5hcHBseSh2YWx1ZXMsIGdldFZhbHVlcyhjb250ZXh0LCBvcGVyYXRvciwgdG1wWzFdLCB0bXBbMl0gfHwgdG1wWzNdKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXJpYWJsZXMucHVzaCh0bXBbMV0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgJiYgb3BlcmF0b3IgIT09ICcrJykge1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VwYXJhdG9yID0gJywnO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob3BlcmF0b3IgPT09ICc/Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcGFyYXRvciA9ICcmJztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAob3BlcmF0b3IgIT09ICcjJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcGFyYXRvciA9IG9wZXJhdG9yO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKHZhbHVlcy5sZW5ndGggIT09IDAgPyBvcGVyYXRvciA6ICcnKSArIHZhbHVlcy5qb2luKHNlcGFyYXRvcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVzLmpvaW4oJywnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGVuY29kZVJlc2VydmVkKGxpdGVyYWwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbn1cblxuZnVuY3Rpb24gZ2V0VmFsdWVzKGNvbnRleHQsIG9wZXJhdG9yLCBrZXksIG1vZGlmaWVyKSB7XG5cbiAgICB2YXIgdmFsdWUgPSBjb250ZXh0W2tleV0sIHJlc3VsdCA9IFtdO1xuXG4gICAgaWYgKGlzRGVmaW5lZCh2YWx1ZSkgJiYgdmFsdWUgIT09ICcnKSB7XG4gICAgICAgIGlmICh0eXBlb2YgdmFsdWUgPT09ICdzdHJpbmcnIHx8IHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicgfHwgdHlwZW9mIHZhbHVlID09PSAnYm9vbGVhbicpIHtcbiAgICAgICAgICAgIHZhbHVlID0gdmFsdWUudG9TdHJpbmcoKTtcblxuICAgICAgICAgICAgaWYgKG1vZGlmaWVyICYmIG1vZGlmaWVyICE9PSAnKicpIHtcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnN1YnN0cmluZygwLCBwYXJzZUludChtb2RpZmllciwgMTApKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmVzdWx0LnB1c2goZW5jb2RlVmFsdWUob3BlcmF0b3IsIHZhbHVlLCBpc0tleU9wZXJhdG9yKG9wZXJhdG9yKSA/IGtleSA6IG51bGwpKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChtb2RpZmllciA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlLmZpbHRlcihpc0RlZmluZWQpLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChlbmNvZGVWYWx1ZShvcGVyYXRvciwgdmFsdWUsIGlzS2V5T3BlcmF0b3Iob3BlcmF0b3IpID8ga2V5IDogbnVsbCkpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh2YWx1ZSkuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRGVmaW5lZCh2YWx1ZVtrXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChlbmNvZGVWYWx1ZShvcGVyYXRvciwgdmFsdWVba10sIGspKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgdG1wID0gW107XG5cbiAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheSh2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUuZmlsdGVyKGlzRGVmaW5lZCkuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRtcC5wdXNoKGVuY29kZVZhbHVlKG9wZXJhdG9yLCB2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBPYmplY3Qua2V5cyh2YWx1ZSkuZm9yRWFjaChmdW5jdGlvbiAoaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzRGVmaW5lZCh2YWx1ZVtrXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0bXAucHVzaChlbmNvZGVVUklDb21wb25lbnQoaykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRtcC5wdXNoKGVuY29kZVZhbHVlKG9wZXJhdG9yLCB2YWx1ZVtrXS50b1N0cmluZygpKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChpc0tleU9wZXJhdG9yKG9wZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChlbmNvZGVVUklDb21wb25lbnQoa2V5KSArICc9JyArIHRtcC5qb2luKCcsJykpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodG1wLmxlbmd0aCAhPT0gMCkge1xu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NldCgnQ29udGVudC1UeXBlJywgJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVxdWVzdC5ib2R5ID0gSlNPTi5zdHJpbmdpZnkocmVxdWVzdC5ib2R5KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5leHQoZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG5cbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHJlc3BvbnNlLCAnZGF0YScsIHtcblxuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYm9keTtcbiAgICAgICAgICAgIH0sXG5cbiAgICAgICAgICAgIHNldDogZnVuY3Rpb24gc2V0KGJvZHkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmJvZHkgPSBib2R5O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiByZXNwb25zZS5ib2R5VGV4dCA/IHdoZW4ocmVzcG9uc2UudGV4dCgpLCBmdW5jdGlvbiAodGV4dCkge1xuXG4gICAgICAgICAgICB2YXIgdHlwZSA9IHJlc3BvbnNlLmhlYWRlcnMuZ2V0KCdDb250ZW50LVR5cGUnKSB8fCAnJztcblxuICAgICAgICAgICAgaWYgKHR5cGUuaW5kZXhPZignYXBwbGljYXRpb24vanNvbicpID09PSAwIHx8IGlzSnNvbih0ZXh0KSkge1xuXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UuYm9keSA9IEpTT04ucGFyc2UodGV4dCk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICByZXNwb25zZS5ib2R5ID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4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gICBpZiAocmVxdWVzdC50aW1lb3V0KSB7XG4gICAgICAgICAgICB4aHIudGltZW91dCA9IHJlcXVlc3QudGltZW91dDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyZXF1ZXN0LmNyZWRlbnRpYWxzID09PSB0cnVlKSB7XG4gICAgICAgICAgICB4aHIud2l0aENyZWRlbnRpYWxzID0gdHJ1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghcmVxdWVzdC5jcm9zc09yaWdpbikge1xuICAgICAgICAgICAgcmVxdWVzdC5oZWFkZXJzLnNldCgnWC1SZXF1ZXN0ZWQtV2l0aCcsICdYTUxIdHRwUmVxdWVzdCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCdyZXNwb25zZVR5cGUnIGluIHhociAmJiBTVVBQT1JUU19CTE9CKSB7XG4gICAgICAgICAgICB4aHIucmVzcG9uc2VUeXBlID0gJ2Jsb2InO1xuICAgICAgICB9XG5cbiAgICAgICAgcmVxdWVzdC5oZWFkZXJzLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlLCBuYW1lKSB7XG4gICAgICAgICAgICB4aHIuc2V0UmVxdWVzdEhlYWRlcihuYW1lLCB2YWx1ZSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHhoci5vbmxvYWQgPSBoYW5kbGVyO1xuICAgICAgICB4aHIub25hYm9ydCA9IGhhbmRsZXI7XG4gICAgICAgIHhoci5vbmVycm9yID0gaGFuZGxlcjtcbiAgICAgICAgeGhyLm9udGltZW91dCA9IGhhbmRsZXI7XG4gICAgICAgIHhoci5zZW5kKHJlcXVlc3QuZ2V0Qm9keSgpKTtcbiAgICB9KTtcbn07XG5cbi8qKlxuICogSHR0cCBjbGllbnQgKE5vZGUpLlxuICovXG5cbnZhciBub2RlQ2xpZW50ID0gZnVuY3Rpb24gKHJlcXVlc3QpIHtcblxuICAgIHZhciBjbGllbnQgPSByZXF1aXJlKCdnb3QnKTtcblxuICAgIHJldHVybiBuZXcgUHJvbWlzZU9iaihmdW5jdGlvbiAocmVzb2x2ZSkge1xuXG4gICAgICAgIHZhciB1cmwgPSByZXF1ZXN0LmdldFVybCgpO1xuICAgICAgICB2YXIgYm9keSA9IHJlcXVlc3QuZ2V0Qm9keSgpO1xuICAgICAgICB2YXIgbWV0aG9kID0gcmVxdWVzdC5tZXRob2Q7XG4gICAgICAgIHZhciBoZWFkZXJzID0ge30sIGhhbmRsZXI7XG5cbiAgICAgICAgcmVxdWVzdC5oZWFkZXJzLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlLCBuYW1lKSB7XG4gICAgICAgICAgICBoZWFkZXJzW25hbWVdID0gdmFsdWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNsaWVudCh1cmwsIHtib2R5OiBib2R5LCBtZXRob2Q6IG1ldGhvZCwgaGVhZGVyczogaGVhZGVyc30pLnRoZW4oaGFuZGxlciA9IGZ1bmN0aW9uIChyZXNwKSB7XG5cbiAgICAgICAgICAgIHZhciByZXNwb25zZSA9IHJlcXVlc3QucmVzcG9uZFdpdGgocmVzcC5ib2R5LCB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzcC5zdGF0dXNDb2RlLFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXNUZXh0OiB0cmltKHJlc3Auc3RhdHVzTWVzc2FnZSlcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBlYWNoKHJlc3AuaGVhZGVycywgZnVuY3Rpb24gKHZhbHVlLCBuYW1lKSB7XG4gICAgICAgICAgICAgICAgcmVzcG9uc2UuaGVhZGVycy5zZXQobmFtZSwgdmFsdWUpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHJlc29sdmUocmVzcG9uc2UpO1xuXG4gICAgICAgIH0sIGZ1bmN0aW9uIChlcnJvciQkMSkgeyByZXR1cm4gaGFuZGxlcihlcnJvciQkMS5yZXNwb25zZSk7IH0pO1xuICAgIH0pO1xufTtcblxuLyoqXG4gKiBCYXNlIGNsaWVudC5cbiAqL1xuXG52YXIgQ2xpZW50ID0gZnVuY3Rpb24gKGNvbnRleHQpIHtcblxuICAgIHZhciByZXFIYW5kbGVycyA9IFtzZW5kUmVxdWVzdF0sIHJlc0hhbmRsZXJzID0gW10sIGhhbmRsZXI7XG5cbiAgICBpZiAoIWlzT2JqZWN0KGNvbnRleHQpKSB7XG4gICAgICAgIGNvbnRleHQgPSBudWxsO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIENsaWVudChyZXF1ZXN0KSB7XG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZU9iaihmdW5jdGlvbiAocmVzb2x2ZSkge1xuXG4gICAgICAgICAgICBmdW5jdGlvbiBleGVjKCkge1xuXG4gICAgICAgICAgICAgICAgaGFuZGxlciA9IHJlcUhhbmRsZXJzLnBvcCgpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGlzRnVuY3Rpb24oaGFuZGxlcikpIHtcbiAgICAgICAgICAgICAgICAgICAgaGFuZGxlci5jYWxsKGNvbnRleHQsIHJlcXVlc3QsIG5leHQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHdhcm4oKFwiSW52YWxpZCBpbnRlcmNlcHRvciBvZiB0eXBlIFwiICsgKHR5cGVvZiBoYW5kbGVyKSArIFwiLCBtdXN0IGJlIGEgZnVuY3Rpb25cIikpO1xuICAgICAgICAgICAgICAgICAgICBuZXh0KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmdW5jdGlvbiBuZXh0KHJlc3BvbnNlKSB7XG5cbiAgICAgICAgICAgICAgICBpZiAoaXNGdW5jdGlvbihyZXNwb25zZSkpIHtcblxuICAgICAgICAgICAgICAgICAgICByZXNIYW5kbGVycy51bnNoaWZ0KHJlc3BvbnNlKTtcblxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNPYmplY3QocmVzcG9uc2UpKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgcmVzSGFuZGxlcnMuZm9yRWFjaChmdW5jdGlvbiAoaGFuZGxlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSB3aGVuKHJlc3BvbnNlLCBmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlci5jYWxsKGNvbnRleHQsIHJlc3BvbnNlKSB8fCByZXNwb25zZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICB3aGVuKHJlc3BvbnNlLCByZXNvbHZlKTtcblxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZXhlYygpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGVjKCk7XG5cbiAgICAgICAgfSwgY29udGV4dCk7XG4gICAgfVxuXG4gICAgQ2xpZW50LnVzZSA9IGZ1bmN0aW9uIChoYW5kbGVyKSB7XG4gICAgICAgIHJlcUhhbmRsZXJzLnB1c2goaGFuZGxlcik7XG4gICAgfTtcblxuICAgIHJldHVybiBDbGllbnQ7XG59O1xuXG5mdW5jdGlvbiBzZW5kUmVxdWVzdChyZXF1ZXN0LCByZXNvbHZlKSB7XG5cbiAgICB2YXIgY2xpZW50ID0gcmVxdWVzdC5jbGllbnQgfHwgKGluQnJvd3NlciA/IHhockNsaWVudCA6IG5vZGVDbGllbnQpO1xuXG4gICAgcmVzb2x2ZShjbGllbnQocmVxdWVzdCkpO1xufVxuXG4vKipcbiAqIEhUVFAgSGVhZGVycy5cbiAqL1xuXG52YXIgSGVhZGVycyA9IGZ1bmN0aW9uIEhlYWRlcnMoaGVhZGVycykge1xuICAgIHZhciB0aGlzJDEgPSB0aGlzO1xuXG5cbiAgICB0aGlzLm1hcCA9IH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AgICAgcGFyYW1zID0gYXJnc1swXTtcbiAgICAgICAgICAgIGJvZHkgPSBhcmdzWzFdO1xuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBjYXNlIDE6XG5cbiAgICAgICAgICAgIGlmICgvXihQT1NUfFBVVHxQQVRDSCkkL2kudGVzdChvcHRpb25zJCQxLm1ldGhvZCkpIHtcbiAgICAgICAgICAgICAgICBib2R5ID0gYXJnc1swXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcGFyYW1zID0gYXJnc1swXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAwOlxuXG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICBkZWZhdWx0OlxuXG4gICAgICAgICAgICB0aHJvdyAnRXhwZWN0ZWQgdXAgdG8gMiBhcmd1bWVudHMgW3BhcmFtcywgYm9keV0sIGdvdCAnICsgYXJncy5sZW5ndGggKyAnIGFyZ3VtZW50cyc7XG4gICAgfVxuXG4gICAgb3B0aW9ucyQkMS5ib2R5ID0gYm9keTtcbiAgICBvcHRpb25zJCQxLnBhcmFtcyA9IGFzc2lnbih7fSwgb3B0aW9ucyQkMS5wYXJhbXMsIHBhcmFtcyk7XG5cbiAgICByZXR1cm4gb3B0aW9ucyQkMTtcbn1cblxuUmVzb3VyY2UuYWN0aW9ucyA9IHtcblxuICAgIGdldDoge21ldGhvZDogJ0dFVCd9LFxuICAgIHNhdmU6IHttZXRob2Q6ICdQT1NUJ30sXG4gICAgcXVlcnk6IHttZXRob2Q6ICdHRVQnfSxcbiAgICB1cGRhdGU6IHttZXRob2Q6ICdQVVQnfSxcbiAgICByZW1vdmU6IHttZXRob2Q6ICdERUxFVEUnfSxcbiAgICBkZWxldGU6IHttZXRob2Q6ICdERUxFVEUnfVxuXG59O1xuXG4vKipcbiAqIEluc3RhbGwgcGx1Z2luLlxuICovXG5cbmZ1bmN0aW9uIHBsdWdpbihWdWUpIHtcblxuICAgIGlmIChwbHVnaW4uaW5zdGFsbGVkKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBVdGlsKFZ1ZSk7XG5cbiAgICBWdWUudXJsID0gVXJsO1xuICAgIFZ1ZS5odHRwID0gSHR0cDtcbiAgICBWdWUucmVzb3VyY2UgPSBSZXNvdXJjZTtcbiAgICBWdWUuUHJvbWlzZSA9IFByb21pc2VPYmo7XG5cbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyhWdWUucHJvdG90eXBlLCB7XG5cbiAgICAgICAgJHVybDoge1xuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnMoVnVlLnVybCwgdGhpcywgdGhpcy4kb3B0aW9ucy51cmwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuXG4gICAgICAgICRodHRwOiB7XG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uIGdldCgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gb3B0aW9ucyhWdWUuaHR0cCwgdGhpcywgdGhpcy4kb3B0aW9ucy5odHRwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICAkcmVzb3VyY2U6IHtcbiAgICAgICAgICAgIGdldDogZnVuY3Rpb24gZ2V0KCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBWdWUucmVzb3VyY2UuYmluZCh0aGlzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcblxuICAgICAgICAkcHJvbWlzZToge1xuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiBnZXQoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRoaXMkMSA9IHRoaXM7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGV4ZWN1dG9yKSB7IHJldHVybiBuZXcgVnVlLlByb21pc2UoZXhlY3V0b3IsIHRoaXMkMSk7IH07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Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ },\n/* 50 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"(function webpackUniversalModuleDefinition(root, factory) {\\n\\tif(true)\\n\\t\\tmodule.exports = factory();\\n\\telse if(typeof define === 'function' && define.amd)\\n\\t\\tdefine([], factory);\\n\\telse if(typeof exports === 'object')\\n\\t\\texports[\\\"VueStrap\\\"] = factory();\\n\\telse\\n\\t\\troot[\\\"VueStrap\\\"] = factory();\\n})(this, function() {\\nreturn /******/ (function(modules) { // webpackBootstrap\\n/******/ \\t// The module cache\\n/******/ \\tvar installedModules = {};\\n/******/\\n/******/ \\t// The require function\\n/******/ \\tfunction __webpack_require__(moduleId) {\\n/******/\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tif(installedModules[moduleId])\\n/******/ \\t\\t\\treturn installedModules[moduleId].exports;\\n/******/\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = installedModules[moduleId] = {\\n/******/ \\t\\t\\texports: {},\\n/******/ \\t\\t\\tid: moduleId,\\n/******/ \\t\\t\\tloaded: false\\n/******/ \\t\\t};\\n/******/\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\\n/******/\\n/******/ \\t\\t// Flag the module as loaded\\n/******/ \\t\\tmodule.loaded = true;\\n/******/\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/\\n/******/\\n/******/ \\t// expose the modules object (__webpack_modules__)\\n/******/ \\t__webpack_require__.m = modules;\\n/******/\\n/******/ \\t// expose the module cache\\n/******/ \\t__webpack_require__.c = installedModules;\\n/******/\\n/******/ \\t// __webpack_public_path__\\n/******/ \\t__webpack_require__.p = \\\"\\\";\\n/******/\\n/******/ \\t// Load entry module and return exports\\n/******/ \\treturn __webpack_require__(0);\\n/******/ })\\n/************************************************************************/\\n/******/ ([\\n/* 0 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar _ClickOutside = __webpack_require__(66);\\n\\t\\n\\tvar _ClickOutside2 = _interopRequireDefault(_ClickOutside);\\n\\t\\n\\tvar _Scroll = __webpack_require__(68);\\n\\t\\n\\tvar _Scroll2 = _interopRequireDefault(_Scroll);\\n\\t\\n\\tvar _Accordion = __webpack_require__(69);\\n\\t\\n\\tvar _Accordion2 = _interopRequireDefault(_Accordion);\\n\\t\\n\\tvar _Affix = __webpack_require__(72);\\n\\t\\n\\tvar _Affix2 = _interopRequireDefault(_Affix);\\n\\t\\n\\tvar _Alert = __webpack_require__(75);\\n\\t\\n\\tvar _Alert2 = _interopRequireDefault(_Alert);\\n\\t\\n\\tvar _Aside = __webpack_require__(82);\\n\\t\\n\\tvar _Aside2 = _interopRequireDefault(_Aside);\\n\\t\\n\\tvar _ButtonGroup = __webpack_require__(87);\\n\\t\\n\\tvar _ButtonGroup2 = _interopRequireDefault(_ButtonGroup);\\n\\t\\n\\tvar _Carousel = __webpack_require__(90);\\n\\t\\n\\tvar _Carousel2 = _interopRequireDefault(_Carousel);\\n\\t\\n\\tvar _Checkbox = __webpack_require__(95);\\n\\t\\n\\tvar _Checkbox2 = _interopRequireDefault(_Checkbox);\\n\\t\\n\\tvar _Datepicker = __webpack_require__(100);\\n\\t\\n\\tvar _Datepicker2 = _interopRequireDefault(_Datepicker);\\n\\t\\n\\tvar _Dropdown = __webpack_require__(105);\\n\\t\\n\\tvar _Dropdown2 = _interopRequireDefault(_Dropdown);\\n\\t\\n\\tvar _FormGroup = __webpack_require__(108);\\n\\t\\n\\tvar _FormGroup2 = _interopRequireDefault(_FormGroup);\\n\\t\\n\\tvar _FormValidator = __webpack_require__(111);\\n\\t\\n\\tvar _FormValidator2 = _interopRequireDefault(_FormValidator);\\n\\t\\n\\tvar _Input = __webpack_require__(114);\\n\\t\\n\\tvar _Input2 = _interopRequireDefault(_Input);\\n\\t\\n\\tvar _Modal = __webpack_require__(119);\\n\\t\\n\\tvar _Modal2 = _interopRequireDefault(_Modal);\\n\\t\\n\\tvar _Navbar = __webpack_require__(128);\\n\\t\\n\\tvar _Navbar2 = _interopRequireDefault(_Navbar);\\n\\t\\n\\tvar _Option = __webpack_require__(131);\\n\\t\\n\\tvar _Option2 = _interopRequireDefault(_Option);\\n\\t\\n\\tvar _Panel = __webpack_require__(134);\\n\\t\\n\\tvar _Panel2 = _interopRequireDefault(_Panel);\\n\\t\\n\\tvar _Popover = __webpack_require__(139);\\n\\t\\n\\tvar _Popover2 = _interopRequireDefault(_Popover);\\n\\t\\n\\tvar _Progressbar = __webpack_require__(145);\\n\\t\\n\\tvar _Progressbar2 = _interopRequireDefault(_Progressbar);\\n\\t\\n\\tvar _Radio = __webpack_require__(148);\\n\\t\\n\\tvar _Radio2 = _interopRequireDefault(_Radio);\\n\\t\\n\\tvar _Select = __webpack_require__(153);\\n\\t\\n\\tvar _Select2 = _interopRequireDefault(_Select);\\n\\t\\n\\tvar _Slider = __webpack_require__(158);\\n\\t\\n\\tvar _Slider2 = _interopRequireDefault(_Slider);\\n\\t\\n\\tvar _Spinner = __webpack_require__(161);\\n\\t\\n\\tvar _Spinner2 = _interopRequireDefault(_Spinner);\\n\\t\\n\\tvar _Tab = __webpack_require__(166);\\n\\t\\n\\tvar _Tab2 = _interopRequireDefault(_Tab);\\n\\t\\n\\tvar _TabGroup = __webpack_require__(169);\\n\\t\\n\\tvar _TabGroup2 = _interopRequireDefault(_TabGroup);\\n\\t\\n\\tvar _Tabs = __webpack_require__(174);\\n\\t\\n\\tvar _Tabs2 = _interopRequireDefault(_Tabs);\\n\\t\\n\\tvar _ToggleButton = __webpack_require__(179);\\n\\t\\n\\tvar _ToggleButton2 = _interopRequireDefault(_ToggleButton);\\n\\t\\n\\tvar _Tooltip = __webpack_require__(182);\\n\\t\\n\\tvar _Tooltip2 = _interopRequireDefault(_Tooltip);\\n\\t\\n\\tvar _Typeahead = __webpack_require__(187);\\n\\t\\n\\tvar _Typeahead2 = _interopRequireDefault(_Typeahead);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t// Components\\n\\t\\n\\t// Directives\\n\\t// Utils\\n\\tvar VueStrap = {\\n\\t directives: {\\n\\t ClickOutside: _ClickOutside2.default,\\n\\t Scroll: _Scroll2.default\\n\\t },\\n\\t utils: {\\n\\t $: _NodeList2.default,\\n\\t coerce: _utils.coerce\\n\\t },\\n\\t //components\\n\\t accordion: _Accordion2.default,\\n\\t affix: _Affix2.default,\\n\\t alert: _Alert2.default,\\n\\t aside: _Aside2.default,\\n\\t buttonGroup: _ButtonGroup2.default,\\n\\t carousel: _Carousel2.default,\\n\\t checkbox: _Checkbox2.default,\\n\\t datepicker: _Datepicker2.default,\\n\\t dropdown: _Dropdown2.default,\\n\\t formGroup: _FormGroup2.default,\\n\\t formValidator: _FormValidator2.default,\\n\\t input: _Input2.default,\\n\\t modal: _Modal2.default,\\n\\t navbar: _Navbar2.default,\\n\\t option: _Option2.default,\\n\\t panel: _Panel2.default,\\n\\t popover: _Popover2.default,\\n\\t progressbar: _Progressbar2.default,\\n\\t radio: _Radio2.default,\\n\\t select: _Select2.default,\\n\\t slider: _Slider2.default,\\n\\t spinner: _Spinner2.default,\\n\\t tab: _Tab2.default,\\n\\t tabGroup: _TabGroup2.default,\\n\\t tabs: _Tabs2.default,\\n\\t toggleButton: _ToggleButton2.default,\\n\\t tooltip: _Tooltip2.default,\\n\\t typeahead: _Typeahead2.default\\n\\t};\\n\\t\\n\\tmodule.exports = VueStrap;\\n\\n/***/ },\\n/* 1 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _defineProperty = __webpack_require__(2);\\n\\t\\n\\tvar _defineProperty2 = _interopRequireDefault(_defineProperty);\\n\\t\\n\\tvar _iterator = __webpack_require__(20);\\n\\t\\n\\tvar _iterator2 = _interopRequireDefault(_iterator);\\n\\t\\n\\tvar _getOwnPropertyNames = __webpack_require__(56);\\n\\t\\n\\tvar _getOwnPropertyNames2 = _interopRequireDefault(_getOwnPropertyNames);\\n\\t\\n\\tvar _classCallCheck2 = __webpack_require__(62);\\n\\t\\n\\tvar _classCallCheck3 = _interopRequireDefault(_classCallCheck2);\\n\\t\\n\\tvar _createClass2 = __webpack_require__(63);\\n\\t\\n\\tvar _createClass3 = _interopRequireDefault(_createClass2);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t__webpack_require__(64);\\n\\t\\n\\tvar ArrayProto = Array.prototype;\\n\\tvar nodeError = new Error('Passed arguments must be of Node');\\n\\tvar blurEvent;\\n\\tvar blurList = [];\\n\\tvar Events = [];\\n\\t\\n\\tfunction isNode(val) {\\n\\t return val instanceof window.Node;\\n\\t}\\n\\tfunction isNodeList(val) {\\n\\t return val instanceof window.NodeList || val instanceof NodeList || val instanceof window.HTMLCollection || val instanceof Array;\\n\\t}\\n\\t\\n\\tvar NodeList = function () {\\n\\t function NodeList(args) {\\n\\t (0, _classCallCheck3.default)(this, NodeList);\\n\\t\\n\\t var nodes = args;\\n\\t if (args[0] === window) {\\n\\t nodes = [window];\\n\\t } else if (typeof args[0] === 'string') {\\n\\t nodes = (args[1] || document).querySelectorAll(args[0]);\\n\\t if (args[1]) {\\n\\t this.owner = args[1];\\n\\t }\\n\\t } else if (0 in args && !isNode(args[0]) && args[0] && 'length' in args[0]) {\\n\\t nodes = args[0];\\n\\t if (args[1]) {\\n\\t this.owner = args[1];\\n\\t }\\n\\t }\\n\\t if (nodes) {\\n\\t for (var i in nodes) {\\n\\t this[i] = nodes[i];\\n\\t }\\n\\t this.length = nodes.length;\\n\\t } else {\\n\\t this.length = 0;\\n\\t }\\n\\t window.prueba = this;\\n\\t }\\n\\t\\n\\t (0, _createClass3.default)(NodeList, [{\\n\\t key: 'concat',\\n\\t value: function concat() {\\n\\t var nodes = ArrayProto.slice.call(this);\\n\\t function flatten(arr) {\\n\\t ArrayProto.forEach.call(arr, function (el) {\\n\\t if (isNode(el)) {\\n\\t if (!~nodes.indexOf(el)) nodes.push(el);\\n\\t } else if (isNodeList(el)) {\\n\\t flatten(el);\\n\\t }\\n\\t });\\n\\t }\\n\\t\\n\\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\\n\\t args[_key] = arguments[_key];\\n\\t }\\n\\t\\n\\t ArrayProto.forEach.call(args, function (arg) {\\n\\t if (isNode(arg)) {\\n\\t if (!~nodes.indexOf(arg)) nodes.push(arg);\\n\\t } else if (isNodeList(arg)) {\\n\\t flatten(arg);\\n\\t } else {\\n\\t throw Error('Concat arguments must be of a Node, NodeList, HTMLCollection, or Array of (Node, NodeList, HTMLCollection, Array)');\\n\\t }\\n\\t });\\n\\t return NodeListJS(nodes, this);\\n\\t }\\n\\t }, {\\n\\t key: 'delete',\\n\\t value: function _delete() {\\n\\t var notRemoved = flatten(this).filter(function (el) {\\n\\t if (el.remove) {\\n\\t el.remove();\\n\\t } else if (el.parentNode) {\\n\\t el.parentNode.removeChild(el);\\n\\t }\\n\\t return document.body.contains(el);\\n\\t });\\n\\t if (notRemoved.length) console.warn('NodeList: Some nodes could not be deleted.');\\n\\t return notRemoved;\\n\\t }\\n\\t }, {\\n\\t key: 'each',\\n\\t value: function each() {\\n\\t for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\\n\\t args[_key2] = arguments[_key2];\\n\\t }\\n\\t\\n\\t ArrayProto.forEach.apply(this, args);\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'filter',\\n\\t value: function filter() {\\n\\t for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\\n\\t args[_key3] = arguments[_key3];\\n\\t }\\n\\t\\n\\t return NodeListJS(ArrayProto.filter.apply(this, args), this);\\n\\t }\\n\\t }, {\\n\\t key: 'find',\\n\\t value: function find(element) {\\n\\t var nodes = [];\\n\\t if (typeof element === 'string') flatten(this).forEach(function (node) {\\n\\t nodes.push(node.querySelectorAll(element));\\n\\t });\\n\\t if (isNode(element)) flatten(this).forEach(function (node) {\\n\\t if (node !== element && node.contains(element)) nodes.push(element);\\n\\t });\\n\\t if (isNodeList(element)) {\\n\\t var els = flatten(element);\\n\\t flatten(this).forEach(function (node) {\\n\\t els.forEach(function (el) {\\n\\t if (node !== el && node.contains(el)) nodes.push(el);\\n\\t });\\n\\t });\\n\\t }\\n\\t return flatten(nodes, this.owner);\\n\\t }\\n\\t }, {\\n\\t key: 'forEach',\\n\\t value: function forEach() {\\n\\t for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\\n\\t args[_key4] = arguments[_key4];\\n\\t }\\n\\t\\n\\t ArrayProto.forEach.apply(this, args);\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'includes',\\n\\t value: function includes(element, index) {\\n\\t return ~this.indexOf(element, index);\\n\\t }\\n\\t }, {\\n\\t key: 'map',\\n\\t value: function map() {\\n\\t for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\\n\\t args[_key5] = arguments[_key5];\\n\\t }\\n\\t\\n\\t var mapped = ArrayProto.map.apply(this, args);\\n\\t return mapped.some(function (el) {\\n\\t return isNode(el) || isNodeList(el);\\n\\t }) ? flatten(mapped, this) : mapped;\\n\\t }\\n\\t }, {\\n\\t key: 'parent',\\n\\t value: function parent() {\\n\\t return flatten(this.map(function (el) {\\n\\t return el.parentNode;\\n\\t }), this);\\n\\t }\\n\\t }, {\\n\\t key: 'pop',\\n\\t value: function pop(amount) {\\n\\t if (typeof amount !== 'number') {\\n\\t amount = 1;\\n\\t }\\n\\t var nodes = [];\\n\\t var pop = ArrayProto.pop.bind(this);\\n\\t while (amount--) {\\n\\t nodes.push(pop());\\n\\t }return NodeListJS(nodes, this);\\n\\t }\\n\\t }, {\\n\\t key: 'push',\\n\\t value: function push() {\\n\\t var _this = this;\\n\\t\\n\\t for (var _len6 = arguments.length, args = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\\n\\t args[_key6] = arguments[_key6];\\n\\t }\\n\\t\\n\\t ArrayProto.forEach.call(args, function (arg) {\\n\\t if (!isNode(arg)) throw nodeError;\\n\\t if (!~_this.indexOf(arg)) ArrayProto.push.call(_this, arg);\\n\\t });\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'shift',\\n\\t value: function shift(amount) {\\n\\t if (typeof amount !== 'number') {\\n\\t amount = 1;\\n\\t }\\n\\t var nodes = [];\\n\\t while (amount--) {\\n\\t nodes.push(ArrayProto.shift.call(this));\\n\\t }return nodes.length == 1 ? nodes[0] : NodeListJS(nodes, this);\\n\\t }\\n\\t }, {\\n\\t key: 'slice',\\n\\t value: function slice() {\\n\\t for (var _len7 = arguments.length, args = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\\n\\t args[_key7] = arguments[_key7];\\n\\t }\\n\\t\\n\\t return NodeListJS(ArrayProto.slice.apply(this, args), this);\\n\\t }\\n\\t }, {\\n\\t key: 'splice',\\n\\t value: function splice() {\\n\\t for (var _len8 = arguments.length, args = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\\n\\t args[_key8] = arguments[_key8];\\n\\t }\\n\\t\\n\\t for (var i = 2, l = args.length; i < l; i++) {\\n\\t if (!isNode(args[i])) throw nodeError;\\n\\t }\\n\\t ArrayProto.splice.apply(this, args);\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'unshift',\\n\\t value: function unshift() {\\n\\t var _this2 = this;\\n\\t\\n\\t var unshift = ArrayProto.unshift.bind(this);\\n\\t\\n\\t for (var _len9 = arguments.length, args = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {\\n\\t args[_key9] = arguments[_key9];\\n\\t }\\n\\t\\n\\t ArrayProto.forEach.call(args, function (arg) {\\n\\t if (!isNode(arg)) throw nodeError;\\n\\t if (!~_this2.indexOf(arg)) unshift(arg);\\n\\t });\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'addClass',\\n\\t value: function addClass(classes) {\\n\\t return this.toggleClass(classes, true);\\n\\t }\\n\\t }, {\\n\\t key: 'removeClass',\\n\\t value: function removeClass(classes) {\\n\\t return this.toggleClass(classes, false);\\n\\t }\\n\\t }, {\\n\\t key: 'toggleClass',\\n\\t value: function toggleClass(classes) {\\n\\t var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\\n\\t\\n\\t var method = value === undefined || value === null ? 'toggle' : value ? 'add' : 'remove';\\n\\t if (typeof classes === 'string') {\\n\\t classes = classes.trim().replace(/\\\\s+/, ' ').split(' ');\\n\\t }\\n\\t return this.each(function (el) {\\n\\t return classes.forEach(function (c) {\\n\\t return el.classList[method](c);\\n\\t });\\n\\t });\\n\\t }\\n\\t }, {\\n\\t key: 'get',\\n\\t value: function get(prop) {\\n\\t var arr = [];\\n\\t this.each(function (el) {\\n\\t if (el !== null) {\\n\\t el = el[prop];\\n\\t }\\n\\t arr.push(el);\\n\\t });\\n\\t return flatten(arr, this);\\n\\t }\\n\\t }, {\\n\\t key: 'set',\\n\\t value: function set(prop, value) {\\n\\t if (prop.constructor === Object) {\\n\\t this.each(function (el) {\\n\\t if (el) {\\n\\t for (var key in prop) {\\n\\t if (key in el) {\\n\\t el[key] = prop[key];\\n\\t }\\n\\t }\\n\\t }\\n\\t });\\n\\t } else {\\n\\t this.each(function (el) {\\n\\t if (prop in el) {\\n\\t el[prop] = value;\\n\\t }\\n\\t });\\n\\t }\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'call',\\n\\t value: function call() {\\n\\t for (var _len10 = arguments.length, args = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {\\n\\t args[_key10] = arguments[_key10];\\n\\t }\\n\\t\\n\\t var method = ArrayProto.shift.call(args);\\n\\t var arr = [];\\n\\t var returnThis = true;\\n\\t this.each(function (el) {\\n\\t if (el && el[method] instanceof Function) {\\n\\t el = el[method].apply(el, args);\\n\\t arr.push(el);\\n\\t if (returnThis && el !== undefined) {\\n\\t returnThis = false;\\n\\t }\\n\\t } else {\\n\\t arr.push(undefined);\\n\\t }\\n\\t });\\n\\t return returnThis ? this : flatten(arr, this);\\n\\t }\\n\\t }, {\\n\\t key: 'item',\\n\\t value: function item(index) {\\n\\t return NodeListJS([this[index]], this);\\n\\t }\\n\\t }, {\\n\\t key: 'on',\\n\\t\\n\\t\\n\\t // event handlers\\n\\t value: function on(events, selector, callback) {\\n\\t if (typeof events === 'string') {\\n\\t events = events.trim().replace(/\\\\s+/, ' ').split(' ');\\n\\t }\\n\\t if (!this || !this.length) return this;\\n\\t if (callback === undefined) {\\n\\t callback = selector;\\n\\t selector = null;\\n\\t }\\n\\t if (!callback) return this;\\n\\t var fn = callback;\\n\\t callback = selector ? function (e) {\\n\\t var els = NodeListJS(selector, this);\\n\\t if (!els.length) {\\n\\t return;\\n\\t }\\n\\t els.some(function (el) {\\n\\t var target = el.contains(e.target);\\n\\t if (target) fn.call(el, e, el);\\n\\t return target;\\n\\t });\\n\\t } : function (e) {\\n\\t fn.apply(this, [e, this]);\\n\\t };\\n\\t this.each(function (el) {\\n\\t events.forEach(function (event) {\\n\\t if (el === window || isNode(el)) {\\n\\t el.addEventListener(event, callback, false);\\n\\t Events.push({\\n\\t el: el,\\n\\t event: event,\\n\\t callback: callback\\n\\t });\\n\\t }\\n\\t });\\n\\t });\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'off',\\n\\t value: function off(events, callback) {\\n\\t if (events instanceof Function) {\\n\\t callback = events;\\n\\t events = null;\\n\\t }\\n\\t events = events instanceof Array ? events : typeof events === 'string' ? events.trim().replace(/\\\\s+/, ' ').split(' ') : null;\\n\\t this.each(function (el) {\\n\\t Events = Events.filter(function (e) {\\n\\t if (e && e.el === el && (!callback || callback === e.callback) && (!events || ~events.indexOf(e.event))) {\\n\\t e.el.removeEventListener(e.event, e.callback);\\n\\t return false;\\n\\t }\\n\\t return true;\\n\\t });\\n\\t });\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'onBlur',\\n\\t value: function onBlur(callback) {\\n\\t if (!this || !this.length) return this;\\n\\t if (!callback) return this;\\n\\t this.each(function (el) {\\n\\t blurList.push({ el: el, callback: callback });\\n\\t });\\n\\t if (!blurEvent) {\\n\\t blurEvent = function blurEvent(e) {\\n\\t blurList.forEach(function (item) {\\n\\t var target = item.el.contains(e.target) || item.el === e.target;\\n\\t if (!target) item.callback.call(item.el, e, item.el);\\n\\t });\\n\\t };\\n\\t document.addEventListener('click', blurEvent, false);\\n\\t document.addEventListener('touchstart', blurEvent, false);\\n\\t }\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'offBlur',\\n\\t value: function offBlur(callback) {\\n\\t this.each(function (el) {\\n\\t blurList = blurList.filter(function (blur) {\\n\\t if (blur && blur.el === el && (!callback || blur.callback === callback)) {\\n\\t return false;\\n\\t }\\n\\t return el;\\n\\t });\\n\\t });\\n\\t return this;\\n\\t }\\n\\t }, {\\n\\t key: 'asArray',\\n\\t get: function get() {\\n\\t return ArrayProto.slice.call(this);\\n\\t }\\n\\t }]);\\n\\t return NodeList;\\n\\t}();\\n\\t\\n\\tvar NL = NodeList.prototype;\\n\\t\\n\\tfunction flatten(arr, owner) {\\n\\t var list = [];\\n\\t ArrayProto.forEach.call(arr, function (el) {\\n\\t if (isNode(el)) {\\n\\t if (!~list.indexOf(el)) list.push(el);\\n\\t } else if (isNodeList(el)) {\\n\\t for (var id in el) {\\n\\t if (!~list.indexOf(el[id])) list.push(el[id]);\\n\\t }\\n\\t } else if (el !== null) {\\n\\t arr.get = NL.get;\\n\\t arr.set = NL.set;\\n\\t arr.call = NL.call;\\n\\t arr.owner = owner;\\n\\t return arr;\\n\\t }\\n\\t });\\n\\t return NodeListJS(list, owner);\\n\\t}\\n\\t\\n\\tvar exceptions = ['join', 'copyWithin', 'fill', 'find', 'forEach'];\\n\\t(0, _getOwnPropertyNames2.default)(ArrayProto).forEach(function (key) {\\n\\t if (!~exceptions.indexOf(key) && NL[key] === undefined) {\\n\\t NL[key] = ArrayProto[key];\\n\\t }\\n\\t});\\n\\tif (window.Symbol && _iterator2.default) {\\n\\t NL[_iterator2.default] = NL.values = ArrayProto[_iterator2.default];\\n\\t}\\n\\tvar div = document.createElement('div');\\n\\tfunction setterGetter(prop) {\\n\\t var _this3 = this;\\n\\t\\n\\t if (NL[prop]) return;\\n\\t if (div[prop] instanceof Function) {\\n\\t NL[prop] = function () {\\n\\t for (var _len11 = arguments.length, args = Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {\\n\\t args[_key11] = arguments[_key11];\\n\\t }\\n\\t\\n\\t var arr = [];\\n\\t var returnThis = true;\\n\\t for (var i in NL) {\\n\\t var el = NL[i];\\n\\t if (el && el[prop] instanceof Function) {\\n\\t el = el[prop].apply(el, args);\\n\\t arr.push(el);\\n\\t if (returnThis && el !== undefined) {\\n\\t returnThis = false;\\n\\t }\\n\\t } else {\\n\\t arr.push(undefined);\\n\\t }\\n\\t }\\n\\t return returnThis ? _this3 : flatten(arr, _this3);\\n\\t };\\n\\t } else {\\n\\t (0, _defineProperty2.default)(NL, prop, {\\n\\t get: function get() {\\n\\t var arr = [];\\n\\t this.each(function (el) {\\n\\t if (el !== null) {\\n\\t el = el[prop];\\n\\t }\\n\\t arr.push(el);\\n\\t });\\n\\t return flatten(arr, this);\\n\\t },\\n\\t set: function set(value) {\\n\\t this.each(function (el) {\\n\\t if (el && prop in el) {\\n\\t el[prop] = value;\\n\\t }\\n\\t });\\n\\t }\\n\\t });\\n\\t }\\n\\t}\\n\\tfor (var prop in div) {\\n\\t setterGetter(prop);\\n\\t}function NodeListJS() {\\n\\t for (var _len12 = arguments.length, args = Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {\\n\\t args[_key12] = arguments[_key12];\\n\\t }\\n\\t\\n\\t return new NodeList(args);\\n\\t}\\n\\twindow.NL = NodeListJS;\\n\\t\\n\\texports.default = NodeListJS;\\n\\n/***/ },\\n/* 2 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = { \\\"default\\\": __webpack_require__(3), __esModule: true };\\n\\n/***/ },\\n/* 3 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(4);\\n\\tvar $Object = __webpack_require__(7).Object;\\n\\tmodule.exports = function defineProperty(it, key, desc){\\n\\t return $Object.defineProperty(it, key, desc);\\n\\t};\\n\\n/***/ },\\n/* 4 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar $export = __webpack_require__(5);\\n\\t// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\\n\\t$export($export.S + $export.F * !__webpack_require__(15), 'Object', {defineProperty: __webpack_require__(11).f});\\n\\n/***/ },\\n/* 5 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar global = __webpack_require__(6)\\n\\t , core = __webpack_require__(7)\\n\\t , ctx = __webpack_require__(8)\\n\\t , hide = __webpack_require__(10)\\n\\t , PROTOTYPE = 'prototype';\\n\\t\\n\\tvar $export = function(type, name, source){\\n\\t var IS_FORCED = type & $export.F\\n\\t , IS_GLOBAL = type & $export.G\\n\\t , IS_STATIC = type & $export.S\\n\\t , IS_PROTO = type & $export.P\\n\\t , IS_BIND = type & $export.B\\n\\t , IS_WRAP = type & $export.W\\n\\t , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\\n\\t , expProto = exports[PROTOTYPE]\\n\\t , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\\n\\t , key, own, out;\\n\\t if(IS_GLOBAL)source = name;\\n\\t for(key in source){\\n\\t // contains in native\\n\\t own = !IS_FORCED && target && target[key] !== undefined;\\n\\t if(own && key in exports)continue;\\n\\t // export native or passed\\n\\t out = own ? target[key] : source[key];\\n\\t // prevent global pollution for namespaces\\n\\t exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\\n\\t // bind timers to global for call from export context\\n\\t : IS_BIND && own ? ctx(out, global)\\n\\t // wrap global constructors for prevent change them in library\\n\\t : IS_WRAP && target[key] == out ? (function(C){\\n\\t var F = function(a, b, c){\\n\\t if(this instanceof C){\\n\\t switch(arguments.length){\\n\\t case 0: return new C;\\n\\t case 1: return new C(a);\\n\\t case 2: return new C(a, b);\\n\\t } return new C(a, b, c);\\n\\t } return C.apply(this, arguments);\\n\\t };\\n\\t F[PROTOTYPE] = C[PROTOTYPE];\\n\\t return F;\\n\\t // make static versions for prototype methods\\n\\t })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\\n\\t // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\\n\\t if(IS_PROTO){\\n\\t (exports.virtual || (exports.virtual = {}))[key] = out;\\n\\t // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\\n\\t if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);\\n\\t }\\n\\t }\\n\\t};\\n\\t// type bitmap\\n\\t$export.F = 1; // forced\\n\\t$export.G = 2; // global\\n\\t$export.S = 4; // static\\n\\t$export.P = 8; // proto\\n\\t$export.B = 16; // bind\\n\\t$export.W = 32; // wrap\\n\\t$export.U = 64; // safe\\n\\t$export.R = 128; // real proto method for `library` \\n\\tmodule.exports = $export;\\n\\n/***/ },\\n/* 6 */\\n/***/ function(module, exports) {\\n\\n\\t// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\\n\\tvar global = module.exports = typeof window != 'undefined' && window.Math == Math\\n\\t ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\\n\\tif(typeof __g == 'number')__g = global; // eslint-disable-line no-undef\\n\\n/***/ },\\n/* 7 */\\n/***/ function(module, exports) {\\n\\n\\tvar core = module.exports = {version: '2.4.0'};\\n\\tif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\\n\\n/***/ },\\n/* 8 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// optional / simple context binding\\n\\tvar aFunction = __webpack_require__(9);\\n\\tmodule.exports = function(fn, that, length){\\n\\t aFunction(fn);\\n\\t if(that === undefined)return fn;\\n\\t switch(length){\\n\\t case 1: return function(a){\\n\\t return fn.call(that, a);\\n\\t };\\n\\t case 2: return function(a, b){\\n\\t return fn.call(that, a, b);\\n\\t };\\n\\t case 3: return function(a, b, c){\\n\\t return fn.call(that, a, b, c);\\n\\t };\\n\\t }\\n\\t return function(/* ...args */){\\n\\t return fn.apply(that, arguments);\\n\\t };\\n\\t};\\n\\n/***/ },\\n/* 9 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(it){\\n\\t if(typeof it != 'function')throw TypeError(it + ' is not a function!');\\n\\t return it;\\n\\t};\\n\\n/***/ },\\n/* 10 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar dP = __webpack_require__(11)\\n\\t , createDesc = __webpack_require__(19);\\n\\tmodule.exports = __webpack_require__(15) ? function(object, key, value){\\n\\t return dP.f(object, key, createDesc(1, value));\\n\\t} : function(object, key, value){\\n\\t object[key] = value;\\n\\t return object;\\n\\t};\\n\\n/***/ },\\n/* 11 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar anObject = __webpack_require__(12)\\n\\t , IE8_DOM_DEFINE = __webpack_require__(14)\\n\\t , toPrimitive = __webpack_require__(18)\\n\\t , dP = Object.defineProperty;\\n\\t\\n\\texports.f = __webpack_require__(15) ? Object.defineProperty : function defineProperty(O, P, Attributes){\\n\\t anObject(O);\\n\\t P = toPrimitive(P, true);\\n\\t anObject(Attributes);\\n\\t if(IE8_DOM_DEFINE)try {\\n\\t return dP(O, P, Attributes);\\n\\t } catch(e){ /* empty */ }\\n\\t if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');\\n\\t if('value' in Attributes)O[P] = Attributes.value;\\n\\t return O;\\n\\t};\\n\\n/***/ },\\n/* 12 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar isObject = __webpack_require__(13);\\n\\tmodule.exports = function(it){\\n\\t if(!isObject(it))throw TypeError(it + ' is not an object!');\\n\\t return it;\\n\\t};\\n\\n/***/ },\\n/* 13 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(it){\\n\\t return typeof it === 'object' ? it !== null : typeof it === 'function';\\n\\t};\\n\\n/***/ },\\n/* 14 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = !__webpack_require__(15) && !__webpack_require__(16)(function(){\\n\\t return Object.defineProperty(__webpack_require__(17)('div'), 'a', {get: function(){ return 7; }}).a != 7;\\n\\t});\\n\\n/***/ },\\n/* 15 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// Thank's IE8 for his funny defineProperty\\n\\tmodule.exports = !__webpack_require__(16)(function(){\\n\\t return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\\n\\t});\\n\\n/***/ },\\n/* 16 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(exec){\\n\\t try {\\n\\t return !!exec();\\n\\t } catch(e){\\n\\t return true;\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 17 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar isObject = __webpack_require__(13)\\n\\t , document = __webpack_require__(6).document\\n\\t // in old IE typeof document.createElement is 'object'\\n\\t , is = isObject(document) && isObject(document.createElement);\\n\\tmodule.exports = function(it){\\n\\t return is ? document.createElement(it) : {};\\n\\t};\\n\\n/***/ },\\n/* 18 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 7.1.1 ToPrimitive(input [, PreferredType])\\n\\tvar isObject = __webpack_require__(13);\\n\\t// instead of the ES6 spec version, we didn't implement @@toPrimitive case\\n\\t// and the second argument - flag - preferred type is a string\\n\\tmodule.exports = function(it, S){\\n\\t if(!isObject(it))return it;\\n\\t var fn, val;\\n\\t if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\\n\\t if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;\\n\\t if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;\\n\\t throw TypeError(\\\"Can't convert object to primitive value\\\");\\n\\t};\\n\\n/***/ },\\n/* 19 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(bitmap, value){\\n\\t return {\\n\\t enumerable : !(bitmap & 1),\\n\\t configurable: !(bitmap & 2),\\n\\t writable : !(bitmap & 4),\\n\\t value : value\\n\\t };\\n\\t};\\n\\n/***/ },\\n/* 20 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = { \\\"default\\\": __webpack_require__(21), __esModule: true };\\n\\n/***/ },\\n/* 21 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(22);\\n\\t__webpack_require__(51);\\n\\tmodule.exports = __webpack_require__(55).f('iterator');\\n\\n/***/ },\\n/* 22 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\tvar $at = __webpack_require__(23)(true);\\n\\t\\n\\t// 21.1.3.27 String.prototype[@@iterator]()\\n\\t__webpack_require__(26)(String, 'String', function(iterated){\\n\\t this._t = String(iterated); // target\\n\\t this._i = 0; // next index\\n\\t// 21.1.5.2.1 %StringIteratorPrototype%.next()\\n\\t}, function(){\\n\\t var O = this._t\\n\\t , index = this._i\\n\\t , point;\\n\\t if(index >= O.length)return {value: undefined, done: true};\\n\\t point = $at(O, index);\\n\\t this._i += point.length;\\n\\t return {value: point, done: false};\\n\\t});\\n\\n/***/ },\\n/* 23 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar toInteger = __webpack_require__(24)\\n\\t , defined = __webpack_require__(25);\\n\\t// true -> String#at\\n\\t// false -> String#codePointAt\\n\\tmodule.exports = function(TO_STRING){\\n\\t return function(that, pos){\\n\\t var s = String(defined(that))\\n\\t , i = toInteger(pos)\\n\\t , l = s.length\\n\\t , a, b;\\n\\t if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\\n\\t a = s.charCodeAt(i);\\n\\t return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\\n\\t ? TO_STRING ? s.charAt(i) : a\\n\\t : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\\n\\t };\\n\\t};\\n\\n/***/ },\\n/* 24 */\\n/***/ function(module, exports) {\\n\\n\\t// 7.1.4 ToInteger\\n\\tvar ceil = Math.ceil\\n\\t , floor = Math.floor;\\n\\tmodule.exports = function(it){\\n\\t return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\\n\\t};\\n\\n/***/ },\\n/* 25 */\\n/***/ function(module, exports) {\\n\\n\\t// 7.2.1 RequireObjectCoercible(argument)\\n\\tmodule.exports = function(it){\\n\\t if(it == undefined)throw TypeError(\\\"Can't call method on \\\" + it);\\n\\t return it;\\n\\t};\\n\\n/***/ },\\n/* 26 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\tvar LIBRARY = __webpack_require__(27)\\n\\t , $export = __webpack_require__(5)\\n\\t , redefine = __webpack_require__(28)\\n\\t , hide = __webpack_require__(10)\\n\\t , has = __webpack_require__(29)\\n\\t , Iterators = __webpack_require__(30)\\n\\t , $iterCreate = __webpack_require__(31)\\n\\t , setToStringTag = __webpack_require__(47)\\n\\t , getPrototypeOf = __webpack_require__(49)\\n\\t , ITERATOR = __webpack_require__(48)('iterator')\\n\\t , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\\n\\t , FF_ITERATOR = '@@iterator'\\n\\t , KEYS = 'keys'\\n\\t , VALUES = 'values';\\n\\t\\n\\tvar returnThis = function(){ return this; };\\n\\t\\n\\tmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\\n\\t $iterCreate(Constructor, NAME, next);\\n\\t var getMethod = function(kind){\\n\\t if(!BUGGY && kind in proto)return proto[kind];\\n\\t switch(kind){\\n\\t case KEYS: return function keys(){ return new Constructor(this, kind); };\\n\\t case VALUES: return function values(){ return new Constructor(this, kind); };\\n\\t } return function entries(){ return new Constructor(this, kind); };\\n\\t };\\n\\t var TAG = NAME + ' Iterator'\\n\\t , DEF_VALUES = DEFAULT == VALUES\\n\\t , VALUES_BUG = false\\n\\t , proto = Base.prototype\\n\\t , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\\n\\t , $default = $native || getMethod(DEFAULT)\\n\\t , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined\\n\\t , $anyNative = NAME == 'Array' ? proto.entries || $native : $native\\n\\t , methods, key, IteratorPrototype;\\n\\t // Fix native\\n\\t if($anyNative){\\n\\t IteratorPrototype = getPrototypeOf($anyNative.call(new Base));\\n\\t if(IteratorPrototype !== Object.prototype){\\n\\t // Set @@toStringTag to native iterators\\n\\t setToStringTag(IteratorPrototype, TAG, true);\\n\\t // fix for some old engines\\n\\t if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\\n\\t }\\n\\t }\\n\\t // fix Array#{values, @@iterator}.name in V8 / FF\\n\\t if(DEF_VALUES && $native && $native.name !== VALUES){\\n\\t VALUES_BUG = true;\\n\\t $default = function values(){ return $native.call(this); };\\n\\t }\\n\\t // Define iterator\\n\\t if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\\n\\t hide(proto, ITERATOR, $default);\\n\\t }\\n\\t // Plug for library\\n\\t Iterators[NAME] = $default;\\n\\t Iterators[TAG] = returnThis;\\n\\t if(DEFAULT){\\n\\t methods = {\\n\\t values: DEF_VALUES ? $default : getMethod(VALUES),\\n\\t keys: IS_SET ? $default : getMethod(KEYS),\\n\\t entries: $entries\\n\\t };\\n\\t if(FORCED)for(key in methods){\\n\\t if(!(key in proto))redefine(proto, key, methods[key]);\\n\\t } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\\n\\t }\\n\\t return methods;\\n\\t};\\n\\n/***/ },\\n/* 27 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = true;\\n\\n/***/ },\\n/* 28 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = __webpack_require__(10);\\n\\n/***/ },\\n/* 29 */\\n/***/ function(module, exports) {\\n\\n\\tvar hasOwnProperty = {}.hasOwnProperty;\\n\\tmodule.exports = function(it, key){\\n\\t return hasOwnProperty.call(it, key);\\n\\t};\\n\\n/***/ },\\n/* 30 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = {};\\n\\n/***/ },\\n/* 31 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\tvar create = __webpack_require__(32)\\n\\t , descriptor = __webpack_require__(19)\\n\\t , setToStringTag = __webpack_require__(47)\\n\\t , IteratorPrototype = {};\\n\\t\\n\\t// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\\n\\t__webpack_require__(10)(IteratorPrototype, __webpack_require__(48)('iterator'), function(){ return this; });\\n\\t\\n\\tmodule.exports = function(Constructor, NAME, next){\\n\\t Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});\\n\\t setToStringTag(Constructor, NAME + ' Iterator');\\n\\t};\\n\\n/***/ },\\n/* 32 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\\n\\tvar anObject = __webpack_require__(12)\\n\\t , dPs = __webpack_require__(33)\\n\\t , enumBugKeys = __webpack_require__(45)\\n\\t , IE_PROTO = __webpack_require__(42)('IE_PROTO')\\n\\t , Empty = function(){ /* empty */ }\\n\\t , PROTOTYPE = 'prototype';\\n\\t\\n\\t// Create object with fake `null` prototype: use iframe Object with cleared prototype\\n\\tvar createDict = function(){\\n\\t // Thrash, waste and sodomy: IE GC bug\\n\\t var iframe = __webpack_require__(17)('iframe')\\n\\t , i = enumBugKeys.length\\n\\t , lt = '<'\\n\\t , gt = '>'\\n\\t , iframeDocument;\\n\\t iframe.style.display = 'none';\\n\\t __webpack_require__(46).appendChild(iframe);\\n\\t iframe.src = 'javascript:'; // eslint-disable-line no-script-url\\n\\t // createDict = iframe.contentWindow.Object;\\n\\t // html.removeChild(iframe);\\n\\t iframeDocument = iframe.contentWindow.document;\\n\\t iframeDocument.open();\\n\\t iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\\n\\t iframeDocument.close();\\n\\t createDict = iframeDocument.F;\\n\\t while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];\\n\\t return createDict();\\n\\t};\\n\\t\\n\\tmodule.exports = Object.create || function create(O, Properties){\\n\\t var result;\\n\\t if(O !== null){\\n\\t Empty[PROTOTYPE] = anObject(O);\\n\\t result = new Empty;\\n\\t Empty[PROTOTYPE] = null;\\n\\t // add \\\"__proto__\\\" for Object.getPrototypeOf polyfill\\n\\t result[IE_PROTO] = O;\\n\\t } else result = createDict();\\n\\t return Properties === undefined ? result : dPs(result, Properties);\\n\\t};\\n\\n\\n/***/ },\\n/* 33 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar dP = __webpack_require__(11)\\n\\t , anObject = __webpack_require__(12)\\n\\t , getKeys = __webpack_require__(34);\\n\\t\\n\\tmodule.exports = __webpack_require__(15) ? Object.defineProperties : function defineProperties(O, Properties){\\n\\t anObject(O);\\n\\t var keys = getKeys(Properties)\\n\\t , length = keys.length\\n\\t , i = 0\\n\\t , P;\\n\\t while(length > i)dP.f(O, P = keys[i++], Properties[P]);\\n\\t return O;\\n\\t};\\n\\n/***/ },\\n/* 34 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 19.1.2.14 / 15.2.3.14 Object.keys(O)\\n\\tvar $keys = __webpack_require__(35)\\n\\t , enumBugKeys = __webpack_require__(45);\\n\\t\\n\\tmodule.exports = Object.keys || function keys(O){\\n\\t return $keys(O, enumBugKeys);\\n\\t};\\n\\n/***/ },\\n/* 35 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar has = __webpack_require__(29)\\n\\t , toIObject = __webpack_require__(36)\\n\\t , arrayIndexOf = __webpack_require__(39)(false)\\n\\t , IE_PROTO = __webpack_require__(42)('IE_PROTO');\\n\\t\\n\\tmodule.exports = function(object, names){\\n\\t var O = toIObject(object)\\n\\t , i = 0\\n\\t , result = []\\n\\t , key;\\n\\t for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);\\n\\t // Don't enum bug & hidden keys\\n\\t while(names.length > i)if(has(O, key = names[i++])){\\n\\t ~arrayIndexOf(result, key) || result.push(key);\\n\\t }\\n\\t return result;\\n\\t};\\n\\n/***/ },\\n/* 36 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// to indexed object, toObject with fallback for non-array-like ES3 strings\\n\\tvar IObject = __webpack_require__(37)\\n\\t , defined = __webpack_require__(25);\\n\\tmodule.exports = function(it){\\n\\t return IObject(defined(it));\\n\\t};\\n\\n/***/ },\\n/* 37 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// fallback for non-array-like ES3 and non-enumerable old V8 strings\\n\\tvar cof = __webpack_require__(38);\\n\\tmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){\\n\\t return cof(it) == 'String' ? it.split('') : Object(it);\\n\\t};\\n\\n/***/ },\\n/* 38 */\\n/***/ function(module, exports) {\\n\\n\\tvar toString = {}.toString;\\n\\t\\n\\tmodule.exports = function(it){\\n\\t return toString.call(it).slice(8, -1);\\n\\t};\\n\\n/***/ },\\n/* 39 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// false -> Array#indexOf\\n\\t// true -> Array#includes\\n\\tvar toIObject = __webpack_require__(36)\\n\\t , toLength = __webpack_require__(40)\\n\\t , toIndex = __webpack_require__(41);\\n\\tmodule.exports = function(IS_INCLUDES){\\n\\t return function($this, el, fromIndex){\\n\\t var O = toIObject($this)\\n\\t , length = toLength(O.length)\\n\\t , index = toIndex(fromIndex, length)\\n\\t , value;\\n\\t // Array#includes uses SameValueZero equality algorithm\\n\\t if(IS_INCLUDES && el != el)while(length > index){\\n\\t value = O[index++];\\n\\t if(value != value)return true;\\n\\t // Array#toIndex ignores holes, Array#includes - not\\n\\t } else for(;length > index; index++)if(IS_INCLUDES || index in O){\\n\\t if(O[index] === el)return IS_INCLUDES || index || 0;\\n\\t } return !IS_INCLUDES && -1;\\n\\t };\\n\\t};\\n\\n/***/ },\\n/* 40 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 7.1.15 ToLength\\n\\tvar toInteger = __webpack_require__(24)\\n\\t , min = Math.min;\\n\\tmodule.exports = function(it){\\n\\t return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\\n\\t};\\n\\n/***/ },\\n/* 41 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar toInteger = __webpack_require__(24)\\n\\t , max = Math.max\\n\\t , min = Math.min;\\n\\tmodule.exports = function(index, length){\\n\\t index = toInteger(index);\\n\\t return index < 0 ? max(index + length, 0) : min(index, length);\\n\\t};\\n\\n/***/ },\\n/* 42 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar shared = __webpack_require__(43)('keys')\\n\\t , uid = __webpack_require__(44);\\n\\tmodule.exports = function(key){\\n\\t return shared[key] || (shared[key] = uid(key));\\n\\t};\\n\\n/***/ },\\n/* 43 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar global = __webpack_require__(6)\\n\\t , SHARED = '__core-js_shared__'\\n\\t , store = global[SHARED] || (global[SHARED] = {});\\n\\tmodule.exports = function(key){\\n\\t return store[key] || (store[key] = {});\\n\\t};\\n\\n/***/ },\\n/* 44 */\\n/***/ function(module, exports) {\\n\\n\\tvar id = 0\\n\\t , px = Math.random();\\n\\tmodule.exports = function(key){\\n\\t return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\\n\\t};\\n\\n/***/ },\\n/* 45 */\\n/***/ function(module, exports) {\\n\\n\\t// IE 8- don't enum bug keys\\n\\tmodule.exports = (\\n\\t 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\\n\\t).split(',');\\n\\n/***/ },\\n/* 46 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = __webpack_require__(6).document && document.documentElement;\\n\\n/***/ },\\n/* 47 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar def = __webpack_require__(11).f\\n\\t , has = __webpack_require__(29)\\n\\t , TAG = __webpack_require__(48)('toStringTag');\\n\\t\\n\\tmodule.exports = function(it, tag, stat){\\n\\t if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\\n\\t};\\n\\n/***/ },\\n/* 48 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar store = __webpack_require__(43)('wks')\\n\\t , uid = __webpack_require__(44)\\n\\t , Symbol = __webpack_require__(6).Symbol\\n\\t , USE_SYMBOL = typeof Symbol == 'function';\\n\\t\\n\\tvar $exports = module.exports = function(name){\\n\\t return store[name] || (store[name] =\\n\\t USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\\n\\t};\\n\\t\\n\\t$exports.store = store;\\n\\n/***/ },\\n/* 49 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\\n\\tvar has = __webpack_require__(29)\\n\\t , toObject = __webpack_require__(50)\\n\\t , IE_PROTO = __webpack_require__(42)('IE_PROTO')\\n\\t , ObjectProto = Object.prototype;\\n\\t\\n\\tmodule.exports = Object.getPrototypeOf || function(O){\\n\\t O = toObject(O);\\n\\t if(has(O, IE_PROTO))return O[IE_PROTO];\\n\\t if(typeof O.constructor == 'function' && O instanceof O.constructor){\\n\\t return O.constructor.prototype;\\n\\t } return O instanceof Object ? ObjectProto : null;\\n\\t};\\n\\n/***/ },\\n/* 50 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 7.1.13 ToObject(argument)\\n\\tvar defined = __webpack_require__(25);\\n\\tmodule.exports = function(it){\\n\\t return Object(defined(it));\\n\\t};\\n\\n/***/ },\\n/* 51 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(52);\\n\\tvar global = __webpack_require__(6)\\n\\t , hide = __webpack_require__(10)\\n\\t , Iterators = __webpack_require__(30)\\n\\t , TO_STRING_TAG = __webpack_require__(48)('toStringTag');\\n\\t\\n\\tfor(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){\\n\\t var NAME = collections[i]\\n\\t , Collection = global[NAME]\\n\\t , proto = Collection && Collection.prototype;\\n\\t if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);\\n\\t Iterators[NAME] = Iterators.Array;\\n\\t}\\n\\n/***/ },\\n/* 52 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\tvar addToUnscopables = __webpack_require__(53)\\n\\t , step = __webpack_require__(54)\\n\\t , Iterators = __webpack_require__(30)\\n\\t , toIObject = __webpack_require__(36);\\n\\t\\n\\t// 22.1.3.4 Array.prototype.entries()\\n\\t// 22.1.3.13 Array.prototype.keys()\\n\\t// 22.1.3.29 Array.prototype.values()\\n\\t// 22.1.3.30 Array.prototype[@@iterator]()\\n\\tmodule.exports = __webpack_require__(26)(Array, 'Array', function(iterated, kind){\\n\\t this._t = toIObject(iterated); // target\\n\\t this._i = 0; // next index\\n\\t this._k = kind; // kind\\n\\t// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\\n\\t}, function(){\\n\\t var O = this._t\\n\\t , kind = this._k\\n\\t , index = this._i++;\\n\\t if(!O || index >= O.length){\\n\\t this._t = undefined;\\n\\t return step(1);\\n\\t }\\n\\t if(kind == 'keys' )return step(0, index);\\n\\t if(kind == 'values')return step(0, O[index]);\\n\\t return step(0, [index, O[index]]);\\n\\t}, 'values');\\n\\t\\n\\t// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\\n\\tIterators.Arguments = Iterators.Array;\\n\\t\\n\\taddToUnscopables('keys');\\n\\taddToUnscopables('values');\\n\\taddToUnscopables('entries');\\n\\n/***/ },\\n/* 53 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(){ /* empty */ };\\n\\n/***/ },\\n/* 54 */\\n/***/ function(module, exports) {\\n\\n\\tmodule.exports = function(done, value){\\n\\t return {value: value, done: !!done};\\n\\t};\\n\\n/***/ },\\n/* 55 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports.f = __webpack_require__(48);\\n\\n/***/ },\\n/* 56 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = { \\\"default\\\": __webpack_require__(57), __esModule: true };\\n\\n/***/ },\\n/* 57 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(58);\\n\\tvar $Object = __webpack_require__(7).Object;\\n\\tmodule.exports = function getOwnPropertyNames(it){\\n\\t return $Object.getOwnPropertyNames(it);\\n\\t};\\n\\n/***/ },\\n/* 58 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 19.1.2.7 Object.getOwnPropertyNames(O)\\n\\t__webpack_require__(59)('getOwnPropertyNames', function(){\\n\\t return __webpack_require__(60).f;\\n\\t});\\n\\n/***/ },\\n/* 59 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// most Object methods by ES6 should accept primitives\\n\\tvar $export = __webpack_require__(5)\\n\\t , core = __webpack_require__(7)\\n\\t , fails = __webpack_require__(16);\\n\\tmodule.exports = function(KEY, exec){\\n\\t var fn = (core.Object || {})[KEY] || Object[KEY]\\n\\t , exp = {};\\n\\t exp[KEY] = exec(fn);\\n\\t $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\\n\\t};\\n\\n/***/ },\\n/* 60 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\\n\\tvar toIObject = __webpack_require__(36)\\n\\t , gOPN = __webpack_require__(61).f\\n\\t , toString = {}.toString;\\n\\t\\n\\tvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\\n\\t ? Object.getOwnPropertyNames(window) : [];\\n\\t\\n\\tvar getWindowNames = function(it){\\n\\t try {\\n\\t return gOPN(it);\\n\\t } catch(e){\\n\\t return windowNames.slice();\\n\\t }\\n\\t};\\n\\t\\n\\tmodule.exports.f = function getOwnPropertyNames(it){\\n\\t return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\\n\\t};\\n\\n\\n/***/ },\\n/* 61 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\\n\\tvar $keys = __webpack_require__(35)\\n\\t , hiddenKeys = __webpack_require__(45).concat('length', 'prototype');\\n\\t\\n\\texports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){\\n\\t return $keys(O, hiddenKeys);\\n\\t};\\n\\n/***/ },\\n/* 62 */\\n/***/ function(module, exports) {\\n\\n\\t\\\"use strict\\\";\\n\\t\\n\\texports.__esModule = true;\\n\\t\\n\\texports.default = function (instance, Constructor) {\\n\\t if (!(instance instanceof Constructor)) {\\n\\t throw new TypeError(\\\"Cannot call a class as a function\\\");\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 63 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t\\\"use strict\\\";\\n\\t\\n\\texports.__esModule = true;\\n\\t\\n\\tvar _defineProperty = __webpack_require__(2);\\n\\t\\n\\tvar _defineProperty2 = _interopRequireDefault(_defineProperty);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = function () {\\n\\t function defineProperties(target, props) {\\n\\t for (var i = 0; i < props.length; i++) {\\n\\t var descriptor = props[i];\\n\\t descriptor.enumerable = descriptor.enumerable || false;\\n\\t descriptor.configurable = true;\\n\\t if (\\\"value\\\" in descriptor) descriptor.writable = true;\\n\\t (0, _defineProperty2.default)(target, descriptor.key, descriptor);\\n\\t }\\n\\t }\\n\\t\\n\\t return function (Constructor, protoProps, staticProps) {\\n\\t if (protoProps) defineProperties(Constructor.prototype, protoProps);\\n\\t if (staticProps) defineProperties(Constructor, staticProps);\\n\\t return Constructor;\\n\\t };\\n\\t}();\\n\\n/***/ },\\n/* 64 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\t/**\\r\\n\\t * Array.find\\r\\n\\t */\\n\\tif (!Array.prototype.find) {\\n\\t Array.prototype.find = function (predicate) {\\n\\t 'use strict';\\n\\t\\n\\t if (this == null) {\\n\\t throw new TypeError('Array.prototype.find called on null or undefined');\\n\\t }\\n\\t if (typeof predicate !== 'function') {\\n\\t throw new TypeError('predicate must be a function');\\n\\t }\\n\\t var list = Object(this);\\n\\t var length = list.length >>> 0;\\n\\t var thisArg = arguments[1];\\n\\t var value;\\n\\t\\n\\t for (var i = 0; i < length; i++) {\\n\\t value = list[i];\\n\\t if (predicate.call(thisArg, value, i, list)) {\\n\\t return value;\\n\\t }\\n\\t }\\n\\t return undefined;\\n\\t };\\n\\t}\\n\\t\\n\\t/*\\r\\n\\t * classList.js: Cross-browser full element.classList implementation.\\r\\n\\t * 1.1.20150312\\r\\n\\t *\\r\\n\\t * By Eli Grey, http://eligrey.com\\r\\n\\t * License: Dedicated to the public domain.\\r\\n\\t * See https://github.com/eligrey/classList.js/blob/master/LICENSE.md\\r\\n\\t */\\n\\t/*global self, document, DOMException */\\n\\t/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */\\n\\tif (\\\"document\\\" in self) {\\n\\t // Full polyfill for browsers with no classList support\\n\\t // Including IE < Edge missing SVGElement.classList\\n\\t if (!(\\\"classList\\\" in document.createElement(\\\"_\\\")) || document.createElementNS && !(\\\"classList\\\" in document.createElementNS(\\\"http://www.w3.org/2000/svg\\\", \\\"g\\\"))) {\\n\\t\\n\\t (function (view) {\\n\\t\\n\\t \\\"use strict\\\";\\n\\t\\n\\t if (!('Element' in view)) return;\\n\\t\\n\\t var classListProp = \\\"classList\\\",\\n\\t protoProp = \\\"prototype\\\",\\n\\t elemCtrProto = view.Element[protoProp],\\n\\t objCtr = Object,\\n\\t strTrim = String[protoProp].trim || function () {\\n\\t return this.replace(/^\\\\s+|\\\\s+$/g, \\\"\\\");\\n\\t },\\n\\t arrIndexOf = Array[protoProp].indexOf || function (item) {\\n\\t var i = 0,\\n\\t len = this.length;\\n\\t for (; i < len; i++) {\\n\\t if (i in this && this[i] === item) {\\n\\t return i;\\n\\t }\\n\\t }\\n\\t return -1;\\n\\t }\\n\\t // Vendors: please allow content code to instantiate DOMExceptions\\n\\t ,\\n\\t DOMEx = function DOMEx(type, message) {\\n\\t this.name = type;\\n\\t this.code = DOMException[type];\\n\\t this.message = message;\\n\\t },\\n\\t checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {\\n\\t if (token === \\\"\\\") {\\n\\t throw new DOMEx(\\\"SYNTAX_ERR\\\", \\\"An invalid or illegal string was specified\\\");\\n\\t }\\n\\t if (/\\\\s/.test(token)) {\\n\\t throw new DOMEx(\\\"INVALID_CHARACTER_ERR\\\", \\\"String contains an invalid character\\\");\\n\\t }\\n\\t return arrIndexOf.call(classList, token);\\n\\t },\\n\\t ClassList = function ClassList(elem) {\\n\\t var trimmedClasses = strTrim.call(elem.getAttribute(\\\"class\\\") || \\\"\\\"),\\n\\t classes = trimmedClasses ? trimmedClasses.split(/\\\\s+/) : [],\\n\\t i = 0,\\n\\t len = classes.length;\\n\\t for (; i < len; i++) {\\n\\t this.push(classes[i]);\\n\\t }\\n\\t this._updateClassName = function () {\\n\\t elem.setAttribute(\\\"class\\\", this.toString());\\n\\t };\\n\\t },\\n\\t classListProto = ClassList[protoProp] = [],\\n\\t classListGetter = function classListGetter() {\\n\\t return new ClassList(this);\\n\\t };\\n\\t // Most DOMException implementations don't allow calling DOMException's toString()\\n\\t // on non-DOMExceptions. Error's toString() is sufficient here.\\n\\t DOMEx[protoProp] = Error[protoProp];\\n\\t classListProto.item = function (i) {\\n\\t return this[i] || null;\\n\\t };\\n\\t classListProto.contains = function (token) {\\n\\t token += \\\"\\\";\\n\\t return checkTokenAndGetIndex(this, token) !== -1;\\n\\t };\\n\\t classListProto.add = function () {\\n\\t var tokens = arguments,\\n\\t i = 0,\\n\\t l = tokens.length,\\n\\t token,\\n\\t updated = false;\\n\\t do {\\n\\t token = tokens[i] + \\\"\\\";\\n\\t if (checkTokenAndGetIndex(this, token) === -1) {\\n\\t this.push(token);\\n\\t updated = true;\\n\\t }\\n\\t } while (++i < l);\\n\\t\\n\\t if (updated) {\\n\\t this._updateClassName();\\n\\t }\\n\\t };\\n\\t classListProto.remove = function () {\\n\\t var tokens = arguments,\\n\\t i = 0,\\n\\t l = tokens.length,\\n\\t token,\\n\\t updated = false,\\n\\t index;\\n\\t do {\\n\\t token = tokens[i] + \\\"\\\";\\n\\t index = checkTokenAndGetIndex(this, token);\\n\\t while (index !== -1) {\\n\\t this.splice(index, 1);\\n\\t updated = true;\\n\\t index = checkTokenAndGetIndex(this, token);\\n\\t }\\n\\t } while (++i < l);\\n\\t\\n\\t if (updated) {\\n\\t this._updateClassName();\\n\\t }\\n\\t };\\n\\t classListProto.toggle = function (token, force) {\\n\\t token += \\\"\\\";\\n\\t\\n\\t var result = this.contains(token),\\n\\t method = result ? force !== true && \\\"remove\\\" : force !== false && \\\"add\\\";\\n\\t\\n\\t if (method) {\\n\\t this[method](token);\\n\\t }\\n\\t\\n\\t if (force === true || force === false) {\\n\\t return force;\\n\\t } else {\\n\\t return !result;\\n\\t }\\n\\t };\\n\\t classListProto.toString = function () {\\n\\t return this.join(\\\" \\\");\\n\\t };\\n\\t\\n\\t if (objCtr.defineProperty) {\\n\\t var classListPropDesc = {\\n\\t get: classListGetter,\\n\\t enumerable: true,\\n\\t configurable: true\\n\\t };\\n\\t try {\\n\\t objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\\n\\t } catch (ex) {\\n\\t // IE 8 doesn't support enumerable:true\\n\\t if (ex.number === -0x7FF5EC54) {\\n\\t classListPropDesc.enumerable = false;\\n\\t objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);\\n\\t }\\n\\t }\\n\\t } else if (objCtr[protoProp].__defineGetter__) {\\n\\t elemCtrProto.__defineGetter__(classListProp, classListGetter);\\n\\t }\\n\\t })(self);\\n\\t } else {\\n\\t // There is full or partial native classList support, so just check if we need\\n\\t // to normalize the add/remove and toggle APIs.\\n\\t\\n\\t (function () {\\n\\t \\\"use strict\\\";\\n\\t\\n\\t var testElement = document.createElement(\\\"_\\\");\\n\\t\\n\\t testElement.classList.add(\\\"c1\\\", \\\"c2\\\");\\n\\t\\n\\t // Polyfill for IE 10/11 and Firefox <26, where classList.add and\\n\\t // classList.remove exist but support only one argument at a time.\\n\\t if (!testElement.classList.contains(\\\"c2\\\")) {\\n\\t var createMethod = function createMethod(method) {\\n\\t var original = DOMTokenList.prototype[method];\\n\\t\\n\\t DOMTokenList.prototype[method] = function (token) {\\n\\t var i,\\n\\t len = arguments.length;\\n\\t\\n\\t for (i = 0; i < len; i++) {\\n\\t token = arguments[i];\\n\\t original.call(this, token);\\n\\t }\\n\\t };\\n\\t };\\n\\t createMethod('add');\\n\\t createMethod('remove');\\n\\t }\\n\\t\\n\\t testElement.classList.toggle(\\\"c3\\\", false);\\n\\t\\n\\t // Polyfill for IE 10 and Firefox <24, where classList.toggle does not\\n\\t // support the second argument.\\n\\t if (testElement.classList.contains(\\\"c3\\\")) {\\n\\t var _toggle = DOMTokenList.prototype.toggle;\\n\\t\\n\\t DOMTokenList.prototype.toggle = function (token, force) {\\n\\t if (1 in arguments && !this.contains(token) === !force) {\\n\\t return force;\\n\\t } else {\\n\\t return _toggle.call(this, token);\\n\\t }\\n\\t };\\n\\t }\\n\\t\\n\\t testElement = null;\\n\\t })();\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 65 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\texports.getJSON = getJSON;\\n\\texports.getScrollBarWidth = getScrollBarWidth;\\n\\texports.translations = translations;\\n\\texports.delayer = delayer;\\n\\texports.VueFixer = VueFixer;\\n\\t// coerce convert som types of data into another type\\n\\tvar coerce = exports.coerce = {\\n\\t // Convert a string to booleam. Otherwise, return the value without modification, so if is not boolean, Vue throw a warning.\\n\\t boolean: function boolean(val) {\\n\\t return typeof val === 'string' ? val === '' || val === 'true' ? true : val === 'false' || val === 'null' || val === 'undefined' ? false : val : val;\\n\\t },\\n\\t // Attempt to convert a string value to a Number. Otherwise, return 0.\\n\\t number: function number(val) {\\n\\t var alt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\\n\\t return typeof val === 'number' ? val : val === undefined || val === null || isNaN(Number(val)) ? alt : Number(val);\\n\\t },\\n\\t // Attempt to convert to string any value, except for null or undefined.\\n\\t string: function string(val) {\\n\\t return val === undefined || val === null ? '' : val + '';\\n\\t },\\n\\t // Pattern accept RegExp, function, or string (converted to RegExp). Otherwise return null.\\n\\t pattern: function pattern(val) {\\n\\t return val instanceof Function || val instanceof RegExp ? val : typeof val === 'string' ? new RegExp(val) : null;\\n\\t }\\n\\t};\\n\\t\\n\\tfunction getJSON(url) {\\n\\t var request = new window.XMLHttpRequest();\\n\\t var data = {};\\n\\t // p (-simulated- promise)\\n\\t var p = {\\n\\t then: function then(fn1, fn2) {\\n\\t return p.done(fn1).fail(fn2);\\n\\t },\\n\\t catch: function _catch(fn) {\\n\\t return p.fail(fn);\\n\\t },\\n\\t always: function always(fn) {\\n\\t return p.done(fn).fail(fn);\\n\\t }\\n\\t };\\n\\t ['done', 'fail'].forEach(function (name) {\\n\\t data[name] = [];\\n\\t p[name] = function (fn) {\\n\\t if (fn instanceof Function) data[name].push(fn);\\n\\t return p;\\n\\t };\\n\\t });\\n\\t p.done(JSON.parse);\\n\\t request.onreadystatechange = function () {\\n\\t if (request.readyState === 4) {\\n\\t var response;\\n\\t var i;\\n\\t var value;\\n\\t\\n\\t (function () {\\n\\t var e = { status: request.status };\\n\\t if (request.status === 200) {\\n\\t try {\\n\\t response = request.responseText;\\n\\t\\n\\t for (i in data.done) {\\n\\t value = data.done[i](response);\\n\\t\\n\\t if (value !== undefined) {\\n\\t response = value;\\n\\t }\\n\\t }\\n\\t } catch (err) {\\n\\t data.fail.forEach(function (fail) {\\n\\t return fail(err);\\n\\t });\\n\\t }\\n\\t } else {\\n\\t data.fail.forEach(function (fail) {\\n\\t return fail(e);\\n\\t });\\n\\t }\\n\\t })();\\n\\t }\\n\\t };\\n\\t request.open('GET', url);\\n\\t request.setRequestHeader('Accept', 'application/json');\\n\\t request.send();\\n\\t return p;\\n\\t}\\n\\t\\n\\tfunction getScrollBarWidth() {\\n\\t if (document.documentElement.scrollHeight <= document.documentElement.clientHeight) {\\n\\t return 0;\\n\\t }\\n\\t var inner = document.createElement('p');\\n\\t inner.style.width = '100%';\\n\\t inner.style.height = '200px';\\n\\t\\n\\t var outer = document.createElement('div');\\n\\t outer.style.position = 'absolute';\\n\\t outer.style.top = '0px';\\n\\t outer.style.left = '0px';\\n\\t outer.style.visibility = 'hidden';\\n\\t outer.style.width = '200px';\\n\\t outer.style.height = '150px';\\n\\t outer.style.overflow = 'hidden';\\n\\t outer.appendChild(inner);\\n\\t\\n\\t document.body.appendChild(outer);\\n\\t var w1 = inner.offsetWidth;\\n\\t outer.style.overflow = 'scroll';\\n\\t var w2 = inner.offsetWidth;\\n\\t if (w1 === w2) w2 = outer.clientWidth;\\n\\t\\n\\t document.body.removeChild(outer);\\n\\t\\n\\t return w1 - w2;\\n\\t}\\n\\t\\n\\t// return all the translations or the default language (english)\\n\\tfunction translations() {\\n\\t var lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';\\n\\t\\n\\t var text = {\\n\\t daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],\\n\\t limit: 'Limit reached ({{limit}} items max).',\\n\\t loading: 'Loading...',\\n\\t minLength: 'Min. Length',\\n\\t months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\\n\\t notSelected: 'Nothing Selected',\\n\\t required: 'Required',\\n\\t search: 'Search'\\n\\t };\\n\\t return window.VueStrapLang ? window.VueStrapLang(lang) : text;\\n\\t}\\n\\t\\n\\t// delayer: set a function that execute after a delay\\n\\t// @params (function, delay_prop or value, default_value)\\n\\tfunction delayer(fn, varTimer) {\\n\\t var ifNaN = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\\n\\t\\n\\t function toInt(el) {\\n\\t return (/^[0-9]+$/.test(el) ? Number(el) || 1 : null\\n\\t );\\n\\t }\\n\\t var timerId;\\n\\t return function () {\\n\\t var _this = this;\\n\\t\\n\\t for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\\n\\t args[_key] = arguments[_key];\\n\\t }\\n\\t\\n\\t if (timerId) clearTimeout(timerId);\\n\\t timerId = setTimeout(function () {\\n\\t fn.apply(_this, args);\\n\\t }, toInt(varTimer) || toInt(this[varTimer]) || ifNaN);\\n\\t };\\n\\t}\\n\\t\\n\\t// Fix a vue instance Lifecycle to vue 1/2 (just the basic elements, is not a real parser, so this work only if your code is compatible with both)\\n\\t// (Waiting for testing)\\n\\tfunction VueFixer(vue) {\\n\\t var vue2 = !window.Vue || !window.Vue.partial;\\n\\t var mixin = {\\n\\t computed: {\\n\\t vue2: function vue2() {\\n\\t return !this.$dispatch;\\n\\t }\\n\\t }\\n\\t };\\n\\t if (!vue2) {\\n\\t //translate vue2 attributes to vue1\\n\\t if (vue.beforeCreate) {\\n\\t mixin.create = vue.beforeCreate;\\n\\t delete vue.beforeCreate;\\n\\t }\\n\\t if (vue.beforeMount) {\\n\\t vue.beforeCompile = vue.beforeMount;\\n\\t delete vue.beforeMount;\\n\\t }\\n\\t if (vue.mounted) {\\n\\t vue.ready = vue.mounted;\\n\\t delete vue.mounted;\\n\\t }\\n\\t } else {\\n\\t //translate vue1 attributes to vue2\\n\\t if (vue.beforeCompile) {\\n\\t vue.beforeMount = vue.beforeCompile;\\n\\t delete vue.beforeCompile;\\n\\t }\\n\\t if (vue.compiled) {\\n\\t mixin.compiled = vue.compiled;\\n\\t delete vue.compiled;\\n\\t }\\n\\t if (vue.ready) {\\n\\t vue.mounted = vue.ready;\\n\\t delete vue.ready;\\n\\t }\\n\\t }\\n\\t if (!vue.mixins) {\\n\\t vue.mixins = [];\\n\\t }\\n\\t vue.mixins.unshift(mixin);\\n\\t return vue;\\n\\t}\\n\\n/***/ },\\n/* 66 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t/**\\r\\n\\t * Click outside directive\\r\\n\\t */\\n\\tvar binded = [];\\n\\t\\n\\tfunction handler(e) {\\n\\t binded.forEach(function (el) {\\n\\t if (!el.node.contains(e.target)) el.callback(e);\\n\\t });\\n\\t}\\n\\t\\n\\tfunction addListener(node, callback) {\\n\\t if (!binded.length) document.addEventListener('click', handler, false);\\n\\t binded.push({ node: node, callback: callback });\\n\\t}\\n\\t\\n\\tfunction removeListener(node, callback) {\\n\\t binded = binded.filter(function (el) {\\n\\t return el.node !== node ? true : !callback ? false : el.callback !== callback;\\n\\t });\\n\\t if (!binded.length) document.removeEventListener('click', handler, false);\\n\\t}\\n\\t\\n\\texports.default = {\\n\\t bind: function bind(el, binding) {\\n\\t removeListener(el, binding.value);\\n\\t if (typeof binding.value !== 'function') {\\n\\t if (process.env.NODE_ENV !== 'production') {\\n\\t Vue.util.warn('ClickOutside only work with a function, received: v-' + binding.name + '=\\\"' + binding.expression + '\\\"');\\n\\t }\\n\\t } else {\\n\\t addListener(el, binding.value);\\n\\t }\\n\\t },\\n\\t update: function update(el, binding) {\\n\\t if (binding.value !== binding.oldValue) {\\n\\t removeListener(el, binding.oldValue);\\n\\t addListener(el, binding.value);\\n\\t }\\n\\t },\\n\\t unbind: function unbind(el, binding) {\\n\\t removeListener(el, binding.value);\\n\\t }\\n\\t};\\n\\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(67)))\\n\\n/***/ },\\n/* 67 */\\n/***/ function(module, exports) {\\n\\n\\t// shim for using process in browser\\n\\tvar process = module.exports = {};\\n\\t\\n\\t// cached from whatever global is present so that test runners that stub it\\n\\t// don't break things. But we need to wrap it in a try catch in case it is\\n\\t// wrapped in strict mode code which doesn't define any globals. It's inside a\\n\\t// function because try/catches deoptimize in certain engines.\\n\\t\\n\\tvar cachedSetTimeout;\\n\\tvar cachedClearTimeout;\\n\\t\\n\\tfunction defaultSetTimout() {\\n\\t throw new Error('setTimeout has not been defined');\\n\\t}\\n\\tfunction defaultClearTimeout () {\\n\\t throw new Error('clearTimeout has not been defined');\\n\\t}\\n\\t(function () {\\n\\t try {\\n\\t if (typeof setTimeout === 'function') {\\n\\t cachedSetTimeout = setTimeout;\\n\\t } else {\\n\\t cachedSetTimeout = defaultSetTimout;\\n\\t }\\n\\t } catch (e) {\\n\\t cachedSetTimeout = defaultSetTimout;\\n\\t }\\n\\t try {\\n\\t if (typeof clearTimeout === 'function') {\\n\\t cachedClearTimeout = clearTimeout;\\n\\t } else {\\n\\t cachedClearTimeout = defaultClearTimeout;\\n\\t }\\n\\t } catch (e) {\\n\\t cachedClearTimeout = defaultClearTimeout;\\n\\t }\\n\\t} ())\\n\\tfunction runTimeout(fun) {\\n\\t if (cachedSetTimeout === setTimeout) {\\n\\t //normal enviroments in sane situations\\n\\t return setTimeout(fun, 0);\\n\\t }\\n\\t // if setTimeout wasn't available but was latter defined\\n\\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\\n\\t cachedSetTimeout = setTimeout;\\n\\t return setTimeout(fun, 0);\\n\\t }\\n\\t try {\\n\\t // when when somebody has screwed with setTimeout but no I.E. maddness\\n\\t return cachedSetTimeout(fun, 0);\\n\\t } catch(e){\\n\\t try {\\n\\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n\\t return cachedSetTimeout.call(null, fun, 0);\\n\\t } catch(e){\\n\\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\\n\\t return cachedSetTimeout.call(this, fun, 0);\\n\\t }\\n\\t }\\n\\t\\n\\t\\n\\t}\\n\\tfunction runClearTimeout(marker) {\\n\\t if (cachedClearTimeout === clearTimeout) {\\n\\t //normal enviroments in sane situations\\n\\t return clearTimeout(marker);\\n\\t }\\n\\t // if clearTimeout wasn't available but was latter defined\\n\\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\\n\\t cachedClearTimeout = clearTimeout;\\n\\t return clearTimeout(marker);\\n\\t }\\n\\t try {\\n\\t // when when somebody has screwed with setTimeout but no I.E. maddness\\n\\t return cachedClearTimeout(marker);\\n\\t } catch (e){\\n\\t try {\\n\\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\\n\\t return cachedClearTimeout.call(null, marker);\\n\\t } catch (e){\\n\\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\\n\\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\\n\\t return cachedClearTimeout.call(this, marker);\\n\\t }\\n\\t }\\n\\t\\n\\t\\n\\t\\n\\t}\\n\\tvar queue = [];\\n\\tvar draining = false;\\n\\tvar currentQueue;\\n\\tvar queueIndex = -1;\\n\\t\\n\\tfunction cleanUpNextTick() {\\n\\t if (!draining || !currentQueue) {\\n\\t return;\\n\\t }\\n\\t draining = false;\\n\\t if (currentQueue.length) {\\n\\t queue = currentQueue.concat(queue);\\n\\t } else {\\n\\t queueIndex = -1;\\n\\t }\\n\\t if (queue.length) {\\n\\t drainQueue();\\n\\t }\\n\\t}\\n\\t\\n\\tfunction drainQueue() {\\n\\t if (draining) {\\n\\t return;\\n\\t }\\n\\t var timeout = runTimeout(cleanUpNextTick);\\n\\t draining = true;\\n\\t\\n\\t var len = queue.length;\\n\\t while(len) {\\n\\t currentQueue = queue;\\n\\t queue = [];\\n\\t while (++queueIndex < len) {\\n\\t if (currentQueue) {\\n\\t currentQueue[queueIndex].run();\\n\\t }\\n\\t }\\n\\t queueIndex = -1;\\n\\t len = queue.length;\\n\\t }\\n\\t currentQueue = null;\\n\\t draining = false;\\n\\t runClearTimeout(timeout);\\n\\t}\\n\\t\\n\\tprocess.nextTick = function (fun) {\\n\\t var args = new Array(arguments.length - 1);\\n\\t if (arguments.length > 1) {\\n\\t for (var i = 1; i < arguments.length; i++) {\\n\\t args[i - 1] = arguments[i];\\n\\t }\\n\\t }\\n\\t queue.push(new Item(fun, args));\\n\\t if (queue.length === 1 && !draining) {\\n\\t runTimeout(drainQueue);\\n\\t }\\n\\t};\\n\\t\\n\\t// v8 likes predictible objects\\n\\tfunction Item(fun, array) {\\n\\t this.fun = fun;\\n\\t this.array = array;\\n\\t}\\n\\tItem.prototype.run = function () {\\n\\t this.fun.apply(null, this.array);\\n\\t};\\n\\tprocess.title = 'browser';\\n\\tprocess.browser = true;\\n\\tprocess.env = {};\\n\\tprocess.argv = [];\\n\\tprocess.version = ''; // empty string to avoid regexp issues\\n\\tprocess.versions = {};\\n\\t\\n\\tfunction noop() {}\\n\\t\\n\\tprocess.on = noop;\\n\\tprocess.addListener = noop;\\n\\tprocess.once = noop;\\n\\tprocess.off = noop;\\n\\tprocess.removeListener = noop;\\n\\tprocess.removeAllListeners = noop;\\n\\tprocess.emit = noop;\\n\\t\\n\\tprocess.binding = function (name) {\\n\\t throw new Error('process.binding is not supported');\\n\\t};\\n\\t\\n\\tprocess.cwd = function () { return '/' };\\n\\tprocess.chdir = function (dir) {\\n\\t throw new Error('process.chdir is not supported');\\n\\t};\\n\\tprocess.umask = function() { return 0; };\\n\\n\\n/***/ },\\n/* 68 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t/* WEBPACK VAR INJECTION */(function(process) {'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t/**\\r\\n\\t * Click outside directive\\r\\n\\t */\\n\\tvar HANDLER = '_vue_scroll_handler';\\n\\tvar events = ['resize', 'scroll'];\\n\\t\\n\\tfunction bind(el, binding) {\\n\\t unbind(el);\\n\\t\\n\\t var callback = binding.value;\\n\\t if (typeof callback !== 'function') {\\n\\t if (process.env.NODE_ENV !== 'production') {\\n\\t Vue.util.warn('ClickOutside only work with a function value, received: v-' + binding.name + '=\\\"' + binding.expression + '\\\"');\\n\\t }\\n\\t } else {\\n\\t el[HANDLER] = function (e) {\\n\\t callback(e);\\n\\t };\\n\\t events.forEach(function (e) {\\n\\t window.addEventListener(e, el[HANDLER], false);\\n\\t });\\n\\t document.addEventListener('load', el[HANDLER], false);\\n\\t setTimeout(function () {\\n\\t el[HANDLER]();\\n\\t }, 0);\\n\\t }\\n\\t}\\n\\t\\n\\tfunction unbind(el) {\\n\\t events.forEach(function (e) {\\n\\t window.removeEventListener(e, el[HANDLER], false);\\n\\t });\\n\\t document.removeEventListener('load', el[HANDLER], false);\\n\\t delete el[HANDLER];\\n\\t}\\n\\t\\n\\texports.default = {\\n\\t bind: bind,\\n\\t unbind: unbind,\\n\\t update: function update(el, binding) {\\n\\t if (binding.value !== binding.oldValue) bind(el, binding);\\n\\t }\\n\\t};\\n\\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(67)))\\n\\n/***/ },\\n/* 69 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(70)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(71)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Accordion.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-d4b75a92\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-d4b75a92\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Accordion.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 70 */\\n/***/ function(module, exports) {\\n\\n\\t\\\"use strict\\\";\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t type: {\\n\\t type: String,\\n\\t default: null\\n\\t },\\n\\t oneAtAtime: {\\n\\t type: Boolean,\\n\\t default: false\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t openChild: function openChild(child) {\\n\\t if (this.oneAtAtime) {\\n\\t this.$children.forEach(function (item) {\\n\\t if (child !== item) {\\n\\t item.open = false;\\n\\t }\\n\\t });\\n\\t }\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._isAccordion = true;\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 71 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"panel-group\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-d4b75a92\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 72 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(73)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(74)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Affix.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-5ebddebf\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-5ebddebf\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Affix.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 73 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _Scroll = __webpack_require__(68);\\n\\t\\n\\tvar _Scroll2 = _interopRequireDefault(_Scroll);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t directives: {\\n\\t Scroll: _Scroll2.default\\n\\t },\\n\\t props: {\\n\\t offset: {\\n\\t type: Number,\\n\\t default: 0\\n\\t }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t affixed: false\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t top: function top() {\\n\\t return this.offset > 0 ? this.offset + 'px' : null;\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t // from https://github.com/ant-design/ant-design/blob/master/components/affix/index.jsx#L20\\n\\t checkScroll: function checkScroll() {\\n\\t // if is hidden don't calculate anything\\n\\t if (!(this.$el.offsetWidth || this.$el.offsetHeight || this.$el.getClientRects().length)) {\\n\\t return;\\n\\t }\\n\\t // get window scroll and element position to detect if have to be normal or affixed\\n\\t var scroll = {};\\n\\t var element = {};\\n\\t var rect = this.$el.getBoundingClientRect();\\n\\t var body = document.body;\\n\\t var _arr = ['Top', 'Left'];\\n\\t for (var _i = 0; _i < _arr.length; _i++) {\\n\\t var type = _arr[_i];\\n\\t var t = type.toLowerCase();\\n\\t var ret = window['page' + (type === 'Top' ? 'Y' : 'X') + 'Offset'];\\n\\t var method = 'scroll' + type;\\n\\t if (typeof ret !== 'number') {\\n\\t // ie6,7,8 standard mode\\n\\t ret = document.documentElement[method];\\n\\t if (typeof ret !== 'number') {\\n\\t // quirks mode\\n\\t ret = document.body[method];\\n\\t }\\n\\t }\\n\\t scroll[t] = ret;\\n\\t element[t] = scroll[t] + rect[t] - (this.$el['client' + type] || body['client' + type] || 0);\\n\\t }\\n\\t var fix = scroll.top > element.top - this.offset;\\n\\t if (this.affixed !== fix) {\\n\\t this.affixed = fix;\\n\\t }\\n\\t }\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 74 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"hidden-print hidden-xs hidden-sm\\\"\\n\\t }, [_vm._c('nav', {\\n\\t directives: [{\\n\\t name: \\\"scroll\\\",\\n\\t rawName: \\\"v-scroll\\\",\\n\\t value: (_vm.checkScroll),\\n\\t expression: \\\"checkScroll\\\"\\n\\t }],\\n\\t staticClass: \\\"bs-docs-sidebar\\\",\\n\\t class: {\\n\\t affix: _vm.affixed\\n\\t },\\n\\t style: ({\\n\\t marginTop: _vm.top\\n\\t })\\n\\t }, [_vm._t(\\\"default\\\")], 2)])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-5ebddebf\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 75 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(76)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(80)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(81)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Alert.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-af7c1f6a\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-af7c1f6a\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Alert.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 76 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(77);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-af7c1f6a!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alert.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-af7c1f6a!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Alert.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 77 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.fade-enter-active,\\\\r\\\\n.fade-leave-active {\\\\r\\\\n transition: opacity .3s ease;\\\\n}\\\\n.fade-enter,\\\\r\\\\n.fade-leave-active {\\\\r\\\\n height: 0;\\\\r\\\\n opacity: 0;\\\\n}\\\\n.alert.top {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 30px;\\\\r\\\\n margin: 0 auto;\\\\r\\\\n left: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 1050;\\\\n}\\\\n.alert.top-right {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 30px;\\\\r\\\\n right: 50px;\\\\r\\\\n z-index: 1050;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Alert.vue?71a91c1a\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAoDA;;EAEA,6BAAA;CACA;AACA;;EAEA,UAAA;EACA,WAAA;CACA;AACA;EACA,gBAAA;EACA,UAAA;EACA,eAAA;EACA,QAAA;EACA,SAAA;EACA,cAAA;CACA;AACA;EACA,gBAAA;EACA,UAAA;EACA,YAAA;EACA,cAAA;CACA\\\",\\\"file\\\":\\\"Alert.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <transition name=\\\\\\\"fade\\\\\\\">\\\\r\\\\n <div v-show=\\\\\\\"val\\\\\\\" :class=\\\\\\\"['alert', 'alert-'+type, placement]\\\\\\\" :style=\\\\\\\"{width:width}\\\\\\\" role=\\\\\\\"alert\\\\\\\">\\\\r\\\\n <button v-show=\\\\\\\"dismissable\\\\\\\" type=\\\\\\\"button\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"val = false\\\\\\\">\\\\r\\\\n <span>&times;</span>\\\\r\\\\n </button>\\\\r\\\\n <slot></slot>\\\\r\\\\n </div>\\\\r\\\\n </transition>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {coerce, delayer} from './utils/utils.js'\\\\r\\\\n\\\\r\\\\nvar DURATION = 0\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n dismissable: {type: Boolean, default: false},\\\\r\\\\n duration: {default: DURATION},\\\\r\\\\n placement: {type: String},\\\\r\\\\n type: {type: String},\\\\r\\\\n value: {type: Boolean, default: true },\\\\r\\\\n width: {type: String}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n val: this.value\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n durationNum () { return coerce.number(this.duration, DURATION) }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n val (val) {\\\\r\\\\n if (val && this.durationNum > 0) { this._delayClose() }\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n if (this.val !== val) {\\\\r\\\\n this.val = val\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this._delayClose = delayer(function () {\\\\r\\\\n this.val = false\\\\r\\\\n }, 'durationNum')\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.fade-enter-active,\\\\r\\\\n.fade-leave-active {\\\\r\\\\n transition: opacity .3s ease;\\\\r\\\\n}\\\\r\\\\n.fade-enter,\\\\r\\\\n.fade-leave-active {\\\\r\\\\n height: 0;\\\\r\\\\n opacity: 0;\\\\r\\\\n}\\\\r\\\\n.alert.top {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 30px;\\\\r\\\\n margin: 0 auto;\\\\r\\\\n left: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 1050;\\\\r\\\\n}\\\\r\\\\n.alert.top-right {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 30px;\\\\r\\\\n right: 50px;\\\\r\\\\n z-index: 1050;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 78 */\\n/***/ function(module, exports) {\\n\\n\\t/*\\r\\n\\t\\tMIT License http://www.opensource.org/licenses/mit-license.php\\r\\n\\t\\tAuthor Tobias Koppers @sokra\\r\\n\\t*/\\r\\n\\t// css base code, injected by the css-loader\\r\\n\\tmodule.exports = function() {\\r\\n\\t\\tvar list = [];\\r\\n\\t\\r\\n\\t\\t// return the list of modules as css string\\r\\n\\t\\tlist.toString = function toString() {\\r\\n\\t\\t\\tvar result = [];\\r\\n\\t\\t\\tfor(var i = 0; i < this.length; i++) {\\r\\n\\t\\t\\t\\tvar item = this[i];\\r\\n\\t\\t\\t\\tif(item[2]) {\\r\\n\\t\\t\\t\\t\\tresult.push(\\\"@media \\\" + item[2] + \\\"{\\\" + item[1] + \\\"}\\\");\\r\\n\\t\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t\\tresult.push(item[1]);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn result.join(\\\"\\\");\\r\\n\\t\\t};\\r\\n\\t\\r\\n\\t\\t// import a list of modules into the list\\r\\n\\t\\tlist.i = function(modules, mediaQuery) {\\r\\n\\t\\t\\tif(typeof modules === \\\"string\\\")\\r\\n\\t\\t\\t\\tmodules = [[null, modules, \\\"\\\"]];\\r\\n\\t\\t\\tvar alreadyImportedModules = {};\\r\\n\\t\\t\\tfor(var i = 0; i < this.length; i++) {\\r\\n\\t\\t\\t\\tvar id = this[i][0];\\r\\n\\t\\t\\t\\tif(typeof id === \\\"number\\\")\\r\\n\\t\\t\\t\\t\\talreadyImportedModules[id] = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tfor(i = 0; i < modules.length; i++) {\\r\\n\\t\\t\\t\\tvar item = modules[i];\\r\\n\\t\\t\\t\\t// skip already imported module\\r\\n\\t\\t\\t\\t// this implementation is not 100% perfect for weird media query combinations\\r\\n\\t\\t\\t\\t// when a module is imported multiple times with different media queries.\\r\\n\\t\\t\\t\\t// I hope this will never occur (Hey this way we have smaller bundles)\\r\\n\\t\\t\\t\\tif(typeof item[0] !== \\\"number\\\" || !alreadyImportedModules[item[0]]) {\\r\\n\\t\\t\\t\\t\\tif(mediaQuery && !item[2]) {\\r\\n\\t\\t\\t\\t\\t\\titem[2] = mediaQuery;\\r\\n\\t\\t\\t\\t\\t} else if(mediaQuery) {\\r\\n\\t\\t\\t\\t\\t\\titem[2] = \\\"(\\\" + item[2] + \\\") and (\\\" + mediaQuery + \\\")\\\";\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\tlist.push(item);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t};\\r\\n\\t\\treturn list;\\r\\n\\t};\\r\\n\\n\\n/***/ },\\n/* 79 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t/*\\n\\t\\tMIT License http://www.opensource.org/licenses/mit-license.php\\n\\t\\tAuthor Tobias Koppers @sokra\\n\\t*/\\n\\tvar stylesInDom = {},\\n\\t\\tmemoize = function(fn) {\\n\\t\\t\\tvar memo;\\n\\t\\t\\treturn function () {\\n\\t\\t\\t\\tif (typeof memo === \\\"undefined\\\") memo = fn.apply(this, arguments);\\n\\t\\t\\t\\treturn memo;\\n\\t\\t\\t};\\n\\t\\t},\\n\\t\\tisOldIE = memoize(function() {\\n\\t\\t\\treturn /msie [6-9]\\\\b/.test(window.navigator.userAgent.toLowerCase());\\n\\t\\t}),\\n\\t\\tgetHeadElement = memoize(function () {\\n\\t\\t\\treturn document.head || document.getElementsByTagName(\\\"head\\\")[0];\\n\\t\\t}),\\n\\t\\tsingletonElement = null,\\n\\t\\tsingletonCounter = 0,\\n\\t\\tstyleElementsInsertedAtTop = [];\\n\\t\\n\\tmodule.exports = function(list, options) {\\n\\t\\tif(false) {\\n\\t\\t\\tif(typeof document !== \\\"object\\\") throw new Error(\\\"The style-loader cannot be used in a non-browser environment\\\");\\n\\t\\t}\\n\\t\\n\\t\\toptions = options || {};\\n\\t\\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\\n\\t\\t// tags it will allow on a page\\n\\t\\tif (typeof options.singleton === \\\"undefined\\\") options.singleton = isOldIE();\\n\\t\\n\\t\\t// By default, add <style> tags to the bottom of <head>.\\n\\t\\tif (typeof options.insertAt === \\\"undefined\\\") options.insertAt = \\\"bottom\\\";\\n\\t\\n\\t\\tvar styles = listToStyles(list);\\n\\t\\taddStylesToDom(styles, options);\\n\\t\\n\\t\\treturn function update(newList) {\\n\\t\\t\\tvar mayRemove = [];\\n\\t\\t\\tfor(var i = 0; i < styles.length; i++) {\\n\\t\\t\\t\\tvar item = styles[i];\\n\\t\\t\\t\\tvar domStyle = stylesInDom[item.id];\\n\\t\\t\\t\\tdomStyle.refs--;\\n\\t\\t\\t\\tmayRemove.push(domStyle);\\n\\t\\t\\t}\\n\\t\\t\\tif(newList) {\\n\\t\\t\\t\\tvar newStyles = listToStyles(newList);\\n\\t\\t\\t\\taddStylesToDom(newStyles, options);\\n\\t\\t\\t}\\n\\t\\t\\tfor(var i = 0; i < mayRemove.length; i++) {\\n\\t\\t\\t\\tvar domStyle = mayRemove[i];\\n\\t\\t\\t\\tif(domStyle.refs === 0) {\\n\\t\\t\\t\\t\\tfor(var j = 0; j < domStyle.parts.length; j++)\\n\\t\\t\\t\\t\\t\\tdomStyle.parts[j]();\\n\\t\\t\\t\\t\\tdelete stylesInDom[domStyle.id];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t};\\n\\t}\\n\\t\\n\\tfunction addStylesToDom(styles, options) {\\n\\t\\tfor(var i = 0; i < styles.length; i++) {\\n\\t\\t\\tvar item = styles[i];\\n\\t\\t\\tvar domStyle = stylesInDom[item.id];\\n\\t\\t\\tif(domStyle) {\\n\\t\\t\\t\\tdomStyle.refs++;\\n\\t\\t\\t\\tfor(var j = 0; j < domStyle.parts.length; j++) {\\n\\t\\t\\t\\t\\tdomStyle.parts[j](item.parts[j]);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tfor(; j < item.parts.length; j++) {\\n\\t\\t\\t\\t\\tdomStyle.parts.push(addStyle(item.parts[j], options));\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tvar parts = [];\\n\\t\\t\\t\\tfor(var j = 0; j < item.parts.length; j++) {\\n\\t\\t\\t\\t\\tparts.push(addStyle(item.parts[j], options));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\t\\n\\tfunction listToStyles(list) {\\n\\t\\tvar styles = [];\\n\\t\\tvar newStyles = {};\\n\\t\\tfor(var i = 0; i < list.length; i++) {\\n\\t\\t\\tvar item = list[i];\\n\\t\\t\\tvar id = item[0];\\n\\t\\t\\tvar css = item[1];\\n\\t\\t\\tvar media = item[2];\\n\\t\\t\\tvar sourceMap = item[3];\\n\\t\\t\\tvar part = {css: css, media: media, sourceMap: sourceMap};\\n\\t\\t\\tif(!newStyles[id])\\n\\t\\t\\t\\tstyles.push(newStyles[id] = {id: id, parts: [part]});\\n\\t\\t\\telse\\n\\t\\t\\t\\tnewStyles[id].parts.push(part);\\n\\t\\t}\\n\\t\\treturn styles;\\n\\t}\\n\\t\\n\\tfunction insertStyleElement(options, styleElement) {\\n\\t\\tvar head = getHeadElement();\\n\\t\\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\\n\\t\\tif (options.insertAt === \\\"top\\\") {\\n\\t\\t\\tif(!lastStyleElementInsertedAtTop) {\\n\\t\\t\\t\\thead.insertBefore(styleElement, head.firstChild);\\n\\t\\t\\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\\n\\t\\t\\t\\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\thead.appendChild(styleElement);\\n\\t\\t\\t}\\n\\t\\t\\tstyleElementsInsertedAtTop.push(styleElement);\\n\\t\\t} else if (options.insertAt === \\\"bottom\\\") {\\n\\t\\t\\thead.appendChild(styleElement);\\n\\t\\t} else {\\n\\t\\t\\tthrow new Error(\\\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\\\");\\n\\t\\t}\\n\\t}\\n\\t\\n\\tfunction removeStyleElement(styleElement) {\\n\\t\\tstyleElement.parentNode.removeChild(styleElement);\\n\\t\\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\\n\\t\\tif(idx >= 0) {\\n\\t\\t\\tstyleElementsInsertedAtTop.splice(idx, 1);\\n\\t\\t}\\n\\t}\\n\\t\\n\\tfunction createStyleElement(options) {\\n\\t\\tvar styleElement = document.createElement(\\\"style\\\");\\n\\t\\tstyleElement.type = \\\"text/css\\\";\\n\\t\\tinsertStyleElement(options, styleElement);\\n\\t\\treturn styleElement;\\n\\t}\\n\\t\\n\\tfunction addStyle(obj, options) {\\n\\t\\tvar styleElement, update, remove;\\n\\t\\n\\t\\tif (options.singleton) {\\n\\t\\t\\tvar styleIndex = singletonCounter++;\\n\\t\\t\\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\\n\\t\\t\\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\\n\\t\\t\\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\\n\\t\\t} else {\\n\\t\\t\\tstyleElement = createStyleElement(options);\\n\\t\\t\\tupdate = applyToTag.bind(null, styleElement);\\n\\t\\t\\tremove = function() {\\n\\t\\t\\t\\tremoveStyleElement(styleElement);\\n\\t\\t\\t};\\n\\t\\t}\\n\\t\\n\\t\\tupdate(obj);\\n\\t\\n\\t\\treturn function updateStyle(newObj) {\\n\\t\\t\\tif(newObj) {\\n\\t\\t\\t\\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\\n\\t\\t\\t\\t\\treturn;\\n\\t\\t\\t\\tupdate(obj = newObj);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tremove();\\n\\t\\t\\t}\\n\\t\\t};\\n\\t}\\n\\t\\n\\tvar replaceText = (function () {\\n\\t\\tvar textStore = [];\\n\\t\\n\\t\\treturn function (index, replacement) {\\n\\t\\t\\ttextStore[index] = replacement;\\n\\t\\t\\treturn textStore.filter(Boolean).join('\\\\n');\\n\\t\\t};\\n\\t})();\\n\\t\\n\\tfunction applyToSingletonTag(styleElement, index, remove, obj) {\\n\\t\\tvar css = remove ? \\\"\\\" : obj.css;\\n\\t\\n\\t\\tif (styleElement.styleSheet) {\\n\\t\\t\\tstyleElement.styleSheet.cssText = replaceText(index, css);\\n\\t\\t} else {\\n\\t\\t\\tvar cssNode = document.createTextNode(css);\\n\\t\\t\\tvar childNodes = styleElement.childNodes;\\n\\t\\t\\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\\n\\t\\t\\tif (childNodes.length) {\\n\\t\\t\\t\\tstyleElement.insertBefore(cssNode, childNodes[index]);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tstyleElement.appendChild(cssNode);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\t\\n\\tfunction applyToTag(styleElement, obj) {\\n\\t\\tvar css = obj.css;\\n\\t\\tvar media = obj.media;\\n\\t\\tvar sourceMap = obj.sourceMap;\\n\\t\\n\\t\\tif (media) {\\n\\t\\t\\tstyleElement.setAttribute(\\\"media\\\", media);\\n\\t\\t}\\n\\t\\n\\t\\tif (sourceMap) {\\n\\t\\t\\t// https://developer.chrome.com/devtools/docs/javascript-debugging\\n\\t\\t\\t// this makes source maps inside style tags work properly in Chrome\\n\\t\\t\\tcss += '\\\\n/*# sourceURL=' + sourceMap.sources[0] + ' */';\\n\\t\\t\\t// http://stackoverflow.com/a/26603875\\n\\t\\t\\tcss += \\\"\\\\n/*# sourceMappingURL=data:application/json;base64,\\\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \\\" */\\\";\\n\\t\\t}\\n\\t\\n\\t\\tif (styleElement.styleSheet) {\\n\\t\\t\\tstyleElement.styleSheet.cssText = css;\\n\\t\\t} else {\\n\\t\\t\\twhile(styleElement.firstChild) {\\n\\t\\t\\t\\tstyleElement.removeChild(styleElement.firstChild);\\n\\t\\t\\t}\\n\\t\\t\\tstyleElement.appendChild(document.createTextNode(css));\\n\\t\\t}\\n\\t}\\n\\n\\n/***/ },\\n/* 80 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar DURATION = 0; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t dismissable: { type: Boolean, default: false },\\n\\t duration: { default: DURATION },\\n\\t placement: { type: String },\\n\\t type: { type: String },\\n\\t value: { type: Boolean, default: true },\\n\\t width: { type: String }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t val: this.value\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t durationNum: function durationNum() {\\n\\t return _utils.coerce.number(this.duration, DURATION);\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t val: function val(_val) {\\n\\t if (_val && this.durationNum > 0) {\\n\\t this._delayClose();\\n\\t }\\n\\t this.$emit('input', _val);\\n\\t },\\n\\t value: function value(val) {\\n\\t if (this.val !== val) {\\n\\t this.val = val;\\n\\t }\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._delayClose = (0, _utils.delayer)(function () {\\n\\t this.val = false;\\n\\t }, 'durationNum');\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 81 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": \\\"fade\\\"\\n\\t }\\n\\t }, [_vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t class: ['alert', 'alert-' + _vm.type, _vm.placement],\\n\\t style: ({\\n\\t width: _vm.width\\n\\t }),\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"alert\\\"\\n\\t }\\n\\t }, [_vm._c('button', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.dismissable),\\n\\t expression: \\\"dismissable\\\"\\n\\t }],\\n\\t staticClass: \\\"close\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.val = false\\n\\t }\\n\\t }\\n\\t }, [_vm._c('span', [_vm._v(\\\"×\\\")])]), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\")], 2)])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-af7c1f6a\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 82 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(83)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(85)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(86)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Aside.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-3a4bde27\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-3a4bde27\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Aside.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 83 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(84);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-3a4bde27!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Aside.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-3a4bde27!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Aside.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 84 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.aside-open {\\\\r\\\\n transition: transform 0.3s;\\\\n}\\\\n.aside-open.has-push-right {\\\\r\\\\n transform: translateX(-300px);\\\\n}\\\\n.aside {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n z-index: 1049;\\\\r\\\\n overflow: auto;\\\\r\\\\n background: #fff;\\\\n}\\\\n.aside.left {\\\\r\\\\n left: 0;\\\\r\\\\n right: auto;\\\\n}\\\\n.aside.right {\\\\r\\\\n left: auto;\\\\r\\\\n right: 0;\\\\n}\\\\n.slideleft-enter {\\\\r\\\\n transform:translateX(-100%);\\\\n}\\\\n.slideleft-enter-active {\\\\r\\\\n animation:slideleft-in .3s;\\\\n}\\\\n.slideleft-leave-active {\\\\r\\\\n animation:slideleft-out .3s;\\\\n}\\\\n@keyframes slideleft-in {\\\\n0% {\\\\r\\\\n transform: translateX(-100%);\\\\r\\\\n opacity: 0;\\\\n}\\\\n100% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\n}\\\\n}\\\\n@keyframes slideleft-out {\\\\n0% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\n}\\\\n100% {\\\\r\\\\n transform: translateX(-100%);\\\\r\\\\n opacity: 0;\\\\n}\\\\n}\\\\n.slideright-enter-active {\\\\r\\\\n animation:slideright-in .3s;\\\\n}\\\\n.slideright-leave-active {\\\\r\\\\n animation:slideright-out .3s;\\\\n}\\\\n@keyframes slideright-in {\\\\n0% {\\\\r\\\\n transform: translateX(100%);\\\\r\\\\n opacity: 0;\\\\n}\\\\n100% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\n}\\\\n}\\\\n@keyframes slideright-out {\\\\n0% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\n}\\\\n100% {\\\\r\\\\n transform: translateX(100%);\\\\r\\\\n opacity: 0;\\\\n}\\\\n}\\\\n.aside:focus {\\\\r\\\\n outline: 0;\\\\n}\\\\n@media (max-width: 991px) {\\\\n.aside {\\\\r\\\\n min-width: 240px;\\\\n}\\\\n}\\\\n.aside .aside-dialog .aside-header {\\\\r\\\\n border-bottom: 1px solid #e5e5e5;\\\\r\\\\n min-height: 16.43px;\\\\r\\\\n padding: 6px 15px;\\\\r\\\\n background: #337ab7;\\\\r\\\\n color: #fff;\\\\n}\\\\n.aside .aside-dialog .aside-header .close {\\\\r\\\\n margin-right: -8px;\\\\r\\\\n padding: 4px 8px;\\\\r\\\\n color: #fff;\\\\r\\\\n font-size: 25px;\\\\r\\\\n opacity: .8;\\\\n}\\\\n.aside .aside-dialog .aside-body {\\\\r\\\\n position: relative;\\\\r\\\\n padding: 15px;\\\\n}\\\\n.aside .aside-dialog .aside-footer {\\\\r\\\\n padding: 15px;\\\\r\\\\n text-align: right;\\\\r\\\\n border-top: 1px solid #e5e5e5;\\\\n}\\\\n.aside .aside-dialog .aside-footer .btn+.btn {\\\\r\\\\n margin-left: 5px;\\\\r\\\\n margin-bottom: 0;\\\\n}\\\\n.aside .aside-dialog .aside-footer .btn-group .btn+.btn {\\\\r\\\\n margin-left: -1px;\\\\n}\\\\n.aside .aside-dialog .aside-footer .btn-block+.btn-block {\\\\r\\\\n margin-left: 0;\\\\n}\\\\n.aside-backdrop {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n left: 0;\\\\r\\\\n z-index: 1040;\\\\r\\\\n opacity: 0;\\\\r\\\\n transition: opacity .3s ease;\\\\r\\\\n background-color: #000;\\\\n}\\\\n.aside-backdrop.in {\\\\r\\\\n opacity: .5;\\\\r\\\\n filter: alpha(opacity=50);\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Aside.vue?5739621f\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAkFA;EACA,2BAAA;CACA;AACA;EACA,8BAAA;CACA;AACA;EACA,gBAAA;EACA,OAAA;EACA,UAAA;EACA,cAAA;EACA,eAAA;EACA,iBAAA;CACA;AACA;EACA,QAAA;EACA,YAAA;CACA;AACA;EACA,WAAA;EACA,SAAA;CACA;AACA;EACA,4BAAA;CACA;AACA;EACA,2BAAA;CACA;AACA;EACA,4BAAA;CACA;AACA;AACA;IACA,6BAAA;IACA,WAAA;CACA;AACA;IACA,yBAAA;IACA,WAAA;CACA;CACA;AACA;AACA;IACA,yBAAA;IACA,WAAA;CACA;AACA;IACA,6BAAA;IACA,WAAA;CACA;CACA;AACA;EACA,4BAAA;CACA;AACA;EACA,6BAAA;CACA;AACA;AACA;IACA,4BAAA;IACA,WAAA;CACA;AACA;IACA,yBAAA;IACA,WAAA;CACA;CACA;AACA;AACA;IACA,yBAAA;IACA,WAAA;CACA;AACA;IACA,4BAAA;IACA,WAAA;CACA;CACA;AACA;IACA,WAAA;CACA;AACA;AACA;IACA,iBAAA;CACA;CACA;AACA;EACA,iCAAA;EACA,oBAAA;EACA,kBAAA;EACA,oBAAA;EACA,YAAA;CACA;AACA;EACA,mBAAA;EACA,iBAAA;EACA,YAAA;EACA,gBAAA;EACA,YAAA;CACA;AACA;EACA,mBAAA;EACA,cAAA;CACA;AACA;EACA,cAAA;EACA,kBAAA;EACA,8BAAA;CACA;AACA;EACA,iBAAA;EACA,iBAAA;CACA;AACA;EACA,kBAAA;CACA;AACA;EACA,eAAA;CACA;AACA;EACA,gBAAA;EACA,OAAA;EACA,SAAA;EACA,UAAA;EACA,QAAA;EACA,cAAA;EACA,WAAA;EACA,6BAAA;EACA,uBAAA;CACA;AACA;EACA,YAAA;EACA,0BAAA;CACA\\\",\\\"file\\\":\\\"Aside.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <transition :name=\\\\\\\"'slide' + placement\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"aside\\\\\\\" v-if=\\\\\\\"show\\\\\\\" :style=\\\\\\\"{width:width+'px'}\\\\\\\" :class=\\\\\\\"placement\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"aside-dialog\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"aside-content\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"aside-header\\\\\\\">\\\\r\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"close\\\\\\\" @click='trigger_close'><span>&times;</span></button>\\\\r\\\\n <h4 class=\\\\\\\"aside-title\\\\\\\"><slot name=\\\\\\\"header\\\\\\\">{{ header }}</slot></h4>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"aside-body\\\\\\\"><slot></slot></div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </transition>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {getScrollBarWidth} from './utils/utils.js'\\\\r\\\\nimport $ from './utils/NodeList.js'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n header: {type: String},\\\\r\\\\n placement: {type: String, default: 'right'},\\\\r\\\\n show: {type: Boolean, required: true},\\\\r\\\\n width: {type: Number, default: 320}\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n show (val, old) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n this.$emit(this.show ? 'open' : 'close')\\\\r\\\\n const body = document.body\\\\r\\\\n const scrollBarWidth = getScrollBarWidth()\\\\r\\\\n if (val) {\\\\r\\\\n if (!this._backdrop) {\\\\r\\\\n this._backdrop = document.createElement('div')\\\\r\\\\n }\\\\r\\\\n this._backdrop.className = 'aside-backdrop'\\\\r\\\\n body.appendChild(this._backdrop)\\\\r\\\\n body.classList.add('modal-open')\\\\r\\\\n if (scrollBarWidth !== 0) {\\\\r\\\\n body.style.paddingRight = scrollBarWidth + 'px'\\\\r\\\\n }\\\\r\\\\n // request property that requires layout to force a layout\\\\r\\\\n var x = this._backdrop.clientHeight\\\\r\\\\n this._backdrop.classList.add('in')\\\\r\\\\n $(this._backdrop).on('click', () => this.trigger_close())\\\\r\\\\n } else {\\\\r\\\\n $(this._backdrop).on('transitionend', () => {\\\\r\\\\n $(this._backdrop).off()\\\\r\\\\n try {\\\\r\\\\n body.classList.remove('modal-open')\\\\r\\\\n body.style.paddingRight = '0'\\\\r\\\\n body.removeChild(this._backdrop)\\\\r\\\\n this._backdrop = null\\\\r\\\\n } catch (e) {}\\\\r\\\\n })\\\\r\\\\n this._backdrop.className = 'aside-backdrop'\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n trigger () {\\\\r\\\\n return {\\\\r\\\\n close: () => this.trigger_close(),\\\\r\\\\n open: () => this.trigger_open()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n trigger_close () {\\\\r\\\\n this.$emit( 'close' )\\\\r\\\\n },\\\\r\\\\n trigger_open() {\\\\r\\\\n this.$emit( 'open' )\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n this.$emit('trigger', () => this.trigger)\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.aside-open {\\\\r\\\\n transition: transform 0.3s;\\\\r\\\\n}\\\\r\\\\n.aside-open.has-push-right {\\\\r\\\\n transform: translateX(-300px);\\\\r\\\\n}\\\\r\\\\n.aside {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n z-index: 1049;\\\\r\\\\n overflow: auto;\\\\r\\\\n background: #fff;\\\\r\\\\n}\\\\r\\\\n.aside.left {\\\\r\\\\n left: 0;\\\\r\\\\n right: auto;\\\\r\\\\n}\\\\r\\\\n.aside.right {\\\\r\\\\n left: auto;\\\\r\\\\n right: 0;\\\\r\\\\n}\\\\r\\\\n.slideleft-enter {\\\\r\\\\n transform:translateX(-100%);\\\\r\\\\n}\\\\r\\\\n.slideleft-enter-active {\\\\r\\\\n animation:slideleft-in .3s;\\\\r\\\\n}\\\\r\\\\n.slideleft-leave-active {\\\\r\\\\n animation:slideleft-out .3s;\\\\r\\\\n}\\\\r\\\\n@keyframes slideleft-in {\\\\r\\\\n 0% {\\\\r\\\\n transform: translateX(-100%);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n@keyframes slideleft-out {\\\\r\\\\n 0% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: translateX(-100%);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n.slideright-enter-active {\\\\r\\\\n animation:slideright-in .3s;\\\\r\\\\n}\\\\r\\\\n.slideright-leave-active {\\\\r\\\\n animation:slideright-out .3s;\\\\r\\\\n}\\\\r\\\\n@keyframes slideright-in {\\\\r\\\\n 0% {\\\\r\\\\n transform: translateX(100%);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n@keyframes slideright-out {\\\\r\\\\n 0% {\\\\r\\\\n transform: translateX(0);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: translateX(100%);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n.aside:focus {\\\\r\\\\n outline: 0;\\\\r\\\\n}\\\\r\\\\n@media (max-width: 991px) {\\\\r\\\\n .aside {\\\\r\\\\n min-width: 240px;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-header {\\\\r\\\\n border-bottom: 1px solid #e5e5e5;\\\\r\\\\n min-height: 16.43px;\\\\r\\\\n padding: 6px 15px;\\\\r\\\\n background: #337ab7;\\\\r\\\\n color: #fff;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-header .close {\\\\r\\\\n margin-right: -8px;\\\\r\\\\n padding: 4px 8px;\\\\r\\\\n color: #fff;\\\\r\\\\n font-size: 25px;\\\\r\\\\n opacity: .8;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-body {\\\\r\\\\n position: relative;\\\\r\\\\n padding: 15px;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-footer {\\\\r\\\\n padding: 15px;\\\\r\\\\n text-align: right;\\\\r\\\\n border-top: 1px solid #e5e5e5;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-footer .btn+.btn {\\\\r\\\\n margin-left: 5px;\\\\r\\\\n margin-bottom: 0;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-footer .btn-group .btn+.btn {\\\\r\\\\n margin-left: -1px;\\\\r\\\\n}\\\\r\\\\n.aside .aside-dialog .aside-footer .btn-block+.btn-block {\\\\r\\\\n margin-left: 0;\\\\r\\\\n}\\\\r\\\\n.aside-backdrop {\\\\r\\\\n position: fixed;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n left: 0;\\\\r\\\\n z-index: 1040;\\\\r\\\\n opacity: 0;\\\\r\\\\n transition: opacity .3s ease;\\\\r\\\\n background-color: #000;\\\\r\\\\n}\\\\r\\\\n.aside-backdrop.in {\\\\r\\\\n opacity: .5;\\\\r\\\\n filter: alpha(opacity=50);\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 85 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t header: { type: String },\\n\\t placement: { type: String, default: 'right' },\\n\\t show: { type: Boolean, required: true },\\n\\t width: { type: Number, default: 320 }\\n\\t },\\n\\t watch: {\\n\\t show: function show(val, old) {\\n\\t var _this = this;\\n\\t\\n\\t this.$emit('input', val);\\n\\t this.$emit(this.show ? 'open' : 'close');\\n\\t var body = document.body;\\n\\t var scrollBarWidth = (0, _utils.getScrollBarWidth)();\\n\\t if (val) {\\n\\t if (!this._backdrop) {\\n\\t this._backdrop = document.createElement('div');\\n\\t }\\n\\t this._backdrop.className = 'aside-backdrop';\\n\\t body.appendChild(this._backdrop);\\n\\t body.classList.add('modal-open');\\n\\t if (scrollBarWidth !== 0) {\\n\\t body.style.paddingRight = scrollBarWidth + 'px';\\n\\t }\\n\\t // request property that requires layout to force a layout\\n\\t var x = this._backdrop.clientHeight;\\n\\t this._backdrop.classList.add('in');\\n\\t (0, _NodeList2.default)(this._backdrop).on('click', function () {\\n\\t return _this.trigger_close();\\n\\t });\\n\\t } else {\\n\\t (0, _NodeList2.default)(this._backdrop).on('transitionend', function () {\\n\\t (0, _NodeList2.default)(_this._backdrop).off();\\n\\t try {\\n\\t body.classList.remove('modal-open');\\n\\t body.style.paddingRight = '0';\\n\\t body.removeChild(_this._backdrop);\\n\\t _this._backdrop = null;\\n\\t } catch (e) {}\\n\\t });\\n\\t this._backdrop.className = 'aside-backdrop';\\n\\t }\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t trigger: function trigger() {\\n\\t var _this2 = this;\\n\\t\\n\\t return {\\n\\t close: function close() {\\n\\t return _this2.trigger_close();\\n\\t },\\n\\t open: function open() {\\n\\t return _this2.trigger_open();\\n\\t }\\n\\t };\\n\\t },\\n\\t trigger_close: function trigger_close() {\\n\\t this.$emit('close');\\n\\t },\\n\\t trigger_open: function trigger_open() {\\n\\t this.$emit('open');\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this3 = this;\\n\\t\\n\\t this.$emit('trigger', function () {\\n\\t return _this3.trigger;\\n\\t });\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 86 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": 'slide' + _vm.placement\\n\\t }\\n\\t }, [(_vm.show) ? _vm._c('div', {\\n\\t staticClass: \\\"aside\\\",\\n\\t class: _vm.placement,\\n\\t style: ({\\n\\t width: _vm.width + 'px'\\n\\t })\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"aside-dialog\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"aside-content\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"aside-header\\\"\\n\\t }, [_vm._c('button', {\\n\\t staticClass: \\\"close\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.trigger_close\\n\\t }\\n\\t }, [_vm._c('span', [_vm._v(\\\"×\\\")])]), _vm._v(\\\" \\\"), _vm._c('h4', {\\n\\t staticClass: \\\"aside-title\\\"\\n\\t }, [_vm._t(\\\"header\\\", [_vm._v(_vm._s(_vm.header))])], 2)]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"aside-body\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)])])]) : _vm._e()])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-3a4bde27\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 87 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(88)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(89)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\ButtonGroup.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-125eb0c8\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-125eb0c8\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] ButtonGroup.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 88 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t buttons: { default: true },\\n\\t justified: { type: Boolean, default: false },\\n\\t type: { type: String, default: 'default' },\\n\\t value: { default: null },\\n\\t vertical: { type: Boolean, default: false }\\n\\t },\\n\\t data: function data() {\\n\\t this._btnGroup = true;\\n\\t return {\\n\\t val: this.value\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t val: function val(_val) {\\n\\t this.$emit('input', _val);\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 89 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t class: {\\n\\t 'btn-group': _vm.buttons, 'btn-group-justified': _vm.justified, 'btn-group-vertical': _vm.vertical\\n\\t },\\n\\t attrs: {\\n\\t \\\"data-toggle\\\": _vm.buttons && 'buttons'\\n\\t }\\n\\t }, [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-125eb0c8\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 90 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(91)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(93)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(94)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Carousel.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t__vue_options__._scopeId = \\\"data-v-322dee41\\\"\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-322dee41\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-322dee41\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Carousel.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 91 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(92);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-322dee41&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Carousel.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-322dee41&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Carousel.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 92 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.carousel-control[data-v-322dee41] {\\\\r\\\\n cursor: pointer;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Carousel.vue?2f446342\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AA4GA;EACA,gBAAA;CACA\\\",\\\"file\\\":\\\"Carousel.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n<div class=\\\\\\\"carousel slide\\\\\\\" data-ride=\\\\\\\"carousel\\\\\\\">\\\\r\\\\n <!-- Indicators -->\\\\r\\\\n <ol class=\\\\\\\"carousel-indicators\\\\\\\" v-show=\\\\\\\"indicators\\\\\\\">\\\\r\\\\n <li v-for=\\\\\\\"(indicator,i) in indicator_list\\\\\\\" @click=\\\\\\\"indicatorClick(i)\\\\\\\" :class=\\\\\\\"{active:i === index}\\\\\\\"><span></span></li>\\\\r\\\\n </ol>\\\\r\\\\n <!-- Wrapper for slides -->\\\\r\\\\n <div class=\\\\\\\"carousel-inner\\\\\\\" role=\\\\\\\"listbox\\\\\\\">\\\\r\\\\n <slot></slot>\\\\r\\\\n </div>\\\\r\\\\n <!-- Controls -->\\\\r\\\\n <div v-show=\\\\\\\"controls\\\\\\\" class=\\\\\\\"carousel-controls hidden-xs\\\\\\\">\\\\r\\\\n <a class=\\\\\\\"left carousel-control\\\\\\\" role=\\\\\\\"button\\\\\\\" @click=\\\\\\\"prev\\\\\\\">\\\\r\\\\n <span class=\\\\\\\"glyphicon glyphicon-chevron-left\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></span>\\\\r\\\\n </a>\\\\r\\\\n <a class=\\\\\\\"right carousel-control\\\\\\\" role=\\\\\\\"button\\\\\\\" @click=\\\\\\\"next\\\\\\\">\\\\r\\\\n <span class=\\\\\\\"glyphicon glyphicon-chevron-right\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></span>\\\\r\\\\n </a>\\\\r\\\\n </div>\\\\r\\\\n</div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport $ from './utils/NodeList.js'\\\\r\\\\n// let coerce = {\\\\r\\\\n// interval: 'number'\\\\r\\\\n// }\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n indicators: {\\\\r\\\\n type: Boolean,\\\\r\\\\n default: true\\\\r\\\\n },\\\\r\\\\n controls: {\\\\r\\\\n type: Boolean,\\\\r\\\\n default: true\\\\r\\\\n },\\\\r\\\\n interval: {\\\\r\\\\n type: Number,\\\\r\\\\n default: 5000\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n indicator_list: [],\\\\r\\\\n index: 0,\\\\r\\\\n isAnimating: false\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n index (newVal, oldVal) {\\\\r\\\\n this.slide(newVal > oldVal ? 'left' : 'right', newVal, oldVal)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n indicatorClick (index) {\\\\r\\\\n if (this.isAnimating || this.index === index) return false\\\\r\\\\n this.isAnimating = true\\\\r\\\\n this.index = index\\\\r\\\\n },\\\\r\\\\n slide (direction, next, prev) {\\\\r\\\\n if (!this.$el) { return }\\\\r\\\\n const $slider = $('.item', this.$el)\\\\r\\\\n if (!$slider.length) { return }\\\\r\\\\n const selected = $slider[next] || $slider[0]\\\\r\\\\n $(selected).addClass(direction === 'left' ? 'next' : 'prev')\\\\r\\\\n // request property that requires layout to force a layout\\\\r\\\\n var x = selected.clientHeight\\\\r\\\\n $([$slider[prev], selected]).addClass(direction).on('transitionend', () => {\\\\r\\\\n $slider.off('transitionend').className = 'item'\\\\r\\\\n $(selected).addClass('active')\\\\r\\\\n this.isAnimating = false\\\\r\\\\n })\\\\r\\\\n },\\\\r\\\\n next () {\\\\r\\\\n if (!this.$el || this.isAnimating) { return false }\\\\r\\\\n this.isAnimating = true\\\\r\\\\n this.index + 1 < $('.item', this.$el).length ? this.index += 1 : this.index = 0\\\\r\\\\n },\\\\r\\\\n prev () {\\\\r\\\\n if (!this.$el || this.isAnimating) { return false }\\\\r\\\\n this.isAnimating = true\\\\r\\\\n this.index === 0 ? this.index = $('.item', this.$el).length - 1 : this.index -= 1\\\\r\\\\n },\\\\r\\\\n toggleInterval (val) {\\\\r\\\\n if (val === undefined) { val = this._intervalID }\\\\r\\\\n if(this._intervalID) {\\\\r\\\\n clearInterval(this._intervalID)\\\\r\\\\n delete this._intervalID\\\\r\\\\n }\\\\r\\\\n if(val && this.interval > 0) {\\\\r\\\\n this._intervalID = setInterval(this.next, this.interval)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n this.toggleInterval(true)\\\\r\\\\n $(this.$el).on('mouseenter', () => this.toggleInterval(false)).on('mouseleave', () => this.toggleInterval(true))\\\\r\\\\n },\\\\r\\\\n beforeDestroy () {\\\\r\\\\n this.toggleInterval(false)\\\\r\\\\n $(this.$el).off('mouseenter mouseleave')\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style scoped>\\\\r\\\\n.carousel-control {\\\\r\\\\n cursor: pointer;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 93 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t// let coerce = {\\n\\t// interval: 'number'\\n\\t// }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t indicators: {\\n\\t type: Boolean,\\n\\t default: true\\n\\t },\\n\\t controls: {\\n\\t type: Boolean,\\n\\t default: true\\n\\t },\\n\\t interval: {\\n\\t type: Number,\\n\\t default: 5000\\n\\t }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t indicator_list: [],\\n\\t index: 0,\\n\\t isAnimating: false\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t index: function index(newVal, oldVal) {\\n\\t this.slide(newVal > oldVal ? 'left' : 'right', newVal, oldVal);\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t indicatorClick: function indicatorClick(index) {\\n\\t if (this.isAnimating || this.index === index) return false;\\n\\t this.isAnimating = true;\\n\\t this.index = index;\\n\\t },\\n\\t slide: function slide(direction, next, prev) {\\n\\t var _this = this;\\n\\t\\n\\t if (!this.$el) {\\n\\t return;\\n\\t }\\n\\t var $slider = (0, _NodeList2.default)('.item', this.$el);\\n\\t if (!$slider.length) {\\n\\t return;\\n\\t }\\n\\t var selected = $slider[next] || $slider[0];\\n\\t (0, _NodeList2.default)(selected).addClass(direction === 'left' ? 'next' : 'prev');\\n\\t // request property that requires layout to force a layout\\n\\t var x = selected.clientHeight;\\n\\t (0, _NodeList2.default)([$slider[prev], selected]).addClass(direction).on('transitionend', function () {\\n\\t $slider.off('transitionend').className = 'item';\\n\\t (0, _NodeList2.default)(selected).addClass('active');\\n\\t _this.isAnimating = false;\\n\\t });\\n\\t },\\n\\t next: function next() {\\n\\t if (!this.$el || this.isAnimating) {\\n\\t return false;\\n\\t }\\n\\t this.isAnimating = true;\\n\\t this.index + 1 < (0, _NodeList2.default)('.item', this.$el).length ? this.index += 1 : this.index = 0;\\n\\t },\\n\\t prev: function prev() {\\n\\t if (!this.$el || this.isAnimating) {\\n\\t return false;\\n\\t }\\n\\t this.isAnimating = true;\\n\\t this.index === 0 ? this.index = (0, _NodeList2.default)('.item', this.$el).length - 1 : this.index -= 1;\\n\\t },\\n\\t toggleInterval: function toggleInterval(val) {\\n\\t if (val === undefined) {\\n\\t val = this._intervalID;\\n\\t }\\n\\t if (this._intervalID) {\\n\\t clearInterval(this._intervalID);\\n\\t delete this._intervalID;\\n\\t }\\n\\t if (val && this.interval > 0) {\\n\\t this._intervalID = setInterval(this.next, this.interval);\\n\\t }\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this2 = this;\\n\\t\\n\\t this.toggleInterval(true);\\n\\t (0, _NodeList2.default)(this.$el).on('mouseenter', function () {\\n\\t return _this2.toggleInterval(false);\\n\\t }).on('mouseleave', function () {\\n\\t return _this2.toggleInterval(true);\\n\\t });\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t this.toggleInterval(false);\\n\\t (0, _NodeList2.default)(this.$el).off('mouseenter mouseleave');\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 94 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"carousel slide\\\",\\n\\t attrs: {\\n\\t \\\"data-ride\\\": \\\"carousel\\\"\\n\\t }\\n\\t }, [_vm._c('ol', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.indicators),\\n\\t expression: \\\"indicators\\\"\\n\\t }],\\n\\t staticClass: \\\"carousel-indicators\\\"\\n\\t }, _vm._l((_vm.indicator_list), function(indicator, i) {\\n\\t return _vm._c('li', {\\n\\t class: {\\n\\t active: i === _vm.index\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.indicatorClick(i)\\n\\t }\\n\\t }\\n\\t }, [_vm._c('span')])\\n\\t })), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"carousel-inner\\\",\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"listbox\\\"\\n\\t }\\n\\t }, [_vm._t(\\\"default\\\")], 2), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.controls),\\n\\t expression: \\\"controls\\\"\\n\\t }],\\n\\t staticClass: \\\"carousel-controls hidden-xs\\\"\\n\\t }, [_vm._c('a', {\\n\\t staticClass: \\\"left carousel-control\\\",\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.prev\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t staticClass: \\\"glyphicon glyphicon-chevron-left\\\",\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t }\\n\\t })]), _vm._v(\\\" \\\"), _vm._c('a', {\\n\\t staticClass: \\\"right carousel-control\\\",\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.next\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t staticClass: \\\"glyphicon glyphicon-chevron-right\\\",\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t }\\n\\t })])])])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-322dee41\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 95 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(96)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(98)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(99)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Checkbox.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t__vue_options__._scopeId = \\\"data-v-6922bf24\\\"\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-6922bf24\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-6922bf24\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Checkbox.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 96 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(97);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-6922bf24&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkbox.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-6922bf24&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Checkbox.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 97 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\nlabel.checkbox[data-v-6922bf24] {\\\\r\\\\n position: relative;\\\\r\\\\n padding-left: 18px;\\\\n}\\\\nlabel.checkbox > input[data-v-6922bf24] {\\\\r\\\\n box-sizing: border-box;\\\\r\\\\n position: absolute;\\\\r\\\\n z-index: -1;\\\\r\\\\n padding: 0;\\\\r\\\\n opacity: 0;\\\\r\\\\n margin: 0;\\\\n}\\\\nlabel.checkbox > .icon[data-v-6922bf24] {\\\\r\\\\n position: absolute;\\\\r\\\\n top: .2rem;\\\\r\\\\n left: 0;\\\\r\\\\n display: block;\\\\r\\\\n width: 1.4rem;\\\\r\\\\n height: 1.4rem;\\\\r\\\\n line-height:1rem;\\\\r\\\\n text-align: center;\\\\r\\\\n user-select: none;\\\\r\\\\n border-radius: .35rem;\\\\r\\\\n background-repeat: no-repeat;\\\\r\\\\n background-position: center center;\\\\r\\\\n background-size: 50% 50%;\\\\n}\\\\nlabel.checkbox:not(.active) > .icon[data-v-6922bf24] {\\\\r\\\\n background-color: #ddd;\\\\r\\\\n border: 1px solid #bbb;\\\\n}\\\\nlabel.checkbox > input:focus ~ .icon[data-v-6922bf24] {\\\\r\\\\n outline: 0;\\\\r\\\\n border: 1px solid #66afe9;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\n}\\\\nlabel.checkbox.active > .icon[data-v-6922bf24] {\\\\r\\\\n background-size: 1rem 1rem;\\\\r\\\\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNyIgaGVpZ2h0PSI3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJtNS43MywwLjUybC0zLjEyNDIyLDMuMzQxNjFsLTEuMzM4OTUsLTEuNDMyMTJsLTEuMjQ5NjksMS4zMzY2NWwyLjU4ODYzLDIuNzY4NzZsNC4zNzM5LC00LjY3ODI2bC0xLjI0OTY5LC0xLjMzNjY1bDAsMGwwLjAwMDAyLDAuMDAwMDF6Ii8+PC9zdmc+);\\\\n}\\\\nlabel.checkbox.active .btn-default[data-v-6922bf24] { filter: brightness(75%);\\\\n}\\\\nlabel.checkbox.disabled[data-v-6922bf24],\\\\r\\\\nlabel.checkbox.readonly[data-v-6922bf24],\\\\r\\\\n.btn.readonly[data-v-6922bf24] {\\\\r\\\\n filter: alpha(opacity=65);\\\\r\\\\n box-shadow: none;\\\\r\\\\n opacity: .65;\\\\n}\\\\nlabel.btn > input[type=checkbox][data-v-6922bf24] {\\\\r\\\\n position: absolute;\\\\r\\\\n clip: rect(0,0,0,0);\\\\r\\\\n pointer-events: none;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Checkbox.vue?1c04410b\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAyFA;EACA,mBAAA;EACA,mBAAA;CACA;AACA;EACA,uBAAA;EACA,mBAAA;EACA,YAAA;EACA,WAAA;EACA,WAAA;EACA,UAAA;CACA;AACA;EACA,mBAAA;EACA,WAAA;EACA,QAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;EACA,iBAAA;EACA,mBAAA;EACA,kBAAA;EACA,sBAAA;EACA,6BAAA;EACA,mCAAA;EACA,yBAAA;CACA;AACA;EACA,uBAAA;EACA,uBAAA;CACA;AACA;EACA,WAAA;EACA,0BAAA;EACA,0EAAA;CACA;AACA;EACA,2BAAA;EACA,kZAAA;CACA;AACA,sDAAA,wBAAA;CAAA;AAEA;;;EAGA,0BAAA;EACA,iBAAA;EACA,aAAA;CACA;AACA;EACA,mBAAA;EACA,oBAAA;EACA,qBAAA;CACA\\\",\\\"file\\\":\\\"Checkbox.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <a :is=\\\\\\\"isButton?'a':'label'\\\\\\\" @click=\\\\\\\"toggle\\\\\\\" :class=\\\\\\\"[isButton?'btn btn-'+typeColor:'open checkbox '+typeColor,{active:checked,disabled:disabled,readonly:readonly}]\\\\\\\">\\\\r\\\\n <input v-if=\\\\\\\"name\\\\\\\" type=\\\\\\\"hidden\\\\\\\" :name=\\\\\\\"name\\\\\\\" :value=\\\\\\\"checked?trueValue:falseValue\\\\\\\" />\\\\r\\\\n <span v-if=\\\\\\\"!isButton\\\\\\\" class=\\\\\\\"icon dropdown-toggle\\\\\\\" :class=\\\\\\\"[checked?'btn-'+typeColor:'',{bg:typeColor==='default'}]\\\\\\\"></span>\\\\r\\\\n <span v-if=\\\\\\\"!isButton&&checked&&typeColor==='default'\\\\\\\" class=\\\\\\\"icon\\\\\\\"></span>\\\\r\\\\n <slot></slot>\\\\r\\\\n </a>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n button: {type: Boolean, default: false},\\\\r\\\\n disabled: {type: Boolean, default: false},\\\\r\\\\n falseValue: {default: false},\\\\r\\\\n name: {type: String, default: null},\\\\r\\\\n readonly: {type: Boolean, default: false},\\\\r\\\\n trueValue: {default: true},\\\\r\\\\n type: {type: String, default: null},\\\\r\\\\n value: {default: false}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n checked: (this.value === this.trueValue)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n isButton () { return this.button || (this._inGroup && this.$parent.buttons) },\\\\r\\\\n isFalse () { return this.value === this.falseValue },\\\\r\\\\n isTrue () { return this.value === this.trueValue },\\\\r\\\\n parentValue () { return this._ingroup && this.$parent.val },\\\\r\\\\n typeColor () { return (this.type || (this.$parent && this.$parent.type)) || 'default' }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n checked (val, old) {\\\\r\\\\n var value = val ? this.trueValue : this.falseValue\\\\r\\\\n this.$emit('checked', val)\\\\r\\\\n this.$emit('input', value)\\\\r\\\\n this.eval()\\\\r\\\\n },\\\\r\\\\n parentValue (val) {\\\\r\\\\n var checked = val === this.trueValue\\\\r\\\\n if (this.checked !== checked) {\\\\r\\\\n this.checked = checked\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n value (val, old) {\\\\r\\\\n var checked = val === this.trueValue\\\\r\\\\n if (this.checked !== checked) {\\\\r\\\\n this.checked = checked\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n const parent = this.$parent\\\\r\\\\n if (parent && parent._btnGroup && !parent._radioGroup) {\\\\r\\\\n this._inGroup = true\\\\r\\\\n parent._checkboxGroup = true\\\\r\\\\n if (!(parent.val instanceof Array)) { parent.val = [] }\\\\r\\\\n this.eval()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n if (!this.$parent._checkboxGroup || typeof this.value === 'boolean') { return }\\\\r\\\\n if (this.$parent.val.length) {\\\\r\\\\n // this.checked = ~this.$parent.val.indexOf(this.value)\\\\r\\\\n this.$emit('checked', ~this.$parent.val.indexOf(this.value))\\\\r\\\\n } else if (this.checked) {\\\\r\\\\n this.$parent.val.push(this.value)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n eval () {\\\\r\\\\n if (this._inGroup) {\\\\r\\\\n var value = this.checked ? this.isTrue : this.isFalse\\\\r\\\\n var index = this.$parent.val.indexOf(value)\\\\r\\\\n if (this.checked && !~index) this.$parent.val.push(value)\\\\r\\\\n if (!this.checked && ~index) this.$parent.val.splice(index, 1)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n toggle () {\\\\r\\\\n if (this.disabled || this.readonly) { return }\\\\r\\\\n this.checked = !this.checked\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style scoped>\\\\r\\\\nlabel.checkbox {\\\\r\\\\n position: relative;\\\\r\\\\n padding-left: 18px;\\\\r\\\\n}\\\\r\\\\nlabel.checkbox > input {\\\\r\\\\n box-sizing: border-box;\\\\r\\\\n position: absolute;\\\\r\\\\n z-index: -1;\\\\r\\\\n padding: 0;\\\\r\\\\n opacity: 0;\\\\r\\\\n margin: 0;\\\\r\\\\n}\\\\r\\\\nlabel.checkbox > .icon {\\\\r\\\\n position: absolute;\\\\r\\\\n top: .2rem;\\\\r\\\\n left: 0;\\\\r\\\\n display: block;\\\\r\\\\n width: 1.4rem;\\\\r\\\\n height: 1.4rem;\\\\r\\\\n line-height:1rem;\\\\r\\\\n text-align: center;\\\\r\\\\n user-select: none;\\\\r\\\\n border-radius: .35rem;\\\\r\\\\n background-repeat: no-repeat;\\\\r\\\\n background-position: center center;\\\\r\\\\n background-size: 50% 50%;\\\\r\\\\n}\\\\r\\\\nlabel.checkbox:not(.active) > .icon {\\\\r\\\\n background-color: #ddd;\\\\r\\\\n border: 1px solid #bbb;\\\\r\\\\n}\\\\r\\\\nlabel.checkbox > input:focus ~ .icon {\\\\r\\\\n outline: 0;\\\\r\\\\n border: 1px solid #66afe9;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\r\\\\n}\\\\r\\\\nlabel.checkbox.active > .icon {\\\\r\\\\n background-size: 1rem 1rem;\\\\r\\\\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iNyIgaGVpZ2h0PSI3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJtNS43MywwLjUybC0zLjEyNDIyLDMuMzQxNjFsLTEuMzM4OTUsLTEuNDMyMTJsLTEuMjQ5NjksMS4zMzY2NWwyLjU4ODYzLDIuNzY4NzZsNC4zNzM5LC00LjY3ODI2bC0xLjI0OTY5LC0xLjMzNjY1bDAsMGwwLjAwMDAyLDAuMDAwMDF6Ii8+PC9zdmc+);\\\\r\\\\n}\\\\r\\\\nlabel.checkbox.active .btn-default { filter: brightness(75%); }\\\\r\\\\n\\\\r\\\\nlabel.checkbox.disabled,\\\\r\\\\nlabel.checkbox.readonly,\\\\r\\\\n.btn.readonly {\\\\r\\\\n filter: alpha(opacity=65);\\\\r\\\\n box-shadow: none;\\\\r\\\\n opacity: .65;\\\\r\\\\n}\\\\r\\\\nlabel.btn > input[type=checkbox] {\\\\r\\\\n position: absolute;\\\\r\\\\n clip: rect(0,0,0,0);\\\\r\\\\n pointer-events: none;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 98 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t button: { type: Boolean, default: false },\\n\\t disabled: { type: Boolean, default: false },\\n\\t falseValue: { default: false },\\n\\t name: { type: String, default: null },\\n\\t readonly: { type: Boolean, default: false },\\n\\t trueValue: { default: true },\\n\\t type: { type: String, default: null },\\n\\t value: { default: false }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t checked: this.value === this.trueValue\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t isButton: function isButton() {\\n\\t return this.button || this._inGroup && this.$parent.buttons;\\n\\t },\\n\\t isFalse: function isFalse() {\\n\\t return this.value === this.falseValue;\\n\\t },\\n\\t isTrue: function isTrue() {\\n\\t return this.value === this.trueValue;\\n\\t },\\n\\t parentValue: function parentValue() {\\n\\t return this._ingroup && this.$parent.val;\\n\\t },\\n\\t typeColor: function typeColor() {\\n\\t return this.type || this.$parent && this.$parent.type || 'default';\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t checked: function checked(val, old) {\\n\\t var value = val ? this.trueValue : this.falseValue;\\n\\t this.$emit('checked', val);\\n\\t this.$emit('input', value);\\n\\t this.eval();\\n\\t },\\n\\t parentValue: function parentValue(val) {\\n\\t var checked = val === this.trueValue;\\n\\t if (this.checked !== checked) {\\n\\t this.checked = checked;\\n\\t }\\n\\t },\\n\\t value: function value(val, old) {\\n\\t var checked = val === this.trueValue;\\n\\t if (this.checked !== checked) {\\n\\t this.checked = checked;\\n\\t }\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t var parent = this.$parent;\\n\\t if (parent && parent._btnGroup && !parent._radioGroup) {\\n\\t this._inGroup = true;\\n\\t parent._checkboxGroup = true;\\n\\t if (!(parent.val instanceof Array)) {\\n\\t parent.val = [];\\n\\t }\\n\\t this.eval();\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t if (!this.$parent._checkboxGroup || typeof this.value === 'boolean') {\\n\\t return;\\n\\t }\\n\\t if (this.$parent.val.length) {\\n\\t // this.checked = ~this.$parent.val.indexOf(this.value)\\n\\t this.$emit('checked', ~this.$parent.val.indexOf(this.value));\\n\\t } else if (this.checked) {\\n\\t this.$parent.val.push(this.value);\\n\\t }\\n\\t },\\n\\t\\n\\t methods: {\\n\\t eval: function _eval() {\\n\\t if (this._inGroup) {\\n\\t var value = this.checked ? this.isTrue : this.isFalse;\\n\\t var index = this.$parent.val.indexOf(value);\\n\\t if (this.checked && !~index) this.$parent.val.push(value);\\n\\t if (!this.checked && ~index) this.$parent.val.splice(index, 1);\\n\\t }\\n\\t },\\n\\t toggle: function toggle() {\\n\\t if (this.disabled || this.readonly) {\\n\\t return;\\n\\t }\\n\\t this.checked = !this.checked;\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 99 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c(_vm.isButton ? 'a' : 'label', {\\n\\t tag: \\\"a\\\",\\n\\t class: [_vm.isButton ? 'btn btn-' + _vm.typeColor : 'open checkbox ' + _vm.typeColor, {\\n\\t active: _vm.checked,\\n\\t disabled: _vm.disabled,\\n\\t readonly: _vm.readonly\\n\\t }],\\n\\t on: {\\n\\t \\\"click\\\": _vm.toggle\\n\\t }\\n\\t }, [(_vm.name) ? _vm._c('input', {\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"hidden\\\",\\n\\t \\\"name\\\": _vm.name\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm.checked ? _vm.trueValue : _vm.falseValue\\n\\t }\\n\\t }) : _vm._e(), _vm._v(\\\" \\\"), (!_vm.isButton) ? _vm._c('span', {\\n\\t staticClass: \\\"icon dropdown-toggle\\\",\\n\\t class: [_vm.checked ? 'btn-' + _vm.typeColor : '', {\\n\\t bg: _vm.typeColor === 'default'\\n\\t }]\\n\\t }) : _vm._e(), _vm._v(\\\" \\\"), (!_vm.isButton && _vm.checked && _vm.typeColor === 'default') ? _vm._c('span', {\\n\\t staticClass: \\\"icon\\\"\\n\\t }) : _vm._e(), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-6922bf24\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 100 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(101)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(103)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(104)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Datepicker.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-477b8e5d\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-477b8e5d\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Datepicker.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 101 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(102);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-477b8e5d!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Datepicker.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-477b8e5d!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Datepicker.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 102 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.datepicker {\\\\r\\\\n position: relative;\\\\r\\\\n display: inline-block;\\\\n}\\\\ninput.datepicker-input.with-reset-button {\\\\r\\\\n padding-right: 25px;\\\\n}\\\\n.datepicker > button.close {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n outline: none;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\n}\\\\n.datepicker > button.close:focus {\\\\r\\\\n opacity: .2;\\\\n}\\\\n.datepicker-popup {\\\\r\\\\n position: absolute;\\\\r\\\\n border: 1px solid #ccc;\\\\r\\\\n border-radius: 5px;\\\\r\\\\n background: #fff;\\\\r\\\\n margin-top: 2px;\\\\r\\\\n z-index: 1000;\\\\r\\\\n box-shadow: 0 6px 12px rgba(0,0,0,0.175);\\\\n}\\\\n.datepicker-inner {\\\\r\\\\n width: 218px;\\\\n}\\\\n.datepicker-body {\\\\r\\\\n padding: 10px 10px;\\\\n}\\\\n.datepicker-ctrl p,\\\\r\\\\n.datepicker-ctrl span,\\\\r\\\\n.datepicker-body span {\\\\r\\\\n display: inline-block;\\\\r\\\\n width: 28px;\\\\r\\\\n line-height: 28px;\\\\r\\\\n height: 28px;\\\\r\\\\n border-radius: 4px;\\\\n}\\\\n.datepicker-ctrl p {\\\\r\\\\n width: 65%;\\\\n}\\\\n.datepicker-ctrl span {\\\\r\\\\n position: absolute;\\\\n}\\\\n.datepicker-body span {\\\\r\\\\n text-align: center;\\\\n}\\\\n.datepicker-monthRange span {\\\\r\\\\n width: 48px;\\\\r\\\\n height: 50px;\\\\r\\\\n line-height: 45px;\\\\n}\\\\n.datepicker-item-disable {\\\\r\\\\n background-color: white!important;\\\\r\\\\n cursor: not-allowed!important;\\\\n}\\\\n.decadeRange span:first-child,\\\\r\\\\n.decadeRange span:last-child,\\\\r\\\\n.datepicker-item-disable,\\\\r\\\\n.datepicker-item-gray {\\\\r\\\\n color: #999;\\\\n}\\\\n.datepicker-dateRange-item-active:hover,\\\\r\\\\n.datepicker-dateRange-item-active {\\\\r\\\\n background: rgb(50, 118, 177)!important;\\\\r\\\\n color: white!important;\\\\n}\\\\n.datepicker-monthRange {\\\\r\\\\n margin-top: 10px\\\\n}\\\\n.datepicker-monthRange span,\\\\r\\\\n.datepicker-ctrl span,\\\\r\\\\n.datepicker-ctrl p,\\\\r\\\\n.datepicker-dateRange span {\\\\r\\\\n cursor: pointer;\\\\n}\\\\n.datepicker-monthRange span:hover,\\\\r\\\\n.datepicker-ctrl p:hover,\\\\r\\\\n.datepicker-ctrl i:hover,\\\\r\\\\n.datepicker-dateRange span:hover,\\\\r\\\\n.datepicker-dateRange-item-hover {\\\\r\\\\n background-color : #eeeeee;\\\\n}\\\\n.datepicker-weekRange span {\\\\r\\\\n font-weight: bold;\\\\n}\\\\n.datepicker-label {\\\\r\\\\n background-color: #f8f8f8;\\\\r\\\\n font-weight: 700;\\\\r\\\\n padding: 7px 0;\\\\r\\\\n text-align: center;\\\\n}\\\\n.datepicker-ctrl {\\\\r\\\\n position: relative;\\\\r\\\\n height: 30px;\\\\r\\\\n line-height: 30px;\\\\r\\\\n font-weight: bold;\\\\r\\\\n text-align: center;\\\\n}\\\\n.month-btn {\\\\r\\\\n font-weight: bold;\\\\r\\\\n -webkit-user-select:none;\\\\r\\\\n -moz-user-select:none;\\\\r\\\\n -ms-user-select:none;\\\\r\\\\n user-select:none;\\\\n}\\\\n.datepicker-preBtn {\\\\r\\\\n left: 2px;\\\\n}\\\\n.datepicker-nextBtn {\\\\r\\\\n right: 2px;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Datepicker.vue?52006f6c\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAiVA;EACA,mBAAA;EACA,sBAAA;CACA;AACA;EACA,oBAAA;CACA;AACA;EACA,mBAAA;EACA,OAAA;EACA,SAAA;EACA,cAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;CACA;AACA;EACA,YAAA;CACA;AACA;EACA,mBAAA;EACA,uBAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,cAAA;EACA,yCAAA;CACA;AACA;EACA,aAAA;CACA;AACA;EACA,mBAAA;CACA;AACA;;;EAGA,sBAAA;EACA,YAAA;EACA,kBAAA;EACA,aAAA;EACA,mBAAA;CACA;AACA;EACA,WAAA;CACA;AACA;EACA,mBAAA;CACA;AACA;EACA,mBAAA;CACA;AACA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;CACA;AACA;EACA,kCAAA;EACA,8BAAA;CACA;AACA;;;;EAIA,YAAA;CACA;AAEA;;EAEA,wCAAA;EACA,uBAAA;CACA;AACA;EACA,gBAAA;CACA;AACA;;;;EAIA,gBAAA;CACA;AACA;;;;;EAKA,2BAAA;CACA;AACA;EACA,kBAAA;CACA;AACA;EACA,0BAAA;EACA,iBAAA;EACA,eAAA;EACA,mBAAA;CACA;AACA;EACA,mBAAA;EACA,aAAA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;CACA;AACA;EACA,kBAAA;EACA,yBAAA;EACA,sBAAA;EACA,qBAAA;EACA,iBAAA;CACA;AACA;EACA,UAAA;CACA;AACA;EACA,WAAA;CACA\\\",\\\"file\\\":\\\"Datepicker.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div class=\\\\\\\"datepicker\\\\\\\">\\\\r\\\\n <input class=\\\\\\\"form-control datepicker-input\\\\\\\" type=\\\\\\\"text\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"val\\\\\\\"\\\\r\\\\n :class=\\\\\\\"{'with-reset-button': clearButton}\\\\\\\"\\\\r\\\\n :placeholder=\\\\\\\"placeholder\\\\\\\"\\\\r\\\\n :style=\\\\\\\"{width:width}\\\\\\\"\\\\r\\\\n @click=\\\\\\\"inputClick\\\\\\\"\\\\r\\\\n />\\\\r\\\\n <button v-if=\\\\\\\"clearButton&&val\\\\\\\" type=\\\\\\\"button\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"val = ''\\\\\\\">\\\\r\\\\n <span>&times;</span>\\\\r\\\\n </button>\\\\r\\\\n <div class=\\\\\\\"datepicker-popup\\\\\\\" v-show=\\\\\\\"displayDayView\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-inner\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-body\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-ctrl\\\\\\\">\\\\r\\\\n <span :class=\\\\\\\"preBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextMonthClick(0)\\\\\\\"></span>\\\\r\\\\n <span :class=\\\\\\\"nextBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextMonthClick(1)\\\\\\\"></span>\\\\r\\\\n <p @click=\\\\\\\"switchMonthView\\\\\\\">{{stringifyDayHeader(currDate)}}</p>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-weekRange\\\\\\\">\\\\r\\\\n <span v-for=\\\\\\\"w in text.daysOfWeek\\\\\\\">{{w}}</span>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-dateRange\\\\\\\">\\\\r\\\\n <span v-for=\\\\\\\"d in dateRange\\\\\\\" :class=\\\\\\\"d.sclass\\\\\\\" @click=\\\\\\\"daySelect(d)\\\\\\\">{{d.text}}</span>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-popup\\\\\\\" v-show=\\\\\\\"displayMonthView\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-inner\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-body\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-ctrl\\\\\\\">\\\\r\\\\n <span :class=\\\\\\\"preBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextYearClick(0)\\\\\\\"></span>\\\\r\\\\n <span :class=\\\\\\\"nextBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextYearClick(1)\\\\\\\"></span>\\\\r\\\\n <p @click=\\\\\\\"switchDecadeView\\\\\\\">{{stringifyYearHeader(currDate)}}</p>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-monthRange\\\\\\\">\\\\r\\\\n <template v-for=\\\\\\\"(m, index) in text.months\\\\\\\">\\\\r\\\\n <span v-text=\\\\\\\"m.substr(0,3)\\\\\\\"\\\\r\\\\n :class=\\\\\\\"{'datepicker-dateRange-item-active':\\\\r\\\\n (text.months[parse(val).getMonth()] === m) &&\\\\r\\\\n currDate.getFullYear() === parse(val).getFullYear()}\\\\\\\"\\\\r\\\\n @click=\\\\\\\"monthSelect(index)\\\\\\\"\\\\r\\\\n ></span>\\\\r\\\\n </template>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-popup\\\\\\\" v-show=\\\\\\\"displayYearView\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-inner\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-body\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"datepicker-ctrl\\\\\\\">\\\\r\\\\n <span :class=\\\\\\\"preBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextDecadeClick(0)\\\\\\\"></span>\\\\r\\\\n <span :class=\\\\\\\"nextBtnClasses\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\" @click=\\\\\\\"preNextDecadeClick(1)\\\\\\\"></span>\\\\r\\\\n <p>{{stringifyDecadeHeader(currDate)}}</p>\\\\r\\\\n </div>\\\\r\\\\n <div class=\\\\\\\"datepicker-monthRange decadeRange\\\\\\\">\\\\r\\\\n <template v-for=\\\\\\\"decade in decadeRange\\\\\\\">\\\\r\\\\n <span :class=\\\\\\\"{'datepicker-dateRange-item-active':parse(val).getFullYear() === decade.text}\\\\\\\"\\\\r\\\\n v-text=\\\\\\\"decade.text\\\\\\\"\\\\r\\\\n @click.stop=\\\\\\\"yearSelect(decade.text)\\\\\\\"\\\\r\\\\n ></span>\\\\r\\\\n </template>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {translations} from './utils/utils.js'\\\\r\\\\n// import $ from './utils/NodeList.js'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n value: {type: String},\\\\r\\\\n format: {default: 'MM/dd/yyyy'},\\\\r\\\\n disabledDaysOfWeek: {type: Array, default () { return [] }},\\\\r\\\\n width: {type: String},\\\\r\\\\n clearButton: {type: Boolean, default: false},\\\\r\\\\n lang: {type: String, default: navigator.language},\\\\r\\\\n placeholder: {type: String},\\\\r\\\\n iconsFont: {type: String, default: 'glyphicon'}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n currDate: new Date(),\\\\r\\\\n dateRange: [],\\\\r\\\\n decadeRange: [],\\\\r\\\\n displayDayView: false,\\\\r\\\\n displayMonthView: false,\\\\r\\\\n displayYearView: false,\\\\r\\\\n val: this.value\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n currDate () {\\\\r\\\\n this.getDateRange()\\\\r\\\\n },\\\\r\\\\n format () {\\\\r\\\\n this.val = this.stringify(this.currDate)\\\\r\\\\n },\\\\r\\\\n val (val, old) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n if (this.val !== val) { this.val = val }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n text () {\\\\r\\\\n return translations(this.lang)\\\\r\\\\n },\\\\r\\\\n preBtnClasses () {\\\\r\\\\n return `datepicker-preBtn ${this.iconsFont} ${this.iconsFont}-chevron-left`\\\\r\\\\n },\\\\r\\\\n nextBtnClasses () {\\\\r\\\\n return `datepicker-nextBtn ${this.iconsFont} ${this.iconsFont}-chevron-right`\\\\r\\\\n },\\\\r\\\\n disabledDaysArray () {\\\\r\\\\n return this.disabledDaysOfWeek.map(d => parseInt(d, 10))\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n close () {\\\\r\\\\n this.displayDayView = this.displayMonthView = this.displayYearView = false\\\\r\\\\n },\\\\r\\\\n inputClick () {\\\\r\\\\n this.currDate = this.parse(this.val) || this.parse(new Date())\\\\r\\\\n if (this.displayMonthView || this.displayYearView) {\\\\r\\\\n this.displayDayView = false\\\\r\\\\n } else {\\\\r\\\\n this.displayDayView = !this.displayDayView\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n preNextDecadeClick (flag) {\\\\r\\\\n const year = this.currDate.getFullYear()\\\\r\\\\n const months = this.currDate.getMonth()\\\\r\\\\n const date = this.currDate.getDate()\\\\r\\\\n\\\\r\\\\n if (flag === 0) {\\\\r\\\\n this.currDate = new Date(year - 10, months, date)\\\\r\\\\n } else {\\\\r\\\\n this.currDate = new Date(year + 10, months, date)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n preNextMonthClick (flag) {\\\\r\\\\n const year = this.currDate.getFullYear()\\\\r\\\\n const month = this.currDate.getMonth()\\\\r\\\\n const date = this.currDate.getDate()\\\\r\\\\n\\\\r\\\\n if (flag === 0) {\\\\r\\\\n const preMonth = this.getYearMonth(year, month - 1)\\\\r\\\\n this.currDate = new Date(preMonth.year, preMonth.month, date)\\\\r\\\\n } else {\\\\r\\\\n const nextMonth = this.getYearMonth(year, month + 1)\\\\r\\\\n this.currDate = new Date(nextMonth.year, nextMonth.month, date)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n preNextYearClick (flag) {\\\\r\\\\n const year = this.currDate.getFullYear()\\\\r\\\\n const months = this.currDate.getMonth()\\\\r\\\\n const date = this.currDate.getDate()\\\\r\\\\n\\\\r\\\\n if (flag === 0) {\\\\r\\\\n this.currDate = new Date(year - 1, months, date)\\\\r\\\\n } else {\\\\r\\\\n this.currDate = new Date(year + 1, months, date)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n yearSelect (year) {\\\\r\\\\n this.displayYearView = false\\\\r\\\\n this.displayMonthView = true\\\\r\\\\n this.currDate = new Date(year, this.currDate.getMonth(), this.currDate.getDate())\\\\r\\\\n },\\\\r\\\\n daySelect (day) {\\\\r\\\\n if (day.sclass === 'datepicker-item-disable') {\\\\r\\\\n return false\\\\r\\\\n } else {\\\\r\\\\n this.currDate = day.date\\\\r\\\\n this.val = this.stringify(this.currDate)\\\\r\\\\n this.displayDayView = false\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n switchMonthView () {\\\\r\\\\n this.displayDayView = false\\\\r\\\\n this.displayMonthView = true\\\\r\\\\n },\\\\r\\\\n switchDecadeView () {\\\\r\\\\n this.displayMonthView = false\\\\r\\\\n this.displayYearView = true\\\\r\\\\n },\\\\r\\\\n monthSelect (index) {\\\\r\\\\n this.displayMonthView = false\\\\r\\\\n this.displayDayView = true\\\\r\\\\n this.currDate = new Date(this.currDate.getFullYear(), index, this.currDate.getDate())\\\\r\\\\n },\\\\r\\\\n getYearMonth (year, month) {\\\\r\\\\n if (month > 11) {\\\\r\\\\n year++\\\\r\\\\n month = 0\\\\r\\\\n } else if (month < 0) {\\\\r\\\\n year--\\\\r\\\\n month = 11\\\\r\\\\n }\\\\r\\\\n return {year: year, month: month}\\\\r\\\\n },\\\\r\\\\n stringifyDecadeHeader (date) {\\\\r\\\\n const yearStr = date.getFullYear().toString()\\\\r\\\\n const firstYearOfDecade = yearStr.substring(0, yearStr.length - 1) + 0\\\\r\\\\n const lastYearOfDecade = parseInt(firstYearOfDecade, 10) + 10\\\\r\\\\n return firstYearOfDecade + '-' + lastYearOfDecade\\\\r\\\\n },\\\\r\\\\n stringifyDayHeader (date) {\\\\r\\\\n return this.text.months[date.getMonth()] + ' ' + date.getFullYear()\\\\r\\\\n },\\\\r\\\\n parseMonth (date) {\\\\r\\\\n return this.text.months[date.getMonth()]\\\\r\\\\n },\\\\r\\\\n stringifyYearHeader (date) {\\\\r\\\\n return date.getFullYear()\\\\r\\\\n },\\\\r\\\\n stringify (date, format = this.format) {\\\\r\\\\n if (!date) date = this.parse()\\\\r\\\\n if (!date) return ''\\\\r\\\\n const year = date.getFullYear()\\\\r\\\\n const month = date.getMonth() + 1\\\\r\\\\n const day = date.getDate()\\\\r\\\\n const monthName = this.parseMonth(date)\\\\r\\\\n return format\\\\r\\\\n .replace(/yyyy/g, year)\\\\r\\\\n .replace(/yy/g, year)\\\\r\\\\n .replace(/MMMM/g, monthName)\\\\r\\\\n .replace(/MMM/g, monthName.substring(0, 3))\\\\r\\\\n .replace(/MM/g, ('0' + month).slice(-2))\\\\r\\\\n .replace(/M(?!a)/g, month)\\\\r\\\\n .replace(/dd/g, ('0' + day).slice(-2))\\\\r\\\\n .replace(/d/g, day)\\\\r\\\\n },\\\\r\\\\n parse (str) {\\\\r\\\\n if (str === undefined || str === null) { str = this.val }\\\\r\\\\n let date = str.length === 10 && (this.format === 'dd-MM-yyyy' || this.format === 'dd/MM/yyyy') ?\\\\r\\\\n new Date(str.substring(6, 10), str.substring(3, 5)-1, str.substring(0, 2)) :\\\\r\\\\n new Date(str)\\\\r\\\\n return isNaN(date.getFullYear()) ? new Date() : date\\\\r\\\\n },\\\\r\\\\n getDayCount (year, month) {\\\\r\\\\n const dict = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\\\\r\\\\n if (month === 1) {\\\\r\\\\n if ((year % 400 === 0) || (year % 4 === 0 && year % 100 !== 0)) {\\\\r\\\\n return 29\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n return dict[month]\\\\r\\\\n },\\\\r\\\\n getDateRange () {\\\\r\\\\n this.dateRange = []\\\\r\\\\n this.decadeRange = []\\\\r\\\\n const time = {\\\\r\\\\n year: this.currDate.getFullYear(),\\\\r\\\\n month: this.currDate.getMonth(),\\\\r\\\\n day: this.currDate.getDate()\\\\r\\\\n }\\\\r\\\\n const yearStr = time.year.toString()\\\\r\\\\n const firstYearOfDecade = (yearStr.substring(0, yearStr.length - 1) + 0) - 1\\\\r\\\\n for (let i = 0; i < 12; i++) {\\\\r\\\\n this.decadeRange.push({\\\\r\\\\n text: firstYearOfDecade + i\\\\r\\\\n })\\\\r\\\\n }\\\\r\\\\n\\\\r\\\\n const currMonthFirstDay = new Date(time.year, time.month, 1)\\\\r\\\\n let firstDayWeek = currMonthFirstDay.getDay() + 1\\\\r\\\\n if (firstDayWeek === 0) {\\\\r\\\\n firstDayWeek = 7\\\\r\\\\n }\\\\r\\\\n const dayCount = this.getDayCount(time.year, time.month)\\\\r\\\\n if (firstDayWeek > 1) {\\\\r\\\\n const preMonth = this.getYearMonth(time.year, time.month - 1)\\\\r\\\\n const prevMonthDayCount = this.getDayCount(preMonth.year, preMonth.month)\\\\r\\\\n for (let i = 1; i < firstDayWeek; i++) {\\\\r\\\\n const dayText = prevMonthDayCount - firstDayWeek + i + 1\\\\r\\\\n const date = new Date(preMonth.year, preMonth.month, dayText)\\\\r\\\\n let sclass = 'datepicker-item-gray'\\\\r\\\\n if (this.disabledDaysArray.indexOf(date.getDay()) > -1) {\\\\r\\\\n sclass = 'datepicker-item-disable'\\\\r\\\\n }\\\\r\\\\n this.dateRange.push({text: dayText, date, sclass })\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n\\\\r\\\\n for (let i = 1; i <= dayCount; i++) {\\\\r\\\\n const date = new Date(time.year, time.month, i)\\\\r\\\\n let sclass = ''\\\\r\\\\n if (this.disabledDaysArray.indexOf(date.getDay()) > -1) {\\\\r\\\\n sclass = 'datepicker-item-disable'\\\\r\\\\n }\\\\r\\\\n if (i == time.day && date.getFullYear() == time.year && date.getMonth() == time.month){\\\\r\\\\n sclass = 'datepicker-dateRange-item-active'\\\\r\\\\n }\\\\r\\\\n this.dateRange.push({text: i, date, sclass})\\\\r\\\\n }\\\\r\\\\n\\\\r\\\\n if (this.dateRange.length < 42) {\\\\r\\\\n const nextMonthNeed = 42 - this.dateRange.length\\\\r\\\\n const nextMonth = this.getYearMonth(time.year, time.month + 1)\\\\r\\\\n\\\\r\\\\n for (let i = 1; i <= nextMonthNeed; i++) {\\\\r\\\\n const date = new Date(nextMonth.year, nextMonth.month, i)\\\\r\\\\n let sclass = 'datepicker-item-gray'\\\\r\\\\n if (this.disabledDaysArray.indexOf(date.getDay()) > -1) {\\\\r\\\\n sclass = 'datepicker-item-disable'\\\\r\\\\n }\\\\r\\\\n this.dateRange.push({text: i, date, sclass})\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n this.$emit('child-created', this)\\\\r\\\\n this.currDate = this.parse(this.val) || this.parse(new Date())\\\\r\\\\n this._blur = e => {\\\\r\\\\n if (!this.$el.contains(e.target))\\\\r\\\\n this.close()\\\\r\\\\n }\\\\r\\\\n window.addEventListener('click', this._blur);\\\\r\\\\n },\\\\r\\\\n beforeDestroy () {\\\\r\\\\n window.removeEventListener('click', this._blur)\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.datepicker {\\\\r\\\\n position: relative;\\\\r\\\\n display: inline-block;\\\\r\\\\n}\\\\r\\\\ninput.datepicker-input.with-reset-button {\\\\r\\\\n padding-right: 25px;\\\\r\\\\n}\\\\r\\\\n.datepicker > button.close {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n outline: none;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.datepicker > button.close:focus {\\\\r\\\\n opacity: .2;\\\\r\\\\n}\\\\r\\\\n.datepicker-popup {\\\\r\\\\n position: absolute;\\\\r\\\\n border: 1px solid #ccc;\\\\r\\\\n border-radius: 5px;\\\\r\\\\n background: #fff;\\\\r\\\\n margin-top: 2px;\\\\r\\\\n z-index: 1000;\\\\r\\\\n box-shadow: 0 6px 12px rgba(0,0,0,0.175);\\\\r\\\\n}\\\\r\\\\n.datepicker-inner {\\\\r\\\\n width: 218px;\\\\r\\\\n}\\\\r\\\\n.datepicker-body {\\\\r\\\\n padding: 10px 10px;\\\\r\\\\n}\\\\r\\\\n.datepicker-ctrl p,\\\\r\\\\n.datepicker-ctrl span,\\\\r\\\\n.datepicker-body span {\\\\r\\\\n display: inline-block;\\\\r\\\\n width: 28px;\\\\r\\\\n line-height: 28px;\\\\r\\\\n height: 28px;\\\\r\\\\n border-radius: 4px;\\\\r\\\\n}\\\\r\\\\n.datepicker-ctrl p {\\\\r\\\\n width: 65%;\\\\r\\\\n}\\\\r\\\\n.datepicker-ctrl span {\\\\r\\\\n position: absolute;\\\\r\\\\n}\\\\r\\\\n.datepicker-body span {\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.datepicker-monthRange span {\\\\r\\\\n width: 48px;\\\\r\\\\n height: 50px;\\\\r\\\\n line-height: 45px;\\\\r\\\\n}\\\\r\\\\n.datepicker-item-disable {\\\\r\\\\n background-color: white!important;\\\\r\\\\n cursor: not-allowed!important;\\\\r\\\\n}\\\\r\\\\n.decadeRange span:first-child,\\\\r\\\\n.decadeRange span:last-child,\\\\r\\\\n.datepicker-item-disable,\\\\r\\\\n.datepicker-item-gray {\\\\r\\\\n color: #999;\\\\r\\\\n}\\\\r\\\\n\\\\r\\\\n.datepicker-dateRange-item-active:hover,\\\\r\\\\n.datepicker-dateRange-item-active {\\\\r\\\\n background: rgb(50, 118, 177)!important;\\\\r\\\\n color: white!important;\\\\r\\\\n}\\\\r\\\\n.datepicker-monthRange {\\\\r\\\\n margin-top: 10px\\\\r\\\\n}\\\\r\\\\n.datepicker-monthRange span,\\\\r\\\\n.datepicker-ctrl span,\\\\r\\\\n.datepicker-ctrl p,\\\\r\\\\n.datepicker-dateRange span {\\\\r\\\\n cursor: pointer;\\\\r\\\\n}\\\\r\\\\n.datepicker-monthRange span:hover,\\\\r\\\\n.datepicker-ctrl p:hover,\\\\r\\\\n.datepicker-ctrl i:hover,\\\\r\\\\n.datepicker-dateRange span:hover,\\\\r\\\\n.datepicker-dateRange-item-hover {\\\\r\\\\n background-color : #eeeeee;\\\\r\\\\n}\\\\r\\\\n.datepicker-weekRange span {\\\\r\\\\n font-weight: bold;\\\\r\\\\n}\\\\r\\\\n.datepicker-label {\\\\r\\\\n background-color: #f8f8f8;\\\\r\\\\n font-weight: 700;\\\\r\\\\n padding: 7px 0;\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.datepicker-ctrl {\\\\r\\\\n position: relative;\\\\r\\\\n height: 30px;\\\\r\\\\n line-height: 30px;\\\\r\\\\n font-weight: bold;\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.month-btn {\\\\r\\\\n font-weight: bold;\\\\r\\\\n -webkit-user-select:none;\\\\r\\\\n -moz-user-select:none;\\\\r\\\\n -ms-user-select:none;\\\\r\\\\n user-select:none;\\\\r\\\\n}\\\\r\\\\n.datepicker-preBtn {\\\\r\\\\n left: 2px;\\\\r\\\\n}\\\\r\\\\n.datepicker-nextBtn {\\\\r\\\\n right: 2px;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 103 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\t// import $ from './utils/NodeList.js'\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t value: { type: String },\\n\\t format: { default: 'MM/dd/yyyy' },\\n\\t disabledDaysOfWeek: { type: Array, default: function _default() {\\n\\t return [];\\n\\t }\\n\\t },\\n\\t width: { type: String },\\n\\t clearButton: { type: Boolean, default: false },\\n\\t lang: { type: String, default: navigator.language },\\n\\t placeholder: { type: String },\\n\\t iconsFont: { type: String, default: 'glyphicon' }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t currDate: new Date(),\\n\\t dateRange: [],\\n\\t decadeRange: [],\\n\\t displayDayView: false,\\n\\t displayMonthView: false,\\n\\t displayYearView: false,\\n\\t val: this.value\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t currDate: function currDate() {\\n\\t this.getDateRange();\\n\\t },\\n\\t format: function format() {\\n\\t this.val = this.stringify(this.currDate);\\n\\t },\\n\\t val: function val(_val, old) {\\n\\t this.$emit('input', _val);\\n\\t },\\n\\t value: function value(val) {\\n\\t if (this.val !== val) {\\n\\t this.val = val;\\n\\t }\\n\\t }\\n\\t },\\n\\t computed: {\\n\\t text: function text() {\\n\\t return (0, _utils.translations)(this.lang);\\n\\t },\\n\\t preBtnClasses: function preBtnClasses() {\\n\\t return 'datepicker-preBtn ' + this.iconsFont + ' ' + this.iconsFont + '-chevron-left';\\n\\t },\\n\\t nextBtnClasses: function nextBtnClasses() {\\n\\t return 'datepicker-nextBtn ' + this.iconsFont + ' ' + this.iconsFont + '-chevron-right';\\n\\t },\\n\\t disabledDaysArray: function disabledDaysArray() {\\n\\t return this.disabledDaysOfWeek.map(function (d) {\\n\\t return parseInt(d, 10);\\n\\t });\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t close: function close() {\\n\\t this.displayDayView = this.displayMonthView = this.displayYearView = false;\\n\\t },\\n\\t inputClick: function inputClick() {\\n\\t this.currDate = this.parse(this.val) || this.parse(new Date());\\n\\t if (this.displayMonthView || this.displayYearView) {\\n\\t this.displayDayView = false;\\n\\t } else {\\n\\t this.displayDayView = !this.displayDayView;\\n\\t }\\n\\t },\\n\\t preNextDecadeClick: function preNextDecadeClick(flag) {\\n\\t var year = this.currDate.getFullYear();\\n\\t var months = this.currDate.getMonth();\\n\\t var date = this.currDate.getDate();\\n\\t\\n\\t if (flag === 0) {\\n\\t this.currDate = new Date(year - 10, months, date);\\n\\t } else {\\n\\t this.currDate = new Date(year + 10, months, date);\\n\\t }\\n\\t },\\n\\t preNextMonthClick: function preNextMonthClick(flag) {\\n\\t var year = this.currDate.getFullYear();\\n\\t var month = this.currDate.getMonth();\\n\\t var date = this.currDate.getDate();\\n\\t\\n\\t if (flag === 0) {\\n\\t var preMonth = this.getYearMonth(year, month - 1);\\n\\t this.currDate = new Date(preMonth.year, preMonth.month, date);\\n\\t } else {\\n\\t var nextMonth = this.getYearMonth(year, month + 1);\\n\\t this.currDate = new Date(nextMonth.year, nextMonth.month, date);\\n\\t }\\n\\t },\\n\\t preNextYearClick: function preNextYearClick(flag) {\\n\\t var year = this.currDate.getFullYear();\\n\\t var months = this.currDate.getMonth();\\n\\t var date = this.currDate.getDate();\\n\\t\\n\\t if (flag === 0) {\\n\\t this.currDate = new Date(year - 1, months, date);\\n\\t } else {\\n\\t this.currDate = new Date(year + 1, months, date);\\n\\t }\\n\\t },\\n\\t yearSelect: function yearSelect(year) {\\n\\t this.displayYearView = false;\\n\\t this.displayMonthView = true;\\n\\t this.currDate = new Date(year, this.currDate.getMonth(), this.currDate.getDate());\\n\\t },\\n\\t daySelect: function daySelect(day) {\\n\\t if (day.sclass === 'datepicker-item-disable') {\\n\\t return false;\\n\\t } else {\\n\\t this.currDate = day.date;\\n\\t this.val = this.stringify(this.currDate);\\n\\t this.displayDayView = false;\\n\\t }\\n\\t },\\n\\t switchMonthView: function switchMonthView() {\\n\\t this.displayDayView = false;\\n\\t this.displayMonthView = true;\\n\\t },\\n\\t switchDecadeView: function switchDecadeView() {\\n\\t this.displayMonthView = false;\\n\\t this.displayYearView = true;\\n\\t },\\n\\t monthSelect: function monthSelect(index) {\\n\\t this.displayMonthView = false;\\n\\t this.displayDayView = true;\\n\\t this.currDate = new Date(this.currDate.getFullYear(), index, this.currDate.getDate());\\n\\t },\\n\\t getYearMonth: function getYearMonth(year, month) {\\n\\t if (month > 11) {\\n\\t year++;\\n\\t month = 0;\\n\\t } else if (month < 0) {\\n\\t year--;\\n\\t month = 11;\\n\\t }\\n\\t return { year: year, month: month };\\n\\t },\\n\\t stringifyDecadeHeader: function stringifyDecadeHeader(date) {\\n\\t var yearStr = date.getFullYear().toString();\\n\\t var firstYearOfDecade = yearStr.substring(0, yearStr.length - 1) + 0;\\n\\t var lastYearOfDecade = parseInt(firstYearOfDecade, 10) + 10;\\n\\t return firstYearOfDecade + '-' + lastYearOfDecade;\\n\\t },\\n\\t stringifyDayHeader: function stringifyDayHeader(date) {\\n\\t return this.text.months[date.getMonth()] + ' ' + date.getFullYear();\\n\\t },\\n\\t parseMonth: function parseMonth(date) {\\n\\t return this.text.months[date.getMonth()];\\n\\t },\\n\\t stringifyYearHeader: function stringifyYearHeader(date) {\\n\\t return date.getFullYear();\\n\\t },\\n\\t stringify: function stringify(date) {\\n\\t var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.format;\\n\\t\\n\\t if (!date) date = this.parse();\\n\\t if (!date) return '';\\n\\t var year = date.getFullYear();\\n\\t var month = date.getMonth() + 1;\\n\\t var day = date.getDate();\\n\\t var monthName = this.parseMonth(date);\\n\\t return format.replace(/yyyy/g, year).replace(/yy/g, year).replace(/MMMM/g, monthName).replace(/MMM/g, monthName.substring(0, 3)).replace(/MM/g, ('0' + month).slice(-2)).replace(/M(?!a)/g, month).replace(/dd/g, ('0' + day).slice(-2)).replace(/d/g, day);\\n\\t },\\n\\t parse: function parse(str) {\\n\\t if (str === undefined || str === null) {\\n\\t str = this.val;\\n\\t }\\n\\t var date = str.length === 10 && (this.format === 'dd-MM-yyyy' || this.format === 'dd/MM/yyyy') ? new Date(str.substring(6, 10), str.substring(3, 5) - 1, str.substring(0, 2)) : new Date(str);\\n\\t return isNaN(date.getFullYear()) ? new Date() : date;\\n\\t },\\n\\t getDayCount: function getDayCount(year, month) {\\n\\t var dict = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\\n\\t if (month === 1) {\\n\\t if (year % 400 === 0 || year % 4 === 0 && year % 100 !== 0) {\\n\\t return 29;\\n\\t }\\n\\t }\\n\\t return dict[month];\\n\\t },\\n\\t getDateRange: function getDateRange() {\\n\\t this.dateRange = [];\\n\\t this.decadeRange = [];\\n\\t var time = {\\n\\t year: this.currDate.getFullYear(),\\n\\t month: this.currDate.getMonth(),\\n\\t day: this.currDate.getDate()\\n\\t };\\n\\t var yearStr = time.year.toString();\\n\\t var firstYearOfDecade = yearStr.substring(0, yearStr.length - 1) + 0 - 1;\\n\\t for (var i = 0; i < 12; i++) {\\n\\t this.decadeRange.push({\\n\\t text: firstYearOfDecade + i\\n\\t });\\n\\t }\\n\\t\\n\\t var currMonthFirstDay = new Date(time.year, time.month, 1);\\n\\t var firstDayWeek = currMonthFirstDay.getDay() + 1;\\n\\t if (firstDayWeek === 0) {\\n\\t firstDayWeek = 7;\\n\\t }\\n\\t var dayCount = this.getDayCount(time.year, time.month);\\n\\t if (firstDayWeek > 1) {\\n\\t var preMonth = this.getYearMonth(time.year, time.month - 1);\\n\\t var prevMonthDayCount = this.getDayCount(preMonth.year, preMonth.month);\\n\\t for (var _i = 1; _i < firstDayWeek; _i++) {\\n\\t var dayText = prevMonthDayCount - firstDayWeek + _i + 1;\\n\\t var date = new Date(preMonth.year, preMonth.month, dayText);\\n\\t var sclass = 'datepicker-item-gray';\\n\\t if (this.disabledDaysArray.indexOf(date.getDay()) > -1) {\\n\\t sclass = 'datepicker-item-disable';\\n\\t }\\n\\t this.dateRange.push({ text: dayText, date: date, sclass: sclass });\\n\\t }\\n\\t }\\n\\t\\n\\t for (var _i2 = 1; _i2 <= dayCount; _i2++) {\\n\\t var _date = new Date(time.year, time.month, _i2);\\n\\t var _sclass = '';\\n\\t if (this.disabledDaysArray.indexOf(_date.getDay()) > -1) {\\n\\t _sclass = 'datepicker-item-disable';\\n\\t }\\n\\t if (_i2 == time.day && _date.getFullYear() == time.year && _date.getMonth() == time.month) {\\n\\t _sclass = 'datepicker-dateRange-item-active';\\n\\t }\\n\\t this.dateRange.push({ text: _i2, date: _date, sclass: _sclass });\\n\\t }\\n\\t\\n\\t if (this.dateRange.length < 42) {\\n\\t var nextMonthNeed = 42 - this.dateRange.length;\\n\\t var nextMonth = this.getYearMonth(time.year, time.month + 1);\\n\\t\\n\\t for (var _i3 = 1; _i3 <= nextMonthNeed; _i3++) {\\n\\t var _date2 = new Date(nextMonth.year, nextMonth.month, _i3);\\n\\t var _sclass2 = 'datepicker-item-gray';\\n\\t if (this.disabledDaysArray.indexOf(_date2.getDay()) > -1) {\\n\\t _sclass2 = 'datepicker-item-disable';\\n\\t }\\n\\t this.dateRange.push({ text: _i3, date: _date2, sclass: _sclass2 });\\n\\t }\\n\\t }\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this = this;\\n\\t\\n\\t this.$emit('child-created', this);\\n\\t this.currDate = this.parse(this.val) || this.parse(new Date());\\n\\t this._blur = function (e) {\\n\\t if (!_this.$el.contains(e.target)) _this.close();\\n\\t };\\n\\t window.addEventListener('click', this._blur);\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t window.removeEventListener('click', this._blur);\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 104 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"datepicker\\\"\\n\\t }, [_vm._c('input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t staticClass: \\\"form-control datepicker-input\\\",\\n\\t class: {\\n\\t 'with-reset-button': _vm.clearButton\\n\\t },\\n\\t style: ({\\n\\t width: _vm.width\\n\\t }),\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"text\\\",\\n\\t \\\"placeholder\\\": _vm.placeholder\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm._s(_vm.val)\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.inputClick,\\n\\t \\\"input\\\": function($event) {\\n\\t if ($event.target.composing) { return; }\\n\\t _vm.val = $event.target.value\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), (_vm.clearButton && _vm.val) ? _vm._c('button', {\\n\\t staticClass: \\\"close\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.val = ''\\n\\t }\\n\\t }\\n\\t }, [_vm._c('span', [_vm._v(\\\"×\\\")])]) : _vm._e(), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.displayDayView),\\n\\t expression: \\\"displayDayView\\\"\\n\\t }],\\n\\t staticClass: \\\"datepicker-popup\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-inner\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-body\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-ctrl\\\"\\n\\t }, [_vm._c('span', {\\n\\t class: _vm.preBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextMonthClick(0)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t class: _vm.nextBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextMonthClick(1)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('p', {\\n\\t on: {\\n\\t \\\"click\\\": _vm.switchMonthView\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.stringifyDayHeader(_vm.currDate)))])]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"datepicker-weekRange\\\"\\n\\t }, _vm._l((_vm.text.daysOfWeek), function(w) {\\n\\t return _vm._c('span', [_vm._v(_vm._s(w))])\\n\\t })), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"datepicker-dateRange\\\"\\n\\t }, _vm._l((_vm.dateRange), function(d) {\\n\\t return _vm._c('span', {\\n\\t class: d.sclass,\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.daySelect(d)\\n\\t }\\n\\t }\\n\\t }, [_vm._v(_vm._s(d.text))])\\n\\t }))])])]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.displayMonthView),\\n\\t expression: \\\"displayMonthView\\\"\\n\\t }],\\n\\t staticClass: \\\"datepicker-popup\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-inner\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-body\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-ctrl\\\"\\n\\t }, [_vm._c('span', {\\n\\t class: _vm.preBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextYearClick(0)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t class: _vm.nextBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextYearClick(1)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('p', {\\n\\t on: {\\n\\t \\\"click\\\": _vm.switchDecadeView\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.stringifyYearHeader(_vm.currDate)))])]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"datepicker-monthRange\\\"\\n\\t }, [_vm._l((_vm.text.months), function(m, index) {\\n\\t return [_vm._c('span', {\\n\\t class: {\\n\\t 'datepicker-dateRange-item-active':\\n\\t (_vm.text.months[_vm.parse(_vm.val).getMonth()] === m) &&\\n\\t _vm.currDate.getFullYear() === _vm.parse(_vm.val).getFullYear()\\n\\t },\\n\\t domProps: {\\n\\t \\\"textContent\\\": _vm._s(m.substr(0, 3))\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.monthSelect(index)\\n\\t }\\n\\t }\\n\\t })]\\n\\t })], 2)])])]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.displayYearView),\\n\\t expression: \\\"displayYearView\\\"\\n\\t }],\\n\\t staticClass: \\\"datepicker-popup\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-inner\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-body\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"datepicker-ctrl\\\"\\n\\t }, [_vm._c('span', {\\n\\t class: _vm.preBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextDecadeClick(0)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t class: _vm.nextBtnClasses,\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.preNextDecadeClick(1)\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('p', [_vm._v(_vm._s(_vm.stringifyDecadeHeader(_vm.currDate)))])]), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"datepicker-monthRange decadeRange\\\"\\n\\t }, [_vm._l((_vm.decadeRange), function(decade) {\\n\\t return [_vm._c('span', {\\n\\t class: {\\n\\t 'datepicker-dateRange-item-active': _vm.parse(_vm.val).getFullYear() === decade.text\\n\\t },\\n\\t domProps: {\\n\\t \\\"textContent\\\": _vm._s(decade.text)\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.stopPropagation();\\n\\t _vm.yearSelect(decade.text)\\n\\t }\\n\\t }\\n\\t })]\\n\\t })], 2)])])])])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-477b8e5d\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 105 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(106)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(107)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Dropdown.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-39be1072\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-39be1072\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Dropdown.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 106 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tvar _ClickOutside = __webpack_require__(66);\\n\\t\\n\\tvar _ClickOutside2 = _interopRequireDefault(_ClickOutside);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t directives: {\\n\\t ClickOutside: _ClickOutside2.default\\n\\t },\\n\\t props: {\\n\\t disabled: { type: Boolean, default: false },\\n\\t size: { type: String, default: null },\\n\\t text: { type: String, default: null },\\n\\t type: { type: String, default: 'default' },\\n\\t value: { type: Boolean, default: false }\\n\\t },\\n\\t data: function data() {\\n\\t var show = this.value;\\n\\t return { show: show };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t show: function show(val) {\\n\\t this.$emit('input', val);\\n\\t },\\n\\t value: function value(val) {\\n\\t this.show = val;\\n\\t }\\n\\t },\\n\\t computed: {\\n\\t buttonSize: function buttonSize() {\\n\\t return ~['lg', 'sm', 'xs'].indexOf(this.size) ? 'btn-' + this.size : '';\\n\\t },\\n\\t inInput: function inInput() {\\n\\t return this.$parent._input;\\n\\t },\\n\\t isLi: function isLi() {\\n\\t return this.$parent._isTabs || this.$parent._navbar || this.$parent.menu;\\n\\t },\\n\\t menu: function menu() {\\n\\t return !this.$parent || this.$parent.navbar;\\n\\t },\\n\\t slots: function slots() {\\n\\t return this._slotContents;\\n\\t },\\n\\t submenu: function submenu() {\\n\\t return this.$parent && (this.$parent.menu || this.$parent.submenu);\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t blur: function blur() {\\n\\t this.show = false;\\n\\t },\\n\\t toggle: function toggle() {\\n\\t if (!this.disabled) {\\n\\t this.show = !this.show;\\n\\t }\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this = this;\\n\\t\\n\\t (0, _NodeList2.default)('ul', this.$el).on('click', 'li>a', function (e) {\\n\\t _this.show = false;\\n\\t });\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t (0, _NodeList2.default)('ul', this.$el).off();\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 107 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c(_vm.isLi ? 'li' : 'div', {\\n\\t directives: [{\\n\\t name: \\\"click-outside\\\",\\n\\t rawName: \\\"v-click-outside\\\",\\n\\t value: (_vm.blur),\\n\\t expression: \\\"blur\\\"\\n\\t }],\\n\\t tag: \\\"div\\\",\\n\\t class: [{\\n\\t open: _vm.show,\\n\\t disabled: _vm.disabled,\\n\\t dropdown: _vm.isLi,\\n\\t 'input-group-btn': _vm.inInput,\\n\\t 'btn-group': !_vm.isLi && !_vm.inInput\\n\\t }]\\n\\t }, [_vm._t(\\\"before\\\"), _vm._v(\\\" \\\"), (_vm.isLi) ? _vm._c('a', {\\n\\t class: ['dropdown-toggle', _vm.buttonSize, {\\n\\t disabled: _vm.disabled\\n\\t }],\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"keyup\\\": function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"esc\\\", 27)) { return; }\\n\\t _vm.show = false\\n\\t },\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.toggle($event)\\n\\t }\\n\\t }\\n\\t }, [_vm._t(\\\"button\\\", [_vm._v(_vm._s(_vm.text))]), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"caret\\\"\\n\\t })], 2) : _vm._c('button', {\\n\\t class: ['btn btn-' + _vm.type, _vm.buttonSize, 'dropdown-toggle'],\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\",\\n\\t \\\"disabled\\\": _vm.disabled\\n\\t },\\n\\t on: {\\n\\t \\\"keyup\\\": function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"esc\\\", 27)) { return; }\\n\\t _vm.show = false\\n\\t },\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.toggle($event)\\n\\t }\\n\\t }\\n\\t }, [_vm._t(\\\"button\\\", [_vm._v(_vm._s(_vm.text))]), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"caret\\\"\\n\\t })], 2), _vm._v(\\\" \\\"), _vm._t(\\\"dropdown-menu\\\", [_vm._c('ul', {\\n\\t staticClass: \\\"dropdown-menu\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)])], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-39be1072\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 108 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(109)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(110)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\FormGroup.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-79eb400a\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-79eb400a\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] FormGroup.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 109 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t// let coerce = {\\n\\t// enterSubmit: 'boolean',\\n\\t// icon: 'boolean'\\n\\t// }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t enterSubmit: {\\n\\t type: Boolean,\\n\\t default: false\\n\\t },\\n\\t icon: {\\n\\t type: Boolean,\\n\\t default: false\\n\\t },\\n\\t lang: {\\n\\t type: String,\\n\\t default: navigator.language\\n\\t }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t children: [],\\n\\t valid: null,\\n\\t timeout: null\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t valid: function valid(val, old) {\\n\\t this.$emit('isvalid', val);\\n\\t this.$emit(!val ? 'invalid' : 'valid');\\n\\t if (val !== old && this._parent) this._parent.validate();\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t validate: function validate() {\\n\\t var valid = true;\\n\\t this.children.some(function (el) {\\n\\t var v = el.validate ? el.validate() : el.valid !== undefined ? el.valid : el.required && !~['', null, undefined].indexOf(el.value);\\n\\t if (!v) valid = false;\\n\\t return !valid;\\n\\t });\\n\\t this.valid = valid;\\n\\t return valid === true;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._formGroup = true;\\n\\t var parent = this.$parent;\\n\\t while (parent && !parent._formGroup) {\\n\\t parent = parent.$parent;\\n\\t }\\n\\t if (parent && parent._formGroup) {\\n\\t parent.children.push(this);\\n\\t this._parent = parent;\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t this.validate();\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t if (this._parent) {\\n\\t var index = this._parent.children.indexOf(this);\\n\\t this._parent.children.splice(index, 1);\\n\\t }\\n\\t }\\n\\t}; //\\n\\t//\\n\\n/***/ },\\n/* 110 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('span', [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-79eb400a\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 111 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(112)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(113)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\FormValidator.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-b9f57c46\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-b9f57c46\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] FormValidator.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 112 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t enterSubmit: { type: Boolean, default: false },\\n\\t icon: { type: Boolean, default: false },\\n\\t lang: { type: String, default: navigator.language },\\n\\t value: null\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t children: [],\\n\\t valid: null,\\n\\t timeout: null\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t valid: function valid(val, old) {\\n\\t this.$emit('isvalid', val);\\n\\t this.$emit('input', val);\\n\\t this.$emit(!val ? 'invalid' : 'valid');\\n\\t if (val !== old && this._parent) this._parent.validate();\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t validate: function validate() {\\n\\t var invalid = !this.children.every(function (el) {\\n\\t return el.validate ? el.validate() : el.valid !== undefined ? el.valid : el.required && !~['', null, undefined].indexOf(el.value);\\n\\t });\\n\\t this.valid = !invalid;\\n\\t return !invalid;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._formValidator = true;\\n\\t var parent = this.$parent;\\n\\t while (parent && !parent._formValidator) {\\n\\t parent = parent.$parent;\\n\\t }\\n\\t if (parent && parent._formValidator) {\\n\\t parent.children.push(this);\\n\\t this._parent = parent;\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t this.validate();\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t if (this._parent) {\\n\\t var index = this._parent.children.indexOf(this);\\n\\t this._parent.children.splice(index, 1);\\n\\t }\\n\\t }\\n\\t}; //\\n\\t//\\n\\n/***/ },\\n/* 113 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('span', [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-b9f57c46\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 114 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(115)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(117)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(118)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Input.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t__vue_options__._scopeId = \\\"data-v-652ad7b9\\\"\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-652ad7b9\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-652ad7b9\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Input.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 115 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(116);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-652ad7b9&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Input.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-652ad7b9&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Input.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 116 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.form-group[data-v-652ad7b9] {\\\\r\\\\n position: relative;\\\\n}\\\\nlabel~.close[data-v-652ad7b9] {\\\\r\\\\n top: 25px;\\\\n}\\\\n.input-group>.icon[data-v-652ad7b9] {\\\\r\\\\n position: relative;\\\\r\\\\n display: table-cell;\\\\r\\\\n width:0;\\\\r\\\\n z-index: 3;\\\\n}\\\\n.close[data-v-652ad7b9] {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\n}\\\\n.has-feedback .close[data-v-652ad7b9] {\\\\r\\\\n right: 20px;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Input.vue?2c554d3d\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AA0QA;EACA,mBAAA;CACA;AACA;EACA,UAAA;CACA;AACA;EACA,mBAAA;EACA,oBAAA;EACA,QAAA;EACA,WAAA;CACA;AACA;EACA,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;CACA;AACA;EACA,YAAA;CACA\\\",\\\"file\\\":\\\"Input.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div class=\\\\\\\"form-group\\\\\\\" :class=\\\\\\\"{validate:canValidate,'has-feedback':icon,'has-error':canValidate&&valid===false,'has-success':canValidate&&valid}\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"label\\\\\\\"><label v-if=\\\\\\\"label\\\\\\\" class=\\\\\\\"control-label\\\\\\\" @click=\\\\\\\"focus\\\\\\\">{{label}}</label></slot>\\\\r\\\\n <div v-if=\\\\\\\"$slots.before||$slots.after\\\\\\\" class=\\\\\\\"input-group\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"before\\\\\\\"></slot>\\\\r\\\\n <textarea :is=\\\\\\\"type=='textarea'?type:'input'\\\\\\\" class=\\\\\\\"form-control\\\\\\\" ref=\\\\\\\"input\\\\\\\"\\\\r\\\\n :cols=\\\\\\\"cols\\\\\\\"\\\\r\\\\n :disabled=\\\\\\\"disabled\\\\\\\"\\\\r\\\\n :list=\\\\\\\"id_datalist\\\\\\\"\\\\r\\\\n :max=\\\\\\\"attr(max)\\\\\\\"\\\\r\\\\n :maxlength=\\\\\\\"maxlength\\\\\\\"\\\\r\\\\n :min=\\\\\\\"attr(min)\\\\\\\"\\\\r\\\\n :name=\\\\\\\"name\\\\\\\"\\\\r\\\\n :placeholder=\\\\\\\"placeholder\\\\\\\"\\\\r\\\\n :readonly=\\\\\\\"readonly\\\\\\\"\\\\r\\\\n :required=\\\\\\\"required\\\\\\\"\\\\r\\\\n :rows=\\\\\\\"rows\\\\\\\"\\\\r\\\\n :step=\\\\\\\"step\\\\\\\"\\\\r\\\\n :title=\\\\\\\"attr(title)\\\\\\\"\\\\r\\\\n :type=\\\\\\\"type=='textarea'?null:type\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"val\\\\\\\"\\\\r\\\\n @blur=\\\\\\\"emit\\\\\\\" @focus=\\\\\\\"emit\\\\\\\" @input=\\\\\\\"emit\\\\\\\"\\\\r\\\\n @keyup.enter=\\\\\\\"type!='textarea'&&enterSubmit&&submit()\\\\\\\"\\\\r\\\\n ></textarea>\\\\r\\\\n <div v-if=\\\\\\\"clearButton && value\\\\\\\" :class=\\\\\\\"{icon:icon}\\\\\\\">\\\\r\\\\n <span class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"value = ''\\\\\\\">&times;</span>\\\\r\\\\n </div>\\\\r\\\\n <div v-if=\\\\\\\"icon\\\\\\\" class=\\\\\\\"icon\\\\\\\">\\\\r\\\\n <span v-if=\\\\\\\"icon&&valid!==null\\\\\\\" :class=\\\\\\\"['form-control-feedback glyphicon','glyphicon-'+(valid?'ok':'remove')]\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></span>\\\\r\\\\n </div>\\\\r\\\\n <slot name=\\\\\\\"after\\\\\\\"></slot>\\\\r\\\\n </div>\\\\r\\\\n <template v-else>\\\\r\\\\n <textarea :is=\\\\\\\"type=='textarea'?type:'input'\\\\\\\" class=\\\\\\\"form-control\\\\\\\" ref=\\\\\\\"input\\\\\\\"\\\\r\\\\n :cols=\\\\\\\"cols\\\\\\\"\\\\r\\\\n :disabled=\\\\\\\"disabled\\\\\\\"\\\\r\\\\n :list=\\\\\\\"id_datalist\\\\\\\"\\\\r\\\\n :max=\\\\\\\"attr(max)\\\\\\\"\\\\r\\\\n :maxlength=\\\\\\\"maxlength\\\\\\\"\\\\r\\\\n :min=\\\\\\\"attr(min)\\\\\\\"\\\\r\\\\n :name=\\\\\\\"name\\\\\\\"\\\\r\\\\n :placeholder=\\\\\\\"placeholder\\\\\\\"\\\\r\\\\n :readonly=\\\\\\\"readonly\\\\\\\"\\\\r\\\\n :required=\\\\\\\"required\\\\\\\"\\\\r\\\\n :rows=\\\\\\\"rows\\\\\\\"\\\\r\\\\n :step=\\\\\\\"step\\\\\\\"\\\\r\\\\n :title=\\\\\\\"attr(title)\\\\\\\"\\\\r\\\\n :type=\\\\\\\"type=='textarea'?null:type\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"val\\\\\\\"\\\\r\\\\n @blur=\\\\\\\"emit\\\\\\\" @focus=\\\\\\\"emit\\\\\\\" @input=\\\\\\\"emit\\\\\\\"\\\\r\\\\n @keyup.enter=\\\\\\\"type!='textarea'&&enterSubmit&&submit()\\\\\\\"\\\\r\\\\n ></textarea>\\\\r\\\\n <span v-if=\\\\\\\"clearButton && val\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"val = ''\\\\\\\">&times;</span>\\\\r\\\\n <span v-if=\\\\\\\"icon&&valid!==null\\\\\\\" :class=\\\\\\\"['form-control-feedback glyphicon','glyphicon-'+(valid?'ok':'remove')]\\\\\\\" aria-hidden=\\\\\\\"true\\\\\\\"></span>\\\\r\\\\n </template>\\\\r\\\\n <datalist v-if=\\\\\\\"id_datalist\\\\\\\" :id=\\\\\\\"id_datalist\\\\\\\">\\\\r\\\\n <option v-for=\\\\\\\"opc in options\\\\\\\" :value=\\\\\\\"opc\\\\\\\"></option>\\\\r\\\\n </datalist>\\\\r\\\\n <div v-if=\\\\\\\"showHelp\\\\\\\" class=\\\\\\\"help-block\\\\\\\" @click=\\\\\\\"focus\\\\\\\">{{help}}</div>\\\\r\\\\n <div v-if=\\\\\\\"showError\\\\\\\" class=\\\\\\\"help-block with-errors\\\\\\\" @click=\\\\\\\"focus\\\\\\\">{{errorText}}</div>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {coerce, delayer, translations} from './utils/utils.js'\\\\r\\\\nimport $ from './utils/NodeList.js'\\\\r\\\\n\\\\r\\\\nvar DELAY = 300\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n clearButton: {type: Boolean, default: false},\\\\r\\\\n cols: {type: Number, default: null},\\\\r\\\\n datalist: {type: Array, default: null},\\\\r\\\\n disabled: {type: Boolean, default: false},\\\\r\\\\n enterSubmit: {type: Boolean, default: false},\\\\r\\\\n error: {type: String, default: null},\\\\r\\\\n help: {type: String, default: null},\\\\r\\\\n hideHelp: {type: Boolean, default: true},\\\\r\\\\n icon: {type: Boolean, default: false},\\\\r\\\\n label: {type: String, default: null},\\\\r\\\\n lang: {type: String, default: navigator.language},\\\\r\\\\n mask: null,\\\\r\\\\n maskDelay: {type: Number, default: 100},\\\\r\\\\n match: {type: String, default: null},\\\\r\\\\n max: {type: String, default: null},\\\\r\\\\n maxlength: {type: Number, default: null},\\\\r\\\\n min: {type: String, default: null},\\\\r\\\\n minlength: {type: Number, default: 0},\\\\r\\\\n name: {type: String, default: null},\\\\r\\\\n pattern: {default: null},\\\\r\\\\n placeholder: {type: String, default: null},\\\\r\\\\n readonly: {type: Boolean, default: false},\\\\r\\\\n required: {type: Boolean, default: false},\\\\r\\\\n rows: {type: Number, default: 3},\\\\r\\\\n step: {type: Number, default: null},\\\\r\\\\n type: {type: String, default: 'text'},\\\\r\\\\n url: {type: String, default: null},\\\\r\\\\n urlMap: {type: Function, default: null},\\\\r\\\\n validationDelay: {type: Number, default: 250},\\\\r\\\\n value: {default: null}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n var val = this.value\\\\r\\\\n return {\\\\r\\\\n options: this.datalist,\\\\r\\\\n val,\\\\r\\\\n valid: null,\\\\r\\\\n timeout: null\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n canValidate () { return !this.disabled && !this.readonly && (this.required || this.regex || this.nativeValidate || this.match !== null) },\\\\r\\\\n errorText () {\\\\r\\\\n let value = this.value\\\\r\\\\n let error = [this.error]\\\\r\\\\n if (!value && this.required) error.push('(' + this.text.required.toLowerCase() + ')')\\\\r\\\\n if (value && (value.length < this.minlength)) error.push('(' + this.text.minLength.toLowerCase() + ': ' + this.minlength + ')')\\\\r\\\\n return error.join(' ')\\\\r\\\\n },\\\\r\\\\n id_datalist () {\\\\r\\\\n if (this.type !== 'textarea' && this.datalist instanceof Array) {\\\\r\\\\n if (!this._id_datalist) {\\\\r\\\\n if (!this.$root.id_datalist) { this.$root.id_datalist = 0 }\\\\r\\\\n this._id_datalist = 'input-datalist' + this.$root.id_datalist++\\\\r\\\\n }\\\\r\\\\n return this._id_datalist\\\\r\\\\n }\\\\r\\\\n return null\\\\r\\\\n },\\\\r\\\\n input () { return this.$refs.input },\\\\r\\\\n nativeValidate () { return (this.input || {}).checkValidity && (~['url', 'email'].indexOf(this.type.toLowerCase()) || this.min || this.max) },\\\\r\\\\n regex () { return coerce.pattern(this.pattern) },\\\\r\\\\n showError () { return this.error && this.valid === false },\\\\r\\\\n showHelp () { return this.help && (!this.showError || !this.hideHelp) },\\\\r\\\\n text () { return translations(this.lang) },\\\\r\\\\n title () { return this.errorText || this.help || '' }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n datalist (val, old) {\\\\r\\\\n if (val !== old && val instanceof Array) { this.options = val }\\\\r\\\\n },\\\\r\\\\n match (val) { this.eval() },\\\\r\\\\n options (val, old) {\\\\r\\\\n if (val !== old) this.$emit('options', val)\\\\r\\\\n },\\\\r\\\\n url (val) {\\\\r\\\\n this._url()\\\\r\\\\n },\\\\r\\\\n val (val, old) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n if (val !== old) {\\\\r\\\\n if (this.mask instanceof Function) {\\\\r\\\\n val = this.mask(val || '')\\\\r\\\\n if (this.val !== val) {\\\\r\\\\n if (this._timeout.mask) clearTimeout(this._timeout.mask)\\\\r\\\\n this._timeout.mask = setTimeout(() => {\\\\r\\\\n this.val = val\\\\r\\\\n }, isNaN(this.maskDelay) ? 0 : this.maskDelay)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n this.eval()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n valid (val, old) {\\\\r\\\\n this.$emit('isvalid', val)\\\\r\\\\n this.$emit(!val ? 'invalid' : 'valid')\\\\r\\\\n if (this._parent) this._parent.validate()\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n if (this.val !== val) { this.val = val }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n attr (value) {\\\\r\\\\n return ~['', null, undefined].indexOf(value) || value instanceof Function ? null : value\\\\r\\\\n },\\\\r\\\\n emit (e) {\\\\r\\\\n this.$emit(e.type, e.type == 'input' ? e.target.value : e)\\\\r\\\\n if (e.type === 'blur' && this.canValidate) { this.valid = this.validate() }\\\\r\\\\n },\\\\r\\\\n eval () {\\\\r\\\\n if (this._timeout.eval) clearTimeout(this._timeout.eval)\\\\r\\\\n if (!this.canValidate) {\\\\r\\\\n this.valid = true\\\\r\\\\n } else {\\\\r\\\\n this._timeout.eval = setTimeout(() => {\\\\r\\\\n this.valid = this.validate()\\\\r\\\\n this._timeout.eval = null\\\\r\\\\n }, this.validationDelay)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n focus () { this.input.focus() },\\\\r\\\\n submit () {\\\\r\\\\n if (this.$parent._formValidator) {\\\\r\\\\n return this.$parent.validate()\\\\r\\\\n }\\\\r\\\\n if (this.input.form) {\\\\r\\\\n const invalids = $('.form-group.validate:not(.has-success)', this.input.form)\\\\r\\\\n if (invalids.length) {\\\\r\\\\n invalids.find('input,textarea,select')[0].focus()\\\\r\\\\n } else {\\\\r\\\\n this.input.form.submit()\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n validate () {\\\\r\\\\n if (!this.canValidate) { return true }\\\\r\\\\n let value = (this.val || '').trim()\\\\r\\\\n if (!value) { return !this.required }\\\\r\\\\n if (this.match !== null) { return this.match === value }\\\\r\\\\n if (value.length < this.minlength) { return false }\\\\r\\\\n if (this.nativeValidate && !this.input.checkValidity()) { return false }\\\\r\\\\n if (this.regex) {\\\\r\\\\n if (!(this.regex instanceof Function ? this.regex(this.value) : this.regex.test(this.value))) { return false }\\\\r\\\\n }\\\\r\\\\n return true\\\\r\\\\n },\\\\r\\\\n reset() {\\\\r\\\\n this.value = ''\\\\r\\\\n this.valid = null\\\\r\\\\n if (this._timeout.mask) clearTimeout(this._timeout.mask)\\\\r\\\\n if (this._timeout.eval) clearTimeout(this._timeout.eval)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this._input = true\\\\r\\\\n this._timeout = {}\\\\r\\\\n let parent = this.$parent\\\\r\\\\n while (parent && !parent._formValidator) { parent = parent.$parent }\\\\r\\\\n if (parent && parent._formValidator) {\\\\r\\\\n parent.children.push(this)\\\\r\\\\n this._parent = parent\\\\r\\\\n }\\\\r\\\\n this._url = delayer(function () {\\\\r\\\\n if (!this.url || !this.$http || this._loading) { return }\\\\r\\\\n this._loading = true\\\\r\\\\n this.$http.get(this.url).then(response => {\\\\r\\\\n var data = response.data instanceof Array ? response.data : []\\\\r\\\\n try { data = JSON.parse(data) } catch (e) {}\\\\r\\\\n if (this.urlMap) { data = data.map(this.urlMap) }\\\\r\\\\n this.options = data\\\\r\\\\n this.loading = false\\\\r\\\\n }, response => {\\\\r\\\\n this.loading = false\\\\r\\\\n })\\\\r\\\\n }, DELAY)\\\\r\\\\n if (this.url) this._url()\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n // $(this.input).on('focus', e => { this.$emit('focus', e) }).on('blur', e => {\\\\r\\\\n // if (this.canValidate) { this.valid = this.validate() }\\\\r\\\\n // this.$emit('blur', e)\\\\r\\\\n // })\\\\r\\\\n },\\\\r\\\\n beforeDestroy () {\\\\r\\\\n // $(this.input).off()\\\\r\\\\n if (this._parent) {\\\\r\\\\n var index = this._parent.children.indexOf(this)\\\\r\\\\n this._parent.children.splice(index, 1)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style scoped>\\\\r\\\\n.form-group {\\\\r\\\\n position: relative;\\\\r\\\\n}\\\\r\\\\nlabel~.close {\\\\r\\\\n top: 25px;\\\\r\\\\n}\\\\r\\\\n.input-group>.icon {\\\\r\\\\n position: relative;\\\\r\\\\n display: table-cell;\\\\r\\\\n width:0;\\\\r\\\\n z-index: 3;\\\\r\\\\n}\\\\r\\\\n.close {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.has-feedback .close {\\\\r\\\\n right: 20px;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 117 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\tvar DELAY = 300;\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t clearButton: { type: Boolean, default: false },\\n\\t cols: { type: Number, default: null },\\n\\t datalist: { type: Array, default: null },\\n\\t disabled: { type: Boolean, default: false },\\n\\t enterSubmit: { type: Boolean, default: false },\\n\\t error: { type: String, default: null },\\n\\t help: { type: String, default: null },\\n\\t hideHelp: { type: Boolean, default: true },\\n\\t icon: { type: Boolean, default: false },\\n\\t label: { type: String, default: null },\\n\\t lang: { type: String, default: navigator.language },\\n\\t mask: null,\\n\\t maskDelay: { type: Number, default: 100 },\\n\\t match: { type: String, default: null },\\n\\t max: { type: String, default: null },\\n\\t maxlength: { type: Number, default: null },\\n\\t min: { type: String, default: null },\\n\\t minlength: { type: Number, default: 0 },\\n\\t name: { type: String, default: null },\\n\\t pattern: { default: null },\\n\\t placeholder: { type: String, default: null },\\n\\t readonly: { type: Boolean, default: false },\\n\\t required: { type: Boolean, default: false },\\n\\t rows: { type: Number, default: 3 },\\n\\t step: { type: Number, default: null },\\n\\t type: { type: String, default: 'text' },\\n\\t url: { type: String, default: null },\\n\\t urlMap: { type: Function, default: null },\\n\\t validationDelay: { type: Number, default: 250 },\\n\\t value: { default: null }\\n\\t },\\n\\t data: function data() {\\n\\t var val = this.value;\\n\\t return {\\n\\t options: this.datalist,\\n\\t val: val,\\n\\t valid: null,\\n\\t timeout: null\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t canValidate: function canValidate() {\\n\\t return !this.disabled && !this.readonly && (this.required || this.regex || this.nativeValidate || this.match !== null);\\n\\t },\\n\\t errorText: function errorText() {\\n\\t var value = this.value;\\n\\t var error = [this.error];\\n\\t if (!value && this.required) error.push('(' + this.text.required.toLowerCase() + ')');\\n\\t if (value && value.length < this.minlength) error.push('(' + this.text.minLength.toLowerCase() + ': ' + this.minlength + ')');\\n\\t return error.join(' ');\\n\\t },\\n\\t id_datalist: function id_datalist() {\\n\\t if (this.type !== 'textarea' && this.datalist instanceof Array) {\\n\\t if (!this._id_datalist) {\\n\\t if (!this.$root.id_datalist) {\\n\\t this.$root.id_datalist = 0;\\n\\t }\\n\\t this._id_datalist = 'input-datalist' + this.$root.id_datalist++;\\n\\t }\\n\\t return this._id_datalist;\\n\\t }\\n\\t return null;\\n\\t },\\n\\t input: function input() {\\n\\t return this.$refs.input;\\n\\t },\\n\\t nativeValidate: function nativeValidate() {\\n\\t return (this.input || {}).checkValidity && (~['url', 'email'].indexOf(this.type.toLowerCase()) || this.min || this.max);\\n\\t },\\n\\t regex: function regex() {\\n\\t return _utils.coerce.pattern(this.pattern);\\n\\t },\\n\\t showError: function showError() {\\n\\t return this.error && this.valid === false;\\n\\t },\\n\\t showHelp: function showHelp() {\\n\\t return this.help && (!this.showError || !this.hideHelp);\\n\\t },\\n\\t text: function text() {\\n\\t return (0, _utils.translations)(this.lang);\\n\\t },\\n\\t title: function title() {\\n\\t return this.errorText || this.help || '';\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t datalist: function datalist(val, old) {\\n\\t if (val !== old && val instanceof Array) {\\n\\t this.options = val;\\n\\t }\\n\\t },\\n\\t match: function match(val) {\\n\\t this.eval();\\n\\t },\\n\\t options: function options(val, old) {\\n\\t if (val !== old) this.$emit('options', val);\\n\\t },\\n\\t url: function url(val) {\\n\\t this._url();\\n\\t },\\n\\t val: function val(_val, old) {\\n\\t var _this = this;\\n\\t\\n\\t this.$emit('input', _val);\\n\\t if (_val !== old) {\\n\\t if (this.mask instanceof Function) {\\n\\t _val = this.mask(_val || '');\\n\\t if (this.val !== _val) {\\n\\t if (this._timeout.mask) clearTimeout(this._timeout.mask);\\n\\t this._timeout.mask = setTimeout(function () {\\n\\t _this.val = _val;\\n\\t }, isNaN(this.maskDelay) ? 0 : this.maskDelay);\\n\\t }\\n\\t }\\n\\t this.eval();\\n\\t }\\n\\t },\\n\\t valid: function valid(val, old) {\\n\\t this.$emit('isvalid', val);\\n\\t this.$emit(!val ? 'invalid' : 'valid');\\n\\t if (this._parent) this._parent.validate();\\n\\t },\\n\\t value: function value(val) {\\n\\t if (this.val !== val) {\\n\\t this.val = val;\\n\\t }\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t attr: function attr(value) {\\n\\t return ~['', null, undefined].indexOf(value) || value instanceof Function ? null : value;\\n\\t },\\n\\t emit: function emit(e) {\\n\\t this.$emit(e.type, e.type == 'input' ? e.target.value : e);\\n\\t if (e.type === 'blur' && this.canValidate) {\\n\\t this.valid = this.validate();\\n\\t }\\n\\t },\\n\\t eval: function _eval() {\\n\\t var _this2 = this;\\n\\t\\n\\t if (this._timeout.eval) clearTimeout(this._timeout.eval);\\n\\t if (!this.canValidate) {\\n\\t this.valid = true;\\n\\t } else {\\n\\t this._timeout.eval = setTimeout(function () {\\n\\t _this2.valid = _this2.validate();\\n\\t _this2._timeout.eval = null;\\n\\t }, this.validationDelay);\\n\\t }\\n\\t },\\n\\t focus: function focus() {\\n\\t this.input.focus();\\n\\t },\\n\\t submit: function submit() {\\n\\t if (this.$parent._formValidator) {\\n\\t return this.$parent.validate();\\n\\t }\\n\\t if (this.input.form) {\\n\\t var invalids = (0, _NodeList2.default)('.form-group.validate:not(.has-success)', this.input.form);\\n\\t if (invalids.length) {\\n\\t invalids.find('input,textarea,select')[0].focus();\\n\\t } else {\\n\\t this.input.form.submit();\\n\\t }\\n\\t }\\n\\t },\\n\\t validate: function validate() {\\n\\t if (!this.canValidate) {\\n\\t return true;\\n\\t }\\n\\t var value = (this.val || '').trim();\\n\\t if (!value) {\\n\\t return !this.required;\\n\\t }\\n\\t if (this.match !== null) {\\n\\t return this.match === value;\\n\\t }\\n\\t if (value.length < this.minlength) {\\n\\t return false;\\n\\t }\\n\\t if (this.nativeValidate && !this.input.checkValidity()) {\\n\\t return false;\\n\\t }\\n\\t if (this.regex) {\\n\\t if (!(this.regex instanceof Function ? this.regex(this.value) : this.regex.test(this.value))) {\\n\\t return false;\\n\\t }\\n\\t }\\n\\t return true;\\n\\t },\\n\\t reset: function reset() {\\n\\t this.value = '';\\n\\t this.valid = null;\\n\\t if (this._timeout.mask) clearTimeout(this._timeout.mask);\\n\\t if (this._timeout.eval) clearTimeout(this._timeout.eval);\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._input = true;\\n\\t this._timeout = {};\\n\\t var parent = this.$parent;\\n\\t while (parent && !parent._formValidator) {\\n\\t parent = parent.$parent;\\n\\t }\\n\\t if (parent && parent._formValidator) {\\n\\t parent.children.push(this);\\n\\t this._parent = parent;\\n\\t }\\n\\t this._url = (0, _utils.delayer)(function () {\\n\\t var _this3 = this;\\n\\t\\n\\t if (!this.url || !this.$http || this._loading) {\\n\\t return;\\n\\t }\\n\\t this._loading = true;\\n\\t this.$http.get(this.url).then(function (response) {\\n\\t var data = response.data instanceof Array ? response.data : [];\\n\\t try {\\n\\t data = JSON.parse(data);\\n\\t } catch (e) {}\\n\\t if (_this3.urlMap) {\\n\\t data = data.map(_this3.urlMap);\\n\\t }\\n\\t _this3.options = data;\\n\\t _this3.loading = false;\\n\\t }, function (response) {\\n\\t _this3.loading = false;\\n\\t });\\n\\t }, DELAY);\\n\\t if (this.url) this._url();\\n\\t },\\n\\t mounted: function mounted() {\\n\\t // $(this.input).on('focus', e => { this.$emit('focus', e) }).on('blur', e => {\\n\\t // if (this.canValidate) { this.valid = this.validate() }\\n\\t // this.$emit('blur', e)\\n\\t // })\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t // $(this.input).off()\\n\\t if (this._parent) {\\n\\t var index = this._parent.children.indexOf(this);\\n\\t this._parent.children.splice(index, 1);\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 118 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"form-group\\\",\\n\\t class: {\\n\\t validate: _vm.canValidate, 'has-feedback': _vm.icon, 'has-error': _vm.canValidate && _vm.valid === false, 'has-success': _vm.canValidate && _vm.valid\\n\\t }\\n\\t }, [_vm._t(\\\"label\\\", [(_vm.label) ? _vm._c('label', {\\n\\t staticClass: \\\"control-label\\\",\\n\\t on: {\\n\\t \\\"click\\\": _vm.focus\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.label))]) : _vm._e()]), _vm._v(\\\" \\\"), (_vm.$slots.before || _vm.$slots.after) ? _vm._c('div', {\\n\\t staticClass: \\\"input-group\\\"\\n\\t }, [_vm._t(\\\"before\\\"), _vm._v(\\\" \\\"), _vm._c(_vm.type == 'textarea' ? _vm.type : 'input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t ref: \\\"input\\\",\\n\\t tag: \\\"textarea\\\",\\n\\t staticClass: \\\"form-control\\\",\\n\\t attrs: {\\n\\t \\\"cols\\\": _vm.cols,\\n\\t \\\"disabled\\\": _vm.disabled,\\n\\t \\\"list\\\": _vm.id_datalist,\\n\\t \\\"max\\\": _vm.attr(_vm.max),\\n\\t \\\"maxlength\\\": _vm.maxlength,\\n\\t \\\"min\\\": _vm.attr(_vm.min),\\n\\t \\\"name\\\": _vm.name,\\n\\t \\\"placeholder\\\": _vm.placeholder,\\n\\t \\\"readonly\\\": _vm.readonly,\\n\\t \\\"required\\\": _vm.required,\\n\\t \\\"rows\\\": _vm.rows,\\n\\t \\\"step\\\": _vm.step,\\n\\t \\\"title\\\": _vm.attr(_vm.title),\\n\\t \\\"type\\\": _vm.type == 'textarea' ? null : _vm.type\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm._s(_vm.val)\\n\\t },\\n\\t on: {\\n\\t \\\"blur\\\": _vm.emit,\\n\\t \\\"focus\\\": _vm.emit,\\n\\t \\\"input\\\": [function($event) {\\n\\t if ($event.target.composing) { return; }\\n\\t _vm.val = $event.target.value\\n\\t }, _vm.emit],\\n\\t \\\"keyup\\\": function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n\\t _vm.type != 'textarea' && _vm.enterSubmit && _vm.submit()\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), (_vm.clearButton && _vm.value) ? _vm._c('div', {\\n\\t class: {\\n\\t icon: _vm.icon\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t staticClass: \\\"close\\\",\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.value = ''\\n\\t }\\n\\t }\\n\\t }, [_vm._v(\\\"×\\\")])]) : _vm._e(), _vm._v(\\\" \\\"), (_vm.icon) ? _vm._c('div', {\\n\\t staticClass: \\\"icon\\\"\\n\\t }, [(_vm.icon && _vm.valid !== null) ? _vm._c('span', {\\n\\t class: ['form-control-feedback glyphicon', 'glyphicon-' + (_vm.valid ? 'ok' : 'remove')],\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t }\\n\\t }) : _vm._e()]) : _vm._e(), _vm._v(\\\" \\\"), _vm._t(\\\"after\\\")], 2) : [_vm._c(_vm.type == 'textarea' ? _vm.type : 'input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t ref: \\\"input\\\",\\n\\t tag: \\\"textarea\\\",\\n\\t staticClass: \\\"form-control\\\",\\n\\t attrs: {\\n\\t \\\"cols\\\": _vm.cols,\\n\\t \\\"disabled\\\": _vm.disabled,\\n\\t \\\"list\\\": _vm.id_datalist,\\n\\t \\\"max\\\": _vm.attr(_vm.max),\\n\\t \\\"maxlength\\\": _vm.maxlength,\\n\\t \\\"min\\\": _vm.attr(_vm.min),\\n\\t \\\"name\\\": _vm.name,\\n\\t \\\"placeholder\\\": _vm.placeholder,\\n\\t \\\"readonly\\\": _vm.readonly,\\n\\t \\\"required\\\": _vm.required,\\n\\t \\\"rows\\\": _vm.rows,\\n\\t \\\"step\\\": _vm.step,\\n\\t \\\"title\\\": _vm.attr(_vm.title),\\n\\t \\\"type\\\": _vm.type == 'textarea' ? null : _vm.type\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm._s(_vm.val)\\n\\t },\\n\\t on: {\\n\\t \\\"blur\\\": _vm.emit,\\n\\t \\\"focus\\\": _vm.emit,\\n\\t \\\"input\\\": [function($event) {\\n\\t if ($event.target.composing) { return; }\\n\\t _vm.val = $event.target.value\\n\\t }, _vm.emit],\\n\\t \\\"keyup\\\": function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n\\t _vm.type != 'textarea' && _vm.enterSubmit && _vm.submit()\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), (_vm.clearButton && _vm.val) ? _vm._c('span', {\\n\\t staticClass: \\\"close\\\",\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.val = ''\\n\\t }\\n\\t }\\n\\t }, [_vm._v(\\\"×\\\")]) : _vm._e(), _vm._v(\\\" \\\"), (_vm.icon && _vm.valid !== null) ? _vm._c('span', {\\n\\t class: ['form-control-feedback glyphicon', 'glyphicon-' + (_vm.valid ? 'ok' : 'remove')],\\n\\t attrs: {\\n\\t \\\"aria-hidden\\\": \\\"true\\\"\\n\\t }\\n\\t }) : _vm._e()], _vm._v(\\\" \\\"), (_vm.id_datalist) ? _vm._c('datalist', {\\n\\t attrs: {\\n\\t \\\"id\\\": _vm.id_datalist\\n\\t }\\n\\t }, _vm._l((_vm.options), function(opc) {\\n\\t return _vm._c('option', {\\n\\t domProps: {\\n\\t \\\"value\\\": opc\\n\\t }\\n\\t })\\n\\t })) : _vm._e(), _vm._v(\\\" \\\"), (_vm.showHelp) ? _vm._c('div', {\\n\\t staticClass: \\\"help-block\\\",\\n\\t on: {\\n\\t \\\"click\\\": _vm.focus\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.help))]) : _vm._e(), _vm._v(\\\" \\\"), (_vm.showError) ? _vm._c('div', {\\n\\t staticClass: \\\"help-block with-errors\\\",\\n\\t on: {\\n\\t \\\"click\\\": _vm.focus\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.errorText))]) : _vm._e()], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-652ad7b9\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 119 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(120)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(122)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(127)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Modal.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-fe7d5dc8\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-fe7d5dc8\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Modal.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 120 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(121);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-fe7d5dc8!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Modal.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-fe7d5dc8!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Modal.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 121 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.modal {\\\\r\\\\n transition: all 0.3s ease;\\\\n}\\\\n.modal.in {\\\\r\\\\n background-color: rgba(0,0,0,0.5);\\\\n}\\\\n.modal.zoom .modal-dialog {\\\\r\\\\n -webkit-transform: scale(0.1);\\\\r\\\\n -moz-transform: scale(0.1);\\\\r\\\\n -ms-transform: scale(0.1);\\\\r\\\\n transform: scale(0.1);\\\\r\\\\n top: 300px;\\\\r\\\\n opacity: 0;\\\\r\\\\n -webkit-transition: all 0.3s;\\\\r\\\\n -moz-transition: all 0.3s;\\\\r\\\\n transition: all 0.3s;\\\\n}\\\\n.modal.zoom.in .modal-dialog {\\\\r\\\\n -webkit-transform: scale(1);\\\\r\\\\n -moz-transform: scale(1);\\\\r\\\\n -ms-transform: scale(1);\\\\r\\\\n transform: scale(1);\\\\r\\\\n -webkit-transform: translate3d(0, -300px, 0);\\\\r\\\\n transform: translate3d(0, -300px, 0);\\\\r\\\\n opacity: 1;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Modal.vue?1fdd6260\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAsGA;EACA,0BAAA;CACA;AACA;EACA,kCAAA;CACA;AACA;EACA,8BAAA;EACA,2BAAA;EACA,0BAAA;EACA,sBAAA;EACA,WAAA;EACA,WAAA;EACA,6BAAA;EACA,0BAAA;EACA,qBAAA;CACA;AACA;EACA,4BAAA;EACA,yBAAA;EACA,wBAAA;EACA,oBAAA;EACA,6CAAA;EACA,qCAAA;EACA,WAAA;CACA\\\",\\\"file\\\":\\\"Modal.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div role=\\\\\\\"dialog\\\\\\\" :class=\\\\\\\"['modal',effect]\\\\\\\" @click=\\\\\\\"backdrop&&action(false,1)\\\\\\\" @transitionend=\\\\\\\"transition = false\\\\\\\">\\\\r\\\\n <div :class=\\\\\\\"['modal-dialog',{'modal-lg':large,'modal-sm':small}]\\\\\\\" role=\\\\\\\"document\\\\\\\" :style=\\\\\\\"{width: optionalWidth}\\\\\\\" @click.stop=\\\\\\\"action(null)\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"modal-content\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"modal-header\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"modal-header\\\\\\\">\\\\r\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"action(false,2)\\\\\\\"><span>&times;</span></button>\\\\r\\\\n <h4 class=\\\\\\\"modal-title\\\\\\\"><slot name=\\\\\\\"title\\\\\\\">{{title}}</slot></h4>\\\\r\\\\n </div>\\\\r\\\\n </slot>\\\\r\\\\n <slot name=\\\\\\\"modal-body\\\\\\\"><div class=\\\\\\\"modal-body\\\\\\\"><slot></slot></div></slot>\\\\r\\\\n <slot name=\\\\\\\"modal-footer\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"modal-footer\\\\\\\">\\\\r\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-default\\\\\\\" @click=\\\\\\\"action(false,3)\\\\\\\">{{ cancelText }}</button>\\\\r\\\\n <button type=\\\\\\\"button\\\\\\\" class=\\\\\\\"btn btn-primary\\\\\\\" @click=\\\\\\\"action(true,4)\\\\\\\">{{ okText }}</button>\\\\r\\\\n </div>\\\\r\\\\n </slot>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {getScrollBarWidth} from './utils/utils.js'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n backdrop: {type: Boolean, default: true},\\\\r\\\\n callback: {type: Function, default: null},\\\\r\\\\n cancelText: {type: String, default: 'Close'},\\\\r\\\\n effect: {type: String, default: null},\\\\r\\\\n large: {type: Boolean, default: false},\\\\r\\\\n okText: {type: String, default: 'Save changes'},\\\\r\\\\n small: {type: Boolean, default: false},\\\\r\\\\n title: {type: String, default: ''},\\\\r\\\\n value: {type: Boolean, required: true},\\\\r\\\\n width: {default: null}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n transition: false,\\\\r\\\\n val: null\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n optionalWidth () {\\\\r\\\\n if (this.width === null) {\\\\r\\\\n return null\\\\r\\\\n } else if (Number.isInteger(this.width)) {\\\\r\\\\n return this.width + 'px'\\\\r\\\\n }\\\\r\\\\n return this.width\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n transition (val, old) {\\\\r\\\\n if (val === old) { return }\\\\r\\\\n const el = this.$el\\\\r\\\\n const body = document.body\\\\r\\\\n if (val) {//starting\\\\r\\\\n if (this.val) {\\\\r\\\\n el.querySelector('.modal-content').focus()\\\\r\\\\n el.style.display = 'block'\\\\r\\\\n setTimeout(() => el.classList.add('in'), 0)\\\\r\\\\n body.classList.add('modal-open')\\\\r\\\\n if (getScrollBarWidth() !== 0) {\\\\r\\\\n body.style.paddingRight = getScrollBarWidth() + 'px'\\\\r\\\\n }\\\\r\\\\n } else {\\\\r\\\\n el.classList.remove('in')\\\\r\\\\n }\\\\r\\\\n } else {//ending\\\\r\\\\n this.$emit(this.val ? 'opened' : 'closed')\\\\r\\\\n if (!this.val) {\\\\r\\\\n el.style.display = 'none'\\\\r\\\\n body.style.paddingRight = null\\\\r\\\\n body.classList.remove('modal-open')\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n val (val, old) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n if (old === null ? val === true : val !== old) this.transition = true\\\\r\\\\n },\\\\r\\\\n value (val, old) {\\\\r\\\\n if (val !== old) this.val = val\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n action (val,p) {\\\\r\\\\n if (val === null) { return }\\\\r\\\\n if (val && this.callback instanceof Function) this.callback()\\\\r\\\\n this.$emit(val ? 'ok' : 'cancel',p)\\\\r\\\\n this.val = val || false\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n this.val = this.value\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n<style>\\\\r\\\\n.modal {\\\\r\\\\n transition: all 0.3s ease;\\\\r\\\\n}\\\\r\\\\n.modal.in {\\\\r\\\\n background-color: rgba(0,0,0,0.5);\\\\r\\\\n}\\\\r\\\\n.modal.zoom .modal-dialog {\\\\r\\\\n -webkit-transform: scale(0.1);\\\\r\\\\n -moz-transform: scale(0.1);\\\\r\\\\n -ms-transform: scale(0.1);\\\\r\\\\n transform: scale(0.1);\\\\r\\\\n top: 300px;\\\\r\\\\n opacity: 0;\\\\r\\\\n -webkit-transition: all 0.3s;\\\\r\\\\n -moz-transition: all 0.3s;\\\\r\\\\n transition: all 0.3s;\\\\r\\\\n}\\\\r\\\\n.modal.zoom.in .modal-dialog {\\\\r\\\\n -webkit-transform: scale(1);\\\\r\\\\n -moz-transform: scale(1);\\\\r\\\\n -ms-transform: scale(1);\\\\r\\\\n transform: scale(1);\\\\r\\\\n -webkit-transform: translate3d(0, -300px, 0);\\\\r\\\\n transform: translate3d(0, -300px, 0);\\\\r\\\\n opacity: 1;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 122 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _isInteger = __webpack_require__(123);\\n\\t\\n\\tvar _isInteger2 = _interopRequireDefault(_isInteger);\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t backdrop: { type: Boolean, default: true },\\n\\t callback: { type: Function, default: null },\\n\\t cancelText: { type: String, default: 'Close' },\\n\\t effect: { type: String, default: null },\\n\\t large: { type: Boolean, default: false },\\n\\t okText: { type: String, default: 'Save changes' },\\n\\t small: { type: Boolean, default: false },\\n\\t title: { type: String, default: '' },\\n\\t value: { type: Boolean, required: true },\\n\\t width: { default: null }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t transition: false,\\n\\t val: null\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t optionalWidth: function optionalWidth() {\\n\\t if (this.width === null) {\\n\\t return null;\\n\\t } else if ((0, _isInteger2.default)(this.width)) {\\n\\t return this.width + 'px';\\n\\t }\\n\\t return this.width;\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t transition: function transition(val, old) {\\n\\t if (val === old) {\\n\\t return;\\n\\t }\\n\\t var el = this.$el;\\n\\t var body = document.body;\\n\\t if (val) {\\n\\t //starting\\n\\t if (this.val) {\\n\\t el.querySelector('.modal-content').focus();\\n\\t el.style.display = 'block';\\n\\t setTimeout(function () {\\n\\t return el.classList.add('in');\\n\\t }, 0);\\n\\t body.classList.add('modal-open');\\n\\t if ((0, _utils.getScrollBarWidth)() !== 0) {\\n\\t body.style.paddingRight = (0, _utils.getScrollBarWidth)() + 'px';\\n\\t }\\n\\t } else {\\n\\t el.classList.remove('in');\\n\\t }\\n\\t } else {\\n\\t //ending\\n\\t this.$emit(this.val ? 'opened' : 'closed');\\n\\t if (!this.val) {\\n\\t el.style.display = 'none';\\n\\t body.style.paddingRight = null;\\n\\t body.classList.remove('modal-open');\\n\\t }\\n\\t }\\n\\t },\\n\\t val: function val(_val, old) {\\n\\t this.$emit('input', _val);\\n\\t if (old === null ? _val === true : _val !== old) this.transition = true;\\n\\t },\\n\\t value: function value(val, old) {\\n\\t if (val !== old) this.val = val;\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t action: function action(val, p) {\\n\\t if (val === null) {\\n\\t return;\\n\\t }\\n\\t if (val && this.callback instanceof Function) this.callback();\\n\\t this.$emit(val ? 'ok' : 'cancel', p);\\n\\t this.val = val || false;\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t this.val = this.value;\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 123 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = { \\\"default\\\": __webpack_require__(124), __esModule: true };\\n\\n/***/ },\\n/* 124 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(125);\\n\\tmodule.exports = __webpack_require__(7).Number.isInteger;\\n\\n/***/ },\\n/* 125 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 20.1.2.3 Number.isInteger(number)\\n\\tvar $export = __webpack_require__(5);\\n\\t\\n\\t$export($export.S, 'Number', {isInteger: __webpack_require__(126)});\\n\\n/***/ },\\n/* 126 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 20.1.2.3 Number.isInteger(number)\\n\\tvar isObject = __webpack_require__(13)\\n\\t , floor = Math.floor;\\n\\tmodule.exports = function isInteger(it){\\n\\t return !isObject(it) && isFinite(it) && floor(it) === it;\\n\\t};\\n\\n/***/ },\\n/* 127 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t class: ['modal', _vm.effect],\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"dialog\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.backdrop && _vm.action(false, 1)\\n\\t },\\n\\t \\\"transitionend\\\": function($event) {\\n\\t _vm.transition = false\\n\\t }\\n\\t }\\n\\t }, [_vm._c('div', {\\n\\t class: ['modal-dialog', {\\n\\t 'modal-lg': _vm.large,\\n\\t 'modal-sm': _vm.small\\n\\t }],\\n\\t style: ({\\n\\t width: _vm.optionalWidth\\n\\t }),\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"document\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.stopPropagation();\\n\\t _vm.action(null)\\n\\t }\\n\\t }\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"modal-content\\\"\\n\\t }, [_vm._t(\\\"modal-header\\\", [_vm._c('div', {\\n\\t staticClass: \\\"modal-header\\\"\\n\\t }, [_vm._c('button', {\\n\\t staticClass: \\\"close\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.action(false, 2)\\n\\t }\\n\\t }\\n\\t }, [_vm._c('span', [_vm._v(\\\"×\\\")])]), _vm._v(\\\" \\\"), _vm._c('h4', {\\n\\t staticClass: \\\"modal-title\\\"\\n\\t }, [_vm._t(\\\"title\\\", [_vm._v(_vm._s(_vm.title))])], 2)])]), _vm._v(\\\" \\\"), _vm._t(\\\"modal-body\\\", [_vm._c('div', {\\n\\t staticClass: \\\"modal-body\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)]), _vm._v(\\\" \\\"), _vm._t(\\\"modal-footer\\\", [_vm._c('div', {\\n\\t staticClass: \\\"modal-footer\\\"\\n\\t }, [_vm._c('button', {\\n\\t staticClass: \\\"btn btn-default\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.action(false, 3)\\n\\t }\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.cancelText))]), _vm._v(\\\" \\\"), _vm._c('button', {\\n\\t staticClass: \\\"btn btn-primary\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.action(true, 4)\\n\\t }\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.okText))])])])], 2)])])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-fe7d5dc8\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 128 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(129)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(130)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Navbar.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-38f0619e\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-38f0619e\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Navbar.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 129 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t type: { type: String, default: 'default' },\\n\\t placement: { type: String, default: '' }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t id: 'bs-example-navbar-collapse-1',\\n\\t collapsed: true,\\n\\t styles: {}\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t slots: function slots() {\\n\\t return this._slotContents;\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t toggleCollapse: function toggleCollapse(e) {\\n\\t e && e.preventDefault();\\n\\t this.collapsed = !this.collapsed;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._navbar = true;\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this = this;\\n\\t\\n\\t try {\\n\\t (function () {\\n\\t var $dropdown = (0, _NodeList2.default)('.dropdown>[data-toggle=\\\"dropdown\\\"]', _this.$el).parent();\\n\\t if ($dropdown) {\\n\\t $dropdown.on('click', '.dropdown-toggle', function (e) {\\n\\t e.preventDefault();\\n\\t $dropdown.each(function (content) {\\n\\t if (content.contains(e.target)) content.classList.toggle('open');\\n\\t });\\n\\t }).on('click', '.dropdown-menu>li>a', function (e) {\\n\\t $dropdown.each(function (content) {\\n\\t if (content.contains(e.target)) content.classList.remove('open');\\n\\t });\\n\\t }).onBlur(function (e) {\\n\\t $dropdown.each(function (content) {\\n\\t if (!content.contains(e.target)) content.classList.remove('open');\\n\\t });\\n\\t });\\n\\t }\\n\\t })();\\n\\t } catch (ex) {\\n\\t console.log('error finding dropdown');\\n\\t }\\n\\t\\n\\t (0, _NodeList2.default)(this.$el).on('click touchstart', 'li:not(.dropdown)>a', function (e) {\\n\\t setTimeout(function () {\\n\\t _this.collapsed = true;\\n\\t }, 200);\\n\\t }).onBlur(function (e) {\\n\\t if (!_this.$el.contains(e.target)) {\\n\\t _this.collapsed = true;\\n\\t }\\n\\t });\\n\\t var height = this.$el.offsetHeight;\\n\\t if (this.placement === 'top') {\\n\\t document.body.style.paddingTop = height + 'px';\\n\\t }\\n\\t if (this.placement === 'bottom') {\\n\\t document.body.style.paddingBottom = height + 'px';\\n\\t }\\n\\t if (this.$slots.collapse) (0, _NodeList2.default)('[data-toggle=\\\"collapse\\\"]', this.$el).on('click', function (e) {\\n\\t return _this.toggleCollapse(e);\\n\\t });\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t (0, _NodeList2.default)('.dropdown', this.$el).off('click').offBlur();\\n\\t if (this.$slots.collapse) (0, _NodeList2.default)('[data-toggle=\\\"collapse\\\"]', this.$el).off('click');\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 130 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('nav', {\\n\\t class: ['navbar', 'navbar-' + _vm.type, _vm.placement === 'static' ? 'navbar-static-top' : 'navbar-fixed-' + _vm.placement]\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"container-fluid\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"navbar-header\\\"\\n\\t }, [(!_vm.$slots.collapse) ? _vm._c('button', {\\n\\t staticClass: \\\"navbar-toggle collapsed\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"button\\\",\\n\\t \\\"aria-expanded\\\": \\\"false\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.toggleCollapse\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t staticClass: \\\"sr-only\\\"\\n\\t }, [_vm._v(\\\"Toggle navigation\\\")]), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"icon-bar\\\"\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"icon-bar\\\"\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"icon-bar\\\"\\n\\t })]) : _vm._e(), _vm._v(\\\" \\\"), _vm._t(\\\"collapse\\\"), _vm._v(\\\" \\\"), _vm._t(\\\"brand\\\")], 2), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t class: ['navbar-collapse', {\\n\\t collapse: _vm.collapsed\\n\\t }]\\n\\t }, [_vm._c('ul', {\\n\\t staticClass: \\\"nav navbar-nav\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2), _vm._v(\\\" \\\"), (_vm.$slots.left) ? _vm._c('ul', {\\n\\t staticClass: \\\"nav navbar-nav navbar-left\\\"\\n\\t }, [_vm._t(\\\"left\\\")], 2) : _vm._e(), _vm._v(\\\" \\\"), (_vm.$slots.right) ? _vm._c('ul', {\\n\\t staticClass: \\\"nav navbar-nav navbar-right\\\"\\n\\t }, [_vm._t(\\\"right\\\")], 2) : _vm._e()])])])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-38f0619e\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 131 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(132)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(133)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Option.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-42088116\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-42088116\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Option.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 132 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: { value: null },\\n\\t data: function data() {\\n\\t return { loading: true };\\n\\t },\\n\\t mounted: function mounted() {\\n\\t if (this.$parent._select) {\\n\\t if (!this.$parent.options) {\\n\\t this.$parent.options = [];\\n\\t }\\n\\t var el = {};\\n\\t el[this.$parent.optionsLabel] = this.$el.innerHTML;\\n\\t el[this.$parent.optionsValue] = this.value;\\n\\t this.$parent.options.push(el);\\n\\t this.loading = false;\\n\\t } else {\\n\\t console.warn('options only work inside a select component');\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 133 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return (_vm.loading) ? _vm._c('li', [_vm._t(\\\"default\\\")], 2) : _vm._e()\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-42088116\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 134 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(135)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(137)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(138)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Panel.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-b1e0461a\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-b1e0461a\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Panel.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 135 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(136);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-b1e0461a!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Panel.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-b1e0461a!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Panel.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 136 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.accordion-toggle {\\\\r\\\\n cursor: pointer;\\\\n}\\\\n.collapse-enter-active,\\\\r\\\\n.collapse-leave-active {\\\\r\\\\n transition: all .5s ease;\\\\r\\\\n overflow: hidden;\\\\n}\\\\n.collapse-enter,\\\\r\\\\n.collapse-leave-active {\\\\n}\\\\r\\\\n\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Panel.vue?60e798e2\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAyEA;EACA,gBAAA;CACA;AACA;;EAEA,yBAAA;EACA,iBAAA;CACA;AACA;;CAGA\\\",\\\"file\\\":\\\"Panel.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div :class=\\\\\\\"['panel',panelType]\\\\\\\">\\\\r\\\\n <div :class=\\\\\\\"['panel-heading',{'accordion-toggle':inAccordion}]\\\\\\\" @click.prevent=\\\\\\\"inAccordion&&toggle()\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"header\\\\\\\"><h4 class=\\\\\\\"panel-title\\\\\\\">{{ header }}</h4></slot>\\\\r\\\\n </div>\\\\r\\\\n <transition\\\\r\\\\n name=\\\\\\\"collapse\\\\\\\"\\\\r\\\\n @enter=\\\\\\\"enter\\\\\\\"\\\\r\\\\n @after-enter=\\\\\\\"afterEnter\\\\\\\"\\\\r\\\\n @before-leave=\\\\\\\"beforeLeave\\\\\\\"\\\\r\\\\n >\\\\r\\\\n <div class=\\\\\\\"panel-collapse\\\\\\\" v-if=\\\\\\\"open\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"panel-body\\\\\\\">\\\\r\\\\n <slot></slot>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </transition>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n header: {type: String},\\\\r\\\\n isOpen: {type: Boolean, default: null},\\\\r\\\\n type: {type: String, default : null}\\\\r\\\\n },\\\\r\\\\n data() {\\\\r\\\\n return {\\\\r\\\\n open: this.isOpen\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n isOpen( val ) {\\\\r\\\\n this.open = val\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n inAccordion () { return this.$parent && this.$parent._isAccordion },\\\\r\\\\n panelType () { return 'panel-' + (this.type || (this.$parent && this.$parent.type) || 'default') }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n toggle () {\\\\r\\\\n this.open = !this.open\\\\r\\\\n if (this.inAccordion) {\\\\r\\\\n this.$parent.openChild(this)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n enter (el) {\\\\r\\\\n el.style.height = 'auto'\\\\r\\\\n var endWidth = getComputedStyle(el).height\\\\r\\\\n el.style.height = '0px'\\\\r\\\\n el.offsetHeight // force repaint\\\\r\\\\n el.style.height = endWidth;\\\\r\\\\n },\\\\r\\\\n afterEnter (el) {\\\\r\\\\n el.style.height = 'auto'\\\\r\\\\n },\\\\r\\\\n beforeLeave (el) {\\\\r\\\\n el.style.height = getComputedStyle(el).height\\\\r\\\\n el.offsetHeight // force repaint\\\\r\\\\n el.style.height = '0px'\\\\r\\\\n },\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n if (this.isOpen === null) {\\\\r\\\\n this.open = !this.inAccordion\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.accordion-toggle {\\\\r\\\\n cursor: pointer;\\\\r\\\\n}\\\\r\\\\n.collapse-enter-active,\\\\r\\\\n.collapse-leave-active {\\\\r\\\\n transition: all .5s ease;\\\\r\\\\n overflow: hidden;\\\\r\\\\n}\\\\r\\\\n.collapse-enter,\\\\r\\\\n.collapse-leave-active {\\\\r\\\\n\\\\r\\\\n}\\\\r\\\\n\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 137 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t header: { type: String },\\n\\t isOpen: { type: Boolean, default: null },\\n\\t type: { type: String, default: null }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t open: this.isOpen\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t isOpen: function isOpen(val) {\\n\\t this.open = val;\\n\\t }\\n\\t },\\n\\t computed: {\\n\\t inAccordion: function inAccordion() {\\n\\t return this.$parent && this.$parent._isAccordion;\\n\\t },\\n\\t panelType: function panelType() {\\n\\t return 'panel-' + (this.type || this.$parent && this.$parent.type || 'default');\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t toggle: function toggle() {\\n\\t this.open = !this.open;\\n\\t if (this.inAccordion) {\\n\\t this.$parent.openChild(this);\\n\\t }\\n\\t },\\n\\t enter: function enter(el) {\\n\\t el.style.height = 'auto';\\n\\t var endWidth = getComputedStyle(el).height;\\n\\t el.style.height = '0px';\\n\\t el.offsetHeight; // force repaint\\n\\t el.style.height = endWidth;\\n\\t },\\n\\t afterEnter: function afterEnter(el) {\\n\\t el.style.height = 'auto';\\n\\t },\\n\\t beforeLeave: function beforeLeave(el) {\\n\\t el.style.height = getComputedStyle(el).height;\\n\\t el.offsetHeight; // force repaint\\n\\t el.style.height = '0px';\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t if (this.isOpen === null) {\\n\\t this.open = !this.inAccordion;\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 138 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t class: ['panel', _vm.panelType]\\n\\t }, [_vm._c('div', {\\n\\t class: ['panel-heading', {\\n\\t 'accordion-toggle': _vm.inAccordion\\n\\t }],\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.inAccordion && _vm.toggle()\\n\\t }\\n\\t }\\n\\t }, [_vm._t(\\\"header\\\", [_vm._c('h4', {\\n\\t staticClass: \\\"panel-title\\\"\\n\\t }, [_vm._v(_vm._s(_vm.header))])])], 2), _vm._v(\\\" \\\"), _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": \\\"collapse\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"enter\\\": _vm.enter,\\n\\t \\\"after-enter\\\": _vm.afterEnter,\\n\\t \\\"before-leave\\\": _vm.beforeLeave\\n\\t }\\n\\t }, [(_vm.open) ? _vm._c('div', {\\n\\t staticClass: \\\"panel-collapse\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"panel-body\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)]) : _vm._e()])], 1)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-b1e0461a\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 139 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(140)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(142)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(144)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Popover.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-2465bf54\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-2465bf54\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Popover.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 140 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(141);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-2465bf54!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Popover.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-2465bf54!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Popover.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 141 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.popover.top,\\\\r\\\\n.popover.left,\\\\r\\\\n.popover.right,\\\\r\\\\n.popover.bottom {\\\\r\\\\n display: block;\\\\n}\\\\n.scale-enter {\\\\r\\\\n animation:scale-in 0.15s ease-in;\\\\n}\\\\n.scale-leave-active {\\\\r\\\\n animation:scale-out 0.15s ease-out;\\\\n}\\\\n@keyframes scale-in {\\\\n0% {\\\\r\\\\n transform: scale(0);\\\\r\\\\n opacity: 0;\\\\n}\\\\n100% {\\\\r\\\\n transform: scale(1);\\\\r\\\\n opacity: 1;\\\\n}\\\\n}\\\\n@keyframes scale-out {\\\\n0% {\\\\r\\\\n transform: scale(1);\\\\r\\\\n opacity: 1;\\\\n}\\\\n100% {\\\\r\\\\n transform: scale(0);\\\\r\\\\n opacity: 0;\\\\n}\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Popover.vue?e616963a\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAyBA;;;;EAIA,eAAA;CACA;AACA;EACA,iCAAA;CACA;AACA;EACA,mCAAA;CACA;AACA;AACA;IACA,oBAAA;IACA,WAAA;CACA;AACA;IACA,oBAAA;IACA,WAAA;CACA;CACA;AACA;AACA;IACA,oBAAA;IACA,WAAA;CACA;AACA;IACA,oBAAA;IACA,WAAA;CACA;CACA\\\",\\\"file\\\":\\\"Popover.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <span ref=\\\\\\\"trigger\\\\\\\">\\\\r\\\\n <slot></slot>\\\\r\\\\n <transition :name=\\\\\\\"effect\\\\\\\">\\\\r\\\\n <div ref=\\\\\\\"popover\\\\\\\" v-if=\\\\\\\"show\\\\\\\" :class=\\\\\\\"['popover',placement]\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"arrow\\\\\\\"></div>\\\\r\\\\n <h3 class=\\\\\\\"popover-title\\\\\\\" v-if=\\\\\\\"title\\\\\\\"><slot name=\\\\\\\"title\\\\\\\">{{title}}</slot></h3>\\\\r\\\\n <div class=\\\\\\\"popover-content\\\\\\\"><slot name=\\\\\\\"content\\\\\\\"><span v-html=\\\\\\\"content\\\\\\\"></span></slot></div>\\\\r\\\\n </div>\\\\r\\\\n </transition>\\\\r\\\\n </span>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport PopoverMixin from './utils/popoverMixins.js'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n mixins: [PopoverMixin],\\\\r\\\\n props: {\\\\r\\\\n trigger: {type: String, default: 'click'}\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.popover.top,\\\\r\\\\n.popover.left,\\\\r\\\\n.popover.right,\\\\r\\\\n.popover.bottom {\\\\r\\\\n display: block;\\\\r\\\\n}\\\\r\\\\n.scale-enter {\\\\r\\\\n animation:scale-in 0.15s ease-in;\\\\r\\\\n}\\\\r\\\\n.scale-leave-active {\\\\r\\\\n animation:scale-out 0.15s ease-out;\\\\r\\\\n}\\\\r\\\\n@keyframes scale-in {\\\\r\\\\n 0% {\\\\r\\\\n transform: scale(0);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: scale(1);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n@keyframes scale-out {\\\\r\\\\n 0% {\\\\r\\\\n transform: scale(1);\\\\r\\\\n opacity: 1;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n transform: scale(0);\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 142 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _popoverMixins = __webpack_require__(143);\\n\\t\\n\\tvar _popoverMixins2 = _interopRequireDefault(_popoverMixins);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t mixins: [_popoverMixins2.default],\\n\\t props: {\\n\\t trigger: { type: String, default: 'click' }\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 143 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _NodeList = __webpack_require__(1);\\n\\t\\n\\tvar _NodeList2 = _interopRequireDefault(_NodeList);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t content: { type: String },\\n\\t effect: { type: String, default: 'fade' },\\n\\t header: { type: Boolean, default: true },\\n\\t placement: { type: String, default: 'top' },\\n\\t title: { type: String },\\n\\t trigger: { type: String }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t top: 0,\\n\\t left: 0,\\n\\t show: false\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t events: function events() {\\n\\t return { contextmenu: ['contextmenu'], hover: ['mouseleave', 'mouseenter'], focus: ['blur', 'focus'] }[this.trigger] || ['click'];\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t beforeEnter: function beforeEnter() {\\n\\t var _this = this;\\n\\t\\n\\t this.position();\\n\\t setTimeout(function () {\\n\\t return _this.position();\\n\\t }, 30);\\n\\t },\\n\\t position: function position() {\\n\\t var _this2 = this;\\n\\t\\n\\t this.$nextTick(function () {\\n\\t var popover = _this2.$refs.popover;\\n\\t var trigger = _this2.$refs.trigger.children[0];\\n\\t switch (_this2.placement) {\\n\\t case 'top':\\n\\t _this2.left = trigger.offsetLeft - popover.offsetWidth / 2 + trigger.offsetWidth / 2;\\n\\t _this2.top = trigger.offsetTop - popover.offsetHeight;\\n\\t break;\\n\\t case 'left':\\n\\t _this2.left = trigger.offsetLeft - popover.offsetWidth;\\n\\t _this2.top = trigger.offsetTop + trigger.offsetHeight / 2 - popover.offsetHeight / 2;\\n\\t break;\\n\\t case 'right':\\n\\t _this2.left = trigger.offsetLeft + trigger.offsetWidth;\\n\\t _this2.top = trigger.offsetTop + trigger.offsetHeight / 2 - popover.offsetHeight / 2;\\n\\t break;\\n\\t case 'bottom':\\n\\t _this2.left = trigger.offsetLeft - popover.offsetWidth / 2 + trigger.offsetWidth / 2;\\n\\t _this2.top = trigger.offsetTop + trigger.offsetHeight;\\n\\t break;\\n\\t default:\\n\\t console.warn('Wrong placement prop');\\n\\t }\\n\\t popover.style.top = _this2.top + 'px';\\n\\t popover.style.left = _this2.left + 'px';\\n\\t });\\n\\t },\\n\\t toggle: function toggle(e) {\\n\\t if (e && this.trigger === 'contextmenu') e.preventDefault();\\n\\t this.show = !this.show;\\n\\t if (this.show) this.beforeEnter();\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t var _this3 = this;\\n\\t\\n\\t var trigger = this.$refs.trigger.children[0];\\n\\t if (!trigger) return console.error('Could not find trigger v-el in your component that uses popoverMixin.');\\n\\t\\n\\t if (this.trigger === 'focus' && !~trigger.tabIndex) {\\n\\t trigger = (0, _NodeList2.default)('a,input,select,textarea,button', trigger);\\n\\t if (!trigger.length) {\\n\\t return;\\n\\t }\\n\\t }\\n\\t this.events.forEach(function (event) {\\n\\t (0, _NodeList2.default)(trigger).on(event, _this3.toggle);\\n\\t });\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t if (this._trigger) (0, _NodeList2.default)(this._trigger).off();\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 144 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('span', {\\n\\t ref: \\\"trigger\\\"\\n\\t }, [_vm._t(\\\"default\\\"), _vm._v(\\\" \\\"), _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": _vm.effect\\n\\t }\\n\\t }, [(_vm.show) ? _vm._c('div', {\\n\\t ref: \\\"popover\\\",\\n\\t class: ['popover', _vm.placement]\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"arrow\\\"\\n\\t }), _vm._v(\\\" \\\"), (_vm.title) ? _vm._c('h3', {\\n\\t staticClass: \\\"popover-title\\\"\\n\\t }, [_vm._t(\\\"title\\\", [_vm._v(_vm._s(_vm.title))])], 2) : _vm._e(), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"popover-content\\\"\\n\\t }, [_vm._t(\\\"content\\\", [_vm._c('span', {\\n\\t domProps: {\\n\\t \\\"innerHTML\\\": _vm._s(_vm.content)\\n\\t }\\n\\t })])], 2)]) : _vm._e()])], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-2465bf54\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 145 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(146)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(147)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Progressbar.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-68aa3375\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-68aa3375\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Progressbar.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 146 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t animated: { type: Boolean, default: false },\\n\\t label: { default: false },\\n\\t now: { required: true },\\n\\t striped: { type: Boolean, default: false },\\n\\t type: { type: String }\\n\\t },\\n\\t computed: {\\n\\t labelBool: function labelBool() {\\n\\t return _utils.coerce.boolean(this.label);\\n\\t },\\n\\t nowNum: function nowNum() {\\n\\t return _utils.coerce.number(this.now);\\n\\t }\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 147 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t class: ['progress-bar', 'progress-bar-' + _vm.type, {\\n\\t active: _vm.animated,\\n\\t 'progress-bar-striped': _vm.striped\\n\\t }],\\n\\t style: ({\\n\\t width: _vm.nowNum + '%'\\n\\t }),\\n\\t domProps: {\\n\\t \\\"textContent\\\": _vm._s(_vm.labelBool ? _vm.nowNum + '%' : null)\\n\\t }\\n\\t })\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-68aa3375\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 148 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(149)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(151)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(152)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Radio.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-74cfd92c\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-74cfd92c\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Radio.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 149 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(150);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-74cfd92c!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Radio.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-74cfd92c!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Radio.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 150 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.radio { position: relative;\\\\n}\\\\n.radio > label > input {\\\\r\\\\n position: absolute;\\\\r\\\\n margin: 0;\\\\r\\\\n padding: 0;\\\\r\\\\n opacity: 0;\\\\r\\\\n z-index: -1;\\\\r\\\\n box-sizing: border-box;\\\\n}\\\\n.radio > label > .icon {\\\\r\\\\n position: absolute;\\\\r\\\\n top: .15rem;\\\\r\\\\n left: 0;\\\\r\\\\n display: block;\\\\r\\\\n width: 1.4rem;\\\\r\\\\n height: 1.4rem;\\\\r\\\\n text-align: center;\\\\r\\\\n user-select: none;\\\\r\\\\n border-radius: .7rem;\\\\r\\\\n background-repeat: no-repeat;\\\\r\\\\n background-position: center center;\\\\r\\\\n background-size: 50% 50%;\\\\n}\\\\n.radio:not(.active) > label > .icon {\\\\r\\\\n background-color: #ddd;\\\\r\\\\n border: 1px solid #bbb;\\\\n}\\\\n.radio > label > input:focus ~ .icon {\\\\r\\\\n outline: 0;\\\\r\\\\n border: 1px solid #66afe9;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\n}\\\\n.radio.active > label > .icon {\\\\r\\\\n background-size: 1rem 1rem;\\\\r\\\\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSI0IiBmaWxsPSIjZmZmIi8+PC9zdmc+);\\\\n}\\\\n.radio.active .btn-default { filter: brightness(75%);\\\\n}\\\\n.radio.disabled > label > .icon,\\\\r\\\\n.radio.readonly > label > .icon,\\\\r\\\\n.btn.readonly {\\\\r\\\\n filter: alpha(opacity=65);\\\\r\\\\n box-shadow: none;\\\\r\\\\n opacity: .65;\\\\n}\\\\nlabel.btn > input[type=radio] {\\\\r\\\\n position: absolute;\\\\r\\\\n clip: rect(0,0,0,0);\\\\r\\\\n pointer-events: none;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Radio.vue?26de6184\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAmGA,SAAA,mBAAA;CAAA;AACA;EACA,mBAAA;EACA,UAAA;EACA,WAAA;EACA,WAAA;EACA,YAAA;EACA,uBAAA;CACA;AACA;EACA,mBAAA;EACA,YAAA;EACA,QAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;EACA,mBAAA;EACA,kBAAA;EACA,qBAAA;EACA,6BAAA;EACA,mCAAA;EACA,yBAAA;CACA;AACA;EACA,uBAAA;EACA,uBAAA;CACA;AACA;EACA,WAAA;EACA,0BAAA;EACA,0EAAA;CACA;AACA;EACA,2BAAA;EACA,8OAAA;CACA;AACA,6BAAA,wBAAA;CAAA;AAEA;;;EAGA,0BAAA;EACA,iBAAA;EACA,aAAA;CACA;AACA;EACA,mBAAA;EACA,oBAAA;EACA,qBAAA;CACA\\\",\\\"file\\\":\\\"Radio.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div :is=\\\\\\\"buttonStyle?'label':'div'\\\\\\\" @click.prevent=\\\\\\\"toggle\\\\\\\"\\\\r\\\\n :class=\\\\\\\"[(buttonStyle?'btn btn-'+typeColor:'radio '+typeColor),{active:active,disabled:disabled,readonly:readonly}]\\\\\\\"\\\\r\\\\n >\\\\r\\\\n <template v-if=\\\\\\\"buttonStyle\\\\\\\">\\\\r\\\\n <input type=\\\\\\\"radio\\\\\\\" autocomplete=\\\\\\\"off\\\\\\\" ref=\\\\\\\"input\\\\\\\"\\\\r\\\\n v-show=\\\\\\\"!readonly\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"check\\\\\\\"\\\\r\\\\n :value=\\\\\\\"checkedValue\\\\\\\"\\\\r\\\\n :name=\\\\\\\"name\\\\\\\"\\\\r\\\\n :readonly=\\\\\\\"readonly\\\\\\\"\\\\r\\\\n :disabled=\\\\\\\"disabled\\\\\\\"\\\\r\\\\n />\\\\r\\\\n <slot></slot>\\\\r\\\\n </template>\\\\r\\\\n <label v-else class=\\\\\\\"open\\\\\\\">\\\\r\\\\n <input type=\\\\\\\"radio\\\\\\\" autocomplete=\\\\\\\"off\\\\\\\" ref=\\\\\\\"input\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"check\\\\\\\"\\\\r\\\\n :value=\\\\\\\"checkedValue\\\\\\\"\\\\r\\\\n :name=\\\\\\\"name\\\\\\\"\\\\r\\\\n :readonly=\\\\\\\"readonly\\\\\\\"\\\\r\\\\n :disabled=\\\\\\\"disabled\\\\\\\"\\\\r\\\\n />\\\\r\\\\n <span class=\\\\\\\"icon dropdown-toggle\\\\\\\" :class=\\\\\\\"[active?'btn-'+typeColor:'',{bg:typeColor==='default'}]\\\\\\\"></span>\\\\r\\\\n <span v-if=\\\\\\\"active&&typeColor==='default'\\\\\\\" class=\\\\\\\"icon\\\\\\\"></span>\\\\r\\\\n <slot></slot>\\\\r\\\\n </label>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n button: {type: Boolean, default: false},\\\\r\\\\n checkedValue: {default: true},\\\\r\\\\n disabled: {type: Boolean, default: false},\\\\r\\\\n name: {type: String, default: null},\\\\r\\\\n readonly: {type: Boolean, default: false},\\\\r\\\\n type: {type: String, default: null},\\\\r\\\\n value: {default: false}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n check: this.value\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n active () { return this.check === this.checkedValue },\\\\r\\\\n parentValue () { return this._inGroup ? this.$parent.val === this.value : null },\\\\r\\\\n buttonStyle () { return this.button || (this._inGroup && this.$parent.buttons) },\\\\r\\\\n typeColor () { return (this.type || (this.$parent && this.$parent.type)) || 'default' }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n check (val) {\\\\r\\\\n if (this.checkedValue === val) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n this.$emit('checked', true)\\\\r\\\\n if (this._inGroup) { this.$parent.val = val }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n parentValue (val) {\\\\r\\\\n if (this.check !== val && this.checkedValue === val) { this.check = val }\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n this.check = this.checkedValue === val ? val : null\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n var parent = this.$parent\\\\r\\\\n if (parent && parent._btnGroup && !parent._checkboxGroup) {\\\\r\\\\n this._inGroup = true\\\\r\\\\n parent._radioGroup = true\\\\r\\\\n }\\\\r\\\\n if (this.$parent._radioGroup) {\\\\r\\\\n if (this.$parent.val) {\\\\r\\\\n this.check = (this.$parent.val === this.checkedValue)\\\\r\\\\n } else if (this.check) {\\\\r\\\\n this.$parent.val = this.checkedValue\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n focus () {\\\\r\\\\n this.$refs.input.focus()\\\\r\\\\n },\\\\r\\\\n toggle () {\\\\r\\\\n if (this.disabled) { return }\\\\r\\\\n this.focus()\\\\r\\\\n if (this.readonly) { return }\\\\r\\\\n this.check = this.checkedValue\\\\r\\\\n if (this._inGroup) {\\\\r\\\\n this.$parent.val = this.checkedValue\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style scope>\\\\r\\\\n.radio { position: relative; }\\\\r\\\\n.radio > label > input {\\\\r\\\\n position: absolute;\\\\r\\\\n margin: 0;\\\\r\\\\n padding: 0;\\\\r\\\\n opacity: 0;\\\\r\\\\n z-index: -1;\\\\r\\\\n box-sizing: border-box;\\\\r\\\\n}\\\\r\\\\n.radio > label > .icon {\\\\r\\\\n position: absolute;\\\\r\\\\n top: .15rem;\\\\r\\\\n left: 0;\\\\r\\\\n display: block;\\\\r\\\\n width: 1.4rem;\\\\r\\\\n height: 1.4rem;\\\\r\\\\n text-align: center;\\\\r\\\\n user-select: none;\\\\r\\\\n border-radius: .7rem;\\\\r\\\\n background-repeat: no-repeat;\\\\r\\\\n background-position: center center;\\\\r\\\\n background-size: 50% 50%;\\\\r\\\\n}\\\\r\\\\n.radio:not(.active) > label > .icon {\\\\r\\\\n background-color: #ddd;\\\\r\\\\n border: 1px solid #bbb;\\\\r\\\\n}\\\\r\\\\n.radio > label > input:focus ~ .icon {\\\\r\\\\n outline: 0;\\\\r\\\\n border: 1px solid #66afe9;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\r\\\\n}\\\\r\\\\n.radio.active > label > .icon {\\\\r\\\\n background-size: 1rem 1rem;\\\\r\\\\n background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSI0IiBmaWxsPSIjZmZmIi8+PC9zdmc+);\\\\r\\\\n}\\\\r\\\\n.radio.active .btn-default { filter: brightness(75%); }\\\\r\\\\n\\\\r\\\\n.radio.disabled > label > .icon,\\\\r\\\\n.radio.readonly > label > .icon,\\\\r\\\\n.btn.readonly {\\\\r\\\\n filter: alpha(opacity=65);\\\\r\\\\n box-shadow: none;\\\\r\\\\n opacity: .65;\\\\r\\\\n}\\\\r\\\\nlabel.btn > input[type=radio] {\\\\r\\\\n position: absolute;\\\\r\\\\n clip: rect(0,0,0,0);\\\\r\\\\n pointer-events: none;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 151 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t button: { type: Boolean, default: false },\\n\\t checkedValue: { default: true },\\n\\t disabled: { type: Boolean, default: false },\\n\\t name: { type: String, default: null },\\n\\t readonly: { type: Boolean, default: false },\\n\\t type: { type: String, default: null },\\n\\t value: { default: false }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t check: this.value\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t active: function active() {\\n\\t return this.check === this.checkedValue;\\n\\t },\\n\\t parentValue: function parentValue() {\\n\\t return this._inGroup ? this.$parent.val === this.value : null;\\n\\t },\\n\\t buttonStyle: function buttonStyle() {\\n\\t return this.button || this._inGroup && this.$parent.buttons;\\n\\t },\\n\\t typeColor: function typeColor() {\\n\\t return this.type || this.$parent && this.$parent.type || 'default';\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t check: function check(val) {\\n\\t if (this.checkedValue === val) {\\n\\t this.$emit('input', val);\\n\\t this.$emit('checked', true);\\n\\t if (this._inGroup) {\\n\\t this.$parent.val = val;\\n\\t }\\n\\t }\\n\\t },\\n\\t parentValue: function parentValue(val) {\\n\\t if (this.check !== val && this.checkedValue === val) {\\n\\t this.check = val;\\n\\t }\\n\\t },\\n\\t value: function value(val) {\\n\\t this.check = this.checkedValue === val ? val : null;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t var parent = this.$parent;\\n\\t if (parent && parent._btnGroup && !parent._checkboxGroup) {\\n\\t this._inGroup = true;\\n\\t parent._radioGroup = true;\\n\\t }\\n\\t if (this.$parent._radioGroup) {\\n\\t if (this.$parent.val) {\\n\\t this.check = this.$parent.val === this.checkedValue;\\n\\t } else if (this.check) {\\n\\t this.$parent.val = this.checkedValue;\\n\\t }\\n\\t }\\n\\t },\\n\\t\\n\\t methods: {\\n\\t focus: function focus() {\\n\\t this.$refs.input.focus();\\n\\t },\\n\\t toggle: function toggle() {\\n\\t if (this.disabled) {\\n\\t return;\\n\\t }\\n\\t this.focus();\\n\\t if (this.readonly) {\\n\\t return;\\n\\t }\\n\\t this.check = this.checkedValue;\\n\\t if (this._inGroup) {\\n\\t this.$parent.val = this.checkedValue;\\n\\t }\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 152 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c(_vm.buttonStyle ? 'label' : 'div', {\\n\\t tag: \\\"div\\\",\\n\\t class: [(_vm.buttonStyle ? 'btn btn-' + _vm.typeColor : 'radio ' + _vm.typeColor), {\\n\\t active: _vm.active,\\n\\t disabled: _vm.disabled,\\n\\t readonly: _vm.readonly\\n\\t }],\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.toggle($event)\\n\\t }\\n\\t }\\n\\t }, [(_vm.buttonStyle) ? [_vm._c('input', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (!_vm.readonly),\\n\\t expression: \\\"!readonly\\\"\\n\\t }, {\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.check),\\n\\t expression: \\\"check\\\"\\n\\t }],\\n\\t ref: \\\"input\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"radio\\\",\\n\\t \\\"autocomplete\\\": \\\"off\\\",\\n\\t \\\"name\\\": _vm.name,\\n\\t \\\"readonly\\\": _vm.readonly,\\n\\t \\\"disabled\\\": _vm.disabled\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm.checkedValue,\\n\\t \\\"checked\\\": _vm._q(_vm.check, _vm.checkedValue)\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.check = _vm.checkedValue\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\")] : _vm._c('label', {\\n\\t staticClass: \\\"open\\\"\\n\\t }, [_vm._c('input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.check),\\n\\t expression: \\\"check\\\"\\n\\t }],\\n\\t ref: \\\"input\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"radio\\\",\\n\\t \\\"autocomplete\\\": \\\"off\\\",\\n\\t \\\"name\\\": _vm.name,\\n\\t \\\"readonly\\\": _vm.readonly,\\n\\t \\\"disabled\\\": _vm.disabled\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm.checkedValue,\\n\\t \\\"checked\\\": _vm._q(_vm.check, _vm.checkedValue)\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.check = _vm.checkedValue\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t staticClass: \\\"icon dropdown-toggle\\\",\\n\\t class: [_vm.active ? 'btn-' + _vm.typeColor : '', {\\n\\t bg: _vm.typeColor === 'default'\\n\\t }]\\n\\t }), _vm._v(\\\" \\\"), (_vm.active && _vm.typeColor === 'default') ? _vm._c('span', {\\n\\t staticClass: \\\"icon\\\"\\n\\t }) : _vm._e(), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\")], 2)], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-74cfd92c\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 153 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(154)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(156)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(157)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Select.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t__vue_options__._scopeId = \\\"data-v-e514dbc6\\\"\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-e514dbc6\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-e514dbc6\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Select.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 154 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(155);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-e514dbc6&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Select.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-e514dbc6&scoped=true!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Select.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 155 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.form-control.dropdown-toggle[data-v-e514dbc6]{\\\\r\\\\n height: auto;\\\\r\\\\n padding-right: 24px;\\\\n}\\\\n.form-control.dropdown-toggle[data-v-e514dbc6]:after{\\\\r\\\\n content: ' ';\\\\r\\\\n position: absolute;\\\\r\\\\n right: 13px;\\\\r\\\\n top: 50%;\\\\r\\\\n margin: -1px 0 0;\\\\r\\\\n border-top: 4px dashed;\\\\r\\\\n border-top: 4px solid \\\\\\\\9;\\\\r\\\\n border-right: 4px solid transparent;\\\\r\\\\n border-left: 4px solid transparent;\\\\n}\\\\n.bs-searchbox[data-v-e514dbc6] {\\\\r\\\\n position: relative;\\\\r\\\\n margin: 4px 8px;\\\\n}\\\\n.bs-searchbox .close[data-v-e514dbc6] {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\n}\\\\n.bs-searchbox input[data-v-e514dbc6]:focus,\\\\r\\\\n.form-control.dropdown-toggle[data-v-e514dbc6]:focus {\\\\r\\\\n outline: 0;\\\\r\\\\n border-color: #66afe9 !important;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\n}\\\\n.secret[data-v-e514dbc6] {\\\\r\\\\n border: 0;\\\\r\\\\n clip: rect(0 0 0 0);\\\\r\\\\n height: 1px;\\\\r\\\\n margin: -1px;\\\\r\\\\n overflow: hidden;\\\\r\\\\n padding: 0;\\\\r\\\\n position: absolute;\\\\r\\\\n width: 1px;\\\\n}\\\\n.form-control.dropdown-toggle>.close[data-v-e514dbc6] { margin-left: 5px;\\\\n}\\\\n.notify.out[data-v-e514dbc6] { position: relative;\\\\n}\\\\n.notify.in[data-v-e514dbc6],\\\\r\\\\n.notify>div[data-v-e514dbc6] {\\\\r\\\\n position: absolute;\\\\r\\\\n width: 96%;\\\\r\\\\n margin: 0 2%;\\\\r\\\\n min-height: 26px;\\\\r\\\\n padding: 3px 5px;\\\\r\\\\n background: #f5f5f5;\\\\r\\\\n border: 1px solid #e3e3e3;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\\\r\\\\n pointer-events: none;\\\\n}\\\\n.notify>div[data-v-e514dbc6] {\\\\r\\\\n top: 5px;\\\\r\\\\n z-index: 1;\\\\n}\\\\n.notify.in[data-v-e514dbc6] {\\\\r\\\\n opacity: .9;\\\\r\\\\n bottom: 5px;\\\\n}\\\\n.btn-group-justified .dropdown-toggle>span[data-v-e514dbc6]:not(.close) {\\\\r\\\\n width: calc(100% - 18px);\\\\r\\\\n display: inline-block;\\\\r\\\\n overflow: hidden;\\\\r\\\\n white-space: nowrap;\\\\r\\\\n text-overflow: ellipsis;\\\\r\\\\n margin-bottom: -4px;\\\\n}\\\\n.btn-group-justified .dropdown-menu[data-v-e514dbc6] { width: 100%;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Select.vue?3ed5a422\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAmQA;EACA,aAAA;EACA,oBAAA;CACA;AACA;EACA,aAAA;EACA,mBAAA;EACA,YAAA;EACA,SAAA;EACA,iBAAA;EACA,uBAAA;EACA,yBAAA;EACA,oCAAA;EACA,mCAAA;CACA;AACA;EACA,mBAAA;EACA,gBAAA;CACA;AACA;EACA,mBAAA;EACA,OAAA;EACA,SAAA;EACA,WAAA;EACA,eAAA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;CACA;AACA;;EAEA,WAAA;EACA,iCAAA;EACA,0EAAA;CACA;AACA;EACA,UAAA;EACA,oBAAA;EACA,YAAA;EACA,aAAA;EACA,iBAAA;EACA,WAAA;EACA,mBAAA;EACA,WAAA;CACA;AACA,wDAAA,iBAAA;CAAA;AACA,+BAAA,mBAAA;CAAA;AACA;;EAEA,mBAAA;EACA,WAAA;EACA,aAAA;EACA,iBAAA;EACA,iBAAA;EACA,oBAAA;EACA,0BAAA;EACA,4CAAA;EACA,qBAAA;CACA;AACA;EACA,SAAA;EACA,WAAA;CACA;AACA;EACA,YAAA;EACA,YAAA;CACA;AACA;EACA,yBAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;EACA,wBAAA;EACA,oBAAA;CACA;AACA,uDAAA,YAAA;CAAA\\\",\\\"file\\\":\\\"Select.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div ref=\\\\\\\"select\\\\\\\" :class=\\\\\\\"classes\\\\\\\" v-click-outside=\\\\\\\"close\\\\\\\">\\\\r\\\\n <div ref=\\\\\\\"btn\\\\\\\" class=\\\\\\\"form-control dropdown-toggle\\\\\\\" tabindex=\\\\\\\"1\\\\\\\" :disabled=\\\\\\\"disabled || !hasParent\\\\\\\" :readonly=\\\\\\\"readonly\\\\\\\"\\\\r\\\\n @blur=\\\\\\\"canSearch ? null : close()\\\\\\\"\\\\r\\\\n @click=\\\\\\\"toggle()\\\\\\\"\\\\r\\\\n @keydown.esc.stop.prevent=\\\\\\\"close\\\\\\\"\\\\r\\\\n @keydown.space.stop.prevent=\\\\\\\"toggle\\\\\\\"\\\\r\\\\n @keydown.enter.stop.prevent=\\\\\\\"toggle\\\\\\\"\\\\r\\\\n >\\\\r\\\\n <span class=\\\\\\\"btn-content\\\\\\\" v-html=\\\\\\\"loading ? text.loading : showPlaceholder || selected\\\\\\\"></span>\\\\r\\\\n <span v-if=\\\\\\\"clearButton&&values.length\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"clear()\\\\\\\">&times;</span>\\\\r\\\\n </div>\\\\r\\\\n <select ref=\\\\\\\"sel\\\\\\\" v-model=\\\\\\\"val\\\\\\\" :name=\\\\\\\"name\\\\\\\" class=\\\\\\\"secret\\\\\\\" :multiple=\\\\\\\"multiple\\\\\\\" :required=\\\\\\\"required\\\\\\\" :readonly=\\\\\\\"readonly\\\\\\\" :disabled=\\\\\\\"disabled\\\\\\\">\\\\r\\\\n <option v-if=\\\\\\\"required\\\\\\\" value=\\\\\\\"\\\\\\\"></option>\\\\r\\\\n <option v-for=\\\\\\\"option in list\\\\\\\" :value=\\\\\\\"option[optionsValue]\\\\\\\">{{ option[optionsLabel] }}</option>\\\\r\\\\n </select>\\\\r\\\\n <ul class=\\\\\\\"dropdown-menu\\\\\\\">\\\\r\\\\n <template v-if=\\\\\\\"list.length\\\\\\\">\\\\r\\\\n <li v-if=\\\\\\\"canSearch\\\\\\\" class=\\\\\\\"bs-searchbox\\\\\\\">\\\\r\\\\n <input type=\\\\\\\"text\\\\\\\" :placeholder=\\\\\\\"searchText||text.search\\\\\\\" class=\\\\\\\"form-control\\\\\\\" autocomplete=\\\\\\\"off\\\\\\\" ref=\\\\\\\"search\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"searchValue\\\\\\\"\\\\r\\\\n @keyup.esc=\\\\\\\"close\\\\\\\"\\\\r\\\\n />\\\\r\\\\n <span v-show=\\\\\\\"searchValue\\\\\\\" class=\\\\\\\"close\\\\\\\" @click=\\\\\\\"clearSearch\\\\\\\">&times;</span>\\\\r\\\\n </li>\\\\r\\\\n <li v-if=\\\\\\\"required&&!clearButton\\\\\\\"><a @mousedown.prevent=\\\\\\\"clear() && close()\\\\\\\">{{ placeholder || text.notSelected }}</a></li>\\\\r\\\\n <li v-for=\\\\\\\"option in filteredOptions\\\\\\\" :id=\\\\\\\"option[optionsValue]\\\\\\\">\\\\r\\\\n <a @mousedown.prevent=\\\\\\\"select(option[optionsValue])\\\\\\\">\\\\r\\\\n <span v-html=\\\\\\\"option[optionsLabel]\\\\\\\"></span>\\\\r\\\\n <span class=\\\\\\\"glyphicon glyphicon-ok check-mark\\\\\\\" v-show=\\\\\\\"isSelected(option[optionsValue])\\\\\\\"></span>\\\\r\\\\n </a>\\\\r\\\\n </li>\\\\r\\\\n </template>\\\\r\\\\n <slot></slot>\\\\r\\\\n <transition v-if=\\\\\\\"notify && !closeOnSelect\\\\\\\" name=\\\\\\\"fadein\\\\\\\"><div class=\\\\\\\"notify in\\\\\\\">{{limitText}}</div></transition>\\\\r\\\\n </ul>\\\\r\\\\n <transition v-if=\\\\\\\"notify && closeOnSelect\\\\\\\" name=\\\\\\\"fadein\\\\\\\"><div class=\\\\\\\"notify out\\\\\\\"><div>{{limitText}}</div></div></transition>\\\\r\\\\n <!-- <pre>Options: {{list}}</pre> -->\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {translations} from './utils/utils.js'\\\\r\\\\nimport ClickOutside from './directives/ClickOutside.js'\\\\r\\\\n\\\\r\\\\nvar timeout = {}\\\\r\\\\nexport default {\\\\r\\\\n directives: {\\\\r\\\\n ClickOutside\\\\r\\\\n },\\\\r\\\\n props: {\\\\r\\\\n clearButton: {type: Boolean, default: false},\\\\r\\\\n closeOnSelect: {type: Boolean, default: false},\\\\r\\\\n disabled: {type: Boolean, default: false},\\\\r\\\\n lang: {type: String, default: navigator.language},\\\\r\\\\n limit: {type: Number, default: 1024},\\\\r\\\\n minSearch: {type: Number, default: 0},\\\\r\\\\n multiple: {type: Boolean, default: false},\\\\r\\\\n name: {type: String, default: null},\\\\r\\\\n options: {type: Array, default () { return [] }},\\\\r\\\\n optionsLabel: {type: String, default: 'label'},\\\\r\\\\n optionsValue: {type: String, default: 'value'},\\\\r\\\\n parent: {default: true},\\\\r\\\\n placeholder: {type: String, default: null},\\\\r\\\\n readonly: {type: Boolean, default: null},\\\\r\\\\n required: {type: Boolean, default: null},\\\\r\\\\n search: {type: Boolean, default: false},\\\\r\\\\n searchText: {type: String, default: null},\\\\r\\\\n url: {type: String, default: null},\\\\r\\\\n value: null\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n list: [],\\\\r\\\\n loading: null,\\\\r\\\\n searchValue: null,\\\\r\\\\n show: false,\\\\r\\\\n notify: false,\\\\r\\\\n val: null,\\\\r\\\\n valid: null\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n canSearch () { return this.minSearch ? this.list.length >= this.minSearch : this.search },\\\\r\\\\n classes () { return [{open: this.show, disabled: this.disabled}, this.class, this.isLi ? 'dropdown' : this.inInput ? 'input-group-btn' : 'btn-group'] },\\\\r\\\\n filteredOptions () {\\\\r\\\\n var search = (this.searchValue || '').toLowerCase()\\\\r\\\\n return !search ? this.list : this.list.filter(el => {\\\\r\\\\n return ~el[this.optionsLabel].toLowerCase().search(search)\\\\r\\\\n })\\\\r\\\\n },\\\\r\\\\n hasParent () { return this.parent instanceof Array ? this.parent.length : this.parent },\\\\r\\\\n inInput () { return this.$parent._input },\\\\r\\\\n isLi () { return this.$parent._navbar || this.$parent.menu || this.$parent._tabset },\\\\r\\\\n limitText () { return this.text.limit.replace('{{limit}}', this.limit) },\\\\r\\\\n selected () {\\\\r\\\\n if (this.list.length === 0) { return '' }\\\\r\\\\n var sel = this.values.map(val => (this.list.find(o => o[this.optionsValue] === val) || {})[this.optionsLabel]).filter(val => val !== undefined)\\\\r\\\\n this.$emit('selected', sel)\\\\r\\\\n return sel.join(', ')\\\\r\\\\n },\\\\r\\\\n showPlaceholder () { return (this.values.length === 0 || !this.hasParent) ? (this.placeholder || this.text.notSelected) : null },\\\\r\\\\n text () { return translations(this.lang) },\\\\r\\\\n values () { return this.val instanceof Array ? this.val : ~[null, undefined].indexOf(this.val) ? [] : [this.val] },\\\\r\\\\n valOptions () { return this.list.map(el => el[this.optionsValue]) }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n options (options) {\\\\r\\\\n if (options instanceof Array) this.setOptions(options)\\\\r\\\\n },\\\\r\\\\n show (val) {\\\\r\\\\n if (val) {\\\\r\\\\n this.$refs.search ? this.$refs.search.focus() : this.$refs.btn.focus()\\\\r\\\\n // onBlur(this.$refs.select, e => { this.show = false })\\\\r\\\\n } else {\\\\r\\\\n // offBlur(this.$refs.select)\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n url () {\\\\r\\\\n this.urlChanged()\\\\r\\\\n },\\\\r\\\\n valid (val, old) {\\\\r\\\\n this.$emit('isvalid', val)\\\\r\\\\n this.$emit(!val ? 'invalid' : 'valid')\\\\r\\\\n if (val !== old && this._parent) this._parent.validate()\\\\r\\\\n },\\\\r\\\\n value (val, old) {\\\\r\\\\n if (val !== old) { this.val = val }\\\\r\\\\n },\\\\r\\\\n val (val, old) {\\\\r\\\\n if (val === undefined) { this.val = val = null }\\\\r\\\\n if (val !== old) {\\\\r\\\\n this.$emit('change', val)\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n }\\\\r\\\\n if (val instanceof Array && val.length > this.limit) {\\\\r\\\\n this.val = val.slice(0, this.limit)\\\\r\\\\n this.notify = true\\\\r\\\\n if (timeout.limit) clearTimeout(timeout.limit)\\\\r\\\\n timeout.limit = setTimeout(() => {\\\\r\\\\n timeout.limit = false\\\\r\\\\n this.notify = false\\\\r\\\\n }, 1500)\\\\r\\\\n }\\\\r\\\\n this.valid = this.validate()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n close () {\\\\r\\\\n this.show = false\\\\r\\\\n },\\\\r\\\\n checkData () {\\\\r\\\\n if (this.multiple) {\\\\r\\\\n if (this.limit < 1) { this.limit = 1 }\\\\r\\\\n if (!(this.val instanceof Array)) {\\\\r\\\\n this.val = (this.val === null || this.val === undefined) ? [] : [this.val]\\\\r\\\\n }\\\\r\\\\n var values = this.valOptions\\\\r\\\\n this.val = this.val.filter(el => ~values.indexOf(el))\\\\r\\\\n if (this.values.length > this.limit) {\\\\r\\\\n this.val = this.val.slice(0, this.limit)\\\\r\\\\n }\\\\r\\\\n } else {\\\\r\\\\n if (!~this.valOptions.indexOf(this.val)) { this.val = null }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n clear () {\\\\r\\\\n if (this.disabled || this.readonly) { return }\\\\r\\\\n this.val = this.val instanceof Array ? [] : null\\\\r\\\\n this.toggle()\\\\r\\\\n },\\\\r\\\\n clearSearch () {\\\\r\\\\n this.searchValue = ''\\\\r\\\\n this.$refs.search.focus()\\\\r\\\\n },\\\\r\\\\n isSelected (v) {\\\\r\\\\n return this.values.indexOf(v) > -1\\\\r\\\\n },\\\\r\\\\n select (v) {\\\\r\\\\n if (this.val instanceof Array) {\\\\r\\\\n var newVal = this.val.slice(0)\\\\r\\\\n if (~newVal.indexOf(v)) {\\\\r\\\\n newVal.splice(newVal.indexOf(v), 1)\\\\r\\\\n } else {\\\\r\\\\n newVal.push(v)\\\\r\\\\n }\\\\r\\\\n this.val = newVal\\\\r\\\\n if (this.closeOnSelect) {\\\\r\\\\n this.toggle()\\\\r\\\\n }\\\\r\\\\n } else {\\\\r\\\\n this.val = v\\\\r\\\\n this.toggle()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n setOptions (options) {\\\\r\\\\n this.list = options.map(el => {\\\\r\\\\n if (el instanceof Object) { return el }\\\\r\\\\n let obj = {}\\\\r\\\\n obj[this.optionsLabel] = el\\\\r\\\\n obj[this.optionsValue] = el\\\\r\\\\n return obj\\\\r\\\\n })\\\\r\\\\n this.$emit('options', this.list)\\\\r\\\\n },\\\\r\\\\n toggle () {\\\\r\\\\n this.show = !this.show\\\\r\\\\n if (!this.show) this.$refs.btn.focus()\\\\r\\\\n },\\\\r\\\\n urlChanged () {\\\\r\\\\n if (!this.url || !this.$http) { return }\\\\r\\\\n this.loading = true\\\\r\\\\n this.$http.get(this.url).then(response => {\\\\r\\\\n var data = response.data instanceof Array ? response.data : []\\\\r\\\\n try { data = JSON.parse(data) } catch (e) {}\\\\r\\\\n this.setOptions(data)\\\\r\\\\n this.loading = false\\\\r\\\\n this.checkData()\\\\r\\\\n }, response => {\\\\r\\\\n this.loading = false\\\\r\\\\n })\\\\r\\\\n },\\\\r\\\\n validate () {\\\\r\\\\n return !this.required ? true : this.val instanceof Array ? this.val.length > 0 : this.val !== null\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this.setOptions(this.options)\\\\r\\\\n this.val = this.value\\\\r\\\\n this._select = true\\\\r\\\\n if (this.val === undefined || !this.parent) { this.val = null }\\\\r\\\\n if (!this.multiple && this.val instanceof Array) {\\\\r\\\\n this.val = this.val[0]\\\\r\\\\n }\\\\r\\\\n this.checkData()\\\\r\\\\n if (this.url) this.urlChanged()\\\\r\\\\n let parent = this.$parent\\\\r\\\\n while (parent && !parent._formValidator) { parent = parent.$parent }\\\\r\\\\n if (parent && parent._formValidator) {\\\\r\\\\n parent.children.push(this)\\\\r\\\\n this._parent = parent\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n mounted () {\\\\r\\\\n if (this._parent) this._parent.children.push(this)\\\\r\\\\n this.setOptions(this.options)\\\\r\\\\n this.val = this.value\\\\r\\\\n this.checkData()\\\\r\\\\n },\\\\r\\\\n beforeDestroy () {\\\\r\\\\n if (this._parent) {\\\\r\\\\n var index = this._parent.children.indexOf(this)\\\\r\\\\n this._parent.children.splice(index, 1)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style scoped>\\\\r\\\\n.form-control.dropdown-toggle{\\\\r\\\\n height: auto;\\\\r\\\\n padding-right: 24px;\\\\r\\\\n}\\\\r\\\\n.form-control.dropdown-toggle:after{\\\\r\\\\n content: ' ';\\\\r\\\\n position: absolute;\\\\r\\\\n right: 13px;\\\\r\\\\n top: 50%;\\\\r\\\\n margin: -1px 0 0;\\\\r\\\\n border-top: 4px dashed;\\\\r\\\\n border-top: 4px solid \\\\\\\\9;\\\\r\\\\n border-right: 4px solid transparent;\\\\r\\\\n border-left: 4px solid transparent;\\\\r\\\\n}\\\\r\\\\n.bs-searchbox {\\\\r\\\\n position: relative;\\\\r\\\\n margin: 4px 8px;\\\\r\\\\n}\\\\r\\\\n.bs-searchbox .close {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 2;\\\\r\\\\n display: block;\\\\r\\\\n width: 34px;\\\\r\\\\n height: 34px;\\\\r\\\\n line-height: 34px;\\\\r\\\\n text-align: center;\\\\r\\\\n}\\\\r\\\\n.bs-searchbox input:focus,\\\\r\\\\n.form-control.dropdown-toggle:focus {\\\\r\\\\n outline: 0;\\\\r\\\\n border-color: #66afe9 !important;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);\\\\r\\\\n}\\\\r\\\\n.secret {\\\\r\\\\n border: 0;\\\\r\\\\n clip: rect(0 0 0 0);\\\\r\\\\n height: 1px;\\\\r\\\\n margin: -1px;\\\\r\\\\n overflow: hidden;\\\\r\\\\n padding: 0;\\\\r\\\\n position: absolute;\\\\r\\\\n width: 1px;\\\\r\\\\n}\\\\r\\\\n.form-control.dropdown-toggle>.close { margin-left: 5px;}\\\\r\\\\n.notify.out { position: relative; }\\\\r\\\\n.notify.in,\\\\r\\\\n.notify>div {\\\\r\\\\n position: absolute;\\\\r\\\\n width: 96%;\\\\r\\\\n margin: 0 2%;\\\\r\\\\n min-height: 26px;\\\\r\\\\n padding: 3px 5px;\\\\r\\\\n background: #f5f5f5;\\\\r\\\\n border: 1px solid #e3e3e3;\\\\r\\\\n box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\\\r\\\\n pointer-events: none;\\\\r\\\\n}\\\\r\\\\n.notify>div {\\\\r\\\\n top: 5px;\\\\r\\\\n z-index: 1;\\\\r\\\\n}\\\\r\\\\n.notify.in {\\\\r\\\\n opacity: .9;\\\\r\\\\n bottom: 5px;\\\\r\\\\n}\\\\r\\\\n.btn-group-justified .dropdown-toggle>span:not(.close) {\\\\r\\\\n width: calc(100% - 18px);\\\\r\\\\n display: inline-block;\\\\r\\\\n overflow: hidden;\\\\r\\\\n white-space: nowrap;\\\\r\\\\n text-overflow: ellipsis;\\\\r\\\\n margin-bottom: -4px;\\\\r\\\\n}\\\\r\\\\n.btn-group-justified .dropdown-menu { width: 100%; }\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 156 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar _ClickOutside = __webpack_require__(66);\\n\\t\\n\\tvar _ClickOutside2 = _interopRequireDefault(_ClickOutside);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\tvar timeout = {};\\n\\texports.default = {\\n\\t directives: {\\n\\t ClickOutside: _ClickOutside2.default\\n\\t },\\n\\t props: {\\n\\t clearButton: { type: Boolean, default: false },\\n\\t closeOnSelect: { type: Boolean, default: false },\\n\\t disabled: { type: Boolean, default: false },\\n\\t lang: { type: String, default: navigator.language },\\n\\t limit: { type: Number, default: 1024 },\\n\\t minSearch: { type: Number, default: 0 },\\n\\t multiple: { type: Boolean, default: false },\\n\\t name: { type: String, default: null },\\n\\t options: { type: Array, default: function _default() {\\n\\t return [];\\n\\t }\\n\\t },\\n\\t optionsLabel: { type: String, default: 'label' },\\n\\t optionsValue: { type: String, default: 'value' },\\n\\t parent: { default: true },\\n\\t placeholder: { type: String, default: null },\\n\\t readonly: { type: Boolean, default: null },\\n\\t required: { type: Boolean, default: null },\\n\\t search: { type: Boolean, default: false },\\n\\t searchText: { type: String, default: null },\\n\\t url: { type: String, default: null },\\n\\t value: null\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t list: [],\\n\\t loading: null,\\n\\t searchValue: null,\\n\\t show: false,\\n\\t notify: false,\\n\\t val: null,\\n\\t valid: null\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t canSearch: function canSearch() {\\n\\t return this.minSearch ? this.list.length >= this.minSearch : this.search;\\n\\t },\\n\\t classes: function classes() {\\n\\t return [{ open: this.show, disabled: this.disabled }, this.class, this.isLi ? 'dropdown' : this.inInput ? 'input-group-btn' : 'btn-group'];\\n\\t },\\n\\t filteredOptions: function filteredOptions() {\\n\\t var _this = this;\\n\\t\\n\\t var search = (this.searchValue || '').toLowerCase();\\n\\t return !search ? this.list : this.list.filter(function (el) {\\n\\t return ~el[_this.optionsLabel].toLowerCase().search(search);\\n\\t });\\n\\t },\\n\\t hasParent: function hasParent() {\\n\\t return this.parent instanceof Array ? this.parent.length : this.parent;\\n\\t },\\n\\t inInput: function inInput() {\\n\\t return this.$parent._input;\\n\\t },\\n\\t isLi: function isLi() {\\n\\t return this.$parent._navbar || this.$parent.menu || this.$parent._tabset;\\n\\t },\\n\\t limitText: function limitText() {\\n\\t return this.text.limit.replace('{{limit}}', this.limit);\\n\\t },\\n\\t selected: function selected() {\\n\\t var _this2 = this;\\n\\t\\n\\t if (this.list.length === 0) {\\n\\t return '';\\n\\t }\\n\\t var sel = this.values.map(function (val) {\\n\\t return (_this2.list.find(function (o) {\\n\\t return o[_this2.optionsValue] === val;\\n\\t }) || {})[_this2.optionsLabel];\\n\\t }).filter(function (val) {\\n\\t return val !== undefined;\\n\\t });\\n\\t this.$emit('selected', sel);\\n\\t return sel.join(', ');\\n\\t },\\n\\t showPlaceholder: function showPlaceholder() {\\n\\t return this.values.length === 0 || !this.hasParent ? this.placeholder || this.text.notSelected : null;\\n\\t },\\n\\t text: function text() {\\n\\t return (0, _utils.translations)(this.lang);\\n\\t },\\n\\t values: function values() {\\n\\t return this.val instanceof Array ? this.val : ~[null, undefined].indexOf(this.val) ? [] : [this.val];\\n\\t },\\n\\t valOptions: function valOptions() {\\n\\t var _this3 = this;\\n\\t\\n\\t return this.list.map(function (el) {\\n\\t return el[_this3.optionsValue];\\n\\t });\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t options: function options(_options) {\\n\\t if (_options instanceof Array) this.setOptions(_options);\\n\\t },\\n\\t show: function show(val) {\\n\\t if (val) {\\n\\t this.$refs.search ? this.$refs.search.focus() : this.$refs.btn.focus();\\n\\t // onBlur(this.$refs.select, e => { this.show = false })\\n\\t } else {\\n\\t // offBlur(this.$refs.select)\\n\\t }\\n\\t },\\n\\t url: function url() {\\n\\t this.urlChanged();\\n\\t },\\n\\t valid: function valid(val, old) {\\n\\t this.$emit('isvalid', val);\\n\\t this.$emit(!val ? 'invalid' : 'valid');\\n\\t if (val !== old && this._parent) this._parent.validate();\\n\\t },\\n\\t value: function value(val, old) {\\n\\t if (val !== old) {\\n\\t this.val = val;\\n\\t }\\n\\t },\\n\\t val: function val(_val, old) {\\n\\t var _this4 = this;\\n\\t\\n\\t if (_val === undefined) {\\n\\t this.val = _val = null;\\n\\t }\\n\\t if (_val !== old) {\\n\\t this.$emit('change', _val);\\n\\t this.$emit('input', _val);\\n\\t }\\n\\t if (_val instanceof Array && _val.length > this.limit) {\\n\\t this.val = _val.slice(0, this.limit);\\n\\t this.notify = true;\\n\\t if (timeout.limit) clearTimeout(timeout.limit);\\n\\t timeout.limit = setTimeout(function () {\\n\\t timeout.limit = false;\\n\\t _this4.notify = false;\\n\\t }, 1500);\\n\\t }\\n\\t this.valid = this.validate();\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t close: function close() {\\n\\t this.show = false;\\n\\t },\\n\\t checkData: function checkData() {\\n\\t if (this.multiple) {\\n\\t if (this.limit < 1) {\\n\\t this.limit = 1;\\n\\t }\\n\\t if (!(this.val instanceof Array)) {\\n\\t this.val = this.val === null || this.val === undefined ? [] : [this.val];\\n\\t }\\n\\t var values = this.valOptions;\\n\\t this.val = this.val.filter(function (el) {\\n\\t return ~values.indexOf(el);\\n\\t });\\n\\t if (this.values.length > this.limit) {\\n\\t this.val = this.val.slice(0, this.limit);\\n\\t }\\n\\t } else {\\n\\t if (!~this.valOptions.indexOf(this.val)) {\\n\\t this.val = null;\\n\\t }\\n\\t }\\n\\t },\\n\\t clear: function clear() {\\n\\t if (this.disabled || this.readonly) {\\n\\t return;\\n\\t }\\n\\t this.val = this.val instanceof Array ? [] : null;\\n\\t this.toggle();\\n\\t },\\n\\t clearSearch: function clearSearch() {\\n\\t this.searchValue = '';\\n\\t this.$refs.search.focus();\\n\\t },\\n\\t isSelected: function isSelected(v) {\\n\\t return this.values.indexOf(v) > -1;\\n\\t },\\n\\t select: function select(v) {\\n\\t if (this.val instanceof Array) {\\n\\t var newVal = this.val.slice(0);\\n\\t if (~newVal.indexOf(v)) {\\n\\t newVal.splice(newVal.indexOf(v), 1);\\n\\t } else {\\n\\t newVal.push(v);\\n\\t }\\n\\t this.val = newVal;\\n\\t if (this.closeOnSelect) {\\n\\t this.toggle();\\n\\t }\\n\\t } else {\\n\\t this.val = v;\\n\\t this.toggle();\\n\\t }\\n\\t },\\n\\t setOptions: function setOptions(options) {\\n\\t var _this5 = this;\\n\\t\\n\\t this.list = options.map(function (el) {\\n\\t if (el instanceof Object) {\\n\\t return el;\\n\\t }\\n\\t var obj = {};\\n\\t obj[_this5.optionsLabel] = el;\\n\\t obj[_this5.optionsValue] = el;\\n\\t return obj;\\n\\t });\\n\\t this.$emit('options', this.list);\\n\\t },\\n\\t toggle: function toggle() {\\n\\t this.show = !this.show;\\n\\t if (!this.show) this.$refs.btn.focus();\\n\\t },\\n\\t urlChanged: function urlChanged() {\\n\\t var _this6 = this;\\n\\t\\n\\t if (!this.url || !this.$http) {\\n\\t return;\\n\\t }\\n\\t this.loading = true;\\n\\t this.$http.get(this.url).then(function (response) {\\n\\t var data = response.data instanceof Array ? response.data : [];\\n\\t try {\\n\\t data = JSON.parse(data);\\n\\t } catch (e) {}\\n\\t _this6.setOptions(data);\\n\\t _this6.loading = false;\\n\\t _this6.checkData();\\n\\t }, function (response) {\\n\\t _this6.loading = false;\\n\\t });\\n\\t },\\n\\t validate: function validate() {\\n\\t return !this.required ? true : this.val instanceof Array ? this.val.length > 0 : this.val !== null;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this.setOptions(this.options);\\n\\t this.val = this.value;\\n\\t this._select = true;\\n\\t if (this.val === undefined || !this.parent) {\\n\\t this.val = null;\\n\\t }\\n\\t if (!this.multiple && this.val instanceof Array) {\\n\\t this.val = this.val[0];\\n\\t }\\n\\t this.checkData();\\n\\t if (this.url) this.urlChanged();\\n\\t var parent = this.$parent;\\n\\t while (parent && !parent._formValidator) {\\n\\t parent = parent.$parent;\\n\\t }\\n\\t if (parent && parent._formValidator) {\\n\\t parent.children.push(this);\\n\\t this._parent = parent;\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t if (this._parent) this._parent.children.push(this);\\n\\t this.setOptions(this.options);\\n\\t this.val = this.value;\\n\\t this.checkData();\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t if (this._parent) {\\n\\t var index = this._parent.children.indexOf(this);\\n\\t this._parent.children.splice(index, 1);\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 157 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"click-outside\\\",\\n\\t rawName: \\\"v-click-outside\\\",\\n\\t value: (_vm.close),\\n\\t expression: \\\"close\\\"\\n\\t }],\\n\\t ref: \\\"select\\\",\\n\\t class: _vm.classes\\n\\t }, [_vm._c('div', {\\n\\t ref: \\\"btn\\\",\\n\\t staticClass: \\\"form-control dropdown-toggle\\\",\\n\\t attrs: {\\n\\t \\\"tabindex\\\": \\\"1\\\",\\n\\t \\\"disabled\\\": _vm.disabled || !_vm.hasParent,\\n\\t \\\"readonly\\\": _vm.readonly\\n\\t },\\n\\t on: {\\n\\t \\\"blur\\\": function($event) {\\n\\t _vm.canSearch ? null : _vm.close()\\n\\t },\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.toggle()\\n\\t },\\n\\t \\\"keydown\\\": [function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"esc\\\", 27)) { return; }\\n\\t $event.stopPropagation();\\n\\t $event.preventDefault();\\n\\t _vm.close($event)\\n\\t }, function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"space\\\", 32)) { return; }\\n\\t $event.stopPropagation();\\n\\t $event.preventDefault();\\n\\t _vm.toggle($event)\\n\\t }, function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n\\t $event.stopPropagation();\\n\\t $event.preventDefault();\\n\\t _vm.toggle($event)\\n\\t }]\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t staticClass: \\\"btn-content\\\",\\n\\t domProps: {\\n\\t \\\"innerHTML\\\": _vm._s(_vm.loading ? _vm.text.loading : _vm.showPlaceholder || _vm.selected)\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), (_vm.clearButton && _vm.values.length) ? _vm._c('span', {\\n\\t staticClass: \\\"close\\\",\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t _vm.clear()\\n\\t }\\n\\t }\\n\\t }, [_vm._v(\\\"×\\\")]) : _vm._e()]), _vm._v(\\\" \\\"), _vm._c('select', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t ref: \\\"sel\\\",\\n\\t staticClass: \\\"secret\\\",\\n\\t attrs: {\\n\\t \\\"name\\\": _vm.name,\\n\\t \\\"multiple\\\": _vm.multiple,\\n\\t \\\"required\\\": _vm.required,\\n\\t \\\"readonly\\\": _vm.readonly,\\n\\t \\\"disabled\\\": _vm.disabled\\n\\t },\\n\\t on: {\\n\\t \\\"change\\\": function($event) {\\n\\t _vm.val = Array.prototype.filter.call($event.target.options, function(o) {\\n\\t return o.selected\\n\\t }).map(function(o) {\\n\\t var val = \\\"_value\\\" in o ? o._value : o.value;\\n\\t return val\\n\\t })[0]\\n\\t }\\n\\t }\\n\\t }, [(_vm.required) ? _vm._c('option', {\\n\\t attrs: {\\n\\t \\\"value\\\": \\\"\\\"\\n\\t }\\n\\t }) : _vm._e(), _vm._v(\\\" \\\"), _vm._l((_vm.list), function(option) {\\n\\t return _vm._c('option', {\\n\\t domProps: {\\n\\t \\\"value\\\": option[_vm.optionsValue]\\n\\t }\\n\\t }, [_vm._v(_vm._s(option[_vm.optionsLabel]))])\\n\\t })], 2), _vm._v(\\\" \\\"), _vm._c('ul', {\\n\\t staticClass: \\\"dropdown-menu\\\"\\n\\t }, [(_vm.list.length) ? [(_vm.canSearch) ? _vm._c('li', {\\n\\t staticClass: \\\"bs-searchbox\\\"\\n\\t }, [_vm._c('input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.searchValue),\\n\\t expression: \\\"searchValue\\\"\\n\\t }],\\n\\t ref: \\\"search\\\",\\n\\t staticClass: \\\"form-control\\\",\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"text\\\",\\n\\t \\\"placeholder\\\": _vm.searchText || _vm.text.search,\\n\\t \\\"autocomplete\\\": \\\"off\\\"\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm._s(_vm.searchValue)\\n\\t },\\n\\t on: {\\n\\t \\\"keyup\\\": function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"esc\\\", 27)) { return; }\\n\\t _vm.close($event)\\n\\t },\\n\\t \\\"input\\\": function($event) {\\n\\t if ($event.target.composing) { return; }\\n\\t _vm.searchValue = $event.target.value\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.searchValue),\\n\\t expression: \\\"searchValue\\\"\\n\\t }],\\n\\t staticClass: \\\"close\\\",\\n\\t on: {\\n\\t \\\"click\\\": _vm.clearSearch\\n\\t }\\n\\t }, [_vm._v(\\\"×\\\")])]) : _vm._e(), _vm._v(\\\" \\\"), (_vm.required && !_vm.clearButton) ? _vm._c('li', [_vm._c('a', {\\n\\t on: {\\n\\t \\\"mousedown\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.clear() && _vm.close()\\n\\t }\\n\\t }\\n\\t }, [_vm._v(_vm._s(_vm.placeholder || _vm.text.notSelected))])]) : _vm._e(), _vm._v(\\\" \\\"), _vm._l((_vm.filteredOptions), function(option) {\\n\\t return _vm._c('li', {\\n\\t attrs: {\\n\\t \\\"id\\\": option[_vm.optionsValue]\\n\\t }\\n\\t }, [_vm._c('a', {\\n\\t on: {\\n\\t \\\"mousedown\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.select(option[_vm.optionsValue])\\n\\t }\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t domProps: {\\n\\t \\\"innerHTML\\\": _vm._s(option[_vm.optionsLabel])\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('span', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.isSelected(option[_vm.optionsValue])),\\n\\t expression: \\\"isSelected(option[optionsValue])\\\"\\n\\t }],\\n\\t staticClass: \\\"glyphicon glyphicon-ok check-mark\\\"\\n\\t })])])\\n\\t })] : _vm._e(), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\"), _vm._v(\\\" \\\"), (_vm.notify && !_vm.closeOnSelect) ? _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": \\\"fadein\\\"\\n\\t }\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"notify in\\\"\\n\\t }, [_vm._v(_vm._s(_vm.limitText))])]) : _vm._e()], 2), _vm._v(\\\" \\\"), (_vm.notify && _vm.closeOnSelect) ? _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": \\\"fadein\\\"\\n\\t }\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"notify out\\\"\\n\\t }, [_vm._c('div', [_vm._v(_vm._s(_vm.limitText))])])]) : _vm._e()], 1)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-e514dbc6\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 158 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(159)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(160)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Slider.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-32185b82\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-32185b82\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Slider.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 159 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t computed: {\\n\\t index: function index() {\\n\\t return this.$parent.$children.indexOf(this);\\n\\t },\\n\\t show: function show() {\\n\\t return this.$parent.index === this.index;\\n\\t }\\n\\t },\\n\\t mounted: function mounted() {\\n\\t if (this.$parent.indicator_list) {\\n\\t this.$parent.indicator_list.push(this.index);\\n\\t }\\n\\t\\n\\t if (this.index === 0) {\\n\\t this.$el.classList.add('active');\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 160 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t staticClass: \\\"item\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-32185b82\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 161 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(162)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(164)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(165)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Spinner.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-8b298e70\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-8b298e70\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Spinner.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 162 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(163);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-8b298e70!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Spinner.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-8b298e70!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Spinner.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 163 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n@keyframes spin {\\\\n100% {\\\\r\\\\n transform: rotate(360deg);\\\\n}\\\\n}\\\\n.spinner-gritcode {\\\\r\\\\n top: 0;\\\\r\\\\n left: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 9998;\\\\r\\\\n position: absolute;\\\\r\\\\n width: 100%;\\\\r\\\\n text-align: center;\\\\r\\\\n background: rgba(255, 255, 255, 0.9);\\\\n}\\\\n.spinner-gritcode.spinner-fixed {\\\\r\\\\n position: fixed;\\\\n}\\\\n.spinner-gritcode .spinner-wrapper {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 50%;\\\\r\\\\n left: 50%;\\\\r\\\\n transform: translate(-50%, -50%);\\\\r\\\\n -ms-transform: translate(-50%, -50%);\\\\n}\\\\n.spinner-gritcode .spinner-circle {\\\\r\\\\n position: relative;\\\\r\\\\n border: 4px solid #ccc;\\\\r\\\\n border-right-color: #337ab7;\\\\r\\\\n border-radius: 50%;\\\\r\\\\n display: inline-block;\\\\r\\\\n animation: spin 0.6s linear;\\\\r\\\\n animation-iteration-count: infinite;\\\\r\\\\n width: 3em;\\\\r\\\\n height: 3em;\\\\r\\\\n z-index: 2;\\\\n}\\\\n.spinner-gritcode .spinner-text {\\\\r\\\\n position: relative;\\\\r\\\\n text-align: center;\\\\r\\\\n margin-top: 0.5em;\\\\r\\\\n z-index: 2;\\\\r\\\\n width: 100%;\\\\r\\\\n font-size: 95%;\\\\r\\\\n color: #337ab7;\\\\n}\\\\n.spinner-gritcode.spinner-sm .spinner-circle {\\\\r\\\\n width: 1.5em;\\\\r\\\\n height: 1.5em;\\\\n}\\\\n.spinner-gritcode.spinner-md .spinner-circle {\\\\r\\\\n width: 2em;\\\\r\\\\n height: 2em;\\\\n}\\\\n.spinner-gritcode.spinner-lg .spinner-circle {\\\\r\\\\n width: 2.5em;\\\\r\\\\n height: 2.5em;\\\\n}\\\\n.spinner-gritcode.spinner-xl .spinner-circle {\\\\r\\\\n width: 3.5em;\\\\r\\\\n height: 3.5em;\\\\n}\\\\n.lt-ie10 .spinner-gritcode .spinner-circle,\\\\r\\\\n.ie9 .spinner-gritcode .spinner-circle,\\\\r\\\\n.oldie .spinner-gritcode .spinner-circle,\\\\r\\\\n.no-csstransitions .spinner-gritcode .spinner-circle,\\\\r\\\\n.no-csstransforms3d .spinner-gritcode .spinner-circle {\\\\r\\\\n background: url(\\\\\\\"http://i2.wp.com/www.thegreatnovelingadventure.com/wp-content/plugins/wp-polls/images/loading.gif\\\\\\\") center center no-repeat;\\\\r\\\\n animation: none;\\\\r\\\\n margin-left: 0;\\\\r\\\\n margin-top: 5px;\\\\r\\\\n border: none;\\\\r\\\\n width: 32px;\\\\r\\\\n height: 32px;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Spinner.vue?65fc5a8f\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AA2FA;AACA;IACA,0BAAA;CACA;CACA;AACA;EACA,OAAA;EACA,QAAA;EACA,UAAA;EACA,SAAA;EACA,cAAA;EACA,mBAAA;EACA,YAAA;EACA,mBAAA;EACA,qCAAA;CACA;AACA;EACA,gBAAA;CACA;AACA;EACA,mBAAA;EACA,SAAA;EACA,UAAA;EACA,iCAAA;EACA,qCAAA;CACA;AACA;EACA,mBAAA;EACA,uBAAA;EACA,4BAAA;EACA,mBAAA;EACA,sBAAA;EACA,4BAAA;EACA,oCAAA;EACA,WAAA;EACA,YAAA;EACA,WAAA;CACA;AACA;EACA,mBAAA;EACA,mBAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,eAAA;CACA;AACA;EACA,aAAA;EACA,cAAA;CACA;AACA;EACA,WAAA;EACA,YAAA;CACA;AACA;EACA,aAAA;EACA,cAAA;CACA;AACA;EACA,aAAA;EACA,cAAA;CACA;AACA;;;;;EAKA,6IAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,aAAA;EACA,YAAA;EACA,aAAA;CACA\\\",\\\"file\\\":\\\"Spinner.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div :class=\\\\\\\"['spinner spinner-gritcode',spinnerSize,{'spinner-fixed':fixed}]\\\\\\\" v-show=\\\\\\\"active||locked\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"spinner-wrapper\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"spinner-circle\\\\\\\"></div>\\\\r\\\\n <div class=\\\\\\\"spinner-text\\\\\\\">{{text}}</div>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {coerce, delayer} from './utils/utils.js'\\\\r\\\\nconst MIN_WAIT = 500 // in ms\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n fixed: {type: Boolean, default: false},\\\\r\\\\n global: {type: Boolean, default: false},\\\\r\\\\n size: {type: String, default: 'md'},\\\\r\\\\n text: {type: String, default: ''},\\\\r\\\\n value: {default: false}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n active: this.value,\\\\r\\\\n locked: false\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n spinnerSize () { return 'spinner-' + (this.size ? this.size : 'sm') }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n active (val, old) {\\\\r\\\\n if (val !== old) this.$emit('input', val)\\\\r\\\\n },\\\\r\\\\n value (val, old) {\\\\r\\\\n if (val !== old) { this[val ? 'show' : 'hide']() }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n hide () {\\\\r\\\\n var delay = 0\\\\r\\\\n this.active = false\\\\r\\\\n },\\\\r\\\\n show (options) {\\\\r\\\\n if (options) {\\\\r\\\\n if (options.text) { this.text = options.text }\\\\r\\\\n if (options.size) { this.size = options.size }\\\\r\\\\n if (options.fixed) { this.fixed = options.fixed }\\\\r\\\\n }\\\\r\\\\n // block scrolling when spinner is on\\\\r\\\\n this._body.style.overflowY = 'hidden'\\\\r\\\\n // activate spinner\\\\r\\\\n this._started = new Date()\\\\r\\\\n this.active = true\\\\r\\\\n this.locked = true\\\\r\\\\n this._unlock()\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this._body = document.body\\\\r\\\\n this._bodyOverflow = document.body.style.overflowY\\\\r\\\\n this._unlock = delayer(function () {\\\\r\\\\n this.locked = false\\\\r\\\\n this._body.style.overflowY = this._bodyOverflow\\\\r\\\\n }, MIN_WAIT)\\\\r\\\\n if (this.global) {\\\\r\\\\n if (!this.$root._globalSpinner) {\\\\r\\\\n this.$root._globalSpinner = true\\\\r\\\\n var self = this\\\\r\\\\n this._global = {\\\\r\\\\n hide () { self.hide() },\\\\r\\\\n show () { self.show() }\\\\r\\\\n }\\\\r\\\\n this.$root.$on('spinner::show', this._global.show)\\\\r\\\\n this.$root.$on('spinner::hide', this._global.hide)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n beforeDestroy () {\\\\r\\\\n if (this._global) {\\\\r\\\\n this.$root.$off('spinner::show', this._global.show)\\\\r\\\\n this.$root.$off('spinner::hide', this._global.hide)\\\\r\\\\n delete this.$root._globalSpinner\\\\r\\\\n }\\\\r\\\\n clearTimeout(this._spinnerAnimation)\\\\r\\\\n this._body.style.overflowY = this._bodyOverflow\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n@keyframes spin {\\\\r\\\\n 100% {\\\\r\\\\n transform: rotate(360deg);\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode {\\\\r\\\\n top: 0;\\\\r\\\\n left: 0;\\\\r\\\\n bottom: 0;\\\\r\\\\n right: 0;\\\\r\\\\n z-index: 9998;\\\\r\\\\n position: absolute;\\\\r\\\\n width: 100%;\\\\r\\\\n text-align: center;\\\\r\\\\n background: rgba(255, 255, 255, 0.9);\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode.spinner-fixed {\\\\r\\\\n position: fixed;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode .spinner-wrapper {\\\\r\\\\n position: absolute;\\\\r\\\\n top: 50%;\\\\r\\\\n left: 50%;\\\\r\\\\n transform: translate(-50%, -50%);\\\\r\\\\n -ms-transform: translate(-50%, -50%);\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode .spinner-circle {\\\\r\\\\n position: relative;\\\\r\\\\n border: 4px solid #ccc;\\\\r\\\\n border-right-color: #337ab7;\\\\r\\\\n border-radius: 50%;\\\\r\\\\n display: inline-block;\\\\r\\\\n animation: spin 0.6s linear;\\\\r\\\\n animation-iteration-count: infinite;\\\\r\\\\n width: 3em;\\\\r\\\\n height: 3em;\\\\r\\\\n z-index: 2;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode .spinner-text {\\\\r\\\\n position: relative;\\\\r\\\\n text-align: center;\\\\r\\\\n margin-top: 0.5em;\\\\r\\\\n z-index: 2;\\\\r\\\\n width: 100%;\\\\r\\\\n font-size: 95%;\\\\r\\\\n color: #337ab7;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode.spinner-sm .spinner-circle {\\\\r\\\\n width: 1.5em;\\\\r\\\\n height: 1.5em;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode.spinner-md .spinner-circle {\\\\r\\\\n width: 2em;\\\\r\\\\n height: 2em;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode.spinner-lg .spinner-circle {\\\\r\\\\n width: 2.5em;\\\\r\\\\n height: 2.5em;\\\\r\\\\n}\\\\r\\\\n.spinner-gritcode.spinner-xl .spinner-circle {\\\\r\\\\n width: 3.5em;\\\\r\\\\n height: 3.5em;\\\\r\\\\n}\\\\r\\\\n.lt-ie10 .spinner-gritcode .spinner-circle,\\\\r\\\\n.ie9 .spinner-gritcode .spinner-circle,\\\\r\\\\n.oldie .spinner-gritcode .spinner-circle,\\\\r\\\\n.no-csstransitions .spinner-gritcode .spinner-circle,\\\\r\\\\n.no-csstransforms3d .spinner-gritcode .spinner-circle {\\\\r\\\\n background: url(\\\\\\\"http://i2.wp.com/www.thegreatnovelingadventure.com/wp-content/plugins/wp-polls/images/loading.gif\\\\\\\") center center no-repeat;\\\\r\\\\n animation: none;\\\\r\\\\n margin-left: 0;\\\\r\\\\n margin-top: 5px;\\\\r\\\\n border: none;\\\\r\\\\n width: 32px;\\\\r\\\\n height: 32px;\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 164 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar MIN_WAIT = 500; // in ms\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t fixed: { type: Boolean, default: false },\\n\\t global: { type: Boolean, default: false },\\n\\t size: { type: String, default: 'md' },\\n\\t text: { type: String, default: '' },\\n\\t value: { default: false }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t active: this.value,\\n\\t locked: false\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t spinnerSize: function spinnerSize() {\\n\\t return 'spinner-' + (this.size ? this.size : 'sm');\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t active: function active(val, old) {\\n\\t if (val !== old) this.$emit('input', val);\\n\\t },\\n\\t value: function value(val, old) {\\n\\t if (val !== old) {\\n\\t this[val ? 'show' : 'hide']();\\n\\t }\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t hide: function hide() {\\n\\t var delay = 0;\\n\\t this.active = false;\\n\\t },\\n\\t show: function show(options) {\\n\\t if (options) {\\n\\t if (options.text) {\\n\\t this.text = options.text;\\n\\t }\\n\\t if (options.size) {\\n\\t this.size = options.size;\\n\\t }\\n\\t if (options.fixed) {\\n\\t this.fixed = options.fixed;\\n\\t }\\n\\t }\\n\\t // block scrolling when spinner is on\\n\\t this._body.style.overflowY = 'hidden';\\n\\t // activate spinner\\n\\t this._started = new Date();\\n\\t this.active = true;\\n\\t this.locked = true;\\n\\t this._unlock();\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._body = document.body;\\n\\t this._bodyOverflow = document.body.style.overflowY;\\n\\t this._unlock = (0, _utils.delayer)(function () {\\n\\t this.locked = false;\\n\\t this._body.style.overflowY = this._bodyOverflow;\\n\\t }, MIN_WAIT);\\n\\t if (this.global) {\\n\\t if (!this.$root._globalSpinner) {\\n\\t this.$root._globalSpinner = true;\\n\\t var self = this;\\n\\t this._global = {\\n\\t hide: function hide() {\\n\\t self.hide();\\n\\t },\\n\\t show: function show() {\\n\\t self.show();\\n\\t }\\n\\t };\\n\\t this.$root.$on('spinner::show', this._global.show);\\n\\t this.$root.$on('spinner::hide', this._global.hide);\\n\\t }\\n\\t }\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t if (this._global) {\\n\\t this.$root.$off('spinner::show', this._global.show);\\n\\t this.$root.$off('spinner::hide', this._global.hide);\\n\\t delete this.$root._globalSpinner;\\n\\t }\\n\\t clearTimeout(this._spinnerAnimation);\\n\\t this._body.style.overflowY = this._bodyOverflow;\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 165 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t directives: [{\\n\\t name: \\\"show\\\",\\n\\t rawName: \\\"v-show\\\",\\n\\t value: (_vm.active || _vm.locked),\\n\\t expression: \\\"active||locked\\\"\\n\\t }],\\n\\t class: ['spinner spinner-gritcode', _vm.spinnerSize, {\\n\\t 'spinner-fixed': _vm.fixed\\n\\t }]\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"spinner-wrapper\\\"\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"spinner-circle\\\"\\n\\t }), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"spinner-text\\\"\\n\\t }, [_vm._v(_vm._s(_vm.text))])])])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-8b298e70\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 166 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(167)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(168)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Tab.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-0985e878\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-0985e878\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Tab.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 167 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t disabled: { type: Boolean, default: false },\\n\\t header: { type: String }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t fadein: false\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t active: function active() {\\n\\t var _this = this;\\n\\t\\n\\t var active = !this._tabs || this._tabs.show === this;\\n\\t this.fadein = false;\\n\\t if (active) {\\n\\t setTimeout(function () {\\n\\t _this.fadein = true;\\n\\t }, 0);\\n\\t }\\n\\t return active;\\n\\t },\\n\\t index: function index() {\\n\\t return this._tabs.tabs.indexOf(this);\\n\\t },\\n\\t transition: function transition() {\\n\\t return this._tabs ? this._tabs.effect : null;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._isTab = true;\\n\\t var tabs = this;\\n\\t while (!this._tabs && tabs.$parent) {\\n\\t if (tabs._isTabGroup) {\\n\\t tabs.tabs.push(this);\\n\\t this._tabGroup = tabs;\\n\\t }\\n\\t if (tabs._isTabs) {\\n\\t tabs.tabs.push(this);\\n\\t this._tabs = tabs;\\n\\t if (!this._tabGroup) tabs.headers.push(this);\\n\\t }\\n\\t tabs = tabs.$parent;\\n\\t }\\n\\t if (!this._tabs) throw Error('tab depend on tabs.');\\n\\t },\\n\\t beforeDestroy: function beforeDestroy() {\\n\\t var _this2 = this;\\n\\t\\n\\t if (this._tabGroup) {\\n\\t this._tabGroup.tabs = this._tabGroup.tabs.filter(function (el) {\\n\\t return el !== _this2;\\n\\t });\\n\\t }\\n\\t if (this._tabs) {\\n\\t this._tabs.tabs = this._tabs.tabs.filter(function (el) {\\n\\t return el !== _this2;\\n\\t });\\n\\t }\\n\\t if (this._tabs) {\\n\\t if (this._tabs.active === this.index) {\\n\\t this._tabs.index = 0;\\n\\t }\\n\\t if (this._ingroup) {\\n\\t var id = this.$parent.tabs.indexOf(this);\\n\\t if (~id) this.$parent.tabs.splice(id, 1);\\n\\t }\\n\\t }\\n\\t if (this._tabs) {\\n\\t var _id = this._tabs.tabs.indexOf(this);\\n\\t if (~_id) this._tabs.tabs.splice(_id, 1);\\n\\t }\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 168 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t ref: \\\"panel\\\",\\n\\t class: ['tab-pane', {\\n\\t 'active fade': _vm.active,\\n\\t 'in': _vm.fadein\\n\\t }],\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"tabpanel\\\"\\n\\t }\\n\\t }, [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-0985e878\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 169 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(170)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(172)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(173)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\TabGroup.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-55faf3cb\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-55faf3cb\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] TabGroup.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 170 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(171);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-55faf3cb!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./TabGroup.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-55faf3cb!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./TabGroup.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 171 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.tab-content .tab-pane { display: none;\\\\n}\\\\n.tab-content .tab-pane.active { display: block;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/TabGroup.vue?22ae1c08\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAkCA,yBAAA,cAAA;CAAA;AACA,gCAAA,eAAA;CAAA\\\",\\\"file\\\":\\\"TabGroup.vue\\\",\\\"sourcesContent\\\":[\\\"<template><span><slot></slot></span></template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n disabled: {type: Boolean, default: false},\\\\r\\\\n header: {type: String}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n show: false,\\\\r\\\\n tabs: []\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n active () { return ~this.tabs.indexOf(this._tabs.show) }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n blur () { this.show = false },\\\\r\\\\n toggle () { this.show = !this.show }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this._isTabGroup = true\\\\r\\\\n if (this.$parent) {\\\\r\\\\n if (this.$parent._isTabGroup) throw Error('Can\\\\\\\\'t nest tab-groups.')\\\\r\\\\n if (!this.$parent._isTabs) throw Error('tab-group depend on tabs.')\\\\r\\\\n }\\\\r\\\\n this._tabs = this.$parent\\\\r\\\\n this._tabs.headers.push(this)\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.tab-content .tab-pane { display: none; }\\\\r\\\\n.tab-content .tab-pane.active { display: block; }\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 172 */\\n/***/ function(module, exports) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t disabled: { type: Boolean, default: false },\\n\\t header: { type: String }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t show: false,\\n\\t tabs: []\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t active: function active() {\\n\\t return ~this.tabs.indexOf(this._tabs.show);\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t blur: function blur() {\\n\\t this.show = false;\\n\\t },\\n\\t toggle: function toggle() {\\n\\t this.show = !this.show;\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._isTabGroup = true;\\n\\t if (this.$parent) {\\n\\t if (this.$parent._isTabGroup) throw Error('Can\\\\'t nest tab-groups.');\\n\\t if (!this.$parent._isTabs) throw Error('tab-group depend on tabs.');\\n\\t }\\n\\t this._tabs = this.$parent;\\n\\t this._tabs.headers.push(this);\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 173 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('span', [_vm._t(\\\"default\\\")], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-55faf3cb\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 174 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(175)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(177)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(178)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Tabs.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-70100ddf\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-70100ddf\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Tabs.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 175 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(176);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-70100ddf!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Tabs.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-70100ddf!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Tabs.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 176 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n[tabs] > .tab-content {\\\\r\\\\n margin: 15px 0;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Tabs.vue?4317b9af\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AA0EA;EACA,eAAA;CACA\\\",\\\"file\\\":\\\"Tabs.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div tabs>\\\\r\\\\n <ul :class=\\\\\\\"navStyleClass\\\\\\\" role=\\\\\\\"tablist\\\\\\\">\\\\r\\\\n <template v-for=\\\\\\\"header in headers\\\\\\\">\\\\r\\\\n <li v-if=\\\\\\\"header._isTab\\\\\\\" :class=\\\\\\\"{active:header.active, disabled:header.disabled}\\\\\\\" @click.prevent=\\\\\\\"select(header)\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"header\\\\\\\"><a href=\\\\\\\"#\\\\\\\" v-html=\\\\\\\"header.header\\\\\\\"></a></slot>\\\\r\\\\n </li>\\\\r\\\\n <dropdown v-if=\\\\\\\"header._isTabGroup\\\\\\\" :text=\\\\\\\"header.header\\\\\\\" :class=\\\\\\\"{active:header.active}\\\\\\\" :disabled=\\\\\\\"header.disabled\\\\\\\">\\\\r\\\\n <li v-for=\\\\\\\"tab in header.tabs\\\\\\\" :class=\\\\\\\"{disabled:tab.disabled}\\\\\\\"><a href=\\\\\\\"#\\\\\\\" @click.prevent=\\\\\\\"select(tab)\\\\\\\">{{tab.header}}</a></li>\\\\r\\\\n </dropdown>\\\\r\\\\n </template>\\\\r\\\\n </ul>\\\\r\\\\n <div class=\\\\\\\"tab-content\\\\\\\"><slot></slot></div>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {coerce} from './utils/utils.js'\\\\r\\\\nimport dropdown from './Dropdown.vue'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n components: {\\\\r\\\\n dropdown\\\\r\\\\n },\\\\r\\\\n props: {\\\\r\\\\n // effect: {type: String, default: 'fadein'},\\\\r\\\\n justified: false,\\\\r\\\\n navStyle: {type: String, default: null},\\\\r\\\\n value: {type: Number, default: 0}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n var index = this.value || 0\\\\r\\\\n return {\\\\r\\\\n index,\\\\r\\\\n headers: [],\\\\r\\\\n tabs: []\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n index (val) {\\\\r\\\\n this.$emit('active', val)\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n this.index = val\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n navStyleClass () {\\\\r\\\\n return [\\\\r\\\\n 'nav',\\\\r\\\\n ~['pills', 'stacked'].indexOf(this.navStyle) ? 'nav-' + this.navStyle : 'nav-tabs',\\\\r\\\\n {\\\\r\\\\n 'nav-justified': coerce.boolean(this.justified),\\\\r\\\\n 'nav-pills': this.navStyle === 'stacked'\\\\r\\\\n }\\\\r\\\\n ]\\\\r\\\\n },\\\\r\\\\n show () { return this.tabs[this.index] || this.tabs[0] }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n select (tab) {\\\\r\\\\n if (!tab.disabled) {\\\\r\\\\n this.index = this.tabs.indexOf(tab)\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this._isTabs = true\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n[tabs] > .tab-content {\\\\r\\\\n margin: 15px 0;\\\\r\\\\n}\\\\r\\\\n</style>\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 177 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tvar _Dropdown = __webpack_require__(105);\\n\\t\\n\\tvar _Dropdown2 = _interopRequireDefault(_Dropdown);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t components: {\\n\\t dropdown: _Dropdown2.default\\n\\t },\\n\\t props: {\\n\\t // effect: {type: String, default: 'fadein'},\\n\\t justified: false,\\n\\t navStyle: { type: String, default: null },\\n\\t value: { type: Number, default: 0 }\\n\\t },\\n\\t data: function data() {\\n\\t var index = this.value || 0;\\n\\t return {\\n\\t index: index,\\n\\t headers: [],\\n\\t tabs: []\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t index: function index(val) {\\n\\t this.$emit('active', val);\\n\\t this.$emit('input', val);\\n\\t },\\n\\t value: function value(val) {\\n\\t this.index = val;\\n\\t }\\n\\t },\\n\\t computed: {\\n\\t navStyleClass: function navStyleClass() {\\n\\t return ['nav', ~['pills', 'stacked'].indexOf(this.navStyle) ? 'nav-' + this.navStyle : 'nav-tabs', {\\n\\t 'nav-justified': _utils.coerce.boolean(this.justified),\\n\\t 'nav-pills': this.navStyle === 'stacked'\\n\\t }];\\n\\t },\\n\\t show: function show() {\\n\\t return this.tabs[this.index] || this.tabs[0];\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t select: function select(tab) {\\n\\t if (!tab.disabled) {\\n\\t this.index = this.tabs.indexOf(tab);\\n\\t }\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this._isTabs = true;\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 178 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t attrs: {\\n\\t \\\"tabs\\\": \\\"\\\"\\n\\t }\\n\\t }, [_vm._c('ul', {\\n\\t class: _vm.navStyleClass,\\n\\t attrs: {\\n\\t \\\"role\\\": \\\"tablist\\\"\\n\\t }\\n\\t }, [_vm._l((_vm.headers), function(header) {\\n\\t return [(header._isTab) ? _vm._c('li', {\\n\\t class: {\\n\\t active: header.active, disabled: header.disabled\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.select(header)\\n\\t }\\n\\t }\\n\\t }, [_vm._t(\\\"header\\\", [_vm._c('a', {\\n\\t attrs: {\\n\\t \\\"href\\\": \\\"#\\\"\\n\\t },\\n\\t domProps: {\\n\\t \\\"innerHTML\\\": _vm._s(header.header)\\n\\t }\\n\\t })])], 2) : _vm._e(), _vm._v(\\\" \\\"), (header._isTabGroup) ? _vm._c('dropdown', {\\n\\t class: {\\n\\t active: header.active\\n\\t },\\n\\t attrs: {\\n\\t \\\"text\\\": header.header,\\n\\t \\\"disabled\\\": header.disabled\\n\\t }\\n\\t }, _vm._l((header.tabs), function(tab) {\\n\\t return _vm._c('li', {\\n\\t class: {\\n\\t disabled: tab.disabled\\n\\t }\\n\\t }, [_vm._c('a', {\\n\\t attrs: {\\n\\t \\\"href\\\": \\\"#\\\"\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.select(tab)\\n\\t }\\n\\t }\\n\\t }, [_vm._v(_vm._s(tab.header))])])\\n\\t })) : _vm._e()]\\n\\t })], 2), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"tab-content\\\"\\n\\t }, [_vm._t(\\\"default\\\")], 2)])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-70100ddf\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 179 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(180)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(181)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\ToggleButton.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-f034a5f2\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-f034a5f2\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] ToggleButton.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 180 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t disabled: { default: null },\\n\\t falseType: { default: null },\\n\\t name: null,\\n\\t readonly: { default: null },\\n\\t trueType: { default: 'primary' },\\n\\t value: false\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t active: _utils.coerce.boolean(this.value),\\n\\t types: {\\n\\t danger: 'btn-danger',\\n\\t info: 'btn-info',\\n\\t primary: 'btn-primary',\\n\\t success: 'btn-success',\\n\\t warning: 'btn-warning'\\n\\t }\\n\\t };\\n\\t },\\n\\t\\n\\t watch: {\\n\\t active: function active(val, old) {\\n\\t if (val !== old) {\\n\\t this.$emit('changed', val);\\n\\t this.$emit(val ? 'enabled' : 'disabled');\\n\\t this.$emit('input', val);\\n\\t }\\n\\t },\\n\\t value: function value(val, old) {\\n\\t if (val !== old) {\\n\\t this.active = _utils.coerce.boolean(this.value);\\n\\t }\\n\\t }\\n\\t },\\n\\t computed: {\\n\\t boolDisabled: function boolDisabled() {\\n\\t return _utils.coerce.boolean(this.disabled);\\n\\t },\\n\\t boolReadonly: function boolReadonly() {\\n\\t return _utils.coerce.boolean(this.readonly);\\n\\t },\\n\\t type: function type() {\\n\\t return this.types[this.value ? this.trueType : this.falseType] || 'btn-default';\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t toggle: function toggle() {\\n\\t if (this.boolDisabled || this.boolReadonly) {\\n\\t return;\\n\\t }\\n\\t this.active = !this.active;\\n\\t }\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 181 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('a', {\\n\\t class: ['btn', _vm.type, {\\n\\t readonly: _vm.boolReadonly\\n\\t }],\\n\\t attrs: {\\n\\t \\\"href\\\": \\\"javascript:void(0)\\\",\\n\\t \\\"disabled\\\": _vm.boolDisabled\\n\\t },\\n\\t on: {\\n\\t \\\"click\\\": _vm.toggle\\n\\t }\\n\\t }, [_vm._c('span', {\\n\\t class: ['glyphicon', 'glyphicon-' + (_vm.value ? 'ok' : 'remove')]\\n\\t }), _vm._v(\\\" \\\"), _vm._t(\\\"default\\\"), _vm._v(\\\" \\\"), (_vm.name) ? _vm._c('input', {\\n\\t attrs: {\\n\\t \\\"type\\\": \\\"hidden\\\",\\n\\t \\\"name\\\": _vm.name\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm.active ? 1 : 0\\n\\t }\\n\\t }) : _vm._e()], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-f034a5f2\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 182 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(183)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(185)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(186)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Tooltip.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-48fb51b2\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-48fb51b2\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Tooltip.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 183 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(184);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-48fb51b2!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Tooltip.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-48fb51b2!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Tooltip.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 184 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.tooltip.top,\\\\r\\\\n.tooltip.left,\\\\r\\\\n.tooltip.right,\\\\r\\\\n.tooltip.bottom {\\\\r\\\\n opacity: .9;\\\\n}\\\\n.fadein-enter {\\\\r\\\\n animation:fadein-in 0.3s ease-in;\\\\n}\\\\n.fadein-leave-active {\\\\r\\\\n animation:fadein-out 0.3s ease-out;\\\\n}\\\\n@keyframes fadein-in {\\\\n0% {\\\\r\\\\n opacity: 0;\\\\n}\\\\n100% {\\\\r\\\\n opacity: .9;\\\\n}\\\\n}\\\\n@keyframes fadein-out {\\\\n0% {\\\\r\\\\n opacity: .9;\\\\n}\\\\n100% {\\\\r\\\\n opacity: 0;\\\\n}\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Tooltip.vue?37d183ec\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AA2BA;;;;EAIA,YAAA;CACA;AACA;EACA,iCAAA;CACA;AACA;EACA,mCAAA;CACA;AACA;AACA;IACA,WAAA;CACA;AACA;IACA,YAAA;CACA;CACA;AACA;AACA;IACA,YAAA;CACA;AACA;IACA,WAAA;CACA;CACA\\\",\\\"file\\\":\\\"Tooltip.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <span ref=\\\\\\\"trigger\\\\\\\">\\\\r\\\\n <slot></slot>\\\\r\\\\n <transition :name=\\\\\\\"effect\\\\\\\">\\\\r\\\\n <div ref=\\\\\\\"popover\\\\\\\" v-if=\\\\\\\"show\\\\\\\" :class=\\\\\\\"['tooltip',placement]\\\\\\\">\\\\r\\\\n <div class=\\\\\\\"tooltip-arrow\\\\\\\"></div>\\\\r\\\\n <div class=\\\\\\\"tooltip-inner\\\\\\\">\\\\r\\\\n <slot name=\\\\\\\"content\\\\\\\"><div v-html=\\\\\\\"content\\\\\\\"></div></slot>\\\\r\\\\n </div>\\\\r\\\\n </div>\\\\r\\\\n </transition>\\\\r\\\\n </span>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport PopoverMixin from './utils/popoverMixins.js'\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n mixins: [PopoverMixin],\\\\r\\\\n props: {\\\\r\\\\n effect: {type: String, default: 'scale'},\\\\r\\\\n trigger: {type: String, default: 'hover'}\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.tooltip.top,\\\\r\\\\n.tooltip.left,\\\\r\\\\n.tooltip.right,\\\\r\\\\n.tooltip.bottom {\\\\r\\\\n opacity: .9;\\\\r\\\\n}\\\\r\\\\n.fadein-enter {\\\\r\\\\n animation:fadein-in 0.3s ease-in;\\\\r\\\\n}\\\\r\\\\n.fadein-leave-active {\\\\r\\\\n animation:fadein-out 0.3s ease-out;\\\\r\\\\n}\\\\r\\\\n@keyframes fadein-in {\\\\r\\\\n 0% {\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n opacity: .9;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n@keyframes fadein-out {\\\\r\\\\n 0% {\\\\r\\\\n opacity: .9;\\\\r\\\\n }\\\\r\\\\n 100% {\\\\r\\\\n opacity: 0;\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</style>\\\\r\\\\n\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 185 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _popoverMixins = __webpack_require__(143);\\n\\t\\n\\tvar _popoverMixins2 = _interopRequireDefault(_popoverMixins);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = {\\n\\t mixins: [_popoverMixins2.default],\\n\\t props: {\\n\\t effect: { type: String, default: 'scale' },\\n\\t trigger: { type: String, default: 'hover' }\\n\\t }\\n\\t}; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\n/***/ },\\n/* 186 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('span', {\\n\\t ref: \\\"trigger\\\"\\n\\t }, [_vm._t(\\\"default\\\"), _vm._v(\\\" \\\"), _vm._c('transition', {\\n\\t attrs: {\\n\\t \\\"name\\\": _vm.effect\\n\\t }\\n\\t }, [(_vm.show) ? _vm._c('div', {\\n\\t ref: \\\"popover\\\",\\n\\t class: ['tooltip', _vm.placement]\\n\\t }, [_vm._c('div', {\\n\\t staticClass: \\\"tooltip-arrow\\\"\\n\\t }), _vm._v(\\\" \\\"), _vm._c('div', {\\n\\t staticClass: \\\"tooltip-inner\\\"\\n\\t }, [_vm._t(\\\"content\\\", [_vm._c('div', {\\n\\t domProps: {\\n\\t \\\"innerHTML\\\": _vm._s(_vm.content)\\n\\t }\\n\\t })])], 2)]) : _vm._e()])], 2)\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-48fb51b2\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ },\\n/* 187 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar __vue_exports__, __vue_options__\\n\\tvar __vue_styles__ = {}\\n\\t\\n\\t/* styles */\\n\\t__webpack_require__(188)\\n\\t\\n\\t/* script */\\n\\t__vue_exports__ = __webpack_require__(190)\\n\\t\\n\\t/* template */\\n\\tvar __vue_template__ = __webpack_require__(206)\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n\\tif (\\n\\t typeof __vue_exports__.default === \\\"object\\\" ||\\n\\t typeof __vue_exports__.default === \\\"function\\\"\\n\\t) {\\n\\tif (Object.keys(__vue_exports__).some(function (key) { return key !== \\\"default\\\" && key !== \\\"__esModule\\\" })) {console.error(\\\"named exports are not supported in *.vue files.\\\")}\\n\\t__vue_options__ = __vue_exports__ = __vue_exports__.default\\n\\t}\\n\\tif (typeof __vue_options__ === \\\"function\\\") {\\n\\t __vue_options__ = __vue_options__.options\\n\\t}\\n\\t__vue_options__.__file = \\\"C:\\\\\\\\laragon\\\\\\\\www\\\\\\\\vue-strap\\\\\\\\src\\\\\\\\Typeahead.vue\\\"\\n\\t__vue_options__.render = __vue_template__.render\\n\\t__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n\\t\\n\\t/* hot reload */\\n\\tif (false) {(function () {\\n\\t var hotAPI = require(\\\"vue-hot-reload-api\\\")\\n\\t hotAPI.install(require(\\\"vue\\\"), false)\\n\\t if (!hotAPI.compatible) return\\n\\t module.hot.accept()\\n\\t if (!module.hot.data) {\\n\\t hotAPI.createRecord(\\\"data-v-5b5f5e94\\\", __vue_options__)\\n\\t } else {\\n\\t hotAPI.reload(\\\"data-v-5b5f5e94\\\", __vue_options__)\\n\\t }\\n\\t})()}\\n\\tif (__vue_options__.functional) {console.error(\\\"[vue-loader] Typeahead.vue: functional components are not supported and should be defined in plain js files using render functions.\\\")}\\n\\t\\n\\tmodule.exports = __vue_exports__\\n\\n\\n/***/ },\\n/* 188 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// style-loader: Adds some css to the DOM by adding a <style> tag\\n\\t\\n\\t// load the styles\\n\\tvar content = __webpack_require__(189);\\n\\tif(typeof content === 'string') content = [[module.id, content, '']];\\n\\t// add the styles to the DOM\\n\\tvar update = __webpack_require__(79)(content, {});\\n\\tif(content.locals) module.exports = content.locals;\\n\\t// Hot Module Replacement\\n\\tif(false) {\\n\\t\\t// When the styles change, update the <style> tags\\n\\t\\tif(!content.locals) {\\n\\t\\t\\tmodule.hot.accept(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5b5f5e94!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Typeahead.vue\\\", function() {\\n\\t\\t\\t\\tvar newContent = require(\\\"!!./../node_modules/css-loader/index.js?sourceMap!./../node_modules/vue-loader/lib/style-rewriter.js?id=data-v-5b5f5e94!./../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./Typeahead.vue\\\");\\n\\t\\t\\t\\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\\n\\t\\t\\t\\tupdate(newContent);\\n\\t\\t\\t});\\n\\t\\t}\\n\\t\\t// When the module is disposed, remove the <style> tags\\n\\t\\tmodule.hot.dispose(function() { update(); });\\n\\t}\\n\\n/***/ },\\n/* 189 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\texports = module.exports = __webpack_require__(78)();\\n\\t// imports\\n\\t\\n\\t\\n\\t// module\\n\\texports.push([module.id, \\\"\\\\n.dropdown-menu > li > a {\\\\r\\\\n cursor: pointer;\\\\n}\\\\r\\\\n\\\", \\\"\\\", {\\\"version\\\":3,\\\"sources\\\":[\\\"/./src/Typeahead.vue?73fcd4be\\\"],\\\"names\\\":[],\\\"mappings\\\":\\\";AAkIA;EACA,gBAAA;CACA\\\",\\\"file\\\":\\\"Typeahead.vue\\\",\\\"sourcesContent\\\":[\\\"<template>\\\\r\\\\n <div style=\\\\\\\"position: relative\\\\\\\" :class=\\\\\\\"{open:showDropdown}\\\\\\\">\\\\r\\\\n <input class=\\\\\\\"form-control\\\\\\\" autocomplete=\\\\\\\"off\\\\\\\"\\\\r\\\\n v-model=\\\\\\\"val\\\\\\\"\\\\r\\\\n :placeholder=\\\\\\\"placeholder\\\\\\\"\\\\r\\\\n :type.once=\\\\\\\"type\\\\\\\"\\\\r\\\\n @blur=\\\\\\\"showDropdown = false\\\\\\\"\\\\r\\\\n @keydown.down.prevent=\\\\\\\"down\\\\\\\"\\\\r\\\\n @keydown.enter=\\\\\\\"hit\\\\\\\"\\\\r\\\\n @keydown.esc=\\\\\\\"reset\\\\\\\"\\\\r\\\\n @keydown.up.prevent=\\\\\\\"up\\\\\\\"\\\\r\\\\n />\\\\r\\\\n <ul class=\\\\\\\"dropdown-menu\\\\\\\" ref=\\\\\\\"dropdown\\\\\\\">\\\\r\\\\n <li v-for=\\\\\\\"(item, i) in items\\\\\\\" :class=\\\\\\\"{active: isActive(i)}\\\\\\\">\\\\r\\\\n <a @mousedown.prevent=\\\\\\\"hit\\\\\\\" @mousemove=\\\\\\\"setActive(i)\\\\\\\">\\\\r\\\\n <component :is=\\\\\\\"templateComp\\\\\\\" :item=\\\\\\\"item\\\\\\\"></component>\\\\r\\\\n </a>\\\\r\\\\n </li>\\\\r\\\\n </ul>\\\\r\\\\n </div>\\\\r\\\\n</template>\\\\r\\\\n\\\\r\\\\n<script>\\\\r\\\\nimport {delayer, getJSON} from './utils/utils.js'\\\\r\\\\nvar DELAY = 300\\\\r\\\\n\\\\r\\\\nexport default {\\\\r\\\\n props: {\\\\r\\\\n async: {type: String},\\\\r\\\\n data: {type: Array},\\\\r\\\\n delay: {type: Number, default: DELAY},\\\\r\\\\n asyncKey: {type: String, default: null},\\\\r\\\\n limit: {type: Number, default: 8},\\\\r\\\\n matchCase: {type: Boolean, default: false},\\\\r\\\\n matchStart: {type: Boolean, default: false},\\\\r\\\\n onHit: {\\\\r\\\\n type: Function,\\\\r\\\\n default (item) { return item }\\\\r\\\\n },\\\\r\\\\n placeholder: {type: String},\\\\r\\\\n template: {type: String},\\\\r\\\\n type: {type: String, default: 'text'},\\\\r\\\\n value: {type: String, default: ''}\\\\r\\\\n },\\\\r\\\\n data () {\\\\r\\\\n return {\\\\r\\\\n asign: '',\\\\r\\\\n showDropdown: false,\\\\r\\\\n noResults: true,\\\\r\\\\n current: 0,\\\\r\\\\n items: [],\\\\r\\\\n val: this.value\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n computed: {\\\\r\\\\n templateComp () {\\\\r\\\\n return {\\\\r\\\\n template: typeof this.template === 'string' ? '<span>' + this.template + '</span>' : '<strong v-html=\\\\\\\"item\\\\\\\"></strong>',\\\\r\\\\n props: { item: {default: null} }\\\\r\\\\n }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n watch: {\\\\r\\\\n val (val, old) {\\\\r\\\\n this.$emit('input', val)\\\\r\\\\n if (val !== old && val !== this.asign) this.__update()\\\\r\\\\n },\\\\r\\\\n value (val) {\\\\r\\\\n if (this.val !== val) { this.val = val }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n methods: {\\\\r\\\\n setItems (data) {\\\\r\\\\n if (this.async) {\\\\r\\\\n this.items = this.asyncKey ? data[this.asyncKey] : data\\\\r\\\\n this.items = this.items.slice(0, this.limit)\\\\r\\\\n } else {\\\\r\\\\n this.items = (data || []).filter(value => {\\\\r\\\\n if (typeof value === 'object') { return true }\\\\r\\\\n value = this.matchCase ? value : value.toLowerCase()\\\\r\\\\n var query = this.matchCase ? this.val : this.val.toLowerCase()\\\\r\\\\n return this.matchStart ? value.indexOf(query) === 0 : value.indexOf(query) !== -1\\\\r\\\\n }).slice(0, this.limit)\\\\r\\\\n }\\\\r\\\\n this.showDropdown = this.items.length > 0\\\\r\\\\n },\\\\r\\\\n setValue (value) {\\\\r\\\\n this.asign = value\\\\r\\\\n this.val = value\\\\r\\\\n this.items = []\\\\r\\\\n this.loading = false\\\\r\\\\n this.showDropdown = false\\\\r\\\\n },\\\\r\\\\n reset () { this.setValue(null) },\\\\r\\\\n setActive (index) { this.current = index },\\\\r\\\\n isActive (index) { return this.current === index },\\\\r\\\\n hit (e) {\\\\r\\\\n e.preventDefault()\\\\r\\\\n this.setValue(this.onHit(this.items[this.current], this))\\\\r\\\\n },\\\\r\\\\n up () {\\\\r\\\\n if (this.current > 0) { this.current-- }\\\\r\\\\n else { this.current = this.items.length - 1 }\\\\r\\\\n },\\\\r\\\\n down () {\\\\r\\\\n if (this.current < this.items.length - 1) { this.current++ }\\\\r\\\\n else { this.current = 0 }\\\\r\\\\n }\\\\r\\\\n },\\\\r\\\\n created () {\\\\r\\\\n this.__update = delayer(function () {\\\\r\\\\n if (!this.val) {\\\\r\\\\n this.reset()\\\\r\\\\n return\\\\r\\\\n }\\\\r\\\\n this.asign = ''\\\\r\\\\n if (this.async) {\\\\r\\\\n getJSON(this.async + this.val).then(data => {\\\\r\\\\n this.setItems(data)\\\\r\\\\n })\\\\r\\\\n } else if (this.data) {\\\\r\\\\n this.setItems(this.data)\\\\r\\\\n }\\\\r\\\\n }, 'delay', DELAY)\\\\r\\\\n this.__update()\\\\r\\\\n }\\\\r\\\\n}\\\\r\\\\n</script>\\\\r\\\\n\\\\r\\\\n<style>\\\\r\\\\n.dropdown-menu > li > a {\\\\r\\\\n cursor: pointer;\\\\r\\\\n}\\\\r\\\\n</style>\\\"],\\\"sourceRoot\\\":\\\"webpack://\\\"}]);\\n\\t\\n\\t// exports\\n\\n\\n/***/ },\\n/* 190 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t\\n\\tObject.defineProperty(exports, \\\"__esModule\\\", {\\n\\t value: true\\n\\t});\\n\\t\\n\\tvar _typeof2 = __webpack_require__(191);\\n\\t\\n\\tvar _typeof3 = _interopRequireDefault(_typeof2);\\n\\t\\n\\tvar _utils = __webpack_require__(65);\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\tvar DELAY = 300; //\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t//\\n\\t\\n\\texports.default = {\\n\\t props: {\\n\\t async: { type: String },\\n\\t data: { type: Array },\\n\\t delay: { type: Number, default: DELAY },\\n\\t asyncKey: { type: String, default: null },\\n\\t limit: { type: Number, default: 8 },\\n\\t matchCase: { type: Boolean, default: false },\\n\\t matchStart: { type: Boolean, default: false },\\n\\t onHit: {\\n\\t type: Function,\\n\\t default: function _default(item) {\\n\\t return item;\\n\\t }\\n\\t },\\n\\t placeholder: { type: String },\\n\\t template: { type: String },\\n\\t type: { type: String, default: 'text' },\\n\\t value: { type: String, default: '' }\\n\\t },\\n\\t data: function data() {\\n\\t return {\\n\\t asign: '',\\n\\t showDropdown: false,\\n\\t noResults: true,\\n\\t current: 0,\\n\\t items: [],\\n\\t val: this.value\\n\\t };\\n\\t },\\n\\t\\n\\t computed: {\\n\\t templateComp: function templateComp() {\\n\\t return {\\n\\t template: typeof this.template === 'string' ? '<span>' + this.template + '</span>' : '<strong v-html=\\\"item\\\"></strong>',\\n\\t props: { item: { default: null } }\\n\\t };\\n\\t }\\n\\t },\\n\\t watch: {\\n\\t val: function val(_val, old) {\\n\\t this.$emit('input', _val);\\n\\t if (_val !== old && _val !== this.asign) this.__update();\\n\\t },\\n\\t value: function value(val) {\\n\\t if (this.val !== val) {\\n\\t this.val = val;\\n\\t }\\n\\t }\\n\\t },\\n\\t methods: {\\n\\t setItems: function setItems(data) {\\n\\t var _this = this;\\n\\t\\n\\t if (this.async) {\\n\\t this.items = this.asyncKey ? data[this.asyncKey] : data;\\n\\t this.items = this.items.slice(0, this.limit);\\n\\t } else {\\n\\t this.items = (data || []).filter(function (value) {\\n\\t if ((typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) === 'object') {\\n\\t return true;\\n\\t }\\n\\t value = _this.matchCase ? value : value.toLowerCase();\\n\\t var query = _this.matchCase ? _this.val : _this.val.toLowerCase();\\n\\t return _this.matchStart ? value.indexOf(query) === 0 : value.indexOf(query) !== -1;\\n\\t }).slice(0, this.limit);\\n\\t }\\n\\t this.showDropdown = this.items.length > 0;\\n\\t },\\n\\t setValue: function setValue(value) {\\n\\t this.asign = value;\\n\\t this.val = value;\\n\\t this.items = [];\\n\\t this.loading = false;\\n\\t this.showDropdown = false;\\n\\t },\\n\\t reset: function reset() {\\n\\t this.setValue(null);\\n\\t },\\n\\t setActive: function setActive(index) {\\n\\t this.current = index;\\n\\t },\\n\\t isActive: function isActive(index) {\\n\\t return this.current === index;\\n\\t },\\n\\t hit: function hit(e) {\\n\\t e.preventDefault();\\n\\t this.setValue(this.onHit(this.items[this.current], this));\\n\\t },\\n\\t up: function up() {\\n\\t if (this.current > 0) {\\n\\t this.current--;\\n\\t } else {\\n\\t this.current = this.items.length - 1;\\n\\t }\\n\\t },\\n\\t down: function down() {\\n\\t if (this.current < this.items.length - 1) {\\n\\t this.current++;\\n\\t } else {\\n\\t this.current = 0;\\n\\t }\\n\\t }\\n\\t },\\n\\t created: function created() {\\n\\t this.__update = (0, _utils.delayer)(function () {\\n\\t var _this2 = this;\\n\\t\\n\\t if (!this.val) {\\n\\t this.reset();\\n\\t return;\\n\\t }\\n\\t this.asign = '';\\n\\t if (this.async) {\\n\\t (0, _utils.getJSON)(this.async + this.val).then(function (data) {\\n\\t _this2.setItems(data);\\n\\t });\\n\\t } else if (this.data) {\\n\\t this.setItems(this.data);\\n\\t }\\n\\t }, 'delay', DELAY);\\n\\t this.__update();\\n\\t }\\n\\t};\\n\\n/***/ },\\n/* 191 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t\\\"use strict\\\";\\n\\t\\n\\texports.__esModule = true;\\n\\t\\n\\tvar _iterator = __webpack_require__(20);\\n\\t\\n\\tvar _iterator2 = _interopRequireDefault(_iterator);\\n\\t\\n\\tvar _symbol = __webpack_require__(192);\\n\\t\\n\\tvar _symbol2 = _interopRequireDefault(_symbol);\\n\\t\\n\\tvar _typeof = typeof _symbol2.default === \\\"function\\\" && typeof _iterator2.default === \\\"symbol\\\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \\\"function\\\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \\\"symbol\\\" : typeof obj; };\\n\\t\\n\\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\t\\n\\texports.default = typeof _symbol2.default === \\\"function\\\" && _typeof(_iterator2.default) === \\\"symbol\\\" ? function (obj) {\\n\\t return typeof obj === \\\"undefined\\\" ? \\\"undefined\\\" : _typeof(obj);\\n\\t} : function (obj) {\\n\\t return obj && typeof _symbol2.default === \\\"function\\\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \\\"symbol\\\" : typeof obj === \\\"undefined\\\" ? \\\"undefined\\\" : _typeof(obj);\\n\\t};\\n\\n/***/ },\\n/* 192 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports = { \\\"default\\\": __webpack_require__(193), __esModule: true };\\n\\n/***/ },\\n/* 193 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(194);\\n\\t__webpack_require__(203);\\n\\t__webpack_require__(204);\\n\\t__webpack_require__(205);\\n\\tmodule.exports = __webpack_require__(7).Symbol;\\n\\n/***/ },\\n/* 194 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t'use strict';\\n\\t// ECMAScript 6 symbols shim\\n\\tvar global = __webpack_require__(6)\\n\\t , has = __webpack_require__(29)\\n\\t , DESCRIPTORS = __webpack_require__(15)\\n\\t , $export = __webpack_require__(5)\\n\\t , redefine = __webpack_require__(28)\\n\\t , META = __webpack_require__(195).KEY\\n\\t , $fails = __webpack_require__(16)\\n\\t , shared = __webpack_require__(43)\\n\\t , setToStringTag = __webpack_require__(47)\\n\\t , uid = __webpack_require__(44)\\n\\t , wks = __webpack_require__(48)\\n\\t , wksExt = __webpack_require__(55)\\n\\t , wksDefine = __webpack_require__(196)\\n\\t , keyOf = __webpack_require__(197)\\n\\t , enumKeys = __webpack_require__(198)\\n\\t , isArray = __webpack_require__(201)\\n\\t , anObject = __webpack_require__(12)\\n\\t , toIObject = __webpack_require__(36)\\n\\t , toPrimitive = __webpack_require__(18)\\n\\t , createDesc = __webpack_require__(19)\\n\\t , _create = __webpack_require__(32)\\n\\t , gOPNExt = __webpack_require__(60)\\n\\t , $GOPD = __webpack_require__(202)\\n\\t , $DP = __webpack_require__(11)\\n\\t , $keys = __webpack_require__(34)\\n\\t , gOPD = $GOPD.f\\n\\t , dP = $DP.f\\n\\t , gOPN = gOPNExt.f\\n\\t , $Symbol = global.Symbol\\n\\t , $JSON = global.JSON\\n\\t , _stringify = $JSON && $JSON.stringify\\n\\t , PROTOTYPE = 'prototype'\\n\\t , HIDDEN = wks('_hidden')\\n\\t , TO_PRIMITIVE = wks('toPrimitive')\\n\\t , isEnum = {}.propertyIsEnumerable\\n\\t , SymbolRegistry = shared('symbol-registry')\\n\\t , AllSymbols = shared('symbols')\\n\\t , OPSymbols = shared('op-symbols')\\n\\t , ObjectProto = Object[PROTOTYPE]\\n\\t , USE_NATIVE = typeof $Symbol == 'function'\\n\\t , QObject = global.QObject;\\n\\t// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\\n\\tvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\\n\\t\\n\\t// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\\n\\tvar setSymbolDesc = DESCRIPTORS && $fails(function(){\\n\\t return _create(dP({}, 'a', {\\n\\t get: function(){ return dP(this, 'a', {value: 7}).a; }\\n\\t })).a != 7;\\n\\t}) ? function(it, key, D){\\n\\t var protoDesc = gOPD(ObjectProto, key);\\n\\t if(protoDesc)delete ObjectProto[key];\\n\\t dP(it, key, D);\\n\\t if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);\\n\\t} : dP;\\n\\t\\n\\tvar wrap = function(tag){\\n\\t var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\\n\\t sym._k = tag;\\n\\t return sym;\\n\\t};\\n\\t\\n\\tvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){\\n\\t return typeof it == 'symbol';\\n\\t} : function(it){\\n\\t return it instanceof $Symbol;\\n\\t};\\n\\t\\n\\tvar $defineProperty = function defineProperty(it, key, D){\\n\\t if(it === ObjectProto)$defineProperty(OPSymbols, key, D);\\n\\t anObject(it);\\n\\t key = toPrimitive(key, true);\\n\\t anObject(D);\\n\\t if(has(AllSymbols, key)){\\n\\t if(!D.enumerable){\\n\\t if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));\\n\\t it[HIDDEN][key] = true;\\n\\t } else {\\n\\t if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\\n\\t D = _create(D, {enumerable: createDesc(0, false)});\\n\\t } return setSymbolDesc(it, key, D);\\n\\t } return dP(it, key, D);\\n\\t};\\n\\tvar $defineProperties = function defineProperties(it, P){\\n\\t anObject(it);\\n\\t var keys = enumKeys(P = toIObject(P))\\n\\t , i = 0\\n\\t , l = keys.length\\n\\t , key;\\n\\t while(l > i)$defineProperty(it, key = keys[i++], P[key]);\\n\\t return it;\\n\\t};\\n\\tvar $create = function create(it, P){\\n\\t return P === undefined ? _create(it) : $defineProperties(_create(it), P);\\n\\t};\\n\\tvar $propertyIsEnumerable = function propertyIsEnumerable(key){\\n\\t var E = isEnum.call(this, key = toPrimitive(key, true));\\n\\t if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false;\\n\\t return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\\n\\t};\\n\\tvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\\n\\t it = toIObject(it);\\n\\t key = toPrimitive(key, true);\\n\\t if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return;\\n\\t var D = gOPD(it, key);\\n\\t if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\\n\\t return D;\\n\\t};\\n\\tvar $getOwnPropertyNames = function getOwnPropertyNames(it){\\n\\t var names = gOPN(toIObject(it))\\n\\t , result = []\\n\\t , i = 0\\n\\t , key;\\n\\t while(names.length > i){\\n\\t if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);\\n\\t } return result;\\n\\t};\\n\\tvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\\n\\t var IS_OP = it === ObjectProto\\n\\t , names = gOPN(IS_OP ? OPSymbols : toIObject(it))\\n\\t , result = []\\n\\t , i = 0\\n\\t , key;\\n\\t while(names.length > i){\\n\\t if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]);\\n\\t } return result;\\n\\t};\\n\\t\\n\\t// 19.4.1.1 Symbol([description])\\n\\tif(!USE_NATIVE){\\n\\t $Symbol = function Symbol(){\\n\\t if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');\\n\\t var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\\n\\t var $set = function(value){\\n\\t if(this === ObjectProto)$set.call(OPSymbols, value);\\n\\t if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\\n\\t setSymbolDesc(this, tag, createDesc(1, value));\\n\\t };\\n\\t if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set});\\n\\t return wrap(tag);\\n\\t };\\n\\t redefine($Symbol[PROTOTYPE], 'toString', function toString(){\\n\\t return this._k;\\n\\t });\\n\\t\\n\\t $GOPD.f = $getOwnPropertyDescriptor;\\n\\t $DP.f = $defineProperty;\\n\\t __webpack_require__(61).f = gOPNExt.f = $getOwnPropertyNames;\\n\\t __webpack_require__(200).f = $propertyIsEnumerable;\\n\\t __webpack_require__(199).f = $getOwnPropertySymbols;\\n\\t\\n\\t if(DESCRIPTORS && !__webpack_require__(27)){\\n\\t redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\\n\\t }\\n\\t\\n\\t wksExt.f = function(name){\\n\\t return wrap(wks(name));\\n\\t }\\n\\t}\\n\\t\\n\\t$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});\\n\\t\\n\\tfor(var symbols = (\\n\\t // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\\n\\t 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\\n\\t).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);\\n\\t\\n\\tfor(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);\\n\\t\\n\\t$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\\n\\t // 19.4.2.1 Symbol.for(key)\\n\\t 'for': function(key){\\n\\t return has(SymbolRegistry, key += '')\\n\\t ? SymbolRegistry[key]\\n\\t : SymbolRegistry[key] = $Symbol(key);\\n\\t },\\n\\t // 19.4.2.5 Symbol.keyFor(sym)\\n\\t keyFor: function keyFor(key){\\n\\t if(isSymbol(key))return keyOf(SymbolRegistry, key);\\n\\t throw TypeError(key + ' is not a symbol!');\\n\\t },\\n\\t useSetter: function(){ setter = true; },\\n\\t useSimple: function(){ setter = false; }\\n\\t});\\n\\t\\n\\t$export($export.S + $export.F * !USE_NATIVE, 'Object', {\\n\\t // 19.1.2.2 Object.create(O [, Properties])\\n\\t create: $create,\\n\\t // 19.1.2.4 Object.defineProperty(O, P, Attributes)\\n\\t defineProperty: $defineProperty,\\n\\t // 19.1.2.3 Object.defineProperties(O, Properties)\\n\\t defineProperties: $defineProperties,\\n\\t // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\\n\\t getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\\n\\t // 19.1.2.7 Object.getOwnPropertyNames(O)\\n\\t getOwnPropertyNames: $getOwnPropertyNames,\\n\\t // 19.1.2.8 Object.getOwnPropertySymbols(O)\\n\\t getOwnPropertySymbols: $getOwnPropertySymbols\\n\\t});\\n\\t\\n\\t// 24.3.2 JSON.stringify(value [, replacer [, space]])\\n\\t$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){\\n\\t var S = $Symbol();\\n\\t // MS Edge converts symbol values to JSON as {}\\n\\t // WebKit converts symbol values to JSON as null\\n\\t // V8 throws on boxed symbols\\n\\t return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\\n\\t})), 'JSON', {\\n\\t stringify: function stringify(it){\\n\\t if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\\n\\t var args = [it]\\n\\t , i = 1\\n\\t , replacer, $replacer;\\n\\t while(arguments.length > i)args.push(arguments[i++]);\\n\\t replacer = args[1];\\n\\t if(typeof replacer == 'function')$replacer = replacer;\\n\\t if($replacer || !isArray(replacer))replacer = function(key, value){\\n\\t if($replacer)value = $replacer.call(this, key, value);\\n\\t if(!isSymbol(value))return value;\\n\\t };\\n\\t args[1] = replacer;\\n\\t return _stringify.apply($JSON, args);\\n\\t }\\n\\t});\\n\\t\\n\\t// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\\n\\t$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\\n\\t// 19.4.3.5 Symbol.prototype[@@toStringTag]\\n\\tsetToStringTag($Symbol, 'Symbol');\\n\\t// 20.2.1.9 Math[@@toStringTag]\\n\\tsetToStringTag(Math, 'Math', true);\\n\\t// 24.3.3 JSON[@@toStringTag]\\n\\tsetToStringTag(global.JSON, 'JSON', true);\\n\\n/***/ },\\n/* 195 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar META = __webpack_require__(44)('meta')\\n\\t , isObject = __webpack_require__(13)\\n\\t , has = __webpack_require__(29)\\n\\t , setDesc = __webpack_require__(11).f\\n\\t , id = 0;\\n\\tvar isExtensible = Object.isExtensible || function(){\\n\\t return true;\\n\\t};\\n\\tvar FREEZE = !__webpack_require__(16)(function(){\\n\\t return isExtensible(Object.preventExtensions({}));\\n\\t});\\n\\tvar setMeta = function(it){\\n\\t setDesc(it, META, {value: {\\n\\t i: 'O' + ++id, // object ID\\n\\t w: {} // weak collections IDs\\n\\t }});\\n\\t};\\n\\tvar fastKey = function(it, create){\\n\\t // return primitive with prefix\\n\\t if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\\n\\t if(!has(it, META)){\\n\\t // can't set metadata to uncaught frozen object\\n\\t if(!isExtensible(it))return 'F';\\n\\t // not necessary to add metadata\\n\\t if(!create)return 'E';\\n\\t // add missing metadata\\n\\t setMeta(it);\\n\\t // return object ID\\n\\t } return it[META].i;\\n\\t};\\n\\tvar getWeak = function(it, create){\\n\\t if(!has(it, META)){\\n\\t // can't set metadata to uncaught frozen object\\n\\t if(!isExtensible(it))return true;\\n\\t // not necessary to add metadata\\n\\t if(!create)return false;\\n\\t // add missing metadata\\n\\t setMeta(it);\\n\\t // return hash weak collections IDs\\n\\t } return it[META].w;\\n\\t};\\n\\t// add metadata on freeze-family methods calling\\n\\tvar onFreeze = function(it){\\n\\t if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);\\n\\t return it;\\n\\t};\\n\\tvar meta = module.exports = {\\n\\t KEY: META,\\n\\t NEED: false,\\n\\t fastKey: fastKey,\\n\\t getWeak: getWeak,\\n\\t onFreeze: onFreeze\\n\\t};\\n\\n/***/ },\\n/* 196 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar global = __webpack_require__(6)\\n\\t , core = __webpack_require__(7)\\n\\t , LIBRARY = __webpack_require__(27)\\n\\t , wksExt = __webpack_require__(55)\\n\\t , defineProperty = __webpack_require__(11).f;\\n\\tmodule.exports = function(name){\\n\\t var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\\n\\t if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});\\n\\t};\\n\\n/***/ },\\n/* 197 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar getKeys = __webpack_require__(34)\\n\\t , toIObject = __webpack_require__(36);\\n\\tmodule.exports = function(object, el){\\n\\t var O = toIObject(object)\\n\\t , keys = getKeys(O)\\n\\t , length = keys.length\\n\\t , index = 0\\n\\t , key;\\n\\t while(length > index)if(O[key = keys[index++]] === el)return key;\\n\\t};\\n\\n/***/ },\\n/* 198 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// all enumerable object keys, includes symbols\\n\\tvar getKeys = __webpack_require__(34)\\n\\t , gOPS = __webpack_require__(199)\\n\\t , pIE = __webpack_require__(200);\\n\\tmodule.exports = function(it){\\n\\t var result = getKeys(it)\\n\\t , getSymbols = gOPS.f;\\n\\t if(getSymbols){\\n\\t var symbols = getSymbols(it)\\n\\t , isEnum = pIE.f\\n\\t , i = 0\\n\\t , key;\\n\\t while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);\\n\\t } return result;\\n\\t};\\n\\n/***/ },\\n/* 199 */\\n/***/ function(module, exports) {\\n\\n\\texports.f = Object.getOwnPropertySymbols;\\n\\n/***/ },\\n/* 200 */\\n/***/ function(module, exports) {\\n\\n\\texports.f = {}.propertyIsEnumerable;\\n\\n/***/ },\\n/* 201 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t// 7.2.2 IsArray(argument)\\n\\tvar cof = __webpack_require__(38);\\n\\tmodule.exports = Array.isArray || function isArray(arg){\\n\\t return cof(arg) == 'Array';\\n\\t};\\n\\n/***/ },\\n/* 202 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tvar pIE = __webpack_require__(200)\\n\\t , createDesc = __webpack_require__(19)\\n\\t , toIObject = __webpack_require__(36)\\n\\t , toPrimitive = __webpack_require__(18)\\n\\t , has = __webpack_require__(29)\\n\\t , IE8_DOM_DEFINE = __webpack_require__(14)\\n\\t , gOPD = Object.getOwnPropertyDescriptor;\\n\\t\\n\\texports.f = __webpack_require__(15) ? gOPD : function getOwnPropertyDescriptor(O, P){\\n\\t O = toIObject(O);\\n\\t P = toPrimitive(P, true);\\n\\t if(IE8_DOM_DEFINE)try {\\n\\t return gOPD(O, P);\\n\\t } catch(e){ /* empty */ }\\n\\t if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);\\n\\t};\\n\\n/***/ },\\n/* 203 */\\n/***/ function(module, exports) {\\n\\n\\n\\n/***/ },\\n/* 204 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(196)('asyncIterator');\\n\\n/***/ },\\n/* 205 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\t__webpack_require__(196)('observable');\\n\\n/***/ },\\n/* 206 */\\n/***/ function(module, exports, __webpack_require__) {\\n\\n\\tmodule.exports={render:function (){var _vm=this;var _h=_vm.$createElement;\\n\\t return _vm._c('div', {\\n\\t class: {\\n\\t open: _vm.showDropdown\\n\\t },\\n\\t staticStyle: {\\n\\t \\\"position\\\": \\\"relative\\\"\\n\\t }\\n\\t }, [_vm._c('input', {\\n\\t directives: [{\\n\\t name: \\\"model\\\",\\n\\t rawName: \\\"v-model\\\",\\n\\t value: (_vm.val),\\n\\t expression: \\\"val\\\"\\n\\t }],\\n\\t staticClass: \\\"form-control\\\",\\n\\t attrs: {\\n\\t \\\"autocomplete\\\": \\\"off\\\",\\n\\t \\\"placeholder\\\": _vm.placeholder,\\n\\t \\\"type\\\": _vm.type\\n\\t },\\n\\t domProps: {\\n\\t \\\"value\\\": _vm._s(_vm.val)\\n\\t },\\n\\t on: {\\n\\t \\\"blur\\\": function($event) {\\n\\t _vm.showDropdown = false\\n\\t },\\n\\t \\\"keydown\\\": [function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"down\\\", 40)) { return; }\\n\\t $event.preventDefault();\\n\\t _vm.down($event)\\n\\t }, function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"enter\\\", 13)) { return; }\\n\\t _vm.hit($event)\\n\\t }, function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"esc\\\", 27)) { return; }\\n\\t _vm.reset($event)\\n\\t }, function($event) {\\n\\t if (_vm._k($event.keyCode, \\\"up\\\", 38)) { return; }\\n\\t $event.preventDefault();\\n\\t _vm.up($event)\\n\\t }],\\n\\t \\\"input\\\": function($event) {\\n\\t if ($event.target.composing) { return; }\\n\\t _vm.val = $event.target.value\\n\\t }\\n\\t }\\n\\t }), _vm._v(\\\" \\\"), _vm._c('ul', {\\n\\t ref: \\\"dropdown\\\",\\n\\t staticClass: \\\"dropdown-menu\\\"\\n\\t }, _vm._l((_vm.items), function(item, i) {\\n\\t return _vm._c('li', {\\n\\t class: {\\n\\t active: _vm.isActive(i)\\n\\t }\\n\\t }, [_vm._c('a', {\\n\\t on: {\\n\\t \\\"mousedown\\\": function($event) {\\n\\t $event.preventDefault();\\n\\t _vm.hit($event)\\n\\t },\\n\\t \\\"mousemove\\\": function($event) {\\n\\t _vm.setActive(i)\\n\\t }\\n\\t }\\n\\t }, [_vm._c(_vm.templateComp, {\\n\\t tag: \\\"component\\\",\\n\\t attrs: {\\n\\t \\\"item\\\": item\\n\\t }\\n\\t })], 1)])\\n\\t }))])\\n\\t},staticRenderFns: []}\\n\\tif (false) {\\n\\t module.hot.accept()\\n\\t if (module.hot.data) {\\n\\t require(\\\"vue-hot-reload-api\\\").rerender(\\\"data-v-5b5f5e94\\\", module.exports)\\n\\t }\\n\\t}\\n\\n/***/ }\\n/******/ ])\\n});\\n;\\n//# sourceMappingURL=vue-strap.js.map//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L3Z1ZS1zdHJhcC9kaXN0L3Z1ZS1zdHJhcC5qcz9lMTQ3Il0sInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiB3ZWJwYWNrVW5pdmVyc2FsTW9kdWxlRGVmaW5pdGlvbihyb290LCBmYWN0b3J5KSB7XG5cdGlmKHR5cGVvZiBleHBvcnRzID09PSAnb2JqZWN0JyAmJiB0eXBlb2YgbW9kdWxlID09PSAnb2JqZWN0Jylcblx0XHRtb2R1bGUuZXhwb3J0cyA9IGZhY3RvcnkoKTtcblx0ZWxzZSBpZih0eXBlb2YgZGVmaW5lID09PSAnZnVuY3Rpb24nICYmIGRlZmluZS5hbWQpXG5cdFx0ZGVmaW5lKFtdLCBmYWN0b3J5KTtcblx0ZWxzZSBpZih0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcpXG5cdFx0ZXhwb3J0c1tcIlZ1ZVN0cmFwXCJdID0gZmFjdG9yeSgpO1xuXHRlbHNlXG5cdFx0cm9vd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hpcy5lYWNoKGZ1bmN0aW9uIChlbCkge1xuXHQgICAgICAgIHJldHVybiBjbGFzc2VzLmZvckVhY2goZnVuY3Rpb24gKGMpIHtcblx0ICAgICAgICAgIHJldHVybiBlbC5jbGFzc0xpc3RbbWV0aG9kXShjKTtcblx0ICAgICAgICB9KTtcblx0ICAgICAgfSk7XG5cdCAgICB9XG5cdCAgfSwge1xuXHQgICAga2V5OiAnZ2V0Jyxcblx0ICAgIHZhbHVlOiBmdW5jdGlvbiBnZXQocHJvcCkge1xuXHQgICAgICB2YXIgYXJyID0gW107XG5cdCAgICAgIHRoaXMuZWFjaChmdW5jdGlvbiAoZWwpIHtcblx0ICAgICAgICBpZiAoZWwgIT09IG51bGwpIHtcblx0ICAgICAgICAgIGVsID0gZWxbcHJvcF07XG5cdCAgICAgICAgfVxuXHQgICAgICAgIGFyci5wdXNoKGVsKTtcblx0ICAgICAgfSk7XG5cdCAgICAgIHJldHVybiBmbGF0dGVuKGFyciwgdGhpcyk7XG5cdCAgICB9XG5cdCAgfSwge1xuXHQgICAga2V5OiAnc2V0Jyxcblx0ICAgIHZhbHVlOiBmdW5jdGlvbiBzZXQocHJvcCwgdmFsdWUpIHtcblx0ICAgICAgaWYgKHByb3AuY29uc3RydWN0b3IgPT09IE9iamVjdCkge1xuXHQgICAgICAgIHRoaXMuZWFjaChmdW5jdGlvbiAoZWwpIHtcblx0ICAgICAgICAgIGlmIChlbCkge1xuXHQgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gcHJvcCkge1xuXHQgICAgICAgICAgICAgIGlmIChrZXkgaW4gZWwpIHtcblx0ICAgICAgICAgICAgICAgIGVsW2tleV0gPSBwcm9wW2tleV07XG5cdCAgICAgICAgICAgICAgfVxuXHQgICAgICAgICAgICB9XG5cdCAgICAgICAgICB9XG5cdCAgICAgICAgfSk7XG5cdCAgICAgIH0gZWxzZSB7XG5cdCAgICAgICAgdGhpcy5lYWNoKGZ1bmN0aW9uIChlbCkge1xuXHQgICAgICAg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ytpIDwgbCk7XG5cdFxuXHQgICAgICAgIGlmICh1cGRhdGVkKSB7XG5cdCAgICAgICAgICB0aGlzLl91cGRhdGVDbGFzc05hbWUoKTtcblx0ICAgICAgICB9XG5cdCAgICAgIH07XG5cdCAgICAgIGNsYXNzTGlzdFByb3RvLnJlbW92ZSA9IGZ1bmN0aW9uICgpIHtcblx0ICAgICAgICB2YXIgdG9rZW5zID0gYXJndW1lbnRzLFxuXHQgICAgICAgICAgICBpID0gMCxcblx0ICAgICAgICAgICAgbCA9IHRva2Vucy5sZW5ndGgsXG5cdCAgICAgICAgICAgIHRva2VuLFxuXHQgICAgICAgICAgICB1cGRhdGVkID0gZmFsc2UsXG5cdCAgICAgICAgICAgIGluZGV4O1xuXHQgICAgICAgIGRvIHtcblx0ICAgICAgICAgIHRva2VuID0gdG9rZW5zW2ldICsgXCJcIjtcblx0ICAgICAgICAgIGluZGV4ID0gY2hlY2tUb2tlbkFuZEdldEluZGV4KHRoaXMsIHRva2VuKTtcblx0ICAgICAgICAgIHdoaWxlIChpbmRleCAhPT0gLTEpIHtcblx0ICAgICAgICAgICAgdGhpcy5zcGxpY2UoaW5kZXgsIDEpO1xuXHQgICAgICAgICAgICB1cGRhdGVkID0gdHJ1ZTtcblx0ICAgICAgICAgICAgaW5kZXggPSBjaGVja1Rva2VuQW5kR2V0SW5kZXgodGhpcywgdG9rZW4pO1xuXHQgICAgICAgICAgfVxuXHQgICAgICAgIH0gd2hpbGUgKCsraSA8IGwpO1xuXHRcblx0ICAgICAgICBpZiAodXBkYXRlZCkge1xuXHQgICAgICAgICAgdGhpcy5fdXBkYXRlQ2xhc3NOYW1lKCk7XG5cdCAgICAgICAgfVxuXHQgICAgICB9O1xuXHQgICAgICBjbGFzc0xpc3RQcm90by50b2dnbGUgPSBmdW5jdGlvbiAodG9rZW4sIGZvcmNlKSB7XG5cdCAgICAgICAgdG9rZW4gKz0gXCJcIjtcblx0XG5cdCAgICAgICAgdmFyIHJlc3VsdCA9IHRoaXMu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FxyXFxuXFxyXFxuICAgICAgY29uc3QgY3Vyck1vbnRoRmlyc3REYXkgPSBuZXcgRGF0ZSh0aW1lLnllYXIsIHRpbWUubW9udGgsIDEpXFxyXFxuICAgICAgbGV0IGZpcnN0RGF5V2VlayA9IGN1cnJNb250aEZpcnN0RGF5LmdldERheSgpICsgMVxcclxcbiAgICAgIGlmIChmaXJzdERheVdlZWsgPT09IDApIHtcXHJcXG4gICAgICAgIGZpcnN0RGF5V2VlayA9IDdcXHJcXG4gICAgICB9XFxyXFxuICAgICAgY29uc3QgZGF5Q291bnQgPSB0aGlzLmdldERheUNvdW50KHRpbWUueWVhciwgdGltZS5tb250aClcXHJcXG4gICAgICBpZiAoZmlyc3REYXlXZWVrID4gMSkge1xcclxcbiAgICAgICAgY29uc3QgcHJlTW9udGggPSB0aGlzLmdldFllYXJNb250aCh0aW1lLnllYXIsIHRpbWUubW9udGggLSAxKVxcclxcbiAgICAgICAgY29uc3QgcHJldk1vbnRoRGF5Q291bnQgPSB0aGlzLmdldERheUNvdW50KHByZU1vbnRoLnllYXIsIHByZU1vbnRoLm1vbnRoKVxcclxcbiAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBmaXJzdERheVdlZWs7IGkrKykge1xcclxcbiAgICAgICAgICBjb25zdCBkYXlUZXh0ID0gcHJldk1vbnRoRGF5Q291bnQgLSBmaXJzdERheVdlZWsgKyBpICsgMVxcclxcbiAgICAgICAgICBjb25zdCBkYXRlID0gbmV3IERhdGUocHJlTW9udGgueWVhciwgcHJlTW9udGgubW9udGgsIGRheVRleHQpXFxyXFxuICAgICAgICAgIGxldCBzY2xhc3MgPSAnZGF0ZXBpY2tlci1pdGVtLWdyYXknXFxyXFxuICAgICAgICAgIGlmICh0aGlzLmRpc2FibGVkRGF5c0FycmF5LmluZGV4T2YoZGF0ZS5nZXREYXkoKSkgPiAtMSkge1xcclxcbiAgICAgICAgICAgIHNjbGFzcyA9ICdkYXRlcGlja2VyLWl0ZW0tZGlzYWJsZ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ICBmb3IgKHZhciBpID0gMDsgaSA8IDEyOyBpKyspIHtcblx0ICAgICAgICB0aGlzLmRlY2FkZVJhbmdlLnB1c2goe1xuXHQgICAgICAgICAgdGV4dDogZmlyc3RZZWFyT2ZEZWNhZGUgKyBpXG5cdCAgICAgICAgfSk7XG5cdCAgICAgIH1cblx0XG5cdCAgICAgIHZhciBjdXJyTW9udGhGaXJzdERheSA9IG5ldyBEYXRlKHRpbWUueWVhciwgdGltZS5tb250aCwgMSk7XG5cdCAgICAgIHZhciBmaXJzdERheVdlZWsgPSBjdXJyTW9udGhGaXJzdERheS5nZXREYXkoKSArIDE7XG5cdCAgICAgIGlmIChmaXJzdERheVdlZWsgPT09IDApIHtcblx0ICAgICAgICBmaXJzdERheVdlZWsgPSA3O1xuXHQgICAgICB9XG5cdCAgICAgIHZhciBkYXlDb3VudCA9IHRoaXMuZ2V0RGF5Q291bnQodGltZS55ZWFyLCB0aW1lLm1vbnRoKTtcblx0ICAgICAgaWYgKGZpcnN0RGF5V2VlayA+IDEpIHtcblx0ICAgICAgICB2YXIgcHJlTW9udGggPSB0aGlzLmdldFllYXJNb250aCh0aW1lLnllYXIsIHRpbWUubW9udGggLSAxKTtcblx0ICAgICAgICB2YXIgcHJldk1vbnRoRGF5Q291bnQgPSB0aGlzLmdldERheUNvdW50KHByZU1vbnRoLnllYXIsIHByZU1vbnRoLm1vbnRoKTtcblx0ICAgICAgICBmb3IgKHZhciBfaSA9IDE7IF9pIDwgZmlyc3REYXlXZWVrOyBfaSsrKSB7XG5cdCAgICAgICAgICB2YXIgZGF5VGV4dCA9IHByZXZNb250aERheUNvdW50IC0gZmlyc3REYXlXZWVrICsgX2kgKyAxO1xuXHQgICAgICAgICAgdmFyIGRhdGUgPSBuZXcgRGF0ZShwcmVNb250aC55ZWFyLCBwcmVNb250aC5tb250aCwgZGF5VGV4dCk7XG5cdCAgICAgICAgICB2YXIgc2NsYXNzID0gJ2RhdGVwaWNrZXItaXRlbS1ncmF5Jztcblx0IC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24gKGUpIHtcblx0ICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuXHQgICAgICAgICAgICAkZHJvcGRvd24uZWFjaChmdW5jdGlvbiAoY29udGVudCkge1xuXHQgICAgICAgICAgICAgIGlmIChjb250ZW50LmNvbnRhaW5zKGUudGFyZ2V0KSkgY29udGVudC5jbGFzc0xpc3QudG9nZ2xlKCdvcGVuJyk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgfSkub24oJ2NsaWNrJywgJy5kcm9wZG93bi1tZW51PmxpPmEnLCBmdW5jdGlvbiAoZSkge1xuXHQgICAgICAgICAgICAkZHJvcGRvd24uZWFjaChmdW5jdGlvbiAoY29udGVudCkge1xuXHQgICAgICAgICAgICAgIGlmIChjb250ZW50LmNvbnRhaW5zKGUudGFyZ2V0KSkgY29udGVudC5jbGFzc0xpc3QucmVtb3ZlKCdvcGVuJyk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgfSkub25CbHVyKGZ1bmN0aW9uIChlKSB7XG5cdCAgICAgICAgICAgICRkcm9wZG93bi5lYWNoKGZ1bmN0aW9uIChjb250ZW50KSB7XG5cdCAgICAgICAgICAgICAgaWYgKCFjb250ZW50LmNvbnRhaW5zKGUudGFyZ2V0KSkgY29udGVudC5jbGFzc0xpc3QucmVtb3ZlKCdvcGVuJyk7XG5cdCAgICAgICAgICAgIH0pO1xuXHQgICAgICAgICAgfSk7XG5cdCAgICAgICAgfVxuXHQgICAgICB9KSgpO1xuXHQgICAgfSBjYXRjaCAoZXgpIHtcblx0ICAgICAgY29uc29sZS5sb2coJ2Vycm9yIGZpbmRpbmcgZHJvcGRvd24nKTtcblx0ICAgIH1cblx0XG5cdCAgICAoMCwgX05vZGVMaXN0Mi5kZWZhdWx0KSh0aGlzLiRlbCkub24oJ2NsaWNrIHRvdWNoc3RhcnQnLCAnbGk6bm90KC5kcm9wZG93bik+YScsIGZ1bmN0aW9uIChlKSB7XG5cdCAgICAgIH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leXMgICAgICAgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDE5OClcblx0ICAsIGlzQXJyYXkgICAgICAgID0gX193ZWJwYWNrX3JlcXVpcmVfXygyMDEpXG5cdCAgLCBhbk9iamVjdCAgICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMTIpXG5cdCAgLCB0b0lPYmplY3QgICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMzYpXG5cdCAgLCB0b1ByaW1pdGl2ZSAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMTgpXG5cdCAgLCBjcmVhdGVEZXNjICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMTkpXG5cdCAgLCBfY3JlYXRlICAgICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMzIpXG5cdCAgLCBnT1BORXh0ICAgICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oNjApXG5cdCAgLCAkR09QRCAgICAgICAgICA9IF9fd2VicGFja19yZXF1aXJlX18oMjAyKVxuXHQgICwgJERQICAgICAgICAgICAgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDExKVxuXHQgICwgJGtleXMgICAgICAgICAgPSBfX3dlYnBhY2tfcmVxdWlyZV9fKDM0KVxuXHQgICwgZ09QRCAgICAgICAgICAgPSAkR09QRC5mXG5cdCAgLCBkUCAgICAgICAgICAgICA9ICREUC5mXG5cdCAgLCBnT1BOICAgICAgICAgICA9IGdPUE5FeHQuZlxuXHQgICwgJFN5bWJvbCAgICAgICAgPSBnbG9iYWwuU3ltYm9sXG5cdCAgLCAkSlNPTiAgICAgICAgICA9IGdsb2JhbC5KU09OXG5cdCAgLCBfc3RyaW5naWZ5ICAgICA9ICRKU09OICYmICRKU09OLnN0cmluZ2lmeVxuXHQgICwgUFJPVE9UWVBFICAgICAgPSAncHJvdG90eXBlJ1xuXHQgICwgSElEREVOICAgICAgICAgPSB3a3MoJ19oaWRkZW4nKVxuXHQgICwgVE9fUFJJTUlUSVZFICAgPSB3a3MoJ3RvUHJpb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"/* WEBPACK VAR INJECTION */(function(global) {/*!\\n * Vue.js v2.1.6\\n * (c) 2014-2016 Evan You\\n * Released under the MIT License.\\n */\\n(function (global, factory) {\\n true ? module.exports = factory() :\\n typeof define === 'function' && define.amd ? define(factory) :\\n (global.Vue = factory());\\n}(this, (function () { 'use strict';\\n\\n/* */\\n\\n/**\\n * Convert a value to a string that is actually rendered.\\n */\\nfunction _toString (val) {\\n return val == null\\n ? ''\\n : typeof val === 'object'\\n ? JSON.stringify(val, null, 2)\\n : String(val)\\n}\\n\\n/**\\n * Convert a input value to a number for persistence.\\n * If the conversion fails, return original string.\\n */\\nfunction toNumber (val) {\\n var n = parseFloat(val, 10);\\n return (n || n === 0) ? n : val\\n}\\n\\n/**\\n * Make a map and return a function for checking if a key\\n * is in that map.\\n */\\nfunction makeMap (\\n str,\\n expectsLowerCase\\n) {\\n var map = Object.create(null);\\n var list = str.split(',');\\n for (var i = 0; i < list.length; i++) {\\n map[list[i]] = true;\\n }\\n return expectsLowerCase\\n ? function (val) { return map[val.toLowerCase()]; }\\n : function (val) { return map[val]; }\\n}\\n\\n/**\\n * Check if a tag is a built-in tag.\\n */\\nvar isBuiltInTag = makeMap('slot,component', true);\\n\\n/**\\n * Remove an item from an array\\n */\\nfunction remove$1 (arr, item) {\\n if (arr.length) {\\n var index = arr.indexOf(item);\\n if (index > -1) {\\n return arr.splice(index, 1)\\n }\\n }\\n}\\n\\n/**\\n * Check whether the object has the property.\\n */\\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\\nfunction hasOwn (obj, key) {\\n return hasOwnProperty.call(obj, key)\\n}\\n\\n/**\\n * Check if value is primitive\\n */\\nfunction isPrimitive (value) {\\n return typeof value === 'string' || typeof value === 'number'\\n}\\n\\n/**\\n * Create a cached version of a pure function.\\n */\\nfunction cached (fn) {\\n var cache = Object.create(null);\\n return function cachedFn (str) {\\n var hit = cache[str];\\n return hit || (cache[str] = fn(str))\\n }\\n}\\n\\n/**\\n * Camelize a hyphen-delmited string.\\n */\\nvar camelizeRE = /-(\\\\w)/g;\\nvar camelize = cached(function (str) {\\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\\n});\\n\\n/**\\n * Capitalize a string.\\n */\\nvar capitalize = cached(function (str) {\\n return str.charAt(0).toUpperCase() + str.slice(1)\\n});\\n\\n/**\\n * Hyphenate a camelCase string.\\n */\\nvar hyphenateRE = /([^-])([A-Z])/g;\\nvar hyphenate = cached(function (str) {\\n return str\\n .replace(hyphenateRE, '$1-$2')\\n .replace(hyphenateRE, '$1-$2')\\n .toLowerCase()\\n});\\n\\n/**\\n * Simple bind, faster than native\\n */\\nfunction bind$1 (fn, ctx) {\\n function boundFn (a) {\\n var l = arguments.length;\\n return l\\n ? l > 1\\n ? fn.apply(ctx, arguments)\\n : fn.call(ctx, a)\\n : fn.call(ctx)\\n }\\n // record original fn length\\n boundFn._length = fn.length;\\n return boundFn\\n}\\n\\n/**\\n * Convert an Array-like object to a real Array.\\n */\\nfunction toArray (list, start) {\\n start = start || 0;\\n var i = list.length - start;\\n var ret = new Array(i);\\n while (i--) {\\n ret[i] = list[i + start];\\n }\\n return ret\\n}\\n\\n/**\\n * Mix properties into target object.\\n */\\nfunction extend (to, _from) {\\n for (var key in _from) {\\n to[key] = _from[key];\\n }\\n return to\\n}\\n\\n/**\\n * Quick object check - this is primarily used to tell\\n * Objects from primitive values when we know the value\\n * is a JSON-compliant type.\\n */\\nfunction isObject (obj) {\\n return obj !== null && typeof obj === 'object'\\n}\\n\\n/**\\n * Strict object type check. Only returns true\\n * for plain JavaScript objects.\\n */\\nvar toString = Object.prototype.toString;\\nvar OBJECT_STRING = '[object Object]';\\nfunction isPlainObject (obj) {\\n return toString.call(obj) === OBJECT_STRING\\n}\\n\\n/**\\n * Merge an Array of Objects into a single Object.\\n */\\nfunction toObject (arr) {\\n var res = {};\\n for (var i = 0; i < arr.length; i++) {\\n if (arr[i]) {\\n extend(res, arr[i]);\\n }\\n }\\n return res\\n}\\n\\n/**\\n * Perform no operation.\\n */\\nfunction noop () {}\\n\\n/**\\n * Always return false.\\n */\\nvar no = function () { return false; };\\n\\n/**\\n * Return same value\\n */\\nvar identity = function (_) { return _; };\\n\\n/**\\n * Generate a static keys string from compiler modules.\\n */\\nfunction genStaticKeys (modules) {\\n return modules.reduce(function (keys, m) {\\n return keys.concat(m.staticKeys || [])\\n }, []).join(',')\\n}\\n\\n/**\\n * Check if two values are loosely equal - that is,\\n * if they are plain objects, do they have the same shape?\\n */\\nfunction looseEqual (a, b) {\\n /* eslint-disable eqeqeq */\\n return a == b || (\\n isObject(a) && isObject(b)\\n ? JSON.stringify(a) === JSON.stringify(b)\\n : false\\n )\\n /* eslint-enable eqeqeq */\\n}\\n\\nfunction looseIndexOf (arr, val) {\\n for (var i = 0; i < arr.length; i++) {\\n if (looseEqual(arr[i], val)) { return i }\\n }\\n return -1\\n}\\n\\n/* */\\n\\nvar config = {\\n /**\\n * Option merge strategies (used in core/util/options)\\n */\\n optionMergeStrategies: Object.create(null),\\n\\n /**\\n * Whether to suppress warnings.\\n */\\n silent: false,\\n\\n /**\\n * Whether to enable devtools\\n */\\n devtools: \\\"development\\\" !== 'production',\\n\\n /**\\n * Error handler for watcher errors\\n */\\n errorHandler: null,\\n\\n /**\\n * Ignore certain custom elements\\n */\\n ignoredElements: null,\\n\\n /**\\n * Custom user key aliases for v-on\\n */\\n keyCodes: Object.create(null),\\n\\n /**\\n * Check if a tag is reserved so that it cannot be registered as a\\n * component. This is platform-dependent and may be overwritten.\\n */\\n isReservedTag: no,\\n\\n /**\\n * Check if a tag is an unknown element.\\n * Platform-dependent.\\n */\\n isUnknownElement: no,\\n\\n /**\\n * Get the namespace of an element\\n */\\n getTagNamespace: noop,\\n\\n /**\\n * Parse the real tag name for the specific platform.\\n */\\n parsePlatformTagName: identity,\\n\\n /**\\n * Check if an attribute must be bound using property, e.g. value\\n * Platform-dependent.\\n */\\n mustUseProp: no,\\n\\n /**\\n * List of asset types that a component can own.\\n */\\n _assetTypes: [\\n 'component',\\n 'directive',\\n 'filter'\\n ],\\n\\n /**\\n * List of lifecycle hooks.\\n */\\n _lifecycleHooks: [\\n 'beforeCreate',\\n 'created',\\n 'beforeMount',\\n 'mounted',\\n 'beforeUpdate',\\n 'updated',\\n 'beforeDestroy',\\n 'destroyed',\\n 'activated',\\n 'deactivated'\\n ],\\n\\n /**\\n * Max circular updates allowed in a scheduler flush cycle.\\n */\\n _maxUpdateCount: 100\\n};\\n\\n/* */\\n\\n/**\\n * Check if a string starts with $ or _\\n */\\nfunction isReserved (str) {\\n var c = (str + '').charCodeAt(0);\\n return c === 0x24 || c === 0x5F\\n}\\n\\n/**\\n * Define a property.\\n */\\nfunction def (obj, key, val, enumerable) {\\n Object.defineProperty(obj, key, {\\n value: val,\\n enumerable: !!enumerable,\\n writable: true,\\n configurable: true\\n });\\n}\\n\\n/**\\n * Parse simple path.\\n */\\nvar bailRE = /[^\\\\w.$]/;\\nfunction parsePath (path) {\\n if (bailRE.test(path)) {\\n return\\n } else {\\n var segments = path.split('.');\\n return function (obj) {\\n for (var i = 0; i < segments.length; i++) {\\n if (!obj) { return }\\n obj = obj[segments[i]];\\n }\\n return obj\\n }\\n }\\n}\\n\\n/* */\\n/* globals MutationObserver */\\n\\n// can we use __proto__?\\nvar hasProto = '__proto__' in {};\\n\\n// Browser environment sniffing\\nvar inBrowser = typeof window !== 'undefined';\\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\\nvar isIE = UA && /msie|trident/.test(UA);\\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\\nvar isEdge = UA && UA.indexOf('edge/') > 0;\\nvar isAndroid = UA && UA.indexOf('android') > 0;\\nvar isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);\\n\\n// this needs to be lazy-evaled because vue may be required before\\n// vue-server-renderer can set VUE_ENV\\nvar _isServer;\\nvar isServerRendering = function () {\\n if (_isServer === undefined) {\\n /* istanbul ignore if */\\n if (!inBrowser && typeof global !== 'undefined') {\\n // detect presence of vue-server-renderer and avoid\\n // Webpack shimming the process\\n _isServer = global['process'].env.VUE_ENV === 'server';\\n } else {\\n _isServer = false;\\n }\\n }\\n return _isServer\\n};\\n\\n// detect devtools\\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\\n\\n/* istanbul ignore next */\\nfunction isNative (Ctor) {\\n return /native code/.test(Ctor.toString())\\n}\\n\\n/**\\n * Defer a task to execute it asynchronously.\\n */\\nvar nextTick = (function () {\\n var callbacks = [];\\n var pending = false;\\n var timerFunc;\\n\\n function nextTickHandler () {\\n pending = false;\\n var copies = callbacks.slice(0);\\n callbacks.length = 0;\\n for (var i = 0; i < copies.length; i++) {\\n copies[i]();\\n }\\n }\\n\\n // the nextTick behavior leverages the microtask queue, which can be accessed\\n // via either native Promise.then or MutationObserver.\\n // MutationObserver has wider support, however it is seriously bugged in\\n // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It\\n // completely stops working after triggering a few times... so, if native\\n // Promise is available, we will use it:\\n /* istanbul ignore if */\\n if (typeof Promise !== 'undefined' && isNative(Promise)) {\\n var p = Promise.resolve();\\n var logError = function (err) { console.error(err); };\\n timerFunc = function () {\\n p.then(nextTickHandler).catch(logError);\\n // in problematic UIWebViews, Promise.then doesn't completely break, but\\n // it can get stuck in a weird state where callbacks are pushed into the\\n // microtask queue but the queue isn't being flushed, until the browser\\n // needs to do some other work, e.g. handle a timer. Therefore we can\\n // \\\"force\\\" the microtask queue to be flushed by adding an empty timer.\\n if (isIOS) { setTimeout(noop); }\\n };\\n } else if (typeof MutationObserver !== 'undefined' && (\\n isNative(MutationObserver) ||\\n // PhantomJS and iOS 7.x\\n MutationObserver.toString() === '[object MutationObserverConstructor]'\\n )) {\\n // use MutationObserver where native Promise is not available,\\n // e.g. PhantomJS IE11, iOS7, Android 4.4\\n var counter = 1;\\n var observer = new MutationObserver(nextTickHandler);\\n var textNode = document.createTextNode(String(counter));\\n observer.observe(textNode, {\\n characterData: true\\n });\\n timerFunc = function () {\\n counter = (counter + 1) % 2;\\n textNode.data = String(counter);\\n };\\n } else {\\n // fallback to setTimeout\\n /* istanbul ignore next */\\n timerFunc = function () {\\n setTimeout(nextTickHandler, 0);\\n };\\n }\\n\\n return function queueNextTick (cb, ctx) {\\n var _resolve;\\n callbacks.push(function () {\\n if (cb) { cb.call(ctx); }\\n if (_resolve) { _resolve(ctx); }\\n });\\n if (!pending) {\\n pending = true;\\n timerFunc();\\n }\\n if (!cb && typeof Promise !== 'undefined') {\\n return new Promise(function (resolve) {\\n _resolve = resolve;\\n })\\n }\\n }\\n})();\\n\\nvar _Set;\\n/* istanbul ignore if */\\nif (typeof Set !== 'undefined' && isNative(Set)) {\\n // use native Set when available.\\n _Set = Set;\\n} else {\\n // a non-standard Set polyfill that only works with primitive keys.\\n _Set = (function () {\\n function Set () {\\n this.set = Object.create(null);\\n }\\n Set.prototype.has = function has (key) {\\n return this.set[key] === true\\n };\\n Set.prototype.add = function add (key) {\\n this.set[key] = true;\\n };\\n Set.prototype.clear = function clear () {\\n this.set = Object.create(null);\\n };\\n\\n return Set;\\n }());\\n}\\n\\nvar warn = noop;\\nvar formatComponentName;\\n\\n{\\n var hasConsole = typeof console !== 'undefined';\\n\\n warn = function (msg, vm) {\\n if (hasConsole && (!config.silent)) {\\n console.error(\\\"[Vue warn]: \\\" + msg + \\\" \\\" + (\\n vm ? formatLocation(formatComponentName(vm)) : ''\\n ));\\n }\\n };\\n\\n formatComponentName = function (vm) {\\n if (vm.$root === vm) {\\n return 'root instance'\\n }\\n var name = vm._isVue\\n ? vm.$options.name || vm.$options._componentTag\\n : vm.name;\\n return (\\n (name ? (\\\"component <\\\" + name + \\\">\\\") : \\\"anonymous component\\\") +\\n (vm._isVue && vm.$options.__file ? (\\\" at \\\" + (vm.$options.__file)) : '')\\n )\\n };\\n\\n var formatLocation = function (str) {\\n if (str === 'anonymous component') {\\n str += \\\" - use the \\\\\\\"name\\\\\\\" option for better debugging messages.\\\";\\n }\\n return (\\\"\\\\n(found in \\\" + str + \\\")\\\")\\n };\\n}\\n\\n/* */\\n\\n\\nvar uid$1 = 0;\\n\\n/**\\n * A dep is an observable that can have multiple\\n * directives subscribing to it.\\n */\\nvar Dep = function Dep () {\\n this.id = uid$1++;\\n this.subs = [];\\n};\\n\\nDep.prototype.addSub = function addSub (sub) {\\n this.subs.push(sub);\\n};\\n\\nDep.prototype.removeSub = function removeSub (sub) {\\n remove$1(this.subs, sub);\\n};\\n\\nDep.prototype.depend = function depend () {\\n if (Dep.target) {\\n Dep.target.addDep(this);\\n }\\n};\\n\\nDep.prototype.notify = function notify () {\\n // stablize the subscriber list first\\n var subs = this.subs.slice();\\n for (var i = 0, l = subs.length; i < l; i++) {\\n subs[i].update();\\n }\\n};\\n\\n// the current target watcher being evaluated.\\n// this is globally unique because there could be only one\\n// watcher being evaluated at any time.\\nDep.target = null;\\nvar targetStack = [];\\n\\nfunction pushTarget (_target) {\\n if (Dep.target) { targetStack.push(Dep.target); }\\n Dep.target = _target;\\n}\\n\\nfunction popTarget () {\\n Dep.target = targetStack.pop();\\n}\\n\\n/*\\n * not type checking this file because flow doesn't play well with\\n * dynamically accessing methods on Array prototype\\n */\\n\\nvar arrayProto = Array.prototype;\\nvar arrayMethods = Object.create(arrayProto);[\\n 'push',\\n 'pop',\\n 'shift',\\n 'unshift',\\n 'splice',\\n 'sort',\\n 'reverse'\\n]\\n.forEach(function (method) {\\n // cache original method\\n var original = arrayProto[method];\\n def(arrayMethods, method, function mutator () {\\n var arguments$1 = arguments;\\n\\n // avoid leaking arguments:\\n // http://jsperf.com/closure-with-arguments\\n var i = arguments.length;\\n var args = new Array(i);\\n while (i--) {\\n args[i] = arguments$1[i];\\n }\\n var result = original.apply(this, args);\\n var ob = this.__ob__;\\n var inserted;\\n switch (method) {\\n case 'push':\\n inserted = args;\\n break\\n case 'unshift':\\n inserted = args;\\n break\\n case 'splice':\\n inserted = args.slice(2);\\n break\\n }\\n if (inserted) { ob.observeArray(inserted); }\\n // notify change\\n ob.dep.notify();\\n return result\\n });\\n});\\n\\n/* */\\n\\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\\n\\n/**\\n * By default, when a reactive property is set, the new value is\\n * also converted to become reactive. However when passing down props,\\n * we don't want to force conversion because the value may be a nested value\\n * under a frozen data structure. Converting it would defeat the optimization.\\n */\\nvar observerState = {\\n shouldConvert: true,\\n isSettingProps: false\\n};\\n\\n/**\\n * Observer class that are attached to each observed\\n * object. Once attached, the observer converts target\\n * object's property keys into getter/setters that\\n * collect dependencies and dispatches updates.\\n */\\nvar Observer = function Observer (value) {\\n this.value = value;\\n this.dep = new Dep();\\n this.vmCount = 0;\\n def(value, '__ob__', this);\\n if (Array.isArray(value)) {\\n var augment = hasProto\\n ? protoAugment\\n : copyAugment;\\n augment(value, arrayMethods, arrayKeys);\\n this.observeArray(value);\\n } else {\\n this.walk(value);\\n }\\n};\\n\\n/**\\n * Walk through each property and convert them into\\n * getter/setters. This method should only be called when\\n * value type is Object.\\n */\\nObserver.prototype.walk = function walk (obj) {\\n var keys = Object.keys(obj);\\n for (var i = 0; i < keys.length; i++) {\\n defineReactive$$1(obj, keys[i], obj[keys[i]]);\\n }\\n};\\n\\n/**\\n * Observe a list of Array items.\\n */\\nObserver.prototype.observeArray = function observeArray (items) {\\n for (var i = 0, l = items.length; i < l; i++) {\\n observe(items[i]);\\n }\\n};\\n\\n// helpers\\n\\n/**\\n * Augment an target Object or Array by intercepting\\n * the prototype chain using __proto__\\n */\\nfunction protoAugment (target, src) {\\n /* eslint-disable no-proto */\\n target.__proto__ = src;\\n /* eslint-enable no-proto */\\n}\\n\\n/**\\n * Augment an target Object or Array by defining\\n * hidden properties.\\n */\\n/* istanbul ignore next */\\nfunction copyAugment (target, src, keys) {\\n for (var i = 0, l = keys.length; i < l; i++) {\\n var key = keys[i];\\n def(target, key, src[key]);\\n }\\n}\\n\\n/**\\n * Attempt to create an observer instance for a value,\\n * returns the new observer if successfully observed,\\n * or the existing observer if the value already has one.\\n */\\nfunction observe (value) {\\n if (!isObject(value)) {\\n return\\n }\\n var ob;\\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\\n ob = value.__ob__;\\n } else if (\\n observerState.shouldConvert &&\\n !isServerRendering() &&\\n (Array.isArray(value) || isPlainObject(value)) &&\\n Object.isExtensible(value) &&\\n !value._isVue\\n ) {\\n ob = new Observer(value);\\n }\\n return ob\\n}\\n\\n/**\\n * Define a reactive property on an Object.\\n */\\nfunction defineReactive$$1 (\\n obj,\\n key,\\n val,\\n customSetter\\n) {\\n var dep = new Dep();\\n\\n var property = Object.getOwnPropertyDescriptor(obj, key);\\n if (property && property.configurable === false) {\\n return\\n }\\n\\n // cater for pre-defined getter/setters\\n var getter = property && property.get;\\n var setter = property && property.set;\\n\\n var childOb = observe(val);\\n Object.defineProperty(obj, key, {\\n enumerable: true,\\n configurable: true,\\n get: function reactiveGetter () {\\n var value = getter ? getter.call(obj) : val;\\n if (Dep.target) {\\n dep.depend();\\n if (childOb) {\\n childOb.dep.depend();\\n }\\n if (Array.isArray(value)) {\\n dependArray(value);\\n }\\n }\\n return value\\n },\\n set: function reactiveSetter (newVal) {\\n var value = getter ? getter.call(obj) : val;\\n /* eslint-disable no-self-compare */\\n if (newVal === value || (newVal !== newVal && value !== value)) {\\n return\\n }\\n /* eslint-enable no-self-compare */\\n if (\\\"development\\\" !== 'production' && customSetter) {\\n customSetter();\\n }\\n if (setter) {\\n setter.call(obj, newVal);\\n } else {\\n val = newVal;\\n }\\n childOb = observe(newVal);\\n dep.notify();\\n }\\n });\\n}\\n\\n/**\\n * Set a property on an object. Adds the new property and\\n * triggers change notification if the property doesn't\\n * already exist.\\n */\\nfunction set$1 (obj, key, val) {\\n if (Array.isArray(obj)) {\\n obj.length = Math.max(obj.length, key);\\n obj.splice(key, 1, val);\\n return val\\n }\\n if (hasOwn(obj, key)) {\\n obj[key] = val;\\n return\\n }\\n var ob = obj.__ob__;\\n if (obj._isVue || (ob && ob.vmCount)) {\\n \\\"development\\\" !== 'production' && warn(\\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\\n 'at runtime - declare it upfront in the data option.'\\n );\\n return\\n }\\n if (!ob) {\\n obj[key] = val;\\n return\\n }\\n defineReactive$$1(ob.value, key, val);\\n ob.dep.notify();\\n return val\\n}\\n\\n/**\\n * Delete a property and trigger change if necessary.\\n */\\nfunction del (obj, key) {\\n var ob = obj.__ob__;\\n if (obj._isVue || (ob && ob.vmCount)) {\\n \\\"development\\\" !== 'production' && warn(\\n 'Avoid deleting properties on a Vue instance or its root $data ' +\\n '- just set it to null.'\\n );\\n return\\n }\\n if (!hasOwn(obj, key)) {\\n return\\n }\\n delete obj[key];\\n if (!ob) {\\n return\\n }\\n ob.dep.notify();\\n}\\n\\n/**\\n * Collect dependencies on array elements when the array is touched, since\\n * we cannot intercept array element access like property getters.\\n */\\nfunction dependArray (value) {\\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\\n e = value[i];\\n e && e.__ob__ && e.__ob__.dep.depend();\\n if (Array.isArray(e)) {\\n dependArray(e);\\n }\\n }\\n}\\n\\n/* */\\n\\n/**\\n * Option overwriting strategies are functions that handle\\n * how to merge a parent option value and a child option\\n * value into the final value.\\n */\\nvar strats = config.optionMergeStrategies;\\n\\n/**\\n * Options with restrictions\\n */\\n{\\n strats.el = strats.propsData = function (parent, child, vm, key) {\\n if (!vm) {\\n warn(\\n \\\"option \\\\\\\"\\\" + key + \\\"\\\\\\\" can only be used during instance \\\" +\\n 'creation with the `new` keyword.'\\n );\\n }\\n return defaultStrat(parent, child)\\n };\\n}\\n\\n/**\\n * Helper that recursively merges two data objects together.\\n */\\nfunction mergeData (to, from) {\\n if (!from) { return to }\\n var key, toVal, fromVal;\\n var keys = Object.keys(from);\\n for (var i = 0; i < keys.length; i++) {\\n key = keys[i];\\n toVal = to[key];\\n fromVal = from[key];\\n if (!hasOwn(to, key)) {\\n set$1(to, key, fromVal);\\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\\n mergeData(toVal, fromVal);\\n }\\n }\\n return to\\n}\\n\\n/**\\n * Data\\n */\\nstrats.data = function (\\n parentVal,\\n childVal,\\n vm\\n) {\\n if (!vm) {\\n // in a Vue.extend merge, both should be functions\\n if (!childVal) {\\n return parentVal\\n }\\n if (typeof childVal !== 'function') {\\n \\\"development\\\" !== 'production' && warn(\\n 'The \\\"data\\\" option should be a function ' +\\n 'that returns a per-instance value in component ' +\\n 'definitions.',\\n vm\\n );\\n return parentVal\\n }\\n if (!parentVal) {\\n return childVal\\n }\\n // when parentVal & childVal are both present,\\n // we need to return a function that returns the\\n // merged result of both functions... no need to\\n // check if parentVal is a function here because\\n // it has to be a function to pass previous merges.\\n return function mergedDataFn () {\\n return mergeData(\\n childVal.call(this),\\n parentVal.call(this)\\n )\\n }\\n } else if (parentVal || childVal) {\\n return function mergedInstanceDataFn () {\\n // instance merge\\n var instanceData = typeof childVal === 'function'\\n ? childVal.call(vm)\\n : childVal;\\n var defaultData = typeof parentVal === 'function'\\n ? parentVal.call(vm)\\n : undefined;\\n if (instanceData) {\\n return mergeData(instanceData, defaultData)\\n } else {\\n return defaultData\\n }\\n }\\n }\\n};\\n\\n/**\\n * Hooks and param attributes are merged as arrays.\\n */\\nfunction mergeHook (\\n parentVal,\\n childVal\\n) {\\n return childVal\\n ? parentVal\\n ? parentVal.concat(childVal)\\n : Array.isArray(childVal)\\n ? childVal\\n : [childVal]\\n : parentVal\\n}\\n\\nconfig._lifecycleHooks.forEach(function (hook) {\\n strats[hook] = mergeHook;\\n});\\n\\n/**\\n * Assets\\n *\\n * When a vm is present (instance creation), we need to do\\n * a three-way merge between constructor options, instance\\n * options and parent options.\\n */\\nfunction mergeAssets (parentVal, childVal) {\\n var res = Object.create(parentVal || null);\\n return childVal\\n ? extend(res, childVal)\\n : res\\n}\\n\\nconfig._assetTypes.forEach(function (type) {\\n strats[type + 's'] = mergeAssets;\\n});\\n\\n/**\\n * Watchers.\\n *\\n * Watchers hashes should not overwrite one\\n * another, so we merge them as arrays.\\n */\\nstrats.watch = function (parentVal, childVal) {\\n /* istanbul ignore if */\\n if (!childVal) { return parentVal }\\n if (!parentVal) { return childVal }\\n var ret = {};\\n extend(ret, parentVal);\\n for (var key in childVal) {\\n var parent = ret[key];\\n var child = childVal[key];\\n if (parent && !Array.isArray(parent)) {\\n parent = [parent];\\n }\\n ret[key] = parent\\n ? parent.concat(child)\\n : [child];\\n }\\n return ret\\n};\\n\\n/**\\n * Other object hashes.\\n */\\nstrats.props =\\nstrats.methods =\\nstrats.computed = function (parentVal, childVal) {\\n if (!childVal) { return parentVal }\\n if (!parentVal) { return childVal }\\n var ret = Object.create(null);\\n extend(ret, parentVal);\\n extend(ret, childVal);\\n return ret\\n};\\n\\n/**\\n * Default strategy.\\n */\\nvar defaultStrat = function (parentVal, childVal) {\\n return childVal === undefined\\n ? parentVal\\n : childVal\\n};\\n\\n/**\\n * Validate component names\\n */\\nfunction checkComponents (options) {\\n for (var key in options.components) {\\n var lower = key.toLowerCase();\\n if (isBuiltInTag(lower) || config.isReservedTag(lower)) {\\n warn(\\n 'Do not use built-in or reserved HTML elements as component ' +\\n 'id: ' + key\\n );\\n }\\n }\\n}\\n\\n/**\\n * Ensure all props option syntax are normalized into the\\n * Object-based format.\\n */\\nfunction normalizeProps (options) {\\n var props = options.props;\\n if (!props) { return }\\n var res = {};\\n var i, val, name;\\n if (Array.isArray(props)) {\\n i = props.length;\\n while (i--) {\\n val = props[i];\\n if (typeof val === 'string') {\\n name = camelize(val);\\n res[name] = { type: null };\\n } else {\\n warn('props must be strings when using array syntax.');\\n }\\n }\\n } else if (isPlainObject(props)) {\\n for (var key in props) {\\n val = props[key];\\n name = camelize(key);\\n res[name] = isPlainObject(val)\\n ? val\\n : { type: val };\\n }\\n }\\n options.props = res;\\n}\\n\\n/**\\n * Normalize raw function directives into object format.\\n */\\nfunction normalizeDirectives (options) {\\n var dirs = options.directives;\\n if (dirs) {\\n for (var key in dirs) {\\n var def = dirs[key];\\n if (typeof def === 'function') {\\n dirs[key] = { bind: def, update: def };\\n }\\n }\\n }\\n}\\n\\n/**\\n * Merge two option objects into a new one.\\n * Core utility used in both instantiation and inheritance.\\n */\\nfunction mergeOptions (\\n parent,\\n child,\\n vm\\n) {\\n {\\n checkComponents(child);\\n }\\n normalizeProps(child);\\n normalizeDirectives(child);\\n var extendsFrom = child.extends;\\n if (extendsFrom) {\\n parent = typeof extendsFrom === 'function'\\n ? mergeOptions(parent, extendsFrom.options, vm)\\n : mergeOptions(parent, extendsFrom, vm);\\n }\\n if (child.mixins) {\\n for (var i = 0, l = child.mixins.length; i < l; i++) {\\n var mixin = child.mixins[i];\\n if (mixin.prototype instanceof Vue$3) {\\n mixin = mixin.options;\\n }\\n parent = mergeOptions(parent, mixin, vm);\\n }\\n }\\n var options = {};\\n var key;\\n for (key in parent) {\\n mergeField(key);\\n }\\n for (key in child) {\\n if (!hasOwn(parent, key)) {\\n mergeField(key);\\n }\\n }\\n function mergeField (key) {\\n var strat = strats[key] || defaultStrat;\\n options[key] = strat(parent[key], child[key], vm, key);\\n }\\n return options\\n}\\n\\n/**\\n * Resolve an asset.\\n * This function is used because child instances need access\\n * to assets defined in its ancestor chain.\\n */\\nfunction resolveAsset (\\n options,\\n type,\\n id,\\n warnMissing\\n) {\\n /* istanbul ignore if */\\n if (typeof id !== 'string') {\\n return\\n }\\n var assets = options[type];\\n // check local registration variations first\\n if (hasOwn(assets, id)) { return assets[id] }\\n var camelizedId = camelize(id);\\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\\n var PascalCaseId = capitalize(camelizedId);\\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\\n // fallback to prototype chain\\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\\n if (\\\"development\\\" !== 'production' && warnMissing && !res) {\\n warn(\\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\\n options\\n );\\n }\\n return res\\n}\\n\\n/* */\\n\\nfunction validateProp (\\n key,\\n propOptions,\\n propsData,\\n vm\\n) {\\n var prop = propOptions[key];\\n var absent = !hasOwn(propsData, key);\\n var value = propsData[key];\\n // handle boolean props\\n if (isBooleanType(prop.type)) {\\n if (absent && !hasOwn(prop, 'default')) {\\n value = false;\\n } else if (value === '' || value === hyphenate(key)) {\\n value = true;\\n }\\n }\\n // check default value\\n if (value === undefined) {\\n value = getPropDefaultValue(vm, prop, key);\\n // since the default value is a fresh copy,\\n // make sure to observe it.\\n var prevShouldConvert = observerState.shouldConvert;\\n observerState.shouldConvert = true;\\n observe(value);\\n observerState.shouldConvert = prevShouldConvert;\\n }\\n {\\n assertProp(prop, key, value, vm, absent);\\n }\\n return value\\n}\\n\\n/**\\n * Get the default value of a prop.\\n */\\nfunction getPropDefaultValue (vm, prop, key) {\\n // no default, return undefined\\n if (!hasOwn(prop, 'default')) {\\n return undefined\\n }\\n var def = prop.default;\\n // warn against non-factory defaults for Object & Array\\n if (isObject(def)) {\\n \\\"development\\\" !== 'production' && warn(\\n 'Invalid default value for prop \\\"' + key + '\\\": ' +\\n 'Props with type Object/Array must use a factory function ' +\\n 'to return the default value.',\\n vm\\n );\\n }\\n // the raw prop value was also undefined from previous render,\\n // return previous default value to avoid unnecessary watcher trigger\\n if (vm && vm.$options.propsData &&\\n vm.$options.propsData[key] === undefined &&\\n vm[key] !== undefined) {\\n return vm[key]\\n }\\n // call factory function for non-Function types\\n return typeof def === 'function' && prop.type !== Function\\n ? def.call(vm)\\n : def\\n}\\n\\n/**\\n * Assert whether a prop is valid.\\n */\\nfunction assertProp (\\n prop,\\n name,\\n value,\\n vm,\\n absent\\n) {\\n if (prop.required && absent) {\\n warn(\\n 'Missing required prop: \\\"' + name + '\\\"',\\n vm\\n );\\n return\\n }\\n if (value == null && !prop.required) {\\n return\\n }\\n var type = prop.type;\\n var valid = !type || type === true;\\n var expectedTypes = [];\\n if (type) {\\n if (!Array.isArray(type)) {\\n type = [type];\\n }\\n for (var i = 0; i < type.length && !valid; i++) {\\n var assertedType = assertType(value, type[i]);\\n expectedTypes.push(assertedType.expectedType);\\n valid = assertedType.valid;\\n }\\n }\\n if (!valid) {\\n warn(\\n 'Invalid prop: type check failed for prop \\\"' + name + '\\\".' +\\n ' Expected ' + expectedTypes.map(capitalize).join(', ') +\\n ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.',\\n vm\\n );\\n return\\n }\\n var validator = prop.validator;\\n if (validator) {\\n if (!validator(value)) {\\n warn(\\n 'Invalid prop: custom validator check failed for prop \\\"' + name + '\\\".',\\n vm\\n );\\n }\\n }\\n}\\n\\n/**\\n * Assert the type of a value\\n */\\nfunction assertType (value, type) {\\n var valid;\\n var expectedType = getType(type);\\n if (expectedType === 'String') {\\n valid = typeof value === (expectedType = 'string');\\n } else if (expectedType === 'Number') {\\n valid = typeof value === (expectedType = 'number');\\n } else if (expectedType === 'Boolean') {\\n valid = typeof value === (expectedType = 'boolean');\\n } else if (expectedType === 'Function') {\\n valid = typeof value === (expectedType = 'function');\\n } else if (expectedType === 'Object') {\\n valid = isPlainObject(value);\\n } else if (expectedType === 'Array') {\\n valid = Array.isArray(value);\\n } else {\\n valid = value instanceof type;\\n }\\n return {\\n valid: valid,\\n expectedType: expectedType\\n }\\n}\\n\\n/**\\n * Use function string name to check built-in types,\\n * because a simple equality check will fail when running\\n * across different vms / iframes.\\n */\\nfunction getType (fn) {\\n var match = fn && fn.toString().match(/^\\\\s*function (\\\\w+)/);\\n return match && match[1]\\n}\\n\\nfunction isBooleanType (fn) {\\n if (!Array.isArray(fn)) {\\n return getType(fn) === 'Boolean'\\n }\\n for (var i = 0, len = fn.length; i < len; i++) {\\n if (getType(fn[i]) === 'Boolean') {\\n return true\\n }\\n }\\n /* istanbul ignore next */\\n return false\\n}\\n\\n\\n\\nvar util = Object.freeze({\\n\\tdefineReactive: defineReactive$$1,\\n\\t_toString: _toString,\\n\\ttoNumber: toNumber,\\n\\tmakeMap: makeMap,\\n\\tisBuiltInTag: isBuiltInTag,\\n\\tremove: remove$1,\\n\\thasOwn: hasOwn,\\n\\tisPrimitive: isPrimitive,\\n\\tcached: cached,\\n\\tcamelize: camelize,\\n\\tcapitalize: capitalize,\\n\\thyphenate: hyphenate,\\n\\tbind: bind$1,\\n\\ttoArray: toArray,\\n\\textend: extend,\\n\\tisObject: isObject,\\n\\tisPlainObject: isPlainObject,\\n\\ttoObject: toObject,\\n\\tnoop: noop,\\n\\tno: no,\\n\\tidentity: identity,\\n\\tgenStaticKeys: genStaticKeys,\\n\\tlooseEqual: looseEqual,\\n\\tlooseIndexOf: looseIndexOf,\\n\\tisReserved: isReserved,\\n\\tdef: def,\\n\\tparsePath: parsePath,\\n\\thasProto: hasProto,\\n\\tinBrowser: inBrowser,\\n\\tUA: UA,\\n\\tisIE: isIE,\\n\\tisIE9: isIE9,\\n\\tisEdge: isEdge,\\n\\tisAndroid: isAndroid,\\n\\tisIOS: isIOS,\\n\\tisServerRendering: isServerRendering,\\n\\tdevtools: devtools,\\n\\tnextTick: nextTick,\\n\\tget _Set () { return _Set; },\\n\\tmergeOptions: mergeOptions,\\n\\tresolveAsset: resolveAsset,\\n\\tget warn () { return warn; },\\n\\tget formatComponentName () { return formatComponentName; },\\n\\tvalidateProp: validateProp\\n});\\n\\n/* not type checking this file because flow doesn't play well with Proxy */\\n\\nvar initProxy;\\n\\n{\\n var allowedGlobals = makeMap(\\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\\n 'require' // for Webpack/Browserify\\n );\\n\\n var warnNonPresent = function (target, key) {\\n warn(\\n \\\"Property or method \\\\\\\"\\\" + key + \\\"\\\\\\\" is not defined on the instance but \\\" +\\n \\\"referenced during render. Make sure to declare reactive data \\\" +\\n \\\"properties in the data option.\\\",\\n target\\n );\\n };\\n\\n var hasProxy =\\n typeof Proxy !== 'undefined' &&\\n Proxy.toString().match(/native code/);\\n\\n if (hasProxy) {\\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta');\\n config.keyCodes = new Proxy(config.keyCodes, {\\n set: function set (target, key, value) {\\n if (isBuiltInModifier(key)) {\\n warn((\\\"Avoid overwriting built-in modifier in config.keyCodes: .\\\" + key));\\n return false\\n } else {\\n target[key] = value;\\n return true\\n }\\n }\\n });\\n }\\n\\n var hasHandler = {\\n has: function has (target, key) {\\n var has = key in target;\\n var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\\n if (!has && !isAllowed) {\\n warnNonPresent(target, key);\\n }\\n return has || !isAllowed\\n }\\n };\\n\\n var getHandler = {\\n get: function get (target, key) {\\n if (typeof key === 'string' && !(key in target)) {\\n warnNonPresent(target, key);\\n }\\n return target[key]\\n }\\n };\\n\\n initProxy = function initProxy (vm) {\\n if (hasProxy) {\\n // determine which proxy handler to use\\n var options = vm.$options;\\n var handlers = options.render && options.render._withStripped\\n ? getHandler\\n : hasHandler;\\n vm._renderProxy = new Proxy(vm, handlers);\\n } else {\\n vm._renderProxy = vm;\\n }\\n };\\n}\\n\\n/* */\\n\\n\\nvar queue = [];\\nvar has$1 = {};\\nvar circular = {};\\nvar waiting = false;\\nvar flushing = false;\\nvar index = 0;\\n\\n/**\\n * Reset the scheduler's state.\\n */\\nfunction resetSchedulerState () {\\n queue.length = 0;\\n has$1 = {};\\n {\\n circular = {};\\n }\\n waiting = flushing = false;\\n}\\n\\n/**\\n * Flush both queues and run the watchers.\\n */\\nfunction flushSchedulerQueue () {\\n flushing = true;\\n\\n // Sort queue before flush.\\n // This ensures that:\\n // 1. Components are updated from parent to child. (because parent is always\\n // created before the child)\\n // 2. A component's user watchers are run before its render watcher (because\\n // user watchers are created before the render watcher)\\n // 3. If a component is destroyed during a parent component's watcher run,\\n // its watchers can be skipped.\\n queue.sort(function (a, b) { return a.id - b.id; });\\n\\n // do not cache length because more watchers might be pushed\\n // as we run existing watchers\\n for (index = 0; index < queue.length; index++) {\\n var watcher = queue[index];\\n var id = watcher.id;\\n has$1[id] = null;\\n watcher.run();\\n // in dev build, check and stop circular updates.\\n if (\\\"development\\\" !== 'production' && has$1[id] != null) {\\n circular[id] = (circular[id] || 0) + 1;\\n if (circular[id] > config._maxUpdateCount) {\\n warn(\\n 'You may have an infinite update loop ' + (\\n watcher.user\\n ? (\\\"in watcher with expression \\\\\\\"\\\" + (watcher.expression) + \\\"\\\\\\\"\\\")\\n : \\\"in a component render function.\\\"\\n ),\\n watcher.vm\\n );\\n break\\n }\\n }\\n }\\n\\n // devtool hook\\n /* istanbul ignore if */\\n if (devtools && config.devtools) {\\n devtools.emit('flush');\\n }\\n\\n resetSchedulerState();\\n}\\n\\n/**\\n * Push a watcher into the watcher queue.\\n * Jobs with duplicate IDs will be skipped unless it's\\n * pushed when the queue is being flushed.\\n */\\nfunction queueWatcher (watcher) {\\n var id = watcher.id;\\n if (has$1[id] == null) {\\n has$1[id] = true;\\n if (!flushing) {\\n queue.push(watcher);\\n } else {\\n // if already flushing, splice the watcher based on its id\\n // if already past its id, it will be run next immediately.\\n var i = queue.length - 1;\\n while (i >= 0 && queue[i].id > watcher.id) {\\n i--;\\n }\\n queue.splice(Math.max(i, index) + 1, 0, watcher);\\n }\\n // queue the flush\\n if (!waiting) {\\n waiting = true;\\n nextTick(flushSchedulerQueue);\\n }\\n }\\n}\\n\\n/* */\\n\\nvar uid$2 = 0;\\n\\n/**\\n * A watcher parses an expression, collects dependencies,\\n * and fires callback when the expression value changes.\\n * This is used for both the $watch() api and directives.\\n */\\nvar Watcher = function Watcher (\\n vm,\\n expOrFn,\\n cb,\\n options\\n) {\\n if ( options === void 0 ) options = {};\\n\\n this.vm = vm;\\n vm._watchers.push(this);\\n // options\\n this.deep = !!options.deep;\\n this.user = !!options.user;\\n this.lazy = !!options.lazy;\\n this.sync = !!options.sync;\\n this.expression = expOrFn.toString();\\n this.cb = cb;\\n this.id = ++uid$2; // uid for batching\\n this.active = true;\\n this.dirty = this.lazy; // for lazy watchers\\n this.deps = [];\\n this.newDeps = [];\\n this.depIds = new _Set();\\n this.newDepIds = new _Set();\\n // parse expression for getter\\n if (typeof expOrFn === 'function') {\\n this.getter = expOrFn;\\n } else {\\n this.getter = parsePath(expOrFn);\\n if (!this.getter) {\\n this.getter = function () {};\\n \\\"development\\\" !== 'production' && warn(\\n \\\"Failed watching path: \\\\\\\"\\\" + expOrFn + \\\"\\\\\\\" \\\" +\\n 'Watcher only accepts simple dot-delimited paths. ' +\\n 'For full control, use a function instead.',\\n vm\\n );\\n }\\n }\\n this.value = this.lazy\\n ? undefined\\n : this.get();\\n};\\n\\n/**\\n * Evaluate the getter, and re-collect dependencies.\\n */\\nWatcher.prototype.get = function get () {\\n pushTarget(this);\\n var value = this.getter.call(this.vm, this.vm);\\n // \\\"touch\\\" every property so they are all tracked as\\n // dependencies for deep watching\\n if (this.deep) {\\n traverse(value);\\n }\\n popTarget();\\n this.cleanupDeps();\\n return value\\n};\\n\\n/**\\n * Add a dependency to this directive.\\n */\\nWatcher.prototype.addDep = function addDep (dep) {\\n var id = dep.id;\\n if (!this.newDepIds.has(id)) {\\n this.newDepIds.add(id);\\n this.newDeps.push(dep);\\n if (!this.depIds.has(id)) {\\n dep.addSub(this);\\n }\\n }\\n};\\n\\n/**\\n * Clean up for dependency collection.\\n */\\nWatcher.prototype.cleanupDeps = function cleanupDeps () {\\n var this$1 = this;\\n\\n var i = this.deps.length;\\n while (i--) {\\n var dep = this$1.deps[i];\\n if (!this$1.newDepIds.has(dep.id)) {\\n dep.removeSub(this$1);\\n }\\n }\\n var tmp = this.depIds;\\n this.depIds = this.newDepIds;\\n this.newDepIds = tmp;\\n this.newDepIds.clear();\\n tmp = this.deps;\\n this.deps = this.newDeps;\\n this.newDeps = tmp;\\n this.newDeps.length = 0;\\n};\\n\\n/**\\n * Subscriber interface.\\n * Will be called when a dependency changes.\\n */\\nWatcher.prototype.update = function update () {\\n /* istanbul ignore else */\\n if (this.lazy) {\\n this.dirty = true;\\n } else if (this.sync) {\\n this.run();\\n } else {\\n queueWatcher(this);\\n }\\n};\\n\\n/**\\n * Scheduler job interface.\\n * Will be called by the scheduler.\\n */\\nWatcher.prototype.run = function run () {\\n if (this.active) {\\n var value = this.get();\\n if (\\n value !== this.value ||\\n // Deep watchers and watchers on Object/Arrays should fire even\\n // when the value is the same, because the value may\\n // have mutated.\\n isObject(value) ||\\n this.deep\\n ) {\\n // set new value\\n var oldValue = this.value;\\n this.value = value;\\n if (this.user) {\\n try {\\n this.cb.call(this.vm, value, oldValue);\\n } catch (e) {\\n /* istanbul ignore else */\\n if (config.errorHandler) {\\n config.errorHandler.call(null, e, this.vm);\\n } else {\\n \\\"development\\\" !== 'production' && warn(\\n (\\\"Error in watcher \\\\\\\"\\\" + (this.expression) + \\\"\\\\\\\"\\\"),\\n this.vm\\n );\\n throw e\\n }\\n }\\n } else {\\n this.cb.call(this.vm, value, oldValue);\\n }\\n }\\n }\\n};\\n\\n/**\\n * Evaluate the value of the watcher.\\n * This only gets called for lazy watchers.\\n */\\nWatcher.prototype.evaluate = function evaluate () {\\n this.value = this.get();\\n this.dirty = false;\\n};\\n\\n/**\\n * Depend on all deps collected by this watcher.\\n */\\nWatcher.prototype.depend = function depend () {\\n var this$1 = this;\\n\\n var i = this.deps.length;\\n while (i--) {\\n this$1.deps[i].depend();\\n }\\n};\\n\\n/**\\n * Remove self from all dependencies' subscriber list.\\n */\\nWatcher.prototype.teardown = function teardown () {\\n var this$1 = this;\\n\\n if (this.active) {\\n // remove self from vm's watcher list\\n // this is a somewhat expensive operation so we skip it\\n // if the vm is being destroyed or is performing a v-for\\n // re-render (the watcher list is then filtered by v-for).\\n if (!this.vm._isBeingDestroyed && !this.vm._vForRemoving) {\\n remove$1(this.vm._watchers, this);\\n }\\n var i = this.deps.length;\\n while (i--) {\\n this$1.deps[i].removeSub(this$1);\\n }\\n this.active = false;\\n }\\n};\\n\\n/**\\n * Recursively traverse an object to evoke all converted\\n * getters, so that every nested property inside the object\\n * is collected as a \\\"deep\\\" dependency.\\n */\\nvar seenObjects = new _Set();\\nfunction traverse (val) {\\n seenObjects.clear();\\n _traverse(val, seenObjects);\\n}\\n\\nfunction _traverse (val, seen) {\\n var i, keys;\\n var isA = Array.isArray(val);\\n if ((!isA && !isObject(val)) || !Object.isExtensible(val)) {\\n return\\n }\\n if (val.__ob__) {\\n var depId = val.__ob__.dep.id;\\n if (seen.has(depId)) {\\n return\\n }\\n seen.add(depId);\\n }\\n if (isA) {\\n i = val.length;\\n while (i--) { _traverse(val[i], seen); }\\n } else {\\n keys = Object.keys(val);\\n i = keys.length;\\n while (i--) { _traverse(val[keys[i]], seen); }\\n }\\n}\\n\\n/* */\\n\\nfunction initState (vm) {\\n vm._watchers = [];\\n initProps(vm);\\n initMethods(vm);\\n initData(vm);\\n initComputed(vm);\\n initWatch(vm);\\n}\\n\\nvar isReservedProp = { key: 1, ref: 1, slot: 1 };\\n\\nfunction initProps (vm) {\\n var props = vm.$options.props;\\n if (props) {\\n var propsData = vm.$options.propsData || {};\\n var keys = vm.$options._propKeys = Object.keys(props);\\n var isRoot = !vm.$parent;\\n // root instance props should be converted\\n observerState.shouldConvert = isRoot;\\n var loop = function ( i ) {\\n var key = keys[i];\\n /* istanbul ignore else */\\n {\\n if (isReservedProp[key]) {\\n warn(\\n (\\\"\\\\\\\"\\\" + key + \\\"\\\\\\\" is a reserved attribute and cannot be used as component prop.\\\"),\\n vm\\n );\\n }\\n defineReactive$$1(vm, key, validateProp(key, props, propsData, vm), function () {\\n if (vm.$parent && !observerState.isSettingProps) {\\n warn(\\n \\\"Avoid mutating a prop directly since the value will be \\\" +\\n \\\"overwritten whenever the parent component re-renders. \\\" +\\n \\\"Instead, use a data or computed property based on the prop's \\\" +\\n \\\"value. Prop being mutated: \\\\\\\"\\\" + key + \\\"\\\\\\\"\\\",\\n vm\\n );\\n }\\n });\\n }\\n };\\n\\n for (var i = 0; i < keys.length; i++) loop( i );\\n observerState.shouldConvert = true;\\n }\\n}\\n\\nfunction initData (vm) {\\n var data = vm.$options.data;\\n data = vm._data = typeof data === 'function'\\n ? data.call(vm)\\n : data || {};\\n if (!isPlainObject(data)) {\\n data = {};\\n \\\"development\\\" !== 'production' && warn(\\n 'data functions should return an object:\\\\n' +\\n 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',\\n vm\\n );\\n }\\n // proxy data on instance\\n var keys = Object.keys(data);\\n var props = vm.$options.props;\\n var i = keys.length;\\n while (i--) {\\n if (props && hasOwn(props, keys[i])) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"The data property \\\\\\\"\\\" + (keys[i]) + \\\"\\\\\\\" is already declared as a prop. \\\" +\\n \\\"Use prop default value instead.\\\",\\n vm\\n );\\n } else {\\n proxy(vm, keys[i]);\\n }\\n }\\n // observe data\\n observe(data);\\n data.__ob__ && data.__ob__.vmCount++;\\n}\\n\\nvar computedSharedDefinition = {\\n enumerable: true,\\n configurable: true,\\n get: noop,\\n set: noop\\n};\\n\\nfunction initComputed (vm) {\\n var computed = vm.$options.computed;\\n if (computed) {\\n for (var key in computed) {\\n var userDef = computed[key];\\n if (typeof userDef === 'function') {\\n computedSharedDefinition.get = makeComputedGetter(userDef, vm);\\n computedSharedDefinition.set = noop;\\n } else {\\n computedSharedDefinition.get = userDef.get\\n ? userDef.cache !== false\\n ? makeComputedGetter(userDef.get, vm)\\n : bind$1(userDef.get, vm)\\n : noop;\\n computedSharedDefinition.set = userDef.set\\n ? bind$1(userDef.set, vm)\\n : noop;\\n }\\n Object.defineProperty(vm, key, computedSharedDefinition);\\n }\\n }\\n}\\n\\nfunction makeComputedGetter (getter, owner) {\\n var watcher = new Watcher(owner, getter, noop, {\\n lazy: true\\n });\\n return function computedGetter () {\\n if (watcher.dirty) {\\n watcher.evaluate();\\n }\\n if (Dep.target) {\\n watcher.depend();\\n }\\n return watcher.value\\n }\\n}\\n\\nfunction initMethods (vm) {\\n var methods = vm.$options.methods;\\n if (methods) {\\n for (var key in methods) {\\n vm[key] = methods[key] == null ? noop : bind$1(methods[key], vm);\\n if (\\\"development\\\" !== 'production' && methods[key] == null) {\\n warn(\\n \\\"method \\\\\\\"\\\" + key + \\\"\\\\\\\" has an undefined value in the component definition. \\\" +\\n \\\"Did you reference the function correctly?\\\",\\n vm\\n );\\n }\\n }\\n }\\n}\\n\\nfunction initWatch (vm) {\\n var watch = vm.$options.watch;\\n if (watch) {\\n for (var key in watch) {\\n var handler = watch[key];\\n if (Array.isArray(handler)) {\\n for (var i = 0; i < handler.length; i++) {\\n createWatcher(vm, key, handler[i]);\\n }\\n } else {\\n createWatcher(vm, key, handler);\\n }\\n }\\n }\\n}\\n\\nfunction createWatcher (vm, key, handler) {\\n var options;\\n if (isPlainObject(handler)) {\\n options = handler;\\n handler = handler.handler;\\n }\\n if (typeof handler === 'string') {\\n handler = vm[handler];\\n }\\n vm.$watch(key, handler, options);\\n}\\n\\nfunction stateMixin (Vue) {\\n // flow somehow has problems with directly declared definition object\\n // when using Object.defineProperty, so we have to procedurally build up\\n // the object here.\\n var dataDef = {};\\n dataDef.get = function () {\\n return this._data\\n };\\n {\\n dataDef.set = function (newData) {\\n warn(\\n 'Avoid replacing instance root $data. ' +\\n 'Use nested data properties instead.',\\n this\\n );\\n };\\n }\\n Object.defineProperty(Vue.prototype, '$data', dataDef);\\n\\n Vue.prototype.$set = set$1;\\n Vue.prototype.$delete = del;\\n\\n Vue.prototype.$watch = function (\\n expOrFn,\\n cb,\\n options\\n ) {\\n var vm = this;\\n options = options || {};\\n options.user = true;\\n var watcher = new Watcher(vm, expOrFn, cb, options);\\n if (options.immediate) {\\n cb.call(vm, watcher.value);\\n }\\n return function unwatchFn () {\\n watcher.teardown();\\n }\\n };\\n}\\n\\nfunction proxy (vm, key) {\\n if (!isReserved(key)) {\\n Object.defineProperty(vm, key, {\\n configurable: true,\\n enumerable: true,\\n get: function proxyGetter () {\\n return vm._data[key]\\n },\\n set: function proxySetter (val) {\\n vm._data[key] = val;\\n }\\n });\\n }\\n}\\n\\n/* */\\n\\nvar VNode = function VNode (\\n tag,\\n data,\\n children,\\n text,\\n elm,\\n context,\\n componentOptions\\n) {\\n this.tag = tag;\\n this.data = data;\\n this.children = children;\\n this.text = text;\\n this.elm = elm;\\n this.ns = undefined;\\n this.context = context;\\n this.functionalContext = undefined;\\n this.key = data && data.key;\\n this.componentOptions = componentOptions;\\n this.child = undefined;\\n this.parent = undefined;\\n this.raw = false;\\n this.isStatic = false;\\n this.isRootInsert = true;\\n this.isComment = false;\\n this.isCloned = false;\\n this.isOnce = false;\\n};\\n\\nvar createEmptyVNode = function () {\\n var node = new VNode();\\n node.text = '';\\n node.isComment = true;\\n return node\\n};\\n\\nfunction createTextVNode (val) {\\n return new VNode(undefined, undefined, undefined, String(val))\\n}\\n\\n// optimized shallow clone\\n// used for static nodes and slot nodes because they may be reused across\\n// multiple renders, cloning them avoids errors when DOM manipulations rely\\n// on their elm reference.\\nfunction cloneVNode (vnode) {\\n var cloned = new VNode(\\n vnode.tag,\\n vnode.data,\\n vnode.children,\\n vnode.text,\\n vnode.elm,\\n vnode.context,\\n vnode.componentOptions\\n );\\n cloned.ns = vnode.ns;\\n cloned.isStatic = vnode.isStatic;\\n cloned.key = vnode.key;\\n cloned.isCloned = true;\\n return cloned\\n}\\n\\nfunction cloneVNodes (vnodes) {\\n var res = new Array(vnodes.length);\\n for (var i = 0; i < vnodes.length; i++) {\\n res[i] = cloneVNode(vnodes[i]);\\n }\\n return res\\n}\\n\\n/* */\\n\\nvar activeInstance = null;\\n\\nfunction initLifecycle (vm) {\\n var options = vm.$options;\\n\\n // locate first non-abstract parent\\n var parent = options.parent;\\n if (parent && !options.abstract) {\\n while (parent.$options.abstract && parent.$parent) {\\n parent = parent.$parent;\\n }\\n parent.$children.push(vm);\\n }\\n\\n vm.$parent = parent;\\n vm.$root = parent ? parent.$root : vm;\\n\\n vm.$children = [];\\n vm.$refs = {};\\n\\n vm._watcher = null;\\n vm._inactive = false;\\n vm._isMounted = false;\\n vm._isDestroyed = false;\\n vm._isBeingDestroyed = false;\\n}\\n\\nfunction lifecycleMixin (Vue) {\\n Vue.prototype._mount = function (\\n el,\\n hydrating\\n ) {\\n var vm = this;\\n vm.$el = el;\\n if (!vm.$options.render) {\\n vm.$options.render = createEmptyVNode;\\n {\\n /* istanbul ignore if */\\n if (vm.$options.template && vm.$options.template.charAt(0) !== '#') {\\n warn(\\n 'You are using the runtime-only build of Vue where the template ' +\\n 'option is not available. Either pre-compile the templates into ' +\\n 'render functions, or use the compiler-included build.',\\n vm\\n );\\n } else {\\n warn(\\n 'Failed to mount component: template or render function not defined.',\\n vm\\n );\\n }\\n }\\n }\\n callHook(vm, 'beforeMount');\\n vm._watcher = new Watcher(vm, function () {\\n vm._update(vm._render(), hydrating);\\n }, noop);\\n hydrating = false;\\n // manually mounted instance, call mounted on self\\n // mounted is called for render-created child components in its inserted hook\\n if (vm.$vnode == null) {\\n vm._isMounted = true;\\n callHook(vm, 'mounted');\\n }\\n return vm\\n };\\n\\n Vue.prototype._update = function (vnode, hydrating) {\\n var vm = this;\\n if (vm._isMounted) {\\n callHook(vm, 'beforeUpdate');\\n }\\n var prevEl = vm.$el;\\n var prevVnode = vm._vnode;\\n var prevActiveInstance = activeInstance;\\n activeInstance = vm;\\n vm._vnode = vnode;\\n // Vue.prototype.__patch__ is injected in entry points\\n // based on the rendering backend used.\\n if (!prevVnode) {\\n // initial render\\n vm.$el = vm.__patch__(\\n vm.$el, vnode, hydrating, false /* removeOnly */,\\n vm.$options._parentElm,\\n vm.$options._refElm\\n );\\n } else {\\n // updates\\n vm.$el = vm.__patch__(prevVnode, vnode);\\n }\\n activeInstance = prevActiveInstance;\\n // update __vue__ reference\\n if (prevEl) {\\n prevEl.__vue__ = null;\\n }\\n if (vm.$el) {\\n vm.$el.__vue__ = vm;\\n }\\n // if parent is an HOC, update its $el as well\\n if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {\\n vm.$parent.$el = vm.$el;\\n }\\n if (vm._isMounted) {\\n callHook(vm, 'updated');\\n }\\n };\\n\\n Vue.prototype._updateFromParent = function (\\n propsData,\\n listeners,\\n parentVnode,\\n renderChildren\\n ) {\\n var vm = this;\\n var hasChildren = !!(vm.$options._renderChildren || renderChildren);\\n vm.$options._parentVnode = parentVnode;\\n vm.$vnode = parentVnode; // update vm's placeholder node without re-render\\n if (vm._vnode) { // update child tree's parent\\n vm._vnode.parent = parentVnode;\\n }\\n vm.$options._renderChildren = renderChildren;\\n // update props\\n if (propsData && vm.$options.props) {\\n observerState.shouldConvert = false;\\n {\\n observerState.isSettingProps = true;\\n }\\n var propKeys = vm.$options._propKeys || [];\\n for (var i = 0; i < propKeys.length; i++) {\\n var key = propKeys[i];\\n vm[key] = validateProp(key, vm.$options.props, propsData, vm);\\n }\\n observerState.shouldConvert = true;\\n {\\n observerState.isSettingProps = false;\\n }\\n vm.$options.propsData = propsData;\\n }\\n // update listeners\\n if (listeners) {\\n var oldListeners = vm.$options._parentListeners;\\n vm.$options._parentListeners = listeners;\\n vm._updateListeners(listeners, oldListeners);\\n }\\n // resolve slots + force update if has children\\n if (hasChildren) {\\n vm.$slots = resolveSlots(renderChildren, parentVnode.context);\\n vm.$forceUpdate();\\n }\\n };\\n\\n Vue.prototype.$forceUpdate = function () {\\n var vm = this;\\n if (vm._watcher) {\\n vm._watcher.update();\\n }\\n };\\n\\n Vue.prototype.$destroy = function () {\\n var vm = this;\\n if (vm._isBeingDestroyed) {\\n return\\n }\\n callHook(vm, 'beforeDestroy');\\n vm._isBeingDestroyed = true;\\n // remove self from parent\\n var parent = vm.$parent;\\n if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {\\n remove$1(parent.$children, vm);\\n }\\n // teardown watchers\\n if (vm._watcher) {\\n vm._watcher.teardown();\\n }\\n var i = vm._watchers.length;\\n while (i--) {\\n vm._watchers[i].teardown();\\n }\\n // remove reference from data ob\\n // frozen object may not have observer.\\n if (vm._data.__ob__) {\\n vm._data.__ob__.vmCount--;\\n }\\n // call the last hook...\\n vm._isDestroyed = true;\\n callHook(vm, 'destroyed');\\n // turn off all instance listeners.\\n vm.$off();\\n // remove __vue__ reference\\n if (vm.$el) {\\n vm.$el.__vue__ = null;\\n }\\n // invoke destroy hooks on current rendered tree\\n vm.__patch__(vm._vnode, null);\\n };\\n}\\n\\nfunction callHook (vm, hook) {\\n var handlers = vm.$options[hook];\\n if (handlers) {\\n for (var i = 0, j = handlers.length; i < j; i++) {\\n handlers[i].call(vm);\\n }\\n }\\n vm.$emit('hook:' + hook);\\n}\\n\\n/* */\\n\\nvar hooks = { init: init, prepatch: prepatch, insert: insert, destroy: destroy$1 };\\nvar hooksToMerge = Object.keys(hooks);\\n\\nfunction createComponent (\\n Ctor,\\n data,\\n context,\\n children,\\n tag\\n) {\\n if (!Ctor) {\\n return\\n }\\n\\n var baseCtor = context.$options._base;\\n if (isObject(Ctor)) {\\n Ctor = baseCtor.extend(Ctor);\\n }\\n\\n if (typeof Ctor !== 'function') {\\n {\\n warn((\\\"Invalid Component definition: \\\" + (String(Ctor))), context);\\n }\\n return\\n }\\n\\n // async component\\n if (!Ctor.cid) {\\n if (Ctor.resolved) {\\n Ctor = Ctor.resolved;\\n } else {\\n Ctor = resolveAsyncComponent(Ctor, baseCtor, function () {\\n // it's ok to queue this on every render because\\n // $forceUpdate is buffered by the scheduler.\\n context.$forceUpdate();\\n });\\n if (!Ctor) {\\n // return nothing if this is indeed an async component\\n // wait for the callback to trigger parent update.\\n return\\n }\\n }\\n }\\n\\n // resolve constructor options in case global mixins are applied after\\n // component constructor creation\\n resolveConstructorOptions(Ctor);\\n\\n data = data || {};\\n\\n // extract props\\n var propsData = extractProps(data, Ctor);\\n\\n // functional component\\n if (Ctor.options.functional) {\\n return createFunctionalComponent(Ctor, propsData, data, context, children)\\n }\\n\\n // extract listeners, since these needs to be treated as\\n // child component listeners instead of DOM listeners\\n var listeners = data.on;\\n // replace with listeners with .native modifier\\n data.on = data.nativeOn;\\n\\n if (Ctor.options.abstract) {\\n // abstract components do not keep anything\\n // other than props & listeners\\n data = {};\\n }\\n\\n // merge component management hooks onto the placeholder node\\n mergeHooks(data);\\n\\n // return a placeholder vnode\\n var name = Ctor.options.name || tag;\\n var vnode = new VNode(\\n (\\\"vue-component-\\\" + (Ctor.cid) + (name ? (\\\"-\\\" + name) : '')),\\n data, undefined, undefined, undefined, context,\\n { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }\\n );\\n return vnode\\n}\\n\\nfunction createFunctionalComponent (\\n Ctor,\\n propsData,\\n data,\\n context,\\n children\\n) {\\n var props = {};\\n var propOptions = Ctor.options.props;\\n if (propOptions) {\\n for (var key in propOptions) {\\n props[key] = validateProp(key, propOptions, propsData);\\n }\\n }\\n // ensure the createElement function in functional components\\n // gets a unique context - this is necessary for correct named slot check\\n var _context = Object.create(context);\\n var h = function (a, b, c, d) { return createElement(_context, a, b, c, d, true); };\\n var vnode = Ctor.options.render.call(null, h, {\\n props: props,\\n data: data,\\n parent: context,\\n children: children,\\n slots: function () { return resolveSlots(children, context); }\\n });\\n if (vnode instanceof VNode) {\\n vnode.functionalContext = context;\\n if (data.slot) {\\n (vnode.data || (vnode.data = {})).slot = data.slot;\\n }\\n }\\n return vnode\\n}\\n\\nfunction createComponentInstanceForVnode (\\n vnode, // we know it's MountedComponentVNode but flow doesn't\\n parent, // activeInstance in lifecycle state\\n parentElm,\\n refElm\\n) {\\n var vnodeComponentOptions = vnode.componentOptions;\\n var options = {\\n _isComponent: true,\\n parent: parent,\\n propsData: vnodeComponentOptions.propsData,\\n _componentTag: vnodeComponentOptions.tag,\\n _parentVnode: vnode,\\n _parentListeners: vnodeComponentOptions.listeners,\\n _renderChildren: vnodeComponentOptions.children,\\n _parentElm: parentElm || null,\\n _refElm: refElm || null\\n };\\n // check inline-template render functions\\n var inlineTemplate = vnode.data.inlineTemplate;\\n if (inlineTemplate) {\\n options.render = inlineTemplate.render;\\n options.staticRenderFns = inlineTemplate.staticRenderFns;\\n }\\n return new vnodeComponentOptions.Ctor(options)\\n}\\n\\nfunction init (\\n vnode,\\n hydrating,\\n parentElm,\\n refElm\\n) {\\n if (!vnode.child || vnode.child._isDestroyed) {\\n var child = vnode.child = createComponentInstanceForVnode(\\n vnode,\\n activeInstance,\\n parentElm,\\n refElm\\n );\\n child.$mount(hydrating ? vnode.elm : undefined, hydrating);\\n } else if (vnode.data.keepAlive) {\\n // kept-alive components, treat as a patch\\n var mountedNode = vnode; // work around flow\\n prepatch(mountedNode, mountedNode);\\n }\\n}\\n\\nfunction prepatch (\\n oldVnode,\\n vnode\\n) {\\n var options = vnode.componentOptions;\\n var child = vnode.child = oldVnode.child;\\n child._updateFromParent(\\n options.propsData, // updated props\\n options.listeners, // updated listeners\\n vnode, // new parent vnode\\n options.children // new children\\n );\\n}\\n\\nfunction insert (vnode) {\\n if (!vnode.child._isMounted) {\\n vnode.child._isMounted = true;\\n callHook(vnode.child, 'mounted');\\n }\\n if (vnode.data.keepAlive) {\\n vnode.child._inactive = false;\\n callHook(vnode.child, 'activated');\\n }\\n}\\n\\nfunction destroy$1 (vnode) {\\n if (!vnode.child._isDestroyed) {\\n if (!vnode.data.keepAlive) {\\n vnode.child.$destroy();\\n } else {\\n vnode.child._inactive = true;\\n callHook(vnode.child, 'deactivated');\\n }\\n }\\n}\\n\\nfunction resolveAsyncComponent (\\n factory,\\n baseCtor,\\n cb\\n) {\\n if (factory.requested) {\\n // pool callbacks\\n factory.pendingCallbacks.push(cb);\\n } else {\\n factory.requested = true;\\n var cbs = factory.pendingCallbacks = [cb];\\n var sync = true;\\n\\n var resolve = function (res) {\\n if (isObject(res)) {\\n res = baseCtor.extend(res);\\n }\\n // cache resolved\\n factory.resolved = res;\\n // invoke callbacks only if this is not a synchronous resolve\\n // (async resolves are shimmed as synchronous during SSR)\\n if (!sync) {\\n for (var i = 0, l = cbs.length; i < l; i++) {\\n cbs[i](res);\\n }\\n }\\n };\\n\\n var reject = function (reason) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"Failed to resolve async component: \\\" + (String(factory)) +\\n (reason ? (\\\"\\\\nReason: \\\" + reason) : '')\\n );\\n };\\n\\n var res = factory(resolve, reject);\\n\\n // handle promise\\n if (res && typeof res.then === 'function' && !factory.resolved) {\\n res.then(resolve, reject);\\n }\\n\\n sync = false;\\n // return in case resolved synchronously\\n return factory.resolved\\n }\\n}\\n\\nfunction extractProps (data, Ctor) {\\n // we are only extracting raw values here.\\n // validation and default values are handled in the child\\n // component itself.\\n var propOptions = Ctor.options.props;\\n if (!propOptions) {\\n return\\n }\\n var res = {};\\n var attrs = data.attrs;\\n var props = data.props;\\n var domProps = data.domProps;\\n if (attrs || props || domProps) {\\n for (var key in propOptions) {\\n var altKey = hyphenate(key);\\n checkProp(res, props, key, altKey, true) ||\\n checkProp(res, attrs, key, altKey) ||\\n checkProp(res, domProps, key, altKey);\\n }\\n }\\n return res\\n}\\n\\nfunction checkProp (\\n res,\\n hash,\\n key,\\n altKey,\\n preserve\\n) {\\n if (hash) {\\n if (hasOwn(hash, key)) {\\n res[key] = hash[key];\\n if (!preserve) {\\n delete hash[key];\\n }\\n return true\\n } else if (hasOwn(hash, altKey)) {\\n res[key] = hash[altKey];\\n if (!preserve) {\\n delete hash[altKey];\\n }\\n return true\\n }\\n }\\n return false\\n}\\n\\nfunction mergeHooks (data) {\\n if (!data.hook) {\\n data.hook = {};\\n }\\n for (var i = 0; i < hooksToMerge.length; i++) {\\n var key = hooksToMerge[i];\\n var fromParent = data.hook[key];\\n var ours = hooks[key];\\n data.hook[key] = fromParent ? mergeHook$1(ours, fromParent) : ours;\\n }\\n}\\n\\nfunction mergeHook$1 (one, two) {\\n return function (a, b, c, d) {\\n one(a, b, c, d);\\n two(a, b, c, d);\\n }\\n}\\n\\n/* */\\n\\nfunction mergeVNodeHook (def, hookKey, hook, key) {\\n key = key + hookKey;\\n var injectedHash = def.__injected || (def.__injected = {});\\n if (!injectedHash[key]) {\\n injectedHash[key] = true;\\n var oldHook = def[hookKey];\\n if (oldHook) {\\n def[hookKey] = function () {\\n oldHook.apply(this, arguments);\\n hook.apply(this, arguments);\\n };\\n } else {\\n def[hookKey] = hook;\\n }\\n }\\n}\\n\\n/* */\\n\\nfunction updateListeners (\\n on,\\n oldOn,\\n add,\\n remove$$1,\\n vm\\n) {\\n var name, cur, old, fn, event, capture, once;\\n for (name in on) {\\n cur = on[name];\\n old = oldOn[name];\\n if (!cur) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"Invalid handler for event \\\\\\\"\\\" + name + \\\"\\\\\\\": got \\\" + String(cur),\\n vm\\n );\\n } else if (!old) {\\n once = name.charAt(0) === '~'; // Prefixed last, checked first\\n event = once ? name.slice(1) : name;\\n capture = event.charAt(0) === '!';\\n event = capture ? event.slice(1) : event;\\n if (Array.isArray(cur)) {\\n add(event, (cur.invoker = arrInvoker(cur)), once, capture);\\n } else {\\n if (!cur.invoker) {\\n fn = cur;\\n cur = on[name] = {};\\n cur.fn = fn;\\n cur.invoker = fnInvoker(cur);\\n }\\n add(event, cur.invoker, once, capture);\\n }\\n } else if (cur !== old) {\\n if (Array.isArray(old)) {\\n old.length = cur.length;\\n for (var i = 0; i < old.length; i++) { old[i] = cur[i]; }\\n on[name] = old;\\n } else {\\n old.fn = cur;\\n on[name] = old;\\n }\\n }\\n }\\n for (name in oldOn) {\\n if (!on[name]) {\\n once = name.charAt(0) === '~'; // Prefixed last, checked first\\n event = once ? name.slice(1) : name;\\n capture = event.charAt(0) === '!';\\n event = capture ? event.slice(1) : event;\\n remove$$1(event, oldOn[name].invoker, capture);\\n }\\n }\\n}\\n\\nfunction arrInvoker (arr) {\\n return function (ev) {\\n var arguments$1 = arguments;\\n\\n var single = arguments.length === 1;\\n for (var i = 0; i < arr.length; i++) {\\n single ? arr[i](ev) : arr[i].apply(null, arguments$1);\\n }\\n }\\n}\\n\\nfunction fnInvoker (o) {\\n return function (ev) {\\n var single = arguments.length === 1;\\n single ? o.fn(ev) : o.fn.apply(null, arguments);\\n }\\n}\\n\\n/* */\\n\\nfunction normalizeChildren (children) {\\n return isPrimitive(children)\\n ? [createTextVNode(children)]\\n : Array.isArray(children)\\n ? normalizeArrayChildren(children)\\n : undefined\\n}\\n\\nfunction normalizeArrayChildren (children, nestedIndex) {\\n var res = [];\\n var i, c, last;\\n for (i = 0; i < children.length; i++) {\\n c = children[i];\\n if (c == null || typeof c === 'boolean') { continue }\\n last = res[res.length - 1];\\n // nested\\n if (Array.isArray(c)) {\\n res.push.apply(res, normalizeArrayChildren(c, ((nestedIndex || '') + \\\"_\\\" + i)));\\n } else if (isPrimitive(c)) {\\n if (last && last.text) {\\n last.text += String(c);\\n } else if (c !== '') {\\n // convert primitive to vnode\\n res.push(createTextVNode(c));\\n }\\n } else {\\n if (c.text && last && last.text) {\\n res[res.length - 1] = createTextVNode(last.text + c.text);\\n } else {\\n // default key for nested array children (likely generated by v-for)\\n if (c.tag && c.key == null && nestedIndex != null) {\\n c.key = \\\"__vlist\\\" + nestedIndex + \\\"_\\\" + i + \\\"__\\\";\\n }\\n res.push(c);\\n }\\n }\\n }\\n return res\\n}\\n\\n/* */\\n\\nfunction getFirstComponentChild (children) {\\n return children && children.filter(function (c) { return c && c.componentOptions; })[0]\\n}\\n\\n/* */\\n\\n// wrapper function for providing a more flexible interface\\n// without getting yelled at by flow\\nfunction createElement (\\n context,\\n tag,\\n data,\\n children,\\n needNormalization,\\n alwaysNormalize\\n) {\\n if (Array.isArray(data) || isPrimitive(data)) {\\n needNormalization = children;\\n children = data;\\n data = undefined;\\n }\\n if (alwaysNormalize) { needNormalization = true; }\\n return _createElement(context, tag, data, children, needNormalization)\\n}\\n\\nfunction _createElement (\\n context,\\n tag,\\n data,\\n children,\\n needNormalization\\n) {\\n if (data && data.__ob__) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"Avoid using observed data object as vnode data: \\\" + (JSON.stringify(data)) + \\\"\\\\n\\\" +\\n 'Always create fresh vnode data objects in each render!',\\n context\\n );\\n return createEmptyVNode()\\n }\\n if (!tag) {\\n // in case of component :is set to falsy value\\n return createEmptyVNode()\\n }\\n // support single function children as default scoped slot\\n if (Array.isArray(children) &&\\n typeof children[0] === 'function') {\\n data = data || {};\\n data.scopedSlots = { default: children[0] };\\n children.length = 0;\\n }\\n if (needNormalization) {\\n children = normalizeChildren(children);\\n }\\n var vnode, ns;\\n if (typeof tag === 'string') {\\n var Ctor;\\n ns = config.getTagNamespace(tag);\\n if (config.isReservedTag(tag)) {\\n // platform built-in elements\\n vnode = new VNode(\\n config.parsePlatformTagName(tag), data, children,\\n undefined, undefined, context\\n );\\n } else if ((Ctor = resolveAsset(context.$options, 'components', tag))) {\\n // component\\n vnode = createComponent(Ctor, data, context, children, tag);\\n } else {\\n // unknown or unlisted namespaced elements\\n // check at runtime because it may get assigned a namespace when its\\n // parent normalizes children\\n ns = tag === 'foreignObject' ? 'xhtml' : ns;\\n vnode = new VNode(\\n tag, data, children,\\n undefined, undefined, context\\n );\\n }\\n } else {\\n // direct component options / constructor\\n vnode = createComponent(tag, data, context, children);\\n }\\n if (vnode) {\\n if (ns) { applyNS(vnode, ns); }\\n return vnode\\n } else {\\n return createEmptyVNode()\\n }\\n}\\n\\nfunction applyNS (vnode, ns) {\\n vnode.ns = ns;\\n if (vnode.children) {\\n for (var i = 0, l = vnode.children.length; i < l; i++) {\\n var child = vnode.children[i];\\n if (child.tag && !child.ns) {\\n applyNS(child, ns);\\n }\\n }\\n }\\n}\\n\\n/* */\\n\\nfunction initRender (vm) {\\n vm.$vnode = null; // the placeholder node in parent tree\\n vm._vnode = null; // the root of the child tree\\n vm._staticTrees = null;\\n var parentVnode = vm.$options._parentVnode;\\n var renderContext = parentVnode && parentVnode.context;\\n vm.$slots = resolveSlots(vm.$options._renderChildren, renderContext);\\n vm.$scopedSlots = {};\\n // bind the createElement fn to this instance\\n // so that we get proper render context inside it.\\n // args order: tag, data, children, needNormalization, alwaysNormalize\\n // internal version is used by render functions compiled from templates\\n vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };\\n // normalization is always applied for the public version, used in\\n // user-written render functions.\\n vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };\\n if (vm.$options.el) {\\n vm.$mount(vm.$options.el);\\n }\\n}\\n\\nfunction renderMixin (Vue) {\\n Vue.prototype.$nextTick = function (fn) {\\n return nextTick(fn, this)\\n };\\n\\n Vue.prototype._render = function () {\\n var vm = this;\\n var ref = vm.$options;\\n var render = ref.render;\\n var staticRenderFns = ref.staticRenderFns;\\n var _parentVnode = ref._parentVnode;\\n\\n if (vm._isMounted) {\\n // clone slot nodes on re-renders\\n for (var key in vm.$slots) {\\n vm.$slots[key] = cloneVNodes(vm.$slots[key]);\\n }\\n }\\n\\n if (_parentVnode && _parentVnode.data.scopedSlots) {\\n vm.$scopedSlots = _parentVnode.data.scopedSlots;\\n }\\n\\n if (staticRenderFns && !vm._staticTrees) {\\n vm._staticTrees = [];\\n }\\n // set parent vnode. this allows render functions to have access\\n // to the data on the placeholder node.\\n vm.$vnode = _parentVnode;\\n // render self\\n var vnode;\\n try {\\n vnode = render.call(vm._renderProxy, vm.$createElement);\\n } catch (e) {\\n /* istanbul ignore else */\\n if (config.errorHandler) {\\n config.errorHandler.call(null, e, vm);\\n } else {\\n {\\n warn((\\\"Error when rendering \\\" + (formatComponentName(vm)) + \\\":\\\"));\\n }\\n throw e\\n }\\n // return previous vnode to prevent render error causing blank component\\n vnode = vm._vnode;\\n }\\n // return empty vnode in case the render function errored out\\n if (!(vnode instanceof VNode)) {\\n if (\\\"development\\\" !== 'production' && Array.isArray(vnode)) {\\n warn(\\n 'Multiple root nodes returned from render function. Render function ' +\\n 'should return a single root node.',\\n vm\\n );\\n }\\n vnode = createEmptyVNode();\\n }\\n // set parent\\n vnode.parent = _parentVnode;\\n return vnode\\n };\\n\\n // toString for mustaches\\n Vue.prototype._s = _toString;\\n // convert text to vnode\\n Vue.prototype._v = createTextVNode;\\n // number conversion\\n Vue.prototype._n = toNumber;\\n // empty vnode\\n Vue.prototype._e = createEmptyVNode;\\n // loose equal\\n Vue.prototype._q = looseEqual;\\n // loose indexOf\\n Vue.prototype._i = looseIndexOf;\\n\\n // render static tree by index\\n Vue.prototype._m = function renderStatic (\\n index,\\n isInFor\\n ) {\\n var tree = this._staticTrees[index];\\n // if has already-rendered static tree and not inside v-for,\\n // we can reuse the same tree by doing a shallow clone.\\n if (tree && !isInFor) {\\n return Array.isArray(tree)\\n ? cloneVNodes(tree)\\n : cloneVNode(tree)\\n }\\n // otherwise, render a fresh tree.\\n tree = this._staticTrees[index] = this.$options.staticRenderFns[index].call(this._renderProxy);\\n markStatic(tree, (\\\"__static__\\\" + index), false);\\n return tree\\n };\\n\\n // mark node as static (v-once)\\n Vue.prototype._o = function markOnce (\\n tree,\\n index,\\n key\\n ) {\\n markStatic(tree, (\\\"__once__\\\" + index + (key ? (\\\"_\\\" + key) : \\\"\\\")), true);\\n return tree\\n };\\n\\n function markStatic (tree, key, isOnce) {\\n if (Array.isArray(tree)) {\\n for (var i = 0; i < tree.length; i++) {\\n if (tree[i] && typeof tree[i] !== 'string') {\\n markStaticNode(tree[i], (key + \\\"_\\\" + i), isOnce);\\n }\\n }\\n } else {\\n markStaticNode(tree, key, isOnce);\\n }\\n }\\n\\n function markStaticNode (node, key, isOnce) {\\n node.isStatic = true;\\n node.key = key;\\n node.isOnce = isOnce;\\n }\\n\\n // filter resolution helper\\n Vue.prototype._f = function resolveFilter (id) {\\n return resolveAsset(this.$options, 'filters', id, true) || identity\\n };\\n\\n // render v-for\\n Vue.prototype._l = function renderList (\\n val,\\n render\\n ) {\\n var ret, i, l, keys, key;\\n if (Array.isArray(val)) {\\n ret = new Array(val.length);\\n for (i = 0, l = val.length; i < l; i++) {\\n ret[i] = render(val[i], i);\\n }\\n } else if (typeof val === 'number') {\\n ret = new Array(val);\\n for (i = 0; i < val; i++) {\\n ret[i] = render(i + 1, i);\\n }\\n } else if (isObject(val)) {\\n keys = Object.keys(val);\\n ret = new Array(keys.length);\\n for (i = 0, l = keys.length; i < l; i++) {\\n key = keys[i];\\n ret[i] = render(val[key], key, i);\\n }\\n }\\n return ret\\n };\\n\\n // renderSlot\\n Vue.prototype._t = function (\\n name,\\n fallback,\\n props\\n ) {\\n var scopedSlotFn = this.$scopedSlots[name];\\n if (scopedSlotFn) { // scoped slot\\n return scopedSlotFn(props || {}) || fallback\\n } else {\\n var slotNodes = this.$slots[name];\\n // warn duplicate slot usage\\n if (slotNodes && \\\"development\\\" !== 'production') {\\n slotNodes._rendered && warn(\\n \\\"Duplicate presence of slot \\\\\\\"\\\" + name + \\\"\\\\\\\" found in the same render tree \\\" +\\n \\\"- this will likely cause render errors.\\\",\\n this\\n );\\n slotNodes._rendered = true;\\n }\\n return slotNodes || fallback\\n }\\n };\\n\\n // apply v-bind object\\n Vue.prototype._b = function bindProps (\\n data,\\n tag,\\n value,\\n asProp\\n ) {\\n if (value) {\\n if (!isObject(value)) {\\n \\\"development\\\" !== 'production' && warn(\\n 'v-bind without argument expects an Object or Array value',\\n this\\n );\\n } else {\\n if (Array.isArray(value)) {\\n value = toObject(value);\\n }\\n for (var key in value) {\\n if (key === 'class' || key === 'style') {\\n data[key] = value[key];\\n } else {\\n var hash = asProp || config.mustUseProp(tag, key)\\n ? data.domProps || (data.domProps = {})\\n : data.attrs || (data.attrs = {});\\n hash[key] = value[key];\\n }\\n }\\n }\\n }\\n return data\\n };\\n\\n // check v-on keyCodes\\n Vue.prototype._k = function checkKeyCodes (\\n eventKeyCode,\\n key,\\n builtInAlias\\n ) {\\n var keyCodes = config.keyCodes[key] || builtInAlias;\\n if (Array.isArray(keyCodes)) {\\n return keyCodes.indexOf(eventKeyCode) === -1\\n } else {\\n return keyCodes !== eventKeyCode\\n }\\n };\\n}\\n\\nfunction resolveSlots (\\n children,\\n context\\n) {\\n var slots = {};\\n if (!children) {\\n return slots\\n }\\n var defaultSlot = [];\\n var name, child;\\n for (var i = 0, l = children.length; i < l; i++) {\\n child = children[i];\\n // named slots should only be respected if the vnode was rendered in the\\n // same context.\\n if ((child.context === context || child.functionalContext === context) &&\\n child.data && (name = child.data.slot)) {\\n var slot = (slots[name] || (slots[name] = []));\\n if (child.tag === 'template') {\\n slot.push.apply(slot, child.children);\\n } else {\\n slot.push(child);\\n }\\n } else {\\n defaultSlot.push(child);\\n }\\n }\\n // ignore single whitespace\\n if (defaultSlot.length && !(\\n defaultSlot.length === 1 &&\\n (defaultSlot[0].text === ' ' || defaultSlot[0].isComment)\\n )) {\\n slots.default = defaultSlot;\\n }\\n return slots\\n}\\n\\n/* */\\n\\nfunction initEvents (vm) {\\n vm._events = Object.create(null);\\n // init parent attached events\\n var listeners = vm.$options._parentListeners;\\n var add = function (event, fn, once) {\\n once ? vm.$once(event, fn) : vm.$on(event, fn);\\n };\\n var remove$$1 = bind$1(vm.$off, vm);\\n vm._updateListeners = function (listeners, oldListeners) {\\n updateListeners(listeners, oldListeners || {}, add, remove$$1, vm);\\n };\\n if (listeners) {\\n vm._updateListeners(listeners);\\n }\\n}\\n\\nfunction eventsMixin (Vue) {\\n Vue.prototype.$on = function (event, fn) {\\n var vm = this;(vm._events[event] || (vm._events[event] = [])).push(fn);\\n return vm\\n };\\n\\n Vue.prototype.$once = function (event, fn) {\\n var vm = this;\\n function on () {\\n vm.$off(event, on);\\n fn.apply(vm, arguments);\\n }\\n on.fn = fn;\\n vm.$on(event, on);\\n return vm\\n };\\n\\n Vue.prototype.$off = function (event, fn) {\\n var vm = this;\\n // all\\n if (!arguments.length) {\\n vm._events = Object.create(null);\\n return vm\\n }\\n // specific event\\n var cbs = vm._events[event];\\n if (!cbs) {\\n return vm\\n }\\n if (arguments.length === 1) {\\n vm._events[event] = null;\\n return vm\\n }\\n // specific handler\\n var cb;\\n var i = cbs.length;\\n while (i--) {\\n cb = cbs[i];\\n if (cb === fn || cb.fn === fn) {\\n cbs.splice(i, 1);\\n break\\n }\\n }\\n return vm\\n };\\n\\n Vue.prototype.$emit = function (event) {\\n var vm = this;\\n var cbs = vm._events[event];\\n if (cbs) {\\n cbs = cbs.length > 1 ? toArray(cbs) : cbs;\\n var args = toArray(arguments, 1);\\n for (var i = 0, l = cbs.length; i < l; i++) {\\n cbs[i].apply(vm, args);\\n }\\n }\\n return vm\\n };\\n}\\n\\n/* */\\n\\nvar uid = 0;\\n\\nfunction initMixin (Vue) {\\n Vue.prototype._init = function (options) {\\n var vm = this;\\n // a uid\\n vm._uid = uid++;\\n // a flag to avoid this being observed\\n vm._isVue = true;\\n // merge options\\n if (options && options._isComponent) {\\n // optimize internal component instantiation\\n // since dynamic options merging is pretty slow, and none of the\\n // internal component options needs special treatment.\\n initInternalComponent(vm, options);\\n } else {\\n vm.$options = mergeOptions(\\n resolveConstructorOptions(vm.constructor),\\n options || {},\\n vm\\n );\\n }\\n /* istanbul ignore else */\\n {\\n initProxy(vm);\\n }\\n // expose real self\\n vm._self = vm;\\n initLifecycle(vm);\\n initEvents(vm);\\n callHook(vm, 'beforeCreate');\\n initState(vm);\\n callHook(vm, 'created');\\n initRender(vm);\\n };\\n}\\n\\nfunction initInternalComponent (vm, options) {\\n var opts = vm.$options = Object.create(vm.constructor.options);\\n // doing this because it's faster than dynamic enumeration.\\n opts.parent = options.parent;\\n opts.propsData = options.propsData;\\n opts._parentVnode = options._parentVnode;\\n opts._parentListeners = options._parentListeners;\\n opts._renderChildren = options._renderChildren;\\n opts._componentTag = options._componentTag;\\n opts._parentElm = options._parentElm;\\n opts._refElm = options._refElm;\\n if (options.render) {\\n opts.render = options.render;\\n opts.staticRenderFns = options.staticRenderFns;\\n }\\n}\\n\\nfunction resolveConstructorOptions (Ctor) {\\n var options = Ctor.options;\\n if (Ctor.super) {\\n var superOptions = Ctor.super.options;\\n var cachedSuperOptions = Ctor.superOptions;\\n var extendOptions = Ctor.extendOptions;\\n if (superOptions !== cachedSuperOptions) {\\n // super option changed\\n Ctor.superOptions = superOptions;\\n extendOptions.render = options.render;\\n extendOptions.staticRenderFns = options.staticRenderFns;\\n extendOptions._scopeId = options._scopeId;\\n options = Ctor.options = mergeOptions(superOptions, extendOptions);\\n if (options.name) {\\n options.components[options.name] = Ctor;\\n }\\n }\\n }\\n return options\\n}\\n\\nfunction Vue$3 (options) {\\n if (\\\"development\\\" !== 'production' &&\\n !(this instanceof Vue$3)) {\\n warn('Vue is a constructor and should be called with the `new` keyword');\\n }\\n this._init(options);\\n}\\n\\ninitMixin(Vue$3);\\nstateMixin(Vue$3);\\neventsMixin(Vue$3);\\nlifecycleMixin(Vue$3);\\nrenderMixin(Vue$3);\\n\\n/* */\\n\\nfunction initUse (Vue) {\\n Vue.use = function (plugin) {\\n /* istanbul ignore if */\\n if (plugin.installed) {\\n return\\n }\\n // additional parameters\\n var args = toArray(arguments, 1);\\n args.unshift(this);\\n if (typeof plugin.install === 'function') {\\n plugin.install.apply(plugin, args);\\n } else {\\n plugin.apply(null, args);\\n }\\n plugin.installed = true;\\n return this\\n };\\n}\\n\\n/* */\\n\\nfunction initMixin$1 (Vue) {\\n Vue.mixin = function (mixin) {\\n this.options = mergeOptions(this.options, mixin);\\n };\\n}\\n\\n/* */\\n\\nfunction initExtend (Vue) {\\n /**\\n * Each instance constructor, including Vue, has a unique\\n * cid. This enables us to create wrapped \\\"child\\n * constructors\\\" for prototypal inheritance and cache them.\\n */\\n Vue.cid = 0;\\n var cid = 1;\\n\\n /**\\n * Class inheritance\\n */\\n Vue.extend = function (extendOptions) {\\n extendOptions = extendOptions || {};\\n var Super = this;\\n var SuperId = Super.cid;\\n var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});\\n if (cachedCtors[SuperId]) {\\n return cachedCtors[SuperId]\\n }\\n var name = extendOptions.name || Super.options.name;\\n {\\n if (!/^[a-zA-Z][\\\\w-]*$/.test(name)) {\\n warn(\\n 'Invalid component name: \\\"' + name + '\\\". Component names ' +\\n 'can only contain alphanumeric characters and the hyphen, ' +\\n 'and must start with a letter.'\\n );\\n }\\n }\\n var Sub = function VueComponent (options) {\\n this._init(options);\\n };\\n Sub.prototype = Object.create(Super.prototype);\\n Sub.prototype.constructor = Sub;\\n Sub.cid = cid++;\\n Sub.options = mergeOptions(\\n Super.options,\\n extendOptions\\n );\\n Sub['super'] = Super;\\n // allow further extension/mixin/plugin usage\\n Sub.extend = Super.extend;\\n Sub.mixin = Super.mixin;\\n Sub.use = Super.use;\\n // create asset registers, so extended classes\\n // can have their private assets too.\\n config._assetTypes.forEach(function (type) {\\n Sub[type] = Super[type];\\n });\\n // enable recursive self-lookup\\n if (name) {\\n Sub.options.components[name] = Sub;\\n }\\n // keep a reference to the super options at extension time.\\n // later at instantiation we can check if Super's options have\\n // been updated.\\n Sub.superOptions = Super.options;\\n Sub.extendOptions = extendOptions;\\n // cache constructor\\n cachedCtors[SuperId] = Sub;\\n return Sub\\n };\\n}\\n\\n/* */\\n\\nfunction initAssetRegisters (Vue) {\\n /**\\n * Create asset registration methods.\\n */\\n config._assetTypes.forEach(function (type) {\\n Vue[type] = function (\\n id,\\n definition\\n ) {\\n if (!definition) {\\n return this.options[type + 's'][id]\\n } else {\\n /* istanbul ignore if */\\n {\\n if (type === 'component' && config.isReservedTag(id)) {\\n warn(\\n 'Do not use built-in or reserved HTML elements as component ' +\\n 'id: ' + id\\n );\\n }\\n }\\n if (type === 'component' && isPlainObject(definition)) {\\n definition.name = definition.name || id;\\n definition = this.options._base.extend(definition);\\n }\\n if (type === 'directive' && typeof definition === 'function') {\\n definition = { bind: definition, update: definition };\\n }\\n this.options[type + 's'][id] = definition;\\n return definition\\n }\\n };\\n });\\n}\\n\\n/* */\\n\\nvar patternTypes = [String, RegExp];\\n\\nfunction matches (pattern, name) {\\n if (typeof pattern === 'string') {\\n return pattern.split(',').indexOf(name) > -1\\n } else {\\n return pattern.test(name)\\n }\\n}\\n\\nvar KeepAlive = {\\n name: 'keep-alive',\\n abstract: true,\\n props: {\\n include: patternTypes,\\n exclude: patternTypes\\n },\\n created: function created () {\\n this.cache = Object.create(null);\\n },\\n render: function render () {\\n var vnode = getFirstComponentChild(this.$slots.default);\\n if (vnode && vnode.componentOptions) {\\n var opts = vnode.componentOptions;\\n // check pattern\\n var name = opts.Ctor.options.name || opts.tag;\\n if (name && (\\n (this.include && !matches(this.include, name)) ||\\n (this.exclude && matches(this.exclude, name))\\n )) {\\n return vnode\\n }\\n var key = vnode.key == null\\n // same constructor may get registered as different local components\\n // so cid alone is not enough (#3269)\\n ? opts.Ctor.cid + (opts.tag ? (\\\"::\\\" + (opts.tag)) : '')\\n : vnode.key;\\n if (this.cache[key]) {\\n vnode.child = this.cache[key].child;\\n } else {\\n this.cache[key] = vnode;\\n }\\n vnode.data.keepAlive = true;\\n }\\n return vnode\\n },\\n destroyed: function destroyed () {\\n var this$1 = this;\\n\\n for (var key in this.cache) {\\n var vnode = this$1.cache[key];\\n callHook(vnode.child, 'deactivated');\\n vnode.child.$destroy();\\n }\\n }\\n};\\n\\nvar builtInComponents = {\\n KeepAlive: KeepAlive\\n};\\n\\n/* */\\n\\nfunction initGlobalAPI (Vue) {\\n // config\\n var configDef = {};\\n configDef.get = function () { return config; };\\n {\\n configDef.set = function () {\\n warn(\\n 'Do not replace the Vue.config object, set individual fields instead.'\\n );\\n };\\n }\\n Object.defineProperty(Vue, 'config', configDef);\\n Vue.util = util;\\n Vue.set = set$1;\\n Vue.delete = del;\\n Vue.nextTick = nextTick;\\n\\n Vue.options = Object.create(null);\\n config._assetTypes.forEach(function (type) {\\n Vue.options[type + 's'] = Object.create(null);\\n });\\n\\n // this is used to identify the \\\"base\\\" constructor to extend all plain-object\\n // components with in Weex's multi-instance scenarios.\\n Vue.options._base = Vue;\\n\\n extend(Vue.options.components, builtInComponents);\\n\\n initUse(Vue);\\n initMixin$1(Vue);\\n initExtend(Vue);\\n initAssetRegisters(Vue);\\n}\\n\\ninitGlobalAPI(Vue$3);\\n\\nObject.defineProperty(Vue$3.prototype, '$isServer', {\\n get: isServerRendering\\n});\\n\\nVue$3.version = '2.1.6';\\n\\n/* */\\n\\n// attributes that should be using props for binding\\nvar acceptValue = makeMap('input,textarea,option,select');\\nvar mustUseProp = function (tag, attr) {\\n return (\\n (attr === 'value' && acceptValue(tag)) ||\\n (attr === 'selected' && tag === 'option') ||\\n (attr === 'checked' && tag === 'input') ||\\n (attr === 'muted' && tag === 'video')\\n )\\n};\\n\\nvar isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck');\\n\\nvar isBooleanAttr = makeMap(\\n 'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' +\\n 'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' +\\n 'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' +\\n 'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' +\\n 'required,reversed,scoped,seamless,selected,sortable,translate,' +\\n 'truespeed,typemustmatch,visible'\\n);\\n\\nvar xlinkNS = 'http://www.w3.org/1999/xlink';\\n\\nvar isXlink = function (name) {\\n return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink'\\n};\\n\\nvar getXlinkProp = function (name) {\\n return isXlink(name) ? name.slice(6, name.length) : ''\\n};\\n\\nvar isFalsyAttrValue = function (val) {\\n return val == null || val === false\\n};\\n\\n/* */\\n\\nfunction genClassForVnode (vnode) {\\n var data = vnode.data;\\n var parentNode = vnode;\\n var childNode = vnode;\\n while (childNode.child) {\\n childNode = childNode.child._vnode;\\n if (childNode.data) {\\n data = mergeClassData(childNode.data, data);\\n }\\n }\\n while ((parentNode = parentNode.parent)) {\\n if (parentNode.data) {\\n data = mergeClassData(data, parentNode.data);\\n }\\n }\\n return genClassFromData(data)\\n}\\n\\nfunction mergeClassData (child, parent) {\\n return {\\n staticClass: concat(child.staticClass, parent.staticClass),\\n class: child.class\\n ? [child.class, parent.class]\\n : parent.class\\n }\\n}\\n\\nfunction genClassFromData (data) {\\n var dynamicClass = data.class;\\n var staticClass = data.staticClass;\\n if (staticClass || dynamicClass) {\\n return concat(staticClass, stringifyClass(dynamicClass))\\n }\\n /* istanbul ignore next */\\n return ''\\n}\\n\\nfunction concat (a, b) {\\n return a ? b ? (a + ' ' + b) : a : (b || '')\\n}\\n\\nfunction stringifyClass (value) {\\n var res = '';\\n if (!value) {\\n return res\\n }\\n if (typeof value === 'string') {\\n return value\\n }\\n if (Array.isArray(value)) {\\n var stringified;\\n for (var i = 0, l = value.length; i < l; i++) {\\n if (value[i]) {\\n if ((stringified = stringifyClass(value[i]))) {\\n res += stringified + ' ';\\n }\\n }\\n }\\n return res.slice(0, -1)\\n }\\n if (isObject(value)) {\\n for (var key in value) {\\n if (value[key]) { res += key + ' '; }\\n }\\n return res.slice(0, -1)\\n }\\n /* istanbul ignore next */\\n return res\\n}\\n\\n/* */\\n\\nvar namespaceMap = {\\n svg: 'http://www.w3.org/2000/svg',\\n math: 'http://www.w3.org/1998/Math/MathML',\\n xhtml: 'http://www.w3.org/1999/xhtml'\\n};\\n\\nvar isHTMLTag = makeMap(\\n 'html,body,base,head,link,meta,style,title,' +\\n 'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +\\n 'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +\\n 'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +\\n 's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +\\n 'embed,object,param,source,canvas,script,noscript,del,ins,' +\\n 'caption,col,colgroup,table,thead,tbody,td,th,tr,' +\\n 'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +\\n 'output,progress,select,textarea,' +\\n 'details,dialog,menu,menuitem,summary,' +\\n 'content,element,shadow,template'\\n);\\n\\n// this map is intentionally selective, only covering SVG elements that may\\n// contain child elements.\\nvar isSVG = makeMap(\\n 'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,' +\\n 'font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' +\\n 'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view',\\n true\\n);\\n\\nvar isPreTag = function (tag) { return tag === 'pre'; };\\n\\nvar isReservedTag = function (tag) {\\n return isHTMLTag(tag) || isSVG(tag)\\n};\\n\\nfunction getTagNamespace (tag) {\\n if (isSVG(tag)) {\\n return 'svg'\\n }\\n // basic support for MathML\\n // note it doesn't support other MathML elements being component roots\\n if (tag === 'math') {\\n return 'math'\\n }\\n}\\n\\nvar unknownElementCache = Object.create(null);\\nfunction isUnknownElement (tag) {\\n /* istanbul ignore if */\\n if (!inBrowser) {\\n return true\\n }\\n if (isReservedTag(tag)) {\\n return false\\n }\\n tag = tag.toLowerCase();\\n /* istanbul ignore if */\\n if (unknownElementCache[tag] != null) {\\n return unknownElementCache[tag]\\n }\\n var el = document.createElement(tag);\\n if (tag.indexOf('-') > -1) {\\n // http://stackoverflow.com/a/28210364/1070244\\n return (unknownElementCache[tag] = (\\n el.constructor === window.HTMLUnknownElement ||\\n el.constructor === window.HTMLElement\\n ))\\n } else {\\n return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString()))\\n }\\n}\\n\\n/* */\\n\\n/**\\n * Query an element selector if it's not an element already.\\n */\\nfunction query (el) {\\n if (typeof el === 'string') {\\n var selector = el;\\n el = document.querySelector(el);\\n if (!el) {\\n \\\"development\\\" !== 'production' && warn(\\n 'Cannot find element: ' + selector\\n );\\n return document.createElement('div')\\n }\\n }\\n return el\\n}\\n\\n/* */\\n\\nfunction createElement$1 (tagName, vnode) {\\n var elm = document.createElement(tagName);\\n if (tagName !== 'select') {\\n return elm\\n }\\n if (vnode.data && vnode.data.attrs && 'multiple' in vnode.data.attrs) {\\n elm.setAttribute('multiple', 'multiple');\\n }\\n return elm\\n}\\n\\nfunction createElementNS (namespace, tagName) {\\n return document.createElementNS(namespaceMap[namespace], tagName)\\n}\\n\\nfunction createTextNode (text) {\\n return document.createTextNode(text)\\n}\\n\\nfunction createComment (text) {\\n return document.createComment(text)\\n}\\n\\nfunction insertBefore (parentNode, newNode, referenceNode) {\\n parentNode.insertBefore(newNode, referenceNode);\\n}\\n\\nfunction removeChild (node, child) {\\n node.removeChild(child);\\n}\\n\\nfunction appendChild (node, child) {\\n node.appendChild(child);\\n}\\n\\nfunction parentNode (node) {\\n return node.parentNode\\n}\\n\\nfunction nextSibling (node) {\\n return node.nextSibling\\n}\\n\\nfunction tagName (node) {\\n return node.tagName\\n}\\n\\nfunction setTextContent (node, text) {\\n node.textContent = text;\\n}\\n\\nfunction setAttribute (node, key, val) {\\n node.setAttribute(key, val);\\n}\\n\\n\\nvar nodeOps = Object.freeze({\\n\\tcreateElement: createElement$1,\\n\\tcreateElementNS: createElementNS,\\n\\tcreateTextNode: createTextNode,\\n\\tcreateComment: createComment,\\n\\tinsertBefore: insertBefore,\\n\\tremoveChild: removeChild,\\n\\tappendChild: appendChild,\\n\\tparentNode: parentNode,\\n\\tnextSibling: nextSibling,\\n\\ttagName: tagName,\\n\\tsetTextContent: setTextContent,\\n\\tsetAttribute: setAttribute\\n});\\n\\n/* */\\n\\nvar ref = {\\n create: function create (_, vnode) {\\n registerRef(vnode);\\n },\\n update: function update (oldVnode, vnode) {\\n if (oldVnode.data.ref !== vnode.data.ref) {\\n registerRef(oldVnode, true);\\n registerRef(vnode);\\n }\\n },\\n destroy: function destroy (vnode) {\\n registerRef(vnode, true);\\n }\\n};\\n\\nfunction registerRef (vnode, isRemoval) {\\n var key = vnode.data.ref;\\n if (!key) { return }\\n\\n var vm = vnode.context;\\n var ref = vnode.child || vnode.elm;\\n var refs = vm.$refs;\\n if (isRemoval) {\\n if (Array.isArray(refs[key])) {\\n remove$1(refs[key], ref);\\n } else if (refs[key] === ref) {\\n refs[key] = undefined;\\n }\\n } else {\\n if (vnode.data.refInFor) {\\n if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {\\n refs[key].push(ref);\\n } else {\\n refs[key] = [ref];\\n }\\n } else {\\n refs[key] = ref;\\n }\\n }\\n}\\n\\n/**\\n * Virtual DOM patching algorithm based on Snabbdom by\\n * Simon Friis Vindum (@paldepind)\\n * Licensed under the MIT License\\n * https://github.com/paldepind/snabbdom/blob/master/LICENSE\\n *\\n * modified by Evan You (@yyx990803)\\n *\\n\\n/*\\n * Not type-checking this because this file is perf-critical and the cost\\n * of making flow understand it is not worth it.\\n */\\n\\nvar emptyNode = new VNode('', {}, []);\\n\\nvar hooks$1 = ['create', 'activate', 'update', 'remove', 'destroy'];\\n\\nfunction isUndef (s) {\\n return s == null\\n}\\n\\nfunction isDef (s) {\\n return s != null\\n}\\n\\nfunction sameVnode (vnode1, vnode2) {\\n return (\\n vnode1.key === vnode2.key &&\\n vnode1.tag === vnode2.tag &&\\n vnode1.isComment === vnode2.isComment &&\\n !vnode1.data === !vnode2.data\\n )\\n}\\n\\nfunction createKeyToOldIdx (children, beginIdx, endIdx) {\\n var i, key;\\n var map = {};\\n for (i = beginIdx; i <= endIdx; ++i) {\\n key = children[i].key;\\n if (isDef(key)) { map[key] = i; }\\n }\\n return map\\n}\\n\\nfunction createPatchFunction (backend) {\\n var i, j;\\n var cbs = {};\\n\\n var modules = backend.modules;\\n var nodeOps = backend.nodeOps;\\n\\n for (i = 0; i < hooks$1.length; ++i) {\\n cbs[hooks$1[i]] = [];\\n for (j = 0; j < modules.length; ++j) {\\n if (modules[j][hooks$1[i]] !== undefined) { cbs[hooks$1[i]].push(modules[j][hooks$1[i]]); }\\n }\\n }\\n\\n function emptyNodeAt (elm) {\\n return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm)\\n }\\n\\n function createRmCb (childElm, listeners) {\\n function remove$$1 () {\\n if (--remove$$1.listeners === 0) {\\n removeElement(childElm);\\n }\\n }\\n remove$$1.listeners = listeners;\\n return remove$$1\\n }\\n\\n function removeElement (el) {\\n var parent = nodeOps.parentNode(el);\\n // element may have already been removed due to v-html\\n if (parent) {\\n nodeOps.removeChild(parent, el);\\n }\\n }\\n\\n var inPre = 0;\\n function createElm (vnode, insertedVnodeQueue, parentElm, refElm, nested) {\\n vnode.isRootInsert = !nested; // for transition enter check\\n if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) {\\n return\\n }\\n\\n var data = vnode.data;\\n var children = vnode.children;\\n var tag = vnode.tag;\\n if (isDef(tag)) {\\n {\\n if (data && data.pre) {\\n inPre++;\\n }\\n if (\\n !inPre &&\\n !vnode.ns &&\\n !(config.ignoredElements && config.ignoredElements.indexOf(tag) > -1) &&\\n config.isUnknownElement(tag)\\n ) {\\n warn(\\n 'Unknown custom element: <' + tag + '> - did you ' +\\n 'register the component correctly? For recursive components, ' +\\n 'make sure to provide the \\\"name\\\" option.',\\n vnode.context\\n );\\n }\\n }\\n vnode.elm = vnode.ns\\n ? nodeOps.createElementNS(vnode.ns, tag)\\n : nodeOps.createElement(tag, vnode);\\n setScope(vnode);\\n\\n /* istanbul ignore if */\\n {\\n createChildren(vnode, children, insertedVnodeQueue);\\n if (isDef(data)) {\\n invokeCreateHooks(vnode, insertedVnodeQueue);\\n }\\n insert(parentElm, vnode.elm, refElm);\\n }\\n\\n if (\\\"development\\\" !== 'production' && data && data.pre) {\\n inPre--;\\n }\\n } else if (vnode.isComment) {\\n vnode.elm = nodeOps.createComment(vnode.text);\\n insert(parentElm, vnode.elm, refElm);\\n } else {\\n vnode.elm = nodeOps.createTextNode(vnode.text);\\n insert(parentElm, vnode.elm, refElm);\\n }\\n }\\n\\n function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\\n var i = vnode.data;\\n if (isDef(i)) {\\n var isReactivated = isDef(vnode.child) && i.keepAlive;\\n if (isDef(i = i.hook) && isDef(i = i.init)) {\\n i(vnode, false /* hydrating */, parentElm, refElm);\\n }\\n // after calling the init hook, if the vnode is a child component\\n // it should've created a child instance and mounted it. the child\\n // component also has set the placeholder vnode's elm.\\n // in that case we can just return the element and be done.\\n if (isDef(vnode.child)) {\\n initComponent(vnode, insertedVnodeQueue);\\n if (isReactivated) {\\n reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm);\\n }\\n return true\\n }\\n }\\n }\\n\\n function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) {\\n var i;\\n // hack for #4339: a reactivated component with inner transition\\n // does not trigger because the inner node's created hooks are not called\\n // again. It's not ideal to involve module-specific logic in here but\\n // there doesn't seem to be a better way to do it.\\n var innerNode = vnode;\\n while (innerNode.child) {\\n innerNode = innerNode.child._vnode;\\n if (isDef(i = innerNode.data) && isDef(i = i.transition)) {\\n for (i = 0; i < cbs.activate.length; ++i) {\\n cbs.activate[i](emptyNode, innerNode);\\n }\\n insertedVnodeQueue.push(innerNode);\\n break\\n }\\n }\\n // unlike a newly created component,\\n // a reactivated keep-alive component doesn't insert itself\\n insert(parentElm, vnode.elm, refElm);\\n }\\n\\n function insert (parent, elm, ref) {\\n if (parent) {\\n if (ref) {\\n nodeOps.insertBefore(parent, elm, ref);\\n } else {\\n nodeOps.appendChild(parent, elm);\\n }\\n }\\n }\\n\\n function createChildren (vnode, children, insertedVnodeQueue) {\\n if (Array.isArray(children)) {\\n for (var i = 0; i < children.length; ++i) {\\n createElm(children[i], insertedVnodeQueue, vnode.elm, null, true);\\n }\\n } else if (isPrimitive(vnode.text)) {\\n nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(vnode.text));\\n }\\n }\\n\\n function isPatchable (vnode) {\\n while (vnode.child) {\\n vnode = vnode.child._vnode;\\n }\\n return isDef(vnode.tag)\\n }\\n\\n function invokeCreateHooks (vnode, insertedVnodeQueue) {\\n for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {\\n cbs.create[i$1](emptyNode, vnode);\\n }\\n i = vnode.data.hook; // Reuse variable\\n if (isDef(i)) {\\n if (i.create) { i.create(emptyNode, vnode); }\\n if (i.insert) { insertedVnodeQueue.push(vnode); }\\n }\\n }\\n\\n function initComponent (vnode, insertedVnodeQueue) {\\n if (vnode.data.pendingInsert) {\\n insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert);\\n }\\n vnode.elm = vnode.child.$el;\\n if (isPatchable(vnode)) {\\n invokeCreateHooks(vnode, insertedVnodeQueue);\\n setScope(vnode);\\n } else {\\n // empty component root.\\n // skip all element-related modules except for ref (#3455)\\n registerRef(vnode);\\n // make sure to invoke the insert hook\\n insertedVnodeQueue.push(vnode);\\n }\\n }\\n\\n // set scope id attribute for scoped CSS.\\n // this is implemented as a special case to avoid the overhead\\n // of going through the normal attribute patching process.\\n function setScope (vnode) {\\n var i;\\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\\n nodeOps.setAttribute(vnode.elm, i, '');\\n }\\n if (isDef(i = activeInstance) &&\\n i !== vnode.context &&\\n isDef(i = i.$options._scopeId)) {\\n nodeOps.setAttribute(vnode.elm, i, '');\\n }\\n }\\n\\n function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) {\\n for (; startIdx <= endIdx; ++startIdx) {\\n createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm);\\n }\\n }\\n\\n function invokeDestroyHook (vnode) {\\n var i, j;\\n var data = vnode.data;\\n if (isDef(data)) {\\n if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); }\\n for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); }\\n }\\n if (isDef(i = vnode.children)) {\\n for (j = 0; j < vnode.children.length; ++j) {\\n invokeDestroyHook(vnode.children[j]);\\n }\\n }\\n }\\n\\n function removeVnodes (parentElm, vnodes, startIdx, endIdx) {\\n for (; startIdx <= endIdx; ++startIdx) {\\n var ch = vnodes[startIdx];\\n if (isDef(ch)) {\\n if (isDef(ch.tag)) {\\n removeAndInvokeRemoveHook(ch);\\n invokeDestroyHook(ch);\\n } else { // Text node\\n nodeOps.removeChild(parentElm, ch.elm);\\n }\\n }\\n }\\n }\\n\\n function removeAndInvokeRemoveHook (vnode, rm) {\\n if (rm || isDef(vnode.data)) {\\n var listeners = cbs.remove.length + 1;\\n if (!rm) {\\n // directly removing\\n rm = createRmCb(vnode.elm, listeners);\\n } else {\\n // we have a recursively passed down rm callback\\n // increase the listeners count\\n rm.listeners += listeners;\\n }\\n // recursively invoke hooks on child component root node\\n if (isDef(i = vnode.child) && isDef(i = i._vnode) && isDef(i.data)) {\\n removeAndInvokeRemoveHook(i, rm);\\n }\\n for (i = 0; i < cbs.remove.length; ++i) {\\n cbs.remove[i](vnode, rm);\\n }\\n if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) {\\n i(vnode, rm);\\n } else {\\n rm();\\n }\\n } else {\\n removeElement(vnode.elm);\\n }\\n }\\n\\n function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) {\\n var oldStartIdx = 0;\\n var newStartIdx = 0;\\n var oldEndIdx = oldCh.length - 1;\\n var oldStartVnode = oldCh[0];\\n var oldEndVnode = oldCh[oldEndIdx];\\n var newEndIdx = newCh.length - 1;\\n var newStartVnode = newCh[0];\\n var newEndVnode = newCh[newEndIdx];\\n var oldKeyToIdx, idxInOld, elmToMove, refElm;\\n\\n // removeOnly is a special flag used only by <transition-group>\\n // to ensure removed elements stay in correct relative positions\\n // during leaving transitions\\n var canMove = !removeOnly;\\n\\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\\n if (isUndef(oldStartVnode)) {\\n oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left\\n } else if (isUndef(oldEndVnode)) {\\n oldEndVnode = oldCh[--oldEndIdx];\\n } else if (sameVnode(oldStartVnode, newStartVnode)) {\\n patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);\\n oldStartVnode = oldCh[++oldStartIdx];\\n newStartVnode = newCh[++newStartIdx];\\n } else if (sameVnode(oldEndVnode, newEndVnode)) {\\n patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);\\n oldEndVnode = oldCh[--oldEndIdx];\\n newEndVnode = newCh[--newEndIdx];\\n } else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right\\n patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);\\n canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm));\\n oldStartVnode = oldCh[++oldStartIdx];\\n newEndVnode = newCh[--newEndIdx];\\n } else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left\\n patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);\\n canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);\\n oldEndVnode = oldCh[--oldEndIdx];\\n newStartVnode = newCh[++newStartIdx];\\n } else {\\n if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }\\n idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;\\n if (isUndef(idxInOld)) { // New element\\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\\n newStartVnode = newCh[++newStartIdx];\\n } else {\\n elmToMove = oldCh[idxInOld];\\n /* istanbul ignore if */\\n if (\\\"development\\\" !== 'production' && !elmToMove) {\\n warn(\\n 'It seems there are duplicate keys that is causing an update error. ' +\\n 'Make sure each v-for item has a unique key.'\\n );\\n }\\n if (sameVnode(elmToMove, newStartVnode)) {\\n patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);\\n oldCh[idxInOld] = undefined;\\n canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);\\n newStartVnode = newCh[++newStartIdx];\\n } else {\\n // same key but different element. treat as new element\\n createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);\\n newStartVnode = newCh[++newStartIdx];\\n }\\n }\\n }\\n }\\n if (oldStartIdx > oldEndIdx) {\\n refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm;\\n addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);\\n } else if (newStartIdx > newEndIdx) {\\n removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);\\n }\\n }\\n\\n function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {\\n if (oldVnode === vnode) {\\n return\\n }\\n // reuse element for static trees.\\n // note we only do this if the vnode is cloned -\\n // if the new node is not cloned it means the render functions have been\\n // reset by the hot-reload-api and we need to do a proper re-render.\\n if (vnode.isStatic &&\\n oldVnode.isStatic &&\\n vnode.key === oldVnode.key &&\\n (vnode.isCloned || vnode.isOnce)) {\\n vnode.elm = oldVnode.elm;\\n vnode.child = oldVnode.child;\\n return\\n }\\n var i;\\n var data = vnode.data;\\n var hasData = isDef(data);\\n if (hasData && isDef(i = data.hook) && isDef(i = i.prepatch)) {\\n i(oldVnode, vnode);\\n }\\n var elm = vnode.elm = oldVnode.elm;\\n var oldCh = oldVnode.children;\\n var ch = vnode.children;\\n if (hasData && isPatchable(vnode)) {\\n for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); }\\n if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); }\\n }\\n if (isUndef(vnode.text)) {\\n if (isDef(oldCh) && isDef(ch)) {\\n if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); }\\n } else if (isDef(ch)) {\\n if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); }\\n addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);\\n } else if (isDef(oldCh)) {\\n removeVnodes(elm, oldCh, 0, oldCh.length - 1);\\n } else if (isDef(oldVnode.text)) {\\n nodeOps.setTextContent(elm, '');\\n }\\n } else if (oldVnode.text !== vnode.text) {\\n nodeOps.setTextContent(elm, vnode.text);\\n }\\n if (hasData) {\\n if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); }\\n }\\n }\\n\\n function invokeInsertHook (vnode, queue, initial) {\\n // delay insert hooks for component root nodes, invoke them after the\\n // element is really inserted\\n if (initial && vnode.parent) {\\n vnode.parent.data.pendingInsert = queue;\\n } else {\\n for (var i = 0; i < queue.length; ++i) {\\n queue[i].data.hook.insert(queue[i]);\\n }\\n }\\n }\\n\\n var bailed = false;\\n // list of modules that can skip create hook during hydration because they\\n // are already rendered on the client or has no need for initialization\\n var isRenderedModule = makeMap('attrs,style,class,staticClass,staticStyle,key');\\n\\n // Note: this is a browser-only function so we can assume elms are DOM nodes.\\n function hydrate (elm, vnode, insertedVnodeQueue) {\\n {\\n if (!assertNodeMatch(elm, vnode)) {\\n return false\\n }\\n }\\n vnode.elm = elm;\\n var tag = vnode.tag;\\n var data = vnode.data;\\n var children = vnode.children;\\n if (isDef(data)) {\\n if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); }\\n if (isDef(i = vnode.child)) {\\n // child component. it should have hydrated its own tree.\\n initComponent(vnode, insertedVnodeQueue);\\n return true\\n }\\n }\\n if (isDef(tag)) {\\n if (isDef(children)) {\\n // empty element, allow client to pick up and populate children\\n if (!elm.hasChildNodes()) {\\n createChildren(vnode, children, insertedVnodeQueue);\\n } else {\\n var childrenMatch = true;\\n var childNode = elm.firstChild;\\n for (var i$1 = 0; i$1 < children.length; i$1++) {\\n if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {\\n childrenMatch = false;\\n break\\n }\\n childNode = childNode.nextSibling;\\n }\\n // if childNode is not null, it means the actual childNodes list is\\n // longer than the virtual children list.\\n if (!childrenMatch || childNode) {\\n if (\\\"development\\\" !== 'production' &&\\n typeof console !== 'undefined' &&\\n !bailed) {\\n bailed = true;\\n console.warn('Parent: ', elm);\\n console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);\\n }\\n return false\\n }\\n }\\n }\\n if (isDef(data)) {\\n for (var key in data) {\\n if (!isRenderedModule(key)) {\\n invokeCreateHooks(vnode, insertedVnodeQueue);\\n break\\n }\\n }\\n }\\n }\\n return true\\n }\\n\\n function assertNodeMatch (node, vnode) {\\n if (vnode.tag) {\\n return (\\n vnode.tag.indexOf('vue-component') === 0 ||\\n vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase())\\n )\\n } else {\\n return _toString(vnode.text) === node.data\\n }\\n }\\n\\n return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) {\\n if (!vnode) {\\n if (oldVnode) { invokeDestroyHook(oldVnode); }\\n return\\n }\\n\\n var elm, parent;\\n var isInitialPatch = false;\\n var insertedVnodeQueue = [];\\n\\n if (!oldVnode) {\\n // empty mount (likely as component), create new root element\\n isInitialPatch = true;\\n createElm(vnode, insertedVnodeQueue, parentElm, refElm);\\n } else {\\n var isRealElement = isDef(oldVnode.nodeType);\\n if (!isRealElement && sameVnode(oldVnode, vnode)) {\\n // patch existing root node\\n patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly);\\n } else {\\n if (isRealElement) {\\n // mounting to a real element\\n // check if this is server-rendered content and if we can perform\\n // a successful hydration.\\n if (oldVnode.nodeType === 1 && oldVnode.hasAttribute('server-rendered')) {\\n oldVnode.removeAttribute('server-rendered');\\n hydrating = true;\\n }\\n if (hydrating) {\\n if (hydrate(oldVnode, vnode, insertedVnodeQueue)) {\\n invokeInsertHook(vnode, insertedVnodeQueue, true);\\n return oldVnode\\n } else {\\n warn(\\n 'The client-side rendered virtual DOM tree is not matching ' +\\n 'server-rendered content. This is likely caused by incorrect ' +\\n 'HTML markup, for example nesting block-level elements inside ' +\\n '<p>, or missing <tbody>. Bailing hydration and performing ' +\\n 'full client-side render.'\\n );\\n }\\n }\\n // either not server-rendered, or hydration failed.\\n // create an empty node and replace it\\n oldVnode = emptyNodeAt(oldVnode);\\n }\\n\\n // replacing existing element\\n elm = oldVnode.elm;\\n parent = nodeOps.parentNode(elm);\\n createElm(vnode, insertedVnodeQueue, parent, nodeOps.nextSibling(elm));\\n\\n if (vnode.parent) {\\n // component root element replaced.\\n // update parent placeholder node element, recursively\\n var ancestor = vnode.parent;\\n while (ancestor) {\\n ancestor.elm = vnode.elm;\\n ancestor = ancestor.parent;\\n }\\n if (isPatchable(vnode)) {\\n for (var i = 0; i < cbs.create.length; ++i) {\\n cbs.create[i](emptyNode, vnode.parent);\\n }\\n }\\n }\\n\\n if (parent !== null) {\\n removeVnodes(parent, [oldVnode], 0, 0);\\n } else if (isDef(oldVnode.tag)) {\\n invokeDestroyHook(oldVnode);\\n }\\n }\\n }\\n\\n invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch);\\n return vnode.elm\\n }\\n}\\n\\n/* */\\n\\nvar directives = {\\n create: updateDirectives,\\n update: updateDirectives,\\n destroy: function unbindDirectives (vnode) {\\n updateDirectives(vnode, emptyNode);\\n }\\n};\\n\\nfunction updateDirectives (oldVnode, vnode) {\\n if (oldVnode.data.directives || vnode.data.directives) {\\n _update(oldVnode, vnode);\\n }\\n}\\n\\nfunction _update (oldVnode, vnode) {\\n var isCreate = oldVnode === emptyNode;\\n var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context);\\n var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context);\\n\\n var dirsWithInsert = [];\\n var dirsWithPostpatch = [];\\n\\n var key, oldDir, dir;\\n for (key in newDirs) {\\n oldDir = oldDirs[key];\\n dir = newDirs[key];\\n if (!oldDir) {\\n // new directive, bind\\n callHook$1(dir, 'bind', vnode, oldVnode);\\n if (dir.def && dir.def.inserted) {\\n dirsWithInsert.push(dir);\\n }\\n } else {\\n // existing directive, update\\n dir.oldValue = oldDir.value;\\n callHook$1(dir, 'update', vnode, oldVnode);\\n if (dir.def && dir.def.componentUpdated) {\\n dirsWithPostpatch.push(dir);\\n }\\n }\\n }\\n\\n if (dirsWithInsert.length) {\\n var callInsert = function () {\\n for (var i = 0; i < dirsWithInsert.length; i++) {\\n callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode);\\n }\\n };\\n if (isCreate) {\\n mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', callInsert, 'dir-insert');\\n } else {\\n callInsert();\\n }\\n }\\n\\n if (dirsWithPostpatch.length) {\\n mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'postpatch', function () {\\n for (var i = 0; i < dirsWithPostpatch.length; i++) {\\n callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode);\\n }\\n }, 'dir-postpatch');\\n }\\n\\n if (!isCreate) {\\n for (key in oldDirs) {\\n if (!newDirs[key]) {\\n // no longer present, unbind\\n callHook$1(oldDirs[key], 'unbind', oldVnode);\\n }\\n }\\n }\\n}\\n\\nvar emptyModifiers = Object.create(null);\\n\\nfunction normalizeDirectives$1 (\\n dirs,\\n vm\\n) {\\n var res = Object.create(null);\\n if (!dirs) {\\n return res\\n }\\n var i, dir;\\n for (i = 0; i < dirs.length; i++) {\\n dir = dirs[i];\\n if (!dir.modifiers) {\\n dir.modifiers = emptyModifiers;\\n }\\n res[getRawDirName(dir)] = dir;\\n dir.def = resolveAsset(vm.$options, 'directives', dir.name, true);\\n }\\n return res\\n}\\n\\nfunction getRawDirName (dir) {\\n return dir.rawName || ((dir.name) + \\\".\\\" + (Object.keys(dir.modifiers || {}).join('.')))\\n}\\n\\nfunction callHook$1 (dir, hook, vnode, oldVnode) {\\n var fn = dir.def && dir.def[hook];\\n if (fn) {\\n fn(vnode.elm, dir, vnode, oldVnode);\\n }\\n}\\n\\nvar baseModules = [\\n ref,\\n directives\\n];\\n\\n/* */\\n\\nfunction updateAttrs (oldVnode, vnode) {\\n if (!oldVnode.data.attrs && !vnode.data.attrs) {\\n return\\n }\\n var key, cur, old;\\n var elm = vnode.elm;\\n var oldAttrs = oldVnode.data.attrs || {};\\n var attrs = vnode.data.attrs || {};\\n // clone observed objects, as the user probably wants to mutate it\\n if (attrs.__ob__) {\\n attrs = vnode.data.attrs = extend({}, attrs);\\n }\\n\\n for (key in attrs) {\\n cur = attrs[key];\\n old = oldAttrs[key];\\n if (old !== cur) {\\n setAttr(elm, key, cur);\\n }\\n }\\n // #4391: in IE9, setting type can reset value for input[type=radio]\\n /* istanbul ignore if */\\n if (isIE9 && attrs.value !== oldAttrs.value) {\\n setAttr(elm, 'value', attrs.value);\\n }\\n for (key in oldAttrs) {\\n if (attrs[key] == null) {\\n if (isXlink(key)) {\\n elm.removeAttributeNS(xlinkNS, getXlinkProp(key));\\n } else if (!isEnumeratedAttr(key)) {\\n elm.removeAttribute(key);\\n }\\n }\\n }\\n}\\n\\nfunction setAttr (el, key, value) {\\n if (isBooleanAttr(key)) {\\n // set attribute for blank value\\n // e.g. <option disabled>Select one</option>\\n if (isFalsyAttrValue(value)) {\\n el.removeAttribute(key);\\n } else {\\n el.setAttribute(key, key);\\n }\\n } else if (isEnumeratedAttr(key)) {\\n el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');\\n } else if (isXlink(key)) {\\n if (isFalsyAttrValue(value)) {\\n el.removeAttributeNS(xlinkNS, getXlinkProp(key));\\n } else {\\n el.setAttributeNS(xlinkNS, key, value);\\n }\\n } else {\\n if (isFalsyAttrValue(value)) {\\n el.removeAttribute(key);\\n } else {\\n el.setAttribute(key, value);\\n }\\n }\\n}\\n\\nvar attrs = {\\n create: updateAttrs,\\n update: updateAttrs\\n};\\n\\n/* */\\n\\nfunction updateClass (oldVnode, vnode) {\\n var el = vnode.elm;\\n var data = vnode.data;\\n var oldData = oldVnode.data;\\n if (!data.staticClass && !data.class &&\\n (!oldData || (!oldData.staticClass && !oldData.class))) {\\n return\\n }\\n\\n var cls = genClassForVnode(vnode);\\n\\n // handle transition classes\\n var transitionClass = el._transitionClasses;\\n if (transitionClass) {\\n cls = concat(cls, stringifyClass(transitionClass));\\n }\\n\\n // set the class\\n if (cls !== el._prevClass) {\\n el.setAttribute('class', cls);\\n el._prevClass = cls;\\n }\\n}\\n\\nvar klass = {\\n create: updateClass,\\n update: updateClass\\n};\\n\\n/* */\\n\\nvar target;\\n\\nfunction add$1 (event, handler, once, capture) {\\n if (once) {\\n var oldHandler = handler;\\n handler = function (ev) {\\n remove$2(event, handler, capture);\\n arguments.length === 1\\n ? oldHandler(ev)\\n : oldHandler.apply(null, arguments);\\n };\\n }\\n target.addEventListener(event, handler, capture);\\n}\\n\\nfunction remove$2 (event, handler, capture) {\\n target.removeEventListener(event, handler, capture);\\n}\\n\\nfunction updateDOMListeners (oldVnode, vnode) {\\n if (!oldVnode.data.on && !vnode.data.on) {\\n return\\n }\\n var on = vnode.data.on || {};\\n var oldOn = oldVnode.data.on || {};\\n target = vnode.elm;\\n updateListeners(on, oldOn, add$1, remove$2, vnode.context);\\n}\\n\\nvar events = {\\n create: updateDOMListeners,\\n update: updateDOMListeners\\n};\\n\\n/* */\\n\\nfunction updateDOMProps (oldVnode, vnode) {\\n if (!oldVnode.data.domProps && !vnode.data.domProps) {\\n return\\n }\\n var key, cur;\\n var elm = vnode.elm;\\n var oldProps = oldVnode.data.domProps || {};\\n var props = vnode.data.domProps || {};\\n // clone observed objects, as the user probably wants to mutate it\\n if (props.__ob__) {\\n props = vnode.data.domProps = extend({}, props);\\n }\\n\\n for (key in oldProps) {\\n if (props[key] == null) {\\n elm[key] = '';\\n }\\n }\\n for (key in props) {\\n cur = props[key];\\n // ignore children if the node has textContent or innerHTML,\\n // as these will throw away existing DOM nodes and cause removal errors\\n // on subsequent patches (#3360)\\n if (key === 'textContent' || key === 'innerHTML') {\\n if (vnode.children) { vnode.children.length = 0; }\\n if (cur === oldProps[key]) { continue }\\n }\\n if (key === 'value') {\\n // store value as _value as well since\\n // non-string values will be stringified\\n elm._value = cur;\\n // avoid resetting cursor position when value is the same\\n var strCur = cur == null ? '' : String(cur);\\n if (!elm.composing && (\\n (document.activeElement !== elm && elm.value !== strCur) ||\\n isValueChanged(vnode, strCur)\\n )) {\\n elm.value = strCur;\\n }\\n } else {\\n elm[key] = cur;\\n }\\n }\\n}\\n\\nfunction isValueChanged (vnode, newVal) {\\n var value = vnode.elm.value;\\n var modifiers = vnode.elm._vModifiers; // injected by v-model runtime\\n if ((modifiers && modifiers.number) || vnode.elm.type === 'number') {\\n return toNumber(value) !== toNumber(newVal)\\n }\\n if (modifiers && modifiers.trim) {\\n return value.trim() !== newVal.trim()\\n }\\n return value !== newVal\\n}\\n\\nvar domProps = {\\n create: updateDOMProps,\\n update: updateDOMProps\\n};\\n\\n/* */\\n\\nvar parseStyleText = cached(function (cssText) {\\n var res = {};\\n var listDelimiter = /;(?![^(]*\\\\))/g;\\n var propertyDelimiter = /:(.+)/;\\n cssText.split(listDelimiter).forEach(function (item) {\\n if (item) {\\n var tmp = item.split(propertyDelimiter);\\n tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());\\n }\\n });\\n return res\\n});\\n\\n// merge static and dynamic style data on the same vnode\\nfunction normalizeStyleData (data) {\\n var style = normalizeStyleBinding(data.style);\\n // static style is pre-processed into an object during compilation\\n // and is always a fresh object, so it's safe to merge into it\\n return data.staticStyle\\n ? extend(data.staticStyle, style)\\n : style\\n}\\n\\n// normalize possible array / string values into Object\\nfunction normalizeStyleBinding (bindingStyle) {\\n if (Array.isArray(bindingStyle)) {\\n return toObject(bindingStyle)\\n }\\n if (typeof bindingStyle === 'string') {\\n return parseStyleText(bindingStyle)\\n }\\n return bindingStyle\\n}\\n\\n/**\\n * parent component style should be after child's\\n * so that parent component's style could override it\\n */\\nfunction getStyle (vnode, checkChild) {\\n var res = {};\\n var styleData;\\n\\n if (checkChild) {\\n var childNode = vnode;\\n while (childNode.child) {\\n childNode = childNode.child._vnode;\\n if (childNode.data && (styleData = normalizeStyleData(childNode.data))) {\\n extend(res, styleData);\\n }\\n }\\n }\\n\\n if ((styleData = normalizeStyleData(vnode.data))) {\\n extend(res, styleData);\\n }\\n\\n var parentNode = vnode;\\n while ((parentNode = parentNode.parent)) {\\n if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) {\\n extend(res, styleData);\\n }\\n }\\n return res\\n}\\n\\n/* */\\n\\nvar cssVarRE = /^--/;\\nvar importantRE = /\\\\s*!important$/;\\nvar setProp = function (el, name, val) {\\n /* istanbul ignore if */\\n if (cssVarRE.test(name)) {\\n el.style.setProperty(name, val);\\n } else if (importantRE.test(val)) {\\n el.style.setProperty(name, val.replace(importantRE, ''), 'important');\\n } else {\\n el.style[normalize(name)] = val;\\n }\\n};\\n\\nvar prefixes = ['Webkit', 'Moz', 'ms'];\\n\\nvar testEl;\\nvar normalize = cached(function (prop) {\\n testEl = testEl || document.createElement('div');\\n prop = camelize(prop);\\n if (prop !== 'filter' && (prop in testEl.style)) {\\n return prop\\n }\\n var upper = prop.charAt(0).toUpperCase() + prop.slice(1);\\n for (var i = 0; i < prefixes.length; i++) {\\n var prefixed = prefixes[i] + upper;\\n if (prefixed in testEl.style) {\\n return prefixed\\n }\\n }\\n});\\n\\nfunction updateStyle (oldVnode, vnode) {\\n var data = vnode.data;\\n var oldData = oldVnode.data;\\n\\n if (!data.staticStyle && !data.style &&\\n !oldData.staticStyle && !oldData.style) {\\n return\\n }\\n\\n var cur, name;\\n var el = vnode.elm;\\n var oldStaticStyle = oldVnode.data.staticStyle;\\n var oldStyleBinding = oldVnode.data.style || {};\\n\\n // if static style exists, stylebinding already merged into it when doing normalizeStyleData\\n var oldStyle = oldStaticStyle || oldStyleBinding;\\n\\n var style = normalizeStyleBinding(vnode.data.style) || {};\\n\\n vnode.data.style = style.__ob__ ? extend({}, style) : style;\\n\\n var newStyle = getStyle(vnode, true);\\n\\n for (name in oldStyle) {\\n if (newStyle[name] == null) {\\n setProp(el, name, '');\\n }\\n }\\n for (name in newStyle) {\\n cur = newStyle[name];\\n if (cur !== oldStyle[name]) {\\n // ie9 setting to null has no effect, must use empty string\\n setProp(el, name, cur == null ? '' : cur);\\n }\\n }\\n}\\n\\nvar style = {\\n create: updateStyle,\\n update: updateStyle\\n};\\n\\n/* */\\n\\n/**\\n * Add class with compatibility for SVG since classList is not supported on\\n * SVG elements in IE\\n */\\nfunction addClass (el, cls) {\\n /* istanbul ignore if */\\n if (!cls || !cls.trim()) {\\n return\\n }\\n\\n /* istanbul ignore else */\\n if (el.classList) {\\n if (cls.indexOf(' ') > -1) {\\n cls.split(/\\\\s+/).forEach(function (c) { return el.classList.add(c); });\\n } else {\\n el.classList.add(cls);\\n }\\n } else {\\n var cur = ' ' + el.getAttribute('class') + ' ';\\n if (cur.indexOf(' ' + cls + ' ') < 0) {\\n el.setAttribute('class', (cur + cls).trim());\\n }\\n }\\n}\\n\\n/**\\n * Remove class with compatibility for SVG since classList is not supported on\\n * SVG elements in IE\\n */\\nfunction removeClass (el, cls) {\\n /* istanbul ignore if */\\n if (!cls || !cls.trim()) {\\n return\\n }\\n\\n /* istanbul ignore else */\\n if (el.classList) {\\n if (cls.indexOf(' ') > -1) {\\n cls.split(/\\\\s+/).forEach(function (c) { return el.classList.remove(c); });\\n } else {\\n el.classList.remove(cls);\\n }\\n } else {\\n var cur = ' ' + el.getAttribute('class') + ' ';\\n var tar = ' ' + cls + ' ';\\n while (cur.indexOf(tar) >= 0) {\\n cur = cur.replace(tar, ' ');\\n }\\n el.setAttribute('class', cur.trim());\\n }\\n}\\n\\n/* */\\n\\nvar hasTransition = inBrowser && !isIE9;\\nvar TRANSITION = 'transition';\\nvar ANIMATION = 'animation';\\n\\n// Transition property/event sniffing\\nvar transitionProp = 'transition';\\nvar transitionEndEvent = 'transitionend';\\nvar animationProp = 'animation';\\nvar animationEndEvent = 'animationend';\\nif (hasTransition) {\\n /* istanbul ignore if */\\n if (window.ontransitionend === undefined &&\\n window.onwebkittransitionend !== undefined) {\\n transitionProp = 'WebkitTransition';\\n transitionEndEvent = 'webkitTransitionEnd';\\n }\\n if (window.onanimationend === undefined &&\\n window.onwebkitanimationend !== undefined) {\\n animationProp = 'WebkitAnimation';\\n animationEndEvent = 'webkitAnimationEnd';\\n }\\n}\\n\\nvar raf = (inBrowser && window.requestAnimationFrame) || setTimeout;\\nfunction nextFrame (fn) {\\n raf(function () {\\n raf(fn);\\n });\\n}\\n\\nfunction addTransitionClass (el, cls) {\\n (el._transitionClasses || (el._transitionClasses = [])).push(cls);\\n addClass(el, cls);\\n}\\n\\nfunction removeTransitionClass (el, cls) {\\n if (el._transitionClasses) {\\n remove$1(el._transitionClasses, cls);\\n }\\n removeClass(el, cls);\\n}\\n\\nfunction whenTransitionEnds (\\n el,\\n expectedType,\\n cb\\n) {\\n var ref = getTransitionInfo(el, expectedType);\\n var type = ref.type;\\n var timeout = ref.timeout;\\n var propCount = ref.propCount;\\n if (!type) { return cb() }\\n var event = type === TRANSITION ? transitionEndEvent : animationEndEvent;\\n var ended = 0;\\n var end = function () {\\n el.removeEventListener(event, onEnd);\\n cb();\\n };\\n var onEnd = function (e) {\\n if (e.target === el) {\\n if (++ended >= propCount) {\\n end();\\n }\\n }\\n };\\n setTimeout(function () {\\n if (ended < propCount) {\\n end();\\n }\\n }, timeout + 1);\\n el.addEventListener(event, onEnd);\\n}\\n\\nvar transformRE = /\\\\b(transform|all)(,|$)/;\\n\\nfunction getTransitionInfo (el, expectedType) {\\n var styles = window.getComputedStyle(el);\\n var transitioneDelays = styles[transitionProp + 'Delay'].split(', ');\\n var transitionDurations = styles[transitionProp + 'Duration'].split(', ');\\n var transitionTimeout = getTimeout(transitioneDelays, transitionDurations);\\n var animationDelays = styles[animationProp + 'Delay'].split(', ');\\n var animationDurations = styles[animationProp + 'Duration'].split(', ');\\n var animationTimeout = getTimeout(animationDelays, animationDurations);\\n\\n var type;\\n var timeout = 0;\\n var propCount = 0;\\n /* istanbul ignore if */\\n if (expectedType === TRANSITION) {\\n if (transitionTimeout > 0) {\\n type = TRANSITION;\\n timeout = transitionTimeout;\\n propCount = transitionDurations.length;\\n }\\n } else if (expectedType === ANIMATION) {\\n if (animationTimeout > 0) {\\n type = ANIMATION;\\n timeout = animationTimeout;\\n propCount = animationDurations.length;\\n }\\n } else {\\n timeout = Math.max(transitionTimeout, animationTimeout);\\n type = timeout > 0\\n ? transitionTimeout > animationTimeout\\n ? TRANSITION\\n : ANIMATION\\n : null;\\n propCount = type\\n ? type === TRANSITION\\n ? transitionDurations.length\\n : animationDurations.length\\n : 0;\\n }\\n var hasTransform =\\n type === TRANSITION &&\\n transformRE.test(styles[transitionProp + 'Property']);\\n return {\\n type: type,\\n timeout: timeout,\\n propCount: propCount,\\n hasTransform: hasTransform\\n }\\n}\\n\\nfunction getTimeout (delays, durations) {\\n /* istanbul ignore next */\\n while (delays.length < durations.length) {\\n delays = delays.concat(delays);\\n }\\n\\n return Math.max.apply(null, durations.map(function (d, i) {\\n return toMs(d) + toMs(delays[i])\\n }))\\n}\\n\\nfunction toMs (s) {\\n return Number(s.slice(0, -1)) * 1000\\n}\\n\\n/* */\\n\\nfunction enter (vnode, toggleDisplay) {\\n var el = vnode.elm;\\n\\n // call leave callback now\\n if (el._leaveCb) {\\n el._leaveCb.cancelled = true;\\n el._leaveCb();\\n }\\n\\n var data = resolveTransition(vnode.data.transition);\\n if (!data) {\\n return\\n }\\n\\n /* istanbul ignore if */\\n if (el._enterCb || el.nodeType !== 1) {\\n return\\n }\\n\\n var css = data.css;\\n var type = data.type;\\n var enterClass = data.enterClass;\\n var enterActiveClass = data.enterActiveClass;\\n var appearClass = data.appearClass;\\n var appearActiveClass = data.appearActiveClass;\\n var beforeEnter = data.beforeEnter;\\n var enter = data.enter;\\n var afterEnter = data.afterEnter;\\n var enterCancelled = data.enterCancelled;\\n var beforeAppear = data.beforeAppear;\\n var appear = data.appear;\\n var afterAppear = data.afterAppear;\\n var appearCancelled = data.appearCancelled;\\n\\n // activeInstance will always be the <transition> component managing this\\n // transition. One edge case to check is when the <transition> is placed\\n // as the root node of a child component. In that case we need to check\\n // <transition>'s parent for appear check.\\n var context = activeInstance;\\n var transitionNode = activeInstance.$vnode;\\n while (transitionNode && transitionNode.parent) {\\n transitionNode = transitionNode.parent;\\n context = transitionNode.context;\\n }\\n\\n var isAppear = !context._isMounted || !vnode.isRootInsert;\\n\\n if (isAppear && !appear && appear !== '') {\\n return\\n }\\n\\n var startClass = isAppear ? appearClass : enterClass;\\n var activeClass = isAppear ? appearActiveClass : enterActiveClass;\\n var beforeEnterHook = isAppear ? (beforeAppear || beforeEnter) : beforeEnter;\\n var enterHook = isAppear ? (typeof appear === 'function' ? appear : enter) : enter;\\n var afterEnterHook = isAppear ? (afterAppear || afterEnter) : afterEnter;\\n var enterCancelledHook = isAppear ? (appearCancelled || enterCancelled) : enterCancelled;\\n\\n var expectsCSS = css !== false && !isIE9;\\n var userWantsControl =\\n enterHook &&\\n // enterHook may be a bound method which exposes\\n // the length of original fn as _length\\n (enterHook._length || enterHook.length) > 1;\\n\\n var cb = el._enterCb = once(function () {\\n if (expectsCSS) {\\n removeTransitionClass(el, activeClass);\\n }\\n if (cb.cancelled) {\\n if (expectsCSS) {\\n removeTransitionClass(el, startClass);\\n }\\n enterCancelledHook && enterCancelledHook(el);\\n } else {\\n afterEnterHook && afterEnterHook(el);\\n }\\n el._enterCb = null;\\n });\\n\\n if (!vnode.data.show) {\\n // remove pending leave element on enter by injecting an insert hook\\n mergeVNodeHook(vnode.data.hook || (vnode.data.hook = {}), 'insert', function () {\\n var parent = el.parentNode;\\n var pendingNode = parent && parent._pending && parent._pending[vnode.key];\\n if (pendingNode &&\\n pendingNode.context === vnode.context &&\\n pendingNode.tag === vnode.tag &&\\n pendingNode.elm._leaveCb) {\\n pendingNode.elm._leaveCb();\\n }\\n enterHook && enterHook(el, cb);\\n }, 'transition-insert');\\n }\\n\\n // start enter transition\\n beforeEnterHook && beforeEnterHook(el);\\n if (expectsCSS) {\\n addTransitionClass(el, startClass);\\n addTransitionClass(el, activeClass);\\n nextFrame(function () {\\n removeTransitionClass(el, startClass);\\n if (!cb.cancelled && !userWantsControl) {\\n whenTransitionEnds(el, type, cb);\\n }\\n });\\n }\\n\\n if (vnode.data.show) {\\n toggleDisplay && toggleDisplay();\\n enterHook && enterHook(el, cb);\\n }\\n\\n if (!expectsCSS && !userWantsControl) {\\n cb();\\n }\\n}\\n\\nfunction leave (vnode, rm) {\\n var el = vnode.elm;\\n\\n // call enter callback now\\n if (el._enterCb) {\\n el._enterCb.cancelled = true;\\n el._enterCb();\\n }\\n\\n var data = resolveTransition(vnode.data.transition);\\n if (!data) {\\n return rm()\\n }\\n\\n /* istanbul ignore if */\\n if (el._leaveCb || el.nodeType !== 1) {\\n return\\n }\\n\\n var css = data.css;\\n var type = data.type;\\n var leaveClass = data.leaveClass;\\n var leaveActiveClass = data.leaveActiveClass;\\n var beforeLeave = data.beforeLeave;\\n var leave = data.leave;\\n var afterLeave = data.afterLeave;\\n var leaveCancelled = data.leaveCancelled;\\n var delayLeave = data.delayLeave;\\n\\n var expectsCSS = css !== false && !isIE9;\\n var userWantsControl =\\n leave &&\\n // leave hook may be a bound method which exposes\\n // the length of original fn as _length\\n (leave._length || leave.length) > 1;\\n\\n var cb = el._leaveCb = once(function () {\\n if (el.parentNode && el.parentNode._pending) {\\n el.parentNode._pending[vnode.key] = null;\\n }\\n if (expectsCSS) {\\n removeTransitionClass(el, leaveActiveClass);\\n }\\n if (cb.cancelled) {\\n if (expectsCSS) {\\n removeTransitionClass(el, leaveClass);\\n }\\n leaveCancelled && leaveCancelled(el);\\n } else {\\n rm();\\n afterLeave && afterLeave(el);\\n }\\n el._leaveCb = null;\\n });\\n\\n if (delayLeave) {\\n delayLeave(performLeave);\\n } else {\\n performLeave();\\n }\\n\\n function performLeave () {\\n // the delayed leave may have already been cancelled\\n if (cb.cancelled) {\\n return\\n }\\n // record leaving element\\n if (!vnode.data.show) {\\n (el.parentNode._pending || (el.parentNode._pending = {}))[vnode.key] = vnode;\\n }\\n beforeLeave && beforeLeave(el);\\n if (expectsCSS) {\\n addTransitionClass(el, leaveClass);\\n addTransitionClass(el, leaveActiveClass);\\n nextFrame(function () {\\n removeTransitionClass(el, leaveClass);\\n if (!cb.cancelled && !userWantsControl) {\\n whenTransitionEnds(el, type, cb);\\n }\\n });\\n }\\n leave && leave(el, cb);\\n if (!expectsCSS && !userWantsControl) {\\n cb();\\n }\\n }\\n}\\n\\nfunction resolveTransition (def$$1) {\\n if (!def$$1) {\\n return\\n }\\n /* istanbul ignore else */\\n if (typeof def$$1 === 'object') {\\n var res = {};\\n if (def$$1.css !== false) {\\n extend(res, autoCssTransition(def$$1.name || 'v'));\\n }\\n extend(res, def$$1);\\n return res\\n } else if (typeof def$$1 === 'string') {\\n return autoCssTransition(def$$1)\\n }\\n}\\n\\nvar autoCssTransition = cached(function (name) {\\n return {\\n enterClass: (name + \\\"-enter\\\"),\\n leaveClass: (name + \\\"-leave\\\"),\\n appearClass: (name + \\\"-enter\\\"),\\n enterActiveClass: (name + \\\"-enter-active\\\"),\\n leaveActiveClass: (name + \\\"-leave-active\\\"),\\n appearActiveClass: (name + \\\"-enter-active\\\")\\n }\\n});\\n\\nfunction once (fn) {\\n var called = false;\\n return function () {\\n if (!called) {\\n called = true;\\n fn();\\n }\\n }\\n}\\n\\nfunction _enter (_, vnode) {\\n if (!vnode.data.show) {\\n enter(vnode);\\n }\\n}\\n\\nvar transition = inBrowser ? {\\n create: _enter,\\n activate: _enter,\\n remove: function remove (vnode, rm) {\\n /* istanbul ignore else */\\n if (!vnode.data.show) {\\n leave(vnode, rm);\\n } else {\\n rm();\\n }\\n }\\n} : {};\\n\\nvar platformModules = [\\n attrs,\\n klass,\\n events,\\n domProps,\\n style,\\n transition\\n];\\n\\n/* */\\n\\n// the directive module should be applied last, after all\\n// built-in modules have been applied.\\nvar modules = platformModules.concat(baseModules);\\n\\nvar patch$1 = createPatchFunction({ nodeOps: nodeOps, modules: modules });\\n\\n/**\\n * Not type checking this file because flow doesn't like attaching\\n * properties to Elements.\\n */\\n\\nvar modelableTagRE = /^input|select|textarea|vue-component-[0-9]+(-[0-9a-zA-Z_-]*)?$/;\\n\\n/* istanbul ignore if */\\nif (isIE9) {\\n // http://www.matts411.com/post/internet-explorer-9-oninput/\\n document.addEventListener('selectionchange', function () {\\n var el = document.activeElement;\\n if (el && el.vmodel) {\\n trigger(el, 'input');\\n }\\n });\\n}\\n\\nvar model = {\\n inserted: function inserted (el, binding, vnode) {\\n {\\n if (!modelableTagRE.test(vnode.tag)) {\\n warn(\\n \\\"v-model is not supported on element type: <\\\" + (vnode.tag) + \\\">. \\\" +\\n 'If you are working with contenteditable, it\\\\'s recommended to ' +\\n 'wrap a library dedicated for that purpose inside a custom component.',\\n vnode.context\\n );\\n }\\n }\\n if (vnode.tag === 'select') {\\n var cb = function () {\\n setSelected(el, binding, vnode.context);\\n };\\n cb();\\n /* istanbul ignore if */\\n if (isIE || isEdge) {\\n setTimeout(cb, 0);\\n }\\n } else if (vnode.tag === 'textarea' || el.type === 'text') {\\n el._vModifiers = binding.modifiers;\\n if (!binding.modifiers.lazy) {\\n if (!isAndroid) {\\n el.addEventListener('compositionstart', onCompositionStart);\\n el.addEventListener('compositionend', onCompositionEnd);\\n }\\n /* istanbul ignore if */\\n if (isIE9) {\\n el.vmodel = true;\\n }\\n }\\n }\\n },\\n componentUpdated: function componentUpdated (el, binding, vnode) {\\n if (vnode.tag === 'select') {\\n setSelected(el, binding, vnode.context);\\n // in case the options rendered by v-for have changed,\\n // it's possible that the value is out-of-sync with the rendered options.\\n // detect such cases and filter out values that no longer has a matching\\n // option in the DOM.\\n var needReset = el.multiple\\n ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })\\n : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);\\n if (needReset) {\\n trigger(el, 'change');\\n }\\n }\\n }\\n};\\n\\nfunction setSelected (el, binding, vm) {\\n var value = binding.value;\\n var isMultiple = el.multiple;\\n if (isMultiple && !Array.isArray(value)) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"<select multiple v-model=\\\\\\\"\\\" + (binding.expression) + \\\"\\\\\\\"> \\\" +\\n \\\"expects an Array value for its binding, but got \\\" + (Object.prototype.toString.call(value).slice(8, -1)),\\n vm\\n );\\n return\\n }\\n var selected, option;\\n for (var i = 0, l = el.options.length; i < l; i++) {\\n option = el.options[i];\\n if (isMultiple) {\\n selected = looseIndexOf(value, getValue(option)) > -1;\\n if (option.selected !== selected) {\\n option.selected = selected;\\n }\\n } else {\\n if (looseEqual(getValue(option), value)) {\\n if (el.selectedIndex !== i) {\\n el.selectedIndex = i;\\n }\\n return\\n }\\n }\\n }\\n if (!isMultiple) {\\n el.selectedIndex = -1;\\n }\\n}\\n\\nfunction hasNoMatchingOption (value, options) {\\n for (var i = 0, l = options.length; i < l; i++) {\\n if (looseEqual(getValue(options[i]), value)) {\\n return false\\n }\\n }\\n return true\\n}\\n\\nfunction getValue (option) {\\n return '_value' in option\\n ? option._value\\n : option.value\\n}\\n\\nfunction onCompositionStart (e) {\\n e.target.composing = true;\\n}\\n\\nfunction onCompositionEnd (e) {\\n e.target.composing = false;\\n trigger(e.target, 'input');\\n}\\n\\nfunction trigger (el, type) {\\n var e = document.createEvent('HTMLEvents');\\n e.initEvent(type, true, true);\\n el.dispatchEvent(e);\\n}\\n\\n/* */\\n\\n// recursively search for possible transition defined inside the component root\\nfunction locateNode (vnode) {\\n return vnode.child && (!vnode.data || !vnode.data.transition)\\n ? locateNode(vnode.child._vnode)\\n : vnode\\n}\\n\\nvar show = {\\n bind: function bind (el, ref, vnode) {\\n var value = ref.value;\\n\\n vnode = locateNode(vnode);\\n var transition = vnode.data && vnode.data.transition;\\n var originalDisplay = el.__vOriginalDisplay =\\n el.style.display === 'none' ? '' : el.style.display;\\n if (value && transition && !isIE9) {\\n vnode.data.show = true;\\n enter(vnode, function () {\\n el.style.display = originalDisplay;\\n });\\n } else {\\n el.style.display = value ? originalDisplay : 'none';\\n }\\n },\\n update: function update (el, ref, vnode) {\\n var value = ref.value;\\n var oldValue = ref.oldValue;\\n\\n /* istanbul ignore if */\\n if (value === oldValue) { return }\\n vnode = locateNode(vnode);\\n var transition = vnode.data && vnode.data.transition;\\n if (transition && !isIE9) {\\n vnode.data.show = true;\\n if (value) {\\n enter(vnode, function () {\\n el.style.display = el.__vOriginalDisplay;\\n });\\n } else {\\n leave(vnode, function () {\\n el.style.display = 'none';\\n });\\n }\\n } else {\\n el.style.display = value ? el.__vOriginalDisplay : 'none';\\n }\\n }\\n};\\n\\nvar platformDirectives = {\\n model: model,\\n show: show\\n};\\n\\n/* */\\n\\n// Provides transition support for a single element/component.\\n// supports transition mode (out-in / in-out)\\n\\nvar transitionProps = {\\n name: String,\\n appear: Boolean,\\n css: Boolean,\\n mode: String,\\n type: String,\\n enterClass: String,\\n leaveClass: String,\\n enterActiveClass: String,\\n leaveActiveClass: String,\\n appearClass: String,\\n appearActiveClass: String\\n};\\n\\n// in case the child is also an abstract component, e.g. <keep-alive>\\n// we want to recursively retrieve the real component to be rendered\\nfunction getRealChild (vnode) {\\n var compOptions = vnode && vnode.componentOptions;\\n if (compOptions && compOptions.Ctor.options.abstract) {\\n return getRealChild(getFirstComponentChild(compOptions.children))\\n } else {\\n return vnode\\n }\\n}\\n\\nfunction extractTransitionData (comp) {\\n var data = {};\\n var options = comp.$options;\\n // props\\n for (var key in options.propsData) {\\n data[key] = comp[key];\\n }\\n // events.\\n // extract listeners and pass them directly to the transition methods\\n var listeners = options._parentListeners;\\n for (var key$1 in listeners) {\\n data[camelize(key$1)] = listeners[key$1].fn;\\n }\\n return data\\n}\\n\\nfunction placeholder (h, rawChild) {\\n return /\\\\d-keep-alive$/.test(rawChild.tag)\\n ? h('keep-alive')\\n : null\\n}\\n\\nfunction hasParentTransition (vnode) {\\n while ((vnode = vnode.parent)) {\\n if (vnode.data.transition) {\\n return true\\n }\\n }\\n}\\n\\nvar Transition = {\\n name: 'transition',\\n props: transitionProps,\\n abstract: true,\\n render: function render (h) {\\n var this$1 = this;\\n\\n var children = this.$slots.default;\\n if (!children) {\\n return\\n }\\n\\n // filter out text nodes (possible whitespaces)\\n children = children.filter(function (c) { return c.tag; });\\n /* istanbul ignore if */\\n if (!children.length) {\\n return\\n }\\n\\n // warn multiple elements\\n if (\\\"development\\\" !== 'production' && children.length > 1) {\\n warn(\\n '<transition> can only be used on a single element. Use ' +\\n '<transition-group> for lists.',\\n this.$parent\\n );\\n }\\n\\n var mode = this.mode;\\n\\n // warn invalid mode\\n if (\\\"development\\\" !== 'production' &&\\n mode && mode !== 'in-out' && mode !== 'out-in') {\\n warn(\\n 'invalid <transition> mode: ' + mode,\\n this.$parent\\n );\\n }\\n\\n var rawChild = children[0];\\n\\n // if this is a component root node and the component's\\n // parent container node also has transition, skip.\\n if (hasParentTransition(this.$vnode)) {\\n return rawChild\\n }\\n\\n // apply transition data to child\\n // use getRealChild() to ignore abstract components e.g. keep-alive\\n var child = getRealChild(rawChild);\\n /* istanbul ignore if */\\n if (!child) {\\n return rawChild\\n }\\n\\n if (this._leaving) {\\n return placeholder(h, rawChild)\\n }\\n\\n var key = child.key = child.key == null || child.isStatic\\n ? (\\\"__v\\\" + (child.tag + this._uid) + \\\"__\\\")\\n : child.key;\\n var data = (child.data || (child.data = {})).transition = extractTransitionData(this);\\n var oldRawChild = this._vnode;\\n var oldChild = getRealChild(oldRawChild);\\n\\n // mark v-show\\n // so that the transition module can hand over the control to the directive\\n if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) {\\n child.data.show = true;\\n }\\n\\n if (oldChild && oldChild.data && oldChild.key !== key) {\\n // replace old child transition data with fresh one\\n // important for dynamic transitions!\\n var oldData = oldChild.data.transition = extend({}, data);\\n\\n // handle transition mode\\n if (mode === 'out-in') {\\n // return placeholder node and queue update when leave finishes\\n this._leaving = true;\\n mergeVNodeHook(oldData, 'afterLeave', function () {\\n this$1._leaving = false;\\n this$1.$forceUpdate();\\n }, key);\\n return placeholder(h, rawChild)\\n } else if (mode === 'in-out') {\\n var delayedLeave;\\n var performLeave = function () { delayedLeave(); };\\n mergeVNodeHook(data, 'afterEnter', performLeave, key);\\n mergeVNodeHook(data, 'enterCancelled', performLeave, key);\\n mergeVNodeHook(oldData, 'delayLeave', function (leave) {\\n delayedLeave = leave;\\n }, key);\\n }\\n }\\n\\n return rawChild\\n }\\n};\\n\\n/* */\\n\\n// Provides transition support for list items.\\n// supports move transitions using the FLIP technique.\\n\\n// Because the vdom's children update algorithm is \\\"unstable\\\" - i.e.\\n// it doesn't guarantee the relative positioning of removed elements,\\n// we force transition-group to update its children into two passes:\\n// in the first pass, we remove all nodes that need to be removed,\\n// triggering their leaving transition; in the second pass, we insert/move\\n// into the final disired state. This way in the second pass removed\\n// nodes will remain where they should be.\\n\\nvar props = extend({\\n tag: String,\\n moveClass: String\\n}, transitionProps);\\n\\ndelete props.mode;\\n\\nvar TransitionGroup = {\\n props: props,\\n\\n render: function render (h) {\\n var tag = this.tag || this.$vnode.data.tag || 'span';\\n var map = Object.create(null);\\n var prevChildren = this.prevChildren = this.children;\\n var rawChildren = this.$slots.default || [];\\n var children = this.children = [];\\n var transitionData = extractTransitionData(this);\\n\\n for (var i = 0; i < rawChildren.length; i++) {\\n var c = rawChildren[i];\\n if (c.tag) {\\n if (c.key != null && String(c.key).indexOf('__vlist') !== 0) {\\n children.push(c);\\n map[c.key] = c\\n ;(c.data || (c.data = {})).transition = transitionData;\\n } else {\\n var opts = c.componentOptions;\\n var name = opts\\n ? (opts.Ctor.options.name || opts.tag)\\n : c.tag;\\n warn((\\\"<transition-group> children must be keyed: <\\\" + name + \\\">\\\"));\\n }\\n }\\n }\\n\\n if (prevChildren) {\\n var kept = [];\\n var removed = [];\\n for (var i$1 = 0; i$1 < prevChildren.length; i$1++) {\\n var c$1 = prevChildren[i$1];\\n c$1.data.transition = transitionData;\\n c$1.data.pos = c$1.elm.getBoundingClientRect();\\n if (map[c$1.key]) {\\n kept.push(c$1);\\n } else {\\n removed.push(c$1);\\n }\\n }\\n this.kept = h(tag, null, kept);\\n this.removed = removed;\\n }\\n\\n return h(tag, null, children)\\n },\\n\\n beforeUpdate: function beforeUpdate () {\\n // force removing pass\\n this.__patch__(\\n this._vnode,\\n this.kept,\\n false, // hydrating\\n true // removeOnly (!important, avoids unnecessary moves)\\n );\\n this._vnode = this.kept;\\n },\\n\\n updated: function updated () {\\n var children = this.prevChildren;\\n var moveClass = this.moveClass || ((this.name || 'v') + '-move');\\n if (!children.length || !this.hasMove(children[0].elm, moveClass)) {\\n return\\n }\\n\\n // we divide the work into three loops to avoid mixing DOM reads and writes\\n // in each iteration - which helps prevent layout thrashing.\\n children.forEach(callPendingCbs);\\n children.forEach(recordPosition);\\n children.forEach(applyTranslation);\\n\\n // force reflow to put everything in position\\n var f = document.body.offsetHeight; // eslint-disable-line\\n\\n children.forEach(function (c) {\\n if (c.data.moved) {\\n var el = c.elm;\\n var s = el.style;\\n addTransitionClass(el, moveClass);\\n s.transform = s.WebkitTransform = s.transitionDuration = '';\\n el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) {\\n if (!e || /transform$/.test(e.propertyName)) {\\n el.removeEventListener(transitionEndEvent, cb);\\n el._moveCb = null;\\n removeTransitionClass(el, moveClass);\\n }\\n });\\n }\\n });\\n },\\n\\n methods: {\\n hasMove: function hasMove (el, moveClass) {\\n /* istanbul ignore if */\\n if (!hasTransition) {\\n return false\\n }\\n if (this._hasMove != null) {\\n return this._hasMove\\n }\\n addTransitionClass(el, moveClass);\\n var info = getTransitionInfo(el);\\n removeTransitionClass(el, moveClass);\\n return (this._hasMove = info.hasTransform)\\n }\\n }\\n};\\n\\nfunction callPendingCbs (c) {\\n /* istanbul ignore if */\\n if (c.elm._moveCb) {\\n c.elm._moveCb();\\n }\\n /* istanbul ignore if */\\n if (c.elm._enterCb) {\\n c.elm._enterCb();\\n }\\n}\\n\\nfunction recordPosition (c) {\\n c.data.newPos = c.elm.getBoundingClientRect();\\n}\\n\\nfunction applyTranslation (c) {\\n var oldPos = c.data.pos;\\n var newPos = c.data.newPos;\\n var dx = oldPos.left - newPos.left;\\n var dy = oldPos.top - newPos.top;\\n if (dx || dy) {\\n c.data.moved = true;\\n var s = c.elm.style;\\n s.transform = s.WebkitTransform = \\\"translate(\\\" + dx + \\\"px,\\\" + dy + \\\"px)\\\";\\n s.transitionDuration = '0s';\\n }\\n}\\n\\nvar platformComponents = {\\n Transition: Transition,\\n TransitionGroup: TransitionGroup\\n};\\n\\n/* */\\n\\n// install platform specific utils\\nVue$3.config.isUnknownElement = isUnknownElement;\\nVue$3.config.isReservedTag = isReservedTag;\\nVue$3.config.getTagNamespace = getTagNamespace;\\nVue$3.config.mustUseProp = mustUseProp;\\n\\n// install platform runtime directives & components\\nextend(Vue$3.options.directives, platformDirectives);\\nextend(Vue$3.options.components, platformComponents);\\n\\n// install platform patch function\\nVue$3.prototype.__patch__ = inBrowser ? patch$1 : noop;\\n\\n// wrap mount\\nVue$3.prototype.$mount = function (\\n el,\\n hydrating\\n) {\\n el = el && inBrowser ? query(el) : undefined;\\n return this._mount(el, hydrating)\\n};\\n\\n// devtools global hook\\n/* istanbul ignore next */\\nsetTimeout(function () {\\n if (config.devtools) {\\n if (devtools) {\\n devtools.emit('init', Vue$3);\\n } else if (\\n \\\"development\\\" !== 'production' &&\\n inBrowser && !isEdge && /Chrome\\\\/\\\\d+/.test(window.navigator.userAgent)\\n ) {\\n console.log(\\n 'Download the Vue Devtools for a better development experience:\\\\n' +\\n 'https://github.com/vuejs/vue-devtools'\\n );\\n }\\n }\\n}, 0);\\n\\n/* */\\n\\n// check whether current browser encodes a char inside attribute values\\nfunction shouldDecode (content, encoded) {\\n var div = document.createElement('div');\\n div.innerHTML = \\\"<div a=\\\\\\\"\\\" + content + \\\"\\\\\\\">\\\";\\n return div.innerHTML.indexOf(encoded) > 0\\n}\\n\\n// #3663\\n// IE encodes newlines inside attribute values while other browsers don't\\nvar shouldDecodeNewlines = inBrowser ? shouldDecode('\\\\n', '&#10;') : false;\\n\\n/* */\\n\\nvar decoder;\\n\\nfunction decode (html) {\\n decoder = decoder || document.createElement('div');\\n decoder.innerHTML = html;\\n return decoder.textContent\\n}\\n\\n/* */\\n\\nvar isUnaryTag = makeMap(\\n 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\\n 'link,meta,param,source,track,wbr',\\n true\\n);\\n\\n// Elements that you can, intentionally, leave open\\n// (and which close themselves)\\nvar canBeLeftOpenTag = makeMap(\\n 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source',\\n true\\n);\\n\\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\\nvar isNonPhrasingTag = makeMap(\\n 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\\n 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\\n 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\\n 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\\n 'title,tr,track',\\n true\\n);\\n\\n/**\\n * Not type-checking this file because it's mostly vendor code.\\n */\\n\\n/*!\\n * HTML Parser By John Resig (ejohn.org)\\n * Modified by Juriy \\\"kangax\\\" Zaytsev\\n * Original code by Erik Arvidsson, Mozilla Public License\\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\\n */\\n\\n// Regular Expressions for parsing tags and attributes\\nvar singleAttrIdentifier = /([^\\\\s\\\"'<>/=]+)/;\\nvar singleAttrAssign = /(?:=)/;\\nvar singleAttrValues = [\\n // attr value double quotes\\n /\\\"([^\\\"]*)\\\"+/.source,\\n // attr value, single quotes\\n /'([^']*)'+/.source,\\n // attr value, no quotes\\n /([^\\\\s\\\"'=<>`]+)/.source\\n];\\nvar attribute = new RegExp(\\n '^\\\\\\\\s*' + singleAttrIdentifier.source +\\n '(?:\\\\\\\\s*(' + singleAttrAssign.source + ')' +\\n '\\\\\\\\s*(?:' + singleAttrValues.join('|') + '))?'\\n);\\n\\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\\n// but for Vue templates we can enforce a simple charset\\nvar ncname = '[a-zA-Z_][\\\\\\\\w\\\\\\\\-\\\\\\\\.]*';\\nvar qnameCapture = '((?:' + ncname + '\\\\\\\\:)?' + ncname + ')';\\nvar startTagOpen = new RegExp('^<' + qnameCapture);\\nvar startTagClose = /^\\\\s*(\\\\/?)>/;\\nvar endTag = new RegExp('^<\\\\\\\\/' + qnameCapture + '[^>]*>');\\nvar doctype = /^<!DOCTYPE [^>]+>/i;\\nvar comment = /^<!--/;\\nvar conditionalComment = /^<!\\\\[/;\\n\\nvar IS_REGEX_CAPTURING_BROKEN = false;\\n'x'.replace(/x(.)?/g, function (m, g) {\\n IS_REGEX_CAPTURING_BROKEN = g === '';\\n});\\n\\n// Special Elements (can contain anything)\\nvar isScriptOrStyle = makeMap('script,style', true);\\nvar hasLang = function (attr) { return attr.name === 'lang' && attr.value !== 'html'; };\\nvar isSpecialTag = function (tag, isSFC, stack) {\\n if (isScriptOrStyle(tag)) {\\n return true\\n }\\n if (isSFC && stack.length === 1) {\\n // top-level template that has no pre-processor\\n if (tag === 'template' && !stack[0].attrs.some(hasLang)) {\\n return false\\n } else {\\n return true\\n }\\n }\\n return false\\n};\\n\\nvar reCache = {};\\n\\nvar ltRE = /&lt;/g;\\nvar gtRE = /&gt;/g;\\nvar nlRE = /&#10;/g;\\nvar ampRE = /&amp;/g;\\nvar quoteRE = /&quot;/g;\\n\\nfunction decodeAttr (value, shouldDecodeNewlines) {\\n if (shouldDecodeNewlines) {\\n value = value.replace(nlRE, '\\\\n');\\n }\\n return value\\n .replace(ltRE, '<')\\n .replace(gtRE, '>')\\n .replace(ampRE, '&')\\n .replace(quoteRE, '\\\"')\\n}\\n\\nfunction parseHTML (html, options) {\\n var stack = [];\\n var expectHTML = options.expectHTML;\\n var isUnaryTag$$1 = options.isUnaryTag || no;\\n var index = 0;\\n var last, lastTag;\\n while (html) {\\n last = html;\\n // Make sure we're not in a script or style element\\n if (!lastTag || !isSpecialTag(lastTag, options.sfc, stack)) {\\n var textEnd = html.indexOf('<');\\n if (textEnd === 0) {\\n // Comment:\\n if (comment.test(html)) {\\n var commentEnd = html.indexOf('-->');\\n\\n if (commentEnd >= 0) {\\n advance(commentEnd + 3);\\n continue\\n }\\n }\\n\\n // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\\n if (conditionalComment.test(html)) {\\n var conditionalEnd = html.indexOf(']>');\\n\\n if (conditionalEnd >= 0) {\\n advance(conditionalEnd + 2);\\n continue\\n }\\n }\\n\\n // Doctype:\\n var doctypeMatch = html.match(doctype);\\n if (doctypeMatch) {\\n advance(doctypeMatch[0].length);\\n continue\\n }\\n\\n // End tag:\\n var endTagMatch = html.match(endTag);\\n if (endTagMatch) {\\n var curIndex = index;\\n advance(endTagMatch[0].length);\\n parseEndTag(endTagMatch[0], endTagMatch[1], curIndex, index);\\n continue\\n }\\n\\n // Start tag:\\n var startTagMatch = parseStartTag();\\n if (startTagMatch) {\\n handleStartTag(startTagMatch);\\n continue\\n }\\n }\\n\\n var text = (void 0), rest$1 = (void 0), next = (void 0);\\n if (textEnd > 0) {\\n rest$1 = html.slice(textEnd);\\n while (\\n !endTag.test(rest$1) &&\\n !startTagOpen.test(rest$1) &&\\n !comment.test(rest$1) &&\\n !conditionalComment.test(rest$1)\\n ) {\\n // < in plain text, be forgiving and treat it as text\\n next = rest$1.indexOf('<', 1);\\n if (next < 0) { break }\\n textEnd += next;\\n rest$1 = html.slice(textEnd);\\n }\\n text = html.substring(0, textEnd);\\n advance(textEnd);\\n }\\n\\n if (textEnd < 0) {\\n text = html;\\n html = '';\\n }\\n\\n if (options.chars && text) {\\n options.chars(text);\\n }\\n } else {\\n var stackedTag = lastTag.toLowerCase();\\n var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\\\\\s\\\\\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\\n var endTagLength = 0;\\n var rest = html.replace(reStackedTag, function (all, text, endTag) {\\n endTagLength = endTag.length;\\n if (stackedTag !== 'script' && stackedTag !== 'style' && stackedTag !== 'noscript') {\\n text = text\\n .replace(/<!--([\\\\s\\\\S]*?)-->/g, '$1')\\n .replace(/<!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)]]>/g, '$1');\\n }\\n if (options.chars) {\\n options.chars(text);\\n }\\n return ''\\n });\\n index += html.length - rest.length;\\n html = rest;\\n parseEndTag('</' + stackedTag + '>', stackedTag, index - endTagLength, index);\\n }\\n\\n if (html === last && options.chars) {\\n options.chars(html);\\n break\\n }\\n }\\n\\n // Clean up any remaining tags\\n parseEndTag();\\n\\n function advance (n) {\\n index += n;\\n html = html.substring(n);\\n }\\n\\n function parseStartTag () {\\n var start = html.match(startTagOpen);\\n if (start) {\\n var match = {\\n tagName: start[1],\\n attrs: [],\\n start: index\\n };\\n advance(start[0].length);\\n var end, attr;\\n while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\\n advance(attr[0].length);\\n match.attrs.push(attr);\\n }\\n if (end) {\\n match.unarySlash = end[1];\\n advance(end[0].length);\\n match.end = index;\\n return match\\n }\\n }\\n }\\n\\n function handleStartTag (match) {\\n var tagName = match.tagName;\\n var unarySlash = match.unarySlash;\\n\\n if (expectHTML) {\\n if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\\n parseEndTag('', lastTag);\\n }\\n if (canBeLeftOpenTag(tagName) && lastTag === tagName) {\\n parseEndTag('', tagName);\\n }\\n }\\n\\n var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;\\n\\n var l = match.attrs.length;\\n var attrs = new Array(l);\\n for (var i = 0; i < l; i++) {\\n var args = match.attrs[i];\\n // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\\n if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\\\"\\\"') === -1) {\\n if (args[3] === '') { delete args[3]; }\\n if (args[4] === '') { delete args[4]; }\\n if (args[5] === '') { delete args[5]; }\\n }\\n var value = args[3] || args[4] || args[5] || '';\\n attrs[i] = {\\n name: args[1],\\n value: decodeAttr(\\n value,\\n options.shouldDecodeNewlines\\n )\\n };\\n }\\n\\n if (!unary) {\\n stack.push({ tag: tagName, attrs: attrs });\\n lastTag = tagName;\\n unarySlash = '';\\n }\\n\\n if (options.start) {\\n options.start(tagName, attrs, unary, match.start, match.end);\\n }\\n }\\n\\n function parseEndTag (tag, tagName, start, end) {\\n var pos;\\n if (start == null) { start = index; }\\n if (end == null) { end = index; }\\n\\n // Find the closest opened tag of the same type\\n if (tagName) {\\n var needle = tagName.toLowerCase();\\n for (pos = stack.length - 1; pos >= 0; pos--) {\\n if (stack[pos].tag.toLowerCase() === needle) {\\n break\\n }\\n }\\n } else {\\n // If no tag name is provided, clean shop\\n pos = 0;\\n }\\n\\n if (pos >= 0) {\\n // Close all the open elements, up the stack\\n for (var i = stack.length - 1; i >= pos; i--) {\\n if (options.end) {\\n options.end(stack[i].tag, start, end);\\n }\\n }\\n\\n // Remove the open elements from the stack\\n stack.length = pos;\\n lastTag = pos && stack[pos - 1].tag;\\n } else if (tagName.toLowerCase() === 'br') {\\n if (options.start) {\\n options.start(tagName, [], true, start, end);\\n }\\n } else if (tagName.toLowerCase() === 'p') {\\n if (options.start) {\\n options.start(tagName, [], false, start, end);\\n }\\n if (options.end) {\\n options.end(tagName, start, end);\\n }\\n }\\n }\\n}\\n\\n/* */\\n\\nfunction parseFilters (exp) {\\n var inSingle = false;\\n var inDouble = false;\\n var inTemplateString = false;\\n var inRegex = false;\\n var curly = 0;\\n var square = 0;\\n var paren = 0;\\n var lastFilterIndex = 0;\\n var c, prev, i, expression, filters;\\n\\n for (i = 0; i < exp.length; i++) {\\n prev = c;\\n c = exp.charCodeAt(i);\\n if (inSingle) {\\n if (c === 0x27 && prev !== 0x5C) { inSingle = false; }\\n } else if (inDouble) {\\n if (c === 0x22 && prev !== 0x5C) { inDouble = false; }\\n } else if (inTemplateString) {\\n if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; }\\n } else if (inRegex) {\\n if (c === 0x2f && prev !== 0x5C) { inRegex = false; }\\n } else if (\\n c === 0x7C && // pipe\\n exp.charCodeAt(i + 1) !== 0x7C &&\\n exp.charCodeAt(i - 1) !== 0x7C &&\\n !curly && !square && !paren\\n ) {\\n if (expression === undefined) {\\n // first filter, end of expression\\n lastFilterIndex = i + 1;\\n expression = exp.slice(0, i).trim();\\n } else {\\n pushFilter();\\n }\\n } else {\\n switch (c) {\\n case 0x22: inDouble = true; break // \\\"\\n case 0x27: inSingle = true; break // '\\n case 0x60: inTemplateString = true; break // `\\n case 0x28: paren++; break // (\\n case 0x29: paren--; break // )\\n case 0x5B: square++; break // [\\n case 0x5D: square--; break // ]\\n case 0x7B: curly++; break // {\\n case 0x7D: curly--; break // }\\n }\\n if (c === 0x2f) { // /\\n var j = i - 1;\\n var p = (void 0);\\n // find first non-whitespace prev char\\n for (; j >= 0; j--) {\\n p = exp.charAt(j);\\n if (p !== ' ') { break }\\n }\\n if (!p || !/[\\\\w$]/.test(p)) {\\n inRegex = true;\\n }\\n }\\n }\\n }\\n\\n if (expression === undefined) {\\n expression = exp.slice(0, i).trim();\\n } else if (lastFilterIndex !== 0) {\\n pushFilter();\\n }\\n\\n function pushFilter () {\\n (filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim());\\n lastFilterIndex = i + 1;\\n }\\n\\n if (filters) {\\n for (i = 0; i < filters.length; i++) {\\n expression = wrapFilter(expression, filters[i]);\\n }\\n }\\n\\n return expression\\n}\\n\\nfunction wrapFilter (exp, filter) {\\n var i = filter.indexOf('(');\\n if (i < 0) {\\n // _f: resolveFilter\\n return (\\\"_f(\\\\\\\"\\\" + filter + \\\"\\\\\\\")(\\\" + exp + \\\")\\\")\\n } else {\\n var name = filter.slice(0, i);\\n var args = filter.slice(i + 1);\\n return (\\\"_f(\\\\\\\"\\\" + name + \\\"\\\\\\\")(\\\" + exp + \\\",\\\" + args)\\n }\\n}\\n\\n/* */\\n\\nvar defaultTagRE = /\\\\{\\\\{((?:.|\\\\n)+?)\\\\}\\\\}/g;\\nvar regexEscapeRE = /[-.*+?^${}()|[\\\\]/\\\\\\\\]/g;\\n\\nvar buildRegex = cached(function (delimiters) {\\n var open = delimiters[0].replace(regexEscapeRE, '\\\\\\\\$&');\\n var close = delimiters[1].replace(regexEscapeRE, '\\\\\\\\$&');\\n return new RegExp(open + '((?:.|\\\\\\\\n)+?)' + close, 'g')\\n});\\n\\nfunction parseText (\\n text,\\n delimiters\\n) {\\n var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;\\n if (!tagRE.test(text)) {\\n return\\n }\\n var tokens = [];\\n var lastIndex = tagRE.lastIndex = 0;\\n var match, index;\\n while ((match = tagRE.exec(text))) {\\n index = match.index;\\n // push text token\\n if (index > lastIndex) {\\n tokens.push(JSON.stringify(text.slice(lastIndex, index)));\\n }\\n // tag token\\n var exp = parseFilters(match[1].trim());\\n tokens.push((\\\"_s(\\\" + exp + \\\")\\\"));\\n lastIndex = index + match[0].length;\\n }\\n if (lastIndex < text.length) {\\n tokens.push(JSON.stringify(text.slice(lastIndex)));\\n }\\n return tokens.join('+')\\n}\\n\\n/* */\\n\\nfunction baseWarn (msg) {\\n console.error((\\\"[Vue parser]: \\\" + msg));\\n}\\n\\nfunction pluckModuleFunction (\\n modules,\\n key\\n) {\\n return modules\\n ? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; })\\n : []\\n}\\n\\nfunction addProp (el, name, value) {\\n (el.props || (el.props = [])).push({ name: name, value: value });\\n}\\n\\nfunction addAttr (el, name, value) {\\n (el.attrs || (el.attrs = [])).push({ name: name, value: value });\\n}\\n\\nfunction addDirective (\\n el,\\n name,\\n rawName,\\n value,\\n arg,\\n modifiers\\n) {\\n (el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers });\\n}\\n\\nfunction addHandler (\\n el,\\n name,\\n value,\\n modifiers,\\n important\\n) {\\n // check capture modifier\\n if (modifiers && modifiers.capture) {\\n delete modifiers.capture;\\n name = '!' + name; // mark the event as captured\\n }\\n if (modifiers && modifiers.once) {\\n delete modifiers.once;\\n name = '~' + name; // mark the event as once\\n }\\n var events;\\n if (modifiers && modifiers.native) {\\n delete modifiers.native;\\n events = el.nativeEvents || (el.nativeEvents = {});\\n } else {\\n events = el.events || (el.events = {});\\n }\\n var newHandler = { value: value, modifiers: modifiers };\\n var handlers = events[name];\\n /* istanbul ignore if */\\n if (Array.isArray(handlers)) {\\n important ? handlers.unshift(newHandler) : handlers.push(newHandler);\\n } else if (handlers) {\\n events[name] = important ? [newHandler, handlers] : [handlers, newHandler];\\n } else {\\n events[name] = newHandler;\\n }\\n}\\n\\nfunction getBindingAttr (\\n el,\\n name,\\n getStatic\\n) {\\n var dynamicValue =\\n getAndRemoveAttr(el, ':' + name) ||\\n getAndRemoveAttr(el, 'v-bind:' + name);\\n if (dynamicValue != null) {\\n return parseFilters(dynamicValue)\\n } else if (getStatic !== false) {\\n var staticValue = getAndRemoveAttr(el, name);\\n if (staticValue != null) {\\n return JSON.stringify(staticValue)\\n }\\n }\\n}\\n\\nfunction getAndRemoveAttr (el, name) {\\n var val;\\n if ((val = el.attrsMap[name]) != null) {\\n var list = el.attrsList;\\n for (var i = 0, l = list.length; i < l; i++) {\\n if (list[i].name === name) {\\n list.splice(i, 1);\\n break\\n }\\n }\\n }\\n return val\\n}\\n\\nvar len;\\nvar str;\\nvar chr;\\nvar index$1;\\nvar expressionPos;\\nvar expressionEndPos;\\n\\n/**\\n * parse directive model to do the array update transform. a[idx] = val => $$a.splice($$idx, 1, val)\\n *\\n * for loop possible cases:\\n *\\n * - test\\n * - test[idx]\\n * - test[test1[idx]]\\n * - test[\\\"a\\\"][idx]\\n * - xxx.test[a[a].test1[idx]]\\n * - test.xxx.a[\\\"asa\\\"][test1[idx]]\\n *\\n */\\n\\nfunction parseModel (val) {\\n str = val;\\n len = str.length;\\n index$1 = expressionPos = expressionEndPos = 0;\\n\\n if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {\\n return {\\n exp: val,\\n idx: null\\n }\\n }\\n\\n while (!eof()) {\\n chr = next();\\n /* istanbul ignore if */\\n if (isStringStart(chr)) {\\n parseString(chr);\\n } else if (chr === 0x5B) {\\n parseBracket(chr);\\n }\\n }\\n\\n return {\\n exp: val.substring(0, expressionPos),\\n idx: val.substring(expressionPos + 1, expressionEndPos)\\n }\\n}\\n\\nfunction next () {\\n return str.charCodeAt(++index$1)\\n}\\n\\nfunction eof () {\\n return index$1 >= len\\n}\\n\\nfunction isStringStart (chr) {\\n return chr === 0x22 || chr === 0x27\\n}\\n\\nfunction parseBracket (chr) {\\n var inBracket = 1;\\n expressionPos = index$1;\\n while (!eof()) {\\n chr = next();\\n if (isStringStart(chr)) {\\n parseString(chr);\\n continue\\n }\\n if (chr === 0x5B) { inBracket++; }\\n if (chr === 0x5D) { inBracket--; }\\n if (inBracket === 0) {\\n expressionEndPos = index$1;\\n break\\n }\\n }\\n}\\n\\nfunction parseString (chr) {\\n var stringQuote = chr;\\n while (!eof()) {\\n chr = next();\\n if (chr === stringQuote) {\\n break\\n }\\n }\\n}\\n\\n/* */\\n\\nvar dirRE = /^v-|^@|^:/;\\nvar forAliasRE = /(.*?)\\\\s+(?:in|of)\\\\s+(.*)/;\\nvar forIteratorRE = /\\\\((\\\\{[^}]*\\\\}|[^,]*),([^,]*)(?:,([^,]*))?\\\\)/;\\nvar bindRE = /^:|^v-bind:/;\\nvar onRE = /^@|^v-on:/;\\nvar argRE = /:(.*)$/;\\nvar modifierRE = /\\\\.[^.]+/g;\\n\\nvar decodeHTMLCached = cached(decode);\\n\\n// configurable state\\nvar warn$1;\\nvar platformGetTagNamespace;\\nvar platformMustUseProp;\\nvar platformIsPreTag;\\nvar preTransforms;\\nvar transforms;\\nvar postTransforms;\\nvar delimiters;\\n\\n/**\\n * Convert HTML string to AST.\\n */\\nfunction parse (\\n template,\\n options\\n) {\\n warn$1 = options.warn || baseWarn;\\n platformGetTagNamespace = options.getTagNamespace || no;\\n platformMustUseProp = options.mustUseProp || no;\\n platformIsPreTag = options.isPreTag || no;\\n preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');\\n transforms = pluckModuleFunction(options.modules, 'transformNode');\\n postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');\\n delimiters = options.delimiters;\\n var stack = [];\\n var preserveWhitespace = options.preserveWhitespace !== false;\\n var root;\\n var currentParent;\\n var inVPre = false;\\n var inPre = false;\\n var warned = false;\\n parseHTML(template, {\\n expectHTML: options.expectHTML,\\n isUnaryTag: options.isUnaryTag,\\n shouldDecodeNewlines: options.shouldDecodeNewlines,\\n start: function start (tag, attrs, unary) {\\n // check namespace.\\n // inherit parent ns if there is one\\n var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag);\\n\\n // handle IE svg bug\\n /* istanbul ignore if */\\n if (isIE && ns === 'svg') {\\n attrs = guardIESVGBug(attrs);\\n }\\n\\n var element = {\\n type: 1,\\n tag: tag,\\n attrsList: attrs,\\n attrsMap: makeAttrsMap(attrs),\\n parent: currentParent,\\n children: []\\n };\\n if (ns) {\\n element.ns = ns;\\n }\\n\\n if (isForbiddenTag(element) && !isServerRendering()) {\\n element.forbidden = true;\\n \\\"development\\\" !== 'production' && warn$1(\\n 'Templates should only be responsible for mapping the state to the ' +\\n 'UI. Avoid placing tags with side-effects in your templates, such as ' +\\n \\\"<\\\" + tag + \\\">.\\\"\\n );\\n }\\n\\n // apply pre-transforms\\n for (var i = 0; i < preTransforms.length; i++) {\\n preTransforms[i](element, options);\\n }\\n\\n if (!inVPre) {\\n processPre(element);\\n if (element.pre) {\\n inVPre = true;\\n }\\n }\\n if (platformIsPreTag(element.tag)) {\\n inPre = true;\\n }\\n if (inVPre) {\\n processRawAttrs(element);\\n } else {\\n processFor(element);\\n processIf(element);\\n processOnce(element);\\n processKey(element);\\n\\n // determine whether this is a plain element after\\n // removing structural attributes\\n element.plain = !element.key && !attrs.length;\\n\\n processRef(element);\\n processSlot(element);\\n processComponent(element);\\n for (var i$1 = 0; i$1 < transforms.length; i$1++) {\\n transforms[i$1](element, options);\\n }\\n processAttrs(element);\\n }\\n\\n function checkRootConstraints (el) {\\n if (\\\"development\\\" !== 'production' && !warned) {\\n if (el.tag === 'slot' || el.tag === 'template') {\\n warned = true;\\n warn$1(\\n \\\"Cannot use <\\\" + (el.tag) + \\\"> as component root element because it may \\\" +\\n 'contain multiple nodes:\\\\n' + template\\n );\\n }\\n if (el.attrsMap.hasOwnProperty('v-for')) {\\n warned = true;\\n warn$1(\\n 'Cannot use v-for on stateful component root element because ' +\\n 'it renders multiple elements:\\\\n' + template\\n );\\n }\\n }\\n }\\n\\n // tree management\\n if (!root) {\\n root = element;\\n checkRootConstraints(root);\\n } else if (!stack.length) {\\n // allow root elements with v-if, v-else-if and v-else\\n if (root.if && (element.elseif || element.else)) {\\n checkRootConstraints(element);\\n addIfCondition(root, {\\n exp: element.elseif,\\n block: element\\n });\\n } else if (\\\"development\\\" !== 'production' && !warned) {\\n warned = true;\\n warn$1(\\n \\\"Component template should contain exactly one root element:\\\" +\\n \\\"\\\\n\\\\n\\\" + template + \\\"\\\\n\\\\n\\\" +\\n \\\"If you are using v-if on multiple elements, \\\" +\\n \\\"use v-else-if to chain them instead.\\\"\\n );\\n }\\n }\\n if (currentParent && !element.forbidden) {\\n if (element.elseif || element.else) {\\n processIfConditions(element, currentParent);\\n } else if (element.slotScope) { // scoped slot\\n currentParent.plain = false;\\n var name = element.slotTarget || 'default';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element;\\n } else {\\n currentParent.children.push(element);\\n element.parent = currentParent;\\n }\\n }\\n if (!unary) {\\n currentParent = element;\\n stack.push(element);\\n }\\n // apply post-transforms\\n for (var i$2 = 0; i$2 < postTransforms.length; i$2++) {\\n postTransforms[i$2](element, options);\\n }\\n },\\n\\n end: function end () {\\n // remove trailing whitespace\\n var element = stack[stack.length - 1];\\n var lastNode = element.children[element.children.length - 1];\\n if (lastNode && lastNode.type === 3 && lastNode.text === ' ') {\\n element.children.pop();\\n }\\n // pop stack\\n stack.length -= 1;\\n currentParent = stack[stack.length - 1];\\n // check pre state\\n if (element.pre) {\\n inVPre = false;\\n }\\n if (platformIsPreTag(element.tag)) {\\n inPre = false;\\n }\\n },\\n\\n chars: function chars (text) {\\n if (!currentParent) {\\n if (\\\"development\\\" !== 'production' && !warned && text === template) {\\n warned = true;\\n warn$1(\\n 'Component template requires a root element, rather than just text:\\\\n\\\\n' + template\\n );\\n }\\n return\\n }\\n // IE textarea placeholder bug\\n /* istanbul ignore if */\\n if (isIE &&\\n currentParent.tag === 'textarea' &&\\n currentParent.attrsMap.placeholder === text) {\\n return\\n }\\n text = inPre || text.trim()\\n ? decodeHTMLCached(text)\\n // only preserve whitespace if its not right after a starting tag\\n : preserveWhitespace && currentParent.children.length ? ' ' : '';\\n if (text) {\\n var expression;\\n if (!inVPre && text !== ' ' && (expression = parseText(text, delimiters))) {\\n currentParent.children.push({\\n type: 2,\\n expression: expression,\\n text: text\\n });\\n } else {\\n currentParent.children.push({\\n type: 3,\\n text: text\\n });\\n }\\n }\\n }\\n });\\n return root\\n}\\n\\nfunction processPre (el) {\\n if (getAndRemoveAttr(el, 'v-pre') != null) {\\n el.pre = true;\\n }\\n}\\n\\nfunction processRawAttrs (el) {\\n var l = el.attrsList.length;\\n if (l) {\\n var attrs = el.attrs = new Array(l);\\n for (var i = 0; i < l; i++) {\\n attrs[i] = {\\n name: el.attrsList[i].name,\\n value: JSON.stringify(el.attrsList[i].value)\\n };\\n }\\n } else if (!el.pre) {\\n // non root node in pre blocks with no attributes\\n el.plain = true;\\n }\\n}\\n\\nfunction processKey (el) {\\n var exp = getBindingAttr(el, 'key');\\n if (exp) {\\n if (\\\"development\\\" !== 'production' && el.tag === 'template') {\\n warn$1(\\\"<template> cannot be keyed. Place the key on real elements instead.\\\");\\n }\\n el.key = exp;\\n }\\n}\\n\\nfunction processRef (el) {\\n var ref = getBindingAttr(el, 'ref');\\n if (ref) {\\n el.ref = ref;\\n el.refInFor = checkInFor(el);\\n }\\n}\\n\\nfunction processFor (el) {\\n var exp;\\n if ((exp = getAndRemoveAttr(el, 'v-for'))) {\\n var inMatch = exp.match(forAliasRE);\\n if (!inMatch) {\\n \\\"development\\\" !== 'production' && warn$1(\\n (\\\"Invalid v-for expression: \\\" + exp)\\n );\\n return\\n }\\n el.for = inMatch[2].trim();\\n var alias = inMatch[1].trim();\\n var iteratorMatch = alias.match(forIteratorRE);\\n if (iteratorMatch) {\\n el.alias = iteratorMatch[1].trim();\\n el.iterator1 = iteratorMatch[2].trim();\\n if (iteratorMatch[3]) {\\n el.iterator2 = iteratorMatch[3].trim();\\n }\\n } else {\\n el.alias = alias;\\n }\\n }\\n}\\n\\nfunction processIf (el) {\\n var exp = getAndRemoveAttr(el, 'v-if');\\n if (exp) {\\n el.if = exp;\\n addIfCondition(el, {\\n exp: exp,\\n block: el\\n });\\n } else {\\n if (getAndRemoveAttr(el, 'v-else') != null) {\\n el.else = true;\\n }\\n var elseif = getAndRemoveAttr(el, 'v-else-if');\\n if (elseif) {\\n el.elseif = elseif;\\n }\\n }\\n}\\n\\nfunction processIfConditions (el, parent) {\\n var prev = findPrevElement(parent.children);\\n if (prev && prev.if) {\\n addIfCondition(prev, {\\n exp: el.elseif,\\n block: el\\n });\\n } else {\\n warn$1(\\n \\\"v-\\\" + (el.elseif ? ('else-if=\\\"' + el.elseif + '\\\"') : 'else') + \\\" \\\" +\\n \\\"used on element <\\\" + (el.tag) + \\\"> without corresponding v-if.\\\"\\n );\\n }\\n}\\n\\nfunction addIfCondition (el, condition) {\\n if (!el.ifConditions) {\\n el.ifConditions = [];\\n }\\n el.ifConditions.push(condition);\\n}\\n\\nfunction processOnce (el) {\\n var once = getAndRemoveAttr(el, 'v-once');\\n if (once != null) {\\n el.once = true;\\n }\\n}\\n\\nfunction processSlot (el) {\\n if (el.tag === 'slot') {\\n el.slotName = getBindingAttr(el, 'name');\\n if (\\\"development\\\" !== 'production' && el.key) {\\n warn$1(\\n \\\"`key` does not work on <slot> because slots are abstract outlets \\\" +\\n \\\"and can possibly expand into multiple elements. \\\" +\\n \\\"Use the key on a wrapping element instead.\\\"\\n );\\n }\\n } else {\\n var slotTarget = getBindingAttr(el, 'slot');\\n if (slotTarget) {\\n el.slotTarget = slotTarget === '\\\"\\\"' ? '\\\"default\\\"' : slotTarget;\\n }\\n if (el.tag === 'template') {\\n el.slotScope = getAndRemoveAttr(el, 'scope');\\n }\\n }\\n}\\n\\nfunction processComponent (el) {\\n var binding;\\n if ((binding = getBindingAttr(el, 'is'))) {\\n el.component = binding;\\n }\\n if (getAndRemoveAttr(el, 'inline-template') != null) {\\n el.inlineTemplate = true;\\n }\\n}\\n\\nfunction processAttrs (el) {\\n var list = el.attrsList;\\n var i, l, name, rawName, value, arg, modifiers, isProp;\\n for (i = 0, l = list.length; i < l; i++) {\\n name = rawName = list[i].name;\\n value = list[i].value;\\n if (dirRE.test(name)) {\\n // mark element as dynamic\\n el.hasBindings = true;\\n // modifiers\\n modifiers = parseModifiers(name);\\n if (modifiers) {\\n name = name.replace(modifierRE, '');\\n }\\n if (bindRE.test(name)) { // v-bind\\n name = name.replace(bindRE, '');\\n value = parseFilters(value);\\n isProp = false;\\n if (modifiers) {\\n if (modifiers.prop) {\\n isProp = true;\\n name = camelize(name);\\n if (name === 'innerHtml') { name = 'innerHTML'; }\\n }\\n if (modifiers.camel) {\\n name = camelize(name);\\n }\\n }\\n if (isProp || platformMustUseProp(el.tag, name)) {\\n addProp(el, name, value);\\n } else {\\n addAttr(el, name, value);\\n }\\n } else if (onRE.test(name)) { // v-on\\n name = name.replace(onRE, '');\\n addHandler(el, name, value, modifiers);\\n } else { // normal directives\\n name = name.replace(dirRE, '');\\n // parse arg\\n var argMatch = name.match(argRE);\\n if (argMatch && (arg = argMatch[1])) {\\n name = name.slice(0, -(arg.length + 1));\\n }\\n addDirective(el, name, rawName, value, arg, modifiers);\\n if (\\\"development\\\" !== 'production' && name === 'model') {\\n checkForAliasModel(el, value);\\n }\\n }\\n } else {\\n // literal attribute\\n {\\n var expression = parseText(value, delimiters);\\n if (expression) {\\n warn$1(\\n name + \\\"=\\\\\\\"\\\" + value + \\\"\\\\\\\": \\\" +\\n 'Interpolation inside attributes has been removed. ' +\\n 'Use v-bind or the colon shorthand instead. For example, ' +\\n 'instead of <div id=\\\"{{ val }}\\\">, use <div :id=\\\"val\\\">.'\\n );\\n }\\n }\\n addAttr(el, name, JSON.stringify(value));\\n }\\n }\\n}\\n\\nfunction checkInFor (el) {\\n var parent = el;\\n while (parent) {\\n if (parent.for !== undefined) {\\n return true\\n }\\n parent = parent.parent;\\n }\\n return false\\n}\\n\\nfunction parseModifiers (name) {\\n var match = name.match(modifierRE);\\n if (match) {\\n var ret = {};\\n match.forEach(function (m) { ret[m.slice(1)] = true; });\\n return ret\\n }\\n}\\n\\nfunction makeAttrsMap (attrs) {\\n var map = {};\\n for (var i = 0, l = attrs.length; i < l; i++) {\\n if (\\\"development\\\" !== 'production' && map[attrs[i].name] && !isIE) {\\n warn$1('duplicate attribute: ' + attrs[i].name);\\n }\\n map[attrs[i].name] = attrs[i].value;\\n }\\n return map\\n}\\n\\nfunction findPrevElement (children) {\\n var i = children.length;\\n while (i--) {\\n if (children[i].tag) { return children[i] }\\n }\\n}\\n\\nfunction isForbiddenTag (el) {\\n return (\\n el.tag === 'style' ||\\n (el.tag === 'script' && (\\n !el.attrsMap.type ||\\n el.attrsMap.type === 'text/javascript'\\n ))\\n )\\n}\\n\\nvar ieNSBug = /^xmlns:NS\\\\d+/;\\nvar ieNSPrefix = /^NS\\\\d+:/;\\n\\n/* istanbul ignore next */\\nfunction guardIESVGBug (attrs) {\\n var res = [];\\n for (var i = 0; i < attrs.length; i++) {\\n var attr = attrs[i];\\n if (!ieNSBug.test(attr.name)) {\\n attr.name = attr.name.replace(ieNSPrefix, '');\\n res.push(attr);\\n }\\n }\\n return res\\n}\\n\\nfunction checkForAliasModel (el, value) {\\n var _el = el;\\n while (_el) {\\n if (_el.for && _el.alias === value) {\\n warn$1(\\n \\\"<\\\" + (el.tag) + \\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\">: \\\" +\\n \\\"You are binding v-model directly to a v-for iteration alias. \\\" +\\n \\\"This will not be able to modify the v-for source array because \\\" +\\n \\\"writing to the alias is like modifying a function local variable. \\\" +\\n \\\"Consider using an array of objects and use v-model on an object property instead.\\\"\\n );\\n }\\n _el = _el.parent;\\n }\\n}\\n\\n/* */\\n\\nvar isStaticKey;\\nvar isPlatformReservedTag;\\n\\nvar genStaticKeysCached = cached(genStaticKeys$1);\\n\\n/**\\n * Goal of the optimizer: walk the generated template AST tree\\n * and detect sub-trees that are purely static, i.e. parts of\\n * the DOM that never needs to change.\\n *\\n * Once we detect these sub-trees, we can:\\n *\\n * 1. Hoist them into constants, so that we no longer need to\\n * create fresh nodes for them on each re-render;\\n * 2. Completely skip them in the patching process.\\n */\\nfunction optimize (root, options) {\\n if (!root) { return }\\n isStaticKey = genStaticKeysCached(options.staticKeys || '');\\n isPlatformReservedTag = options.isReservedTag || no;\\n // first pass: mark all non-static nodes.\\n markStatic(root);\\n // second pass: mark static roots.\\n markStaticRoots(root, false);\\n}\\n\\nfunction genStaticKeys$1 (keys) {\\n return makeMap(\\n 'type,tag,attrsList,attrsMap,plain,parent,children,attrs' +\\n (keys ? ',' + keys : '')\\n )\\n}\\n\\nfunction markStatic (node) {\\n node.static = isStatic(node);\\n if (node.type === 1) {\\n // do not make component slot content static. this avoids\\n // 1. components not able to mutate slot nodes\\n // 2. static slot content fails for hot-reloading\\n if (\\n !isPlatformReservedTag(node.tag) &&\\n node.tag !== 'slot' &&\\n node.attrsMap['inline-template'] == null\\n ) {\\n return\\n }\\n for (var i = 0, l = node.children.length; i < l; i++) {\\n var child = node.children[i];\\n markStatic(child);\\n if (!child.static) {\\n node.static = false;\\n }\\n }\\n }\\n}\\n\\nfunction markStaticRoots (node, isInFor) {\\n if (node.type === 1) {\\n if (node.static || node.once) {\\n node.staticInFor = isInFor;\\n }\\n // For a node to qualify as a static root, it should have children that\\n // are not just static text. Otherwise the cost of hoisting out will\\n // outweigh the benefits and it's better off to just always render it fresh.\\n if (node.static && node.children.length && !(\\n node.children.length === 1 &&\\n node.children[0].type === 3\\n )) {\\n node.staticRoot = true;\\n return\\n } else {\\n node.staticRoot = false;\\n }\\n if (node.children) {\\n for (var i = 0, l = node.children.length; i < l; i++) {\\n markStaticRoots(node.children[i], isInFor || !!node.for);\\n }\\n }\\n if (node.ifConditions) {\\n walkThroughConditionsBlocks(node.ifConditions, isInFor);\\n }\\n }\\n}\\n\\nfunction walkThroughConditionsBlocks (conditionBlocks, isInFor) {\\n for (var i = 1, len = conditionBlocks.length; i < len; i++) {\\n markStaticRoots(conditionBlocks[i].block, isInFor);\\n }\\n}\\n\\nfunction isStatic (node) {\\n if (node.type === 2) { // expression\\n return false\\n }\\n if (node.type === 3) { // text\\n return true\\n }\\n return !!(node.pre || (\\n !node.hasBindings && // no dynamic bindings\\n !node.if && !node.for && // not v-if or v-for or v-else\\n !isBuiltInTag(node.tag) && // not a built-in\\n isPlatformReservedTag(node.tag) && // not a component\\n !isDirectChildOfTemplateFor(node) &&\\n Object.keys(node).every(isStaticKey)\\n ))\\n}\\n\\nfunction isDirectChildOfTemplateFor (node) {\\n while (node.parent) {\\n node = node.parent;\\n if (node.tag !== 'template') {\\n return false\\n }\\n if (node.for) {\\n return true\\n }\\n }\\n return false\\n}\\n\\n/* */\\n\\nvar fnExpRE = /^\\\\s*([\\\\w$_]+|\\\\([^)]*?\\\\))\\\\s*=>|^function\\\\s*\\\\(/;\\nvar simplePathRE = /^\\\\s*[A-Za-z_$][\\\\w$]*(?:\\\\.[A-Za-z_$][\\\\w$]*|\\\\['.*?']|\\\\[\\\".*?\\\"]|\\\\[\\\\d+]|\\\\[[A-Za-z_$][\\\\w$]*])*\\\\s*$/;\\n\\n// keyCode aliases\\nvar keyCodes = {\\n esc: 27,\\n tab: 9,\\n enter: 13,\\n space: 32,\\n up: 38,\\n left: 37,\\n right: 39,\\n down: 40,\\n 'delete': [8, 46]\\n};\\n\\nvar modifierCode = {\\n stop: '$event.stopPropagation();',\\n prevent: '$event.preventDefault();',\\n self: 'if($event.target !== $event.currentTarget)return;',\\n ctrl: 'if(!$event.ctrlKey)return;',\\n shift: 'if(!$event.shiftKey)return;',\\n alt: 'if(!$event.altKey)return;',\\n meta: 'if(!$event.metaKey)return;'\\n};\\n\\nfunction genHandlers (events, native) {\\n var res = native ? 'nativeOn:{' : 'on:{';\\n for (var name in events) {\\n res += \\\"\\\\\\\"\\\" + name + \\\"\\\\\\\":\\\" + (genHandler(name, events[name])) + \\\",\\\";\\n }\\n return res.slice(0, -1) + '}'\\n}\\n\\nfunction genHandler (\\n name,\\n handler\\n) {\\n if (!handler) {\\n return 'function(){}'\\n } else if (Array.isArray(handler)) {\\n return (\\\"[\\\" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + \\\"]\\\")\\n } else if (!handler.modifiers) {\\n return fnExpRE.test(handler.value) || simplePathRE.test(handler.value)\\n ? handler.value\\n : (\\\"function($event){\\\" + (handler.value) + \\\"}\\\")\\n } else {\\n var code = '';\\n var keys = [];\\n for (var key in handler.modifiers) {\\n if (modifierCode[key]) {\\n code += modifierCode[key];\\n } else {\\n keys.push(key);\\n }\\n }\\n if (keys.length) {\\n code = genKeyFilter(keys) + code;\\n }\\n var handlerCode = simplePathRE.test(handler.value)\\n ? handler.value + '($event)'\\n : handler.value;\\n return 'function($event){' + code + handlerCode + '}'\\n }\\n}\\n\\nfunction genKeyFilter (keys) {\\n return (\\\"if(\\\" + (keys.map(genFilterCode).join('&&')) + \\\")return;\\\")\\n}\\n\\nfunction genFilterCode (key) {\\n var keyVal = parseInt(key, 10);\\n if (keyVal) {\\n return (\\\"$event.keyCode!==\\\" + keyVal)\\n }\\n var alias = keyCodes[key];\\n return (\\\"_k($event.keyCode,\\\" + (JSON.stringify(key)) + (alias ? ',' + JSON.stringify(alias) : '') + \\\")\\\")\\n}\\n\\n/* */\\n\\nfunction bind$2 (el, dir) {\\n el.wrapData = function (code) {\\n return (\\\"_b(\\\" + code + \\\",'\\\" + (el.tag) + \\\"',\\\" + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + \\\")\\\")\\n };\\n}\\n\\nvar baseDirectives = {\\n bind: bind$2,\\n cloak: noop\\n};\\n\\n/* */\\n\\n// configurable state\\nvar warn$2;\\nvar transforms$1;\\nvar dataGenFns;\\nvar platformDirectives$1;\\nvar staticRenderFns;\\nvar onceCount;\\nvar currentOptions;\\n\\nfunction generate (\\n ast,\\n options\\n) {\\n // save previous staticRenderFns so generate calls can be nested\\n var prevStaticRenderFns = staticRenderFns;\\n var currentStaticRenderFns = staticRenderFns = [];\\n var prevOnceCount = onceCount;\\n onceCount = 0;\\n currentOptions = options;\\n warn$2 = options.warn || baseWarn;\\n transforms$1 = pluckModuleFunction(options.modules, 'transformCode');\\n dataGenFns = pluckModuleFunction(options.modules, 'genData');\\n platformDirectives$1 = options.directives || {};\\n var code = ast ? genElement(ast) : '_c(\\\"div\\\")';\\n staticRenderFns = prevStaticRenderFns;\\n onceCount = prevOnceCount;\\n return {\\n render: (\\\"with(this){return \\\" + code + \\\"}\\\"),\\n staticRenderFns: currentStaticRenderFns\\n }\\n}\\n\\nfunction genElement (el) {\\n if (el.staticRoot && !el.staticProcessed) {\\n return genStatic(el)\\n } else if (el.once && !el.onceProcessed) {\\n return genOnce(el)\\n } else if (el.for && !el.forProcessed) {\\n return genFor(el)\\n } else if (el.if && !el.ifProcessed) {\\n return genIf(el)\\n } else if (el.tag === 'template' && !el.slotTarget) {\\n return genChildren(el) || 'void 0'\\n } else if (el.tag === 'slot') {\\n return genSlot(el)\\n } else {\\n // component or element\\n var code;\\n if (el.component) {\\n code = genComponent(el.component, el);\\n } else {\\n var data = el.plain ? undefined : genData(el);\\n\\n var children = el.inlineTemplate ? null : genChildren(el, true);\\n code = \\\"_c('\\\" + (el.tag) + \\\"'\\\" + (data ? (\\\",\\\" + data) : '') + (children ? (\\\",\\\" + children) : '') + \\\")\\\";\\n }\\n // module transforms\\n for (var i = 0; i < transforms$1.length; i++) {\\n code = transforms$1[i](el, code);\\n }\\n return code\\n }\\n}\\n\\n// hoist static sub-trees out\\nfunction genStatic (el) {\\n el.staticProcessed = true;\\n staticRenderFns.push((\\\"with(this){return \\\" + (genElement(el)) + \\\"}\\\"));\\n return (\\\"_m(\\\" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + \\\")\\\")\\n}\\n\\n// v-once\\nfunction genOnce (el) {\\n el.onceProcessed = true;\\n if (el.if && !el.ifProcessed) {\\n return genIf(el)\\n } else if (el.staticInFor) {\\n var key = '';\\n var parent = el.parent;\\n while (parent) {\\n if (parent.for) {\\n key = parent.key;\\n break\\n }\\n parent = parent.parent;\\n }\\n if (!key) {\\n \\\"development\\\" !== 'production' && warn$2(\\n \\\"v-once can only be used inside v-for that is keyed. \\\"\\n );\\n return genElement(el)\\n }\\n return (\\\"_o(\\\" + (genElement(el)) + \\\",\\\" + (onceCount++) + (key ? (\\\",\\\" + key) : \\\"\\\") + \\\")\\\")\\n } else {\\n return genStatic(el)\\n }\\n}\\n\\nfunction genIf (el) {\\n el.ifProcessed = true; // avoid recursion\\n return genIfConditions(el.ifConditions.slice())\\n}\\n\\nfunction genIfConditions (conditions) {\\n if (!conditions.length) {\\n return '_e()'\\n }\\n\\n var condition = conditions.shift();\\n if (condition.exp) {\\n return (\\\"(\\\" + (condition.exp) + \\\")?\\\" + (genTernaryExp(condition.block)) + \\\":\\\" + (genIfConditions(conditions)))\\n } else {\\n return (\\\"\\\" + (genTernaryExp(condition.block)))\\n }\\n\\n // v-if with v-once should generate code like (a)?_m(0):_m(1)\\n function genTernaryExp (el) {\\n return el.once ? genOnce(el) : genElement(el)\\n }\\n}\\n\\nfunction genFor (el) {\\n var exp = el.for;\\n var alias = el.alias;\\n var iterator1 = el.iterator1 ? (\\\",\\\" + (el.iterator1)) : '';\\n var iterator2 = el.iterator2 ? (\\\",\\\" + (el.iterator2)) : '';\\n el.forProcessed = true; // avoid recursion\\n return \\\"_l((\\\" + exp + \\\"),\\\" +\\n \\\"function(\\\" + alias + iterator1 + iterator2 + \\\"){\\\" +\\n \\\"return \\\" + (genElement(el)) +\\n '})'\\n}\\n\\nfunction genData (el) {\\n var data = '{';\\n\\n // directives first.\\n // directives may mutate the el's other properties before they are generated.\\n var dirs = genDirectives(el);\\n if (dirs) { data += dirs + ','; }\\n\\n // key\\n if (el.key) {\\n data += \\\"key:\\\" + (el.key) + \\\",\\\";\\n }\\n // ref\\n if (el.ref) {\\n data += \\\"ref:\\\" + (el.ref) + \\\",\\\";\\n }\\n if (el.refInFor) {\\n data += \\\"refInFor:true,\\\";\\n }\\n // pre\\n if (el.pre) {\\n data += \\\"pre:true,\\\";\\n }\\n // record original tag name for components using \\\"is\\\" attribute\\n if (el.component) {\\n data += \\\"tag:\\\\\\\"\\\" + (el.tag) + \\\"\\\\\\\",\\\";\\n }\\n // module data generation functions\\n for (var i = 0; i < dataGenFns.length; i++) {\\n data += dataGenFns[i](el);\\n }\\n // attributes\\n if (el.attrs) {\\n data += \\\"attrs:{\\\" + (genProps(el.attrs)) + \\\"},\\\";\\n }\\n // DOM props\\n if (el.props) {\\n data += \\\"domProps:{\\\" + (genProps(el.props)) + \\\"},\\\";\\n }\\n // event handlers\\n if (el.events) {\\n data += (genHandlers(el.events)) + \\\",\\\";\\n }\\n if (el.nativeEvents) {\\n data += (genHandlers(el.nativeEvents, true)) + \\\",\\\";\\n }\\n // slot target\\n if (el.slotTarget) {\\n data += \\\"slot:\\\" + (el.slotTarget) + \\\",\\\";\\n }\\n // scoped slots\\n if (el.scopedSlots) {\\n data += (genScopedSlots(el.scopedSlots)) + \\\",\\\";\\n }\\n // inline-template\\n if (el.inlineTemplate) {\\n var inlineTemplate = genInlineTemplate(el);\\n if (inlineTemplate) {\\n data += inlineTemplate + \\\",\\\";\\n }\\n }\\n data = data.replace(/,$/, '') + '}';\\n // v-bind data wrap\\n if (el.wrapData) {\\n data = el.wrapData(data);\\n }\\n return data\\n}\\n\\nfunction genDirectives (el) {\\n var dirs = el.directives;\\n if (!dirs) { return }\\n var res = 'directives:[';\\n var hasRuntime = false;\\n var i, l, dir, needRuntime;\\n for (i = 0, l = dirs.length; i < l; i++) {\\n dir = dirs[i];\\n needRuntime = true;\\n var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];\\n if (gen) {\\n // compile-time directive that manipulates AST.\\n // returns true if it also needs a runtime counterpart.\\n needRuntime = !!gen(el, dir, warn$2);\\n }\\n if (needRuntime) {\\n hasRuntime = true;\\n res += \\\"{name:\\\\\\\"\\\" + (dir.name) + \\\"\\\\\\\",rawName:\\\\\\\"\\\" + (dir.rawName) + \\\"\\\\\\\"\\\" + (dir.value ? (\\\",value:(\\\" + (dir.value) + \\\"),expression:\\\" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (\\\",arg:\\\\\\\"\\\" + (dir.arg) + \\\"\\\\\\\"\\\") : '') + (dir.modifiers ? (\\\",modifiers:\\\" + (JSON.stringify(dir.modifiers))) : '') + \\\"},\\\";\\n }\\n }\\n if (hasRuntime) {\\n return res.slice(0, -1) + ']'\\n }\\n}\\n\\nfunction genInlineTemplate (el) {\\n var ast = el.children[0];\\n if (\\\"development\\\" !== 'production' && (\\n el.children.length > 1 || ast.type !== 1\\n )) {\\n warn$2('Inline-template components must have exactly one child element.');\\n }\\n if (ast.type === 1) {\\n var inlineRenderFns = generate(ast, currentOptions);\\n return (\\\"inlineTemplate:{render:function(){\\\" + (inlineRenderFns.render) + \\\"},staticRenderFns:[\\\" + (inlineRenderFns.staticRenderFns.map(function (code) { return (\\\"function(){\\\" + code + \\\"}\\\"); }).join(',')) + \\\"]}\\\")\\n }\\n}\\n\\nfunction genScopedSlots (slots) {\\n return (\\\"scopedSlots:{\\\" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + \\\"}\\\")\\n}\\n\\nfunction genScopedSlot (key, el) {\\n return key + \\\":function(\\\" + (String(el.attrsMap.scope)) + \\\"){\\\" +\\n \\\"return \\\" + (el.tag === 'template'\\n ? genChildren(el) || 'void 0'\\n : genElement(el)) + \\\"}\\\"\\n}\\n\\nfunction genChildren (el, checkSkip) {\\n var children = el.children;\\n if (children.length) {\\n var el$1 = children[0];\\n // optimize single v-for\\n if (children.length === 1 &&\\n el$1.for &&\\n el$1.tag !== 'template' &&\\n el$1.tag !== 'slot') {\\n return genElement(el$1)\\n }\\n return (\\\"[\\\" + (children.map(genNode).join(',')) + \\\"]\\\" + (checkSkip\\n ? canSkipNormalization(children) ? '' : ',true'\\n : ''))\\n }\\n}\\n\\nfunction canSkipNormalization (children) {\\n for (var i = 0; i < children.length; i++) {\\n var el = children[i];\\n if (needsNormalization(el) ||\\n (el.if && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) {\\n return false\\n }\\n }\\n return true\\n}\\n\\nfunction needsNormalization (el) {\\n return el.for || el.tag === 'template' || el.tag === 'slot'\\n}\\n\\nfunction genNode (node) {\\n if (node.type === 1) {\\n return genElement(node)\\n } else {\\n return genText(node)\\n }\\n}\\n\\nfunction genText (text) {\\n return (\\\"_v(\\\" + (text.type === 2\\n ? text.expression // no need for () because already wrapped in _s()\\n : transformSpecialNewlines(JSON.stringify(text.text))) + \\\")\\\")\\n}\\n\\nfunction genSlot (el) {\\n var slotName = el.slotName || '\\\"default\\\"';\\n var children = genChildren(el);\\n return (\\\"_t(\\\" + slotName + (children ? (\\\",\\\" + children) : '') + (el.attrs ? ((children ? '' : ',null') + \\\",{\\\" + (el.attrs.map(function (a) { return ((camelize(a.name)) + \\\":\\\" + (a.value)); }).join(',')) + \\\"}\\\") : '') + \\\")\\\")\\n}\\n\\n// componentName is el.component, take it as argument to shun flow's pessimistic refinement\\nfunction genComponent (componentName, el) {\\n var children = el.inlineTemplate ? null : genChildren(el, true);\\n return (\\\"_c(\\\" + componentName + \\\",\\\" + (genData(el)) + (children ? (\\\",\\\" + children) : '') + \\\")\\\")\\n}\\n\\nfunction genProps (props) {\\n var res = '';\\n for (var i = 0; i < props.length; i++) {\\n var prop = props[i];\\n res += \\\"\\\\\\\"\\\" + (prop.name) + \\\"\\\\\\\":\\\" + (transformSpecialNewlines(prop.value)) + \\\",\\\";\\n }\\n return res.slice(0, -1)\\n}\\n\\n// #3895, #4268\\nfunction transformSpecialNewlines (text) {\\n return text\\n .replace(/\\\\u2028/g, '\\\\\\\\u2028')\\n .replace(/\\\\u2029/g, '\\\\\\\\u2029')\\n}\\n\\n/* */\\n\\n/**\\n * Compile a template.\\n */\\nfunction compile$1 (\\n template,\\n options\\n) {\\n var ast = parse(template.trim(), options);\\n optimize(ast, options);\\n var code = generate(ast, options);\\n return {\\n ast: ast,\\n render: code.render,\\n staticRenderFns: code.staticRenderFns\\n }\\n}\\n\\n/* */\\n\\n// operators like typeof, instanceof and in are allowed\\nvar prohibitedKeywordRE = new RegExp('\\\\\\\\b' + (\\n 'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +\\n 'super,throw,while,yield,delete,export,import,return,switch,default,' +\\n 'extends,finally,continue,debugger,function,arguments'\\n).split(',').join('\\\\\\\\b|\\\\\\\\b') + '\\\\\\\\b');\\n// check valid identifier for v-for\\nvar identRE = /[A-Za-z_$][\\\\w$]*/;\\n// strip strings in expressions\\nvar stripStringRE = /'(?:[^'\\\\\\\\]|\\\\\\\\.)*'|\\\"(?:[^\\\"\\\\\\\\]|\\\\\\\\.)*\\\"|`(?:[^`\\\\\\\\]|\\\\\\\\.)*\\\\$\\\\{|\\\\}(?:[^`\\\\\\\\]|\\\\\\\\.)*`|`(?:[^`\\\\\\\\]|\\\\\\\\.)*`/g;\\n\\n// detect problematic expressions in a template\\nfunction detectErrors (ast) {\\n var errors = [];\\n if (ast) {\\n checkNode(ast, errors);\\n }\\n return errors\\n}\\n\\nfunction checkNode (node, errors) {\\n if (node.type === 1) {\\n for (var name in node.attrsMap) {\\n if (dirRE.test(name)) {\\n var value = node.attrsMap[name];\\n if (value) {\\n if (name === 'v-for') {\\n checkFor(node, (\\\"v-for=\\\\\\\"\\\" + value + \\\"\\\\\\\"\\\"), errors);\\n } else {\\n checkExpression(value, (name + \\\"=\\\\\\\"\\\" + value + \\\"\\\\\\\"\\\"), errors);\\n }\\n }\\n }\\n }\\n if (node.children) {\\n for (var i = 0; i < node.children.length; i++) {\\n checkNode(node.children[i], errors);\\n }\\n }\\n } else if (node.type === 2) {\\n checkExpression(node.expression, node.text, errors);\\n }\\n}\\n\\nfunction checkFor (node, text, errors) {\\n checkExpression(node.for || '', text, errors);\\n checkIdentifier(node.alias, 'v-for alias', text, errors);\\n checkIdentifier(node.iterator1, 'v-for iterator', text, errors);\\n checkIdentifier(node.iterator2, 'v-for iterator', text, errors);\\n}\\n\\nfunction checkIdentifier (ident, type, text, errors) {\\n if (typeof ident === 'string' && !identRE.test(ident)) {\\n errors.push((\\\"- invalid \\\" + type + \\\" \\\\\\\"\\\" + ident + \\\"\\\\\\\" in expression: \\\" + text));\\n }\\n}\\n\\nfunction checkExpression (exp, text, errors) {\\n try {\\n new Function((\\\"return \\\" + exp));\\n } catch (e) {\\n var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE);\\n if (keywordMatch) {\\n errors.push(\\n \\\"- avoid using JavaScript keyword as property name: \\\" +\\n \\\"\\\\\\\"\\\" + (keywordMatch[0]) + \\\"\\\\\\\" in expression \\\" + text\\n );\\n } else {\\n errors.push((\\\"- invalid expression: \\\" + text));\\n }\\n }\\n}\\n\\n/* */\\n\\nfunction transformNode (el, options) {\\n var warn = options.warn || baseWarn;\\n var staticClass = getAndRemoveAttr(el, 'class');\\n if (\\\"development\\\" !== 'production' && staticClass) {\\n var expression = parseText(staticClass, options.delimiters);\\n if (expression) {\\n warn(\\n \\\"class=\\\\\\\"\\\" + staticClass + \\\"\\\\\\\": \\\" +\\n 'Interpolation inside attributes has been removed. ' +\\n 'Use v-bind or the colon shorthand instead. For example, ' +\\n 'instead of <div class=\\\"{{ val }}\\\">, use <div :class=\\\"val\\\">.'\\n );\\n }\\n }\\n if (staticClass) {\\n el.staticClass = JSON.stringify(staticClass);\\n }\\n var classBinding = getBindingAttr(el, 'class', false /* getStatic */);\\n if (classBinding) {\\n el.classBinding = classBinding;\\n }\\n}\\n\\nfunction genData$1 (el) {\\n var data = '';\\n if (el.staticClass) {\\n data += \\\"staticClass:\\\" + (el.staticClass) + \\\",\\\";\\n }\\n if (el.classBinding) {\\n data += \\\"class:\\\" + (el.classBinding) + \\\",\\\";\\n }\\n return data\\n}\\n\\nvar klass$1 = {\\n staticKeys: ['staticClass'],\\n transformNode: transformNode,\\n genData: genData$1\\n};\\n\\n/* */\\n\\nfunction transformNode$1 (el, options) {\\n var warn = options.warn || baseWarn;\\n var staticStyle = getAndRemoveAttr(el, 'style');\\n if (staticStyle) {\\n /* istanbul ignore if */\\n {\\n var expression = parseText(staticStyle, options.delimiters);\\n if (expression) {\\n warn(\\n \\\"style=\\\\\\\"\\\" + staticStyle + \\\"\\\\\\\": \\\" +\\n 'Interpolation inside attributes has been removed. ' +\\n 'Use v-bind or the colon shorthand instead. For example, ' +\\n 'instead of <div style=\\\"{{ val }}\\\">, use <div :style=\\\"val\\\">.'\\n );\\n }\\n }\\n el.staticStyle = JSON.stringify(parseStyleText(staticStyle));\\n }\\n\\n var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);\\n if (styleBinding) {\\n el.styleBinding = styleBinding;\\n }\\n}\\n\\nfunction genData$2 (el) {\\n var data = '';\\n if (el.staticStyle) {\\n data += \\\"staticStyle:\\\" + (el.staticStyle) + \\\",\\\";\\n }\\n if (el.styleBinding) {\\n data += \\\"style:(\\\" + (el.styleBinding) + \\\"),\\\";\\n }\\n return data\\n}\\n\\nvar style$1 = {\\n staticKeys: ['staticStyle'],\\n transformNode: transformNode$1,\\n genData: genData$2\\n};\\n\\nvar modules$1 = [\\n klass$1,\\n style$1\\n];\\n\\n/* */\\n\\nvar warn$3;\\n\\nfunction model$1 (\\n el,\\n dir,\\n _warn\\n) {\\n warn$3 = _warn;\\n var value = dir.value;\\n var modifiers = dir.modifiers;\\n var tag = el.tag;\\n var type = el.attrsMap.type;\\n {\\n var dynamicType = el.attrsMap['v-bind:type'] || el.attrsMap[':type'];\\n if (tag === 'input' && dynamicType) {\\n warn$3(\\n \\\"<input :type=\\\\\\\"\\\" + dynamicType + \\\"\\\\\\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\">:\\\\n\\\" +\\n \\\"v-model does not support dynamic input types. Use v-if branches instead.\\\"\\n );\\n }\\n }\\n if (tag === 'select') {\\n genSelect(el, value, modifiers);\\n } else if (tag === 'input' && type === 'checkbox') {\\n genCheckboxModel(el, value, modifiers);\\n } else if (tag === 'input' && type === 'radio') {\\n genRadioModel(el, value, modifiers);\\n } else {\\n genDefaultModel(el, value, modifiers);\\n }\\n // ensure runtime directive metadata\\n return true\\n}\\n\\nfunction genCheckboxModel (\\n el,\\n value,\\n modifiers\\n) {\\n if (\\\"development\\\" !== 'production' &&\\n el.attrsMap.checked != null) {\\n warn$3(\\n \\\"<\\\" + (el.tag) + \\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\" checked>:\\\\n\\\" +\\n \\\"inline checked attributes will be ignored when using v-model. \\\" +\\n 'Declare initial values in the component\\\\'s data option instead.'\\n );\\n }\\n var number = modifiers && modifiers.number;\\n var valueBinding = getBindingAttr(el, 'value') || 'null';\\n var trueValueBinding = getBindingAttr(el, 'true-value') || 'true';\\n var falseValueBinding = getBindingAttr(el, 'false-value') || 'false';\\n addProp(el, 'checked',\\n \\\"Array.isArray(\\\" + value + \\\")\\\" +\\n \\\"?_i(\\\" + value + \\\",\\\" + valueBinding + \\\")>-1\\\" +\\n \\\":_q(\\\" + value + \\\",\\\" + trueValueBinding + \\\")\\\"\\n );\\n addHandler(el, 'change',\\n \\\"var $$a=\\\" + value + \\\",\\\" +\\n '$$el=$event.target,' +\\n \\\"$$c=$$el.checked?(\\\" + trueValueBinding + \\\"):(\\\" + falseValueBinding + \\\");\\\" +\\n 'if(Array.isArray($$a)){' +\\n \\\"var $$v=\\\" + (number ? '_n(' + valueBinding + ')' : valueBinding) + \\\",\\\" +\\n '$$i=_i($$a,$$v);' +\\n \\\"if($$c){$$i<0&&(\\\" + value + \\\"=$$a.concat($$v))}\\\" +\\n \\\"else{$$i>-1&&(\\\" + value + \\\"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}\\\" +\\n \\\"}else{\\\" + value + \\\"=$$c}\\\",\\n null, true\\n );\\n}\\n\\nfunction genRadioModel (\\n el,\\n value,\\n modifiers\\n) {\\n if (\\\"development\\\" !== 'production' &&\\n el.attrsMap.checked != null) {\\n warn$3(\\n \\\"<\\\" + (el.tag) + \\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\" checked>:\\\\n\\\" +\\n \\\"inline checked attributes will be ignored when using v-model. \\\" +\\n 'Declare initial values in the component\\\\'s data option instead.'\\n );\\n }\\n var number = modifiers && modifiers.number;\\n var valueBinding = getBindingAttr(el, 'value') || 'null';\\n valueBinding = number ? (\\\"_n(\\\" + valueBinding + \\\")\\\") : valueBinding;\\n addProp(el, 'checked', (\\\"_q(\\\" + value + \\\",\\\" + valueBinding + \\\")\\\"));\\n addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true);\\n}\\n\\nfunction genDefaultModel (\\n el,\\n value,\\n modifiers\\n) {\\n {\\n if (el.tag === 'input' && el.attrsMap.value) {\\n warn$3(\\n \\\"<\\\" + (el.tag) + \\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\" value=\\\\\\\"\\\" + (el.attrsMap.value) + \\\"\\\\\\\">:\\\\n\\\" +\\n 'inline value attributes will be ignored when using v-model. ' +\\n 'Declare initial values in the component\\\\'s data option instead.'\\n );\\n }\\n if (el.tag === 'textarea' && el.children.length) {\\n warn$3(\\n \\\"<textarea v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\">:\\\\n\\\" +\\n 'inline content inside <textarea> will be ignored when using v-model. ' +\\n 'Declare initial values in the component\\\\'s data option instead.'\\n );\\n }\\n }\\n\\n var type = el.attrsMap.type;\\n var ref = modifiers || {};\\n var lazy = ref.lazy;\\n var number = ref.number;\\n var trim = ref.trim;\\n var event = lazy || (isIE && type === 'range') ? 'change' : 'input';\\n var needCompositionGuard = !lazy && type !== 'range';\\n var isNative = el.tag === 'input' || el.tag === 'textarea';\\n\\n var valueExpression = isNative\\n ? (\\\"$event.target.value\\\" + (trim ? '.trim()' : ''))\\n : trim ? \\\"(typeof $event === 'string' ? $event.trim() : $event)\\\" : \\\"$event\\\";\\n valueExpression = number || type === 'number'\\n ? (\\\"_n(\\\" + valueExpression + \\\")\\\")\\n : valueExpression;\\n\\n var code = genAssignmentCode(value, valueExpression);\\n if (isNative && needCompositionGuard) {\\n code = \\\"if($event.target.composing)return;\\\" + code;\\n }\\n\\n // inputs with type=\\\"file\\\" are read only and setting the input's\\n // value will throw an error.\\n if (\\\"development\\\" !== 'production' &&\\n type === 'file') {\\n warn$3(\\n \\\"<\\\" + (el.tag) + \\\" v-model=\\\\\\\"\\\" + value + \\\"\\\\\\\" type=\\\\\\\"file\\\\\\\">:\\\\n\\\" +\\n \\\"File inputs are read only. Use a v-on:change listener instead.\\\"\\n );\\n }\\n\\n addProp(el, 'value', isNative ? (\\\"_s(\\\" + value + \\\")\\\") : (\\\"(\\\" + value + \\\")\\\"));\\n addHandler(el, event, code, null, true);\\n if (trim || number || type === 'number') {\\n addHandler(el, 'blur', '$forceUpdate()');\\n }\\n}\\n\\nfunction genSelect (\\n el,\\n value,\\n modifiers\\n) {\\n {\\n el.children.some(checkOptionWarning);\\n }\\n\\n var number = modifiers && modifiers.number;\\n var assignment = \\\"Array.prototype.filter\\\" +\\n \\\".call($event.target.options,function(o){return o.selected})\\\" +\\n \\\".map(function(o){var val = \\\\\\\"_value\\\\\\\" in o ? o._value : o.value;\\\" +\\n \\\"return \\\" + (number ? '_n(val)' : 'val') + \\\"})\\\" +\\n (el.attrsMap.multiple == null ? '[0]' : '');\\n\\n var code = genAssignmentCode(value, assignment);\\n addHandler(el, 'change', code, null, true);\\n}\\n\\nfunction checkOptionWarning (option) {\\n if (option.type === 1 &&\\n option.tag === 'option' &&\\n option.attrsMap.selected != null) {\\n warn$3(\\n \\\"<select v-model=\\\\\\\"\\\" + (option.parent.attrsMap['v-model']) + \\\"\\\\\\\">:\\\\n\\\" +\\n 'inline selected attributes on <option> will be ignored when using v-model. ' +\\n 'Declare initial values in the component\\\\'s data option instead.'\\n );\\n return true\\n }\\n return false\\n}\\n\\nfunction genAssignmentCode (value, assignment) {\\n var modelRs = parseModel(value);\\n if (modelRs.idx === null) {\\n return (value + \\\"=\\\" + assignment)\\n } else {\\n return \\\"var $$exp = \\\" + (modelRs.exp) + \\\", $$idx = \\\" + (modelRs.idx) + \\\";\\\" +\\n \\\"if (!Array.isArray($$exp)){\\\" +\\n value + \\\"=\\\" + assignment + \\\"}\\\" +\\n \\\"else{$$exp.splice($$idx, 1, \\\" + assignment + \\\")}\\\"\\n }\\n}\\n\\n/* */\\n\\nfunction text (el, dir) {\\n if (dir.value) {\\n addProp(el, 'textContent', (\\\"_s(\\\" + (dir.value) + \\\")\\\"));\\n }\\n}\\n\\n/* */\\n\\nfunction html (el, dir) {\\n if (dir.value) {\\n addProp(el, 'innerHTML', (\\\"_s(\\\" + (dir.value) + \\\")\\\"));\\n }\\n}\\n\\nvar directives$1 = {\\n model: model$1,\\n text: text,\\n html: html\\n};\\n\\n/* */\\n\\nvar cache = Object.create(null);\\n\\nvar baseOptions = {\\n expectHTML: true,\\n modules: modules$1,\\n staticKeys: genStaticKeys(modules$1),\\n directives: directives$1,\\n isReservedTag: isReservedTag,\\n isUnaryTag: isUnaryTag,\\n mustUseProp: mustUseProp,\\n getTagNamespace: getTagNamespace,\\n isPreTag: isPreTag\\n};\\n\\nfunction compile$$1 (\\n template,\\n options\\n) {\\n options = options\\n ? extend(extend({}, baseOptions), options)\\n : baseOptions;\\n return compile$1(template, options)\\n}\\n\\nfunction compileToFunctions (\\n template,\\n options,\\n vm\\n) {\\n var _warn = (options && options.warn) || warn;\\n // detect possible CSP restriction\\n /* istanbul ignore if */\\n {\\n try {\\n new Function('return 1');\\n } catch (e) {\\n if (e.toString().match(/unsafe-eval|CSP/)) {\\n _warn(\\n 'It seems you are using the standalone build of Vue.js in an ' +\\n 'environment with Content Security Policy that prohibits unsafe-eval. ' +\\n 'The template compiler cannot work in this environment. Consider ' +\\n 'relaxing the policy to allow unsafe-eval or pre-compiling your ' +\\n 'templates into render functions.'\\n );\\n }\\n }\\n }\\n var key = options && options.delimiters\\n ? String(options.delimiters) + template\\n : template;\\n if (cache[key]) {\\n return cache[key]\\n }\\n var res = {};\\n var compiled = compile$$1(template, options);\\n res.render = makeFunction(compiled.render);\\n var l = compiled.staticRenderFns.length;\\n res.staticRenderFns = new Array(l);\\n for (var i = 0; i < l; i++) {\\n res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i]);\\n }\\n {\\n if (res.render === noop || res.staticRenderFns.some(function (fn) { return fn === noop; })) {\\n _warn(\\n \\\"failed to compile template:\\\\n\\\\n\\\" + template + \\\"\\\\n\\\\n\\\" +\\n detectErrors(compiled.ast).join('\\\\n') +\\n '\\\\n\\\\n',\\n vm\\n );\\n }\\n }\\n return (cache[key] = res)\\n}\\n\\nfunction makeFunction (code) {\\n try {\\n return new Function(code)\\n } catch (e) {\\n return noop\\n }\\n}\\n\\n/* */\\n\\nvar idToTemplate = cached(function (id) {\\n var el = query(id);\\n return el && el.innerHTML\\n});\\n\\nvar mount = Vue$3.prototype.$mount;\\nVue$3.prototype.$mount = function (\\n el,\\n hydrating\\n) {\\n el = el && query(el);\\n\\n /* istanbul ignore if */\\n if (el === document.body || el === document.documentElement) {\\n \\\"development\\\" !== 'production' && warn(\\n \\\"Do not mount Vue to <html> or <body> - mount to normal elements instead.\\\"\\n );\\n return this\\n }\\n\\n var options = this.$options;\\n // resolve template/el and convert to render function\\n if (!options.render) {\\n var template = options.template;\\n if (template) {\\n if (typeof template === 'string') {\\n if (template.charAt(0) === '#') {\\n template = idToTemplate(template);\\n /* istanbul ignore if */\\n if (\\\"development\\\" !== 'production' && !template) {\\n warn(\\n (\\\"Template element not found or is empty: \\\" + (options.template)),\\n this\\n );\\n }\\n }\\n } else if (template.nodeType) {\\n template = template.innerHTML;\\n } else {\\n {\\n warn('invalid template option:' + template, this);\\n }\\n return this\\n }\\n } else if (el) {\\n template = getOuterHTML(el);\\n }\\n if (template) {\\n var ref = compileToFunctions(template, {\\n warn: warn,\\n shouldDecodeNewlines: shouldDecodeNewlines,\\n delimiters: options.delimiters\\n }, this);\\n var render = ref.render;\\n var staticRenderFns = ref.staticRenderFns;\\n options.render = render;\\n options.staticRenderFns = staticRenderFns;\\n }\\n }\\n return mount.call(this, el, hydrating)\\n};\\n\\n/**\\n * Get outerHTML of elements, taking care\\n * of SVG elements in IE as well.\\n */\\nfunction getOuterHTML (el) {\\n if (el.outerHTML) {\\n return el.outerHTML\\n } else {\\n var container = document.createElement('div');\\n container.appendChild(el.cloneNode(true));\\n return container.innerHTML\\n }\\n}\\n\\nVue$3.compile = compileToFunctions;\\n\\nreturn Vue$3;\\n\\n})));\\n\\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(4)))//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9+L3Z1ZS9kaXN0L3Z1ZS5qcz8zZGU2Il0sInNvdXJjZXNDb250ZW50IjpbIi8qIVxuICogVnVlLmpzIHYyLjEuNlxuICogKGMpIDIwMTQtMjAxNiBFdmFuIFlvdVxuICogUmVsZWFzZWQgdW5kZXIgdGhlIE1JVCBMaWNlbnNlLlxuICovXG4oZnVuY3Rpb24gKGdsb2JhbCwgZmFjdG9yeSkge1xuICB0eXBlb2YgZXhwb3J0cyA9PT0gJ29iamVjdCcgJiYgdHlwZW9mIG1vZHVsZSAhPT0gJ3VuZGVmaW5lZCcgPyBtb2R1bGUuZXhwb3J0cyA9IGZhY3RvcnkoKSA6XG4gIHR5cGVvZiBkZWZpbmUgPT09ICdmdW5jdGlvbicgJiYgZGVmaW5lLmFtZCA/IGRlZmluZShmYWN0b3J5KSA6XG4gIChnbG9iYWwuVnVlID0gZmFjdG9yeSgpKTtcbn0odGhpcywgKGZ1bmN0aW9uICgpIHsgJ3VzZSBzdHJpY3QnO1xuXG4vKiAgKi9cblxuLyoqXG4gKiBDb252ZXJ0IGEgdmFsdWUgdG8gYSBzdH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3Q7XG4gICAgdmFyIGxvb3AgPSBmdW5jdGlvbiAoIGkgKSB7XG4gICAgICB2YXIga2V5ID0ga2V5c1tpXTtcbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICB7XG4gICAgICAgIGlmIChpc1Jlc2VydmVkUHJvcFtrZXldKSB7XG4gICAgICAgICAgd2FybihcbiAgICAgICAgICAgIChcIlxcXCJcIiArIGtleSArIFwiXFxcIiBpcyBhIHJlc2VydmVkIGF0dHJpYnV0ZSBhbmQgY2Fubm90IGJlIHVzZWQgYXMgY29tcG9uZW50IHByb3AuXCIpLFxuICAgICAgICAgICAgdm1cbiAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIGRlZmluZVJlYWN0aXZlJCQxKHZtLCBrZXksIHZhbGlkYXRlUHJvcChrZXksIHByb3BzLCBwcm9wc0RhdGEsIHZtKSwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgIGlmICh2bS4kcGFyZW50ICYmICFvYnNlcnZlclN0YXRlLmlzU2V0dGluZ1Byb3BzKSB7XG4gICAgICAgICAgICB3YXJuKFxuICAgICAgICAgICAgICBcIkF2b2lkIG11dGF0aW5nIGEgcHJvcCBkaXJlY3RseSBzaW5jZSB0aGUgdmFsdWUgd2lsbCBiZSBcIiArXG4gICAgICAgICAgICAgIFwib3ZlcndyaXR0ZW4gd2hlbmV2ZXIgdGhlIHBhcmVudCBjb21wb25lbnQgcmUtcmVuZGVycy4gXCIgK1xuICAgICAgICAgICAgICBcIkluc3RlYWQsIHVzZSBhIGRhdGEgb3IgY29tcHV0ZWQgcHJvcGVydHkgYmFzZWQgb24gdGhlIHByb3AncyBcIiArXG4gICAgICAgICAgICAgIFwidmFsdWUuIFByb3AgYmVpbmcgbXV0YXRlZDogXFxcIlwiICsga2V5ICsgXCJcXFwiXCIsXG4gICAgICAgICAgICAgIHZtXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG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Skge1xuICAgICAgICBcImRldmVsb3BtZW50XCIgIT09ICdwcm9kdWN0aW9uJyAmJiB3YXJuKFxuICAgICAgICAgICd2LWJpbmQgd2l0aG91dCBhcmd1bWVudCBleHBlY3RzIGFuIE9iamVjdCBvciBBcnJheSB2YWx1ZScsXG4gICAgICAgICAgdGhpc1xuICAgICAgICApO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgdmFsdWUgPSB0b09iamVjdCh2YWx1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIga2V5IGluIHZhbHVlKSB7XG4gICAgICAgICAgaWYgKGtleSA9PT0gJ2NsYXNzJyB8fCBrZXkgPT09ICdzdHlsZScpIHtcbiAgICAgICAgICAgIGRhdGFba2V5XSA9IHZhbHVlW2tleV07XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBoYXNoID0gYXNQcm9wIHx8IGNvbmZpZy5tdXN0VXNlUHJvcCh0YWcsIGtleSlcbiAgICAgICAgICAgICAgPyBkYXRhLmRvbVByb3BzIHx8IChkYXRhLmRvbVByb3BzID0ge30pXG4gICAgICAgICAgICAgIDogZGF0YS5hdHRycyB8fCAoZGF0YS5hdHRycyA9IHt9KTtcbiAgICAgICAgICAgIGhhc2hba2V5XSA9IHZhbHVlW2tleV07XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBkYXRhXG4gIH07XG5cbiAgLy8gY2hlY2sgdi1vbiBrZXlDb2Rlc1xuICBWdWUucHJvdG90eXBlLl9rID0gZnVuY3Rpb24gY2hlY2tLZXlDb2RlcyAoXG4gICAgZXZlbnRLZXlDb2RlLFxuICAgIGtleSxcbiAgICBidWlsdEluQWxpYXNcbiAgKSB7XG4gICAgdmFyIGtleUNvZGVzID0gY29uZmlnLmtleUNvZGVzW2tleV0gfHwgYnVpbHRJbkFsaWFzO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mYWxzZTtcbiAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNoaWxkTm9kZSA9IGNoaWxkTm9kZS5uZXh0U2libGluZztcbiAgICAgICAgICB9XG4gICAgICAgICAgLy8gaWYgY2hpbGROb2RlIGlzIG5vdCBudWxsLCBpdCBtZWFucyB0aGUgYWN0dWFsIGNoaWxkTm9kZXMgbGlzdCBpc1xuICAgICAgICAgIC8vIGxvbmdlciB0aGFuIHRoZSB2aXJ0dWFsIGNoaWxkcmVuIGxpc3QuXG4gICAgICAgICAgaWYgKCFjaGlsZHJlbk1hdGNoIHx8IGNoaWxkTm9kZSkge1xuICAgICAgICAgICAgaWYgKFwiZGV2ZWxvcG1lbnRcIiAhPT0gJ3Byb2R1Y3Rpb24nICYmXG4gICAgICAgICAgICAgICAgdHlwZW9mIGNvbnNvbGUgIT09ICd1bmRlZmluZWQnICYmXG4gICAgICAgICAgICAgICAgIWJhaWxlZCkge1xuICAgICAgICAgICAgICBiYWlsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ1BhcmVudDogJywgZWxtKTtcbiAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdNaXNtYXRjaGluZyBjaGlsZE5vZGVzIHZzLiBWTm9kZXM6ICcsIGVsbS5jaGlsZE5vZGVzLCBjaGlsZHJlbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmIChpc0RlZihkYXRhKSkge1xuICAgICAgICBmb3IgKHZhciBrZXkgaW4gZGF0YSkge1xuICAgICAgICAgIGlmICghaXNSZW5kZXJlZE1vZHVsZShrZXkpKSB7XG4gICAgICAgICAgICBpbnZva2VDcmVhdGVIb29rcyh2bm9kZSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKTtcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVx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AgICAgICAgYWR2YW5jZShjb21tZW50RW5kICsgMyk7XG4gICAgICAgICAgICBjb250aW51ZVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIGh0dHA6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvQ29uZGl0aW9uYWxfY29tbWVudCNEb3dubGV2ZWwtcmV2ZWFsZWRfY29uZGl0aW9uYWxfY29tbWVudFxuICAgICAgICBpZiAoY29uZGl0aW9uYWxDb21tZW50LnRlc3QoaHRtbCkpIHtcbiAgICAgICAgICB2YXIgY29uZGl0aW9uYWxFbmQgPSBodG1sLmluZGV4T2YoJ10+Jyk7XG5cbiAgICAgICAgICBpZiAoY29uZGl0aW9uYWxFbmQgPj0gMCkge1xuICAgICAgICAgICAgYWR2YW5jZShjb25kaXRpb25hbEVuZCArIDIpO1xuICAgICAgICAgICAgY29udGludWVcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBEb2N0eXBlOlxuICAgICAgICB2YXIgZG9jdHlwZU1hdGNoID0gaHRtbC5tYXRjaChkb2N0eXBlKTtcbiAgICAgICAgaWYgKGRvY3R5cGVNYXRjaCkge1xuICAgICAgICAgIGFkdmFuY2UoZG9jdHlwZU1hdGNoWzBdLmxlbmd0aCk7XG4gICAgICAgICAgY29udGludWVcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEVuZCB0YWc6XG4gICAgICAgIHZhciBlbmRUYWdNYXRjaCA9IGh0bWwubWF0Y2goZW5kVGFnKTtcbiAgICAgICAgaWYgKGVuZFRhZ01hdGNoKSB7XG4gICAgICAgICAgdmFyIGN1ckluZGV4ID0gaW5kZXg7XG4gICAgICAgICAgYWR2YW5jZShlbmRUYWdNYXRjaFswXS5sZW5ndGgpO1xuICAgICAgICAgIHBhcnNlRW5kVGFnKGVuZFRhZ01hdGNoWzBdLCBlbmRUYWdNYXRjaFsxXSwgY3VySW5kZXgsIGluZGV4KTtcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gU3RhcnQgdGFnOlxuICAgICAgICB2YXIgc3RhcnRUYWdNYXRjaCA9IHBhcnNlU3RhcnRUYWcoKTtcbiAgICAgICAgaWYgKHN0YXJ0VGFnTWF0Y2gpIHtcbiAgICAgICAgICBoYW5kbGVTdGFydFRhZyhzdGFydFRhZ01hdGNoKTtcbiAgICAgICAgICBjb250aW51ZVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciB0ZXh0ID0gKHZvaWQgMCksIHJlc3QkMSA9ICh2b2lkIDApLCBuZXh0ID0gKHZvaWQgMCk7XG4gICAgICBpZiAodGV4dEVuZCA+IDApIHtcbiAgICAgICAgcmVzdCQxID0gaHRtbC5zbGljZSh0ZXh0RW5kKTtcbiAgICAgICAgd2hpbGUgKFxuICAgICAgICAgICFlbmRUYWcudGVzdChyZXN0JDEpICYmXG4gICAgICAgICAgIXN0YXJ0VGFnT3Blbi50ZXN0KHJlc3QkMSkgJiZcbiAgICAgICAgICAhY29tbWVudC50ZXN0KHJlc3QkMSkgJiZcbiAgICAgICAgICAhY29uZGl0aW9uYWxDb21tZW50LnRlc3QocmVzdCQxKVxuICAgICAgICApIHtcbiAgICAgICAgICAvLyA8IGluIHBsYWluIHRleHQsIGJlIGZvcmdpdmluZyBhbmQgdHJlYXQgaXQgYXMgdGV4dFxuICAgICAgICAgIG5leHQgPSByZXN0JDEuaW5kZXhPZignPCcsIDEpO1xuICAgICAgICAgIGlmIChuZXh0IDwgMCkgeyBicmVhayB9XG4gICAgICAgICAgdGV4dEVuZCArPSBuZXh0O1xuICAgICAgICAgIHJlc3QkMSA9IGh0bWwuc2xpY2UodGV4dEVuZCk7XG4gICAgICAgIH1cbiAgICAgICAgdGV4dCA9IGh0bWwuc3Vic3RyaW5nKDAsIHRleHRFbmQpO1xuICAgICAgICBhZHZhbmNlKHRleHRFbmQpO1xuICAgICAgfVxuXG4gICAgICBpZiAodGV4dEVuZCA8IDApIHtcbiAgICAgICA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tOyBicmVhayAgICAgICAgICAgICAgICAgLy8gKVxuICAgICAgICBjYXNlIDB4NUI6IHNxdWFyZSsrOyBicmVhayAgICAgICAgICAgICAgICAvLyBbXG4gICAgICAgIGNhc2UgMHg1RDogc3F1YXJlLS07IGJyZWFrICAgICAgICAgICAgICAgIC8vIF1cbiAgICAgICAgY2FzZSAweDdCOiBjdXJseSsrOyBicmVhayAgICAgICAgICAgICAgICAgLy8ge1xuICAgICAgICBjYXNlIDB4N0Q6IGN1cmx5LS07IGJyZWFrICAgICAgICAgICAgICAgICAvLyB9XG4gICAgICB9XG4gICAgICBpZiAoYyA9PT0gMHgyZikgeyAvLyAvXG4gICAgICAgIHZhciBqID0gaSAtIDE7XG4gICAgICAgIHZhciBwID0gKHZvaWQgMCk7XG4gICAgICAgIC8vIGZpbmQgZmlyc3Qgbm9uLXdoaXRlc3BhY2UgcHJldiBjaGFyXG4gICAgICAgIGZvciAoOyBqID49IDA7IGotLSkge1xuICAgICAgICAgIHAgPSBleHAuY2hhckF0KGopO1xuICAgICAgICAgIGlmIChwICE9PSAnICcpIHsgYnJlYWsgfVxuICAgICAgICB9XG4gICAgICAgIGlmICghcCB8fCAhL1tcXHckXS8udGVzdChwKSkge1xuICAgICAgICAgIGluUmVnZXggPSB0cnVlO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgaWYgKGV4cHJlc3Npb24gPT09IHVuZGVmaW5lZCkge1xuICAgIGV4cHJlc3Npb24gPSBleHAuc2xpY2UoMCwgaSkudHJpbSgpO1xuICB9IGVsc2UgaWYgKGxhc3RGaWx0ZXJJbmRleCAhPT0gMCkge1xuICAgIHB1c2hGaWx0ZXIoKTtcbiAgfVxuXG4gIGZ1bmN0aW9uIHB1c2hGaWx0ZXIgKCkge1xuICAgIChmaWx0ZXJzIHx8IChmaWx0ZXJzID0gW10pKS5wdXNoKGV4cC5zbGljZShsYXN0RmlsdGVySW5kZXgsIGkpLnRyaW0oKSk7XG4gICAgbGFzd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IChcImRldmVsb3BtZW50XCIgIT09ICdwcm9kdWN0aW9uJyAmJiAhd2FybmVkKSB7XG4gICAgICAgICAgaWYgKGVsLnRhZyA9PT0gJ3Nsb3QnIHx8IGVsLnRhZyA9PT0gJ3RlbXBsYXRlJykge1xuICAgICAgICAgICAgd2FybmVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHdhcm4kMShcbiAgICAgICAgICAgICAgXCJDYW5ub3QgdXNlIDxcIiArIChlbC50YWcpICsgXCI+IGFzIGNvbXBvbmVudCByb290IGVsZW1lbnQgYmVjYXVzZSBpdCBtYXkgXCIgK1xuICAgICAgICAgICAgICAnY29udGFpbiBtdWx0aXBsZSBub2RlczpcXG4nICsgdGVtcGxhdGVcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChlbC5hdHRyc01hcC5oYXNPd25Qcm9wZXJ0eSgndi1mb3InKSkge1xuICAgICAgICAgICAgd2FybmVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHdhcm4kMShcbiAgICAgICAgICAgICAgJ0Nhbm5vdCB1c2Ugdi1mb3Igb24gc3RhdGVmdWwgY29tcG9uZW50IHJvb3QgZWxlbWVudCBiZWNhdXNlICcgK1xuICAgICAgICAgICAgICAnaXQgcmVuZGVycyBtdWx0aXBsZSBlbGVtZW50czpcXG4nICsgdGVtcGxhdGVcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIHRyZWUgbWFuYWdlbWVudFxuICAgICAgaWYgKCFyb290KSB7XG4gICAgICAgIHJvb3QgPSBlbGVtZW50O1xuICAgICAgICBjaGVja1Jvb3RDb25zdHJhaW50cyhyb290KTtcbiAgICAgIH0gZWxzZSBpZiAoIXN0YWNrLmxlbmd0aCkge1xuICAgICAgICAvLyBhbGxvdyByb290IGVsZW1lbnRzIHdpdGggdi1pZiwgdi1lbHNlLWlmIGFuZCB2LWVsc2VcbiAgICAgICAgaWYgKH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LCJzb3VyY2VSb290IjoiIn0=\");\n\n/***/ },\n/* 53 */\n/***/ function(module, exports, __webpack_require__) {\n\neval(\"\\n/**\\n * First we will load all of this project's JavaScript dependencies which\\n * include Vue and Vue Resource. This gives a great starting point for\\n * building robust, powerful web applications using Vue and Laravel.\\n */\\n\\n__webpack_require__(5);\\n/**\\n * Next, we will create a fresh Vue application instance and attach it to\\n * the page. Then, you may begin adding components to this application\\n * or customize the JavaScript scaffolding to fit your unique needs.\\n */\\nVue.component(\\n 'passport-clients',\\n __webpack_require__(8)\\n);\\n\\nVue.component(\\n 'passport-authorized-clients',\\n __webpack_require__(7)\\n);\\n\\nVue.component(\\n 'passport-personal-access-tokens',\\n __webpack_require__(9)\\n);\\n\\nVue.component(\\n 'importer',\\n __webpack_require__(6)\\n);\\n\\n// Commented out currently to avoid trying to load vue everywhere.\\n// const app = new Vue({\\n// el: '#app'\\n// });\\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vcmVzb3VyY2VzL2Fzc2V0cy9qcy92dWUuanM/ODgwMyJdLCJzb3VyY2VzQ29udGVudCI6WyJcbi8qKlxuICogRmlyc3Qgd2Ugd2lsbCBsb2FkIGFsbCBvZiB0aGlzIHByb2plY3QncyBKYXZhU2NyaXB0IGRlcGVuZGVuY2llcyB3aGljaFxuICogaW5jbHVkZSBWdWUgYW5kIFZ1ZSBSZXNvdXJjZS4gVGhpcyBnaXZlcyBhIGdyZWF0IHN0YXJ0aW5nIHBvaW50IGZvclxuICogYnVpbGRpbmcgcm9idXN0LCBwb3dlcmZ1bCB3ZWIgYXBwbGljYXRpb25zIHVzaW5nIFZ1ZSBhbmQgTGFyYXZlbC5cbiAqL1xuXG5yZXF1aXJlKCcuL2Jvb3RzdHJhcCcpO1xuLyoqXG4gKiBOZXh0LCB3ZSB3aWxsIGNyZWF0ZSBhIGZyZXNoIFZ1ZS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IkFBQUE7Ozs7Ozs7QUFPQTs7Ozs7O0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Iiwic291cmNlUm9vdCI6IiJ9\");\n\n/***/ }\n/******/ ]);","/*! jQuery UI - v1.12.1 - 2016-09-14\n* http://jqueryui.com\n* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([ \"jquery\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery );\n\t}\n}(function( $ ) {\n\n$.ui = $.ui || {};\n\nvar version = $.ui.version = \"1.12.1\";\n\n\n/*!\n * jQuery UI Widget 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Widget\n//>>group: Core\n//>>description: Provides a factory for creating stateful widgets with a common API.\n//>>docs: http://api.jqueryui.com/jQuery.widget/\n//>>demos: http://jqueryui.com/widget/\n\n\n\nvar widgetUuid = 0;\nvar widgetSlice = Array.prototype.slice;\n\n$.cleanData = ( function( orig ) {\n\treturn function( elems ) {\n\t\tvar events, elem, i;\n\t\tfor ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\ttry {\n\n\t\t\t\t// Only trigger remove when necessary to save time\n\t\t\t\tevents = $._data( elem, \"events\" );\n\t\t\t\tif ( events && events.remove ) {\n\t\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t\t}\n\n\t\t\t// Http://bugs.jquery.com/ticket/8235\n\t\t\t} catch ( e ) {}\n\t\t}\n\t\torig( elems );\n\t};\n} )( $.cleanData );\n\n$.widget = function( name, base, prototype ) {\n\tvar existingConstructor, constructor, basePrototype;\n\n\t// ProxiedPrototype allows the provided prototype to remain unmodified\n\t// so that it can be used as a mixin for multiple widgets (#8876)\n\tvar proxiedPrototype = {};\n\n\tvar namespace = name.split( \".\" )[ 0 ];\n\tname = name.split( \".\" )[ 1 ];\n\tvar fullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\tif ( $.isArray( prototype ) ) {\n\t\tprototype = $.extend.apply( null, [ {} ].concat( prototype ) );\n\t}\n\n\t// Create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\n\t\t// Allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// Allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\n\t// Extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\n\t\t// Copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\n\t\t// Track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t} );\n\n\tbasePrototype = new base();\n\n\t// We need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = ( function() {\n\t\t\tfunction _super() {\n\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t}\n\n\t\t\tfunction _superApply( args ) {\n\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t}\n\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super;\n\t\t\t\tvar __superApply = this._superApply;\n\t\t\t\tvar returnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t} )();\n\t} );\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t} );\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// Redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor,\n\t\t\t\tchild._proto );\n\t\t} );\n\n\t\t// Remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n\n\treturn constructor;\n};\n\n$.widget.extend = function( target ) {\n\tvar input = widgetSlice.call( arguments, 1 );\n\tvar inputIndex = 0;\n\tvar inputLength = input.length;\n\tvar key;\n\tvar value;\n\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\";\n\t\tvar args = widgetSlice.call( arguments, 1 );\n\t\tvar returnValue = this;\n\n\t\tif ( isMethodCall ) {\n\n\t\t\t// If this is an empty collection, we need to have the instance method\n\t\t\t// return undefined instead of the jQuery instance\n\t\t\tif ( !this.length && options === \"instance\" ) {\n\t\t\t\treturnValue = undefined;\n\t\t\t} else {\n\t\t\t\tthis.each( function() {\n\t\t\t\t\tvar methodValue;\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\n\t\t\t\t\tif ( options === \"instance\" ) {\n\t\t\t\t\t\treturnValue = instance;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name +\n\t\t\t\t\t\t\t\" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name +\n\t\t\t\t\t\t\t\" widget instance\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Allow multiple hashes to be passed on init\n\t\t\tif ( args.length ) {\n\t\t\t\toptions = $.widget.extend.apply( null, [ options ].concat( args ) );\n\t\t\t}\n\n\t\t\tthis.each( function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} );\n\t\t\t\t\tif ( instance._init ) {\n\t\t\t\t\t\tinstance._init();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\n\toptions: {\n\t\tclasses: {},\n\t\tdisabled: false,\n\n\t\t// Callbacks\n\t\tcreate: null\n\t},\n\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = widgetUuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\t\tthis.classesElementLookup = {};\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tthis.document = $( element.style ?\n\n\t\t\t\t// Element within the document\n\t\t\t\telement.ownerDocument :\n\n\t\t\t\t// Element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );\n\t\t}\n\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis._create();\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._setOptionDisabled( this.options.disabled );\n\t\t}\n\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\n\t_getCreateOptions: function() {\n\t\treturn {};\n\t},\n\n\t_getCreateEventData: $.noop,\n\n\t_create: $.noop,\n\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tvar that = this;\n\n\t\tthis._destroy();\n\t\t$.each( this.classesElementLookup, function( key, value ) {\n\t\t\tthat._removeClass( value, key );\n\t\t} );\n\n\t\t// We can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeData( this.widgetFullName );\n\t\tthis.widget()\n\t\t\t.off( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" );\n\n\t\t// Clean up events and states\n\t\tthis.bindings.off( this.eventNamespace );\n\t},\n\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key;\n\t\tvar parts;\n\t\tvar curOption;\n\t\tvar i;\n\n\t\tif ( arguments.length === 0 ) {\n\n\t\t\t// Don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\n\t\t\t// Handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( arguments.length === 1 ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"classes\" ) {\n\t\t\tthis._setOptionClasses( value );\n\t\t}\n\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._setOptionDisabled( value );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOptionClasses: function( value ) {\n\t\tvar classKey, elements, currentElements;\n\n\t\tfor ( classKey in value ) {\n\t\t\tcurrentElements = this.classesElementLookup[ classKey ];\n\t\t\tif ( value[ classKey ] === this.options.classes[ classKey ] ||\n\t\t\t\t\t!currentElements ||\n\t\t\t\t\t!currentElements.length ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// We are doing this to create a new jQuery object because the _removeClass() call\n\t\t\t// on the next line is going to destroy the reference to the current elements being\n\t\t\t// tracked. We need to save a copy of this collection so that we can add the new classes\n\t\t\t// below.\n\t\t\telements = $( currentElements.get() );\n\t\t\tthis._removeClass( currentElements, classKey );\n\n\t\t\t// We don't use _addClass() here, because that uses this.options.classes\n\t\t\t// for generating the string of classes. We want to use the value passed in from\n\t\t\t// _setOption(), this is the new value of the classes option which was passed to\n\t\t\t// _setOption(). We pass this value directly to _classes().\n\t\t\telements.addClass( this._classes( {\n\t\t\t\telement: elements,\n\t\t\t\tkeys: classKey,\n\t\t\t\tclasses: value,\n\t\t\t\tadd: true\n\t\t\t} ) );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null, !!value );\n\n\t\t// If the widget is becoming disabled, then nothing is interactive\n\t\tif ( value ) {\n\t\t\tthis._removeClass( this.hoverable, null, \"ui-state-hover\" );\n\t\t\tthis._removeClass( this.focusable, null, \"ui-state-focus\" );\n\t\t}\n\t},\n\n\tenable: function() {\n\t\treturn this._setOptions( { disabled: false } );\n\t},\n\n\tdisable: function() {\n\t\treturn this._setOptions( { disabled: true } );\n\t},\n\n\t_classes: function( options ) {\n\t\tvar full = [];\n\t\tvar that = this;\n\n\t\toptions = $.extend( {\n\t\t\telement: this.element,\n\t\t\tclasses: this.options.classes || {}\n\t\t}, options );\n\n\t\tfunction processClassString( classes, checkOption ) {\n\t\t\tvar current, i;\n\t\t\tfor ( i = 0; i < classes.length; i++ ) {\n\t\t\t\tcurrent = that.classesElementLookup[ classes[ i ] ] || $();\n\t\t\t\tif ( options.add ) {\n\t\t\t\t\tcurrent = $( $.unique( current.get().concat( options.element.get() ) ) );\n\t\t\t\t} else {\n\t\t\t\t\tcurrent = $( current.not( options.element ).get() );\n\t\t\t\t}\n\t\t\t\tthat.classesElementLookup[ classes[ i ] ] = current;\n\t\t\t\tfull.push( classes[ i ] );\n\t\t\t\tif ( checkOption && options.classes[ classes[ i ] ] ) {\n\t\t\t\t\tfull.push( options.classes[ classes[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._on( options.element, {\n\t\t\t\"remove\": \"_untrackClassesElement\"\n\t\t} );\n\n\t\tif ( options.keys ) {\n\t\t\tprocessClassString( options.keys.match( /\\S+/g ) || [], true );\n\t\t}\n\t\tif ( options.extra ) {\n\t\t\tprocessClassString( options.extra.match( /\\S+/g ) || [] );\n\t\t}\n\n\t\treturn full.join( \" \" );\n\t},\n\n\t_untrackClassesElement: function( event ) {\n\t\tvar that = this;\n\t\t$.each( that.classesElementLookup, function( key, value ) {\n\t\t\tif ( $.inArray( event.target, value ) !== -1 ) {\n\t\t\t\tthat.classesElementLookup[ key ] = $( value.not( event.target ).get() );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_removeClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, false );\n\t},\n\n\t_addClass: function( element, keys, extra ) {\n\t\treturn this._toggleClass( element, keys, extra, true );\n\t},\n\n\t_toggleClass: function( element, keys, extra, add ) {\n\t\tadd = ( typeof add === \"boolean\" ) ? add : extra;\n\t\tvar shift = ( typeof element === \"string\" || element === null ),\n\t\t\toptions = {\n\t\t\t\textra: shift ? keys : extra,\n\t\t\t\tkeys: shift ? element : keys,\n\t\t\t\telement: shift ? this.element : element,\n\t\t\t\tadd: add\n\t\t\t};\n\t\toptions.element.toggleClass( this._classes( options ), add );\n\t\treturn this;\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement;\n\t\tvar instance = this;\n\n\t\t// No suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// No element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\n\t\t\t\t// Allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// Copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^([\\w:-]*)\\s*(.*)$/ );\n\t\t\tvar eventName = match[ 1 ] + instance.eventNamespace;\n\t\t\tvar selector = match[ 2 ];\n\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.on( eventName, selector, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.on( eventName, handlerProxy );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = ( eventName || \"\" ).split( \" \" ).join( this.eventNamespace + \" \" ) +\n\t\t\tthis.eventNamespace;\n\t\telement.off( eventName ).off( eventName );\n\n\t\t// Clear the stack to avoid memory leaks (#10056)\n\t\tthis.bindings = $( this.bindings.not( element ).get() );\n\t\tthis.focusable = $( this.focusable.not( element ).get() );\n\t\tthis.hoverable = $( this.hoverable.not( element ).get() );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-hover\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._addClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\tthis._removeClass( $( event.currentTarget ), null, \"ui-state-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig;\n\t\tvar callback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\n\t\t// The original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// Copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\n\t\tvar hasOptions;\n\t\tvar effectName = !options ?\n\t\t\tmethod :\n\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\tdefaultEffect :\n\t\t\t\toptions.effect || defaultEffect;\n\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue( function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t} );\n\t\t}\n\t};\n} );\n\nvar widget = $.widget;\n\n\n/*!\n * jQuery UI Position 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/position/\n */\n\n//>>label: Position\n//>>group: Core\n//>>description: Positions elements relative to other elements.\n//>>docs: http://api.jqueryui.com/position/\n//>>demos: http://jqueryui.com/position/\n\n\n( function() {\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[ 0 ];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div \" +\n\t\t\t\t\"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>\" +\n\t\t\t\t\"<div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[ 0 ];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[ 0 ].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn ( cachedScrollbarWidth = w1 - w2 );\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow || within.isDocument ? \"\" :\n\t\t\t\twithin.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[ 0 ].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[ 0 ].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[ 0 ] ),\n\t\t\tisDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,\n\t\t\thasOffset = !isWindow && !isDocument;\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\tisDocument: isDocument,\n\t\t\toffset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: withinElement.outerWidth(),\n\t\t\theight: withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// Make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[ 0 ].preventDefault ) {\n\n\t\t// Force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\n\t// Clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// Force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1 ) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// Calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// Reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t} );\n\n\t// Normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each( function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) +\n\t\t\t\tscrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) +\n\t\t\t\tscrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem: elem\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tif ( options.using ) {\n\n\t\t\t// Adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t} );\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// Element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\n\t\t\t\t// Element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\n\t\t\t\t// Element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\n\t\t\t\t// Element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\n\t\t\t// Too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// Element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\n\t\t\t\t// Element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight -\n\t\t\t\t\t\twithinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\n\t\t\t\t// Element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\n\t\t\t\t// Element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\n\t\t\t// Too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\n\t\t\t// Adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -\n\t\t\t\t\touterWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +\n\t\t\t\t\tatOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -\n\t\t\t\t\touterHeight - withinOffset;\n\t\t\t\tif ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +\n\t\t\t\t\toffset - offsetTop;\n\t\t\t\tif ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n} )();\n\nvar position = $.ui.position;\n\n\n/*!\n * jQuery UI :data 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :data Selector\n//>>group: Core\n//>>description: Selects elements which have data stored under the specified key.\n//>>docs: http://api.jqueryui.com/data-selector/\n\n\nvar data = $.extend( $.expr[ \":\" ], {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo( function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t} ) :\n\n\t\t// Support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t}\n} );\n\n/*!\n * jQuery UI Disable Selection 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: disableSelection\n//>>group: Core\n//>>description: Disable selection of text content within the set of matched elements.\n//>>docs: http://api.jqueryui.com/disableSelection/\n\n// This file is deprecated\n\n\nvar disableSelection = $.fn.extend( {\n\tdisableSelection: ( function() {\n\t\tvar eventType = \"onselectstart\" in document.createElement( \"div\" ) ?\n\t\t\t\"selectstart\" :\n\t\t\t\"mousedown\";\n\n\t\treturn function() {\n\t\t\treturn this.on( eventType + \".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tenableSelection: function() {\n\t\treturn this.off( \".ui-disableSelection\" );\n\t}\n} );\n\n\n/*!\n * jQuery UI Effects 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Effects Core\n//>>group: Effects\n// jscs:disable maximumLineLength\n//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.\n// jscs:enable maximumLineLength\n//>>docs: http://api.jqueryui.com/category/effects-core/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar dataSpace = \"ui-effects-\",\n\tdataSpaceStyle = \"ui-effects-style\",\n\tdataSpaceAnimated = \"ui-effects-animated\",\n\n\t// Create a local jQuery because jQuery Color relies on it and the\n\t// global may not exist with AMD and a custom build (#10199)\n\tjQuery = $;\n\n$.effects = {\n\teffect: {}\n};\n\n/*!\n * jQuery Color Animations v2.1.2\n * https://github.com/jquery/jquery-color\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Wed Jan 16 08:47:09 2013 -0600\n */\n( function( jQuery, undefined ) {\n\n\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor \" +\n\t\t\"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\n\t// Plusequals test for += 100 -= 100\n\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\n\t// A set of RE's that can match strings and generate color tuples.\n\tstringParsers = [ {\n\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\n\t\t\t// This regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\n\t\t\t// This regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tspace: \"hsla\",\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t} ],\n\n\t// JQuery.Color( )\n\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t},\n\tspaces = {\n\t\trgba: {\n\t\t\tprops: {\n\t\t\t\tred: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tgreen: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tblue: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thsla: {\n\t\t\tprops: {\n\t\t\t\thue: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t},\n\t\t\t\tsaturation: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t},\n\t\t\t\tlightness: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tpropTypes = {\n\t\t\"byte\": {\n\t\t\tfloor: true,\n\t\t\tmax: 255\n\t\t},\n\t\t\"percent\": {\n\t\t\tmax: 1\n\t\t},\n\t\t\"degrees\": {\n\t\t\tmod: 360,\n\t\t\tfloor: true\n\t\t}\n\t},\n\tsupport = color.support = {},\n\n\t// Element for support tests\n\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\n\t// Colors = jQuery.Color.names\n\tcolors,\n\n\t// Local aliases of functions called often\n\teach = jQuery.each;\n\n// Determine rgba support immediately\nsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\n// Define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n\tspace.cache = \"_\" + spaceName;\n\tspace.props.alpha = {\n\t\tidx: 3,\n\t\ttype: \"percent\",\n\t\tdef: 1\n\t};\n} );\n\nfunction clamp( value, prop, allowEmpty ) {\n\tvar type = propTypes[ prop.type ] || {};\n\n\tif ( value == null ) {\n\t\treturn ( allowEmpty || !prop.def ) ? null : prop.def;\n\t}\n\n\t// ~~ is an short way of doing floor for positive numbers\n\tvalue = type.floor ? ~~value : parseFloat( value );\n\n\t// IE will pass in empty strings as value for alpha,\n\t// which will hit this case\n\tif ( isNaN( value ) ) {\n\t\treturn prop.def;\n\t}\n\n\tif ( type.mod ) {\n\n\t\t// We add mod before modding to make sure that negatives values\n\t\t// get converted properly: -10 -> 350\n\t\treturn ( value + type.mod ) % type.mod;\n\t}\n\n\t// For now all property types without mod have min and max\n\treturn 0 > value ? 0 : type.max < value ? type.max : value;\n}\n\nfunction stringParse( string ) {\n\tvar inst = color(),\n\t\trgba = inst._rgba = [];\n\n\tstring = string.toLowerCase();\n\n\teach( stringParsers, function( i, parser ) {\n\t\tvar parsed,\n\t\t\tmatch = parser.re.exec( string ),\n\t\t\tvalues = match && parser.parse( match ),\n\t\t\tspaceName = parser.space || \"rgba\";\n\n\t\tif ( values ) {\n\t\t\tparsed = inst[ spaceName ]( values );\n\n\t\t\t// If this was an rgba parse the assignment might happen twice\n\t\t\t// oh well....\n\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\trgba = inst._rgba = parsed._rgba;\n\n\t\t\t// Exit each( stringParsers ) here because we matched\n\t\t\treturn false;\n\t\t}\n\t} );\n\n\t// Found a stringParser that handled it\n\tif ( rgba.length ) {\n\n\t\t// If this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t}\n\t\treturn inst;\n\t}\n\n\t// Named colors\n\treturn colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n\tparse: function( red, green, blue, alpha ) {\n\t\tif ( red === undefined ) {\n\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\treturn this;\n\t\t}\n\t\tif ( red.jquery || red.nodeType ) {\n\t\t\tred = jQuery( red ).css( green );\n\t\t\tgreen = undefined;\n\t\t}\n\n\t\tvar inst = this,\n\t\t\ttype = jQuery.type( red ),\n\t\t\trgba = this._rgba = [];\n\n\t\t// More than 1 argument specified - assume ( red, green, blue, alpha )\n\t\tif ( green !== undefined ) {\n\t\t\tred = [ red, green, blue, alpha ];\n\t\t\ttype = \"array\";\n\t\t}\n\n\t\tif ( type === \"string\" ) {\n\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t}\n\n\t\tif ( type === \"array\" ) {\n\t\t\teach( spaces.rgba.props, function( key, prop ) {\n\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t} );\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( type === \"object\" ) {\n\t\t\tif ( red instanceof color ) {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\teach( space.props, function( key, prop ) {\n\n\t\t\t\t\t\t// If the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\n\t\t\t\t\t\t\t// If the value was null, we don't need to copy it\n\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// This is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Everything defined but alpha?\n\t\t\t\t\tif ( inst[ cache ] &&\n\t\t\t\t\t\t\tjQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\n\t\t\t\t\t\t// Use the default of 1\n\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t},\n\tis: function( compare ) {\n\t\tvar is = color( compare ),\n\t\t\tsame = true,\n\t\t\tinst = this;\n\n\t\teach( spaces, function( _, space ) {\n\t\t\tvar localCache,\n\t\t\t\tisCache = is[ space.cache ];\n\t\t\tif ( isCache ) {\n\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\treturn same;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn same;\n\t\t} );\n\t\treturn same;\n\t},\n\t_space: function() {\n\t\tvar used = [],\n\t\t\tinst = this;\n\t\teach( spaces, function( spaceName, space ) {\n\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\tused.push( spaceName );\n\t\t\t}\n\t\t} );\n\t\treturn used.pop();\n\t},\n\ttransition: function( other, distance ) {\n\t\tvar end = color( other ),\n\t\t\tspaceName = end._space(),\n\t\t\tspace = spaces[ spaceName ],\n\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\tresult = start.slice();\n\n\t\tend = end[ space.cache ];\n\t\teach( space.props, function( key, prop ) {\n\t\t\tvar index = prop.idx,\n\t\t\t\tstartValue = start[ index ],\n\t\t\t\tendValue = end[ index ],\n\t\t\t\ttype = propTypes[ prop.type ] || {};\n\n\t\t\t// If null, don't override start value\n\t\t\tif ( endValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If null - use end\n\t\t\tif ( startValue === null ) {\n\t\t\t\tresult[ index ] = endValue;\n\t\t\t} else {\n\t\t\t\tif ( type.mod ) {\n\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t}\n\t\t} );\n\t\treturn this[ spaceName ]( result );\n\t},\n\tblend: function( opaque ) {\n\n\t\t// If we are already opaque - return ourself\n\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar rgb = this._rgba.slice(),\n\t\t\ta = rgb.pop(),\n\t\t\tblend = color( opaque )._rgba;\n\n\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t} ) );\n\t},\n\ttoRgbaString: function() {\n\t\tvar prefix = \"rgba(\",\n\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\treturn v == null ? ( i > 2 ? 1 : 0 ) : v;\n\t\t\t} );\n\n\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\trgba.pop();\n\t\t\tprefix = \"rgb(\";\n\t\t}\n\n\t\treturn prefix + rgba.join() + \")\";\n\t},\n\ttoHslaString: function() {\n\t\tvar prefix = \"hsla(\",\n\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\tif ( v == null ) {\n\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t}\n\n\t\t\t\t// Catch 1 and 2\n\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t}\n\t\t\t\treturn v;\n\t\t\t} );\n\n\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\thsla.pop();\n\t\t\tprefix = \"hsl(\";\n\t\t}\n\t\treturn prefix + hsla.join() + \")\";\n\t},\n\ttoHexString: function( includeAlpha ) {\n\t\tvar rgba = this._rgba.slice(),\n\t\t\talpha = rgba.pop();\n\n\t\tif ( includeAlpha ) {\n\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t}\n\n\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\n\t\t\t// Default to 0 when nulls exist\n\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t} ).join( \"\" );\n\t},\n\ttoString: function() {\n\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t}\n} );\ncolor.fn.parse.prototype = color.fn;\n\n// Hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n\th = ( h + 1 ) % 1;\n\tif ( h * 6 < 1 ) {\n\t\treturn p + ( q - p ) * h * 6;\n\t}\n\tif ( h * 2 < 1 ) {\n\t\treturn q;\n\t}\n\tif ( h * 3 < 2 ) {\n\t\treturn p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;\n\t}\n\treturn p;\n}\n\nspaces.hsla.to = function( rgba ) {\n\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t}\n\tvar r = rgba[ 0 ] / 255,\n\t\tg = rgba[ 1 ] / 255,\n\t\tb = rgba[ 2 ] / 255,\n\t\ta = rgba[ 3 ],\n\t\tmax = Math.max( r, g, b ),\n\t\tmin = Math.min( r, g, b ),\n\t\tdiff = max - min,\n\t\tadd = max + min,\n\t\tl = add * 0.5,\n\t\th, s;\n\n\tif ( min === max ) {\n\t\th = 0;\n\t} else if ( r === max ) {\n\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t} else if ( g === max ) {\n\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t} else {\n\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t}\n\n\t// Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\tif ( diff === 0 ) {\n\t\ts = 0;\n\t} else if ( l <= 0.5 ) {\n\t\ts = diff / add;\n\t} else {\n\t\ts = diff / ( 2 - add );\n\t}\n\treturn [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function( hsla ) {\n\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t}\n\tvar h = hsla[ 0 ] / 360,\n\t\ts = hsla[ 1 ],\n\t\tl = hsla[ 2 ],\n\t\ta = hsla[ 3 ],\n\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\tp = 2 * l - q;\n\n\treturn [\n\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\ta\n\t];\n};\n\neach( spaces, function( spaceName, space ) {\n\tvar props = space.props,\n\t\tcache = space.cache,\n\t\tto = space.to,\n\t\tfrom = space.from;\n\n\t// Makes rgba() and hsla()\n\tcolor.fn[ spaceName ] = function( value ) {\n\n\t\t// Generate a cache for this space if it doesn't exist\n\t\tif ( to && !this[ cache ] ) {\n\t\t\tthis[ cache ] = to( this._rgba );\n\t\t}\n\t\tif ( value === undefined ) {\n\t\t\treturn this[ cache ].slice();\n\t\t}\n\n\t\tvar ret,\n\t\t\ttype = jQuery.type( value ),\n\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\tlocal = this[ cache ].slice();\n\n\t\teach( props, function( key, prop ) {\n\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\tif ( val == null ) {\n\t\t\t\tval = local[ prop.idx ];\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t} );\n\n\t\tif ( from ) {\n\t\t\tret = color( from( local ) );\n\t\t\tret[ cache ] = local;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn color( local );\n\t\t}\n\t};\n\n\t// Makes red() green() blue() alpha() hue() saturation() lightness()\n\teach( props, function( key, prop ) {\n\n\t\t// Alpha is included in more than one space\n\t\tif ( color.fn[ key ] ) {\n\t\t\treturn;\n\t\t}\n\t\tcolor.fn[ key ] = function( value ) {\n\t\t\tvar vtype = jQuery.type( value ),\n\t\t\t\tfn = ( key === \"alpha\" ? ( this._hsla ? \"hsla\" : \"rgba\" ) : spaceName ),\n\t\t\t\tlocal = this[ fn ](),\n\t\t\t\tcur = local[ prop.idx ],\n\t\t\t\tmatch;\n\n\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\treturn cur;\n\t\t\t}\n\n\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\tvtype = jQuery.type( value );\n\t\t\t}\n\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\tif ( match ) {\n\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = value;\n\t\t\treturn this[ fn ]( local );\n\t\t};\n\t} );\n} );\n\n// Add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n\tvar hooks = hook.split( \" \" );\n\teach( hooks, function( i, hook ) {\n\t\tjQuery.cssHooks[ hook ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar parsed, curElem,\n\t\t\t\t\tbackgroundColor = \"\";\n\n\t\t\t\tif ( value !== \"transparent\" && ( jQuery.type( value ) !== \"string\" ||\n\t\t\t\t\t\t( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t( backgroundColor === \"\" || backgroundColor === \"transparent\" ) &&\n\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// Wrapped to prevent IE from throwing errors on \"invalid\" values like\n\t\t\t\t\t// 'auto' or 'inherit'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\tif ( !fx.colorInit ) {\n\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\tfx.end = color( fx.end );\n\t\t\t\tfx.colorInit = true;\n\t\t\t}\n\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t};\n\t} );\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n\texpand: function( value ) {\n\t\tvar expanded = {};\n\n\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( i, part ) {\n\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t} );\n\t\treturn expanded;\n\t}\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n\n\t// 4.1. Basic color keywords\n\taqua: \"#00ffff\",\n\tblack: \"#000000\",\n\tblue: \"#0000ff\",\n\tfuchsia: \"#ff00ff\",\n\tgray: \"#808080\",\n\tgreen: \"#008000\",\n\tlime: \"#00ff00\",\n\tmaroon: \"#800000\",\n\tnavy: \"#000080\",\n\tolive: \"#808000\",\n\tpurple: \"#800080\",\n\tred: \"#ff0000\",\n\tsilver: \"#c0c0c0\",\n\tteal: \"#008080\",\n\twhite: \"#ffffff\",\n\tyellow: \"#ffff00\",\n\n\t// 4.2.3. \"transparent\" color keyword\n\ttransparent: [ null, null, null, 0 ],\n\n\t_default: \"#ffffff\"\n};\n\n} )( jQuery );\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n( function() {\n\nvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\n$.each(\n\t[ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ],\n\tfunction( _, prop ) {\n\t\t$.fx.step[ prop ] = function( fx ) {\n\t\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\t\tfx.setAttr = true;\n\t\t\t}\n\t\t};\n\t}\n);\n\nfunction getElementStyles( elem ) {\n\tvar key, len,\n\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\telem.currentStyle,\n\t\tstyles = {};\n\n\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\tlen = style.length;\n\t\twhile ( len-- ) {\n\t\t\tkey = style[ len ];\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ $.camelCase( key ) ] = style[ key ];\n\t\t\t}\n\t\t}\n\n\t// Support: Opera, IE <9\n\t} else {\n\t\tfor ( key in style ) {\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn styles;\n}\n\nfunction styleDifference( oldStyle, newStyle ) {\n\tvar diff = {},\n\t\tname, value;\n\n\tfor ( name in newStyle ) {\n\t\tvalue = newStyle[ name ];\n\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n// Support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n$.effects.animateClass = function( value, duration, easing, callback ) {\n\tvar o = $.speed( duration, easing, callback );\n\n\treturn this.queue( function() {\n\t\tvar animated = $( this ),\n\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\tapplyClassChange,\n\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\n\t\t// Map the animated objects to store the original styles.\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tvar el = $( this );\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tstart: getElementStyles( this )\n\t\t\t};\n\t\t} );\n\n\t\t// Apply class change\n\t\tapplyClassChange = function() {\n\t\t\t$.each( classAnimationActions, function( i, action ) {\n\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t\tapplyClassChange();\n\n\t\t// Map all animated objects again - calculate new styles and diff\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\treturn this;\n\t\t} );\n\n\t\t// Apply original class\n\t\tanimated.attr( \"class\", baseClass );\n\n\t\t// Map all animated objects again - this time collecting a promise\n\t\tallAnimations = allAnimations.map( function() {\n\t\t\tvar styleInfo = this,\n\t\t\t\tdfd = $.Deferred(),\n\t\t\t\topts = $.extend( {}, o, {\n\t\t\t\t\tqueue: false,\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\tthis.el.animate( this.diff, opts );\n\t\t\treturn dfd.promise();\n\t\t} );\n\n\t\t// Once all animations have completed:\n\t\t$.when.apply( $, allAnimations.get() ).done( function() {\n\n\t\t\t// Set the final class\n\t\t\tapplyClassChange();\n\n\t\t\t// For each animated element,\n\t\t\t// clear all css properties that were animated\n\t\t\t$.each( arguments, function() {\n\t\t\t\tvar el = this.el;\n\t\t\t\t$.each( this.diff, function( key ) {\n\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t// This is guarnteed to be there if you use jQuery.speed()\n\t\t\t// it also handles dequeuing the next anim...\n\t\t\to.complete.call( animated[ 0 ] );\n\t\t} );\n\t} );\n};\n\n$.fn.extend( {\n\taddClass: ( function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn speed ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t} )( $.fn.addClass ),\n\n\tremoveClass: ( function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn arguments.length > 1 ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t} )( $.fn.removeClass ),\n\n\ttoggleClass: ( function( orig ) {\n\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\tif ( !speed ) {\n\n\t\t\t\t\t// Without speed parameter\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t( force ? { add: classNames } : { remove: classNames } ),\n\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Without force parameter\n\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t}\n\t\t};\n\t} )( $.fn.toggleClass ),\n\n\tswitchClass: function( remove, add, speed, easing, callback ) {\n\t\treturn $.effects.animateClass.call( this, {\n\t\t\tadd: add,\n\t\t\tremove: remove\n\t\t}, speed, easing, callback );\n\t}\n} );\n\n} )();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n( function() {\n\nif ( $.expr && $.expr.filters && $.expr.filters.animated ) {\n\t$.expr.filters.animated = ( function( orig ) {\n\t\treturn function( elem ) {\n\t\t\treturn !!$( elem ).data( dataSpaceAnimated ) || orig( elem );\n\t\t};\n\t} )( $.expr.filters.animated );\n}\n\nif ( $.uiBackCompat !== false ) {\n\t$.extend( $.effects, {\n\n\t\t// Saves a set of properties in a data storage\n\t\tsave: function( element, set ) {\n\t\t\tvar i = 0, length = set.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Restores a set of previously saved properties from a data storage\n\t\trestore: function( element, set ) {\n\t\t\tvar val, i = 0, length = set.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t\telement.css( set[ i ], val );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tsetMode: function( el, mode ) {\n\t\t\tif ( mode === \"toggle\" ) {\n\t\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t\t}\n\t\t\treturn mode;\n\t\t},\n\n\t\t// Wraps the element around a wrapper that copies position properties\n\t\tcreateWrapper: function( element ) {\n\n\t\t\t// If the element is already wrapped, return it\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t\treturn element.parent();\n\t\t\t}\n\n\t\t\t// Wrap the element\n\t\t\tvar props = {\n\t\t\t\t\twidth: element.outerWidth( true ),\n\t\t\t\t\theight: element.outerHeight( true ),\n\t\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t\t},\n\t\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\tpadding: 0\n\t\t\t\t\t} ),\n\n\t\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\t\tsize = {\n\t\t\t\t\twidth: element.width(),\n\t\t\t\t\theight: element.height()\n\t\t\t\t},\n\t\t\t\tactive = document.activeElement;\n\n\t\t\t// Support: Firefox\n\t\t\t// Firefox incorrectly exposes anonymous content\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\t\ttry {\n\t\t\t\tactive.id;\n\t\t\t} catch ( e ) {\n\t\t\t\tactive = document.body;\n\t\t\t}\n\n\t\t\telement.wrap( wrapper );\n\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).trigger( \"focus\" );\n\t\t\t}\n\n\t\t\t// Hotfix for jQuery 1.4 since some change in wrap() seems to actually\n\t\t\t// lose the reference to the wrapped element\n\t\t\twrapper = element.parent();\n\n\t\t\t// Transfer positioning properties to the wrapper\n\t\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\t\twrapper.css( { position: \"relative\" } );\n\t\t\t\telement.css( { position: \"relative\" } );\n\t\t\t} else {\n\t\t\t\t$.extend( props, {\n\t\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t\t} );\n\t\t\t\t$.each( [ \"top\", \"left\", \"bottom\", \"right\" ], function( i, pos ) {\n\t\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\telement.css( {\n\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: \"auto\",\n\t\t\t\t\tbottom: \"auto\"\n\t\t\t\t} );\n\t\t\t}\n\t\t\telement.css( size );\n\n\t\t\treturn wrapper.css( props ).show();\n\t\t},\n\n\t\tremoveWrapper: function( element ) {\n\t\t\tvar active = document.activeElement;\n\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t\telement.parent().replaceWith( element );\n\n\t\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t\t$( active ).trigger( \"focus\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn element;\n\t\t}\n\t} );\n}\n\n$.extend( $.effects, {\n\tversion: \"1.12.1\",\n\n\tdefine: function( name, mode, effect ) {\n\t\tif ( !effect ) {\n\t\t\teffect = mode;\n\t\t\tmode = \"effect\";\n\t\t}\n\n\t\t$.effects.effect[ name ] = effect;\n\t\t$.effects.effect[ name ].mode = mode;\n\n\t\treturn effect;\n\t},\n\n\tscaledDimensions: function( element, percent, direction ) {\n\t\tif ( percent === 0 ) {\n\t\t\treturn {\n\t\t\t\theight: 0,\n\t\t\t\twidth: 0,\n\t\t\t\touterHeight: 0,\n\t\t\t\touterWidth: 0\n\t\t\t};\n\t\t}\n\n\t\tvar x = direction !== \"horizontal\" ? ( ( percent || 100 ) / 100 ) : 1,\n\t\t\ty = direction !== \"vertical\" ? ( ( percent || 100 ) / 100 ) : 1;\n\n\t\treturn {\n\t\t\theight: element.height() * y,\n\t\t\twidth: element.width() * x,\n\t\t\touterHeight: element.outerHeight() * y,\n\t\t\touterWidth: element.outerWidth() * x\n\t\t};\n\n\t},\n\n\tclipToBox: function( animation ) {\n\t\treturn {\n\t\t\twidth: animation.clip.right - animation.clip.left,\n\t\t\theight: animation.clip.bottom - animation.clip.top,\n\t\t\tleft: animation.clip.left,\n\t\t\ttop: animation.clip.top\n\t\t};\n\t},\n\n\t// Injects recently queued functions to be first in line (after \"inprogress\")\n\tunshift: function( element, queueLength, count ) {\n\t\tvar queue = element.queue();\n\n\t\tif ( queueLength > 1 ) {\n\t\t\tqueue.splice.apply( queue,\n\t\t\t\t[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );\n\t\t}\n\t\telement.dequeue();\n\t},\n\n\tsaveStyle: function( element ) {\n\t\telement.data( dataSpaceStyle, element[ 0 ].style.cssText );\n\t},\n\n\trestoreStyle: function( element ) {\n\t\telement[ 0 ].style.cssText = element.data( dataSpaceStyle ) || \"\";\n\t\telement.removeData( dataSpaceStyle );\n\t},\n\n\tmode: function( element, mode ) {\n\t\tvar hidden = element.is( \":hidden\" );\n\n\t\tif ( mode === \"toggle\" ) {\n\t\t\tmode = hidden ? \"show\" : \"hide\";\n\t\t}\n\t\tif ( hidden ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\tmode = \"none\";\n\t\t}\n\t\treturn mode;\n\t},\n\n\t// Translates a [top,left] array into a baseline value\n\tgetBaseline: function( origin, original ) {\n\t\tvar y, x;\n\n\t\tswitch ( origin[ 0 ] ) {\n\t\tcase \"top\":\n\t\t\ty = 0;\n\t\t\tbreak;\n\t\tcase \"middle\":\n\t\t\ty = 0.5;\n\t\t\tbreak;\n\t\tcase \"bottom\":\n\t\t\ty = 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ty = origin[ 0 ] / original.height;\n\t\t}\n\n\t\tswitch ( origin[ 1 ] ) {\n\t\tcase \"left\":\n\t\t\tx = 0;\n\t\t\tbreak;\n\t\tcase \"center\":\n\t\t\tx = 0.5;\n\t\t\tbreak;\n\t\tcase \"right\":\n\t\t\tx = 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tx = origin[ 1 ] / original.width;\n\t\t}\n\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t},\n\n\t// Creates a placeholder element so that the original element can be made absolute\n\tcreatePlaceholder: function( element ) {\n\t\tvar placeholder,\n\t\t\tcssPosition = element.css( \"position\" ),\n\t\t\tposition = element.position();\n\n\t\t// Lock in margins first to account for form elements, which\n\t\t// will change margin if you explicitly set height\n\t\t// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380\n\t\t// Support: Safari\n\t\telement.css( {\n\t\t\tmarginTop: element.css( \"marginTop\" ),\n\t\t\tmarginBottom: element.css( \"marginBottom\" ),\n\t\t\tmarginLeft: element.css( \"marginLeft\" ),\n\t\t\tmarginRight: element.css( \"marginRight\" )\n\t\t} )\n\t\t.outerWidth( element.outerWidth() )\n\t\t.outerHeight( element.outerHeight() );\n\n\t\tif ( /^(static|relative)/.test( cssPosition ) ) {\n\t\t\tcssPosition = \"absolute\";\n\n\t\t\tplaceholder = $( \"<\" + element[ 0 ].nodeName + \">\" ).insertAfter( element ).css( {\n\n\t\t\t\t// Convert inline to inline block to account for inline elements\n\t\t\t\t// that turn to inline block based on content (like img)\n\t\t\t\tdisplay: /^(inline|ruby)/.test( element.css( \"display\" ) ) ?\n\t\t\t\t\t\"inline-block\" :\n\t\t\t\t\t\"block\",\n\t\t\t\tvisibility: \"hidden\",\n\n\t\t\t\t// Margins need to be set to account for margin collapse\n\t\t\t\tmarginTop: element.css( \"marginTop\" ),\n\t\t\t\tmarginBottom: element.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: element.css( \"marginLeft\" ),\n\t\t\t\tmarginRight: element.css( \"marginRight\" ),\n\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t} )\n\t\t\t.outerWidth( element.outerWidth() )\n\t\t\t.outerHeight( element.outerHeight() )\n\t\t\t.addClass( \"ui-effects-placeholder\" );\n\n\t\t\telement.data( dataSpace + \"placeholder\", placeholder );\n\t\t}\n\n\t\telement.css( {\n\t\t\tposition: cssPosition,\n\t\t\tleft: position.left,\n\t\t\ttop: position.top\n\t\t} );\n\n\t\treturn placeholder;\n\t},\n\n\tremovePlaceholder: function( element ) {\n\t\tvar dataKey = dataSpace + \"placeholder\",\n\t\t\t\tplaceholder = element.data( dataKey );\n\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.remove();\n\t\t\telement.removeData( dataKey );\n\t\t}\n\t},\n\n\t// Removes a placeholder if it exists and restores\n\t// properties that were modified during placeholder creation\n\tcleanUp: function( element ) {\n\t\t$.effects.restoreStyle( element );\n\t\t$.effects.removePlaceholder( element );\n\t},\n\n\tsetTransition: function( element, list, factor, value ) {\n\t\tvalue = value || {};\n\t\t$.each( list, function( i, x ) {\n\t\t\tvar unit = element.cssUnit( x );\n\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t}\n\t\t} );\n\t\treturn value;\n\t}\n} );\n\n// Return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n\t// Allow passing all options as the first parameter\n\tif ( $.isPlainObject( effect ) ) {\n\t\toptions = effect;\n\t\teffect = effect.effect;\n\t}\n\n\t// Convert to an object\n\teffect = { effect: effect };\n\n\t// Catch (effect, null, ...)\n\tif ( options == null ) {\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, callback)\n\tif ( $.isFunction( options ) ) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, speed, ?)\n\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\n\t// Catch (effect, options, callback)\n\tif ( $.isFunction( speed ) ) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\t// Add options to effect\n\tif ( options ) {\n\t\t$.extend( effect, options );\n\t}\n\n\tspeed = speed || options.duration;\n\teffect.duration = $.fx.off ? 0 :\n\t\ttypeof speed === \"number\" ? speed :\n\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t$.fx.speeds._default;\n\n\teffect.complete = callback || options.complete;\n\n\treturn effect;\n}\n\nfunction standardAnimationOption( option ) {\n\n\t// Valid standard speeds (nothing, number, named speed)\n\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Invalid strings - treat as \"normal\" speed\n\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Complete callback\n\tif ( $.isFunction( option ) ) {\n\t\treturn true;\n\t}\n\n\t// Options hash (but not naming an effect)\n\tif ( typeof option === \"object\" && !option.effect ) {\n\t\treturn true;\n\t}\n\n\t// Didn't match any standard API\n\treturn false;\n}\n\n$.fn.extend( {\n\teffect: function( /* effect, options, speed, callback */ ) {\n\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\teffectMethod = $.effects.effect[ args.effect ],\n\t\t\tdefaultMode = effectMethod.mode,\n\t\t\tqueue = args.queue,\n\t\t\tqueueName = queue || \"fx\",\n\t\t\tcomplete = args.complete,\n\t\t\tmode = args.mode,\n\t\t\tmodes = [],\n\t\t\tprefilter = function( next ) {\n\t\t\t\tvar el = $( this ),\n\t\t\t\t\tnormalizedMode = $.effects.mode( el, mode ) || defaultMode;\n\n\t\t\t\t// Sentinel for duck-punching the :animated psuedo-selector\n\t\t\t\tel.data( dataSpaceAnimated, true );\n\n\t\t\t\t// Save effect mode for later use,\n\t\t\t\t// we can't just call $.effects.mode again later,\n\t\t\t\t// as the .show() below destroys the initial state\n\t\t\t\tmodes.push( normalizedMode );\n\n\t\t\t\t// See $.uiBackCompat inside of run() for removal of defaultMode in 1.13\n\t\t\t\tif ( defaultMode && ( normalizedMode === \"show\" ||\n\t\t\t\t\t\t( normalizedMode === defaultMode && normalizedMode === \"hide\" ) ) ) {\n\t\t\t\t\tel.show();\n\t\t\t\t}\n\n\t\t\t\tif ( !defaultMode || normalizedMode !== \"none\" ) {\n\t\t\t\t\t$.effects.saveStyle( el );\n\t\t\t\t}\n\n\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( $.fx.off || !effectMethod ) {\n\n\t\t\t// Delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args.duration, complete );\n\t\t\t} else {\n\t\t\t\treturn this.each( function() {\n\t\t\t\t\tif ( complete ) {\n\t\t\t\t\t\tcomplete.call( this );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tfunction run( next ) {\n\t\t\tvar elem = $( this );\n\n\t\t\tfunction cleanup() {\n\t\t\t\telem.removeData( dataSpaceAnimated );\n\n\t\t\t\t$.effects.cleanUp( elem );\n\n\t\t\t\tif ( args.mode === \"hide\" ) {\n\t\t\t\t\telem.hide();\n\t\t\t\t}\n\n\t\t\t\tdone();\n\t\t\t}\n\n\t\t\tfunction done() {\n\t\t\t\tif ( $.isFunction( complete ) ) {\n\t\t\t\t\tcomplete.call( elem[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override mode option on a per element basis,\n\t\t\t// as toggle can be either show or hide depending on element state\n\t\t\targs.mode = modes.shift();\n\n\t\t\tif ( $.uiBackCompat !== false && !defaultMode ) {\n\t\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\n\t\t\t\t\t// Call the core method to track \"olddisplay\" properly\n\t\t\t\t\telem[ mode ]();\n\t\t\t\t\tdone();\n\t\t\t\t} else {\n\t\t\t\t\teffectMethod.call( elem[ 0 ], args, done );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( args.mode === \"none\" ) {\n\n\t\t\t\t\t// Call the core method to track \"olddisplay\" properly\n\t\t\t\t\telem[ mode ]();\n\t\t\t\t\tdone();\n\t\t\t\t} else {\n\t\t\t\t\teffectMethod.call( elem[ 0 ], args, cleanup );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Run prefilter on all elements first to ensure that\n\t\t// any showing or hiding happens before placeholder creation,\n\t\t// which ensures that any layout changes are correctly captured.\n\t\treturn queue === false ?\n\t\t\tthis.each( prefilter ).each( run ) :\n\t\t\tthis.queue( queueName, prefilter ).queue( queueName, run );\n\t},\n\n\tshow: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"show\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.show ),\n\n\thide: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"hide\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.hide ),\n\n\ttoggle: ( function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"toggle\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t} )( $.fn.toggle ),\n\n\tcssUnit: function( key ) {\n\t\tvar style = this.css( key ),\n\t\t\tval = [];\n\n\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t}\n\t\t} );\n\t\treturn val;\n\t},\n\n\tcssClip: function( clipObj ) {\n\t\tif ( clipObj ) {\n\t\t\treturn this.css( \"clip\", \"rect(\" + clipObj.top + \"px \" + clipObj.right + \"px \" +\n\t\t\t\tclipObj.bottom + \"px \" + clipObj.left + \"px)\" );\n\t\t}\n\t\treturn parseClip( this.css( \"clip\" ), this );\n\t},\n\n\ttransfer: function( options, done ) {\n\t\tvar element = $( this ),\n\t\t\ttarget = $( options.to ),\n\t\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\t\tbody = $( \"body\" ),\n\t\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\t\tendPosition = target.offset(),\n\t\t\tanimation = {\n\t\t\t\ttop: endPosition.top - fixTop,\n\t\t\t\tleft: endPosition.left - fixLeft,\n\t\t\t\theight: target.innerHeight(),\n\t\t\t\twidth: target.innerWidth()\n\t\t\t},\n\t\t\tstartPosition = element.offset(),\n\t\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" )\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.addClass( options.className )\n\t\t\t\t.css( {\n\t\t\t\t\ttop: startPosition.top - fixTop,\n\t\t\t\t\tleft: startPosition.left - fixLeft,\n\t\t\t\t\theight: element.innerHeight(),\n\t\t\t\t\twidth: element.innerWidth(),\n\t\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t\t} )\n\t\t\t\t.animate( animation, options.duration, options.easing, function() {\n\t\t\t\t\ttransfer.remove();\n\t\t\t\t\tif ( $.isFunction( done ) ) {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t}\n} );\n\nfunction parseClip( str, element ) {\n\t\tvar outerWidth = element.outerWidth(),\n\t\t\touterHeight = element.outerHeight(),\n\t\t\tclipRegex = /^rect\\((-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto)\\)$/,\n\t\t\tvalues = clipRegex.exec( str ) || [ \"\", 0, outerWidth, outerHeight, 0 ];\n\n\t\treturn {\n\t\t\ttop: parseFloat( values[ 1 ] ) || 0,\n\t\t\tright: values[ 2 ] === \"auto\" ? outerWidth : parseFloat( values[ 2 ] ),\n\t\t\tbottom: values[ 3 ] === \"auto\" ? outerHeight : parseFloat( values[ 3 ] ),\n\t\t\tleft: parseFloat( values[ 4 ] ) || 0\n\t\t};\n}\n\n$.fx.step.clip = function( fx ) {\n\tif ( !fx.clipInit ) {\n\t\tfx.start = $( fx.elem ).cssClip();\n\t\tif ( typeof fx.end === \"string\" ) {\n\t\t\tfx.end = parseClip( fx.end, fx.elem );\n\t\t}\n\t\tfx.clipInit = true;\n\t}\n\n\t$( fx.elem ).cssClip( {\n\t\ttop: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,\n\t\tright: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,\n\t\tbottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,\n\t\tleft: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left\n\t} );\n};\n\n} )();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n( function() {\n\n// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\tbaseEasings[ name ] = function( p ) {\n\t\treturn Math.pow( p, i + 2 );\n\t};\n} );\n\n$.extend( baseEasings, {\n\tSine: function( p ) {\n\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t},\n\tCirc: function( p ) {\n\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t},\n\tElastic: function( p ) {\n\t\treturn p === 0 || p === 1 ? p :\n\t\t\t-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );\n\t},\n\tBack: function( p ) {\n\t\treturn p * p * ( 3 * p - 2 );\n\t},\n\tBounce: function( p ) {\n\t\tvar pow2,\n\t\t\tbounce = 4;\n\n\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t}\n} );\n\n$.each( baseEasings, function( name, easeIn ) {\n\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\treturn 1 - easeIn( 1 - p );\n\t};\n\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\treturn p < 0.5 ?\n\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t};\n} );\n\n} )();\n\nvar effect = $.effects;\n\n\n/*!\n * jQuery UI Effects Blind 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Blind Effect\n//>>group: Effects\n//>>description: Blinds the element.\n//>>docs: http://api.jqueryui.com/blind-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectBlind = $.effects.define( \"blind\", \"hide\", function( options, done ) {\n\tvar map = {\n\t\t\tup: [ \"bottom\", \"top\" ],\n\t\t\tvertical: [ \"bottom\", \"top\" ],\n\t\t\tdown: [ \"top\", \"bottom\" ],\n\t\t\tleft: [ \"right\", \"left\" ],\n\t\t\thorizontal: [ \"right\", \"left\" ],\n\t\t\tright: [ \"left\", \"right\" ]\n\t\t},\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"up\",\n\t\tstart = element.cssClip(),\n\t\tanimate = { clip: $.extend( {}, start ) },\n\t\tplaceholder = $.effects.createPlaceholder( element );\n\n\tanimate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];\n\n\tif ( options.mode === \"show\" ) {\n\t\telement.cssClip( animate.clip );\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.css( $.effects.clipToBox( animate ) );\n\t\t}\n\n\t\tanimate.clip = start;\n\t}\n\n\tif ( placeholder ) {\n\t\tplaceholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );\n\t}\n\n\telement.animate( animate, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n\n/*!\n * jQuery UI Effects Bounce 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Bounce Effect\n//>>group: Effects\n//>>description: Bounces an element horizontally or vertically n times.\n//>>docs: http://api.jqueryui.com/bounce-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectBounce = $.effects.define( \"bounce\", function( options, done ) {\n\tvar upAnim, downAnim, refValue,\n\t\telement = $( this ),\n\n\t\t// Defaults:\n\t\tmode = options.mode,\n\t\thide = mode === \"hide\",\n\t\tshow = mode === \"show\",\n\t\tdirection = options.direction || \"up\",\n\t\tdistance = options.distance,\n\t\ttimes = options.times || 5,\n\n\t\t// Number of internal animations\n\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\tspeed = options.duration / anims,\n\t\teasing = options.easing,\n\n\t\t// Utility:\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\ti = 0,\n\n\t\tqueuelen = element.queue().length;\n\n\t$.effects.createPlaceholder( element );\n\n\trefValue = element.css( ref );\n\n\t// Default distance for the BIGGEST bounce is the outer Distance / 3\n\tif ( !distance ) {\n\t\tdistance = element[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t}\n\n\tif ( show ) {\n\t\tdownAnim = { opacity: 1 };\n\t\tdownAnim[ ref ] = refValue;\n\n\t\t// If we are showing, force opacity 0 and set the initial position\n\t\t// then do the \"first\" animation\n\t\telement\n\t\t\t.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t.animate( downAnim, speed, easing );\n\t}\n\n\t// Start at the smallest distance if we are hiding\n\tif ( hide ) {\n\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t}\n\n\tdownAnim = {};\n\tdownAnim[ ref ] = refValue;\n\n\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\tfor ( ; i < times; i++ ) {\n\t\tupAnim = {};\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\telement\n\t\t\t.animate( upAnim, speed, easing )\n\t\t\t.animate( downAnim, speed, easing );\n\n\t\tdistance = hide ? distance * 2 : distance / 2;\n\t}\n\n\t// Last Bounce when Hiding\n\tif ( hide ) {\n\t\tupAnim = { opacity: 0 };\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\telement.animate( upAnim, speed, easing );\n\t}\n\n\telement.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n\n/*!\n * jQuery UI Effects Clip 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Clip Effect\n//>>group: Effects\n//>>description: Clips the element on and off like an old TV.\n//>>docs: http://api.jqueryui.com/clip-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectClip = $.effects.define( \"clip\", \"hide\", function( options, done ) {\n\tvar start,\n\t\tanimate = {},\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"vertical\",\n\t\tboth = direction === \"both\",\n\t\thorizontal = both || direction === \"horizontal\",\n\t\tvertical = both || direction === \"vertical\";\n\n\tstart = element.cssClip();\n\tanimate.clip = {\n\t\ttop: vertical ? ( start.bottom - start.top ) / 2 : start.top,\n\t\tright: horizontal ? ( start.right - start.left ) / 2 : start.right,\n\t\tbottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,\n\t\tleft: horizontal ? ( start.right - start.left ) / 2 : start.left\n\t};\n\n\t$.effects.createPlaceholder( element );\n\n\tif ( options.mode === \"show\" ) {\n\t\telement.cssClip( animate.clip );\n\t\tanimate.clip = start;\n\t}\n\n\telement.animate( animate, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n\n} );\n\n\n/*!\n * jQuery UI Effects Drop 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Drop Effect\n//>>group: Effects\n//>>description: Moves an element in one direction and hides it at the same time.\n//>>docs: http://api.jqueryui.com/drop-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectDrop = $.effects.define( \"drop\", \"hide\", function( options, done ) {\n\n\tvar distance,\n\t\telement = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\tdirection = options.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"-=\" : \"+=\",\n\t\toppositeMotion = ( motion === \"+=\" ) ? \"-=\" : \"+=\",\n\t\tanimation = {\n\t\t\topacity: 0\n\t\t};\n\n\t$.effects.createPlaceholder( element );\n\n\tdistance = options.distance ||\n\t\telement[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true ) / 2;\n\n\tanimation[ ref ] = motion + distance;\n\n\tif ( show ) {\n\t\telement.css( animation );\n\n\t\tanimation[ ref ] = oppositeMotion + distance;\n\t\tanimation.opacity = 1;\n\t}\n\n\t// Animate\n\telement.animate( animation, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n\n/*!\n * jQuery UI Effects Explode 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Explode Effect\n//>>group: Effects\n// jscs:disable maximumLineLength\n//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.\n// jscs:enable maximumLineLength\n//>>docs: http://api.jqueryui.com/explode-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectExplode = $.effects.define( \"explode\", \"hide\", function( options, done ) {\n\n\tvar i, j, left, top, mx, my,\n\t\trows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,\n\t\tcells = rows,\n\t\telement = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\n\t\t// Show and then visibility:hidden the element before calculating offset\n\t\toffset = element.show().css( \"visibility\", \"hidden\" ).offset(),\n\n\t\t// Width and height of a piece\n\t\twidth = Math.ceil( element.outerWidth() / cells ),\n\t\theight = Math.ceil( element.outerHeight() / rows ),\n\t\tpieces = [];\n\n\t// Children animate complete:\n\tfunction childComplete() {\n\t\tpieces.push( this );\n\t\tif ( pieces.length === rows * cells ) {\n\t\t\tanimComplete();\n\t\t}\n\t}\n\n\t// Clone the element for each row and cell.\n\tfor ( i = 0; i < rows; i++ ) { // ===>\n\t\ttop = offset.top + i * height;\n\t\tmy = i - ( rows - 1 ) / 2;\n\n\t\tfor ( j = 0; j < cells; j++ ) { // |||\n\t\t\tleft = offset.left + j * width;\n\t\t\tmx = j - ( cells - 1 ) / 2;\n\n\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\telement\n\t\t\t\t.clone()\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\tleft: -j * width,\n\t\t\t\t\ttop: -i * height\n\t\t\t\t} )\n\n\t\t\t\t// Select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t.parent()\n\t\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t\t.css( {\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t\t} )\n\t\t\t\t\t.animate( {\n\t\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t\t}, options.duration || 500, options.easing, childComplete );\n\t\t}\n\t}\n\n\tfunction animComplete() {\n\t\telement.css( {\n\t\t\tvisibility: \"visible\"\n\t\t} );\n\t\t$( pieces ).remove();\n\t\tdone();\n\t}\n} );\n\n\n/*!\n * jQuery UI Effects Fade 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Fade Effect\n//>>group: Effects\n//>>description: Fades the element.\n//>>docs: http://api.jqueryui.com/fade-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectFade = $.effects.define( \"fade\", \"toggle\", function( options, done ) {\n\tvar show = options.mode === \"show\";\n\n\t$( this )\n\t\t.css( \"opacity\", show ? 0 : 1 )\n\t\t.animate( {\n\t\t\topacity: show ? 1 : 0\n\t\t}, {\n\t\t\tqueue: false,\n\t\t\tduration: options.duration,\n\t\t\teasing: options.easing,\n\t\t\tcomplete: done\n\t\t} );\n} );\n\n\n/*!\n * jQuery UI Effects Fold 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Fold Effect\n//>>group: Effects\n//>>description: Folds an element first horizontally and then vertically.\n//>>docs: http://api.jqueryui.com/fold-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectFold = $.effects.define( \"fold\", \"hide\", function( options, done ) {\n\n\t// Create element\n\tvar element = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tsize = options.size || 15,\n\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\thorizFirst = !!options.horizFirst,\n\t\tref = horizFirst ? [ \"right\", \"bottom\" ] : [ \"bottom\", \"right\" ],\n\t\tduration = options.duration / 2,\n\n\t\tplaceholder = $.effects.createPlaceholder( element ),\n\n\t\tstart = element.cssClip(),\n\t\tanimation1 = { clip: $.extend( {}, start ) },\n\t\tanimation2 = { clip: $.extend( {}, start ) },\n\n\t\tdistance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],\n\n\t\tqueuelen = element.queue().length;\n\n\tif ( percent ) {\n\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t}\n\tanimation1.clip[ ref[ 0 ] ] = size;\n\tanimation2.clip[ ref[ 0 ] ] = size;\n\tanimation2.clip[ ref[ 1 ] ] = 0;\n\n\tif ( show ) {\n\t\telement.cssClip( animation2.clip );\n\t\tif ( placeholder ) {\n\t\t\tplaceholder.css( $.effects.clipToBox( animation2 ) );\n\t\t}\n\n\t\tanimation2.clip = start;\n\t}\n\n\t// Animate\n\telement\n\t\t.queue( function( next ) {\n\t\t\tif ( placeholder ) {\n\t\t\t\tplaceholder\n\t\t\t\t\t.animate( $.effects.clipToBox( animation1 ), duration, options.easing )\n\t\t\t\t\t.animate( $.effects.clipToBox( animation2 ), duration, options.easing );\n\t\t\t}\n\n\t\t\tnext();\n\t\t} )\n\t\t.animate( animation1, duration, options.easing )\n\t\t.animate( animation2, duration, options.easing )\n\t\t.queue( done );\n\n\t$.effects.unshift( element, queuelen, 4 );\n} );\n\n\n/*!\n * jQuery UI Effects Highlight 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Highlight Effect\n//>>group: Effects\n//>>description: Highlights the background of an element in a defined color for a custom duration.\n//>>docs: http://api.jqueryui.com/highlight-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectHighlight = $.effects.define( \"highlight\", \"show\", function( options, done ) {\n\tvar element = $( this ),\n\t\tanimation = {\n\t\t\tbackgroundColor: element.css( \"backgroundColor\" )\n\t\t};\n\n\tif ( options.mode === \"hide\" ) {\n\t\tanimation.opacity = 0;\n\t}\n\n\t$.effects.saveStyle( element );\n\n\telement\n\t\t.css( {\n\t\t\tbackgroundImage: \"none\",\n\t\t\tbackgroundColor: options.color || \"#ffff99\"\n\t\t} )\n\t\t.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: options.duration,\n\t\t\teasing: options.easing,\n\t\t\tcomplete: done\n\t\t} );\n} );\n\n\n/*!\n * jQuery UI Effects Size 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Size Effect\n//>>group: Effects\n//>>description: Resize an element to a specified width and height.\n//>>docs: http://api.jqueryui.com/size-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectSize = $.effects.define( \"size\", function( options, done ) {\n\n\t// Create element\n\tvar baseline, factor, temp,\n\t\telement = $( this ),\n\n\t\t// Copy for children\n\t\tcProps = [ \"fontSize\" ],\n\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\n\t\t// Set options\n\t\tmode = options.mode,\n\t\trestore = mode !== \"effect\",\n\t\tscale = options.scale || \"both\",\n\t\torigin = options.origin || [ \"middle\", \"center\" ],\n\t\tposition = element.css( \"position\" ),\n\t\tpos = element.position(),\n\t\toriginal = $.effects.scaledDimensions( element ),\n\t\tfrom = options.from || original,\n\t\tto = options.to || $.effects.scaledDimensions( element, 0 );\n\n\t$.effects.createPlaceholder( element );\n\n\tif ( mode === \"show\" ) {\n\t\ttemp = from;\n\t\tfrom = to;\n\t\tto = temp;\n\t}\n\n\t// Set scaling factor\n\tfactor = {\n\t\tfrom: {\n\t\t\ty: from.height / original.height,\n\t\t\tx: from.width / original.width\n\t\t},\n\t\tto: {\n\t\t\ty: to.height / original.height,\n\t\t\tx: to.width / original.width\n\t\t}\n\t};\n\n\t// Scale the css box\n\tif ( scale === \"box\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tfrom = $.effects.setTransition( element, vProps, factor.from.y, from );\n\t\t\tto = $.effects.setTransition( element, vProps, factor.to.y, to );\n\t\t}\n\n\t\t// Horizontal props scaling\n\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\tfrom = $.effects.setTransition( element, hProps, factor.from.x, from );\n\t\t\tto = $.effects.setTransition( element, hProps, factor.to.x, to );\n\t\t}\n\t}\n\n\t// Scale the content\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tfrom = $.effects.setTransition( element, cProps, factor.from.y, from );\n\t\t\tto = $.effects.setTransition( element, cProps, factor.to.y, to );\n\t\t}\n\t}\n\n\t// Adjust the position properties based on the provided origin points\n\tif ( origin ) {\n\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\tfrom.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;\n\t\tfrom.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;\n\t\tto.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;\n\t\tto.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;\n\t}\n\telement.css( from );\n\n\t// Animate the children if desired\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\tvProps = vProps.concat( [ \"marginTop\", \"marginBottom\" ] ).concat( cProps );\n\t\thProps = hProps.concat( [ \"marginLeft\", \"marginRight\" ] );\n\n\t\t// Only animate children with width attributes specified\n\t\t// TODO: is this right? should we include anything with css width specified as well\n\t\telement.find( \"*[width]\" ).each( function() {\n\t\t\tvar child = $( this ),\n\t\t\t\tchildOriginal = $.effects.scaledDimensions( child ),\n\t\t\t\tchildFrom = {\n\t\t\t\t\theight: childOriginal.height * factor.from.y,\n\t\t\t\t\twidth: childOriginal.width * factor.from.x,\n\t\t\t\t\touterHeight: childOriginal.outerHeight * factor.from.y,\n\t\t\t\t\touterWidth: childOriginal.outerWidth * factor.from.x\n\t\t\t\t},\n\t\t\t\tchildTo = {\n\t\t\t\t\theight: childOriginal.height * factor.to.y,\n\t\t\t\t\twidth: childOriginal.width * factor.to.x,\n\t\t\t\t\touterHeight: childOriginal.height * factor.to.y,\n\t\t\t\t\touterWidth: childOriginal.width * factor.to.x\n\t\t\t\t};\n\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tchildFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );\n\t\t\t\tchildTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );\n\t\t\t}\n\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tchildFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );\n\t\t\t\tchildTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );\n\t\t\t}\n\n\t\t\tif ( restore ) {\n\t\t\t\t$.effects.saveStyle( child );\n\t\t\t}\n\n\t\t\t// Animate children\n\t\t\tchild.css( childFrom );\n\t\t\tchild.animate( childTo, options.duration, options.easing, function() {\n\n\t\t\t\t// Restore children\n\t\t\t\tif ( restore ) {\n\t\t\t\t\t$.effects.restoreStyle( child );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Animate\n\telement.animate( to, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: function() {\n\n\t\t\tvar offset = element.offset();\n\n\t\t\tif ( to.opacity === 0 ) {\n\t\t\t\telement.css( \"opacity\", from.opacity );\n\t\t\t}\n\n\t\t\tif ( !restore ) {\n\t\t\t\telement\n\t\t\t\t\t.css( \"position\", position === \"static\" ? \"relative\" : position )\n\t\t\t\t\t.offset( offset );\n\n\t\t\t\t// Need to save style here so that automatic style restoration\n\t\t\t\t// doesn't restore to the original styles from before the animation.\n\t\t\t\t$.effects.saveStyle( element );\n\t\t\t}\n\n\t\t\tdone();\n\t\t}\n\t} );\n\n} );\n\n\n/*!\n * jQuery UI Effects Scale 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Scale Effect\n//>>group: Effects\n//>>description: Grows or shrinks an element and its content.\n//>>docs: http://api.jqueryui.com/scale-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectScale = $.effects.define( \"scale\", function( options, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tmode = options.mode,\n\t\tpercent = parseInt( options.percent, 10 ) ||\n\t\t\t( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== \"effect\" ? 0 : 100 ) ),\n\n\t\tnewOptions = $.extend( true, {\n\t\t\tfrom: $.effects.scaledDimensions( el ),\n\t\t\tto: $.effects.scaledDimensions( el, percent, options.direction || \"both\" ),\n\t\t\torigin: options.origin || [ \"middle\", \"center\" ]\n\t\t}, options );\n\n\t// Fade option to support puff\n\tif ( options.fade ) {\n\t\tnewOptions.from.opacity = 1;\n\t\tnewOptions.to.opacity = 0;\n\t}\n\n\t$.effects.effect.size.call( this, newOptions, done );\n} );\n\n\n/*!\n * jQuery UI Effects Puff 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Puff Effect\n//>>group: Effects\n//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.\n//>>docs: http://api.jqueryui.com/puff-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectPuff = $.effects.define( \"puff\", \"hide\", function( options, done ) {\n\tvar newOptions = $.extend( true, {}, options, {\n\t\tfade: true,\n\t\tpercent: parseInt( options.percent, 10 ) || 150\n\t} );\n\n\t$.effects.effect.scale.call( this, newOptions, done );\n} );\n\n\n/*!\n * jQuery UI Effects Pulsate 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Pulsate Effect\n//>>group: Effects\n//>>description: Pulsates an element n times by changing the opacity to zero and back.\n//>>docs: http://api.jqueryui.com/pulsate-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectPulsate = $.effects.define( \"pulsate\", \"show\", function( options, done ) {\n\tvar element = $( this ),\n\t\tmode = options.mode,\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tshowhide = show || hide,\n\n\t\t// Showing or hiding leaves off the \"last\" animation\n\t\tanims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\tduration = options.duration / anims,\n\t\tanimateTo = 0,\n\t\ti = 1,\n\t\tqueuelen = element.queue().length;\n\n\tif ( show || !element.is( \":visible\" ) ) {\n\t\telement.css( \"opacity\", 0 ).show();\n\t\tanimateTo = 1;\n\t}\n\n\t// Anims - 1 opacity \"toggles\"\n\tfor ( ; i < anims; i++ ) {\n\t\telement.animate( { opacity: animateTo }, duration, options.easing );\n\t\tanimateTo = 1 - animateTo;\n\t}\n\n\telement.animate( { opacity: animateTo }, duration, options.easing );\n\n\telement.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n\n/*!\n * jQuery UI Effects Shake 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Shake Effect\n//>>group: Effects\n//>>description: Shakes an element horizontally or vertically n times.\n//>>docs: http://api.jqueryui.com/shake-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectShake = $.effects.define( \"shake\", function( options, done ) {\n\n\tvar i = 1,\n\t\telement = $( this ),\n\t\tdirection = options.direction || \"left\",\n\t\tdistance = options.distance || 20,\n\t\ttimes = options.times || 3,\n\t\tanims = times * 2 + 1,\n\t\tspeed = Math.round( options.duration / anims ),\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tpositiveMotion = ( direction === \"up\" || direction === \"left\" ),\n\t\tanimation = {},\n\t\tanimation1 = {},\n\t\tanimation2 = {},\n\n\t\tqueuelen = element.queue().length;\n\n\t$.effects.createPlaceholder( element );\n\n\t// Animation\n\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\n\t// Animate\n\telement.animate( animation, speed, options.easing );\n\n\t// Shakes\n\tfor ( ; i < times; i++ ) {\n\t\telement\n\t\t\t.animate( animation1, speed, options.easing )\n\t\t\t.animate( animation2, speed, options.easing );\n\t}\n\n\telement\n\t\t.animate( animation1, speed, options.easing )\n\t\t.animate( animation, speed / 2, options.easing )\n\t\t.queue( done );\n\n\t$.effects.unshift( element, queuelen, anims + 1 );\n} );\n\n\n/*!\n * jQuery UI Effects Slide 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Slide Effect\n//>>group: Effects\n//>>description: Slides an element in and out of the viewport.\n//>>docs: http://api.jqueryui.com/slide-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effectsEffectSlide = $.effects.define( \"slide\", \"show\", function( options, done ) {\n\tvar startClip, startRef,\n\t\telement = $( this ),\n\t\tmap = {\n\t\t\tup: [ \"bottom\", \"top\" ],\n\t\t\tdown: [ \"top\", \"bottom\" ],\n\t\t\tleft: [ \"right\", \"left\" ],\n\t\t\tright: [ \"left\", \"right\" ]\n\t\t},\n\t\tmode = options.mode,\n\t\tdirection = options.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tpositiveMotion = ( direction === \"up\" || direction === \"left\" ),\n\t\tdistance = options.distance ||\n\t\t\telement[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true ),\n\t\tanimation = {};\n\n\t$.effects.createPlaceholder( element );\n\n\tstartClip = element.cssClip();\n\tstartRef = element.position()[ ref ];\n\n\t// Define hide animation\n\tanimation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;\n\tanimation.clip = element.cssClip();\n\tanimation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];\n\n\t// Reverse the animation if we're showing\n\tif ( mode === \"show\" ) {\n\t\telement.cssClip( animation.clip );\n\t\telement.css( ref, animation[ ref ] );\n\t\tanimation.clip = startClip;\n\t\tanimation[ ref ] = startRef;\n\t}\n\n\t// Actually animate\n\telement.animate( animation, {\n\t\tqueue: false,\n\t\tduration: options.duration,\n\t\teasing: options.easing,\n\t\tcomplete: done\n\t} );\n} );\n\n\n/*!\n * jQuery UI Effects Transfer 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Transfer Effect\n//>>group: Effects\n//>>description: Displays a transfer effect from one element to another.\n//>>docs: http://api.jqueryui.com/transfer-effect/\n//>>demos: http://jqueryui.com/effect/\n\n\n\nvar effect;\nif ( $.uiBackCompat !== false ) {\n\teffect = $.effects.define( \"transfer\", function( options, done ) {\n\t\t$( this ).transfer( options, done );\n\t} );\n}\nvar effectsEffectTransfer = effect;\n\n\n/*!\n * jQuery UI Focusable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :focusable Selector\n//>>group: Core\n//>>description: Selects elements which can be focused.\n//>>docs: http://api.jqueryui.com/focusable-selector/\n\n\n\n// Selectors\n$.ui.focusable = function( element, hasTabindex ) {\n\tvar map, mapName, img, focusableIfVisible, fieldset,\n\t\tnodeName = element.nodeName.toLowerCase();\n\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap='#\" + mapName + \"']\" );\n\t\treturn img.length > 0 && img.is( \":visible\" );\n\t}\n\n\tif ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {\n\t\tfocusableIfVisible = !element.disabled;\n\n\t\tif ( focusableIfVisible ) {\n\n\t\t\t// Form controls within a disabled fieldset are disabled.\n\t\t\t// However, controls within the fieldset's legend do not get disabled.\n\t\t\t// Since controls generally aren't placed inside legends, we skip\n\t\t\t// this portion of the check.\n\t\t\tfieldset = $( element ).closest( \"fieldset\" )[ 0 ];\n\t\t\tif ( fieldset ) {\n\t\t\t\tfocusableIfVisible = !fieldset.disabled;\n\t\t\t}\n\t\t}\n\t} else if ( \"a\" === nodeName ) {\n\t\tfocusableIfVisible = element.href || hasTabindex;\n\t} else {\n\t\tfocusableIfVisible = hasTabindex;\n\t}\n\n\treturn focusableIfVisible && $( element ).is( \":visible\" ) && visible( $( element ) );\n};\n\n// Support: IE 8 only\n// IE 8 doesn't resolve inherit to visible/hidden for computed values\nfunction visible( element ) {\n\tvar visibility = element.css( \"visibility\" );\n\twhile ( visibility === \"inherit\" ) {\n\t\telement = element.parent();\n\t\tvisibility = element.css( \"visibility\" );\n\t}\n\treturn visibility !== \"hidden\";\n}\n\n$.extend( $.expr[ \":\" ], {\n\tfocusable: function( element ) {\n\t\treturn $.ui.focusable( element, $.attr( element, \"tabindex\" ) != null );\n\t}\n} );\n\nvar focusable = $.ui.focusable;\n\n\n\n\n// Support: IE8 Only\n// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop\n// with a string, so we need to find the proper form.\nvar form = $.fn.form = function() {\n\treturn typeof this[ 0 ].form === \"string\" ? this.closest( \"form\" ) : $( this[ 0 ].form );\n};\n\n\n/*!\n * jQuery UI Form Reset Mixin 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Form Reset Mixin\n//>>group: Core\n//>>description: Refresh input widgets when their form is reset\n//>>docs: http://api.jqueryui.com/form-reset-mixin/\n\n\n\nvar formResetMixin = $.ui.formResetMixin = {\n\t_formResetHandler: function() {\n\t\tvar form = $( this );\n\n\t\t// Wait for the form reset to actually happen before refreshing\n\t\tsetTimeout( function() {\n\t\t\tvar instances = form.data( \"ui-form-reset-instances\" );\n\t\t\t$.each( instances, function() {\n\t\t\t\tthis.refresh();\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_bindFormResetHandler: function() {\n\t\tthis.form = this.element.form();\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" ) || [];\n\t\tif ( !instances.length ) {\n\n\t\t\t// We don't use _on() here because we use a single event handler per form\n\t\t\tthis.form.on( \"reset.ui-form-reset\", this._formResetHandler );\n\t\t}\n\t\tinstances.push( this );\n\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t},\n\n\t_unbindFormResetHandler: function() {\n\t\tif ( !this.form.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar instances = this.form.data( \"ui-form-reset-instances\" );\n\t\tinstances.splice( $.inArray( this, instances ), 1 );\n\t\tif ( instances.length ) {\n\t\t\tthis.form.data( \"ui-form-reset-instances\", instances );\n\t\t} else {\n\t\t\tthis.form\n\t\t\t\t.removeData( \"ui-form-reset-instances\" )\n\t\t\t\t.off( \"reset.ui-form-reset\" );\n\t\t}\n\t}\n};\n\n\n/*!\n * jQuery UI Support for jQuery core 1.7.x 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n */\n\n//>>label: jQuery 1.7 Support\n//>>group: Core\n//>>description: Support version 1.7.x of jQuery core\n\n\n\n// Support: jQuery 1.7 only\n// Not a great way to check versions, but since we only support 1.7+ and only\n// need to detect <1.8, this is a simple check that should suffice. Checking\n// for \"1.7.\" would be a bit safer, but the version string is 1.7, not 1.7.0\n// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting\n// 1.7 anymore). See #11197 for why we're not using feature detection.\nif ( $.fn.jquery.substring( 0, 3 ) === \"1.7\" ) {\n\n\t// Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()\n\t// Unlike jQuery Core 1.8+, these only support numeric values to set the\n\t// dimensions in pixels\n\t$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\t\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\t\ttype = name.toLowerCase(),\n\t\t\torig = {\n\t\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\t\touterWidth: $.fn.outerWidth,\n\t\t\t\touterHeight: $.fn.outerHeight\n\t\t\t};\n\n\t\tfunction reduce( elem, size, border, margin ) {\n\t\t\t$.each( side, function() {\n\t\t\t\tsize -= parseFloat( $.css( elem, \"padding\" + this ) ) || 0;\n\t\t\t\tif ( border ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"border\" + this + \"Width\" ) ) || 0;\n\t\t\t\t}\n\t\t\t\tif ( margin ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"margin\" + this ) ) || 0;\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn size;\n\t\t}\n\n\t\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\t\tif ( size === undefined ) {\n\t\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t\t}\n\n\t\t\treturn this.each( function() {\n\t\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t\t} );\n\t\t};\n\n\t\t$.fn[ \"outer\" + name ] = function( size, margin ) {\n\t\t\tif ( typeof size !== \"number\" ) {\n\t\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t\t}\n\n\t\t\treturn this.each( function() {\n\t\t\t\t$( this ).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t\t} );\n\t\t};\n\t} );\n\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n;\n/*!\n * jQuery UI Keycode 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Keycode\n//>>group: Core\n//>>description: Provide keycodes as keynames\n//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/\n\n\nvar keycode = $.ui.keyCode = {\n\tBACKSPACE: 8,\n\tCOMMA: 188,\n\tDELETE: 46,\n\tDOWN: 40,\n\tEND: 35,\n\tENTER: 13,\n\tESCAPE: 27,\n\tHOME: 36,\n\tLEFT: 37,\n\tPAGE_DOWN: 34,\n\tPAGE_UP: 33,\n\tPERIOD: 190,\n\tRIGHT: 39,\n\tSPACE: 32,\n\tTAB: 9,\n\tUP: 38\n};\n\n\n\n\n// Internal use only\nvar escapeSelector = $.ui.escapeSelector = ( function() {\n\tvar selectorEscape = /([!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~])/g;\n\treturn function( selector ) {\n\t\treturn selector.replace( selectorEscape, \"\\\\$1\" );\n\t};\n} )();\n\n\n/*!\n * jQuery UI Labels 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: labels\n//>>group: Core\n//>>description: Find all the labels associated with a given input\n//>>docs: http://api.jqueryui.com/labels/\n\n\n\nvar labels = $.fn.labels = function() {\n\tvar ancestor, selector, id, labels, ancestors;\n\n\t// Check control.labels first\n\tif ( this[ 0 ].labels && this[ 0 ].labels.length ) {\n\t\treturn this.pushStack( this[ 0 ].labels );\n\t}\n\n\t// Support: IE <= 11, FF <= 37, Android <= 2.3 only\n\t// Above browsers do not support control.labels. Everything below is to support them\n\t// as well as document fragments. control.labels does not work on document fragments\n\tlabels = this.eq( 0 ).parents( \"label\" );\n\n\t// Look for the label based on the id\n\tid = this.attr( \"id\" );\n\tif ( id ) {\n\n\t\t// We don't search against the document in case the element\n\t\t// is disconnected from the DOM\n\t\tancestor = this.eq( 0 ).parents().last();\n\n\t\t// Get a full set of top level ancestors\n\t\tancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );\n\n\t\t// Create a selector for the label based on the id\n\t\tselector = \"label[for='\" + $.ui.escapeSelector( id ) + \"']\";\n\n\t\tlabels = labels.add( ancestors.find( selector ).addBack( selector ) );\n\n\t}\n\n\t// Return whatever we have found for labels\n\treturn this.pushStack( labels );\n};\n\n\n/*!\n * jQuery UI Scroll Parent 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: scrollParent\n//>>group: Core\n//>>description: Get the closest ancestor element that is scrollable.\n//>>docs: http://api.jqueryui.com/scrollParent/\n\n\n\nvar scrollParent = $.fn.scrollParent = function( includeHidden ) {\n\tvar position = this.css( \"position\" ),\n\t\texcludeStaticParent = position === \"absolute\",\n\t\toverflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,\n\t\tscrollParent = this.parents().filter( function() {\n\t\t\tvar parent = $( this );\n\t\t\tif ( excludeStaticParent && parent.css( \"position\" ) === \"static\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn overflowRegex.test( parent.css( \"overflow\" ) + parent.css( \"overflow-y\" ) +\n\t\t\t\tparent.css( \"overflow-x\" ) );\n\t\t} ).eq( 0 );\n\n\treturn position === \"fixed\" || !scrollParent.length ?\n\t\t$( this[ 0 ].ownerDocument || document ) :\n\t\tscrollParent;\n};\n\n\n/*!\n * jQuery UI Tabbable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: :tabbable Selector\n//>>group: Core\n//>>description: Selects elements which can be tabbed to.\n//>>docs: http://api.jqueryui.com/tabbable-selector/\n\n\n\nvar tabbable = $.extend( $.expr[ \":\" ], {\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\thasTabindex = tabIndex != null;\n\t\treturn ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );\n\t}\n} );\n\n\n/*!\n * jQuery UI Unique ID 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: uniqueId\n//>>group: Core\n//>>description: Functions to generate and remove uniqueId's\n//>>docs: http://api.jqueryui.com/uniqueId/\n\n\n\nvar uniqueId = $.fn.extend( {\n\tuniqueId: ( function() {\n\t\tvar uuid = 0;\n\n\t\treturn function() {\n\t\t\treturn this.each( function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + ( ++uuid );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t} )(),\n\n\tremoveUniqueId: function() {\n\t\treturn this.each( function() {\n\t\t\tif ( /^ui-id-\\d+$/.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n\n/*!\n * jQuery UI Accordion 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Accordion\n//>>group: Widgets\n// jscs:disable maximumLineLength\n//>>description: Displays collapsible content panels for presenting information in a limited amount of space.\n// jscs:enable maximumLineLength\n//>>docs: http://api.jqueryui.com/accordion/\n//>>demos: http://jqueryui.com/accordion/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/accordion.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsAccordion = $.widget( \"ui.accordion\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tactive: 0,\n\t\tanimate: {},\n\t\tclasses: {\n\t\t\t\"ui-accordion-header\": \"ui-corner-top\",\n\t\t\t\"ui-accordion-header-collapsed\": \"ui-corner-all\",\n\t\t\t\"ui-accordion-content\": \"ui-corner-bottom\"\n\t\t},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theader: \"> li > :first-child, > :not(li):even\",\n\t\theightStyle: \"auto\",\n\t\ticons: {\n\t\t\tactiveHeader: \"ui-icon-triangle-1-s\",\n\t\t\theader: \"ui-icon-triangle-1-e\"\n\t\t},\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null\n\t},\n\n\thideProps: {\n\t\tborderTopWidth: \"hide\",\n\t\tborderBottomWidth: \"hide\",\n\t\tpaddingTop: \"hide\",\n\t\tpaddingBottom: \"hide\",\n\t\theight: \"hide\"\n\t},\n\n\tshowProps: {\n\t\tborderTopWidth: \"show\",\n\t\tborderBottomWidth: \"show\",\n\t\tpaddingTop: \"show\",\n\t\tpaddingBottom: \"show\",\n\t\theight: \"show\"\n\t},\n\n\t_create: function() {\n\t\tvar options = this.options;\n\n\t\tthis.prevShow = this.prevHide = $();\n\t\tthis._addClass( \"ui-accordion\", \"ui-widget ui-helper-reset\" );\n\t\tthis.element.attr( \"role\", \"tablist\" );\n\n\t\t// Don't allow collapsible: false and active: false / null\n\t\tif ( !options.collapsible && ( options.active === false || options.active == null ) ) {\n\t\t\toptions.active = 0;\n\t\t}\n\n\t\tthis._processPanels();\n\n\t\t// handle negative values\n\t\tif ( options.active < 0 ) {\n\t\t\toptions.active += this.headers.length;\n\t\t}\n\t\tthis._refresh();\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\theader: this.active,\n\t\t\tpanel: !this.active.length ? $() : this.active.next()\n\t\t};\n\t},\n\n\t_createIcons: function() {\n\t\tvar icon, children,\n\t\t\ticons = this.options.icons;\n\n\t\tif ( icons ) {\n\t\t\ticon = $( \"<span>\" );\n\t\t\tthis._addClass( icon, \"ui-accordion-header-icon\", \"ui-icon \" + icons.header );\n\t\t\ticon.prependTo( this.headers );\n\t\t\tchildren = this.active.children( \".ui-accordion-header-icon\" );\n\t\t\tthis._removeClass( children, icons.header )\n\t\t\t\t._addClass( children, null, icons.activeHeader )\n\t\t\t\t._addClass( this.headers, \"ui-accordion-icons\" );\n\t\t}\n\t},\n\n\t_destroyIcons: function() {\n\t\tthis._removeClass( this.headers, \"ui-accordion-icons\" );\n\t\tthis.headers.children( \".ui-accordion-header-icon\" ).remove();\n\t},\n\n\t_destroy: function() {\n\t\tvar contents;\n\n\t\t// Clean up main element\n\t\tthis.element.removeAttr( \"role\" );\n\n\t\t// Clean up headers\n\t\tthis.headers\n\t\t\t.removeAttr( \"role aria-expanded aria-selected aria-controls tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis._destroyIcons();\n\n\t\t// Clean up content panels\n\t\tcontents = this.headers.next()\n\t\t\t.css( \"display\", \"\" )\n\t\t\t.removeAttr( \"role aria-hidden aria-labelledby\" )\n\t\t\t.removeUniqueId();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tcontents.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tif ( this.options.event ) {\n\t\t\t\tthis._off( this.headers, this.options.event );\n\t\t\t}\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\t// Setting collapsible: false while collapsed; open first panel\n\t\tif ( key === \"collapsible\" && !value && this.options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t}\n\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis._destroyIcons();\n\t\t\tif ( value ) {\n\t\t\t\tthis._createIcons();\n\t\t\t}\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis.element.attr( \"aria-disabled\", value );\n\n\t\t// Support: IE8 Only\n\t\t// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE\n\t\t// so we need to add the disabled class to the headers and panels\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t\tthis._toggleClass( this.headers.add( this.headers.next() ), null, \"ui-state-disabled\",\n\t\t\t!!value );\n\t},\n\n\t_keydown: function( event ) {\n\t\tif ( event.altKey || event.ctrlKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar keyCode = $.ui.keyCode,\n\t\t\tlength = this.headers.length,\n\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\ttoFocus = false;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase keyCode.RIGHT:\n\t\tcase keyCode.DOWN:\n\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\tbreak;\n\t\tcase keyCode.LEFT:\n\t\tcase keyCode.UP:\n\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\tbreak;\n\t\tcase keyCode.SPACE:\n\t\tcase keyCode.ENTER:\n\t\t\tthis._eventHandler( event );\n\t\t\tbreak;\n\t\tcase keyCode.HOME:\n\t\t\ttoFocus = this.headers[ 0 ];\n\t\t\tbreak;\n\t\tcase keyCode.END:\n\t\t\ttoFocus = this.headers[ length - 1 ];\n\t\t\tbreak;\n\t\t}\n\n\t\tif ( toFocus ) {\n\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\t$( toFocus ).trigger( \"focus\" );\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_panelKeyDown: function( event ) {\n\t\tif ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n\t\t\t$( event.currentTarget ).prev().trigger( \"focus\" );\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options;\n\t\tthis._processPanels();\n\n\t\t// Was collapsed or no panel\n\t\tif ( ( options.active === false && options.collapsible === true ) ||\n\t\t\t\t!this.headers.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\n\t\t// active false only when collapsible is true\n\t\t} else if ( options.active === false ) {\n\t\t\tthis._activate( 0 );\n\n\t\t// was active, but active panel is gone\n\t\t} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\n\t\t\t// all remaining panel are disabled\n\t\t\tif ( this.headers.length === this.headers.find( \".ui-state-disabled\" ).length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\n\t\t\t// activate previous panel\n\t\t\t} else {\n\t\t\t\tthis._activate( Math.max( 0, options.active - 1 ) );\n\t\t\t}\n\n\t\t// was active, active panel still exists\n\t\t} else {\n\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.headers.index( this.active );\n\t\t}\n\n\t\tthis._destroyIcons();\n\n\t\tthis._refresh();\n\t},\n\n\t_processPanels: function() {\n\t\tvar prevHeaders = this.headers,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.headers = this.element.find( this.options.header );\n\t\tthis._addClass( this.headers, \"ui-accordion-header ui-accordion-header-collapsed\",\n\t\t\t\"ui-state-default\" );\n\n\t\tthis.panels = this.headers.next().filter( \":not(.ui-accordion-content-active)\" ).hide();\n\t\tthis._addClass( this.panels, \"ui-accordion-content\", \"ui-helper-reset ui-widget-content\" );\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevPanels ) {\n\t\t\tthis._off( prevHeaders.not( this.headers ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t_refresh: function() {\n\t\tvar maxHeight,\n\t\t\toptions = this.options,\n\t\t\theightStyle = options.heightStyle,\n\t\t\tparent = this.element.parent();\n\n\t\tthis.active = this._findActive( options.active );\n\t\tthis._addClass( this.active, \"ui-accordion-header-active\", \"ui-state-active\" )\n\t\t\t._removeClass( this.active, \"ui-accordion-header-collapsed\" );\n\t\tthis._addClass( this.active.next(), \"ui-accordion-content-active\" );\n\t\tthis.active.next().show();\n\n\t\tthis.headers\n\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t.each( function() {\n\t\t\t\tvar header = $( this ),\n\t\t\t\t\theaderId = header.uniqueId().attr( \"id\" ),\n\t\t\t\t\tpanel = header.next(),\n\t\t\t\t\tpanelId = panel.uniqueId().attr( \"id\" );\n\t\t\t\theader.attr( \"aria-controls\", panelId );\n\t\t\t\tpanel.attr( \"aria-labelledby\", headerId );\n\t\t\t} )\n\t\t\t.next()\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\tthis.headers\n\t\t\t.not( this.active )\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\ttabIndex: -1\n\t\t\t\t} )\n\t\t\t\t.next()\n\t\t\t\t\t.attr( {\n\t\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t\t} )\n\t\t\t\t\t.hide();\n\n\t\t// Make sure at least one header is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active.attr( {\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t} )\n\t\t\t\t.next()\n\t\t\t\t\t.attr( {\n\t\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t\t} );\n\t\t}\n\n\t\tthis._createIcons();\n\n\t\tthis._setupEvents( options.event );\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tthis.element.siblings( \":visible\" ).each( function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.headers.each( function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.headers.next()\n\t\t\t\t.each( function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t} )\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.headers.next()\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar isVisible = $( this ).is( \":visible\" );\n\t\t\t\t\tif ( !isVisible ) {\n\t\t\t\t\t\t$( this ).show();\n\t\t\t\t\t}\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).css( \"height\", \"\" ).height() );\n\t\t\t\t\tif ( !isVisible ) {\n\t\t\t\t\t\t$( this ).hide();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.height( maxHeight );\n\t\t}\n\t},\n\n\t_activate: function( index ) {\n\t\tvar active = this._findActive( index )[ 0 ];\n\n\t\t// Trying to activate the already active panel\n\t\tif ( active === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Trying to collapse, simulate a click on the currently active header\n\t\tactive = active || this.active[ 0 ];\n\n\t\tthis._eventHandler( {\n\t\t\ttarget: active,\n\t\t\tcurrentTarget: active,\n\t\t\tpreventDefault: $.noop\n\t\t} );\n\t},\n\n\t_findActive: function( selector ) {\n\t\treturn typeof selector === \"number\" ? this.headers.eq( selector ) : $();\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tkeydown: \"_keydown\"\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split( \" \" ), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t} );\n\t\t}\n\n\t\tthis._off( this.headers.add( this.headers.next() ) );\n\t\tthis._on( this.headers, events );\n\t\tthis._on( this.headers.next(), { keydown: \"_panelKeyDown\" } );\n\t\tthis._hoverable( this.headers );\n\t\tthis._focusable( this.headers );\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar activeChildren, clickedChildren,\n\t\t\toptions = this.options,\n\t\t\tactive = this.active,\n\t\t\tclicked = $( event.currentTarget ),\n\t\t\tclickedIsActive = clicked[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : clicked.next(),\n\t\t\ttoHide = active.next(),\n\t\t\teventData = {\n\t\t\t\toldHeader: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewHeader: collapsing ? $() : clicked,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif (\n\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.headers.index( clicked );\n\n\t\t// When the call to ._toggle() comes after the class changes\n\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\tthis.active = clickedIsActive ? $() : clicked;\n\t\tthis._toggle( eventData );\n\n\t\t// Switch classes\n\t\t// corner classes on the previously active header stay after the animation\n\t\tthis._removeClass( active, \"ui-accordion-header-active\", \"ui-state-active\" );\n\t\tif ( options.icons ) {\n\t\t\tactiveChildren = active.children( \".ui-accordion-header-icon\" );\n\t\t\tthis._removeClass( activeChildren, null, options.icons.activeHeader )\n\t\t\t\t._addClass( activeChildren, null, options.icons.header );\n\t\t}\n\n\t\tif ( !clickedIsActive ) {\n\t\t\tthis._removeClass( clicked, \"ui-accordion-header-collapsed\" )\n\t\t\t\t._addClass( clicked, \"ui-accordion-header-active\", \"ui-state-active\" );\n\t\t\tif ( options.icons ) {\n\t\t\t\tclickedChildren = clicked.children( \".ui-accordion-header-icon\" );\n\t\t\t\tthis._removeClass( clickedChildren, null, options.icons.header )\n\t\t\t\t\t._addClass( clickedChildren, null, options.icons.activeHeader );\n\t\t\t}\n\n\t\t\tthis._addClass( clicked.next(), \"ui-accordion-content-active\" );\n\t\t}\n\t},\n\n\t_toggle: function( data ) {\n\t\tvar toShow = data.newPanel,\n\t\t\ttoHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\n\t\t// Handle activating a panel during the animation for another activation\n\t\tthis.prevShow.add( this.prevHide ).stop( true, true );\n\t\tthis.prevShow = toShow;\n\t\tthis.prevHide = toHide;\n\n\t\tif ( this.options.animate ) {\n\t\t\tthis._animate( toShow, toHide, data );\n\t\t} else {\n\t\t\ttoHide.hide();\n\t\t\ttoShow.show();\n\t\t\tthis._toggleComplete( data );\n\t\t}\n\n\t\ttoHide.attr( {\n\t\t\t\"aria-hidden\": \"true\"\n\t\t} );\n\t\ttoHide.prev().attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t} );\n\n\t\t// if we're switching panels, remove the old header from the tab order\n\t\t// if we're opening from collapsed state, remove the previous header from the tab order\n\t\t// if we're collapsing, then keep the collapsing header in the tab order\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\ttoHide.prev().attr( {\n\t\t\t\t\"tabIndex\": -1,\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t} );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.headers.filter( function() {\n\t\t\t\treturn parseInt( $( this ).attr( \"tabIndex\" ), 10 ) === 0;\n\t\t\t} )\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow\n\t\t\t.attr( \"aria-hidden\", \"false\" )\n\t\t\t.prev()\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t} );\n\t},\n\n\t_animate: function( toShow, toHide, data ) {\n\t\tvar total, easing, duration,\n\t\t\tthat = this,\n\t\t\tadjust = 0,\n\t\t\tboxSizing = toShow.css( \"box-sizing\" ),\n\t\t\tdown = toShow.length &&\n\t\t\t\t( !toHide.length || ( toShow.index() < toHide.index() ) ),\n\t\t\tanimate = this.options.animate || {},\n\t\t\toptions = down && animate.down || animate,\n\t\t\tcomplete = function() {\n\t\t\t\tthat._toggleComplete( data );\n\t\t\t};\n\n\t\tif ( typeof options === \"number\" ) {\n\t\t\tduration = options;\n\t\t}\n\t\tif ( typeof options === \"string\" ) {\n\t\t\teasing = options;\n\t\t}\n\n\t\t// fall back from options to animation in case of partial down settings\n\t\teasing = easing || options.easing || animate.easing;\n\t\tduration = duration || options.duration || animate.duration;\n\n\t\tif ( !toHide.length ) {\n\t\t\treturn toShow.animate( this.showProps, duration, easing, complete );\n\t\t}\n\t\tif ( !toShow.length ) {\n\t\t\treturn toHide.animate( this.hideProps, duration, easing, complete );\n\t\t}\n\n\t\ttotal = toShow.show().outerHeight();\n\t\ttoHide.animate( this.hideProps, {\n\t\t\tduration: duration,\n\t\t\teasing: easing,\n\t\t\tstep: function( now, fx ) {\n\t\t\t\tfx.now = Math.round( now );\n\t\t\t}\n\t\t} );\n\t\ttoShow\n\t\t\t.hide()\n\t\t\t.animate( this.showProps, {\n\t\t\t\tduration: duration,\n\t\t\t\teasing: easing,\n\t\t\t\tcomplete: complete,\n\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t\tif ( fx.prop !== \"height\" ) {\n\t\t\t\t\t\tif ( boxSizing === \"content-box\" ) {\n\t\t\t\t\t\t\tadjust += fx.now;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( that.options.heightStyle !== \"content\" ) {\n\t\t\t\t\t\tfx.now = Math.round( total - toHide.outerHeight() - adjust );\n\t\t\t\t\t\tadjust = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t},\n\n\t_toggleComplete: function( data ) {\n\t\tvar toHide = data.oldPanel,\n\t\t\tprev = toHide.prev();\n\n\t\tthis._removeClass( toHide, \"ui-accordion-content-active\" );\n\t\tthis._removeClass( prev, \"ui-accordion-header-active\" )\n\t\t\t._addClass( prev, \"ui-accordion-header-collapsed\" );\n\n\t\t// Work around for rendering bug in IE (#5421)\n\t\tif ( toHide.length ) {\n\t\t\ttoHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;\n\t\t}\n\t\tthis._trigger( \"activate\", null, data );\n\t}\n} );\n\n\n\nvar safeActiveElement = $.ui.safeActiveElement = function( document ) {\n\tvar activeElement;\n\n\t// Support: IE 9 only\n\t// IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n\ttry {\n\t\tactiveElement = document.activeElement;\n\t} catch ( error ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE may return null instead of an element\n\t// Interestingly, this only seems to occur when NOT in an iframe\n\tif ( !activeElement ) {\n\t\tactiveElement = document.body;\n\t}\n\n\t// Support: IE 11 only\n\t// IE11 returns a seemingly empty object in some cases when accessing\n\t// document.activeElement from an <iframe>\n\tif ( !activeElement.nodeName ) {\n\t\tactiveElement = document.body;\n\t}\n\n\treturn activeElement;\n};\n\n\n/*!\n * jQuery UI Menu 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Menu\n//>>group: Widgets\n//>>description: Creates nestable menus.\n//>>docs: http://api.jqueryui.com/menu/\n//>>demos: http://jqueryui.com/menu/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/menu.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsMenu = $.widget( \"ui.menu\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<ul>\",\n\tdelay: 300,\n\toptions: {\n\t\ticons: {\n\t\t\tsubmenu: \"ui-icon-caret-1-e\"\n\t\t},\n\t\titems: \"> *\",\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"right top\"\n\t\t},\n\t\trole: \"menu\",\n\n\t\t// Callbacks\n\t\tblur: null,\n\t\tfocus: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tthis.activeMenu = this.element;\n\n\t\t// Flag used to prevent firing of the click handler\n\t\t// as the event bubbles up through nested menus\n\t\tthis.mouseHandled = false;\n\t\tthis.element\n\t\t\t.uniqueId()\n\t\t\t.attr( {\n\t\t\t\trole: this.options.role,\n\t\t\t\ttabIndex: 0\n\t\t\t} );\n\n\t\tthis._addClass( \"ui-menu\", \"ui-widget ui-widget-content\" );\n\t\tthis._on( {\n\n\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\"mousedown .ui-menu-item\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.target );\n\t\t\t\tvar active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\tthis.select( event );\n\n\t\t\t\t\t// Only set the mouseHandled flag if the event will bubble, see #9469.\n\t\t\t\t\tif ( !event.isPropagationStopped() ) {\n\t\t\t\t\t\tthis.mouseHandled = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Open submenu on click\n\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) &&\n\t\t\t\t\t\t\tactive.closest( \".ui-menu\" ).length ) {\n\n\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\n\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"mouseenter .ui-menu-item\": function( event ) {\n\n\t\t\t\t// Ignore mouse events while typeahead is active, see #10458.\n\t\t\t\t// Prevents focusing the wrong item when typeahead causes a scroll while the mouse\n\t\t\t\t// is over an item in the menu\n\t\t\t\tif ( this.previousFilter ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar actualTarget = $( event.target ).closest( \".ui-menu-item\" ),\n\t\t\t\t\ttarget = $( event.currentTarget );\n\n\t\t\t\t// Ignore bubbled events on parent items, see #11641\n\t\t\t\tif ( actualTarget[ 0 ] !== target[ 0 ] ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\t\t\tthis._removeClass( target.siblings().children( \".ui-state-active\" ),\n\t\t\t\t\tnull, \"ui-state-active\" );\n\t\t\t\tthis.focus( event, target );\n\t\t\t},\n\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\tfocus: function( event, keepActiveItem ) {\n\n\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t// If not, activate the first item\n\t\t\t\tvar item = this.active || this.element.find( this.options.items ).eq( 0 );\n\n\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tthis._delay( function() {\n\t\t\t\t\tvar notContained = !$.contains(\n\t\t\t\t\t\tthis.element[ 0 ],\n\t\t\t\t\t\t$.ui.safeActiveElement( this.document[ 0 ] )\n\t\t\t\t\t);\n\t\t\t\t\tif ( notContained ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\tkeydown: \"_keydown\"\n\t\t} );\n\n\t\tthis.refresh();\n\n\t\t// Clicks outside of a menu collapse any open menus\n\t\tthis._on( this.document, {\n\t\t\tclick: function( event ) {\n\t\t\t\tif ( this._closeOnDocumentClick( event ) ) {\n\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t}\n\n\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\tthis.mouseHandled = false;\n\t\t\t}\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tvar items = this.element.find( \".ui-menu-item\" )\n\t\t\t\t.removeAttr( \"role aria-disabled\" ),\n\t\t\tsubmenus = items.children( \".ui-menu-item-wrapper\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeAttr( \"tabIndex role aria-haspopup\" );\n\n\t\t// Destroy (sub)menus\n\t\tthis.element\n\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t.removeAttr( \"role aria-labelledby aria-expanded aria-hidden aria-disabled \" +\n\t\t\t\t\t\"tabIndex\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.show();\n\n\t\tsubmenus.children().each( function() {\n\t\t\tvar elem = $( this );\n\t\t\tif ( elem.data( \"ui-menu-submenu-caret\" ) ) {\n\t\t\t\telem.remove();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar match, prev, character, skip,\n\t\t\tpreventDefault = true;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\tthis.previousPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\tthis.nextPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\t\tthis.previous( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tthis.next( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tthis.expand( event );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ENTER:\n\t\tcase $.ui.keyCode.SPACE:\n\t\t\tthis._activate( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpreventDefault = false;\n\t\t\tprev = this.previousFilter || \"\";\n\t\t\tskip = false;\n\n\t\t\t// Support number pad values\n\t\t\tcharacter = event.keyCode >= 96 && event.keyCode <= 105 ?\n\t\t\t\t( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );\n\n\t\t\tclearTimeout( this.filterTimer );\n\n\t\t\tif ( character === prev ) {\n\t\t\t\tskip = true;\n\t\t\t} else {\n\t\t\t\tcharacter = prev + character;\n\t\t\t}\n\n\t\t\tmatch = this._filterMenuItems( character );\n\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\tmatch;\n\n\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\tif ( !match.length ) {\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tmatch = this._filterMenuItems( character );\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tthis.previousFilter = character;\n\t\t\t\tthis.filterTimer = this._delay( function() {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}, 1000 );\n\t\t\t} else {\n\t\t\t\tdelete this.previousFilter;\n\t\t\t}\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_activate: function( event ) {\n\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\tif ( this.active.children( \"[aria-haspopup='true']\" ).length ) {\n\t\t\t\tthis.expand( event );\n\t\t\t} else {\n\t\t\t\tthis.select( event );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar menus, items, newSubmenus, newItems, newWrappers,\n\t\t\tthat = this,\n\t\t\ticon = this.options.icons.submenu,\n\t\t\tsubmenus = this.element.find( this.options.menus );\n\n\t\tthis._toggleClass( \"ui-menu-icons\", null, !!this.element.find( \".ui-icon\" ).length );\n\n\t\t// Initialize nested menus\n\t\tnewSubmenus = submenus.filter( \":not(.ui-menu)\" )\n\t\t\t.hide()\n\t\t\t.attr( {\n\t\t\t\trole: this.options.role,\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t} )\n\t\t\t.each( function() {\n\t\t\t\tvar menu = $( this ),\n\t\t\t\t\titem = menu.prev(),\n\t\t\t\t\tsubmenuCaret = $( \"<span>\" ).data( \"ui-menu-submenu-caret\", true );\n\n\t\t\t\tthat._addClass( submenuCaret, \"ui-menu-icon\", \"ui-icon \" + icon );\n\t\t\t\titem\n\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t.prepend( submenuCaret );\n\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t} );\n\n\t\tthis._addClass( newSubmenus, \"ui-menu\", \"ui-widget ui-widget-content ui-front\" );\n\n\t\tmenus = submenus.add( this.element );\n\t\titems = menus.find( this.options.items );\n\n\t\t// Initialize menu-items containing spaces and/or dashes only as dividers\n\t\titems.not( \".ui-menu-item\" ).each( function() {\n\t\t\tvar item = $( this );\n\t\t\tif ( that._isDivider( item ) ) {\n\t\t\t\tthat._addClass( item, \"ui-menu-divider\", \"ui-widget-content\" );\n\t\t\t}\n\t\t} );\n\n\t\t// Don't refresh list items that are already adapted\n\t\tnewItems = items.not( \".ui-menu-item, .ui-menu-divider\" );\n\t\tnewWrappers = newItems.children()\n\t\t\t.not( \".ui-menu\" )\n\t\t\t\t.uniqueId()\n\t\t\t\t.attr( {\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: this._itemRole()\n\t\t\t\t} );\n\t\tthis._addClass( newItems, \"ui-menu-item\" )\n\t\t\t._addClass( newWrappers, \"ui-menu-item-wrapper\" );\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\titems.filter( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\n\t\t// If the active item has been removed, blur the menu\n\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\tthis.blur();\n\t\t}\n\t},\n\n\t_itemRole: function() {\n\t\treturn {\n\t\t\tmenu: \"menuitem\",\n\t\t\tlistbox: \"option\"\n\t\t}[ this.options.role ];\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tvar icons = this.element.find( \".ui-menu-icon\" );\n\t\t\tthis._removeClass( icons, null, this.options.icons.submenu )\n\t\t\t\t._addClass( icons, null, value.submenu );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis.element.attr( \"aria-disabled\", String( value ) );\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t},\n\n\tfocus: function( event, item ) {\n\t\tvar nested, focused, activeParent;\n\t\tthis.blur( event, event && event.type === \"focus\" );\n\n\t\tthis._scrollIntoView( item );\n\n\t\tthis.active = item.first();\n\n\t\tfocused = this.active.children( \".ui-menu-item-wrapper\" );\n\t\tthis._addClass( focused, null, \"ui-state-active\" );\n\n\t\t// Only update aria-activedescendant if there's a role\n\t\t// otherwise we assume focus is managed elsewhere\n\t\tif ( this.options.role ) {\n\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t}\n\n\t\t// Highlight active parent menu item, if any\n\t\tactiveParent = this.active\n\t\t\t.parent()\n\t\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t\t\t.children( \".ui-menu-item-wrapper\" );\n\t\tthis._addClass( activeParent, null, \"ui-state-active\" );\n\n\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\tthis._close();\n\t\t} else {\n\t\t\tthis.timer = this._delay( function() {\n\t\t\t\tthis._close();\n\t\t\t}, this.delay );\n\t\t}\n\n\t\tnested = item.children( \".ui-menu\" );\n\t\tif ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {\n\t\t\tthis._startOpening( nested );\n\t\t}\n\t\tthis.activeMenu = item.parent();\n\n\t\tthis._trigger( \"focus\", event, { item: item } );\n\t},\n\n\t_scrollIntoView: function( item ) {\n\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\tif ( this._hasScroll() ) {\n\t\t\tborderTop = parseFloat( $.css( this.activeMenu[ 0 ], \"borderTopWidth\" ) ) || 0;\n\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[ 0 ], \"paddingTop\" ) ) || 0;\n\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\telementHeight = this.activeMenu.height();\n\t\t\titemHeight = item.outerHeight();\n\n\t\t\tif ( offset < 0 ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t}\n\t\t}\n\t},\n\n\tblur: function( event, fromFocus ) {\n\t\tif ( !fromFocus ) {\n\t\t\tclearTimeout( this.timer );\n\t\t}\n\n\t\tif ( !this.active ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._removeClass( this.active.children( \".ui-menu-item-wrapper\" ),\n\t\t\tnull, \"ui-state-active\" );\n\n\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t\tthis.active = null;\n\t},\n\n\t_startOpening: function( submenu ) {\n\t\tclearTimeout( this.timer );\n\n\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t// shift in the submenu position when mousing over the caret icon\n\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.timer = this._delay( function() {\n\t\t\tthis._close();\n\t\t\tthis._open( submenu );\n\t\t}, this.delay );\n\t},\n\n\t_open: function( submenu ) {\n\t\tvar position = $.extend( {\n\t\t\tof: this.active\n\t\t}, this.options.position );\n\n\t\tclearTimeout( this.timer );\n\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" );\n\n\t\tsubmenu\n\t\t\t.show()\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t.position( position );\n\t},\n\n\tcollapseAll: function( event, all ) {\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay( function() {\n\n\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\n\t\t\t// If we found no valid submenu ancestor, use the main menu to close all\n\t\t\t// sub menus anyway\n\t\t\tif ( !currentMenu.length ) {\n\t\t\t\tcurrentMenu = this.element;\n\t\t\t}\n\n\t\t\tthis._close( currentMenu );\n\n\t\t\tthis.blur( event );\n\n\t\t\t// Work around active item staying active after menu is blurred\n\t\t\tthis._removeClass( currentMenu.find( \".ui-state-active\" ), null, \"ui-state-active\" );\n\n\t\t\tthis.activeMenu = currentMenu;\n\t\t}, this.delay );\n\t},\n\n\t// With no arguments, closes the currently active menu - if nothing is active\n\t// it closes all menus. If passed an argument, it will search for menus BELOW\n\t_close: function( startMenu ) {\n\t\tif ( !startMenu ) {\n\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t}\n\n\t\tstartMenu.find( \".ui-menu\" )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t.attr( \"aria-expanded\", \"false\" );\n\t},\n\n\t_closeOnDocumentClick: function( event ) {\n\t\treturn !$( event.target ).closest( \".ui-menu\" ).length;\n\t},\n\n\t_isDivider: function( item ) {\n\n\t\t// Match hyphen, em dash, en dash\n\t\treturn !/[^\\-\\u2014\\u2013\\s]/.test( item.text() );\n\t},\n\n\tcollapse: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._close();\n\t\t\tthis.focus( event, newItem );\n\t\t}\n\t},\n\n\texpand: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active\n\t\t\t\t.children( \".ui-menu \" )\n\t\t\t\t\t.find( this.options.items )\n\t\t\t\t\t\t.first();\n\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._open( newItem.parent() );\n\n\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\tthis._delay( function() {\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t} );\n\t\t}\n\t},\n\n\tnext: function( event ) {\n\t\tthis._move( \"next\", \"first\", event );\n\t},\n\n\tprevious: function( event ) {\n\t\tthis._move( \"prev\", \"last\", event );\n\t},\n\n\tisFirstItem: function() {\n\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t},\n\n\tisLastItem: function() {\n\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t},\n\n\t_move: function( direction, filter, event ) {\n\t\tvar next;\n\t\tif ( this.active ) {\n\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( -1 );\n\t\t\t} else {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( 0 );\n\t\t\t}\n\t\t}\n\t\tif ( !next || !next.length || !this.active ) {\n\t\t\tnext = this.activeMenu.find( this.options.items )[ filter ]();\n\t\t}\n\n\t\tthis.focus( event, next );\n\t},\n\n\tnextPage: function( event ) {\n\t\tvar item, base, height;\n\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isLastItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each( function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t} );\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.find( this.options.items )\n\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t}\n\t},\n\n\tpreviousPage: function( event ) {\n\t\tvar item, base, height;\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isFirstItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each( function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t} );\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.find( this.options.items ).first() );\n\t\t}\n\t},\n\n\t_hasScroll: function() {\n\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t},\n\n\tselect: function( event ) {\n\n\t\t// TODO: It should never be possible to not have an active item at this\n\t\t// point, but the tests don't trigger mouseenter before click.\n\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\tvar ui = { item: this.active };\n\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\tthis.collapseAll( event, true );\n\t\t}\n\t\tthis._trigger( \"select\", event, ui );\n\t},\n\n\t_filterMenuItems: function( character ) {\n\t\tvar escapedCharacter = character.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" ),\n\t\t\tregex = new RegExp( \"^\" + escapedCharacter, \"i\" );\n\n\t\treturn this.activeMenu\n\t\t\t.find( this.options.items )\n\n\t\t\t\t// Only match on items, not dividers or other content (#10571)\n\t\t\t\t.filter( \".ui-menu-item\" )\n\t\t\t\t\t.filter( function() {\n\t\t\t\t\t\treturn regex.test(\n\t\t\t\t\t\t\t$.trim( $( this ).children( \".ui-menu-item-wrapper\" ).text() ) );\n\t\t\t\t\t} );\n\t}\n} );\n\n\n/*!\n * jQuery UI Autocomplete 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Autocomplete\n//>>group: Widgets\n//>>description: Lists suggested words as the user is typing.\n//>>docs: http://api.jqueryui.com/autocomplete/\n//>>demos: http://jqueryui.com/autocomplete/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/autocomplete.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<input>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null,\n\n\t\t// Callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresponse: null,\n\t\tsearch: null,\n\t\tselect: null\n\t},\n\n\trequestIndex: 0,\n\tpending: 0,\n\n\t_create: function() {\n\n\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t// handled the keydown event. #7269\n\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t// events when we know the keydown event was used to modify the\n\t\t// search term. #7799\n\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\tnodeName = this.element[ 0 ].nodeName.toLowerCase(),\n\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\tisInput = nodeName === \"input\";\n\n\t\t// Textareas are always multi-line\n\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t// IE also treats inputs as contentEditable\n\t\t// All other element types are determined by whether or not they're contentEditable\n\t\tthis.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );\n\n\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\tthis.isNewMenu = true;\n\n\t\tthis._addClass( \"ui-autocomplete-input\" );\n\t\tthis.element.attr( \"autocomplete\", \"off\" );\n\n\t\tthis._on( this.element, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tsuppressInput = false;\n\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( this.menu.active ) {\n\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tif ( !this.isMultiLine ) {\n\t\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.close( event );\n\n\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\n\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeypress: function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tinput: function( event ) {\n\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._searchTimeout( event );\n\t\t\t},\n\t\t\tfocus: function() {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.previous = this._value();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearTimeout( this.searching );\n\t\t\t\tthis.close( event );\n\t\t\t\tthis._change( event );\n\t\t\t}\n\t\t} );\n\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul>\" )\n\t\t\t.appendTo( this._appendTo() )\n\t\t\t.menu( {\n\n\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\trole: null\n\t\t\t} )\n\t\t\t.hide()\n\t\t\t.menu( \"instance\" );\n\n\t\tthis._addClass( this.menu.element, \"ui-autocomplete\", \"ui-front\" );\n\t\tthis._on( this.menu.element, {\n\t\t\tmousedown: function( event ) {\n\n\t\t\t\t// prevent moving focus out of the text field\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\tthis.cancelBlur = true;\n\t\t\t\tthis._delay( function() {\n\t\t\t\t\tdelete this.cancelBlur;\n\n\t\t\t\t\t// Support: IE 8 only\n\t\t\t\t\t// Right clicking a menu item or selecting text from the menu items will\n\t\t\t\t\t// result in focus moving out of the input. However, we've already received\n\t\t\t\t\t// and ignored the blur event because of the cancelBlur flag set above. So\n\t\t\t\t\t// we restore focus to ensure that the menu closes properly based on the user's\n\t\t\t\t\t// next actions.\n\t\t\t\t\tif ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {\n\t\t\t\t\t\tthis.element.trigger( \"focus\" );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t},\n\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\tvar label, item;\n\n\t\t\t\t// support: Firefox\n\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis.menu.blur();\n\n\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\titem = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\n\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Announce the value in the liveRegion\n\t\t\t\tlabel = ui.item.attr( \"aria-label\" ) || item.value;\n\t\t\t\tif ( label && $.trim( label ).length ) {\n\t\t\t\t\tthis.liveRegion.children().hide();\n\t\t\t\t\t$( \"<div>\" ).text( label ).appendTo( this.liveRegion );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\tprevious = this.previous;\n\n\t\t\t\t// Only trigger when focus was lost (click on menu)\n\t\t\t\tif ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {\n\t\t\t\t\tthis.element.trigger( \"focus\" );\n\t\t\t\t\tthis.previous = previous;\n\n\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\tthis._value( item.value );\n\t\t\t\t}\n\n\t\t\t\t// reset the term after the select event\n\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\tthis.term = this._value();\n\n\t\t\t\tthis.close( event );\n\t\t\t\tthis.selectedItem = item;\n\t\t\t}\n\t\t} );\n\n\t\tthis.liveRegion = $( \"<div>\", {\n\t\t\trole: \"status\",\n\t\t\t\"aria-live\": \"assertive\",\n\t\t\t\"aria-relevant\": \"additions\"\n\t\t} )\n\t\t\t.appendTo( this.document[ 0 ].body );\n\n\t\tthis._addClass( this.liveRegion, null, \"ui-helper-hidden-accessible\" );\n\n\t\t// Turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tclearTimeout( this.searching );\n\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\tthis.menu.element.remove();\n\t\tthis.liveRegion.remove();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_isEventTargetInWidget: function( event ) {\n\t\tvar menuElement = this.menu.element[ 0 ];\n\n\t\treturn event.target === this.element[ 0 ] ||\n\t\t\tevent.target === menuElement ||\n\t\t\t$.contains( menuElement, event.target );\n\t},\n\n\t_closeOnClickOutside: function( event ) {\n\t\tif ( !this._isEventTargetInWidget( event ) ) {\n\t\t\tthis.close();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element || !element[ 0 ] ) {\n\t\t\telement = this.element.closest( \".ui-front, dialog\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[ 0 ].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_initSource: function() {\n\t\tvar array, url,\n\t\t\tthat = this;\n\t\tif ( $.isArray( this.options.source ) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t}\n\t\t\t\tthat.xhr = $.ajax( {\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\t_searchTimeout: function( event ) {\n\t\tclearTimeout( this.searching );\n\t\tthis.searching = this._delay( function() {\n\n\t\t\t// Search if the value has changed, or if the user retypes the same value (see #7434)\n\t\t\tvar equalValues = this.term === this._value(),\n\t\t\t\tmenuVisible = this.menu.element.is( \":visible\" ),\n\t\t\t\tmodifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;\n\n\t\t\tif ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.search( null, event );\n\t\t\t}\n\t\t}, this.options.delay );\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this._value();\n\n\t\t// Always save the actual value, not the one passed as an argument\n\t\tthis.term = this._value();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis._addClass( \"ui-autocomplete-loading\" );\n\t\tthis.cancelSearch = false;\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar index = ++this.requestIndex;\n\n\t\treturn $.proxy( function( content ) {\n\t\t\tif ( index === this.requestIndex ) {\n\t\t\t\tthis.__response( content );\n\t\t\t}\n\n\t\t\tthis.pending--;\n\t\t\tif ( !this.pending ) {\n\t\t\t\tthis._removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t}, this );\n\t},\n\n\t__response: function( content ) {\n\t\tif ( content ) {\n\t\t\tcontent = this._normalize( content );\n\t\t}\n\t\tthis._trigger( \"response\", null, { content: content } );\n\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\n\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\tthis._close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tthis.cancelSearch = true;\n\t\tthis._close( event );\n\t},\n\n\t_close: function( event ) {\n\n\t\t// Remove the handler that closes the menu on outside clicks\n\t\tthis._off( this.document, \"mousedown\" );\n\n\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.blur();\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\n\t_change: function( event ) {\n\t\tif ( this.previous !== this._value() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[ 0 ].label && items[ 0 ].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function( item ) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend( {}, item, {\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t} );\n\t\t} );\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element.empty();\n\t\tthis._renderMenu( ul, items );\n\t\tthis.isNewMenu = true;\n\t\tthis.menu.refresh();\n\n\t\t// Size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend( {\n\t\t\tof: this.element\n\t\t}, this.options.position ) );\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next();\n\t\t}\n\n\t\t// Listen for interactions outside of the widget (#6642)\n\t\tthis._on( this.document, {\n\t\t\tmousedown: \"_closeOnClickOutside\"\n\t\t} );\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tthat._renderItemData( ul, item );\n\t\t} );\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\treturn $( \"<li>\" )\n\t\t\t.append( $( \"<div>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\n\t\t\tif ( !this.isMultiLine ) {\n\t\t\t\tthis._value( this.term );\n\t\t\t}\n\n\t\t\tthis.menu.blur();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\n\t_value: function() {\n\t\treturn this.valueMethod.apply( this.element, arguments );\n\t},\n\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// Prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t// Support: Chrome <=50\n\t// We should be able to just use this.element.prop( \"isContentEditable\" )\n\t// but hidden elements always report false in Chrome.\n\t// https://code.google.com/p/chromium/issues/detail?id=313082\n\t_isContentEditable: function( element ) {\n\t\tif ( !element.length ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar editable = element.prop( \"contentEditable\" );\n\n\t\tif ( editable === \"inherit\" ) {\n\t\t return this._isContentEditable( element.parent() );\n\t\t}\n\n\t\treturn editable === \"true\";\n\t}\n} );\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t},\n\tfilter: function( array, term ) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), \"i\" );\n\t\treturn $.grep( array, function( value ) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t} );\n\t}\n} );\n\n// Live region extension, adding a `messages` option\n// NOTE: This is an experimental API. We are still investigating\n// a full solution for string manipulation and internationalization.\n$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\toptions: {\n\t\tmessages: {\n\t\t\tnoResults: \"No search results.\",\n\t\t\tresults: function( amount ) {\n\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t}\n\t\t}\n\t},\n\n\t__response: function( content ) {\n\t\tvar message;\n\t\tthis._superApply( arguments );\n\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( content && content.length ) {\n\t\t\tmessage = this.options.messages.results( content.length );\n\t\t} else {\n\t\t\tmessage = this.options.messages.noResults;\n\t\t}\n\t\tthis.liveRegion.children().hide();\n\t\t$( \"<div>\" ).text( message ).appendTo( this.liveRegion );\n\t}\n} );\n\nvar widgetsAutocomplete = $.ui.autocomplete;\n\n\n/*!\n * jQuery UI Controlgroup 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Controlgroup\n//>>group: Widgets\n//>>description: Visually groups form control widgets\n//>>docs: http://api.jqueryui.com/controlgroup/\n//>>demos: http://jqueryui.com/controlgroup/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/controlgroup.css\n//>>css.theme: ../../themes/base/theme.css\n\n\nvar controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;\n\nvar widgetsControlgroup = $.widget( \"ui.controlgroup\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdirection: \"horizontal\",\n\t\tdisabled: null,\n\t\tonlyVisible: true,\n\t\titems: {\n\t\t\t\"button\": \"input[type=button], input[type=submit], input[type=reset], button, a\",\n\t\t\t\"controlgroupLabel\": \".ui-controlgroup-label\",\n\t\t\t\"checkboxradio\": \"input[type='checkbox'], input[type='radio']\",\n\t\t\t\"selectmenu\": \"select\",\n\t\t\t\"spinner\": \".ui-spinner-input\"\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._enhance();\n\t},\n\n\t// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation\n\t_enhance: function() {\n\t\tthis.element.attr( \"role\", \"toolbar\" );\n\t\tthis.refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis._callChildMethod( \"destroy\" );\n\t\tthis.childWidgets.removeData( \"ui-controlgroup-data\" );\n\t\tthis.element.removeAttr( \"role\" );\n\t\tif ( this.options.items.controlgroupLabel ) {\n\t\t\tthis.element\n\t\t\t\t.find( this.options.items.controlgroupLabel )\n\t\t\t\t.find( \".ui-controlgroup-label-contents\" )\n\t\t\t\t.contents().unwrap();\n\t\t}\n\t},\n\n\t_initWidgets: function() {\n\t\tvar that = this,\n\t\t\tchildWidgets = [];\n\n\t\t// First we iterate over each of the items options\n\t\t$.each( this.options.items, function( widget, selector ) {\n\t\t\tvar labels;\n\t\t\tvar options = {};\n\n\t\t\t// Make sure the widget has a selector set\n\t\t\tif ( !selector ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( widget === \"controlgroupLabel\" ) {\n\t\t\t\tlabels = that.element.find( selector );\n\t\t\t\tlabels.each( function() {\n\t\t\t\t\tvar element = $( this );\n\n\t\t\t\t\tif ( element.children( \".ui-controlgroup-label-contents\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telement.contents()\n\t\t\t\t\t\t.wrapAll( \"<span class='ui-controlgroup-label-contents'></span>\" );\n\t\t\t\t} );\n\t\t\t\tthat._addClass( labels, null, \"ui-widget ui-widget-content ui-state-default\" );\n\t\t\t\tchildWidgets = childWidgets.concat( labels.get() );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure the widget actually exists\n\t\t\tif ( !$.fn[ widget ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We assume everything is in the middle to start because we can't determine\n\t\t\t// first / last elements until all enhancments are done.\n\t\t\tif ( that[ \"_\" + widget + \"Options\" ] ) {\n\t\t\t\toptions = that[ \"_\" + widget + \"Options\" ]( \"middle\" );\n\t\t\t} else {\n\t\t\t\toptions = { classes: {} };\n\t\t\t}\n\n\t\t\t// Find instances of this widget inside controlgroup and init them\n\t\t\tthat.element\n\t\t\t\t.find( selector )\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar element = $( this );\n\t\t\t\t\tvar instance = element[ widget ]( \"instance\" );\n\n\t\t\t\t\t// We need to clone the default options for this type of widget to avoid\n\t\t\t\t\t// polluting the variable options which has a wider scope than a single widget.\n\t\t\t\t\tvar instanceOptions = $.widget.extend( {}, options );\n\n\t\t\t\t\t// If the button is the child of a spinner ignore it\n\t\t\t\t\t// TODO: Find a more generic solution\n\t\t\t\t\tif ( widget === \"button\" && element.parent( \".ui-spinner\" ).length ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Create the widget if it doesn't exist\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\tinstance = element[ widget ]()[ widget ]( \"instance\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstanceOptions.classes =\n\t\t\t\t\t\t\tthat._resolveClassesValues( instanceOptions.classes, instance );\n\t\t\t\t\t}\n\t\t\t\t\telement[ widget ]( instanceOptions );\n\n\t\t\t\t\t// Store an instance of the controlgroup to be able to reference\n\t\t\t\t\t// from the outermost element for changing options and refresh\n\t\t\t\t\tvar widgetElement = element[ widget ]( \"widget\" );\n\t\t\t\t\t$.data( widgetElement[ 0 ], \"ui-controlgroup-data\",\n\t\t\t\t\t\tinstance ? instance : element[ widget ]( \"instance\" ) );\n\n\t\t\t\t\tchildWidgets.push( widgetElement[ 0 ] );\n\t\t\t\t} );\n\t\t} );\n\n\t\tthis.childWidgets = $( $.unique( childWidgets ) );\n\t\tthis._addClass( this.childWidgets, \"ui-controlgroup-item\" );\n\t},\n\n\t_callChildMethod: function( method ) {\n\t\tthis.childWidgets.each( function() {\n\t\t\tvar element = $( this ),\n\t\t\t\tdata = element.data( \"ui-controlgroup-data\" );\n\t\t\tif ( data && data[ method ] ) {\n\t\t\t\tdata[ method ]();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_updateCornerClass: function( element, position ) {\n\t\tvar remove = \"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all\";\n\t\tvar add = this._buildSimpleOptions( position, \"label\" ).classes.label;\n\n\t\tthis._removeClass( element, null, remove );\n\t\tthis._addClass( element, null, add );\n\t},\n\n\t_buildSimpleOptions: function( position, key ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\tvar result = {\n\t\t\tclasses: {}\n\t\t};\n\t\tresult.classes[ key ] = {\n\t\t\t\"middle\": \"\",\n\t\t\t\"first\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" ),\n\t\t\t\"last\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" ),\n\t\t\t\"only\": \"ui-corner-all\"\n\t\t}[ position ];\n\n\t\treturn result;\n\t},\n\n\t_spinnerOptions: function( position ) {\n\t\tvar options = this._buildSimpleOptions( position, \"ui-spinner\" );\n\n\t\toptions.classes[ \"ui-spinner-up\" ] = \"\";\n\t\toptions.classes[ \"ui-spinner-down\" ] = \"\";\n\n\t\treturn options;\n\t},\n\n\t_buttonOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-button\" );\n\t},\n\n\t_checkboxradioOptions: function( position ) {\n\t\treturn this._buildSimpleOptions( position, \"ui-checkboxradio-label\" );\n\t},\n\n\t_selectmenuOptions: function( position ) {\n\t\tvar direction = this.options.direction === \"vertical\";\n\t\treturn {\n\t\t\twidth: direction ? \"auto\" : false,\n\t\t\tclasses: {\n\t\t\t\tmiddle: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"\"\n\t\t\t\t},\n\t\t\t\tfirst: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-\" + ( direction ? \"top\" : \"tl\" ),\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"top\" : \"left\" )\n\t\t\t\t},\n\t\t\t\tlast: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": direction ? \"\" : \"ui-corner-tr\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-\" + ( direction ? \"bottom\" : \"right\" )\n\t\t\t\t},\n\t\t\t\tonly: {\n\t\t\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-top\",\n\t\t\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-all\"\n\t\t\t\t}\n\n\t\t\t}[ position ]\n\t\t};\n\t},\n\n\t_resolveClassesValues: function( classes, instance ) {\n\t\tvar result = {};\n\t\t$.each( classes, function( key ) {\n\t\t\tvar current = instance.options.classes[ key ] || \"\";\n\t\t\tcurrent = $.trim( current.replace( controlgroupCornerRegex, \"\" ) );\n\t\t\tresult[ key ] = ( current + \" \" + classes[ key ] ).replace( /\\s+/g, \" \" );\n\t\t} );\n\t\treturn result;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"direction\" ) {\n\t\t\tthis._removeClass( \"ui-controlgroup-\" + this.options.direction );\n\t\t}\n\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._callChildMethod( value ? \"disable\" : \"enable\" );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.refresh();\n\t},\n\n\trefresh: function() {\n\t\tvar children,\n\t\t\tthat = this;\n\n\t\tthis._addClass( \"ui-controlgroup ui-controlgroup-\" + this.options.direction );\n\n\t\tif ( this.options.direction === \"horizontal\" ) {\n\t\t\tthis._addClass( null, \"ui-helper-clearfix\" );\n\t\t}\n\t\tthis._initWidgets();\n\n\t\tchildren = this.childWidgets;\n\n\t\t// We filter here because we need to track all childWidgets not just the visible ones\n\t\tif ( this.options.onlyVisible ) {\n\t\t\tchildren = children.filter( \":visible\" );\n\t\t}\n\n\t\tif ( children.length ) {\n\n\t\t\t// We do this last because we need to make sure all enhancment is done\n\t\t\t// before determining first and last\n\t\t\t$.each( [ \"first\", \"last\" ], function( index, value ) {\n\t\t\t\tvar instance = children[ value ]().data( \"ui-controlgroup-data\" );\n\n\t\t\t\tif ( instance && that[ \"_\" + instance.widgetName + \"Options\" ] ) {\n\t\t\t\t\tvar options = that[ \"_\" + instance.widgetName + \"Options\" ](\n\t\t\t\t\t\tchildren.length === 1 ? \"only\" : value\n\t\t\t\t\t);\n\t\t\t\t\toptions.classes = that._resolveClassesValues( options.classes, instance );\n\t\t\t\t\tinstance.element[ instance.widgetName ]( options );\n\t\t\t\t} else {\n\t\t\t\t\tthat._updateCornerClass( children[ value ](), value );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Finally call the refresh method on each of the child widgets.\n\t\t\tthis._callChildMethod( \"refresh\" );\n\t\t}\n\t}\n} );\n\n/*!\n * jQuery UI Checkboxradio 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Checkboxradio\n//>>group: Widgets\n//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.\n//>>docs: http://api.jqueryui.com/checkboxradio/\n//>>demos: http://jqueryui.com/checkboxradio/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.structure: ../../themes/base/checkboxradio.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.checkboxradio\", [ $.ui.formResetMixin, {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tdisabled: null,\n\t\tlabel: null,\n\t\ticon: true,\n\t\tclasses: {\n\t\t\t\"ui-checkboxradio-label\": \"ui-corner-all\",\n\t\t\t\"ui-checkboxradio-icon\": \"ui-corner-all\"\n\t\t}\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled, labels;\n\t\tvar that = this;\n\t\tvar options = this._super() || {};\n\n\t\t// We read the type here, because it makes more sense to throw a element type error first,\n\t\t// rather then the error for lack of a label. Often if its the wrong type, it\n\t\t// won't have a label (e.g. calling on a div, btn, etc)\n\t\tthis._readType();\n\n\t\tlabels = this.element.labels();\n\n\t\t// If there are multiple labels, use the last one\n\t\tthis.label = $( labels[ labels.length - 1 ] );\n\t\tif ( !this.label.length ) {\n\t\t\t$.error( \"No label found for checkboxradio widget\" );\n\t\t}\n\n\t\tthis.originalLabel = \"\";\n\n\t\t// We need to get the label text but this may also need to make sure it does not contain the\n\t\t// input itself.\n\t\tthis.label.contents().not( this.element[ 0 ] ).each( function() {\n\n\t\t\t// The label contents could be text, html, or a mix. We concat each element to get a\n\t\t\t// string representation of the label, without the input as part of it.\n\t\t\tthat.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;\n\t\t} );\n\n\t\t// Set the label option if we found label text\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\n\t\tthis._bindFormResetHandler();\n\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled;\n\t\t}\n\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._addClass( \"ui-checkboxradio\", \"ui-helper-hidden-accessible\" );\n\t\tthis._addClass( this.label, \"ui-checkboxradio-label\", \"ui-button ui-widget\" );\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-radio-label\" );\n\t\t}\n\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tthis._updateLabel();\n\t\t} else if ( this.originalLabel ) {\n\t\t\tthis.options.label = this.originalLabel;\n\t\t}\n\n\t\tthis._enhance();\n\n\t\tif ( checked ) {\n\t\t\tthis._addClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t\tif ( this.icon ) {\n\t\t\t\tthis._addClass( this.icon, null, \"ui-state-hover\" );\n\t\t\t}\n\t\t}\n\n\t\tthis._on( {\n\t\t\tchange: \"_toggleClasses\",\n\t\t\tfocus: function() {\n\t\t\t\tthis._addClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t},\n\t\t\tblur: function() {\n\t\t\t\tthis._removeClass( this.label, null, \"ui-state-focus ui-visual-focus\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_readType: function() {\n\t\tvar nodeName = this.element[ 0 ].nodeName.toLowerCase();\n\t\tthis.type = this.element[ 0 ].type;\n\t\tif ( nodeName !== \"input\" || !/radio|checkbox/.test( this.type ) ) {\n\t\t\t$.error( \"Can't create checkboxradio on element.nodeName=\" + nodeName +\n\t\t\t\t\" and element.type=\" + this.type );\n\t\t}\n\t},\n\n\t// Support jQuery Mobile enhanced option\n\t_enhance: function() {\n\t\tthis._updateIcon( this.element[ 0 ].checked );\n\t},\n\n\twidget: function() {\n\t\treturn this.label;\n\t},\n\n\t_getRadioGroup: function() {\n\t\tvar group;\n\t\tvar name = this.element[ 0 ].name;\n\t\tvar nameSelector = \"input[name='\" + $.ui.escapeSelector( name ) + \"']\";\n\n\t\tif ( !name ) {\n\t\t\treturn $( [] );\n\t\t}\n\n\t\tif ( this.form.length ) {\n\t\t\tgroup = $( this.form[ 0 ].elements ).filter( nameSelector );\n\t\t} else {\n\n\t\t\t// Not inside a form, check all inputs that also are not inside a form\n\t\t\tgroup = $( nameSelector ).filter( function() {\n\t\t\t\treturn $( this ).form().length === 0;\n\t\t\t} );\n\t\t}\n\n\t\treturn group.not( this.element );\n\t},\n\n\t_toggleClasses: function() {\n\t\tvar checked = this.element[ 0 ].checked;\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\n\t\tif ( this.options.icon && this.type === \"checkbox\" ) {\n\t\t\tthis._toggleClass( this.icon, null, \"ui-icon-check ui-state-checked\", checked )\n\t\t\t\t._toggleClass( this.icon, null, \"ui-icon-blank\", !checked );\n\t\t}\n\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tthis._getRadioGroup()\n\t\t\t\t.each( function() {\n\t\t\t\t\tvar instance = $( this ).checkboxradio( \"instance\" );\n\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstance._removeClass( instance.label,\n\t\t\t\t\t\t\t\"ui-checkboxradio-checked\", \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis._unbindFormResetHandler();\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\t// We don't allow the value to be set to nothing\n\t\tif ( key === \"label\" && !value ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( this.label, null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\n\t\t\t// Don't refresh when setting disabled\n\t\t\treturn;\n\t\t}\n\t\tthis.refresh();\n\t},\n\n\t_updateIcon: function( checked ) {\n\t\tvar toAdd = \"ui-icon ui-icon-background \";\n\n\t\tif ( this.options.icon ) {\n\t\t\tif ( !this.icon ) {\n\t\t\t\tthis.icon = $( \"<span>\" );\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-checkboxradio-icon-space\" );\n\t\t\t}\n\n\t\t\tif ( this.type === \"checkbox\" ) {\n\t\t\t\ttoAdd += checked ? \"ui-icon-check ui-state-checked\" : \"ui-icon-blank\";\n\t\t\t\tthis._removeClass( this.icon, null, checked ? \"ui-icon-blank\" : \"ui-icon-check\" );\n\t\t\t} else {\n\t\t\t\ttoAdd += \"ui-icon-blank\";\n\t\t\t}\n\t\t\tthis._addClass( this.icon, \"ui-checkboxradio-icon\", toAdd );\n\t\t\tif ( !checked ) {\n\t\t\t\tthis._removeClass( this.icon, null, \"ui-icon-check ui-state-checked\" );\n\t\t\t}\n\t\t\tthis.icon.prependTo( this.label ).after( this.iconSpace );\n\t\t} else if ( this.icon !== undefined ) {\n\t\t\tthis.icon.remove();\n\t\t\tthis.iconSpace.remove();\n\t\t\tdelete this.icon;\n\t\t}\n\t},\n\n\t_updateLabel: function() {\n\n\t\t// Remove the contents of the label ( minus the icon, icon space, and input )\n\t\tvar contents = this.label.contents().not( this.element[ 0 ] );\n\t\tif ( this.icon ) {\n\t\t\tcontents = contents.not( this.icon[ 0 ] );\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tcontents = contents.not( this.iconSpace[ 0 ] );\n\t\t}\n\t\tcontents.remove();\n\n\t\tthis.label.append( this.options.label );\n\t},\n\n\trefresh: function() {\n\t\tvar checked = this.element[ 0 ].checked,\n\t\t\tisDisabled = this.element[ 0 ].disabled;\n\n\t\tthis._updateIcon( checked );\n\t\tthis._toggleClass( this.label, \"ui-checkboxradio-checked\", \"ui-state-active\", checked );\n\t\tif ( this.options.label !== null ) {\n\t\t\tthis._updateLabel();\n\t\t}\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { \"disabled\": isDisabled } );\n\t\t}\n\t}\n\n} ] );\n\nvar widgetsCheckboxradio = $.ui.checkboxradio;\n\n\n/*!\n * jQuery UI Button 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Button\n//>>group: Widgets\n//>>description: Enhances a form with themeable buttons.\n//>>docs: http://api.jqueryui.com/button/\n//>>demos: http://jqueryui.com/button/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/button.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.button\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-button\": \"ui-corner-all\"\n\t\t},\n\t\tdisabled: null,\n\t\ticon: null,\n\t\ticonPosition: \"beginning\",\n\t\tlabel: null,\n\t\tshowLabel: true\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar disabled,\n\n\t\t\t// This is to support cases like in jQuery Mobile where the base widget does have\n\t\t\t// an implementation of _getCreateOptions\n\t\t\toptions = this._super() || {};\n\n\t\tthis.isInput = this.element.is( \"input\" );\n\n\t\tdisabled = this.element[ 0 ].disabled;\n\t\tif ( disabled != null ) {\n\t\t\toptions.disabled = disabled;\n\t\t}\n\n\t\tthis.originalLabel = this.isInput ? this.element.val() : this.element.html();\n\t\tif ( this.originalLabel ) {\n\t\t\toptions.label = this.originalLabel;\n\t\t}\n\n\t\treturn options;\n\t},\n\n\t_create: function() {\n\t\tif ( !this.option.showLabel & !this.options.icon ) {\n\t\t\tthis.options.showLabel = true;\n\t\t}\n\n\t\t// We have to check the option again here even though we did in _getCreateOptions,\n\t\t// because null may have been passed on init which would override what was set in\n\t\t// _getCreateOptions\n\t\tif ( this.options.disabled == null ) {\n\t\t\tthis.options.disabled = this.element[ 0 ].disabled || false;\n\t\t}\n\n\t\tthis.hasTitle = !!this.element.attr( \"title\" );\n\n\t\t// Check to see if the label needs to be set or if its already correct\n\t\tif ( this.options.label && this.options.label !== this.originalLabel ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t} else {\n\t\t\t\tthis.element.html( this.options.label );\n\t\t\t}\n\t\t}\n\t\tthis._addClass( \"ui-button\", \"ui-widget\" );\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\tthis._enhance();\n\n\t\tif ( this.element.is( \"a\" ) ) {\n\t\t\tthis._on( {\n\t\t\t\t\"keyup\": function( event ) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: PhantomJS <= 1.9, IE 8 Only\n\t\t\t\t\t\t// If a native click is available use it so we actually cause navigation\n\t\t\t\t\t\t// otherwise just trigger a click event\n\t\t\t\t\t\tif ( this.element[ 0 ].click ) {\n\t\t\t\t\t\t\tthis.element[ 0 ].click();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.element.trigger( \"click\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t},\n\n\t_enhance: function() {\n\t\tif ( !this.element.is( \"button\" ) ) {\n\t\t\tthis.element.attr( \"role\", \"button\" );\n\t\t}\n\n\t\tif ( this.options.icon ) {\n\t\t\tthis._updateIcon( \"icon\", this.options.icon );\n\t\t\tthis._updateTooltip();\n\t\t}\n\t},\n\n\t_updateTooltip: function() {\n\t\tthis.title = this.element.attr( \"title\" );\n\n\t\tif ( !this.options.showLabel && !this.title ) {\n\t\t\tthis.element.attr( \"title\", this.options.label );\n\t\t}\n\t},\n\n\t_updateIcon: function( option, value ) {\n\t\tvar icon = option !== \"iconPosition\",\n\t\t\tposition = icon ? this.options.iconPosition : value,\n\t\t\tdisplayBlock = position === \"top\" || position === \"bottom\";\n\n\t\t// Create icon\n\t\tif ( !this.icon ) {\n\t\t\tthis.icon = $( \"<span>\" );\n\n\t\t\tthis._addClass( this.icon, \"ui-button-icon\", \"ui-icon\" );\n\n\t\t\tif ( !this.options.showLabel ) {\n\t\t\t\tthis._addClass( \"ui-button-icon-only\" );\n\t\t\t}\n\t\t} else if ( icon ) {\n\n\t\t\t// If we are updating the icon remove the old icon class\n\t\t\tthis._removeClass( this.icon, null, this.options.icon );\n\t\t}\n\n\t\t// If we are updating the icon add the new icon class\n\t\tif ( icon ) {\n\t\t\tthis._addClass( this.icon, null, value );\n\t\t}\n\n\t\tthis._attachIcon( position );\n\n\t\t// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove\n\t\t// the iconSpace if there is one.\n\t\tif ( displayBlock ) {\n\t\t\tthis._addClass( this.icon, null, \"ui-widget-icon-block\" );\n\t\t\tif ( this.iconSpace ) {\n\t\t\t\tthis.iconSpace.remove();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Position is beginning or end so remove the ui-widget-icon-block class and add the\n\t\t\t// space if it does not exist\n\t\t\tif ( !this.iconSpace ) {\n\t\t\t\tthis.iconSpace = $( \"<span> </span>\" );\n\t\t\t\tthis._addClass( this.iconSpace, \"ui-button-icon-space\" );\n\t\t\t}\n\t\t\tthis._removeClass( this.icon, null, \"ui-wiget-icon-block\" );\n\t\t\tthis._attachIconSpace( position );\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeAttr( \"role\" );\n\n\t\tif ( this.icon ) {\n\t\t\tthis.icon.remove();\n\t\t}\n\t\tif ( this.iconSpace ) {\n\t\t\tthis.iconSpace.remove();\n\t\t}\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.element.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_attachIconSpace: function( iconPosition ) {\n\t\tthis.icon[ /^(?:end|bottom)/.test( iconPosition ) ? \"before\" : \"after\" ]( this.iconSpace );\n\t},\n\n\t_attachIcon: function( iconPosition ) {\n\t\tthis.element[ /^(?:end|bottom)/.test( iconPosition ) ? \"append\" : \"prepend\" ]( this.icon );\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar newShowLabel = options.showLabel === undefined ?\n\t\t\t\tthis.options.showLabel :\n\t\t\t\toptions.showLabel,\n\t\t\tnewIcon = options.icon === undefined ? this.options.icon : options.icon;\n\n\t\tif ( !newShowLabel && !newIcon ) {\n\t\t\toptions.showLabel = true;\n\t\t}\n\t\tthis._super( options );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icon\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis._updateIcon( key, value );\n\t\t\t} else if ( this.icon ) {\n\t\t\t\tthis.icon.remove();\n\t\t\t\tif ( this.iconSpace ) {\n\t\t\t\t\tthis.iconSpace.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"iconPosition\" ) {\n\t\t\tthis._updateIcon( key, value );\n\t\t}\n\n\t\t// Make sure we can't end up with a button that has neither text nor icon\n\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis._toggleClass( \"ui-button-icon-only\", null, !value );\n\t\t\t\tthis._updateTooltip();\n\t\t}\n\n\t\tif ( key === \"label\" ) {\n\t\t\tif ( this.isInput ) {\n\t\t\t\tthis.element.val( value );\n\t\t\t} else {\n\n\t\t\t\t// If there is an icon, append it, else nothing then append the value\n\t\t\t\t// this avoids removal of the icon when setting label text\n\t\t\t\tthis.element.html( value );\n\t\t\t\tif ( this.icon ) {\n\t\t\t\t\tthis._attachIcon( this.options.iconPosition );\n\t\t\t\t\tthis._attachIconSpace( this.options.iconPosition );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis._toggleClass( null, \"ui-state-disabled\", value );\n\t\t\tthis.element[ 0 ].disabled = value;\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.blur();\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\n\t\t// Make sure to only check disabled if its an element that supports this otherwise\n\t\t// check for the disabled class to determine state\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ?\n\t\t\tthis.element[ 0 ].disabled : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOptions( { disabled: isDisabled } );\n\t\t}\n\n\t\tthis._updateTooltip();\n\t}\n} );\n\n// DEPRECATED\nif ( $.uiBackCompat !== false ) {\n\n\t// Text and Icons options\n\t$.widget( \"ui.button\", $.ui.button, {\n\t\toptions: {\n\t\t\ttext: true,\n\t\t\ticons: {\n\t\t\t\tprimary: null,\n\t\t\t\tsecondary: null\n\t\t\t}\n\t\t},\n\n\t\t_create: function() {\n\t\t\tif ( this.options.showLabel && !this.options.text ) {\n\t\t\t\tthis.options.showLabel = this.options.text;\n\t\t\t}\n\t\t\tif ( !this.options.showLabel && this.options.text ) {\n\t\t\t\tthis.options.text = this.options.showLabel;\n\t\t\t}\n\t\t\tif ( !this.options.icon && ( this.options.icons.primary ||\n\t\t\t\t\tthis.options.icons.secondary ) ) {\n\t\t\t\tif ( this.options.icons.primary ) {\n\t\t\t\t\tthis.options.icon = this.options.icons.primary;\n\t\t\t\t} else {\n\t\t\t\t\tthis.options.icon = this.options.icons.secondary;\n\t\t\t\t\tthis.options.iconPosition = \"end\";\n\t\t\t\t}\n\t\t\t} else if ( this.options.icon ) {\n\t\t\t\tthis.options.icons.primary = this.options.icon;\n\t\t\t}\n\t\t\tthis._super();\n\t\t},\n\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"text\" ) {\n\t\t\t\tthis._super( \"showLabel\", value );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( key === \"showLabel\" ) {\n\t\t\t\tthis.options.text = value;\n\t\t\t}\n\t\t\tif ( key === \"icon\" ) {\n\t\t\t\tthis.options.icons.primary = value;\n\t\t\t}\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tif ( value.primary ) {\n\t\t\t\t\tthis._super( \"icon\", value.primary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"beginning\" );\n\t\t\t\t} else if ( value.secondary ) {\n\t\t\t\t\tthis._super( \"icon\", value.secondary );\n\t\t\t\t\tthis._super( \"iconPosition\", \"end\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n\n\t$.fn.button = ( function( orig ) {\n\t\treturn function() {\n\t\t\tif ( !this.length || ( this.length && this[ 0 ].tagName !== \"INPUT\" ) ||\n\t\t\t\t\t( this.length && this[ 0 ].tagName === \"INPUT\" && (\n\t\t\t\t\t\tthis.attr( \"type\" ) !== \"checkbox\" && this.attr( \"type\" ) !== \"radio\"\n\t\t\t\t\t) ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t}\n\t\t\tif ( !$.ui.checkboxradio ) {\n\t\t\t\t$.error( \"Checkboxradio widget missing\" );\n\t\t\t}\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\treturn this.checkboxradio( {\n\t\t\t\t\t\"icon\": false\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn this.checkboxradio.apply( this, arguments );\n\t\t};\n\t} )( $.fn.button );\n\n\t$.fn.buttonset = function() {\n\t\tif ( !$.ui.controlgroup ) {\n\t\t\t$.error( \"Controlgroup widget missing\" );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" && arguments[ 2 ] ) {\n\t\t\treturn this.controlgroup.apply( this,\n\t\t\t\t[ arguments[ 0 ], \"items.button\", arguments[ 2 ] ] );\n\t\t}\n\t\tif ( arguments[ 0 ] === \"option\" && arguments[ 1 ] === \"items\" ) {\n\t\t\treturn this.controlgroup.apply( this, [ arguments[ 0 ], \"items.button\" ] );\n\t\t}\n\t\tif ( typeof arguments[ 0 ] === \"object\" && arguments[ 0 ].items ) {\n\t\t\targuments[ 0 ].items = {\n\t\t\t\tbutton: arguments[ 0 ].items\n\t\t\t};\n\t\t}\n\t\treturn this.controlgroup.apply( this, arguments );\n\t};\n}\n\nvar widgetsButton = $.ui.button;\n\n\n// jscs:disable maximumLineLength\n/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */\n/*!\n * jQuery UI Datepicker 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Datepicker\n//>>group: Widgets\n//>>description: Displays a calendar from an input or inline for selecting dates.\n//>>docs: http://api.jqueryui.com/datepicker/\n//>>demos: http://jqueryui.com/datepicker/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/datepicker.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.extend( $.ui, { datepicker: { version: \"1.12.1\" } } );\n\nvar datepicker_instActive;\n\nfunction datepicker_getZindex( elem ) {\n\tvar position, value;\n\twhile ( elem.length && elem[ 0 ] !== document ) {\n\n\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t// This makes behavior of this function consistent across browsers\n\t\t// WebKit always returns auto if the element is positioned\n\t\tposition = elem.css( \"position\" );\n\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\n\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t// other browsers return a string\n\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\telem = elem.parent();\n\t}\n\n\treturn 0;\n}\n/* Date picker manager.\n Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n Settings for (groups of) date pickers are maintained in an instance object,\n allowing multiple different settings on the same page. */\n\nfunction Datepicker() {\n\tthis._curInst = null; // The current instance in use\n\tthis._keyEvent = false; // If the last event was a key event\n\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\tthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n\tthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n\tthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n\tthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n\tthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n\tthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n\tthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n\tthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n\tthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n\tthis.regional = []; // Available regional settings, indexed by language code\n\tthis.regional[ \"\" ] = { // Default regional settings\n\t\tcloseText: \"Done\", // Display text for close link\n\t\tprevText: \"Prev\", // Display text for previous month link\n\t\tnextText: \"Next\", // Display text for next month link\n\t\tcurrentText: \"Today\", // Display text for current month link\n\t\tmonthNames: [ \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n\t\t\t\"July\",\"August\",\"September\",\"October\",\"November\",\"December\" ], // Names of months for drop-down and formatting\n\t\tmonthNamesShort: [ \"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\" ], // For formatting\n\t\tdayNames: [ \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\" ], // For formatting\n\t\tdayNamesShort: [ \"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\" ], // For formatting\n\t\tdayNamesMin: [ \"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\" ], // Column headings for days starting at Sunday\n\t\tweekHeader: \"Wk\", // Column header for week of the year\n\t\tdateFormat: \"mm/dd/yy\", // See format options on parseDate\n\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\tyearSuffix: \"\" // Additional text to append to the year in the month headers\n\t};\n\tthis._defaults = { // Global defaults for all the date picker instances\n\t\tshowOn: \"focus\", // \"focus\" for popup on focus,\n\t\t\t// \"button\" for trigger button, or \"both\" for either\n\t\tshowAnim: \"fadeIn\", // Name of jQuery animation for popup\n\t\tshowOptions: {}, // Options for enhanced animations\n\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t// +/-number for offset from today, null for today\n\t\tappendText: \"\", // Display text following the input box, e.g. showing the format\n\t\tbuttonText: \"...\", // Text for trigger button\n\t\tbuttonImage: \"\", // URL for trigger button image\n\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t// if not applicable, false to just disable them\n\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\tyearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t// takes a Date and returns the number of the week for it\n\t\tshortYearCutoff: \"+10\", // Short year values < this are in the current century,\n\t\t\t// > this are in the previous century,\n\t\t\t// string value starting with \"+\" for current year + value\n\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\tduration: \"fast\", // Duration of display/closure\n\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t// returns a set of custom settings for the date picker\n\t\tonSelect: null, // Define a callback function when a date is selected\n\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\tstepMonths: 1, // Number of months to step back/forward\n\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\taltField: \"\", // Selector for an alternate field to store selected dates into\n\t\taltFormat: \"\", // The date format to use for the alternate field\n\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\tdisabled: false // The initial disabled state\n\t};\n\t$.extend( this._defaults, this.regional[ \"\" ] );\n\tthis.regional.en = $.extend( true, {}, this.regional[ \"\" ] );\n\tthis.regional[ \"en-US\" ] = $.extend( true, {}, this.regional.en );\n\tthis.dpDiv = datepicker_bindHover( $( \"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\" ) );\n}\n\n$.extend( Datepicker.prototype, {\n\t/* Class name added to elements to indicate already configured with a date picker. */\n\tmarkerClassName: \"hasDatepicker\",\n\n\t//Keep track of the maximum number of rows displayed (see #7043)\n\tmaxRows: 4,\n\n\t// TODO rename to \"widget\" when switching to widget factory\n\t_widgetDatepicker: function() {\n\t\treturn this.dpDiv;\n\t},\n\n\t/* Override the default settings for all instances of the date picker.\n\t * @param settings object - the new settings to use as defaults (anonymous object)\n\t * @return the manager object\n\t */\n\tsetDefaults: function( settings ) {\n\t\tdatepicker_extendRemove( this._defaults, settings || {} );\n\t\treturn this;\n\t},\n\n\t/* Attach the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t * @param settings object - the new settings to use for this date picker instance (anonymous)\n\t */\n\t_attachDatepicker: function( target, settings ) {\n\t\tvar nodeName, inline, inst;\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tinline = ( nodeName === \"div\" || nodeName === \"span\" );\n\t\tif ( !target.id ) {\n\t\t\tthis.uuid += 1;\n\t\t\ttarget.id = \"dp\" + this.uuid;\n\t\t}\n\t\tinst = this._newInst( $( target ), inline );\n\t\tinst.settings = $.extend( {}, settings || {} );\n\t\tif ( nodeName === \"input\" ) {\n\t\t\tthis._connectDatepicker( target, inst );\n\t\t} else if ( inline ) {\n\t\t\tthis._inlineDatepicker( target, inst );\n\t\t}\n\t},\n\n\t/* Create a new instance object. */\n\t_newInst: function( target, inline ) {\n\t\tvar id = target[ 0 ].id.replace( /([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\" ); // escape jQuery meta chars\n\t\treturn { id: id, input: target, // associated target\n\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\tinline: inline, // is datepicker inline or not\n\t\t\tdpDiv: ( !inline ? this.dpDiv : // presentation div\n\t\t\tdatepicker_bindHover( $( \"<div class='\" + this._inlineClass + \" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\" ) ) ) };\n\t},\n\n\t/* Attach the date picker to an input field. */\n\t_connectDatepicker: function( target, inst ) {\n\t\tvar input = $( target );\n\t\tinst.append = $( [] );\n\t\tinst.trigger = $( [] );\n\t\tif ( input.hasClass( this.markerClassName ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthis._attachments( input, inst );\n\t\tinput.addClass( this.markerClassName ).on( \"keydown\", this._doKeyDown ).\n\t\t\ton( \"keypress\", this._doKeyPress ).on( \"keyup\", this._doKeyUp );\n\t\tthis._autoSize( inst );\n\t\t$.data( target, \"datepicker\", inst );\n\n\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\tif ( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t},\n\n\t/* Make attachments based on settings. */\n\t_attachments: function( input, inst ) {\n\t\tvar showOn, buttonText, buttonImage,\n\t\t\tappendText = this._get( inst, \"appendText\" ),\n\t\t\tisRTL = this._get( inst, \"isRTL\" );\n\n\t\tif ( inst.append ) {\n\t\t\tinst.append.remove();\n\t\t}\n\t\tif ( appendText ) {\n\t\t\tinst.append = $( \"<span class='\" + this._appendClass + \"'>\" + appendText + \"</span>\" );\n\t\t\tinput[ isRTL ? \"before\" : \"after\" ]( inst.append );\n\t\t}\n\n\t\tinput.off( \"focus\", this._showDatepicker );\n\n\t\tif ( inst.trigger ) {\n\t\t\tinst.trigger.remove();\n\t\t}\n\n\t\tshowOn = this._get( inst, \"showOn\" );\n\t\tif ( showOn === \"focus\" || showOn === \"both\" ) { // pop-up date picker when in the marked field\n\t\t\tinput.on( \"focus\", this._showDatepicker );\n\t\t}\n\t\tif ( showOn === \"button\" || showOn === \"both\" ) { // pop-up date picker when button clicked\n\t\t\tbuttonText = this._get( inst, \"buttonText\" );\n\t\t\tbuttonImage = this._get( inst, \"buttonImage\" );\n\t\t\tinst.trigger = $( this._get( inst, \"buttonImageOnly\" ) ?\n\t\t\t\t$( \"<img/>\" ).addClass( this._triggerClass ).\n\t\t\t\t\tattr( { src: buttonImage, alt: buttonText, title: buttonText } ) :\n\t\t\t\t$( \"<button type='button'></button>\" ).addClass( this._triggerClass ).\n\t\t\t\t\thtml( !buttonImage ? buttonText : $( \"<img/>\" ).attr(\n\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText } ) ) );\n\t\t\tinput[ isRTL ? \"before\" : \"after\" ]( inst.trigger );\n\t\t\tinst.trigger.on( \"click\", function() {\n\t\t\t\tif ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t$.datepicker._showDatepicker( input[ 0 ] );\n\t\t\t\t} else {\n\t\t\t\t\t$.datepicker._showDatepicker( input[ 0 ] );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t}\n\t},\n\n\t/* Apply the maximum length for the date format. */\n\t_autoSize: function( inst ) {\n\t\tif ( this._get( inst, \"autoSize\" ) && !inst.inline ) {\n\t\t\tvar findMax, max, maxI, i,\n\t\t\t\tdate = new Date( 2009, 12 - 1, 20 ), // Ensure double digits\n\t\t\t\tdateFormat = this._get( inst, \"dateFormat\" );\n\n\t\t\tif ( dateFormat.match( /[DM]/ ) ) {\n\t\t\t\tfindMax = function( names ) {\n\t\t\t\t\tmax = 0;\n\t\t\t\t\tmaxI = 0;\n\t\t\t\t\tfor ( i = 0; i < names.length; i++ ) {\n\t\t\t\t\t\tif ( names[ i ].length > max ) {\n\t\t\t\t\t\t\tmax = names[ i ].length;\n\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn maxI;\n\t\t\t\t};\n\t\t\t\tdate.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?\n\t\t\t\t\t\"monthNames\" : \"monthNamesShort\" ) ) ) );\n\t\t\t\tdate.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?\n\t\t\t\t\t\"dayNames\" : \"dayNamesShort\" ) ) ) + 20 - date.getDay() );\n\t\t\t}\n\t\t\tinst.input.attr( \"size\", this._formatDate( inst, date ).length );\n\t\t}\n\t},\n\n\t/* Attach an inline date picker to a div. */\n\t_inlineDatepicker: function( target, inst ) {\n\t\tvar divSpan = $( target );\n\t\tif ( divSpan.hasClass( this.markerClassName ) ) {\n\t\t\treturn;\n\t\t}\n\t\tdivSpan.addClass( this.markerClassName ).append( inst.dpDiv );\n\t\t$.data( target, \"datepicker\", inst );\n\t\tthis._setDate( inst, this._getDefaultDate( inst ), true );\n\t\tthis._updateDatepicker( inst );\n\t\tthis._updateAlternate( inst );\n\n\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\tif ( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\n\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t},\n\n\t/* Pop-up the date picker in a \"dialog\" box.\n\t * @param input element - ignored\n\t * @param date\tstring or Date - the initial date to display\n\t * @param onSelect function - the function to call when a date is selected\n\t * @param settings object - update the dialog date picker instance's settings (anonymous object)\n\t * @param pos int[2] - coordinates for the dialog's position within the screen or\n\t *\t\t\t\t\tevent - with x/y coordinates or\n\t *\t\t\t\t\tleave empty for default (screen centre)\n\t * @return the manager object\n\t */\n\t_dialogDatepicker: function( input, date, onSelect, settings, pos ) {\n\t\tvar id, browserWidth, browserHeight, scrollX, scrollY,\n\t\t\tinst = this._dialogInst; // internal instance\n\n\t\tif ( !inst ) {\n\t\t\tthis.uuid += 1;\n\t\t\tid = \"dp\" + this.uuid;\n\t\t\tthis._dialogInput = $( \"<input type='text' id='\" + id +\n\t\t\t\t\"' style='position: absolute; top: -100px; width: 0px;'/>\" );\n\t\t\tthis._dialogInput.on( \"keydown\", this._doKeyDown );\n\t\t\t$( \"body\" ).append( this._dialogInput );\n\t\t\tinst = this._dialogInst = this._newInst( this._dialogInput, false );\n\t\t\tinst.settings = {};\n\t\t\t$.data( this._dialogInput[ 0 ], \"datepicker\", inst );\n\t\t}\n\t\tdatepicker_extendRemove( inst.settings, settings || {} );\n\t\tdate = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );\n\t\tthis._dialogInput.val( date );\n\n\t\tthis._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );\n\t\tif ( !this._pos ) {\n\t\t\tbrowserWidth = document.documentElement.clientWidth;\n\t\t\tbrowserHeight = document.documentElement.clientHeight;\n\t\t\tscrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\tscrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];\n\t\t}\n\n\t\t// Move input on screen for focus, but hidden behind dialog\n\t\tthis._dialogInput.css( \"left\", ( this._pos[ 0 ] + 20 ) + \"px\" ).css( \"top\", this._pos[ 1 ] + \"px\" );\n\t\tinst.settings.onSelect = onSelect;\n\t\tthis._inDialog = true;\n\t\tthis.dpDiv.addClass( this._dialogClass );\n\t\tthis._showDatepicker( this._dialogInput[ 0 ] );\n\t\tif ( $.blockUI ) {\n\t\t\t$.blockUI( this.dpDiv );\n\t\t}\n\t\t$.data( this._dialogInput[ 0 ], \"datepicker\", inst );\n\t\treturn this;\n\t},\n\n\t/* Detach a datepicker from its control.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_destroyDatepicker: function( target ) {\n\t\tvar nodeName,\n\t\t\t$target = $( target ),\n\t\t\tinst = $.data( target, \"datepicker\" );\n\n\t\tif ( !$target.hasClass( this.markerClassName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\t$.removeData( target, \"datepicker\" );\n\t\tif ( nodeName === \"input\" ) {\n\t\t\tinst.append.remove();\n\t\t\tinst.trigger.remove();\n\t\t\t$target.removeClass( this.markerClassName ).\n\t\t\t\toff( \"focus\", this._showDatepicker ).\n\t\t\t\toff( \"keydown\", this._doKeyDown ).\n\t\t\t\toff( \"keypress\", this._doKeyPress ).\n\t\t\t\toff( \"keyup\", this._doKeyUp );\n\t\t} else if ( nodeName === \"div\" || nodeName === \"span\" ) {\n\t\t\t$target.removeClass( this.markerClassName ).empty();\n\t\t}\n\n\t\tif ( datepicker_instActive === inst ) {\n\t\t\tdatepicker_instActive = null;\n\t\t}\n\t},\n\n\t/* Enable the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_enableDatepicker: function( target ) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $( target ),\n\t\t\tinst = $.data( target, \"datepicker\" );\n\n\t\tif ( !$target.hasClass( this.markerClassName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif ( nodeName === \"input\" ) {\n\t\t\ttarget.disabled = false;\n\t\t\tinst.trigger.filter( \"button\" ).\n\t\t\t\teach( function() { this.disabled = false; } ).end().\n\t\t\t\tfilter( \"img\" ).css( { opacity: \"1.0\", cursor: \"\" } );\n\t\t} else if ( nodeName === \"div\" || nodeName === \"span\" ) {\n\t\t\tinline = $target.children( \".\" + this._inlineClass );\n\t\t\tinline.children().removeClass( \"ui-state-disabled\" );\n\t\t\tinline.find( \"select.ui-datepicker-month, select.ui-datepicker-year\" ).\n\t\t\t\tprop( \"disabled\", false );\n\t\t}\n\t\tthis._disabledInputs = $.map( this._disabledInputs,\n\t\t\tfunction( value ) { return ( value === target ? null : value ); } ); // delete entry\n\t},\n\n\t/* Disable the date picker to a jQuery selection.\n\t * @param target\telement - the target input field or division or span\n\t */\n\t_disableDatepicker: function( target ) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $( target ),\n\t\t\tinst = $.data( target, \"datepicker\" );\n\n\t\tif ( !$target.hasClass( this.markerClassName ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif ( nodeName === \"input\" ) {\n\t\t\ttarget.disabled = true;\n\t\t\tinst.trigger.filter( \"button\" ).\n\t\t\t\teach( function() { this.disabled = true; } ).end().\n\t\t\t\tfilter( \"img\" ).css( { opacity: \"0.5\", cursor: \"default\" } );\n\t\t} else if ( nodeName === \"div\" || nodeName === \"span\" ) {\n\t\t\tinline = $target.children( \".\" + this._inlineClass );\n\t\t\tinline.children().addClass( \"ui-state-disabled\" );\n\t\t\tinline.find( \"select.ui-datepicker-month, select.ui-datepicker-year\" ).\n\t\t\t\tprop( \"disabled\", true );\n\t\t}\n\t\tthis._disabledInputs = $.map( this._disabledInputs,\n\t\t\tfunction( value ) { return ( value === target ? null : value ); } ); // delete entry\n\t\tthis._disabledInputs[ this._disabledInputs.length ] = target;\n\t},\n\n\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t * @param target\telement - the target input field or division or span\n\t * @return boolean - true if disabled, false if enabled\n\t */\n\t_isDisabledDatepicker: function( target ) {\n\t\tif ( !target ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( var i = 0; i < this._disabledInputs.length; i++ ) {\n\t\t\tif ( this._disabledInputs[ i ] === target ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\t/* Retrieve the instance data for the target control.\n\t * @param target element - the target input field or division or span\n\t * @return object - the associated instance data\n\t * @throws error if a jQuery problem getting data\n\t */\n\t_getInst: function( target ) {\n\t\ttry {\n\t\t\treturn $.data( target, \"datepicker\" );\n\t\t}\n\t\tcatch ( err ) {\n\t\t\tthrow \"Missing instance data for this datepicker\";\n\t\t}\n\t},\n\n\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t * @param target element - the target input field or division or span\n\t * @param name\tobject - the new settings to update or\n\t *\t\t\t\tstring - the name of the setting to change or retrieve,\n\t *\t\t\t\twhen retrieving also \"all\" for all instance settings or\n\t *\t\t\t\t\"defaults\" for all global defaults\n\t * @param value any - the new value for the setting\n\t *\t\t\t\t(omit if above is an object or to retrieve a value)\n\t */\n\t_optionDatepicker: function( target, name, value ) {\n\t\tvar settings, date, minDate, maxDate,\n\t\t\tinst = this._getInst( target );\n\n\t\tif ( arguments.length === 2 && typeof name === \"string\" ) {\n\t\t\treturn ( name === \"defaults\" ? $.extend( {}, $.datepicker._defaults ) :\n\t\t\t\t( inst ? ( name === \"all\" ? $.extend( {}, inst.settings ) :\n\t\t\t\tthis._get( inst, name ) ) : null ) );\n\t\t}\n\n\t\tsettings = name || {};\n\t\tif ( typeof name === \"string\" ) {\n\t\t\tsettings = {};\n\t\t\tsettings[ name ] = value;\n\t\t}\n\n\t\tif ( inst ) {\n\t\t\tif ( this._curInst === inst ) {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t}\n\n\t\t\tdate = this._getDateDatepicker( target, true );\n\t\t\tminDate = this._getMinMaxDate( inst, \"min\" );\n\t\t\tmaxDate = this._getMinMaxDate( inst, \"max\" );\n\t\t\tdatepicker_extendRemove( inst.settings, settings );\n\n\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\tif ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {\n\t\t\t\tinst.settings.minDate = this._formatDate( inst, minDate );\n\t\t\t}\n\t\t\tif ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {\n\t\t\t\tinst.settings.maxDate = this._formatDate( inst, maxDate );\n\t\t\t}\n\t\t\tif ( \"disabled\" in settings ) {\n\t\t\t\tif ( settings.disabled ) {\n\t\t\t\t\tthis._disableDatepicker( target );\n\t\t\t\t} else {\n\t\t\t\t\tthis._enableDatepicker( target );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._attachments( $( target ), inst );\n\t\t\tthis._autoSize( inst );\n\t\t\tthis._setDate( inst, date );\n\t\t\tthis._updateAlternate( inst );\n\t\t\tthis._updateDatepicker( inst );\n\t\t}\n\t},\n\n\t// Change method deprecated\n\t_changeDatepicker: function( target, name, value ) {\n\t\tthis._optionDatepicker( target, name, value );\n\t},\n\n\t/* Redraw the date picker attached to an input field or division.\n\t * @param target element - the target input field or division or span\n\t */\n\t_refreshDatepicker: function( target ) {\n\t\tvar inst = this._getInst( target );\n\t\tif ( inst ) {\n\t\t\tthis._updateDatepicker( inst );\n\t\t}\n\t},\n\n\t/* Set the dates for a jQuery selection.\n\t * @param target element - the target input field or division or span\n\t * @param date\tDate - the new date\n\t */\n\t_setDateDatepicker: function( target, date ) {\n\t\tvar inst = this._getInst( target );\n\t\tif ( inst ) {\n\t\t\tthis._setDate( inst, date );\n\t\t\tthis._updateDatepicker( inst );\n\t\t\tthis._updateAlternate( inst );\n\t\t}\n\t},\n\n\t/* Get the date(s) for the first entry in a jQuery selection.\n\t * @param target element - the target input field or division or span\n\t * @param noDefault boolean - true if no default date is to be used\n\t * @return Date - the current date\n\t */\n\t_getDateDatepicker: function( target, noDefault ) {\n\t\tvar inst = this._getInst( target );\n\t\tif ( inst && !inst.inline ) {\n\t\t\tthis._setDateFromField( inst, noDefault );\n\t\t}\n\t\treturn ( inst ? this._getDate( inst ) : null );\n\t},\n\n\t/* Handle keystrokes. */\n\t_doKeyDown: function( event ) {\n\t\tvar onSelect, dateStr, sel,\n\t\t\tinst = $.datepicker._getInst( event.target ),\n\t\t\thandled = true,\n\t\t\tisRTL = inst.dpDiv.is( \".ui-datepicker-rtl\" );\n\n\t\tinst._keyEvent = true;\n\t\tif ( $.datepicker._datepickerShowing ) {\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\tcase 13: sel = $( \"td.\" + $.datepicker._dayOverClass + \":not(.\" +\n\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + \")\", inst.dpDiv );\n\t\t\t\t\t\tif ( sel[ 0 ] ) {\n\t\t\t\t\t\t\t$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonSelect = $.datepicker._get( inst, \"onSelect\" );\n\t\t\t\t\t\tif ( onSelect ) {\n\t\t\t\t\t\t\tdateStr = $.datepicker._formatDate( inst );\n\n\t\t\t\t\t\t\t// Trigger custom callback\n\t\t\t\t\t\t\tonSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\tcase 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?\n\t\t\t\t\t\t\t-$.datepicker._get( inst, \"stepBigMonths\" ) :\n\t\t\t\t\t\t\t-$.datepicker._get( inst, \"stepMonths\" ) ), \"M\" );\n\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\tcase 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?\n\t\t\t\t\t\t\t+$.datepicker._get( inst, \"stepBigMonths\" ) :\n\t\t\t\t\t\t\t+$.datepicker._get( inst, \"stepMonths\" ) ), \"M\" );\n\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\tcase 35: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._clearDate( event.target );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\tcase 36: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._gotoToday( event.target );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\tcase 37: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), \"D\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\n\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\tif ( event.originalEvent.altKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, ( event.ctrlKey ?\n\t\t\t\t\t\t\t\t-$.datepicker._get( inst, \"stepBigMonths\" ) :\n\t\t\t\t\t\t\t\t-$.datepicker._get( inst, \"stepMonths\" ) ), \"M\" );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 38: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, -7, \"D\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\tcase 39: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), \"D\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\n\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\tif ( event.originalEvent.altKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, ( event.ctrlKey ?\n\t\t\t\t\t\t\t\t+$.datepicker._get( inst, \"stepBigMonths\" ) :\n\t\t\t\t\t\t\t\t+$.datepicker._get( inst, \"stepMonths\" ) ), \"M\" );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 40: if ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate( event.target, +7, \"D\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\tdefault: handled = false;\n\t\t\t}\n\t\t} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home\n\t\t\t$.datepicker._showDatepicker( this );\n\t\t} else {\n\t\t\thandled = false;\n\t\t}\n\n\t\tif ( handled ) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t},\n\n\t/* Filter entered characters - based on date format. */\n\t_doKeyPress: function( event ) {\n\t\tvar chars, chr,\n\t\t\tinst = $.datepicker._getInst( event.target );\n\n\t\tif ( $.datepicker._get( inst, \"constrainInput\" ) ) {\n\t\t\tchars = $.datepicker._possibleChars( $.datepicker._get( inst, \"dateFormat\" ) );\n\t\t\tchr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );\n\t\t\treturn event.ctrlKey || event.metaKey || ( chr < \" \" || !chars || chars.indexOf( chr ) > -1 );\n\t\t}\n\t},\n\n\t/* Synchronise manual entry and field/alternate field. */\n\t_doKeyUp: function( event ) {\n\t\tvar date,\n\t\t\tinst = $.datepicker._getInst( event.target );\n\n\t\tif ( inst.input.val() !== inst.lastVal ) {\n\t\t\ttry {\n\t\t\t\tdate = $.datepicker.parseDate( $.datepicker._get( inst, \"dateFormat\" ),\n\t\t\t\t\t( inst.input ? inst.input.val() : null ),\n\t\t\t\t\t$.datepicker._getFormatConfig( inst ) );\n\n\t\t\t\tif ( date ) { // only if valid\n\t\t\t\t\t$.datepicker._setDateFromField( inst );\n\t\t\t\t\t$.datepicker._updateAlternate( inst );\n\t\t\t\t\t$.datepicker._updateDatepicker( inst );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch ( err ) {\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* Pop-up the date picker for a given input field.\n\t * If false returned from beforeShow event handler do not show.\n\t * @param input element - the input field attached to the date picker or\n\t *\t\t\t\t\tevent - if triggered by focus\n\t */\n\t_showDatepicker: function( input ) {\n\t\tinput = input.target || input;\n\t\tif ( input.nodeName.toLowerCase() !== \"input\" ) { // find from button/image trigger\n\t\t\tinput = $( \"input\", input.parentNode )[ 0 ];\n\t\t}\n\n\t\tif ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here\n\t\t\treturn;\n\t\t}\n\n\t\tvar inst, beforeShow, beforeShowSettings, isFixed,\n\t\t\toffset, showAnim, duration;\n\n\t\tinst = $.datepicker._getInst( input );\n\t\tif ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {\n\t\t\t$.datepicker._curInst.dpDiv.stop( true, true );\n\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );\n\t\t\t}\n\t\t}\n\n\t\tbeforeShow = $.datepicker._get( inst, \"beforeShow\" );\n\t\tbeforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};\n\t\tif ( beforeShowSettings === false ) {\n\t\t\treturn;\n\t\t}\n\t\tdatepicker_extendRemove( inst.settings, beforeShowSettings );\n\n\t\tinst.lastVal = null;\n\t\t$.datepicker._lastInput = input;\n\t\t$.datepicker._setDateFromField( inst );\n\n\t\tif ( $.datepicker._inDialog ) { // hide cursor\n\t\t\tinput.value = \"\";\n\t\t}\n\t\tif ( !$.datepicker._pos ) { // position below input\n\t\t\t$.datepicker._pos = $.datepicker._findPos( input );\n\t\t\t$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height\n\t\t}\n\n\t\tisFixed = false;\n\t\t$( input ).parents().each( function() {\n\t\t\tisFixed |= $( this ).css( \"position\" ) === \"fixed\";\n\t\t\treturn !isFixed;\n\t\t} );\n\n\t\toffset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };\n\t\t$.datepicker._pos = null;\n\n\t\t//to avoid flashes on Firefox\n\t\tinst.dpDiv.empty();\n\n\t\t// determine sizing offscreen\n\t\tinst.dpDiv.css( { position: \"absolute\", display: \"block\", top: \"-1000px\" } );\n\t\t$.datepicker._updateDatepicker( inst );\n\n\t\t// fix width for dynamic number of date pickers\n\t\t// and adjust position before showing\n\t\toffset = $.datepicker._checkOffset( inst, offset, isFixed );\n\t\tinst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?\n\t\t\t\"static\" : ( isFixed ? \"fixed\" : \"absolute\" ) ), display: \"none\",\n\t\t\tleft: offset.left + \"px\", top: offset.top + \"px\" } );\n\n\t\tif ( !inst.inline ) {\n\t\t\tshowAnim = $.datepicker._get( inst, \"showAnim\" );\n\t\t\tduration = $.datepicker._get( inst, \"duration\" );\n\t\t\tinst.dpDiv.css( \"z-index\", datepicker_getZindex( $( input ) ) + 1 );\n\t\t\t$.datepicker._datepickerShowing = true;\n\n\t\t\tif ( $.effects && $.effects.effect[ showAnim ] ) {\n\t\t\t\tinst.dpDiv.show( showAnim, $.datepicker._get( inst, \"showOptions\" ), duration );\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[ showAnim || \"show\" ]( showAnim ? duration : null );\n\t\t\t}\n\n\t\t\tif ( $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\tinst.input.trigger( \"focus\" );\n\t\t\t}\n\n\t\t\t$.datepicker._curInst = inst;\n\t\t}\n\t},\n\n\t/* Generate the date picker content. */\n\t_updateDatepicker: function( inst ) {\n\t\tthis.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\tdatepicker_instActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append( this._generateHTML( inst ) );\n\t\tthis._attachHandlers( inst );\n\n\t\tvar origyearshtml,\n\t\t\tnumMonths = this._getNumberOfMonths( inst ),\n\t\t\tcols = numMonths[ 1 ],\n\t\t\twidth = 17,\n\t\t\tactiveCell = inst.dpDiv.find( \".\" + this._dayOverClass + \" a\" );\n\n\t\tif ( activeCell.length > 0 ) {\n\t\t\tdatepicker_handleMouseover.apply( activeCell.get( 0 ) );\n\t\t}\n\n\t\tinst.dpDiv.removeClass( \"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\" ).width( \"\" );\n\t\tif ( cols > 1 ) {\n\t\t\tinst.dpDiv.addClass( \"ui-datepicker-multi-\" + cols ).css( \"width\", ( width * cols ) + \"em\" );\n\t\t}\n\t\tinst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? \"add\" : \"remove\" ) +\n\t\t\t\"Class\" ]( \"ui-datepicker-multi\" );\n\t\tinst.dpDiv[ ( this._get( inst, \"isRTL\" ) ? \"add\" : \"remove\" ) +\n\t\t\t\"Class\" ]( \"ui-datepicker-rtl\" );\n\n\t\tif ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\tinst.input.trigger( \"focus\" );\n\t\t}\n\n\t\t// Deffered render of the years select (to avoid flashes on Firefox)\n\t\tif ( inst.yearshtml ) {\n\t\t\torigyearshtml = inst.yearshtml;\n\t\t\tsetTimeout( function() {\n\n\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\tif ( origyearshtml === inst.yearshtml && inst.yearshtml ) {\n\t\t\t\t\tinst.dpDiv.find( \"select.ui-datepicker-year:first\" ).replaceWith( inst.yearshtml );\n\t\t\t\t}\n\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t}, 0 );\n\t\t}\n\t},\n\n\t// #6694 - don't focus the input if it's already focused\n\t// this breaks the change event in IE\n\t// Support: IE and jQuery <1.9\n\t_shouldFocusInput: function( inst ) {\n\t\treturn inst.input && inst.input.is( \":visible\" ) && !inst.input.is( \":disabled\" ) && !inst.input.is( \":focus\" );\n\t},\n\n\t/* Check positioning to remain on screen. */\n\t_checkOffset: function( inst, offset, isFixed ) {\n\t\tvar dpWidth = inst.dpDiv.outerWidth(),\n\t\t\tdpHeight = inst.dpDiv.outerHeight(),\n\t\t\tinputWidth = inst.input ? inst.input.outerWidth() : 0,\n\t\t\tinputHeight = inst.input ? inst.input.outerHeight() : 0,\n\t\t\tviewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),\n\t\t\tviewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );\n\n\t\toffset.left -= ( this._get( inst, \"isRTL\" ) ? ( dpWidth - inputWidth ) : 0 );\n\t\toffset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;\n\t\toffset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;\n\n\t\t// Now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\toffset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?\n\t\t\tMath.abs( offset.left + dpWidth - viewWidth ) : 0 );\n\t\toffset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?\n\t\t\tMath.abs( dpHeight + inputHeight ) : 0 );\n\n\t\treturn offset;\n\t},\n\n\t/* Find an object's position on the screen. */\n\t_findPos: function( obj ) {\n\t\tvar position,\n\t\t\tinst = this._getInst( obj ),\n\t\t\tisRTL = this._get( inst, \"isRTL\" );\n\n\t\twhile ( obj && ( obj.type === \"hidden\" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {\n\t\t\tobj = obj[ isRTL ? \"previousSibling\" : \"nextSibling\" ];\n\t\t}\n\n\t\tposition = $( obj ).offset();\n\t\treturn [ position.left, position.top ];\n\t},\n\n\t/* Hide the date picker from view.\n\t * @param input element - the input field attached to the date picker\n\t */\n\t_hideDatepicker: function( input ) {\n\t\tvar showAnim, duration, postProcess, onClose,\n\t\t\tinst = this._curInst;\n\n\t\tif ( !inst || ( input && inst !== $.data( input, \"datepicker\" ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._datepickerShowing ) {\n\t\t\tshowAnim = this._get( inst, \"showAnim\" );\n\t\t\tduration = this._get( inst, \"duration\" );\n\t\t\tpostProcess = function() {\n\t\t\t\t$.datepicker._tidyDialog( inst );\n\t\t\t};\n\n\t\t\t// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed\n\t\t\tif ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {\n\t\t\t\tinst.dpDiv.hide( showAnim, $.datepicker._get( inst, \"showOptions\" ), duration, postProcess );\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[ ( showAnim === \"slideDown\" ? \"slideUp\" :\n\t\t\t\t\t( showAnim === \"fadeIn\" ? \"fadeOut\" : \"hide\" ) ) ]( ( showAnim ? duration : null ), postProcess );\n\t\t\t}\n\n\t\t\tif ( !showAnim ) {\n\t\t\t\tpostProcess();\n\t\t\t}\n\t\t\tthis._datepickerShowing = false;\n\n\t\t\tonClose = this._get( inst, \"onClose\" );\n\t\t\tif ( onClose ) {\n\t\t\t\tonClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : \"\" ), inst ] );\n\t\t\t}\n\n\t\t\tthis._lastInput = null;\n\t\t\tif ( this._inDialog ) {\n\t\t\t\tthis._dialogInput.css( { position: \"absolute\", left: \"0\", top: \"-100px\" } );\n\t\t\t\tif ( $.blockUI ) {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t$( \"body\" ).append( this.dpDiv );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._inDialog = false;\n\t\t}\n\t},\n\n\t/* Tidy up after a dialog display. */\n\t_tidyDialog: function( inst ) {\n\t\tinst.dpDiv.removeClass( this._dialogClass ).off( \".ui-datepicker-calendar\" );\n\t},\n\n\t/* Close date picker if clicked elsewhere. */\n\t_checkExternalClick: function( event ) {\n\t\tif ( !$.datepicker._curInst ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $target = $( event.target ),\n\t\t\tinst = $.datepicker._getInst( $target[ 0 ] );\n\n\t\tif ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&\n\t\t\t\t$target.parents( \"#\" + $.datepicker._mainDivId ).length === 0 &&\n\t\t\t\t!$target.hasClass( $.datepicker.markerClassName ) &&\n\t\t\t\t!$target.closest( \".\" + $.datepicker._triggerClass ).length &&\n\t\t\t\t$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||\n\t\t\t( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {\n\t\t\t\t$.datepicker._hideDatepicker();\n\t\t}\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustDate: function( id, offset, period ) {\n\t\tvar target = $( id ),\n\t\t\tinst = this._getInst( target[ 0 ] );\n\n\t\tif ( this._isDisabledDatepicker( target[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\t\tthis._adjustInstDate( inst, offset +\n\t\t\t( period === \"M\" ? this._get( inst, \"showCurrentAtPos\" ) : 0 ), // undo positioning\n\t\t\tperiod );\n\t\tthis._updateDatepicker( inst );\n\t},\n\n\t/* Action for current link. */\n\t_gotoToday: function( id ) {\n\t\tvar date,\n\t\t\ttarget = $( id ),\n\t\t\tinst = this._getInst( target[ 0 ] );\n\n\t\tif ( this._get( inst, \"gotoCurrent\" ) && inst.currentDay ) {\n\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t} else {\n\t\t\tdate = new Date();\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t}\n\t\tthis._notifyChange( inst );\n\t\tthis._adjustDate( target );\n\t},\n\n\t/* Action for selecting a new month/year. */\n\t_selectMonthYear: function( id, select, period ) {\n\t\tvar target = $( id ),\n\t\t\tinst = this._getInst( target[ 0 ] );\n\n\t\tinst[ \"selected\" + ( period === \"M\" ? \"Month\" : \"Year\" ) ] =\n\t\tinst[ \"draw\" + ( period === \"M\" ? \"Month\" : \"Year\" ) ] =\n\t\t\tparseInt( select.options[ select.selectedIndex ].value, 10 );\n\n\t\tthis._notifyChange( inst );\n\t\tthis._adjustDate( target );\n\t},\n\n\t/* Action for selecting a day. */\n\t_selectDay: function( id, month, year, td ) {\n\t\tvar inst,\n\t\t\ttarget = $( id );\n\n\t\tif ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tinst = this._getInst( target[ 0 ] );\n\t\tinst.selectedDay = inst.currentDay = $( \"a\", td ).html();\n\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\tinst.selectedYear = inst.currentYear = year;\n\t\tthis._selectDate( id, this._formatDate( inst,\n\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear ) );\n\t},\n\n\t/* Erase the input field and hide the date picker. */\n\t_clearDate: function( id ) {\n\t\tvar target = $( id );\n\t\tthis._selectDate( target, \"\" );\n\t},\n\n\t/* Update the input field with the selected date. */\n\t_selectDate: function( id, dateStr ) {\n\t\tvar onSelect,\n\t\t\ttarget = $( id ),\n\t\t\tinst = this._getInst( target[ 0 ] );\n\n\t\tdateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );\n\t\tif ( inst.input ) {\n\t\t\tinst.input.val( dateStr );\n\t\t}\n\t\tthis._updateAlternate( inst );\n\n\t\tonSelect = this._get( inst, \"onSelect\" );\n\t\tif ( onSelect ) {\n\t\t\tonSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] ); // trigger custom callback\n\t\t} else if ( inst.input ) {\n\t\t\tinst.input.trigger( \"change\" ); // fire the change event\n\t\t}\n\n\t\tif ( inst.inline ) {\n\t\t\tthis._updateDatepicker( inst );\n\t\t} else {\n\t\t\tthis._hideDatepicker();\n\t\t\tthis._lastInput = inst.input[ 0 ];\n\t\t\tif ( typeof( inst.input[ 0 ] ) !== \"object\" ) {\n\t\t\t\tinst.input.trigger( \"focus\" ); // restore focus\n\t\t\t}\n\t\t\tthis._lastInput = null;\n\t\t}\n\t},\n\n\t/* Update any alternate field to synchronise with the main field. */\n\t_updateAlternate: function( inst ) {\n\t\tvar altFormat, date, dateStr,\n\t\t\taltField = this._get( inst, \"altField\" );\n\n\t\tif ( altField ) { // update alternate field too\n\t\t\taltFormat = this._get( inst, \"altFormat\" ) || this._get( inst, \"dateFormat\" );\n\t\t\tdate = this._getDate( inst );\n\t\t\tdateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );\n\t\t\t$( altField ).val( dateStr );\n\t\t}\n\t},\n\n\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t * @param date Date - the date to customise\n\t * @return [boolean, string] - is this date selectable?, what is its CSS class?\n\t */\n\tnoWeekends: function( date ) {\n\t\tvar day = date.getDay();\n\t\treturn [ ( day > 0 && day < 6 ), \"\" ];\n\t},\n\n\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t * @param date Date - the date to get the week for\n\t * @return number - the number of the week within the year that contains this date\n\t */\n\tiso8601Week: function( date ) {\n\t\tvar time,\n\t\t\tcheckDate = new Date( date.getTime() );\n\n\t\t// Find Thursday of this week starting on Monday\n\t\tcheckDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );\n\n\t\ttime = checkDate.getTime();\n\t\tcheckDate.setMonth( 0 ); // Compare with Jan 1\n\t\tcheckDate.setDate( 1 );\n\t\treturn Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;\n\t},\n\n\t/* Parse a string value into a date object.\n\t * See formatDate below for the possible formats.\n\t *\n\t * @param format string - the expected format of the date\n\t * @param value string - the date in the above format\n\t * @param settings Object - attributes include:\n\t *\t\t\t\t\tshortYearCutoff number - the cutoff year for determining the century (optional)\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return Date - the extracted date value or null if value is blank\n\t */\n\tparseDate: function( format, value, settings ) {\n\t\tif ( format == null || value == null ) {\n\t\t\tthrow \"Invalid arguments\";\n\t\t}\n\n\t\tvalue = ( typeof value === \"object\" ? value.toString() : value + \"\" );\n\t\tif ( value === \"\" ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar iFormat, dim, extra,\n\t\t\tiValue = 0,\n\t\t\tshortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,\n\t\t\tshortYearCutoff = ( typeof shortYearCutoffTemp !== \"string\" ? shortYearCutoffTemp :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),\n\t\t\tdayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,\n\t\t\tdayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,\n\t\t\tyear = -1,\n\t\t\tmonth = -1,\n\t\t\tday = -1,\n\t\t\tdoy = -1,\n\t\t\tliteral = false,\n\t\t\tdate,\n\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function( match ) {\n\t\t\t\tvar matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );\n\t\t\t\tif ( matches ) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\n\t\t\t// Extract a number from the string value\n\t\t\tgetNumber = function( match ) {\n\t\t\t\tvar isDoubled = lookAhead( match ),\n\t\t\t\t\tsize = ( match === \"@\" ? 14 : ( match === \"!\" ? 20 :\n\t\t\t\t\t( match === \"y\" && isDoubled ? 4 : ( match === \"o\" ? 3 : 2 ) ) ) ),\n\t\t\t\t\tminSize = ( match === \"y\" ? size : 1 ),\n\t\t\t\t\tdigits = new RegExp( \"^\\\\d{\" + minSize + \",\" + size + \"}\" ),\n\t\t\t\t\tnum = value.substring( iValue ).match( digits );\n\t\t\t\tif ( !num ) {\n\t\t\t\t\tthrow \"Missing number at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue += num[ 0 ].length;\n\t\t\t\treturn parseInt( num[ 0 ], 10 );\n\t\t\t},\n\n\t\t\t// Extract a name from the string value and convert to an index\n\t\t\tgetName = function( match, shortNames, longNames ) {\n\t\t\t\tvar index = -1,\n\t\t\t\t\tnames = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {\n\t\t\t\t\t\treturn [ [ k, v ] ];\n\t\t\t\t\t} ).sort( function( a, b ) {\n\t\t\t\t\t\treturn -( a[ 1 ].length - b[ 1 ].length );\n\t\t\t\t\t} );\n\n\t\t\t\t$.each( names, function( i, pair ) {\n\t\t\t\t\tvar name = pair[ 1 ];\n\t\t\t\t\tif ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {\n\t\t\t\t\t\tindex = pair[ 0 ];\n\t\t\t\t\t\tiValue += name.length;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\tif ( index !== -1 ) {\n\t\t\t\t\treturn index + 1;\n\t\t\t\t} else {\n\t\t\t\t\tthrow \"Unknown name at position \" + iValue;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// Confirm that a literal character matches the string value\n\t\t\tcheckLiteral = function() {\n\t\t\t\tif ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {\n\t\t\t\t\tthrow \"Unexpected literal at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue++;\n\t\t\t};\n\n\t\tfor ( iFormat = 0; iFormat < format.length; iFormat++ ) {\n\t\t\tif ( literal ) {\n\t\t\t\tif ( format.charAt( iFormat ) === \"'\" && !lookAhead( \"'\" ) ) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch ( format.charAt( iFormat ) ) {\n\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\tday = getNumber( \"d\" );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\tgetName( \"D\", dayNamesShort, dayNames );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\tdoy = getNumber( \"o\" );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\tmonth = getNumber( \"m\" );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\tmonth = getName( \"M\", monthNamesShort, monthNames );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\tyear = getNumber( \"y\" );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\tdate = new Date( getNumber( \"@\" ) );\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\tdate = new Date( ( getNumber( \"!\" ) - this._ticksTo1970 ) / 10000 );\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif ( lookAhead( \"'\" ) ) {\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( iValue < value.length ) {\n\t\t\textra = value.substr( iValue );\n\t\t\tif ( !/^\\s+/.test( extra ) ) {\n\t\t\t\tthrow \"Extra/unparsed characters found in date: \" + extra;\n\t\t\t}\n\t\t}\n\n\t\tif ( year === -1 ) {\n\t\t\tyear = new Date().getFullYear();\n\t\t} else if ( year < 100 ) {\n\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t( year <= shortYearCutoff ? 0 : -100 );\n\t\t}\n\n\t\tif ( doy > -1 ) {\n\t\t\tmonth = 1;\n\t\t\tday = doy;\n\t\t\tdo {\n\t\t\t\tdim = this._getDaysInMonth( year, month - 1 );\n\t\t\t\tif ( day <= dim ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmonth++;\n\t\t\t\tday -= dim;\n\t\t\t} while ( true );\n\t\t}\n\n\t\tdate = this._daylightSavingAdjust( new Date( year, month - 1, day ) );\n\t\tif ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {\n\t\t\tthrow \"Invalid date\"; // E.g. 31/02/00\n\t\t}\n\t\treturn date;\n\t},\n\n\t/* Standard date formats. */\n\tATOM: \"yy-mm-dd\", // RFC 3339 (ISO 8601)\n\tCOOKIE: \"D, dd M yy\",\n\tISO_8601: \"yy-mm-dd\",\n\tRFC_822: \"D, d M y\",\n\tRFC_850: \"DD, dd-M-y\",\n\tRFC_1036: \"D, d M y\",\n\tRFC_1123: \"D, d M yy\",\n\tRFC_2822: \"D, d M yy\",\n\tRSS: \"D, d M y\", // RFC 822\n\tTICKS: \"!\",\n\tTIMESTAMP: \"@\",\n\tW3C: \"yy-mm-dd\", // ISO 8601\n\n\t_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +\n\t\tMath.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),\n\n\t/* Format a date object into a string value.\n\t * The format can be combinations of the following:\n\t * d - day of month (no leading zero)\n\t * dd - day of month (two digit)\n\t * o - day of year (no leading zeros)\n\t * oo - day of year (three digit)\n\t * D - day name short\n\t * DD - day name long\n\t * m - month of year (no leading zero)\n\t * mm - month of year (two digit)\n\t * M - month name short\n\t * MM - month name long\n\t * y - year (two digit)\n\t * yy - year (four digit)\n\t * @ - Unix timestamp (ms since 01/01/1970)\n\t * ! - Windows ticks (100ns since 01/01/0001)\n\t * \"...\" - literal text\n\t * '' - single quote\n\t *\n\t * @param format string - the desired format of the date\n\t * @param date Date - the date value to format\n\t * @param settings Object - attributes include:\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return string - the date in the above format\n\t */\n\tformatDate: function( format, date, settings ) {\n\t\tif ( !date ) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tvar iFormat,\n\t\t\tdayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,\n\t\t\tdayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,\n\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function( match ) {\n\t\t\t\tvar matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );\n\t\t\t\tif ( matches ) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\n\t\t\t// Format a number, with leading zero if necessary\n\t\t\tformatNumber = function( match, value, len ) {\n\t\t\t\tvar num = \"\" + value;\n\t\t\t\tif ( lookAhead( match ) ) {\n\t\t\t\t\twhile ( num.length < len ) {\n\t\t\t\t\t\tnum = \"0\" + num;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn num;\n\t\t\t},\n\n\t\t\t// Format a name, short or long as requested\n\t\t\tformatName = function( match, value, shortNames, longNames ) {\n\t\t\t\treturn ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );\n\t\t\t},\n\t\t\toutput = \"\",\n\t\t\tliteral = false;\n\n\t\tif ( date ) {\n\t\t\tfor ( iFormat = 0; iFormat < format.length; iFormat++ ) {\n\t\t\t\tif ( literal ) {\n\t\t\t\t\tif ( format.charAt( iFormat ) === \"'\" && !lookAhead( \"'\" ) ) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput += format.charAt( iFormat );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch ( format.charAt( iFormat ) ) {\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\toutput += formatNumber( \"d\", date.getDate(), 2 );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\toutput += formatName( \"D\", date.getDay(), dayNamesShort, dayNames );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\toutput += formatNumber( \"o\",\n\t\t\t\t\t\t\t\tMath.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\toutput += formatNumber( \"m\", date.getMonth() + 1, 2 );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\toutput += formatName( \"M\", date.getMonth(), monthNamesShort, monthNames );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\toutput += ( lookAhead( \"y\" ) ? date.getFullYear() :\n\t\t\t\t\t\t\t\t( date.getFullYear() % 100 < 10 ? \"0\" : \"\" ) + date.getFullYear() % 100 );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif ( lookAhead( \"'\" ) ) {\n\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\toutput += format.charAt( iFormat );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t},\n\n\t/* Extract all possible characters from the date format. */\n\t_possibleChars: function( format ) {\n\t\tvar iFormat,\n\t\t\tchars = \"\",\n\t\t\tliteral = false,\n\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function( match ) {\n\t\t\t\tvar matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );\n\t\t\t\tif ( matches ) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t};\n\n\t\tfor ( iFormat = 0; iFormat < format.length; iFormat++ ) {\n\t\t\tif ( literal ) {\n\t\t\t\tif ( format.charAt( iFormat ) === \"'\" && !lookAhead( \"'\" ) ) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tchars += format.charAt( iFormat );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch ( format.charAt( iFormat ) ) {\n\t\t\t\t\tcase \"d\": case \"m\": case \"y\": case \"@\":\n\t\t\t\t\t\tchars += \"0123456789\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\": case \"M\":\n\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif ( lookAhead( \"'\" ) ) {\n\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tchars += format.charAt( iFormat );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn chars;\n\t},\n\n\t/* Get a setting value, defaulting if necessary. */\n\t_get: function( inst, name ) {\n\t\treturn inst.settings[ name ] !== undefined ?\n\t\t\tinst.settings[ name ] : this._defaults[ name ];\n\t},\n\n\t/* Parse existing date and initialise date picker. */\n\t_setDateFromField: function( inst, noDefault ) {\n\t\tif ( inst.input.val() === inst.lastVal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar dateFormat = this._get( inst, \"dateFormat\" ),\n\t\t\tdates = inst.lastVal = inst.input ? inst.input.val() : null,\n\t\t\tdefaultDate = this._getDefaultDate( inst ),\n\t\t\tdate = defaultDate,\n\t\t\tsettings = this._getFormatConfig( inst );\n\n\t\ttry {\n\t\t\tdate = this.parseDate( dateFormat, dates, settings ) || defaultDate;\n\t\t} catch ( event ) {\n\t\t\tdates = ( noDefault ? \"\" : dates );\n\t\t}\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tinst.currentDay = ( dates ? date.getDate() : 0 );\n\t\tinst.currentMonth = ( dates ? date.getMonth() : 0 );\n\t\tinst.currentYear = ( dates ? date.getFullYear() : 0 );\n\t\tthis._adjustInstDate( inst );\n\t},\n\n\t/* Retrieve the default date shown on opening. */\n\t_getDefaultDate: function( inst ) {\n\t\treturn this._restrictMinMax( inst,\n\t\t\tthis._determineDate( inst, this._get( inst, \"defaultDate\" ), new Date() ) );\n\t},\n\n\t/* A date may be specified as an exact value or a relative one. */\n\t_determineDate: function( inst, date, defaultDate ) {\n\t\tvar offsetNumeric = function( offset ) {\n\t\t\t\tvar date = new Date();\n\t\t\t\tdate.setDate( date.getDate() + offset );\n\t\t\t\treturn date;\n\t\t\t},\n\t\t\toffsetString = function( offset ) {\n\t\t\t\ttry {\n\t\t\t\t\treturn $.datepicker.parseDate( $.datepicker._get( inst, \"dateFormat\" ),\n\t\t\t\t\t\toffset, $.datepicker._getFormatConfig( inst ) );\n\t\t\t\t}\n\t\t\t\tcatch ( e ) {\n\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\tvar date = ( offset.toLowerCase().match( /^c/ ) ?\n\t\t\t\t\t$.datepicker._getDate( inst ) : null ) || new Date(),\n\t\t\t\t\tyear = date.getFullYear(),\n\t\t\t\t\tmonth = date.getMonth(),\n\t\t\t\t\tday = date.getDate(),\n\t\t\t\t\tpattern = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,\n\t\t\t\t\tmatches = pattern.exec( offset );\n\n\t\t\t\twhile ( matches ) {\n\t\t\t\t\tswitch ( matches[ 2 ] || \"d\" ) {\n\t\t\t\t\t\tcase \"d\" : case \"D\" :\n\t\t\t\t\t\t\tday += parseInt( matches[ 1 ], 10 ); break;\n\t\t\t\t\t\tcase \"w\" : case \"W\" :\n\t\t\t\t\t\t\tday += parseInt( matches[ 1 ], 10 ) * 7; break;\n\t\t\t\t\t\tcase \"m\" : case \"M\" :\n\t\t\t\t\t\t\tmonth += parseInt( matches[ 1 ], 10 );\n\t\t\t\t\t\t\tday = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\": case \"Y\" :\n\t\t\t\t\t\t\tyear += parseInt( matches[ 1 ], 10 );\n\t\t\t\t\t\t\tday = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmatches = pattern.exec( offset );\n\t\t\t\t}\n\t\t\t\treturn new Date( year, month, day );\n\t\t\t},\n\t\t\tnewDate = ( date == null || date === \"\" ? defaultDate : ( typeof date === \"string\" ? offsetString( date ) :\n\t\t\t\t( typeof date === \"number\" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );\n\n\t\tnewDate = ( newDate && newDate.toString() === \"Invalid Date\" ? defaultDate : newDate );\n\t\tif ( newDate ) {\n\t\t\tnewDate.setHours( 0 );\n\t\t\tnewDate.setMinutes( 0 );\n\t\t\tnewDate.setSeconds( 0 );\n\t\t\tnewDate.setMilliseconds( 0 );\n\t\t}\n\t\treturn this._daylightSavingAdjust( newDate );\n\t},\n\n\t/* Handle switch to/from daylight saving.\n\t * Hours may be non-zero on daylight saving cut-over:\n\t * > 12 when midnight changeover, but then cannot generate\n\t * midnight datetime, so jump to 1AM, otherwise reset.\n\t * @param date (Date) the date to check\n\t * @return (Date) the corrected date\n\t */\n\t_daylightSavingAdjust: function( date ) {\n\t\tif ( !date ) {\n\t\t\treturn null;\n\t\t}\n\t\tdate.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );\n\t\treturn date;\n\t},\n\n\t/* Set the date(s) directly. */\n\t_setDate: function( inst, date, noChange ) {\n\t\tvar clear = !date,\n\t\t\torigMonth = inst.selectedMonth,\n\t\t\torigYear = inst.selectedYear,\n\t\t\tnewDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );\n\n\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\tif ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {\n\t\t\tthis._notifyChange( inst );\n\t\t}\n\t\tthis._adjustInstDate( inst );\n\t\tif ( inst.input ) {\n\t\t\tinst.input.val( clear ? \"\" : this._formatDate( inst ) );\n\t\t}\n\t},\n\n\t/* Retrieve the date(s) directly. */\n\t_getDate: function( inst ) {\n\t\tvar startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === \"\" ) ? null :\n\t\t\tthis._daylightSavingAdjust( new Date(\n\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay ) ) );\n\t\t\treturn startDate;\n\t},\n\n\t/* Attach the onxxx handlers. These are declared statically so\n\t * they work with static code transformers like Caja.\n\t */\n\t_attachHandlers: function( inst ) {\n\t\tvar stepMonths = this._get( inst, \"stepMonths\" ),\n\t\t\tid = \"#\" + inst.id.replace( /\\\\\\\\/g, \"\\\\\" );\n\t\tinst.dpDiv.find( \"[data-handler]\" ).map( function() {\n\t\t\tvar handler = {\n\t\t\t\tprev: function() {\n\t\t\t\t\t$.datepicker._adjustDate( id, -stepMonths, \"M\" );\n\t\t\t\t},\n\t\t\t\tnext: function() {\n\t\t\t\t\t$.datepicker._adjustDate( id, +stepMonths, \"M\" );\n\t\t\t\t},\n\t\t\t\thide: function() {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t},\n\t\t\t\ttoday: function() {\n\t\t\t\t\t$.datepicker._gotoToday( id );\n\t\t\t\t},\n\t\t\t\tselectDay: function() {\n\t\t\t\t\t$.datepicker._selectDay( id, +this.getAttribute( \"data-month\" ), +this.getAttribute( \"data-year\" ), this );\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectMonth: function() {\n\t\t\t\t\t$.datepicker._selectMonthYear( id, this, \"M\" );\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectYear: function() {\n\t\t\t\t\t$.datepicker._selectMonthYear( id, this, \"Y\" );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$( this ).on( this.getAttribute( \"data-event\" ), handler[ this.getAttribute( \"data-handler\" ) ] );\n\t\t} );\n\t},\n\n\t/* Generate the HTML for the current state of the date picker. */\n\t_generateHTML: function( inst ) {\n\t\tvar maxDraw, prevText, prev, nextText, next, currentText, gotoDate,\n\t\t\tcontrols, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,\n\t\t\tmonthNames, monthNamesShort, beforeShowDay, showOtherMonths,\n\t\t\tselectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,\n\t\t\tcornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,\n\t\t\tprintDate, dRow, tbody, daySettings, otherMonth, unselectable,\n\t\t\ttempDate = new Date(),\n\t\t\ttoday = this._daylightSavingAdjust(\n\t\t\t\tnew Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time\n\t\t\tisRTL = this._get( inst, \"isRTL\" ),\n\t\t\tshowButtonPanel = this._get( inst, \"showButtonPanel\" ),\n\t\t\thideIfNoPrevNext = this._get( inst, \"hideIfNoPrevNext\" ),\n\t\t\tnavigationAsDateFormat = this._get( inst, \"navigationAsDateFormat\" ),\n\t\t\tnumMonths = this._getNumberOfMonths( inst ),\n\t\t\tshowCurrentAtPos = this._get( inst, \"showCurrentAtPos\" ),\n\t\t\tstepMonths = this._get( inst, \"stepMonths\" ),\n\t\t\tisMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),\n\t\t\tcurrentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :\n\t\t\t\tnew Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),\n\t\t\tminDate = this._getMinMaxDate( inst, \"min\" ),\n\t\t\tmaxDate = this._getMinMaxDate( inst, \"max\" ),\n\t\t\tdrawMonth = inst.drawMonth - showCurrentAtPos,\n\t\t\tdrawYear = inst.drawYear;\n\n\t\tif ( drawMonth < 0 ) {\n\t\t\tdrawMonth += 12;\n\t\t\tdrawYear--;\n\t\t}\n\t\tif ( maxDate ) {\n\t\t\tmaxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),\n\t\t\t\tmaxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );\n\t\t\tmaxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );\n\t\t\twhile ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {\n\t\t\t\tdrawMonth--;\n\t\t\t\tif ( drawMonth < 0 ) {\n\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\tdrawYear--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinst.drawMonth = drawMonth;\n\t\tinst.drawYear = drawYear;\n\n\t\tprevText = this._get( inst, \"prevText\" );\n\t\tprevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,\n\t\t\tthis._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),\n\t\t\tthis._getFormatConfig( inst ) ) );\n\n\t\tprev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?\n\t\t\t\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'\" +\n\t\t\t\" title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\" ) + \"'>\" + prevText + \"</span></a>\" :\n\t\t\t( hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\" ) + \"'>\" + prevText + \"</span></a>\" ) );\n\n\t\tnextText = this._get( inst, \"nextText\" );\n\t\tnextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,\n\t\t\tthis._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),\n\t\t\tthis._getFormatConfig( inst ) ) );\n\n\t\tnext = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?\n\t\t\t\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'\" +\n\t\t\t\" title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\" ) + \"'>\" + nextText + \"</span></a>\" :\n\t\t\t( hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\" ) + \"'>\" + nextText + \"</span></a>\" ) );\n\n\t\tcurrentText = this._get( inst, \"currentText\" );\n\t\tgotoDate = ( this._get( inst, \"gotoCurrent\" ) && inst.currentDay ? currentDate : today );\n\t\tcurrentText = ( !navigationAsDateFormat ? currentText :\n\t\t\tthis.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );\n\n\t\tcontrols = ( !inst.inline ? \"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\" +\n\t\t\tthis._get( inst, \"closeText\" ) + \"</button>\" : \"\" );\n\n\t\tbuttonPanel = ( showButtonPanel ) ? \"<div class='ui-datepicker-buttonpane ui-widget-content'>\" + ( isRTL ? controls : \"\" ) +\n\t\t\t( this._isInRange( inst, gotoDate ) ? \"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'\" +\n\t\t\t\">\" + currentText + \"</button>\" : \"\" ) + ( isRTL ? \"\" : controls ) + \"</div>\" : \"\";\n\n\t\tfirstDay = parseInt( this._get( inst, \"firstDay\" ), 10 );\n\t\tfirstDay = ( isNaN( firstDay ) ? 0 : firstDay );\n\n\t\tshowWeek = this._get( inst, \"showWeek\" );\n\t\tdayNames = this._get( inst, \"dayNames\" );\n\t\tdayNamesMin = this._get( inst, \"dayNamesMin\" );\n\t\tmonthNames = this._get( inst, \"monthNames\" );\n\t\tmonthNamesShort = this._get( inst, \"monthNamesShort\" );\n\t\tbeforeShowDay = this._get( inst, \"beforeShowDay\" );\n\t\tshowOtherMonths = this._get( inst, \"showOtherMonths\" );\n\t\tselectOtherMonths = this._get( inst, \"selectOtherMonths\" );\n\t\tdefaultDate = this._getDefaultDate( inst );\n\t\thtml = \"\";\n\n\t\tfor ( row = 0; row < numMonths[ 0 ]; row++ ) {\n\t\t\tgroup = \"\";\n\t\t\tthis.maxRows = 4;\n\t\t\tfor ( col = 0; col < numMonths[ 1 ]; col++ ) {\n\t\t\t\tselectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );\n\t\t\t\tcornerClass = \" ui-corner-all\";\n\t\t\t\tcalender = \"\";\n\t\t\t\tif ( isMultiMonth ) {\n\t\t\t\t\tcalender += \"<div class='ui-datepicker-group\";\n\t\t\t\t\tif ( numMonths[ 1 ] > 1 ) {\n\t\t\t\t\t\tswitch ( col ) {\n\t\t\t\t\t\t\tcase 0: calender += \" ui-datepicker-group-first\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + ( isRTL ? \"right\" : \"left\" ); break;\n\t\t\t\t\t\t\tcase numMonths[ 1 ] - 1: calender += \" ui-datepicker-group-last\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + ( isRTL ? \"left\" : \"right\" ); break;\n\t\t\t\t\t\t\tdefault: calender += \" ui-datepicker-group-middle\"; cornerClass = \"\"; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"'>\";\n\t\t\t\t}\n\t\t\t\tcalender += \"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\" + cornerClass + \"'>\" +\n\t\t\t\t\t( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : \"\" ) +\n\t\t\t\t\t( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : \"\" ) +\n\t\t\t\t\tthis._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers\n\t\t\t\t\t\"</div><table class='ui-datepicker-calendar'><thead>\" +\n\t\t\t\t\t\"<tr>\";\n\t\t\t\tthead = ( showWeek ? \"<th class='ui-datepicker-week-col'>\" + this._get( inst, \"weekHeader\" ) + \"</th>\" : \"\" );\n\t\t\t\tfor ( dow = 0; dow < 7; dow++ ) { // days of the week\n\t\t\t\t\tday = ( dow + firstDay ) % 7;\n\t\t\t\t\tthead += \"<th scope='col'\" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? \" class='ui-datepicker-week-end'\" : \"\" ) + \">\" +\n\t\t\t\t\t\t\"<span title='\" + dayNames[ day ] + \"'>\" + dayNamesMin[ day ] + \"</span></th>\";\n\t\t\t\t}\n\t\t\t\tcalender += thead + \"</tr></thead><tbody>\";\n\t\t\t\tdaysInMonth = this._getDaysInMonth( drawYear, drawMonth );\n\t\t\t\tif ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {\n\t\t\t\t\tinst.selectedDay = Math.min( inst.selectedDay, daysInMonth );\n\t\t\t\t}\n\t\t\t\tleadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;\n\t\t\t\tcurRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate\n\t\t\t\tnumRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\tthis.maxRows = numRows;\n\t\t\t\tprintDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );\n\t\t\t\tfor ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows\n\t\t\t\t\tcalender += \"<tr>\";\n\t\t\t\t\ttbody = ( !showWeek ? \"\" : \"<td class='ui-datepicker-week-col'>\" +\n\t\t\t\t\t\tthis._get( inst, \"calculateWeek\" )( printDate ) + \"</td>\" );\n\t\t\t\t\tfor ( dow = 0; dow < 7; dow++ ) { // create date picker days\n\t\t\t\t\t\tdaySettings = ( beforeShowDay ?\n\t\t\t\t\t\t\tbeforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, \"\" ] );\n\t\t\t\t\t\totherMonth = ( printDate.getMonth() !== drawMonth );\n\t\t\t\t\t\tunselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||\n\t\t\t\t\t\t\t( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );\n\t\t\t\t\t\ttbody += \"<td class='\" +\n\t\t\t\t\t\t\t( ( dow + firstDay + 6 ) % 7 >= 5 ? \" ui-datepicker-week-end\" : \"\" ) + // highlight weekends\n\t\t\t\t\t\t\t( otherMonth ? \" ui-datepicker-other-month\" : \"\" ) + // highlight days from other months\n\t\t\t\t\t\t\t( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key\n\t\t\t\t\t\t\t( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?\n\n\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t\" \" + this._dayOverClass : \"\" ) + // highlight selected day\n\t\t\t\t\t\t\t( unselectable ? \" \" + this._unselectableClass + \" ui-state-disabled\" : \"\" ) + // highlight unselectable days\n\t\t\t\t\t\t\t( otherMonth && !showOtherMonths ? \"\" : \" \" + daySettings[ 1 ] + // highlight custom dates\n\t\t\t\t\t\t\t( printDate.getTime() === currentDate.getTime() ? \" \" + this._currentClass : \"\" ) + // highlight selected day\n\t\t\t\t\t\t\t( printDate.getTime() === today.getTime() ? \" ui-datepicker-today\" : \"\" ) ) + \"'\" + // highlight today (if different)\n\t\t\t\t\t\t\t( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? \" title='\" + daySettings[ 2 ].replace( /'/g, \"&#39;\" ) + \"'\" : \"\" ) + // cell title\n\t\t\t\t\t\t\t( unselectable ? \"\" : \" data-handler='selectDay' data-event='click' data-month='\" + printDate.getMonth() + \"' data-year='\" + printDate.getFullYear() + \"'\" ) + \">\" + // actions\n\t\t\t\t\t\t\t( otherMonth && !showOtherMonths ? \"&#xa0;\" : // display for other months\n\t\t\t\t\t\t\t( unselectable ? \"<span class='ui-state-default'>\" + printDate.getDate() + \"</span>\" : \"<a class='ui-state-default\" +\n\t\t\t\t\t\t\t( printDate.getTime() === today.getTime() ? \" ui-state-highlight\" : \"\" ) +\n\t\t\t\t\t\t\t( printDate.getTime() === currentDate.getTime() ? \" ui-state-active\" : \"\" ) + // highlight selected day\n\t\t\t\t\t\t\t( otherMonth ? \" ui-priority-secondary\" : \"\" ) + // distinguish dates from other months\n\t\t\t\t\t\t\t\"' href='#'>\" + printDate.getDate() + \"</a>\" ) ) + \"</td>\"; // display selectable date\n\t\t\t\t\t\tprintDate.setDate( printDate.getDate() + 1 );\n\t\t\t\t\t\tprintDate = this._daylightSavingAdjust( printDate );\n\t\t\t\t\t}\n\t\t\t\t\tcalender += tbody + \"</tr>\";\n\t\t\t\t}\n\t\t\t\tdrawMonth++;\n\t\t\t\tif ( drawMonth > 11 ) {\n\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\tdrawYear++;\n\t\t\t\t}\n\t\t\t\tcalender += \"</tbody></table>\" + ( isMultiMonth ? \"</div>\" +\n\t\t\t\t\t\t\t( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? \"<div class='ui-datepicker-row-break'></div>\" : \"\" ) : \"\" );\n\t\t\t\tgroup += calender;\n\t\t\t}\n\t\t\thtml += group;\n\t\t}\n\t\thtml += buttonPanel;\n\t\tinst._keyEvent = false;\n\t\treturn html;\n\t},\n\n\t/* Generate the month and year header. */\n\t_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\tsecondary, monthNames, monthNamesShort ) {\n\n\t\tvar inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,\n\t\t\tchangeMonth = this._get( inst, \"changeMonth\" ),\n\t\t\tchangeYear = this._get( inst, \"changeYear\" ),\n\t\t\tshowMonthAfterYear = this._get( inst, \"showMonthAfterYear\" ),\n\t\t\thtml = \"<div class='ui-datepicker-title'>\",\n\t\t\tmonthHtml = \"\";\n\n\t\t// Month selection\n\t\tif ( secondary || !changeMonth ) {\n\t\t\tmonthHtml += \"<span class='ui-datepicker-month'>\" + monthNames[ drawMonth ] + \"</span>\";\n\t\t} else {\n\t\t\tinMinYear = ( minDate && minDate.getFullYear() === drawYear );\n\t\t\tinMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );\n\t\t\tmonthHtml += \"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\";\n\t\t\tfor ( month = 0; month < 12; month++ ) {\n\t\t\t\tif ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {\n\t\t\t\t\tmonthHtml += \"<option value='\" + month + \"'\" +\n\t\t\t\t\t\t( month === drawMonth ? \" selected='selected'\" : \"\" ) +\n\t\t\t\t\t\t\">\" + monthNamesShort[ month ] + \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmonthHtml += \"</select>\";\n\t\t}\n\n\t\tif ( !showMonthAfterYear ) {\n\t\t\thtml += monthHtml + ( secondary || !( changeMonth && changeYear ) ? \"&#xa0;\" : \"\" );\n\t\t}\n\n\t\t// Year selection\n\t\tif ( !inst.yearshtml ) {\n\t\t\tinst.yearshtml = \"\";\n\t\t\tif ( secondary || !changeYear ) {\n\t\t\t\thtml += \"<span class='ui-datepicker-year'>\" + drawYear + \"</span>\";\n\t\t\t} else {\n\n\t\t\t\t// determine range of years to display\n\t\t\t\tyears = this._get( inst, \"yearRange\" ).split( \":\" );\n\t\t\t\tthisYear = new Date().getFullYear();\n\t\t\t\tdetermineYear = function( value ) {\n\t\t\t\t\tvar year = ( value.match( /c[+\\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :\n\t\t\t\t\t\t( value.match( /[+\\-].*/ ) ? thisYear + parseInt( value, 10 ) :\n\t\t\t\t\t\tparseInt( value, 10 ) ) );\n\t\t\t\t\treturn ( isNaN( year ) ? thisYear : year );\n\t\t\t\t};\n\t\t\t\tyear = determineYear( years[ 0 ] );\n\t\t\t\tendYear = Math.max( year, determineYear( years[ 1 ] || \"\" ) );\n\t\t\t\tyear = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );\n\t\t\t\tendYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );\n\t\t\t\tinst.yearshtml += \"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";\n\t\t\t\tfor ( ; year <= endYear; year++ ) {\n\t\t\t\t\tinst.yearshtml += \"<option value='\" + year + \"'\" +\n\t\t\t\t\t\t( year === drawYear ? \" selected='selected'\" : \"\" ) +\n\t\t\t\t\t\t\">\" + year + \"</option>\";\n\t\t\t\t}\n\t\t\t\tinst.yearshtml += \"</select>\";\n\n\t\t\t\thtml += inst.yearshtml;\n\t\t\t\tinst.yearshtml = null;\n\t\t\t}\n\t\t}\n\n\t\thtml += this._get( inst, \"yearSuffix\" );\n\t\tif ( showMonthAfterYear ) {\n\t\t\thtml += ( secondary || !( changeMonth && changeYear ) ? \"&#xa0;\" : \"\" ) + monthHtml;\n\t\t}\n\t\thtml += \"</div>\"; // Close datepicker_header\n\t\treturn html;\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustInstDate: function( inst, offset, period ) {\n\t\tvar year = inst.selectedYear + ( period === \"Y\" ? offset : 0 ),\n\t\t\tmonth = inst.selectedMonth + ( period === \"M\" ? offset : 0 ),\n\t\t\tday = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === \"D\" ? offset : 0 ),\n\t\t\tdate = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );\n\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tif ( period === \"M\" || period === \"Y\" ) {\n\t\t\tthis._notifyChange( inst );\n\t\t}\n\t},\n\n\t/* Ensure a date is within any min/max bounds. */\n\t_restrictMinMax: function( inst, date ) {\n\t\tvar minDate = this._getMinMaxDate( inst, \"min\" ),\n\t\t\tmaxDate = this._getMinMaxDate( inst, \"max\" ),\n\t\t\tnewDate = ( minDate && date < minDate ? minDate : date );\n\t\treturn ( maxDate && newDate > maxDate ? maxDate : newDate );\n\t},\n\n\t/* Notify change of month/year. */\n\t_notifyChange: function( inst ) {\n\t\tvar onChange = this._get( inst, \"onChangeMonthYear\" );\n\t\tif ( onChange ) {\n\t\t\tonChange.apply( ( inst.input ? inst.input[ 0 ] : null ),\n\t\t\t\t[ inst.selectedYear, inst.selectedMonth + 1, inst ] );\n\t\t}\n\t},\n\n\t/* Determine the number of months to show. */\n\t_getNumberOfMonths: function( inst ) {\n\t\tvar numMonths = this._get( inst, \"numberOfMonths\" );\n\t\treturn ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === \"number\" ? [ 1, numMonths ] : numMonths ) );\n\t},\n\n\t/* Determine the current maximum date - ensure no time components are set. */\n\t_getMinMaxDate: function( inst, minMax ) {\n\t\treturn this._determineDate( inst, this._get( inst, minMax + \"Date\" ), null );\n\t},\n\n\t/* Find the number of days in a given month. */\n\t_getDaysInMonth: function( year, month ) {\n\t\treturn 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();\n\t},\n\n\t/* Find the day of the week of the first of a month. */\n\t_getFirstDayOfMonth: function( year, month ) {\n\t\treturn new Date( year, month, 1 ).getDay();\n\t},\n\n\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t_canAdjustMonth: function( inst, offset, curYear, curMonth ) {\n\t\tvar numMonths = this._getNumberOfMonths( inst ),\n\t\t\tdate = this._daylightSavingAdjust( new Date( curYear,\n\t\t\tcurMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );\n\n\t\tif ( offset < 0 ) {\n\t\t\tdate.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );\n\t\t}\n\t\treturn this._isInRange( inst, date );\n\t},\n\n\t/* Is the given date in the accepted range? */\n\t_isInRange: function( inst, date ) {\n\t\tvar yearSplit, currentYear,\n\t\t\tminDate = this._getMinMaxDate( inst, \"min\" ),\n\t\t\tmaxDate = this._getMinMaxDate( inst, \"max\" ),\n\t\t\tminYear = null,\n\t\t\tmaxYear = null,\n\t\t\tyears = this._get( inst, \"yearRange\" );\n\t\t\tif ( years ) {\n\t\t\t\tyearSplit = years.split( \":\" );\n\t\t\t\tcurrentYear = new Date().getFullYear();\n\t\t\t\tminYear = parseInt( yearSplit[ 0 ], 10 );\n\t\t\t\tmaxYear = parseInt( yearSplit[ 1 ], 10 );\n\t\t\t\tif ( yearSplit[ 0 ].match( /[+\\-].*/ ) ) {\n\t\t\t\t\tminYear += currentYear;\n\t\t\t\t}\n\t\t\t\tif ( yearSplit[ 1 ].match( /[+\\-].*/ ) ) {\n\t\t\t\t\tmaxYear += currentYear;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn ( ( !minDate || date.getTime() >= minDate.getTime() ) &&\n\t\t\t( !maxDate || date.getTime() <= maxDate.getTime() ) &&\n\t\t\t( !minYear || date.getFullYear() >= minYear ) &&\n\t\t\t( !maxYear || date.getFullYear() <= maxYear ) );\n\t},\n\n\t/* Provide the configuration settings for formatting/parsing. */\n\t_getFormatConfig: function( inst ) {\n\t\tvar shortYearCutoff = this._get( inst, \"shortYearCutoff\" );\n\t\tshortYearCutoff = ( typeof shortYearCutoff !== \"string\" ? shortYearCutoff :\n\t\t\tnew Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );\n\t\treturn { shortYearCutoff: shortYearCutoff,\n\t\t\tdayNamesShort: this._get( inst, \"dayNamesShort\" ), dayNames: this._get( inst, \"dayNames\" ),\n\t\t\tmonthNamesShort: this._get( inst, \"monthNamesShort\" ), monthNames: this._get( inst, \"monthNames\" ) };\n\t},\n\n\t/* Format the given date for display. */\n\t_formatDate: function( inst, day, month, year ) {\n\t\tif ( !day ) {\n\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\tinst.currentYear = inst.selectedYear;\n\t\t}\n\t\tvar date = ( day ? ( typeof day === \"object\" ? day :\n\t\t\tthis._daylightSavingAdjust( new Date( year, month, day ) ) ) :\n\t\t\tthis._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );\n\t\treturn this.formatDate( this._get( inst, \"dateFormat\" ), date, this._getFormatConfig( inst ) );\n\t}\n} );\n\n/*\n * Bind hover events for datepicker elements.\n * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */\nfunction datepicker_bindHover( dpDiv ) {\n\tvar selector = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n\treturn dpDiv.on( \"mouseout\", selector, function() {\n\t\t\t$( this ).removeClass( \"ui-state-hover\" );\n\t\t\tif ( this.className.indexOf( \"ui-datepicker-prev\" ) !== -1 ) {\n\t\t\t\t$( this ).removeClass( \"ui-datepicker-prev-hover\" );\n\t\t\t}\n\t\t\tif ( this.className.indexOf( \"ui-datepicker-next\" ) !== -1 ) {\n\t\t\t\t$( this ).removeClass( \"ui-datepicker-next-hover\" );\n\t\t\t}\n\t\t} )\n\t\t.on( \"mouseover\", selector, datepicker_handleMouseover );\n}\n\nfunction datepicker_handleMouseover() {\n\tif ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {\n\t\t$( this ).parents( \".ui-datepicker-calendar\" ).find( \"a\" ).removeClass( \"ui-state-hover\" );\n\t\t$( this ).addClass( \"ui-state-hover\" );\n\t\tif ( this.className.indexOf( \"ui-datepicker-prev\" ) !== -1 ) {\n\t\t\t$( this ).addClass( \"ui-datepicker-prev-hover\" );\n\t\t}\n\t\tif ( this.className.indexOf( \"ui-datepicker-next\" ) !== -1 ) {\n\t\t\t$( this ).addClass( \"ui-datepicker-next-hover\" );\n\t\t}\n\t}\n}\n\n/* jQuery extend now ignores nulls! */\nfunction datepicker_extendRemove( target, props ) {\n\t$.extend( target, props );\n\tfor ( var name in props ) {\n\t\tif ( props[ name ] == null ) {\n\t\t\ttarget[ name ] = props[ name ];\n\t\t}\n\t}\n\treturn target;\n}\n\n/* Invoke the datepicker functionality.\n @param options string - a command, optionally followed by additional parameters or\n\t\t\t\t\tObject - settings for attaching new datepicker functionality\n @return jQuery object */\n$.fn.datepicker = function( options ) {\n\n\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\tif ( !this.length ) {\n\t\treturn this;\n\t}\n\n\t/* Initialise the date picker. */\n\tif ( !$.datepicker.initialized ) {\n\t\t$( document ).on( \"mousedown\", $.datepicker._checkExternalClick );\n\t\t$.datepicker.initialized = true;\n\t}\n\n\t/* Append datepicker main container to body if not exist. */\n\tif ( $( \"#\" + $.datepicker._mainDivId ).length === 0 ) {\n\t\t$( \"body\" ).append( $.datepicker.dpDiv );\n\t}\n\n\tvar otherArgs = Array.prototype.slice.call( arguments, 1 );\n\tif ( typeof options === \"string\" && ( options === \"isDisabled\" || options === \"getDate\" || options === \"widget\" ) ) {\n\t\treturn $.datepicker[ \"_\" + options + \"Datepicker\" ].\n\t\t\tapply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );\n\t}\n\tif ( options === \"option\" && arguments.length === 2 && typeof arguments[ 1 ] === \"string\" ) {\n\t\treturn $.datepicker[ \"_\" + options + \"Datepicker\" ].\n\t\t\tapply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );\n\t}\n\treturn this.each( function() {\n\t\ttypeof options === \"string\" ?\n\t\t\t$.datepicker[ \"_\" + options + \"Datepicker\" ].\n\t\t\t\tapply( $.datepicker, [ this ].concat( otherArgs ) ) :\n\t\t\t$.datepicker._attachDatepicker( this, options );\n\t} );\n};\n\n$.datepicker = new Datepicker(); // singleton instance\n$.datepicker.initialized = false;\n$.datepicker.uuid = new Date().getTime();\n$.datepicker.version = \"1.12.1\";\n\nvar widgetsDatepicker = $.datepicker;\n\n\n\n\n// This file is deprecated\nvar ie = $.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\n/*!\n * jQuery UI Mouse 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Mouse\n//>>group: Widgets\n//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.\n//>>docs: http://api.jqueryui.com/mouse/\n\n\n\nvar mouseHandled = false;\n$( document ).on( \"mouseup\", function() {\n\tmouseHandled = false;\n} );\n\nvar widgetsMouse = $.widget( \"ui.mouse\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tcancel: \"input, textarea, button, select, option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.on( \"mousedown.\" + this.widgetName, function( event ) {\n\t\t\t\treturn that._mouseDown( event );\n\t\t\t} )\n\t\t\t.on( \"click.\" + this.widgetName, function( event ) {\n\t\t\t\tif ( true === $.data( event.target, that.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t\t\t$.removeData( event.target, that.widgetName + \".preventClickEvent\" );\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.off( \".\" + this.widgetName );\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\tthis.document\n\t\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\t\t}\n\t},\n\n\t_mouseDown: function( event ) {\n\n\t\t// don't let more than one widget handle mouseStart\n\t\tif ( mouseHandled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._mouseMoved = false;\n\n\t\t// We may have missed mouseup (out of window)\n\t\t( this._mouseStarted && this._mouseUp( event ) );\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = ( event.which === 1 ),\n\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = ( typeof this.options.cancel === \"string\" && event.target.nodeName ?\n\t\t\t\t$( event.target ).closest( this.options.cancel ).length : false );\n\t\tif ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif ( !this.mouseDelayMet ) {\n\t\t\tthis._mouseDelayTimer = setTimeout( function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay );\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted = ( this._mouseStart( event ) !== false );\n\t\t\tif ( !this._mouseStarted ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif ( true === $.data( event.target, this.widgetName + \".preventClickEvent\" ) ) {\n\t\t\t$.removeData( event.target, this.widgetName + \".preventClickEvent\" );\n\t\t}\n\n\t\t// These delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function( event ) {\n\t\t\treturn that._mouseMove( event );\n\t\t};\n\t\tthis._mouseUpDelegate = function( event ) {\n\t\t\treturn that._mouseUp( event );\n\t\t};\n\n\t\tthis.document\n\t\t\t.on( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.on( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function( event ) {\n\n\t\t// Only check for mouseups outside the document if you've moved inside the document\n\t\t// at least once. This prevents the firing of mouseup in the case of IE<9, which will\n\t\t// fire a mousemove event if content is placed under the cursor. See #7778\n\t\t// Support: IE <9\n\t\tif ( this._mouseMoved ) {\n\n\t\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\t\tif ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&\n\t\t\t\t\t!event.button ) {\n\t\t\t\treturn this._mouseUp( event );\n\n\t\t\t// Iframe mouseup check - mouseup occurred in another document\n\t\t\t} else if ( !event.which ) {\n\n\t\t\t\t// Support: Safari <=8 - 9\n\t\t\t\t// Safari sets which to 0 if you press any of the following keys\n\t\t\t\t// during a drag (#14461)\n\t\t\t\tif ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||\n\t\t\t\t\t\tevent.originalEvent.metaKey || event.originalEvent.shiftKey ) {\n\t\t\t\t\tthis.ignoreMissingWhich = true;\n\t\t\t\t} else if ( !this.ignoreMissingWhich ) {\n\t\t\t\t\treturn this._mouseUp( event );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( event.which || event.button ) {\n\t\t\tthis._mouseMoved = true;\n\t\t}\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseDrag( event );\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t( this._mouseStart( this._mouseDownEvent, event ) !== false );\n\t\t\t( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis.document\n\t\t\t.off( \"mousemove.\" + this.widgetName, this._mouseMoveDelegate )\n\t\t\t.off( \"mouseup.\" + this.widgetName, this._mouseUpDelegate );\n\n\t\tif ( this._mouseStarted ) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif ( event.target === this._mouseDownEvent.target ) {\n\t\t\t\t$.data( event.target, this.widgetName + \".preventClickEvent\", true );\n\t\t\t}\n\n\t\t\tthis._mouseStop( event );\n\t\t}\n\n\t\tif ( this._mouseDelayTimer ) {\n\t\t\tclearTimeout( this._mouseDelayTimer );\n\t\t\tdelete this._mouseDelayTimer;\n\t\t}\n\n\t\tthis.ignoreMissingWhich = false;\n\t\tmouseHandled = false;\n\t\tevent.preventDefault();\n\t},\n\n\t_mouseDistanceMet: function( event ) {\n\t\treturn ( Math.max(\n\t\t\t\tMath.abs( this._mouseDownEvent.pageX - event.pageX ),\n\t\t\t\tMath.abs( this._mouseDownEvent.pageY - event.pageY )\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function( /* event */ ) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function( /* event */ ) {},\n\t_mouseDrag: function( /* event */ ) {},\n\t_mouseStop: function( /* event */ ) {},\n\t_mouseCapture: function( /* event */ ) { return true; }\n} );\n\n\n\n\n// $.ui.plugin is deprecated. Use $.widget() extensions instead.\nvar plugin = $.ui.plugin = {\n\tadd: function( module, option, set ) {\n\t\tvar i,\n\t\t\tproto = $.ui[ module ].prototype;\n\t\tfor ( i in set ) {\n\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t}\n\t},\n\tcall: function( instance, name, args, allowDisconnected ) {\n\t\tvar i,\n\t\t\tset = instance.plugins[ name ];\n\n\t\tif ( !set ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||\n\t\t\t\tinstance.element[ 0 ].parentNode.nodeType === 11 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t}\n\t\t}\n\t}\n};\n\n\n\nvar safeBlur = $.ui.safeBlur = function( element ) {\n\n\t// Support: IE9 - 10 only\n\t// If the <body> is blurred, IE will switch windows, see #9420\n\tif ( element && element.nodeName.toLowerCase() !== \"body\" ) {\n\t\t$( element ).trigger( \"blur\" );\n\t}\n};\n\n\n/*!\n * jQuery UI Draggable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Draggable\n//>>group: Interactions\n//>>description: Enables dragging functionality for any element.\n//>>docs: http://api.jqueryui.com/draggable/\n//>>demos: http://jqueryui.com/draggable/\n//>>css.structure: ../../themes/base/draggable.css\n\n\n\n$.widget( \"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// Callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif ( this.options.helper === \"original\" ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\t\tif ( this.options.addClasses ) {\n\t\t\tthis._addClass( \"ui-draggable\" );\n\t\t}\n\t\tthis._setHandleClassName();\n\n\t\tthis._mouseInit();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._removeHandleClassName();\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tif ( ( this.helper || this.element ).is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis.destroyOnClear = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._removeHandleClassName();\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar o = this.options;\n\n\t\t// Among others, prevent a drag on a resizable-handle\n\t\tif ( this.helper || o.disabled ||\n\t\t\t\t$( event.target ).closest( \".ui-resizable-handle\" ).length > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle( event );\n\t\tif ( !this.handle ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis._blurActiveElement( event );\n\n\t\tthis._blockFrames( o.iframeFix === true ? \"iframe\" : o.iframeFix );\n\n\t\treturn true;\n\n\t},\n\n\t_blockFrames: function( selector ) {\n\t\tthis.iframeBlocks = this.document.find( selector ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( \"position\", \"absolute\" )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.outerWidth( iframe.outerWidth() )\n\t\t\t\t.outerHeight( iframe.outerHeight() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_blurActiveElement: function( event ) {\n\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\ttarget = $( event.target );\n\n\t\t// Don't blur if the event occurred on an element that is within\n\t\t// the currently focused element\n\t\t// See #10527, #12472\n\t\tif ( target.closest( activeElement ).length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Blur any element that currently has focus, see #4261\n\t\t$.ui.safeBlur( activeElement );\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\tthis._addClass( this.helper, \"ui-draggable-dragging\" );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent( true );\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.hasFixedAncestor = this.helper.parents().filter( function() {\n\t\t\t\treturn $( this ).css( \"position\" ) === \"fixed\";\n\t\t\t} ).length > 0;\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.positionAbs = this.element.offset();\n\t\tthis._refreshOffsets( event );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition( event, false );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif ( this._trigger( \"start\", event ) === false ) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\t// Execute the drag once - this causes the helper not to be visible before getting its\n\t\t// correct position\n\t\tthis._mouseDrag( event, true );\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has started\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart( this, event );\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_refreshOffsets: function( event ) {\n\t\tthis.offset = {\n\t\t\ttop: this.positionAbs.top - this.margins.top,\n\t\t\tleft: this.positionAbs.left - this.margins.left,\n\t\t\tscroll: false,\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset()\n\t\t};\n\n\t\tthis.offset.click = {\n\t\t\tleft: event.pageX - this.offset.left,\n\t\t\ttop: event.pageY - this.offset.top\n\t\t};\n\t},\n\n\t_mouseDrag: function( event, noPropagation ) {\n\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.hasFixedAncestor ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event, true );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif ( !noPropagation ) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif ( this._trigger( \"drag\", event, ui ) === false ) {\n\t\t\t\tthis._mouseUp( new $.Event( \"mouseup\", event ) );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\tdropped = $.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif ( this.dropped ) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\tif ( ( this.options.revert === \"invalid\" && !dropped ) ||\n\t\t\t\t( this.options.revert === \"valid\" && dropped ) ||\n\t\t\t\tthis.options.revert === true || ( $.isFunction( this.options.revert ) &&\n\t\t\t\tthis.options.revert.call( this.element, dropped ) )\n\t\t) {\n\t\t\t$( this.helper ).animate(\n\t\t\t\tthis.originalPosition,\n\t\t\t\tparseInt( this.options.revertDuration, 10 ),\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( that._trigger( \"stop\", event ) !== false ) {\n\t\t\t\t\t\tthat._clear();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tif ( this._trigger( \"stop\", event ) !== false ) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function( event ) {\n\t\tthis._unblockFrames();\n\n\t\t// If the ddmanager is used for droppables, inform the manager that dragging has stopped\n\t\t// (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop( this, event );\n\t\t}\n\n\t\t// Only need to focus if the event occurred on the draggable itself, see #10527\n\t\tif ( this.handleElement.is( event.target ) ) {\n\n\t\t\t// The interaction is over; whether or not the click resulted in a drag,\n\t\t\t// focus the element\n\t\t\tthis.element.trigger( \"focus\" );\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call( this, event );\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.helper.is( \".ui-draggable-dragging\" ) ) {\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: this.element[ 0 ] } ) );\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function( event ) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_setHandleClassName: function() {\n\t\tthis.handleElement = this.options.handle ?\n\t\t\tthis.element.find( this.options.handle ) : this.element;\n\t\tthis._addClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_removeHandleClassName: function() {\n\t\tthis._removeClass( this.handleElement, \"ui-draggable-handle\" );\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelperIsFunction = $.isFunction( o.helper ),\n\t\t\thelper = helperIsFunction ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ?\n\t\t\t\t\tthis.element.clone().removeAttr( \"id\" ) :\n\t\t\t\t\tthis.element );\n\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\thelper.appendTo( ( o.appendTo === \"parent\" ?\n\t\t\t\tthis.element[ 0 ].parentNode :\n\t\t\t\to.appendTo ) );\n\t\t}\n\n\t\t// Http://bugs.jqueryui.com/ticket/9446\n\t\t// a helper function can return the original element\n\t\t// which wouldn't have been set to relative in _create\n\t\tif ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {\n\t\t\tthis._setPositionRelative();\n\t\t}\n\n\t\tif ( helper[ 0 ] !== this.element[ 0 ] &&\n\t\t\t\t!( /(fixed|absolute)/ ).test( helper.css( \"position\" ) ) ) {\n\t\t\thelper.css( \"position\", \"absolute\" );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_setPositionRelative: function() {\n\t\tif ( !( /^(?:r|a|f)/ ).test( this.element.css( \"position\" ) ) ) {\n\t\t\tthis.element[ 0 ].style.position = \"relative\";\n\t\t}\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( $.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_isRootNode: function( element ) {\n\t\treturn ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset(),\n\t\t\tdocument = this.document[ 0 ];\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== document &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\tif ( this._isRootNode( this.offsetParent[ 0 ] ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\t\tif ( this.cssPosition !== \"relative\" ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\tvar p = this.element.position(),\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),\n\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )\n\t\t};\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.element.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.element.css( \"marginTop\" ), 10 ) || 0 ),\n\t\t\tright: ( parseInt( this.element.css( \"marginRight\" ), 10 ) || 0 ),\n\t\t\tbottom: ( parseInt( this.element.css( \"marginBottom\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar isUserScrollable, c, ce,\n\t\t\to = this.options,\n\t\t\tdocument = this.document[ 0 ];\n\n\t\tthis.relativeContainer = null;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() +\n\t\t\t\t\t( $( window ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUserScrollable = /(scroll|auto)/.test( c.css( \"overflow\" ) );\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ),\n\t\t\t( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.width -\n\t\t\t\tthis.margins.left -\n\t\t\t\tthis.margins.right,\n\t\t\t( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\tthis.helperProportions.height -\n\t\t\t\tthis.margins.top -\n\t\t\t\tthis.margins.bottom\n\t\t];\n\t\tthis.relativeContainer = c;\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event, constrainPosition ) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t// Cache the scroll\n\t\tif ( !scrollIsRootNode || !this.offset.scroll ) {\n\t\t\tthis.offset.scroll = {\n\t\t\t\ttop: this.scrollParent.scrollTop(),\n\t\t\t\tleft: this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( constrainPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relativeContainer ) {\n\t\t\t\t\tco = this.relativeContainer.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif ( event.pageX - this.offset.click.left < containment[ 0 ] ) {\n\t\t\t\t\tpageX = containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < containment[ 1 ] ) {\n\t\t\t\t\tpageY = containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > containment[ 2 ] ) {\n\t\t\t\t\tpageX = containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > containment[ 3 ] ) {\n\t\t\t\t\tpageY = containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid\n\t\t\t\t// argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -\n\t\t\t\t\tthis.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;\n\t\t\t\tpageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||\n\t\t\t\t\ttop - this.offset.click.top > containment[ 3 ] ) ?\n\t\t\t\t\t\ttop :\n\t\t\t\t\t\t( ( top - this.offset.click.top >= containment[ 1 ] ) ?\n\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;\n\n\t\t\t\tleft = o.grid[ 0 ] ? this.originalPageX +\n\t\t\t\t\tMath.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :\n\t\t\t\t\tthis.originalPageX;\n\t\t\t\tpageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||\n\t\t\t\t\tleft - this.offset.click.left > containment[ 2 ] ) ?\n\t\t\t\t\t\tleft :\n\t\t\t\t\t\t( ( left - this.offset.click.left >= containment[ 0 ] ) ?\n\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"y\" ) {\n\t\t\t\tpageX = this.originalPageX;\n\t\t\t}\n\n\t\t\tif ( o.axis === \"x\" ) {\n\t\t\t\tpageY = this.originalPageY;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.top :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.top ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.offset.scroll.left :\n\t\t\t\t\t( scrollIsRootNode ? 0 : this.offset.scroll.left ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis._removeClass( this.helper, \"ui-draggable-dragging\" );\n\t\tif ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t\tif ( this.destroyOnClear ) {\n\t\t\tthis.destroy();\n\t\t}\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function( type, event, ui ) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call( this, type, [ event, ui, this ], true );\n\n\t\t// Absolute position and offset (see #6884 ) have to be recalculated after plugins\n\t\tif ( /^(drag|start|stop)/.test( type ) ) {\n\t\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\t\t\tui.offset = this.positionAbs;\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call( this, type, event, ui );\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n} );\n\n$.ui.plugin.add( \"draggable\", \"connectToSortable\", {\n\tstart: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.sortables = [];\n\t\t$( draggable.options.connectToSortable ).each( function() {\n\t\t\tvar sortable = $( this ).sortable( \"instance\" );\n\n\t\t\tif ( sortable && !sortable.options.disabled ) {\n\t\t\t\tdraggable.sortables.push( sortable );\n\n\t\t\t\t// RefreshPositions is called at drag start to refresh the containerCache\n\t\t\t\t// which is used in drag. This ensures it's initialized and synchronized\n\t\t\t\t// with any changes that might have happened on the page since initialization.\n\t\t\t\tsortable.refreshPositions();\n\t\t\t\tsortable._trigger( \"activate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tstop: function( event, ui, draggable ) {\n\t\tvar uiSortable = $.extend( {}, ui, {\n\t\t\titem: draggable.element\n\t\t} );\n\n\t\tdraggable.cancelHelperRemoval = false;\n\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar sortable = this;\n\n\t\t\tif ( sortable.isOver ) {\n\t\t\t\tsortable.isOver = 0;\n\n\t\t\t\t// Allow this sortable to handle removing the helper\n\t\t\t\tdraggable.cancelHelperRemoval = true;\n\t\t\t\tsortable.cancelHelperRemoval = false;\n\n\t\t\t\t// Use _storedCSS To restore properties in the sortable,\n\t\t\t\t// as this also handles revert (#9675) since the draggable\n\t\t\t\t// may have modified them in unexpected ways (#8809)\n\t\t\t\tsortable._storedCSS = {\n\t\t\t\t\tposition: sortable.placeholder.css( \"position\" ),\n\t\t\t\t\ttop: sortable.placeholder.css( \"top\" ),\n\t\t\t\t\tleft: sortable.placeholder.css( \"left\" )\n\t\t\t\t};\n\n\t\t\t\tsortable._mouseStop( event );\n\n\t\t\t\t// Once drag has ended, the sortable should return to using\n\t\t\t\t// its original helper, not the shared helper from draggable\n\t\t\t\tsortable.options.helper = sortable.options._helper;\n\t\t\t} else {\n\n\t\t\t\t// Prevent this Sortable from removing the helper.\n\t\t\t\t// However, don't set the draggable to remove the helper\n\t\t\t\t// either as another connected Sortable may yet handle the removal.\n\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\tsortable._trigger( \"deactivate\", event, uiSortable );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( event, ui, draggable ) {\n\t\t$.each( draggable.sortables, function() {\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tsortable = this;\n\n\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\tsortable.positionAbs = draggable.positionAbs;\n\t\t\tsortable.helperProportions = draggable.helperProportions;\n\t\t\tsortable.offset.click = draggable.offset.click;\n\n\t\t\tif ( sortable._intersectsWith( sortable.containerCache ) ) {\n\t\t\t\tinnermostIntersecting = true;\n\n\t\t\t\t$.each( draggable.sortables, function() {\n\n\t\t\t\t\t// Copy over variables that sortable's _intersectsWith uses\n\t\t\t\t\tthis.positionAbs = draggable.positionAbs;\n\t\t\t\t\tthis.helperProportions = draggable.helperProportions;\n\t\t\t\t\tthis.offset.click = draggable.offset.click;\n\n\t\t\t\t\tif ( this !== sortable &&\n\t\t\t\t\t\t\tthis._intersectsWith( this.containerCache ) &&\n\t\t\t\t\t\t\t$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( innermostIntersecting ) {\n\n\t\t\t\t// If it intersects, we use a little isOver variable and set it once,\n\t\t\t\t// so that the move-in stuff gets fired only once.\n\t\t\t\tif ( !sortable.isOver ) {\n\t\t\t\t\tsortable.isOver = 1;\n\n\t\t\t\t\t// Store draggable's parent in case we need to reappend to it later.\n\t\t\t\t\tdraggable._parent = ui.helper.parent();\n\n\t\t\t\t\tsortable.currentItem = ui.helper\n\t\t\t\t\t\t.appendTo( sortable.element )\n\t\t\t\t\t\t.data( \"ui-sortable-item\", true );\n\n\t\t\t\t\t// Store helper option to later restore it\n\t\t\t\t\tsortable.options._helper = sortable.options.helper;\n\n\t\t\t\t\tsortable.options.helper = function() {\n\t\t\t\t\t\treturn ui.helper[ 0 ];\n\t\t\t\t\t};\n\n\t\t\t\t\t// Fire the start events of the sortable with our passed browser event,\n\t\t\t\t\t// and our own helper (so it doesn't create a new one)\n\t\t\t\t\tevent.target = sortable.currentItem[ 0 ];\n\t\t\t\t\tsortable._mouseCapture( event, true );\n\t\t\t\t\tsortable._mouseStart( event, true, true );\n\n\t\t\t\t\t// Because the browser event is way off the new appended portlet,\n\t\t\t\t\t// modify necessary variables to reflect the changes\n\t\t\t\t\tsortable.offset.click.top = draggable.offset.click.top;\n\t\t\t\t\tsortable.offset.click.left = draggable.offset.click.left;\n\t\t\t\t\tsortable.offset.parent.left -= draggable.offset.parent.left -\n\t\t\t\t\t\tsortable.offset.parent.left;\n\t\t\t\t\tsortable.offset.parent.top -= draggable.offset.parent.top -\n\t\t\t\t\t\tsortable.offset.parent.top;\n\n\t\t\t\t\tdraggable._trigger( \"toSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is in a valid drop zone,\n\t\t\t\t\t// used solely in the revert option to handle \"valid/invalid\".\n\t\t\t\t\tdraggable.dropped = sortable.element;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables in the case that\n\t\t\t\t\t// adding to one sortable changes the location of the other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Hack so receive/update callbacks work (mostly)\n\t\t\t\t\tdraggable.currentItem = draggable.element;\n\t\t\t\t\tsortable.fromOutside = draggable;\n\t\t\t\t}\n\n\t\t\t\tif ( sortable.currentItem ) {\n\t\t\t\t\tsortable._mouseDrag( event );\n\n\t\t\t\t\t// Copy the sortable's position because the draggable's can potentially reflect\n\t\t\t\t\t// a relative position, while sortable is always absolute, which the dragged\n\t\t\t\t\t// element has now become. (#8809)\n\t\t\t\t\tui.position = sortable.position;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t// we fake the drag stop of the sortable, but make sure it doesn't remove\n\t\t\t\t// the helper by using cancelHelperRemoval.\n\t\t\t\tif ( sortable.isOver ) {\n\n\t\t\t\t\tsortable.isOver = 0;\n\t\t\t\t\tsortable.cancelHelperRemoval = true;\n\n\t\t\t\t\t// Calling sortable's mouseStop would trigger a revert,\n\t\t\t\t\t// so revert must be temporarily false until after mouseStop is called.\n\t\t\t\t\tsortable.options._revert = sortable.options.revert;\n\t\t\t\t\tsortable.options.revert = false;\n\n\t\t\t\t\tsortable._trigger( \"out\", event, sortable._uiHash( sortable ) );\n\t\t\t\t\tsortable._mouseStop( event, true );\n\n\t\t\t\t\t// Restore sortable behaviors that were modfied\n\t\t\t\t\t// when the draggable entered the sortable area (#9481)\n\t\t\t\t\tsortable.options.revert = sortable.options._revert;\n\t\t\t\t\tsortable.options.helper = sortable.options._helper;\n\n\t\t\t\t\tif ( sortable.placeholder ) {\n\t\t\t\t\t\tsortable.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Restore and recalculate the draggable's offset considering the sortable\n\t\t\t\t\t// may have modified them in unexpected ways. (#8809, #10669)\n\t\t\t\t\tui.helper.appendTo( draggable._parent );\n\t\t\t\t\tdraggable._refreshOffsets( event );\n\t\t\t\t\tui.position = draggable._generatePosition( event, true );\n\n\t\t\t\t\tdraggable._trigger( \"fromSortable\", event );\n\n\t\t\t\t\t// Inform draggable that the helper is no longer in a valid drop zone\n\t\t\t\t\tdraggable.dropped = false;\n\n\t\t\t\t\t// Need to refreshPositions of all sortables just in case removing\n\t\t\t\t\t// from one sortable changes the location of other sortables (#9675)\n\t\t\t\t\t$.each( draggable.sortables, function() {\n\t\t\t\t\t\tthis.refreshPositions();\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"cursor\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( \"body\" ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"cursor\" ) ) {\n\t\t\to._cursor = t.css( \"cursor\" );\n\t\t}\n\t\tt.css( \"cursor\", o.cursor );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._cursor ) {\n\t\t\t$( \"body\" ).css( \"cursor\", o._cursor );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"opacity\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\t\tif ( t.css( \"opacity\" ) ) {\n\t\t\to._opacity = t.css( \"opacity\" );\n\t\t}\n\t\tt.css( \"opacity\", o.opacity );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\t\tif ( o._opacity ) {\n\t\t\t$( ui.helper ).css( \"opacity\", o._opacity );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"scroll\", {\n\tstart: function( event, ui, i ) {\n\t\tif ( !i.scrollParentNotHidden ) {\n\t\t\ti.scrollParentNotHidden = i.helper.scrollParent( false );\n\t\t}\n\n\t\tif ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&\n\t\t\t\ti.scrollParentNotHidden[ 0 ].tagName !== \"HTML\" ) {\n\t\t\ti.overflowOffset = i.scrollParentNotHidden.offset();\n\t\t}\n\t},\n\tdrag: function( event, ui, i ) {\n\n\t\tvar o = i.options,\n\t\t\tscrolled = false,\n\t\t\tscrollParent = i.scrollParentNotHidden[ 0 ],\n\t\t\tdocument = i.document[ 0 ];\n\n\t\tif ( scrollParent !== document && scrollParent.tagName !== \"HTML\" ) {\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tscrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif ( !o.axis || o.axis !== \"x\" ) {\n\t\t\t\tif ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );\n\t\t\t\t} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !o.axis || o.axis !== \"y\" ) {\n\t\t\t\tif ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() - o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = $( document ).scrollLeft(\n\t\t\t\t\t\t$( document ).scrollLeft() + o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( i, event );\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"snap\", {\n\tstart: function( event, ui, i ) {\n\n\t\tvar o = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$( o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap )\n\t\t\t.each( function() {\n\t\t\t\tvar $t = $( this ),\n\t\t\t\t\t$o = $t.offset();\n\t\t\t\tif ( this !== i.element[ 0 ] ) {\n\t\t\t\t\ti.snapElements.push( {\n\t\t\t\t\t\titem: this,\n\t\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t},\n\tdrag: function( event, ui, inst ) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor ( i = inst.snapElements.length - 1; i >= 0; i-- ) {\n\n\t\t\tl = inst.snapElements[ i ].left - inst.margins.left;\n\t\t\tr = l + inst.snapElements[ i ].width;\n\t\t\tt = inst.snapElements[ i ].top - inst.margins.top;\n\t\t\tb = t + inst.snapElements[ i ].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||\n\t\t\t\t\t!$.contains( inst.snapElements[ i ].item.ownerDocument,\n\t\t\t\t\tinst.snapElements[ i ].item ) ) {\n\t\t\t\tif ( inst.snapElements[ i ].snapping ) {\n\t\t\t\t\t( inst.options.snap.release &&\n\t\t\t\t\t\tinst.options.snap.release.call(\n\t\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\t$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )\n\t\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\tinst.snapElements[ i ].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( o.snapMode !== \"inner\" ) {\n\t\t\t\tts = Math.abs( t - y2 ) <= d;\n\t\t\t\tbs = Math.abs( b - y1 ) <= d;\n\t\t\t\tls = Math.abs( l - x2 ) <= d;\n\t\t\t\trs = Math.abs( r - x1 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = ( ts || bs || ls || rs );\n\n\t\t\tif ( o.snapMode !== \"outer\" ) {\n\t\t\t\tts = Math.abs( t - y1 ) <= d;\n\t\t\t\tbs = Math.abs( b - y2 ) <= d;\n\t\t\t\tls = Math.abs( l - x1 ) <= d;\n\t\t\t\trs = Math.abs( r - x2 ) <= d;\n\t\t\t\tif ( ts ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: t,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( bs ) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: b - inst.helperProportions.height,\n\t\t\t\t\t\tleft: 0\n\t\t\t\t\t} ).top;\n\t\t\t\t}\n\t\t\t\tif ( ls ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: l\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t\tif ( rs ) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo( \"relative\", {\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\tleft: r - inst.helperProportions.width\n\t\t\t\t\t} ).left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {\n\t\t\t\t( inst.options.snap.snap &&\n\t\t\t\t\tinst.options.snap.snap.call(\n\t\t\t\t\t\tinst.element,\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\t$.extend( inst._uiHash(), {\n\t\t\t\t\t\t\tsnapItem: inst.snapElements[ i ].item\n\t\t\t\t\t\t} ) ) );\n\t\t\t}\n\t\t\tinst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );\n\n\t\t}\n\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"stack\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar min,\n\t\t\to = instance.options,\n\t\t\tgroup = $.makeArray( $( o.stack ) ).sort( function( a, b ) {\n\t\t\t\treturn ( parseInt( $( a ).css( \"zIndex\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( b ).css( \"zIndex\" ), 10 ) || 0 );\n\t\t\t} );\n\n\t\tif ( !group.length ) { return; }\n\n\t\tmin = parseInt( $( group[ 0 ] ).css( \"zIndex\" ), 10 ) || 0;\n\t\t$( group ).each( function( i ) {\n\t\t\t$( this ).css( \"zIndex\", min + i );\n\t\t} );\n\t\tthis.css( \"zIndex\", ( min + group.length ) );\n\t}\n} );\n\n$.ui.plugin.add( \"draggable\", \"zIndex\", {\n\tstart: function( event, ui, instance ) {\n\t\tvar t = $( ui.helper ),\n\t\t\to = instance.options;\n\n\t\tif ( t.css( \"zIndex\" ) ) {\n\t\t\to._zIndex = t.css( \"zIndex\" );\n\t\t}\n\t\tt.css( \"zIndex\", o.zIndex );\n\t},\n\tstop: function( event, ui, instance ) {\n\t\tvar o = instance.options;\n\n\t\tif ( o._zIndex ) {\n\t\t\t$( ui.helper ).css( \"zIndex\", o._zIndex );\n\t\t}\n\t}\n} );\n\nvar widgetsDraggable = $.ui.draggable;\n\n\n/*!\n * jQuery UI Resizable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Resizable\n//>>group: Interactions\n//>>description: Enables resize functionality for any element.\n//>>docs: http://api.jqueryui.com/resizable/\n//>>demos: http://jqueryui.com/resizable/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/resizable.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tclasses: {\n\t\t\t\"ui-resizable-se\": \"ui-icon ui-icon-gripsmall-diagonal-se\"\n\t\t},\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// Callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_num: function( value ) {\n\t\treturn parseFloat( value ) || 0;\n\t},\n\n\t_isNumber: function( value ) {\n\t\treturn !isNaN( parseFloat( value ) );\n\t},\n\n\t_hasScroll: function( el, a ) {\n\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t},\n\n\t_create: function() {\n\n\t\tvar margins,\n\t\t\to = this.options,\n\t\t\tthat = this;\n\t\tthis._addClass( \"ui-resizable\" );\n\n\t\t$.extend( this, {\n\t\t\t_aspectRatio: !!( o.aspectRatio ),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t} );\n\n\t\t// Wrap the element if it cannot hold child nodes\n\t\tif ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {\n\n\t\t\tthis.element.wrap(\n\t\t\t\t$( \"<div class='ui-wrapper' style='overflow: hidden;'></div>\" ).css( {\n\t\t\t\t\tposition: this.element.css( \"position\" ),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css( \"top\" ),\n\t\t\t\t\tleft: this.element.css( \"left\" )\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.resizable( \"instance\" )\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\tmargins = {\n\t\t\t\tmarginTop: this.originalElement.css( \"marginTop\" ),\n\t\t\t\tmarginRight: this.originalElement.css( \"marginRight\" ),\n\t\t\t\tmarginBottom: this.originalElement.css( \"marginBottom\" ),\n\t\t\t\tmarginLeft: this.originalElement.css( \"marginLeft\" )\n\t\t\t};\n\n\t\t\tthis.element.css( margins );\n\t\t\tthis.originalElement.css( \"margin\", 0 );\n\n\t\t\t// support: Safari\n\t\t\t// Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css( \"resize\" );\n\t\t\tthis.originalElement.css( \"resize\", \"none\" );\n\n\t\t\tthis._proportionallyResizeElements.push( this.originalElement.css( {\n\t\t\t\tposition: \"static\",\n\t\t\t\tzoom: 1,\n\t\t\t\tdisplay: \"block\"\n\t\t\t} ) );\n\n\t\t\t// Support: IE9\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css( margins );\n\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tthis._setupHandles();\n\n\t\tif ( o.autoHide ) {\n\t\t\t$( this.element )\n\t\t\t\t.on( \"mouseenter\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthat._removeClass( \"ui-resizable-autohide\" );\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t} )\n\t\t\t\t.on( \"mouseleave\", function() {\n\t\t\t\t\tif ( o.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( !that.resizing ) {\n\t\t\t\t\t\tthat._addClass( \"ui-resizable-autohide\" );\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}\n\n\t\tthis._mouseInit();\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function( exp ) {\n\t\t\t\t$( exp )\n\t\t\t\t\t.removeData( \"resizable\" )\n\t\t\t\t\t.removeData( \"ui-resizable\" )\n\t\t\t\t\t.off( \".resizable\" )\n\t\t\t\t\t.find( \".ui-resizable-handle\" )\n\t\t\t\t\t\t.remove();\n\t\t\t};\n\n\t\t// TODO: Unwrap at same DOM position\n\t\tif ( this.elementIsWrapper ) {\n\t\t\t_destroy( this.element );\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css( {\n\t\t\t\tposition: wrapper.css( \"position\" ),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css( \"top\" ),\n\t\t\t\tleft: wrapper.css( \"left\" )\n\t\t\t} ).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css( \"resize\", this.originalResizeStyle );\n\t\t_destroy( this.originalElement );\n\n\t\treturn this;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\tcase \"handles\":\n\t\t\tthis._removeHandles();\n\t\t\tthis._setupHandles();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setupHandles: function() {\n\t\tvar o = this.options, handle, i, n, hname, axis, that = this;\n\t\tthis.handles = o.handles ||\n\t\t\t( !$( \".ui-resizable-handle\", this.element ).length ?\n\t\t\t\t\"e,s,se\" : {\n\t\t\t\t\tn: \".ui-resizable-n\",\n\t\t\t\t\te: \".ui-resizable-e\",\n\t\t\t\t\ts: \".ui-resizable-s\",\n\t\t\t\t\tw: \".ui-resizable-w\",\n\t\t\t\t\tse: \".ui-resizable-se\",\n\t\t\t\t\tsw: \".ui-resizable-sw\",\n\t\t\t\t\tne: \".ui-resizable-ne\",\n\t\t\t\t\tnw: \".ui-resizable-nw\"\n\t\t\t\t} );\n\n\t\tthis._handles = $();\n\t\tif ( this.handles.constructor === String ) {\n\n\t\t\tif ( this.handles === \"all\" ) {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split( \",\" );\n\t\t\tthis.handles = {};\n\n\t\t\tfor ( i = 0; i < n.length; i++ ) {\n\n\t\t\t\thandle = $.trim( n[ i ] );\n\t\t\t\thname = \"ui-resizable-\" + handle;\n\t\t\t\taxis = $( \"<div>\" );\n\t\t\t\tthis._addClass( axis, \"ui-resizable-handle \" + hname );\n\n\t\t\t\taxis.css( { zIndex: o.zIndex } );\n\n\t\t\t\tthis.handles[ handle ] = \".ui-resizable-\" + handle;\n\t\t\t\tthis.element.append( axis );\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function( target ) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor ( i in this.handles ) {\n\n\t\t\t\tif ( this.handles[ i ].constructor === String ) {\n\t\t\t\t\tthis.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();\n\t\t\t\t} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {\n\t\t\t\t\tthis.handles[ i ] = $( this.handles[ i ] );\n\t\t\t\t\tthis._on( this.handles[ i ], { \"mousedown\": that._mouseDown } );\n\t\t\t\t}\n\n\t\t\t\tif ( this.elementIsWrapper &&\n\t\t\t\t\t\tthis.originalElement[ 0 ]\n\t\t\t\t\t\t\t.nodeName\n\t\t\t\t\t\t\t.match( /^(textarea|input|select|button)$/i ) ) {\n\t\t\t\t\taxis = $( this.handles[ i ], this.element );\n\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test( i ) ?\n\t\t\t\t\t\taxis.outerHeight() :\n\t\t\t\t\t\taxis.outerWidth();\n\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test( i ) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test( i ) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test( i ) ? \"Right\" : \"Left\" ].join( \"\" );\n\n\t\t\t\t\ttarget.css( padPos, padWrapper );\n\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\n\t\t\t\tthis._handles = this._handles.add( this.handles[ i ] );\n\t\t\t}\n\t\t};\n\n\t\t// TODO: make renderAxis a prototype function\n\t\tthis._renderAxis( this.element );\n\n\t\tthis._handles = this._handles.add( this.element.find( \".ui-resizable-handle\" ) );\n\t\tthis._handles.disableSelection();\n\n\t\tthis._handles.on( \"mouseover\", function() {\n\t\t\tif ( !that.resizing ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\taxis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );\n\t\t\t\t}\n\t\t\t\tthat.axis = axis && axis[ 1 ] ? axis[ 1 ] : \"se\";\n\t\t\t}\n\t\t} );\n\n\t\tif ( o.autoHide ) {\n\t\t\tthis._handles.hide();\n\t\t\tthis._addClass( \"ui-resizable-autohide\" );\n\t\t}\n\t},\n\n\t_removeHandles: function() {\n\t\tthis._handles.remove();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor ( i in this.handles ) {\n\t\t\thandle = $( this.handles[ i ] )[ 0 ];\n\t\t\tif ( handle === event.target || $.contains( handle, event.target ) ) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function( event ) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = this._num( this.helper.css( \"left\" ) );\n\t\tcurtop = this._num( this.helper.css( \"top\" ) );\n\n\t\tif ( o.containment ) {\n\t\t\tcurleft += $( o.containment ).scrollLeft() || 0;\n\t\t\tcurtop += $( o.containment ).scrollTop() || 0;\n\t\t}\n\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\n\t\tthis.size = this._helper ? {\n\t\t\t\twidth: this.helper.width(),\n\t\t\t\theight: this.helper.height()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.originalSize = this._helper ? {\n\t\t\t\twidth: el.outerWidth(),\n\t\t\t\theight: el.outerHeight()\n\t\t\t} : {\n\t\t\t\twidth: el.width(),\n\t\t\t\theight: el.height()\n\t\t\t};\n\n\t\tthis.sizeDiff = {\n\t\t\twidth: el.outerWidth() - el.width(),\n\t\t\theight: el.outerHeight() - el.height()\n\t\t};\n\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\tthis.aspectRatio = ( typeof o.aspectRatio === \"number\" ) ?\n\t\t\to.aspectRatio :\n\t\t\t( ( this.originalSize.width / this.originalSize.height ) || 1 );\n\n\t\tcursor = $( \".ui-resizable-\" + this.axis ).css( \"cursor\" );\n\t\t$( \"body\" ).css( \"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor );\n\n\t\tthis._addClass( \"ui-resizable-resizing\" );\n\t\tthis._propagate( \"start\", event );\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tvar data, props,\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tdx = ( event.pageX - smp.left ) || 0,\n\t\t\tdy = ( event.pageY - smp.top ) || 0,\n\t\t\ttrigger = this._change[ a ];\n\n\t\tthis._updatePrevProperties();\n\n\t\tif ( !trigger ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tdata = trigger.apply( this, [ event, dx, dy ] );\n\n\t\tthis._updateVirtualBoundaries( event.shiftKey );\n\t\tif ( this._aspectRatio || event.shiftKey ) {\n\t\t\tdata = this._updateRatio( data, event );\n\t\t}\n\n\t\tdata = this._respectSize( data, event );\n\n\t\tthis._updateCache( data );\n\n\t\tthis._propagate( \"resize\", event );\n\n\t\tprops = this._applyChanges();\n\n\t\tif ( !this._helper && this._proportionallyResizeElements.length ) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\tif ( !$.isEmptyObject( props ) ) {\n\t\t\tthis._updatePrevProperties();\n\t\t\tthis._trigger( \"resize\", event, this.ui() );\n\t\t\tthis._applyChanges();\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif ( this._helper ) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );\n\t\t\tsoffseth = ista && this._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = {\n\t\t\t\twidth: ( that.helper.width() - soffsetw ),\n\t\t\t\theight: ( that.helper.height() - soffseth )\n\t\t\t};\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null;\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\t\tif ( !o.animate ) {\n\t\t\t\tthis.element.css( $.extend( s, { top: top, left: left } ) );\n\t\t\t}\n\n\t\t\tthat.helper.height( that.size.height );\n\t\t\tthat.helper.width( that.size.width );\n\n\t\t\tif ( this._helper && !o.animate ) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$( \"body\" ).css( \"cursor\", \"auto\" );\n\n\t\tthis._removeClass( \"ui-resizable-resizing\" );\n\n\t\tthis._propagate( \"stop\", event );\n\n\t\tif ( this._helper ) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updatePrevProperties: function() {\n\t\tthis.prevPosition = {\n\t\t\ttop: this.position.top,\n\t\t\tleft: this.position.left\n\t\t};\n\t\tthis.prevSize = {\n\t\t\twidth: this.size.width,\n\t\t\theight: this.size.height\n\t\t};\n\t},\n\n\t_applyChanges: function() {\n\t\tvar props = {};\n\n\t\tif ( this.position.top !== this.prevPosition.top ) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif ( this.position.left !== this.prevPosition.left ) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( this.size.width !== this.prevSize.width ) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif ( this.size.height !== this.prevSize.height ) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\n\t\tthis.helper.css( props );\n\n\t\treturn props;\n\t},\n\n\t_updateVirtualBoundaries: function( forceAspectRatio ) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,\n\t\t\tmaxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,\n\t\t\tminHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,\n\t\t\tmaxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif ( this._aspectRatio || forceAspectRatio ) {\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif ( pMinWidth > b.minWidth ) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif ( pMinHeight > b.minHeight ) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif ( pMaxWidth < b.maxWidth ) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif ( pMaxHeight < b.maxHeight ) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function( data ) {\n\t\tthis.offset = this.helper.offset();\n\t\tif ( this._isNumber( data.left ) ) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif ( this._isNumber( data.top ) ) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif ( this._isNumber( data.width ) ) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif ( this._isNumber( data.height ) ) {\n\t\t\tdata.width = ( data.height * this.aspectRatio );\n\t\t} else if ( this._isNumber( data.width ) ) {\n\t\t\tdata.height = ( data.width / this.aspectRatio );\n\t\t}\n\n\t\tif ( a === \"sw\" ) {\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t\tdata.top = null;\n\t\t}\n\t\tif ( a === \"nw\" ) {\n\t\t\tdata.top = cpos.top + ( csize.height - data.height );\n\t\t\tdata.left = cpos.left + ( csize.width - data.width );\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),\n\t\t\tismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),\n\t\t\tisminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),\n\t\t\tisminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.originalPosition.top + this.originalSize.height,\n\t\t\tcw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );\n\t\tif ( isminw ) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif ( isminh ) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif ( ismaxw ) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif ( ismaxh ) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif ( isminw && cw ) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif ( ismaxw && cw ) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif ( isminh && ch ) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif ( ismaxh && ch ) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// Fixing jump error on top/left - bug #2330\n\t\tif ( !data.width && !data.height && !data.left && data.top ) {\n\t\t\tdata.top = null;\n\t\t} else if ( !data.width && !data.height && !data.top && data.left ) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_getPaddingPlusBorderDimensions: function( element ) {\n\t\tvar i = 0,\n\t\t\twidths = [],\n\t\t\tborders = [\n\t\t\t\telement.css( \"borderTopWidth\" ),\n\t\t\t\telement.css( \"borderRightWidth\" ),\n\t\t\t\telement.css( \"borderBottomWidth\" ),\n\t\t\t\telement.css( \"borderLeftWidth\" )\n\t\t\t],\n\t\t\tpaddings = [\n\t\t\t\telement.css( \"paddingTop\" ),\n\t\t\t\telement.css( \"paddingRight\" ),\n\t\t\t\telement.css( \"paddingBottom\" ),\n\t\t\t\telement.css( \"paddingLeft\" )\n\t\t\t];\n\n\t\tfor ( ; i < 4; i++ ) {\n\t\t\twidths[ i ] = ( parseFloat( borders[ i ] ) || 0 );\n\t\t\twidths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );\n\t\t}\n\n\t\treturn {\n\t\t\theight: widths[ 0 ] + widths[ 2 ],\n\t\t\twidth: widths[ 1 ] + widths[ 3 ]\n\t\t};\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif ( !this._proportionallyResizeElements.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar prel,\n\t\t\ti = 0,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( ; i < this._proportionallyResizeElements.length; i++ ) {\n\n\t\t\tprel = this._proportionallyResizeElements[ i ];\n\n\t\t\t// TODO: Seems like a bug to cache this.outerDimensions\n\t\t\t// considering that we are in a loop.\n\t\t\tif ( !this.outerDimensions ) {\n\t\t\t\tthis.outerDimensions = this._getPaddingPlusBorderDimensions( prel );\n\t\t\t}\n\n\t\t\tprel.css( {\n\t\t\t\theight: ( element.height() - this.outerDimensions.height ) || 0,\n\t\t\t\twidth: ( element.width() - this.outerDimensions.width ) || 0\n\t\t\t} );\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif ( this._helper ) {\n\n\t\t\tthis.helper = this.helper || $( \"<div style='overflow:hidden;'></div>\" );\n\n\t\t\tthis._addClass( this.helper, this._helper );\n\t\t\tthis.helper.css( {\n\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left + \"px\",\n\t\t\t\ttop: this.elementOffset.top + \"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t} );\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function( event, dx ) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function( event, dx ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function( event, dx, dy ) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function( event, dx, dy ) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tsw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.s.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tne: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.e.apply( this, [ event, dx, dy ] ) );\n\t\t},\n\t\tnw: function( event, dx, dy ) {\n\t\t\treturn $.extend( this._change.n.apply( this, arguments ),\n\t\t\t\tthis._change.w.apply( this, [ event, dx, dy ] ) );\n\t\t}\n\t},\n\n\t_propagate: function( n, event ) {\n\t\t$.ui.plugin.call( this, n, [ event, this.ui() ] );\n\t\t( n !== \"resize\" && this._trigger( n, event, this.ui() ) );\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n} );\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add( \"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),\n\t\t\tsoffseth = ista && that._hasScroll( pr[ 0 ], \"left\" ) ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = {\n\t\t\t\twidth: ( that.size.width - soffsetw ),\n\t\t\t\theight: ( that.size.height - soffseth )\n\t\t\t},\n\t\t\tleft = ( parseFloat( that.element.css( \"left\" ) ) +\n\t\t\t\t( that.position.left - that.originalPosition.left ) ) || null,\n\t\t\ttop = ( parseFloat( that.element.css( \"top\" ) ) +\n\t\t\t\t( that.position.top - that.originalPosition.top ) ) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend( style, top && left ? { top: top, left: left } : {} ), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseFloat( that.element.css( \"width\" ) ),\n\t\t\t\t\t\theight: parseFloat( that.element.css( \"height\" ) ),\n\t\t\t\t\t\ttop: parseFloat( that.element.css( \"top\" ) ),\n\t\t\t\t\t\tleft: parseFloat( that.element.css( \"left\" ) )\n\t\t\t\t\t};\n\n\t\t\t\t\tif ( pr && pr.length ) {\n\t\t\t\t\t\t$( pr[ 0 ] ).css( { width: data.width, height: data.height } );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache( data );\n\t\t\t\t\tthat._propagate( \"resize\", event );\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = ( oc instanceof $ ) ?\n\t\t\t\toc.get( 0 ) :\n\t\t\t\t( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;\n\n\t\tif ( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $( ce );\n\n\t\tif ( /document/.test( oc ) || oc === document ) {\n\t\t\tthat.containerOffset = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\t\t\tthat.containerPosition = {\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0\n\t\t\t};\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $( document ),\n\t\t\t\tleft: 0,\n\t\t\t\ttop: 0,\n\t\t\t\twidth: $( document ).width(),\n\t\t\t\theight: $( document ).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t} else {\n\t\t\telement = $( ce );\n\t\t\tp = [];\n\t\t\t$( [ \"Top\", \"Right\", \"Left\", \"Bottom\" ] ).each( function( i, name ) {\n\t\t\t\tp[ i ] = that._num( element.css( \"padding\" + name ) );\n\t\t\t} );\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = {\n\t\t\t\theight: ( element.innerHeight() - p[ 3 ] ),\n\t\t\t\twidth: ( element.innerWidth() - p[ 1 ] )\n\t\t\t};\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ( that._hasScroll ( ce, \"left\" ) ? ce.scrollWidth : cw );\n\t\t\theight = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce,\n\t\t\t\tleft: co.left,\n\t\t\t\ttop: co.top,\n\t\t\t\twidth: width,\n\t\t\t\theight: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = {\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\tce = that.containerElement,\n\t\t\tcontinueResize = true;\n\n\t\tif ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif ( cp.left < ( that._helper ? co.left : 0 ) ) {\n\t\t\tthat.size.width = that.size.width +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.left - co.left ) :\n\t\t\t\t\t( that.position.left - cop.left ) );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif ( cp.top < ( that._helper ? co.top : 0 ) ) {\n\t\t\tthat.size.height = that.size.height +\n\t\t\t\t( that._helper ?\n\t\t\t\t\t( that.position.top - co.top ) :\n\t\t\t\t\tthat.position.top );\n\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tisParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );\n\t\tisOffsetRelative = /relative|absolute/.test( that.containerElement.css( \"position\" ) );\n\n\t\tif ( isParent && isOffsetRelative ) {\n\t\t\tthat.offset.left = that.parentData.left + that.position.left;\n\t\t\tthat.offset.top = that.parentData.top + that.position.top;\n\t\t} else {\n\t\t\tthat.offset.left = that.element.offset().left;\n\t\t\tthat.offset.top = that.element.offset().top;\n\t\t}\n\n\t\twoset = Math.abs( that.sizeDiff.width +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.left - cop.left :\n\t\t\t\t( that.offset.left - co.left ) ) );\n\n\t\thoset = Math.abs( that.sizeDiff.height +\n\t\t\t( that._helper ?\n\t\t\t\tthat.offset.top - cop.top :\n\t\t\t\t( that.offset.top - co.top ) ) );\n\n\t\tif ( woset + that.size.width >= that.parentData.width ) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( hoset + that.size.height >= that.parentData.height ) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif ( pRatio ) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\tcontinueResize = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( !continueResize ) {\n\t\t\tthat.position.left = that.prevPosition.left;\n\t\t\tthat.position.top = that.prevPosition.top;\n\t\t\tthat.size.width = that.prevSize.width;\n\t\t\tthat.size.height = that.prevSize.height;\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $( that.helper ),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif ( that._helper && !o.animate && ( /relative/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\n\t\tif ( that._helper && !o.animate && ( /static/ ).test( ce.css( \"position\" ) ) ) {\n\t\t\t$( this ).css( {\n\t\t\t\tleft: ho.left - cop.left - co.left,\n\t\t\t\twidth: w,\n\t\t\t\theight: h\n\t\t\t} );\n\t\t}\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"alsoResize\", {\n\n\tstart: function() {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options;\n\n\t\t$( o.alsoResize ).each( function() {\n\t\t\tvar el = $( this );\n\t\t\tel.data( \"ui-resizable-alsoresize\", {\n\t\t\t\twidth: parseFloat( el.width() ), height: parseFloat( el.height() ),\n\t\t\t\tleft: parseFloat( el.css( \"left\" ) ), top: parseFloat( el.css( \"top\" ) )\n\t\t\t} );\n\t\t} );\n\t},\n\n\tresize: function( event, ui ) {\n\t\tvar that = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: ( that.size.height - os.height ) || 0,\n\t\t\t\twidth: ( that.size.width - os.width ) || 0,\n\t\t\t\ttop: ( that.position.top - op.top ) || 0,\n\t\t\t\tleft: ( that.position.left - op.left ) || 0\n\t\t\t};\n\n\t\t\t$( o.alsoResize ).each( function() {\n\t\t\t\tvar el = $( this ), start = $( this ).data( \"ui-resizable-alsoresize\" ), style = {},\n\t\t\t\t\tcss = el.parents( ui.originalElement[ 0 ] ).length ?\n\t\t\t\t\t\t\t[ \"width\", \"height\" ] :\n\t\t\t\t\t\t\t[ \"width\", \"height\", \"top\", \"left\" ];\n\n\t\t\t\t$.each( css, function( i, prop ) {\n\t\t\t\t\tvar sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );\n\t\t\t\t\tif ( sum && sum >= 0 ) {\n\t\t\t\t\t\tstyle[ prop ] = sum || null;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tel.css( style );\n\t\t\t} );\n\t},\n\n\tstop: function() {\n\t\t$( this ).removeData( \"ui-resizable-alsoresize\" );\n\t}\n} );\n\n$.ui.plugin.add( \"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $( this ).resizable( \"instance\" ), cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost.css( {\n\t\t\topacity: 0.25,\n\t\t\tdisplay: \"block\",\n\t\t\tposition: \"relative\",\n\t\t\theight: cs.height,\n\t\t\twidth: cs.width,\n\t\t\tmargin: 0,\n\t\t\tleft: 0,\n\t\t\ttop: 0\n\t\t} );\n\n\t\tthat._addClass( that.ghost, \"ui-resizable-ghost\" );\n\n\t\t// DEPRECATED\n\t\t// TODO: remove after 1.12\n\t\tif ( $.uiBackCompat !== false && typeof that.options.ghost === \"string\" ) {\n\n\t\t\t// Ghost option\n\t\t\tthat.ghost.addClass( this.options.ghost );\n\t\t}\n\n\t\tthat.ghost.appendTo( that.helper );\n\n\t},\n\n\tresize: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost ) {\n\t\t\tthat.ghost.css( {\n\t\t\t\tposition: \"relative\",\n\t\t\t\theight: that.size.height,\n\t\t\t\twidth: that.size.width\n\t\t\t} );\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $( this ).resizable( \"instance\" );\n\t\tif ( that.ghost && that.helper ) {\n\t\t\tthat.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );\n\t\t}\n\t}\n\n} );\n\n$.ui.plugin.add( \"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar outerDimensions,\n\t\t\tthat = $( this ).resizable( \"instance\" ),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [ o.grid, o.grid ] : o.grid,\n\t\t\tgridX = ( grid[ 0 ] || 1 ),\n\t\t\tgridY = ( grid[ 1 ] || 1 ),\n\t\t\tox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,\n\t\t\toy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),\n\t\t\tisMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),\n\t\t\tisMinWidth = o.minWidth && ( o.minWidth > newWidth ),\n\t\t\tisMinHeight = o.minHeight && ( o.minHeight > newHeight );\n\n\t\to.grid = grid;\n\n\t\tif ( isMinWidth ) {\n\t\t\tnewWidth += gridX;\n\t\t}\n\t\tif ( isMinHeight ) {\n\t\t\tnewHeight += gridY;\n\t\t}\n\t\tif ( isMaxWidth ) {\n\t\t\tnewWidth -= gridX;\n\t\t}\n\t\tif ( isMaxHeight ) {\n\t\t\tnewHeight -= gridY;\n\t\t}\n\n\t\tif ( /^(se|s|e)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if ( /^(ne)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if ( /^(sw)$/.test( a ) ) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tif ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {\n\t\t\t\touterDimensions = that._getPaddingPlusBorderDimensions( this );\n\t\t\t}\n\n\t\t\tif ( newHeight - gridY > 0 ) {\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else {\n\t\t\t\tnewHeight = gridY - outerDimensions.height;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top + os.height - newHeight;\n\t\t\t}\n\t\t\tif ( newWidth - gridX > 0 ) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tnewWidth = gridX - outerDimensions.width;\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.position.left = op.left + os.width - newWidth;\n\t\t\t}\n\t\t}\n\t}\n\n} );\n\nvar widgetsResizable = $.ui.resizable;\n\n\n/*!\n * jQuery UI Dialog 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Dialog\n//>>group: Widgets\n//>>description: Displays customizable dialog windows.\n//>>docs: http://api.jqueryui.com/dialog/\n//>>demos: http://jqueryui.com/dialog/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/dialog.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.dialog\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tclasses: {\n\t\t\t\"ui-dialog\": \"ui-corner-all\",\n\t\t\t\"ui-dialog-titlebar\": \"ui-corner-all\"\n\t\t},\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"Close\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// Callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\tsizeRelatedOptions: {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\n\tresizableRelatedOptions: {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[ 0 ].style.display,\n\t\t\twidth: this.element[ 0 ].style.width,\n\t\t\tminHeight: this.element[ 0 ].style.minHeight,\n\t\t\tmaxHeight: this.element[ 0 ].style.maxHeight,\n\t\t\theight: this.element[ 0 ].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr( \"title\" );\n\t\tif ( this.options.title == null && this.originalTitle != null ) {\n\t\t\tthis.options.title = this.originalTitle;\n\t\t}\n\n\t\t// Dialogs can't be disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.options.disabled = false;\n\t\t}\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr( \"title\" )\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._addClass( \"ui-dialog-content\", \"ui-widget-content\" );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\n\t\tthis._trackFocus();\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && ( element.jquery || element.nodeType ) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._untrackInstance();\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.css( this.originalCss )\n\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar that = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._focusedElement = null;\n\t\tthis._destroyOverlay();\n\t\tthis._untrackInstance();\n\n\t\tif ( !this.opener.filter( \":focusable\" ).trigger( \"focus\" ).length ) {\n\n\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t} );\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = false,\n\t\t\tzIndices = this.uiDialog.siblings( \".ui-front:visible\" ).map( function() {\n\t\t\t\treturn +$( this ).css( \"z-index\" );\n\t\t\t} ).get(),\n\t\t\tzIndexMax = Math.max.apply( null, zIndices );\n\n\t\tif ( zIndexMax >= +this.uiDialog.css( \"z-index\" ) ) {\n\t\t\tthis.uiDialog.css( \"z-index\", zIndexMax + 1 );\n\t\t\tmoved = true;\n\t\t}\n\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\n\t\t// Ensure the overlay is moved to the top with the dialog, but only when\n\t\t// opening. The overlay shouldn't move after the dialog is open so that\n\t\t// modeless dialogs opened after the modal dialog stack properly.\n\t\tif ( this.overlay ) {\n\t\t\tthis.overlay.css( \"z-index\", this.uiDialog.css( \"z-index\" ) - 1 );\n\t\t}\n\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger( \"focus\" );\n\t\t} );\n\n\t\t// Track the dialog immediately upon openening in case a focus event\n\t\t// somehow occurs outside of the dialog before an element inside the\n\t\t// dialog is focused (#10152)\n\t\tthis._makeFocusTarget();\n\n\t\tthis._trigger( \"open\" );\n\t},\n\n\t_focusTabbable: function() {\n\n\t\t// Set focus to the first match:\n\t\t// 1. An element that was focused previously\n\t\t// 2. First element inside the dialog matching [autofocus]\n\t\t// 3. Tabbable element inside the content element\n\t\t// 4. Tabbable element inside the buttonpane\n\t\t// 5. The close button\n\t\t// 6. The dialog itself\n\t\tvar hasFocus = this._focusedElement;\n\t\tif ( !hasFocus ) {\n\t\t\thasFocus = this.element.find( \"[autofocus]\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter( \":tabbable\" );\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).trigger( \"focus\" );\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tfunction checkFocus() {\n\t\t\tvar activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),\n\t\t\t\tisActive = this.uiDialog[ 0 ] === activeElement ||\n\t\t\t\t\t$.contains( this.uiDialog[ 0 ], activeElement );\n\t\t\tif ( !isActive ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t\tcheckFocus.call( this );\n\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( checkFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $( \"<div>\" )\n\t\t\t.hide()\n\t\t\t.attr( {\n\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t} )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.uiDialog, \"ui-dialog\", \"ui-widget ui-widget-content ui-front\" );\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find( \":tabbable\" ),\n\t\t\t\t\tfirst = tabbables.filter( \":first\" ),\n\t\t\t\t\tlast = tabbables.filter( \":last\" );\n\n\t\t\t\tif ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&\n\t\t\t\t\t\t!event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tfirst.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[ 0 ] ||\n\t\t\t\t\t\tevent.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tlast.trigger( \"focus\" );\n\t\t\t\t\t} );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find( \"[aria-describedby]\" ).length ) {\n\t\t\tthis.uiDialog.attr( {\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr( \"id\" )\n\t\t\t} );\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogTitlebar,\n\t\t\t\"ui-dialog-titlebar\", \"ui-widget-header ui-helper-clearfix\" );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest( \".ui-dialog-titlebar-close\" ) ) {\n\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.trigger( \"focus\" );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Support: IE\n\t\t// Use type=\"button\" to prevent enter keypresses in textboxes from closing the\n\t\t// dialog in IE (#9312)\n\t\tthis.uiDialogTitlebarClose = $( \"<button type='button'></button>\" )\n\t\t\t.button( {\n\t\t\t\tlabel: $( \"<a>\" ).text( this.options.closeText ).html(),\n\t\t\t\ticon: \"ui-icon-closethick\",\n\t\t\t\tshowLabel: false\n\t\t\t} )\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\n\t\tthis._addClass( this.uiDialogTitlebarClose, \"ui-dialog-titlebar-close\" );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t} );\n\n\t\tuiDialogTitle = $( \"<span>\" ).uniqueId().prependTo( this.uiDialogTitlebar );\n\t\tthis._addClass( uiDialogTitle, \"ui-dialog-title\" );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialogTitlebar.prependTo( this.uiDialog );\n\n\t\tthis.uiDialog.attr( {\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr( \"id\" )\n\t\t} );\n\t},\n\n\t_title: function( title ) {\n\t\tif ( this.options.title ) {\n\t\t\ttitle.text( this.options.title );\n\t\t} else {\n\t\t\ttitle.html( \"&#160;\" );\n\t\t}\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $( \"<div>\" );\n\t\tthis._addClass( this.uiDialogButtonPane, \"ui-dialog-buttonpane\",\n\t\t\t\"ui-widget-content ui-helper-clearfix\" );\n\n\t\tthis.uiButtonSet = $( \"<div>\" )\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\t\tthis._addClass( this.uiButtonSet, \"ui-dialog-buttonset\" );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// If we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {\n\t\t\tthis._removeClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tbuttonOptions = {\n\t\t\t\ticon: props.icon,\n\t\t\t\ticonPosition: props.iconPosition,\n\t\t\t\tshowLabel: props.showLabel,\n\n\t\t\t\t// Deprecated options\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.text\n\t\t\t};\n\n\t\t\tdelete props.click;\n\t\t\tdelete props.icon;\n\t\t\tdelete props.iconPosition;\n\t\t\tdelete props.showLabel;\n\n\t\t\t// Deprecated options\n\t\t\tdelete props.icons;\n\t\t\tif ( typeof props.text === \"boolean\" ) {\n\t\t\t\tdelete props.text;\n\t\t\t}\n\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet )\n\t\t\t\t.on( \"click\", function() {\n\t\t\t\t\tclick.apply( that.element[ 0 ], arguments );\n\t\t\t\t} );\n\t\t} );\n\t\tthis._addClass( this.uiDialog, \"ui-dialog-buttons\" );\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable( {\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar left = ui.offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = ui.offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-dragging\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css( \"position\" ),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles :\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable( {\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\tthat._addClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\tvar offset = that.uiDialog.offset(),\n\t\t\t\t\tleft = offset.left - that.document.scrollLeft(),\n\t\t\t\t\ttop = offset.top - that.document.scrollTop();\n\n\t\t\t\toptions.height = that.uiDialog.height();\n\t\t\t\toptions.width = that.uiDialog.width();\n\t\t\t\toptions.position = {\n\t\t\t\t\tmy: \"left top\",\n\t\t\t\t\tat: \"left\" + ( left >= 0 ? \"+\" : \"\" ) + left + \" \" +\n\t\t\t\t\t\t\"top\" + ( top >= 0 ? \"+\" : \"\" ) + top,\n\t\t\t\t\tof: that.window\n\t\t\t\t};\n\t\t\t\tthat._removeClass( $( this ), \"ui-dialog-resizing\" );\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t} )\n\t\t\t.css( \"position\", position );\n\t},\n\n\t_trackFocus: function() {\n\t\tthis._on( this.widget(), {\n\t\t\tfocusin: function( event ) {\n\t\t\t\tthis._makeFocusTarget();\n\t\t\t\tthis._focusedElement = $( event.target );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_makeFocusTarget: function() {\n\t\tthis._untrackInstance();\n\t\tthis._trackingInstances().unshift( this );\n\t},\n\n\t_untrackInstance: function() {\n\t\tvar instances = this._trackingInstances(),\n\t\t\texists = $.inArray( this, instances );\n\t\tif ( exists !== -1 ) {\n\t\t\tinstances.splice( exists, 1 );\n\t\t}\n\t},\n\n\t_trackingInstances: function() {\n\t\tvar instances = this.document.data( \"ui-dialog-instances\" );\n\t\tif ( !instances ) {\n\t\t\tinstances = [];\n\t\t\tthis.document.data( \"ui-dialog-instances\", instances );\n\t\t}\n\t\treturn instances;\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is( \":visible\" );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in that.sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in that.resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t} );\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button( {\n\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: $( \"<a>\" ).text( \"\" + this.options.closeText ).html()\n\t\t\t} );\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is( \":data(ui-draggable)\" );\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable( \"destroy\" );\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is( \":data(ui-resizable)\" );\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable( \"destroy\" );\n\t\t\t}\n\n\t\t\t// Currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// Currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find( \".ui-dialog-title\" ) );\n\t\t}\n\t},\n\n\t_size: function() {\n\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css( {\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t} );\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// Reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css( {\n\t\t\theight: \"auto\",\n\t\t\twidth: options.width\n\t\t} )\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css( {\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif ( this.uiDialog.is( \":data(ui-resizable)\" ) ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map( function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css( {\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t} )\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[ 0 ];\n\t\t} );\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest( \".ui-dialog\" ).length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest( \".ui-datepicker\" ).length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use a delay in case the overlay is created from an\n\t\t// event that we're going to be cancelling (#2804)\n\t\tvar isOpening = true;\n\t\tthis._delay( function() {\n\t\t\tisOpening = false;\n\t\t} );\n\n\t\tif ( !this.document.data( \"ui-dialog-overlays\" ) ) {\n\n\t\t\t// Prevent use of anchors and inputs\n\t\t\t// Using _on() for an event handler shared across many instances is\n\t\t\t// safe because the dialogs stack and must be closed in reverse order\n\t\t\tthis._on( this.document, {\n\t\t\t\tfocusin: function( event ) {\n\t\t\t\t\tif ( isOpening ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !this._allowInteraction( event ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis._trackingInstances()[ 0 ]._focusTabbable();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.overlay = $( \"<div>\" )\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._addClass( this.overlay, null, \"ui-widget-overlay ui-front\" );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t} );\n\t\tthis.document.data( \"ui-dialog-overlays\",\n\t\t\t( this.document.data( \"ui-dialog-overlays\" ) || 0 ) + 1 );\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\tvar overlays = this.document.data( \"ui-dialog-overlays\" ) - 1;\n\n\t\t\tif ( !overlays ) {\n\t\t\t\tthis._off( this.document, \"focusin\" );\n\t\t\t\tthis.document.removeData( \"ui-dialog-overlays\" );\n\t\t\t} else {\n\t\t\t\tthis.document.data( \"ui-dialog-overlays\", overlays );\n\t\t\t}\n\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n} );\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for dialogClass option\n\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\toptions: {\n\t\t\tdialogClass: \"\"\n\t\t},\n\t\t_createWrapper: function() {\n\t\t\tthis._super();\n\t\t\tthis.uiDialog.addClass( this.options.dialogClass );\n\t\t},\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"dialogClass\" ) {\n\t\t\t\tthis.uiDialog\n\t\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t\t.addClass( value );\n\t\t\t}\n\t\t\tthis._superApply( arguments );\n\t\t}\n\t} );\n}\n\nvar widgetsDialog = $.ui.dialog;\n\n\n/*!\n * jQuery UI Droppable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Droppable\n//>>group: Interactions\n//>>description: Enables drop targets for draggable elements.\n//>>docs: http://api.jqueryui.com/droppable/\n//>>demos: http://jqueryui.com/droppable/\n\n\n\n$.widget( \"ui.droppable\", {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: \"*\",\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tdeactivate: null,\n\t\tdrop: null,\n\t\tout: null,\n\t\tover: null\n\t},\n\t_create: function() {\n\n\t\tvar proportions,\n\t\t\to = this.options,\n\t\t\taccept = o.accept;\n\n\t\tthis.isover = false;\n\t\tthis.isout = true;\n\n\t\tthis.accept = $.isFunction( accept ) ? accept : function( d ) {\n\t\t\treturn d.is( accept );\n\t\t};\n\n\t\tthis.proportions = function( /* valueToWrite */ ) {\n\t\t\tif ( arguments.length ) {\n\n\t\t\t\t// Store the droppable's proportions\n\t\t\t\tproportions = arguments[ 0 ];\n\t\t\t} else {\n\n\t\t\t\t// Retrieve or derive the droppable's proportions\n\t\t\t\treturn proportions ?\n\t\t\t\t\tproportions :\n\t\t\t\t\tproportions = {\n\t\t\t\t\t\twidth: this.element[ 0 ].offsetWidth,\n\t\t\t\t\t\theight: this.element[ 0 ].offsetHeight\n\t\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t\tthis._addToManager( o.scope );\n\n\t\to.addClasses && this._addClass( \"ui-droppable\" );\n\n\t},\n\n\t_addToManager: function( scope ) {\n\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];\n\t\t$.ui.ddmanager.droppables[ scope ].push( this );\n\t},\n\n\t_splice: function( drop ) {\n\t\tvar i = 0;\n\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\tif ( drop[ i ] === this ) {\n\t\t\t\tdrop.splice( i, 1 );\n\t\t\t}\n\t\t}\n\t},\n\n\t_destroy: function() {\n\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\tthis._splice( drop );\n\t},\n\n\t_setOption: function( key, value ) {\n\n\t\tif ( key === \"accept\" ) {\n\t\t\tthis.accept = $.isFunction( value ) ? value : function( d ) {\n\t\t\t\treturn d.is( value );\n\t\t\t};\n\t\t} else if ( key === \"scope\" ) {\n\t\t\tvar drop = $.ui.ddmanager.droppables[ this.options.scope ];\n\n\t\t\tthis._splice( drop );\n\t\t\tthis._addToManager( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_activate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\tthis._addActiveClass();\n\t\tif ( draggable ) {\n\t\t\tthis._trigger( \"activate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_deactivate: function( event ) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\tthis._removeActiveClass();\n\t\tif ( draggable ) {\n\t\t\tthis._trigger( \"deactivate\", event, this.ui( draggable ) );\n\t\t}\n\t},\n\n\t_over: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||\n\t\t\t\tdraggable.element ) ) ) {\n\t\t\tthis._addHoverClass();\n\t\t\tthis._trigger( \"over\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_out: function( event ) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||\n\t\t\t\tdraggable.element ) ) ) {\n\t\t\tthis._removeHoverClass();\n\t\t\tthis._trigger( \"out\", event, this.ui( draggable ) );\n\t\t}\n\n\t},\n\n\t_drop: function( event, custom ) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\tchildrenIntersection = false;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif ( !draggable || ( draggable.currentItem ||\n\t\t\t\tdraggable.element )[ 0 ] === this.element[ 0 ] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.element\n\t\t\t.find( \":data(ui-droppable)\" )\n\t\t\t.not( \".ui-draggable-dragging\" )\n\t\t\t.each( function() {\n\t\t\t\tvar inst = $( this ).droppable( \"instance\" );\n\t\t\t\tif (\n\t\t\t\t\tinst.options.greedy &&\n\t\t\t\t\t!inst.options.disabled &&\n\t\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\t\tinst.accept.call(\n\t\t\t\t\t\tinst.element[ 0 ], ( draggable.currentItem || draggable.element )\n\t\t\t\t\t) &&\n\t\t\t\t\tintersect(\n\t\t\t\t\t\tdraggable,\n\t\t\t\t\t\t$.extend( inst, { offset: inst.element.offset() } ),\n\t\t\t\t\t\tinst.options.tolerance, event\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tchildrenIntersection = true;\n\t\t\t\t\treturn false; }\n\t\t\t} );\n\t\tif ( childrenIntersection ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.accept.call( this.element[ 0 ],\n\t\t\t\t( draggable.currentItem || draggable.element ) ) ) {\n\t\t\tthis._removeActiveClass();\n\t\t\tthis._removeHoverClass();\n\n\t\t\tthis._trigger( \"drop\", event, this.ui( draggable ) );\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function( c ) {\n\t\treturn {\n\t\t\tdraggable: ( c.currentItem || c.element ),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t},\n\n\t// Extension points just to make backcompat sane and avoid duplicating logic\n\t// TODO: Remove in 1.13 along with call to it below\n\t_addHoverClass: function() {\n\t\tthis._addClass( \"ui-droppable-hover\" );\n\t},\n\n\t_removeHoverClass: function() {\n\t\tthis._removeClass( \"ui-droppable-hover\" );\n\t},\n\n\t_addActiveClass: function() {\n\t\tthis._addClass( \"ui-droppable-active\" );\n\t},\n\n\t_removeActiveClass: function() {\n\t\tthis._removeClass( \"ui-droppable-active\" );\n\t}\n} );\n\nvar intersect = $.ui.intersect = ( function() {\n\tfunction isOverAxis( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t}\n\n\treturn function( draggable, droppable, toleranceMode, event ) {\n\n\t\tif ( !droppable.offset ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar x1 = ( draggable.positionAbs ||\n\t\t\t\tdraggable.position.absolute ).left + draggable.margins.left,\n\t\t\ty1 = ( draggable.positionAbs ||\n\t\t\t\tdraggable.position.absolute ).top + draggable.margins.top,\n\t\t\tx2 = x1 + draggable.helperProportions.width,\n\t\t\ty2 = y1 + draggable.helperProportions.height,\n\t\t\tl = droppable.offset.left,\n\t\t\tt = droppable.offset.top,\n\t\t\tr = l + droppable.proportions().width,\n\t\t\tb = t + droppable.proportions().height;\n\n\t\tswitch ( toleranceMode ) {\n\t\tcase \"fit\":\n\t\t\treturn ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );\n\t\tcase \"intersect\":\n\t\t\treturn ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half\n\t\tcase \"pointer\":\n\t\t\treturn isOverAxis( event.pageY, t, droppable.proportions().height ) &&\n\t\t\t\tisOverAxis( event.pageX, l, droppable.proportions().width );\n\t\tcase \"touch\":\n\t\t\treturn (\n\t\t\t\t( y1 >= t && y1 <= b ) || // Top edge touching\n\t\t\t\t( y2 >= t && y2 <= b ) || // Bottom edge touching\n\t\t\t\t( y1 < t && y2 > b ) // Surrounded vertically\n\t\t\t) && (\n\t\t\t\t( x1 >= l && x1 <= r ) || // Left edge touching\n\t\t\t\t( x2 >= l && x2 <= r ) || // Right edge touching\n\t\t\t\t( x1 < l && x2 > r ) // Surrounded horizontally\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t};\n} )();\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { \"default\": [] },\n\tprepareOffsets: function( t, event ) {\n\n\t\tvar i, j,\n\t\t\tm = $.ui.ddmanager.droppables[ t.options.scope ] || [],\n\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\tlist = ( t.currentItem || t.element ).find( \":data(ui-droppable)\" ).addBack();\n\n\t\tdroppablesLoop: for ( i = 0; i < m.length; i++ ) {\n\n\t\t\t// No disabled and non-accepted\n\t\t\tif ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],\n\t\t\t\t\t( t.currentItem || t.element ) ) ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Filter out elements in the current dragged item\n\t\t\tfor ( j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === m[ i ].element[ 0 ] ) {\n\t\t\t\t\tm[ i ].proportions().height = 0;\n\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tm[ i ].visible = m[ i ].element.css( \"display\" ) !== \"none\";\n\t\t\tif ( !m[ i ].visible ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Activate the droppable if used directly from draggables\n\t\t\tif ( type === \"mousedown\" ) {\n\t\t\t\tm[ i ]._activate.call( m[ i ], event );\n\t\t\t}\n\n\t\t\tm[ i ].offset = m[ i ].element.offset();\n\t\t\tm[ i ].proportions( {\n\t\t\t\twidth: m[ i ].element[ 0 ].offsetWidth,\n\t\t\t\theight: m[ i ].element[ 0 ].offsetHeight\n\t\t\t} );\n\n\t\t}\n\n\t},\n\tdrop: function( draggable, event ) {\n\n\t\tvar dropped = false;\n\n\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {\n\n\t\t\tif ( !this.options ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.options.disabled && this.visible &&\n\t\t\t\t\tintersect( draggable, this, this.options.tolerance, event ) ) {\n\t\t\t\tdropped = this._drop.call( this, event ) || dropped;\n\t\t\t}\n\n\t\t\tif ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],\n\t\t\t\t\t( draggable.currentItem || draggable.element ) ) ) {\n\t\t\t\tthis.isout = true;\n\t\t\t\tthis.isover = false;\n\t\t\t\tthis._deactivate.call( this, event );\n\t\t\t}\n\n\t\t} );\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\n\t\t// Listen for scrolling so that if the dragging causes scrolling the position of the\n\t\t// droppables can be recalculated (see #5003)\n\t\tdraggable.element.parentsUntil( \"body\" ).on( \"scroll.droppable\", function() {\n\t\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t} );\n\t},\n\tdrag: function( draggable, event ) {\n\n\t\t// If you have a highly dynamic page, you might try this option. It renders positions\n\t\t// every time you move the mouse.\n\t\tif ( draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\n\t\t// Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {\n\n\t\t\tif ( this.options.disabled || this.greedyChild || !this.visible ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar parentInstance, scope, parent,\n\t\t\t\tintersects = intersect( draggable, this, this.options.tolerance, event ),\n\t\t\t\tc = !intersects && this.isover ?\n\t\t\t\t\t\"isout\" :\n\t\t\t\t\t( intersects && !this.isover ? \"isover\" : null );\n\t\t\tif ( !c ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.options.greedy ) {\n\n\t\t\t\t// find droppable parents with same scope\n\t\t\t\tscope = this.options.scope;\n\t\t\t\tparent = this.element.parents( \":data(ui-droppable)\" ).filter( function() {\n\t\t\t\t\treturn $( this ).droppable( \"instance\" ).options.scope === scope;\n\t\t\t\t} );\n\n\t\t\t\tif ( parent.length ) {\n\t\t\t\t\tparentInstance = $( parent[ 0 ] ).droppable( \"instance\" );\n\t\t\t\t\tparentInstance.greedyChild = ( c === \"isover\" );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// We just moved into a greedy child\n\t\t\tif ( parentInstance && c === \"isover\" ) {\n\t\t\t\tparentInstance.isover = false;\n\t\t\t\tparentInstance.isout = true;\n\t\t\t\tparentInstance._out.call( parentInstance, event );\n\t\t\t}\n\n\t\t\tthis[ c ] = true;\n\t\t\tthis[ c === \"isout\" ? \"isover\" : \"isout\" ] = false;\n\t\t\tthis[ c === \"isover\" ? \"_over\" : \"_out\" ].call( this, event );\n\n\t\t\t// We just moved out of a greedy child\n\t\t\tif ( parentInstance && c === \"isout\" ) {\n\t\t\t\tparentInstance.isout = false;\n\t\t\t\tparentInstance.isover = true;\n\t\t\t\tparentInstance._over.call( parentInstance, event );\n\t\t\t}\n\t\t} );\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parentsUntil( \"body\" ).off( \"scroll.droppable\" );\n\n\t\t// Call prepareOffsets one final time since IE does not fire return scroll events when\n\t\t// overflow was caused by drag (see #5003)\n\t\tif ( !draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\t}\n};\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for activeClass and hoverClass options\n\t$.widget( \"ui.droppable\", $.ui.droppable, {\n\t\toptions: {\n\t\t\thoverClass: false,\n\t\t\tactiveClass: false\n\t\t},\n\t\t_addActiveClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.activeClass ) {\n\t\t\t\tthis.element.addClass( this.options.activeClass );\n\t\t\t}\n\t\t},\n\t\t_removeActiveClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.activeClass ) {\n\t\t\t\tthis.element.removeClass( this.options.activeClass );\n\t\t\t}\n\t\t},\n\t\t_addHoverClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.addClass( this.options.hoverClass );\n\t\t\t}\n\t\t},\n\t\t_removeHoverClass: function() {\n\t\t\tthis._super();\n\t\t\tif ( this.options.hoverClass ) {\n\t\t\t\tthis.element.removeClass( this.options.hoverClass );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nvar widgetsDroppable = $.ui.droppable;\n\n\n/*!\n * jQuery UI Progressbar 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Progressbar\n//>>group: Widgets\n// jscs:disable maximumLineLength\n//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.\n// jscs:enable maximumLineLength\n//>>docs: http://api.jqueryui.com/progressbar/\n//>>demos: http://jqueryui.com/progressbar/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/progressbar.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsProgressbar = $.widget( \"ui.progressbar\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-progressbar\": \"ui-corner-all\",\n\t\t\t\"ui-progressbar-value\": \"ui-corner-left\",\n\t\t\t\"ui-progressbar-complete\": \"ui-corner-right\"\n\t\t},\n\t\tmax: 100,\n\t\tvalue: 0,\n\n\t\tchange: null,\n\t\tcomplete: null\n\t},\n\n\tmin: 0,\n\n\t_create: function() {\n\n\t\t// Constrain initial value\n\t\tthis.oldValue = this.options.value = this._constrainedValue();\n\n\t\tthis.element.attr( {\n\n\t\t\t// Only set static values; aria-valuenow and aria-valuemax are\n\t\t\t// set inside _refreshValue()\n\t\t\trole: \"progressbar\",\n\t\t\t\"aria-valuemin\": this.min\n\t\t} );\n\t\tthis._addClass( \"ui-progressbar\", \"ui-widget ui-widget-content\" );\n\n\t\tthis.valueDiv = $( \"<div>\" ).appendTo( this.element );\n\t\tthis._addClass( this.valueDiv, \"ui-progressbar-value\", \"ui-widget-header\" );\n\t\tthis._refreshValue();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeAttr( \"role aria-valuemin aria-valuemax aria-valuenow\" );\n\n\t\tthis.valueDiv.remove();\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\treturn this.options.value;\n\t\t}\n\n\t\tthis.options.value = this._constrainedValue( newValue );\n\t\tthis._refreshValue();\n\t},\n\n\t_constrainedValue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\tnewValue = this.options.value;\n\t\t}\n\n\t\tthis.indeterminate = newValue === false;\n\n\t\t// Sanitize value\n\t\tif ( typeof newValue !== \"number\" ) {\n\t\t\tnewValue = 0;\n\t\t}\n\n\t\treturn this.indeterminate ? false :\n\t\t\tMath.min( this.options.max, Math.max( this.min, newValue ) );\n\t},\n\n\t_setOptions: function( options ) {\n\n\t\t// Ensure \"value\" option is set after other values (like max)\n\t\tvar value = options.value;\n\t\tdelete options.value;\n\n\t\tthis._super( options );\n\n\t\tthis.options.value = this._constrainedValue( value );\n\t\tthis._refreshValue();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"max\" ) {\n\n\t\t\t// Don't allow a max less than min\n\t\t\tvalue = Math.max( this.min, value );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis.element.attr( \"aria-disabled\", value );\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t},\n\n\t_percentage: function() {\n\t\treturn this.indeterminate ?\n\t\t\t100 :\n\t\t\t100 * ( this.options.value - this.min ) / ( this.options.max - this.min );\n\t},\n\n\t_refreshValue: function() {\n\t\tvar value = this.options.value,\n\t\t\tpercentage = this._percentage();\n\n\t\tthis.valueDiv\n\t\t\t.toggle( this.indeterminate || value > this.min )\n\t\t\t.width( percentage.toFixed( 0 ) + \"%\" );\n\n\t\tthis\n\t\t\t._toggleClass( this.valueDiv, \"ui-progressbar-complete\", null,\n\t\t\t\tvalue === this.options.max )\n\t\t\t._toggleClass( \"ui-progressbar-indeterminate\", null, this.indeterminate );\n\n\t\tif ( this.indeterminate ) {\n\t\t\tthis.element.removeAttr( \"aria-valuenow\" );\n\t\t\tif ( !this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv = $( \"<div>\" ).appendTo( this.valueDiv );\n\t\t\t\tthis._addClass( this.overlayDiv, \"ui-progressbar-overlay\" );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.element.attr( {\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\"aria-valuenow\": value\n\t\t\t} );\n\t\t\tif ( this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv.remove();\n\t\t\t\tthis.overlayDiv = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.oldValue !== value ) {\n\t\t\tthis.oldValue = value;\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t\tif ( value === this.options.max ) {\n\t\t\tthis._trigger( \"complete\" );\n\t\t}\n\t}\n} );\n\n\n/*!\n * jQuery UI Selectable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Selectable\n//>>group: Interactions\n//>>description: Allows groups of elements to be selected with the mouse.\n//>>docs: http://api.jqueryui.com/selectable/\n//>>demos: http://jqueryui.com/selectable/\n//>>css.structure: ../../themes/base/selectable.css\n\n\n\nvar widgetsSelectable = $.widget( \"ui.selectable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: \"*\",\n\t\ttolerance: \"touch\",\n\n\t\t// Callbacks\n\t\tselected: null,\n\t\tselecting: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tunselected: null,\n\t\tunselecting: null\n\t},\n\t_create: function() {\n\t\tvar that = this;\n\n\t\tthis._addClass( \"ui-selectable\" );\n\n\t\tthis.dragged = false;\n\n\t\t// Cache selectee children based on filter\n\t\tthis.refresh = function() {\n\t\t\tthat.elementPos = $( that.element[ 0 ] ).offset();\n\t\t\tthat.selectees = $( that.options.filter, that.element[ 0 ] );\n\t\t\tthat._addClass( that.selectees, \"ui-selectee\" );\n\t\t\tthat.selectees.each( function() {\n\t\t\t\tvar $this = $( this ),\n\t\t\t\t\tselecteeOffset = $this.offset(),\n\t\t\t\t\tpos = {\n\t\t\t\t\t\tleft: selecteeOffset.left - that.elementPos.left,\n\t\t\t\t\t\ttop: selecteeOffset.top - that.elementPos.top\n\t\t\t\t\t};\n\t\t\t\t$.data( this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass( \"ui-selected\" ),\n\t\t\t\t\tselecting: $this.hasClass( \"ui-selecting\" ),\n\t\t\t\t\tunselecting: $this.hasClass( \"ui-unselecting\" )\n\t\t\t\t} );\n\t\t\t} );\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $( \"<div>\" );\n\t\tthis._addClass( this.helper, \"ui-selectable-helper\" );\n\t},\n\n\t_destroy: function() {\n\t\tthis.selectees.removeData( \"selectable-item\" );\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseStart: function( event ) {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.opos = [ event.pageX, event.pageY ];\n\t\tthis.elementPos = $( this.element[ 0 ] ).offset();\n\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectees = $( options.filter, this.element[ 0 ] );\n\n\t\tthis._trigger( \"start\", event );\n\n\t\t$( options.appendTo ).append( this.helper );\n\n\t\t// position helper (lasso)\n\t\tthis.helper.css( {\n\t\t\t\"left\": event.pageX,\n\t\t\t\"top\": event.pageY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t} );\n\n\t\tif ( options.autoRefresh ) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter( \".ui-selected\" ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tselectee.startselected = true;\n\t\t\tif ( !event.metaKey && !event.ctrlKey ) {\n\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\tselectee.selected = false;\n\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\tselectee.unselecting = true;\n\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t$( event.target ).parents().addBack().each( function() {\n\t\t\tvar doSelect,\n\t\t\t\tselectee = $.data( this, \"selectable-item\" );\n\t\t\tif ( selectee ) {\n\t\t\t\tdoSelect = ( !event.metaKey && !event.ctrlKey ) ||\n\t\t\t\t\t!selectee.$element.hasClass( \"ui-selected\" );\n\t\t\t\tthat._removeClass( selectee.$element, doSelect ? \"ui-unselecting\" : \"ui-selected\" )\n\t\t\t\t\t._addClass( selectee.$element, doSelect ? \"ui-selecting\" : \"ui-unselecting\" );\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif ( doSelect ) {\n\t\t\t\t\tthat._trigger( \"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t},\n\n\t_mouseDrag: function( event ) {\n\n\t\tthis.dragged = true;\n\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tmp,\n\t\t\tthat = this,\n\t\t\toptions = this.options,\n\t\t\tx1 = this.opos[ 0 ],\n\t\t\ty1 = this.opos[ 1 ],\n\t\t\tx2 = event.pageX,\n\t\t\ty2 = event.pageY;\n\n\t\tif ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }\n\t\tif ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }\n\t\tthis.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );\n\n\t\tthis.selectees.each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" ),\n\t\t\t\thit = false,\n\t\t\t\toffset = {};\n\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif ( !selectee || selectee.element === that.element[ 0 ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\toffset.left = selectee.left + that.elementPos.left;\n\t\t\toffset.right = selectee.right + that.elementPos.left;\n\t\t\toffset.top = selectee.top + that.elementPos.top;\n\t\t\toffset.bottom = selectee.bottom + that.elementPos.top;\n\n\t\t\tif ( options.tolerance === \"touch\" ) {\n\t\t\t\thit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||\n offset.bottom < y1 ) );\n\t\t\t} else if ( options.tolerance === \"fit\" ) {\n\t\t\t\thit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&\n offset.bottom < y2 );\n\t\t\t}\n\n\t\t\tif ( hit ) {\n\n\t\t\t\t// SELECT\n\t\t\t\tif ( selectee.selected ) {\n\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif ( selectee.unselecting ) {\n\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif ( !selectee.selecting ) {\n\t\t\t\t\tthat._addClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\tselectee.selecting = true;\n\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tthat._trigger( \"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// UNSELECT\n\t\t\t\tif ( selectee.selecting ) {\n\t\t\t\t\tif ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" );\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif ( selectee.startselected ) {\n\t\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( selectee.selected ) {\n\t\t\t\t\tif ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {\n\t\t\t\t\t\tthat._removeClass( selectee.$element, \"ui-selected\" );\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tthat._addClass( selectee.$element, \"ui-unselecting\" );\n\t\t\t\t\t\tselectee.unselecting = true;\n\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger( \"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tvar that = this;\n\n\t\tthis.dragged = false;\n\n\t\t$( \".ui-unselecting\", this.element[ 0 ] ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tthat._removeClass( selectee.$element, \"ui-unselecting\" );\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tthat._trigger( \"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t} );\n\t\t} );\n\t\t$( \".ui-selecting\", this.element[ 0 ] ).each( function() {\n\t\t\tvar selectee = $.data( this, \"selectable-item\" );\n\t\t\tthat._removeClass( selectee.$element, \"ui-selecting\" )\n\t\t\t\t._addClass( selectee.$element, \"ui-selected\" );\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tthat._trigger( \"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t} );\n\t\t} );\n\t\tthis._trigger( \"stop\", event );\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n} );\n\n\n/*!\n * jQuery UI Selectmenu 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Selectmenu\n//>>group: Widgets\n// jscs:disable maximumLineLength\n//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.\n// jscs:enable maximumLineLength\n//>>docs: http://api.jqueryui.com/selectmenu/\n//>>demos: http://jqueryui.com/selectmenu/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsSelectmenu = $.widget( \"ui.selectmenu\", [ $.ui.formResetMixin, {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<select>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tclasses: {\n\t\t\t\"ui-selectmenu-button-open\": \"ui-corner-top\",\n\t\t\t\"ui-selectmenu-button-closed\": \"ui-corner-all\"\n\t\t},\n\t\tdisabled: null,\n\t\ticons: {\n\t\t\tbutton: \"ui-icon-triangle-1-s\"\n\t\t},\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\twidth: false,\n\n\t\t// Callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tvar selectmenuId = this.element.uniqueId().attr( \"id\" );\n\t\tthis.ids = {\n\t\t\telement: selectmenuId,\n\t\t\tbutton: selectmenuId + \"-button\",\n\t\t\tmenu: selectmenuId + \"-menu\"\n\t\t};\n\n\t\tthis._drawButton();\n\t\tthis._drawMenu();\n\t\tthis._bindFormResetHandler();\n\n\t\tthis._rendered = false;\n\t\tthis.menuItems = $();\n\t},\n\n\t_drawButton: function() {\n\t\tvar icon,\n\t\t\tthat = this,\n\t\t\titem = this._parseOption(\n\t\t\t\tthis.element.find( \"option:selected\" ),\n\t\t\t\tthis.element[ 0 ].selectedIndex\n\t\t\t);\n\n\t\t// Associate existing label with the new button\n\t\tthis.labels = this.element.labels().attr( \"for\", this.ids.button );\n\t\tthis._on( this.labels, {\n\t\t\tclick: function( event ) {\n\t\t\t\tthis.button.focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\n\t\t// Hide original select element\n\t\tthis.element.hide();\n\n\t\t// Create button\n\t\tthis.button = $( \"<span>\", {\n\t\t\ttabindex: this.options.disabled ? -1 : 0,\n\t\t\tid: this.ids.button,\n\t\t\trole: \"combobox\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-autocomplete\": \"list\",\n\t\t\t\"aria-owns\": this.ids.menu,\n\t\t\t\"aria-haspopup\": \"true\",\n\t\t\ttitle: this.element.attr( \"title\" )\n\t\t} )\n\t\t\t.insertAfter( this.element );\n\n\t\tthis._addClass( this.button, \"ui-selectmenu-button ui-selectmenu-button-closed\",\n\t\t\t\"ui-button ui-widget\" );\n\n\t\ticon = $( \"<span>\" ).appendTo( this.button );\n\t\tthis._addClass( icon, \"ui-selectmenu-icon\", \"ui-icon \" + this.options.icons.button );\n\t\tthis.buttonItem = this._renderButtonItem( item )\n\t\t\t.appendTo( this.button );\n\n\t\tif ( this.options.width !== false ) {\n\t\t\tthis._resizeButton();\n\t\t}\n\n\t\tthis._on( this.button, this._buttonEvents );\n\t\tthis.button.one( \"focusin\", function() {\n\n\t\t\t// Delay rendering the menu items until the button receives focus.\n\t\t\t// The menu may have already been rendered via a programmatic open.\n\t\t\tif ( !that._rendered ) {\n\t\t\t\tthat._refreshMenu();\n\t\t\t}\n\t\t} );\n\t},\n\n\t_drawMenu: function() {\n\t\tvar that = this;\n\n\t\t// Create menu\n\t\tthis.menu = $( \"<ul>\", {\n\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\"aria-labelledby\": this.ids.button,\n\t\t\tid: this.ids.menu\n\t\t} );\n\n\t\t// Wrap menu\n\t\tthis.menuWrap = $( \"<div>\" ).append( this.menu );\n\t\tthis._addClass( this.menuWrap, \"ui-selectmenu-menu\", \"ui-front\" );\n\t\tthis.menuWrap.appendTo( this._appendTo() );\n\n\t\t// Initialize menu widget\n\t\tthis.menuInstance = this.menu\n\t\t\t.menu( {\n\t\t\t\tclasses: {\n\t\t\t\t\t\"ui-menu\": \"ui-corner-bottom\"\n\t\t\t\t},\n\t\t\t\trole: \"listbox\",\n\t\t\t\tselect: function( event, ui ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// Support: IE8\n\t\t\t\t\t// If the item was selected via a click, the text selection\n\t\t\t\t\t// will be destroyed in IE\n\t\t\t\t\tthat._setSelection();\n\n\t\t\t\t\tthat._select( ui.item.data( \"ui-selectmenu-item\" ), event );\n\t\t\t\t},\n\t\t\t\tfocus: function( event, ui ) {\n\t\t\t\t\tvar item = ui.item.data( \"ui-selectmenu-item\" );\n\n\t\t\t\t\t// Prevent inital focus from firing and check if its a newly focused item\n\t\t\t\t\tif ( that.focusIndex != null && item.index !== that.focusIndex ) {\n\t\t\t\t\t\tthat._trigger( \"focus\", event, { item: item } );\n\t\t\t\t\t\tif ( !that.isOpen ) {\n\t\t\t\t\t\t\tthat._select( item, event );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthat.focusIndex = item.index;\n\n\t\t\t\t\tthat.button.attr( \"aria-activedescendant\",\n\t\t\t\t\t\tthat.menuItems.eq( item.index ).attr( \"id\" ) );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.menu( \"instance\" );\n\n\t\t// Don't close the menu on mouseleave\n\t\tthis.menuInstance._off( this.menu, \"mouseleave\" );\n\n\t\t// Cancel the menu's collapseAll on document click\n\t\tthis.menuInstance._closeOnDocumentClick = function() {\n\t\t\treturn false;\n\t\t};\n\n\t\t// Selects often contain empty items, but never contain dividers\n\t\tthis.menuInstance._isDivider = function() {\n\t\t\treturn false;\n\t\t};\n\t},\n\n\trefresh: function() {\n\t\tthis._refreshMenu();\n\t\tthis.buttonItem.replaceWith(\n\t\t\tthis.buttonItem = this._renderButtonItem(\n\n\t\t\t\t// Fall back to an empty object in case there are no options\n\t\t\t\tthis._getSelectedItem().data( \"ui-selectmenu-item\" ) || {}\n\t\t\t)\n\t\t);\n\t\tif ( this.options.width === null ) {\n\t\t\tthis._resizeButton();\n\t\t}\n\t},\n\n\t_refreshMenu: function() {\n\t\tvar item,\n\t\t\toptions = this.element.find( \"option\" );\n\n\t\tthis.menu.empty();\n\n\t\tthis._parseOptions( options );\n\t\tthis._renderMenu( this.menu, this.items );\n\n\t\tthis.menuInstance.refresh();\n\t\tthis.menuItems = this.menu.find( \"li\" )\n\t\t\t.not( \".ui-selectmenu-optgroup\" )\n\t\t\t\t.find( \".ui-menu-item-wrapper\" );\n\n\t\tthis._rendered = true;\n\n\t\tif ( !options.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\titem = this._getSelectedItem();\n\n\t\t// Update the menu to have the correct item focused\n\t\tthis.menuInstance.focus( null, item );\n\t\tthis._setAria( item.data( \"ui-selectmenu-item\" ) );\n\n\t\t// Set disabled state\n\t\tthis._setOption( \"disabled\", this.element.prop( \"disabled\" ) );\n\t},\n\n\topen: function( event ) {\n\t\tif ( this.options.disabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If this is the first time the menu is being opened, render the items\n\t\tif ( !this._rendered ) {\n\t\t\tthis._refreshMenu();\n\t\t} else {\n\n\t\t\t// Menu clears focus on close, reset focus to selected item\n\t\t\tthis._removeClass( this.menu.find( \".ui-state-active\" ), null, \"ui-state-active\" );\n\t\t\tthis.menuInstance.focus( null, this._getSelectedItem() );\n\t\t}\n\n\t\t// If there are no options, don't open the menu\n\t\tif ( !this.menuItems.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isOpen = true;\n\t\tthis._toggleAttr();\n\t\tthis._resizeMenu();\n\t\tthis._position();\n\n\t\tthis._on( this.document, this._documentClick );\n\n\t\tthis._trigger( \"open\", event );\n\t},\n\n\t_position: function() {\n\t\tthis.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );\n\t},\n\n\tclose: function( event ) {\n\t\tif ( !this.isOpen ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isOpen = false;\n\t\tthis._toggleAttr();\n\n\t\tthis.range = null;\n\t\tthis._off( this.document );\n\n\t\tthis._trigger( \"close\", event );\n\t},\n\n\twidget: function() {\n\t\treturn this.button;\n\t},\n\n\tmenuWidget: function() {\n\t\treturn this.menu;\n\t},\n\n\t_renderButtonItem: function( item ) {\n\t\tvar buttonItem = $( \"<span>\" );\n\n\t\tthis._setText( buttonItem, item.label );\n\t\tthis._addClass( buttonItem, \"ui-selectmenu-text\" );\n\n\t\treturn buttonItem;\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this,\n\t\t\tcurrentOptgroup = \"\";\n\n\t\t$.each( items, function( index, item ) {\n\t\t\tvar li;\n\n\t\t\tif ( item.optgroup !== currentOptgroup ) {\n\t\t\t\tli = $( \"<li>\", {\n\t\t\t\t\ttext: item.optgroup\n\t\t\t\t} );\n\t\t\t\tthat._addClass( li, \"ui-selectmenu-optgroup\", \"ui-menu-divider\" +\n\t\t\t\t\t( item.element.parent( \"optgroup\" ).prop( \"disabled\" ) ?\n\t\t\t\t\t\t\" ui-state-disabled\" :\n\t\t\t\t\t\t\"\" ) );\n\n\t\t\t\tli.appendTo( ul );\n\n\t\t\t\tcurrentOptgroup = item.optgroup;\n\t\t\t}\n\n\t\t\tthat._renderItemData( ul, item );\n\t\t} );\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-selectmenu-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\tvar li = $( \"<li>\" ),\n\t\t\twrapper = $( \"<div>\", {\n\t\t\t\ttitle: item.element.attr( \"title\" )\n\t\t\t} );\n\n\t\tif ( item.disabled ) {\n\t\t\tthis._addClass( li, null, \"ui-state-disabled\" );\n\t\t}\n\t\tthis._setText( wrapper, item.label );\n\n\t\treturn li.append( wrapper ).appendTo( ul );\n\t},\n\n\t_setText: function( element, value ) {\n\t\tif ( value ) {\n\t\t\telement.text( value );\n\t\t} else {\n\t\t\telement.html( \"&#160;\" );\n\t\t}\n\t},\n\n\t_move: function( direction, event ) {\n\t\tvar item, next,\n\t\t\tfilter = \".ui-menu-item\";\n\n\t\tif ( this.isOpen ) {\n\t\t\titem = this.menuItems.eq( this.focusIndex ).parent( \"li\" );\n\t\t} else {\n\t\t\titem = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( \"li\" );\n\t\t\tfilter += \":not(.ui-state-disabled)\";\n\t\t}\n\n\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\tnext = item[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( filter ).eq( -1 );\n\t\t} else {\n\t\t\tnext = item[ direction + \"All\" ]( filter ).eq( 0 );\n\t\t}\n\n\t\tif ( next.length ) {\n\t\t\tthis.menuInstance.focus( event, next );\n\t\t}\n\t},\n\n\t_getSelectedItem: function() {\n\t\treturn this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( \"li\" );\n\t},\n\n\t_toggle: function( event ) {\n\t\tthis[ this.isOpen ? \"close\" : \"open\" ]( event );\n\t},\n\n\t_setSelection: function() {\n\t\tvar selection;\n\n\t\tif ( !this.range ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( window.getSelection ) {\n\t\t\tselection = window.getSelection();\n\t\t\tselection.removeAllRanges();\n\t\t\tselection.addRange( this.range );\n\n\t\t// Support: IE8\n\t\t} else {\n\t\t\tthis.range.select();\n\t\t}\n\n\t\t// Support: IE\n\t\t// Setting the text selection kills the button focus in IE, but\n\t\t// restoring the focus doesn't kill the selection.\n\t\tthis.button.focus();\n\t},\n\n\t_documentClick: {\n\t\tmousedown: function( event ) {\n\t\t\tif ( !this.isOpen ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( !$( event.target ).closest( \".ui-selectmenu-menu, #\" +\n\t\t\t\t\t$.ui.escapeSelector( this.ids.button ) ).length ) {\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t}\n\t},\n\n\t_buttonEvents: {\n\n\t\t// Prevent text selection from being reset when interacting with the selectmenu (#10144)\n\t\tmousedown: function() {\n\t\t\tvar selection;\n\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tselection = window.getSelection();\n\t\t\t\tif ( selection.rangeCount ) {\n\t\t\t\t\tthis.range = selection.getRangeAt( 0 );\n\t\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t} else {\n\t\t\t\tthis.range = document.selection.createRange();\n\t\t\t}\n\t\t},\n\n\t\tclick: function( event ) {\n\t\t\tthis._setSelection();\n\t\t\tthis._toggle( event );\n\t\t},\n\n\t\tkeydown: function( event ) {\n\t\t\tvar preventDefault = true;\n\t\t\tswitch ( event.keyCode ) {\n\t\t\tcase $.ui.keyCode.TAB:\n\t\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\t\tthis.close( event );\n\t\t\t\tpreventDefault = false;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\tif ( this.isOpen ) {\n\t\t\t\t\tthis._selectFocusedItem( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tif ( event.altKey ) {\n\t\t\t\t\tthis._toggle( event );\n\t\t\t\t} else {\n\t\t\t\t\tthis._move( \"prev\", event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tif ( event.altKey ) {\n\t\t\t\t\tthis._toggle( event );\n\t\t\t\t} else {\n\t\t\t\t\tthis._move( \"next\", event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\tif ( this.isOpen ) {\n\t\t\t\t\tthis._selectFocusedItem( event );\n\t\t\t\t} else {\n\t\t\t\t\tthis._toggle( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\tthis._move( \"prev\", event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tthis._move( \"next\", event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.HOME:\n\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tthis._move( \"first\", event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.END:\n\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tthis._move( \"last\", event );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.menu.trigger( event );\n\t\t\t\tpreventDefault = false;\n\t\t\t}\n\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t},\n\n\t_selectFocusedItem: function( event ) {\n\t\tvar item = this.menuItems.eq( this.focusIndex ).parent( \"li\" );\n\t\tif ( !item.hasClass( \"ui-state-disabled\" ) ) {\n\t\t\tthis._select( item.data( \"ui-selectmenu-item\" ), event );\n\t\t}\n\t},\n\n\t_select: function( item, event ) {\n\t\tvar oldIndex = this.element[ 0 ].selectedIndex;\n\n\t\t// Change native select element\n\t\tthis.element[ 0 ].selectedIndex = item.index;\n\t\tthis.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );\n\t\tthis._setAria( item );\n\t\tthis._trigger( \"select\", event, { item: item } );\n\n\t\tif ( item.index !== oldIndex ) {\n\t\t\tthis._trigger( \"change\", event, { item: item } );\n\t\t}\n\n\t\tthis.close( event );\n\t},\n\n\t_setAria: function( item ) {\n\t\tvar id = this.menuItems.eq( item.index ).attr( \"id\" );\n\n\t\tthis.button.attr( {\n\t\t\t\"aria-labelledby\": id,\n\t\t\t\"aria-activedescendant\": id\n\t\t} );\n\t\tthis.menu.attr( \"aria-activedescendant\", id );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tvar icon = this.button.find( \"span.ui-icon\" );\n\t\t\tthis._removeClass( icon, null, this.options.icons.button )\n\t\t\t\t._addClass( icon, null, value.button );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menuWrap.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"width\" ) {\n\t\t\tthis._resizeButton();\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis.menuInstance.option( \"disabled\", value );\n\t\tthis.button.attr( \"aria-disabled\", value );\n\t\tthis._toggleClass( this.button, null, \"ui-state-disabled\", value );\n\n\t\tthis.element.prop( \"disabled\", value );\n\t\tif ( value ) {\n\t\t\tthis.button.attr( \"tabindex\", -1 );\n\t\t\tthis.close();\n\t\t} else {\n\t\t\tthis.button.attr( \"tabindex\", 0 );\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element || !element[ 0 ] ) {\n\t\t\telement = this.element.closest( \".ui-front, dialog\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[ 0 ].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_toggleAttr: function() {\n\t\tthis.button.attr( \"aria-expanded\", this.isOpen );\n\n\t\t// We can't use two _toggleClass() calls here, because we need to make sure\n\t\t// we always remove classes first and add them second, otherwise if both classes have the\n\t\t// same theme class, it will be removed after we add it.\n\t\tthis._removeClass( this.button, \"ui-selectmenu-button-\" +\n\t\t\t( this.isOpen ? \"closed\" : \"open\" ) )\n\t\t\t._addClass( this.button, \"ui-selectmenu-button-\" +\n\t\t\t\t( this.isOpen ? \"open\" : \"closed\" ) )\n\t\t\t._toggleClass( this.menuWrap, \"ui-selectmenu-open\", null, this.isOpen );\n\n\t\tthis.menu.attr( \"aria-hidden\", !this.isOpen );\n\t},\n\n\t_resizeButton: function() {\n\t\tvar width = this.options.width;\n\n\t\t// For `width: false`, just remove inline style and stop\n\t\tif ( width === false ) {\n\t\t\tthis.button.css( \"width\", \"\" );\n\t\t\treturn;\n\t\t}\n\n\t\t// For `width: null`, match the width of the original element\n\t\tif ( width === null ) {\n\t\t\twidth = this.element.show().outerWidth();\n\t\t\tthis.element.hide();\n\t\t}\n\n\t\tthis.button.outerWidth( width );\n\t},\n\n\t_resizeMenu: function() {\n\t\tthis.menu.outerWidth( Math.max(\n\t\t\tthis.button.outerWidth(),\n\n\t\t\t// Support: IE10\n\t\t\t// IE10 wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping\n\t\t\tthis.menu.width( \"\" ).outerWidth() + 1\n\t\t) );\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar options = this._super();\n\n\t\toptions.disabled = this.element.prop( \"disabled\" );\n\n\t\treturn options;\n\t},\n\n\t_parseOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tdata = [];\n\t\toptions.each( function( index, item ) {\n\t\t\tdata.push( that._parseOption( $( item ), index ) );\n\t\t} );\n\t\tthis.items = data;\n\t},\n\n\t_parseOption: function( option, index ) {\n\t\tvar optgroup = option.parent( \"optgroup\" );\n\n\t\treturn {\n\t\t\telement: option,\n\t\t\tindex: index,\n\t\t\tvalue: option.val(),\n\t\t\tlabel: option.text(),\n\t\t\toptgroup: optgroup.attr( \"label\" ) || \"\",\n\t\t\tdisabled: optgroup.prop( \"disabled\" ) || option.prop( \"disabled\" )\n\t\t};\n\t},\n\n\t_destroy: function() {\n\t\tthis._unbindFormResetHandler();\n\t\tthis.menuWrap.remove();\n\t\tthis.button.remove();\n\t\tthis.element.show();\n\t\tthis.element.removeUniqueId();\n\t\tthis.labels.attr( \"for\", this.ids.element );\n\t}\n} ] );\n\n\n/*!\n * jQuery UI Slider 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Slider\n//>>group: Widgets\n//>>description: Displays a flexible slider with ranges and accessibility via keyboard.\n//>>docs: http://api.jqueryui.com/slider/\n//>>demos: http://jqueryui.com/slider/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/slider.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nvar widgetsSlider = $.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tclasses: {\n\t\t\t\"ui-slider\": \"ui-corner-all\",\n\t\t\t\"ui-slider-handle\": \"ui-corner-all\",\n\n\t\t\t// Note: ui-widget-header isn't the most fittingly semantic framework class for this\n\t\t\t// element, but worked best visually with a variety of themes\n\t\t\t\"ui-slider-range\": \"ui-corner-all ui-widget-header\"\n\t\t},\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// Callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t// Number of pages in a slider\n\t// (how many times can you page up/down to go through the whole range)\n\tnumPages: 5,\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\t\tthis._calculateNewMax();\n\n\t\tthis._addClass( \"ui-slider ui-slider-\" + this.orientation,\n\t\t\t\"ui-widget ui-widget-content\" );\n\n\t\tthis._refresh();\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ),\n\t\t\thandle = \"<span tabindex='0'></span>\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis._addClass( this.handles, \"ui-slider-handle\", \"ui-state-default\" );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each( function( i ) {\n\t\t\t$( this )\n\t\t\t\t.data( \"ui-slider-handle-index\", i )\n\t\t\t\t.attr( \"tabIndex\", 0 );\n\t\t} );\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options;\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[ 0 ], options.values[ 0 ] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice( 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"<div>\" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tthis._addClass( this.range, \"ui-slider-range\" );\n\t\t\t} else {\n\t\t\t\tthis._removeClass( this.range, \"ui-slider-range-min ui-slider-range-max\" );\n\n\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\tthis.range.css( {\n\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t} );\n\t\t\t}\n\t\t\tif ( options.range === \"min\" || options.range === \"max\" ) {\n\t\t\t\tthis._addClass( this.range, \"ui-slider-range-\" + options.range );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( this.range ) {\n\t\t\t\tthis.range.remove();\n\t\t\t}\n\t\t\tthis.range = null;\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tthis._off( this.handles );\n\t\tthis._on( this.handles, this._handleEvents );\n\t\tthis._hoverable( this.handles );\n\t\tthis._focusable( this.handles );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tif ( this.range ) {\n\t\t\tthis.range.remove();\n\t\t}\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each( function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values( i ) );\n\t\t\tif ( ( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t} );\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tthis._addClass( closestHandle, null, \"ui-state-active\" );\n\t\tclosestHandle.trigger( \"focus\" );\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css( \"borderTopWidth\" ), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css( \"borderBottomWidth\" ), 10 ) || 0 ) +\n\t\t\t\t( parseInt( closestHandle.css( \"marginTop\" ), 10 ) || 0 )\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis._removeClass( this.handles, null, \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left -\n\t\t\t\t( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top -\n\t\t\t\t( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_uiHash: function( index, value, values ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\thandleIndex: index,\n\t\t\tvalue: value !== undefined ? value : this.value()\n\t\t};\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tuiHash.value = value !== undefined ? value : this.values( index );\n\t\t\tuiHash.values = values || this.values();\n\t\t}\n\n\t\treturn uiHash;\n\t},\n\n\t_hasMultipleValues: function() {\n\t\treturn this.options.values && this.options.values.length;\n\t},\n\n\t_start: function( event, index ) {\n\t\treturn this._trigger( \"start\", event, this._uiHash( index ) );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar allowed, otherVal,\n\t\t\tcurrentValue = this.value(),\n\t\t\tnewValues = this.values();\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\tcurrentValue = this.values( index );\n\n\t\t\tif ( this.options.values.length === 2 && this.options.range === true ) {\n\t\t\t\tnewVal = index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );\n\t\t\t}\n\n\t\t\tnewValues[ index ] = newVal;\n\t\t}\n\n\t\tif ( newVal === currentValue ) {\n\t\t\treturn;\n\t\t}\n\n\t\tallowed = this._trigger( \"slide\", event, this._uiHash( index, newVal, newValues ) );\n\n\t\t// A slide can be canceled by returning false from the slide callback\n\t\tif ( allowed === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tthis.values( index, newVal );\n\t\t} else {\n\t\t\tthis.value( newVal );\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tthis._trigger( \"stop\", event, this._uiHash( index ) );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\t\t\tthis._trigger( \"change\", event, this._uiHash( index ) );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this._hasMultipleValues() ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length - 1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis._removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t._addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tif ( this.options.range ) {\n\t\t\t\t\tthis._refreshRange( value );\n\t\t\t\t}\n\n\t\t\t\t// Reset positioning from previous orientation\n\t\t\t\tthis.handles.css( value === \"horizontal\" ? \"bottom\" : \"left\", \"\" );\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\n\t\t\t\t// Start from the last handle to prevent unreachable handles (#9046)\n\t\t\t\tfor ( i = valsLength - 1; i >= 0; i-- ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"step\":\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._calculateNewMax();\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis._toggleClass( null, \"ui-state-disabled\", !!value );\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this._hasMultipleValues() ) {\n\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// Returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = ( val - this._valueMin() ) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs( valModStep ) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed( 5 ) );\n\t},\n\n\t_calculateNewMax: function() {\n\t\tvar max = this.options.max,\n\t\t\tmin = this._valueMin(),\n\t\t\tstep = this.options.step,\n\t\t\taboveMin = Math.round( ( max - min ) / step ) * step;\n\t\tmax = aboveMin + min;\n\t\tif ( max > this.options.max ) {\n\n\t\t\t//If max is not divisible by step, rounding off may increase its value\n\t\t\tmax -= step;\n\t\t}\n\t\tthis.max = parseFloat( max.toFixed( this._precision() ) );\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.max;\n\t},\n\n\t_refreshRange: function( orientation ) {\n\t\tif ( orientation === \"vertical\" ) {\n\t\t\tthis.range.css( { \"width\": \"\", \"left\": \"\" } );\n\t\t}\n\t\tif ( orientation === \"horizontal\" ) {\n\t\t\tthis.range.css( { \"height\": \"\", \"bottom\": \"\" } );\n\t\t}\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this._hasMultipleValues() ) {\n\t\t\tthis.handles.each( function( i ) {\n\t\t\t\tvalPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -\n\t\t\t\t\tthat._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\tleft: valPercent + \"%\"\n\t\t\t\t\t\t\t}, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\twidth: ( valPercent - lastValPercent ) + \"%\"\n\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\tqueue: false,\n\t\t\t\t\t\t\t\tduration: o.animate\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\tbottom: ( valPercent ) + \"%\"\n\t\t\t\t\t\t\t}, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\t\t\t\theight: ( valPercent - lastValPercent ) + \"%\"\n\t\t\t\t\t\t\t}, {\n\t\t\t\t\t\t\t\tqueue: false,\n\t\t\t\t\t\t\t\tduration: o.animate\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t} );\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\twidth: valPercent + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\twidth: ( 100 - valPercent ) + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\theight: valPercent + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( {\n\t\t\t\t\theight: ( 100 - valPercent ) + \"%\"\n\t\t\t\t}, o.animate );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\tthis._addClass( $( event.target ), null, \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this._hasMultipleValues() ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue(\n\t\t\t\t\t\tcurVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\tthis._removeClass( $( event.target ), null, \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n\n/*!\n * jQuery UI Sortable 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Sortable\n//>>group: Interactions\n//>>description: Enables items in a list to be sorted using the mouse.\n//>>docs: http://api.jqueryui.com/sortable/\n//>>demos: http://jqueryui.com/sortable/\n//>>css.structure: ../../themes/base/sortable.css\n\n\n\nvar widgetsSortable = $.widget( \"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.12.1\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\n\t_isOverAxis: function( x, reference, size ) {\n\t\treturn ( x >= reference ) && ( x < ( reference + size ) );\n\t},\n\n\t_isFloating: function( item ) {\n\t\treturn ( /left|right/ ).test( item.css( \"float\" ) ) ||\n\t\t\t( /inline|table-cell/ ).test( item.css( \"display\" ) );\n\t},\n\n\t_create: function() {\n\t\tthis.containerCache = {};\n\t\tthis._addClass( \"ui-sortable\" );\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\tthis._setHandleClassName();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"handle\" ) {\n\t\t\tthis._setHandleClassName();\n\t\t}\n\t},\n\n\t_setHandleClassName: function() {\n\t\tvar that = this;\n\t\tthis._removeClass( this.element.find( \".ui-sortable-handle\" ), \"ui-sortable-handle\" );\n\t\t$.each( this.items, function() {\n\t\t\tthat._addClass(\n\t\t\t\tthis.instance.options.handle ?\n\t\t\t\t\tthis.item.find( this.instance.options.handle ) :\n\t\t\t\t\tthis.item,\n\t\t\t\t\"ui-sortable-handle\"\n\t\t\t);\n\t\t} );\n\t},\n\n\t_destroy: function() {\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[ i ].item.removeData( this.widgetName + \"-item\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function( event, overrideHandle ) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif ( this.reverting ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( this.options.disabled || this.options.type === \"static\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems( event );\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$( event.target ).parents().each( function() {\n\t\t\tif ( $.data( this, that.widgetName + \"-item\" ) === that ) {\n\t\t\t\tcurrentItem = $( this );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t\tif ( $.data( event.target, that.widgetName + \"-item\" ) === that ) {\n\t\t\tcurrentItem = $( event.target );\n\t\t}\n\n\t\tif ( !currentItem ) {\n\t\t\treturn false;\n\t\t}\n\t\tif ( this.options.handle && !overrideHandle ) {\n\t\t\t$( this.options.handle, currentItem ).find( \"*\" ).addBack().each( function() {\n\t\t\t\tif ( this === event.target ) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tif ( !validHandle ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function( event, overrideHandle, noActivation ) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to\n\t\t// mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper( event );\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend( this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\n\t\t\t// This is a relative to absolute position minus the actual position calculation -\n\t\t\t// only used for relative positioned helper\n\t\t\trelative: this._getRelativeOffset()\n\t\t} );\n\n\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css( \"position\", \"absolute\" );\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this._generatePosition( event );\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = {\n\t\t\tprev: this.currentItem.prev()[ 0 ],\n\t\t\tparent: this.currentItem.parent()[ 0 ]\n\t\t};\n\n\t\t// If the helper is not the original, hide the original so it's not playing any role during\n\t\t// the drag, won't cause anything bad this way\n\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Set a containment if given in the options\n\t\tif ( o.containment ) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif ( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\t// Support: IE\n\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\tbody.css( \"cursor\", o.cursor );\n\n\t\t\tthis.storedStylesheet =\n\t\t\t\t$( \"<style>*{ cursor: \" + o.cursor + \" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\tif ( o.opacity ) { // opacity option\n\t\t\tif ( this.helper.css( \"opacity\" ) ) {\n\t\t\t\tthis._storedOpacity = this.helper.css( \"opacity\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"opacity\", o.opacity );\n\t\t}\n\n\t\tif ( o.zIndex ) { // zIndex option\n\t\t\tif ( this.helper.css( \"zIndex\" ) ) {\n\t\t\t\tthis._storedZIndex = this.helper.css( \"zIndex\" );\n\t\t\t}\n\t\t\tthis.helper.css( \"zIndex\", o.zIndex );\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"start\", event, this._uiHash() );\n\n\t\t//Recache the helper size\n\t\tif ( !this._preserveHelperProportions ) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif ( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ( $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis._addClass( this.helper, \"ui-sortable-helper\" );\n\n\t\t// Execute the drag once - this causes the helper not to be visiblebefore getting its\n\t\t// correct position\n\t\tthis._mouseDrag( event );\n\t\treturn true;\n\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options,\n\t\t\tscrolled = false;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition( event );\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\tif ( !this.lastPositionAbs ) {\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t}\n\n\t\t//Do scrolling\n\t\tif ( this.options.scroll ) {\n\t\t\tif ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t\tthis.scrollParent[ 0 ].tagName !== \"HTML\" ) {\n\n\t\t\t\tif ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -\n\t\t\t\t\t\tevent.pageY < o.scrollSensitivity ) {\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollTop =\n\t\t\t\t\t\tscrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t\tif ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -\n\t\t\t\t\t\tevent.pageX < o.scrollSensitivity ) {\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {\n\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft = scrolled =\n\t\t\t\t\t\tthis.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );\n\t\t\t\t} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );\n\t\t\t\t}\n\n\t\t\t\tif ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {\n\t\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\t\tthis.document.scrollLeft() - o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <\n\t\t\t\t\t\to.scrollSensitivity ) {\n\t\t\t\t\tscrolled = this.document.scrollLeft(\n\t\t\t\t\t\tthis.document.scrollLeft() + o.scrollSpeed\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( this, event );\n\t\t\t}\n\t\t}\n\n\t\t//Regenerate the absolute position used for position checks\n\t\tthis.positionAbs = this._convertPositionTo( \"absolute\" );\n\n\t\t//Set the helper position\n\t\tif ( !this.options.axis || this.options.axis !== \"y\" ) {\n\t\t\tthis.helper[ 0 ].style.left = this.position.left + \"px\";\n\t\t}\n\t\tif ( !this.options.axis || this.options.axis !== \"x\" ) {\n\t\t\tthis.helper[ 0 ].style.top = this.position.top + \"px\";\n\t\t}\n\n\t\t//Rearrange\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[ i ];\n\t\t\titemElement = item.item[ 0 ];\n\t\t\tintersection = this._intersectsWithPointer( item );\n\t\t\tif ( !intersection ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items from other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this, moving items in \"sub-sortables\" can cause\n\t\t\t// the placeholder to jitter between the outer and inner container.\n\t\t\tif ( item.instance !== this.currentContainer ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif ( itemElement !== this.currentItem[ 0 ] &&\n\t\t\t\tthis.placeholder[ intersection === 1 ? \"next\" : \"prev\" ]()[ 0 ] !== itemElement &&\n\t\t\t\t!$.contains( this.placeholder[ 0 ], itemElement ) &&\n\t\t\t\t( this.options.type === \"semi-dynamic\" ?\n\t\t\t\t\t!$.contains( this.element[ 0 ], itemElement ) :\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif ( this.options.tolerance === \"pointer\" || this._intersectsWithSides( item ) ) {\n\t\t\t\t\tthis._rearrange( event, item );\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers( event );\n\n\t\t//Interconnect with droppables\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.drag( this, event );\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger( \"sort\", event, this._uiHash() );\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function( event, noPropagation ) {\n\n\t\tif ( !event ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ( $.ui.ddmanager && !this.options.dropBehaviour ) {\n\t\t\t$.ui.ddmanager.drop( this, event );\n\t\t}\n\n\t\tif ( this.options.revert ) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollLeft\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top +\n\t\t\t\t\t( this.offsetParent[ 0 ] === this.document[ 0 ].body ?\n\t\t\t\t\t\t0 :\n\t\t\t\t\t\tthis.offsetParent[ 0 ].scrollTop\n\t\t\t\t\t);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$( this.helper ).animate(\n\t\t\t\tanimation,\n\t\t\t\tparseInt( this.options.revert, 10 ) || 500,\n\t\t\t\tfunction() {\n\t\t\t\t\tthat._clear( event );\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tthis._clear( event, noPropagation );\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif ( this.dragging ) {\n\n\t\t\tthis._mouseUp( new $.Event( \"mouseup\", { target: null } ) );\n\n\t\t\tif ( this.options.helper === \"original\" ) {\n\t\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor ( var i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"deactivate\", null, this._uiHash( this ) );\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", null, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( this.placeholder ) {\n\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t\t// it unbinds ALL events from the original node!\n\t\t\tif ( this.placeholder[ 0 ].parentNode ) {\n\t\t\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\t\t\t}\n\t\t\tif ( this.options.helper !== \"original\" && this.helper &&\n\t\t\t\t\tthis.helper[ 0 ].parentNode ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend( this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t} );\n\n\t\t\tif ( this.domPosition.prev ) {\n\t\t\t\t$( this.domPosition.prev ).after( this.currentItem );\n\t\t\t} else {\n\t\t\t\t$( this.domPosition.parent ).prepend( this.currentItem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$( items ).each( function() {\n\t\t\tvar res = ( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" )\n\t\t\t\t.match( o.expression || ( /(.+)[\\-=_](.+)/ ) );\n\t\t\tif ( res ) {\n\t\t\t\tstr.push(\n\t\t\t\t\t( o.key || res[ 1 ] + \"[]\" ) +\n\t\t\t\t\t\"=\" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );\n\t\t\t}\n\t\t} );\n\n\t\tif ( !str.length && o.key ) {\n\t\t\tstr.push( o.key + \"=\" );\n\t\t}\n\n\t\treturn str.join( \"&\" );\n\n\t},\n\n\ttoArray: function( o ) {\n\n\t\tvar items = this._getItemsAsjQuery( o && o.connected ),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each( function() {\n\t\t\tret.push( $( o.item || this ).attr( o.attribute || \"id\" ) || \"\" );\n\t\t} );\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function( item ) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t &&\n\t\t\t\t( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l &&\n\t\t\t\t( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t( this.options.tolerance !== \"pointer\" &&\n\t\t\t\tthis.helperProportions[ this.floating ? \"width\" : \"height\" ] >\n\t\t\t\titem[ this.floating ? \"width\" : \"height\" ] )\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half\n\t\t\t\tx2 - ( this.helperProportions.width / 2 ) < r && // Left Half\n\t\t\t\tt < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half\n\t\t\t\ty2 - ( this.helperProportions.height / 2 ) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function( item ) {\n\t\tvar verticalDirection, horizontalDirection,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.top + this.offset.click.top, item.top, item.height ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) ||\n\t\t\t\tthis._isOverAxis(\n\t\t\t\t\tthis.positionAbs.left + this.offset.click.left, item.left, item.width ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( !isOverElement ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tverticalDirection = this._getDragVerticalDirection();\n\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\treturn this.floating ?\n\t\t\t( ( horizontalDirection === \"right\" || verticalDirection === \"down\" ) ? 2 : 1 )\n\t\t\t: ( verticalDirection && ( verticalDirection === \"down\" ? 2 : 1 ) );\n\n\t},\n\n\t_intersectsWithSides: function( item ) {\n\n\t\tvar isOverBottomHalf = this._isOverAxis( this.positionAbs.top +\n\t\t\t\tthis.offset.click.top, item.top + ( item.height / 2 ), item.height ),\n\t\t\tisOverRightHalf = this._isOverAxis( this.positionAbs.left +\n\t\t\t\tthis.offset.click.left, item.left + ( item.width / 2 ), item.width ),\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif ( this.floating && horizontalDirection ) {\n\t\t\treturn ( ( horizontalDirection === \"right\" && isOverRightHalf ) ||\n\t\t\t\t( horizontalDirection === \"left\" && !isOverRightHalf ) );\n\t\t} else {\n\t\t\treturn verticalDirection && ( ( verticalDirection === \"down\" && isOverBottomHalf ) ||\n\t\t\t\t( verticalDirection === \"up\" && !isOverBottomHalf ) );\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && ( delta > 0 ? \"down\" : \"up\" );\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && ( delta > 0 ? \"right\" : \"left\" );\n\t},\n\n\trefresh: function( event ) {\n\t\tthis._refreshItems( event );\n\t\tthis._setHandleClassName();\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ?\n\t\t\t[ options.connectWith ] :\n\t\t\toptions.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function( connected ) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif ( connectWith && connected ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ $.isFunction( inst.options.items ) ?\n\t\t\t\t\t\t\tinst.options.items.call( inst.element ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t\t\t\t\t.not( \".ui-sortable-placeholder\" ), inst ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push( [ $.isFunction( this.options.items ) ?\n\t\t\tthis.options.items\n\t\t\t\t.call( this.element, null, { options: this.options, item: this.currentItem } ) :\n\t\t\t$( this.options.items, this.element )\n\t\t\t\t.not( \".ui-sortable-helper\" )\n\t\t\t\t.not( \".ui-sortable-placeholder\" ), this ] );\n\n\t\tfunction addItems() {\n\t\t\titems.push( this );\n\t\t}\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\tqueries[ i ][ 0 ].each( addItems );\n\t\t}\n\n\t\treturn $( items );\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find( \":data(\" + this.widgetName + \"-item)\" );\n\n\t\tthis.items = $.grep( this.items, function( item ) {\n\t\t\tfor ( var j = 0; j < list.length; j++ ) {\n\t\t\t\tif ( list[ j ] === item.item[ 0 ] ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} );\n\n\t},\n\n\t_refreshItems: function( event ) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [ this ];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [ [ $.isFunction( this.options.items ) ?\n\t\t\t\tthis.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t$( this.options.items, this.element ), this ] ],\n\t\t\tconnectWith = this._connectWith();\n\n\t\t//Shouldn't be run the first time through due to massive slow-down\n\t\tif ( connectWith && this.ready ) {\n\t\t\tfor ( i = connectWith.length - 1; i >= 0; i-- ) {\n\t\t\t\tcur = $( connectWith[ i ], this.document[ 0 ] );\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j-- ) {\n\t\t\t\t\tinst = $.data( cur[ j ], this.widgetFullName );\n\t\t\t\t\tif ( inst && inst !== this && !inst.options.disabled ) {\n\t\t\t\t\t\tqueries.push( [ $.isFunction( inst.options.items ) ?\n\t\t\t\t\t\t\tinst.options.items\n\t\t\t\t\t\t\t\t.call( inst.element[ 0 ], event, { item: this.currentItem } ) :\n\t\t\t\t\t\t\t$( inst.options.items, inst.element ), inst ] );\n\t\t\t\t\t\tthis.containers.push( inst );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ( i = queries.length - 1; i >= 0; i-- ) {\n\t\t\ttargetData = queries[ i ][ 1 ];\n\t\t\t_queries = queries[ i ][ 0 ];\n\n\t\t\tfor ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {\n\t\t\t\titem = $( _queries[ j ] );\n\n\t\t\t\t// Data for target checking (mouse manager)\n\t\t\t\titem.data( this.widgetName + \"-item\", targetData );\n\n\t\t\t\titems.push( {\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t},\n\n\trefreshPositions: function( fast ) {\n\n\t\t// Determine whether items are being displayed horizontally\n\t\tthis.floating = this.items.length ?\n\t\t\tthis.options.axis === \"x\" || this._isFloating( this.items[ 0 ].item ) :\n\t\t\tfalse;\n\n\t\t//This has to be redone because due to the item being moved out/into the offsetParent,\n\t\t// the offsetParent's position will change\n\t\tif ( this.offsetParent && this.helper ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tvar i, item, t, p;\n\n\t\tfor ( i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\titem = this.items[ i ];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif ( item.instance !== this.currentContainer && this.currentContainer &&\n\t\t\t\t\titem.item[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ?\n\t\t\t\t$( this.options.toleranceElement, item.item ) :\n\t\t\t\titem.item;\n\n\t\t\tif ( !fast ) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\n\t\tif ( this.options.custom && this.options.custom.refreshContainers ) {\n\t\t\tthis.options.custom.refreshContainers.call( this );\n\t\t} else {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tp = this.containers[ i ].element.offset();\n\t\t\t\tthis.containers[ i ].containerCache.left = p.left;\n\t\t\t\tthis.containers[ i ].containerCache.top = p.top;\n\t\t\t\tthis.containers[ i ].containerCache.width =\n\t\t\t\t\tthis.containers[ i ].element.outerWidth();\n\t\t\t\tthis.containers[ i ].containerCache.height =\n\t\t\t\t\tthis.containers[ i ].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function( that ) {\n\t\tthat = that || this;\n\t\tvar className,\n\t\t\to = that.options;\n\n\t\tif ( !o.placeholder || o.placeholder.constructor === String ) {\n\t\t\tclassName = o.placeholder;\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),\n\t\t\t\t\t\telement = $( \"<\" + nodeName + \">\", that.document[ 0 ] );\n\n\t\t\t\t\t\tthat._addClass( element, \"ui-sortable-placeholder\",\n\t\t\t\t\t\t\t\tclassName || that.currentItem[ 0 ].className )\n\t\t\t\t\t\t\t._removeClass( element, \"ui-sortable-helper\" );\n\n\t\t\t\t\tif ( nodeName === \"tbody\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder(\n\t\t\t\t\t\t\tthat.currentItem.find( \"tr\" ).eq( 0 ),\n\t\t\t\t\t\t\t$( \"<tr>\", that.document[ 0 ] ).appendTo( element )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat._createTrPlaceholder( that.currentItem, element );\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function( container, p ) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes -\n\t\t\t\t\t// the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a\n\t\t\t\t\t// class name is specified\n\t\t\t\t\tif ( className && !o.forcePlaceholderSize ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming\n\t\t\t\t\t// from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\tif ( !p.height() ) {\n\t\t\t\t\t\tp.height(\n\t\t\t\t\t\t\tthat.currentItem.innerHeight() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingTop\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingBottom\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t\tif ( !p.width() ) {\n\t\t\t\t\t\tp.width(\n\t\t\t\t\t\t\tthat.currentItem.innerWidth() -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingLeft\" ) || 0, 10 ) -\n\t\t\t\t\t\t\tparseInt( that.currentItem.css( \"paddingRight\" ) || 0, 10 ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after( that.placeholder );\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update( that, that.placeholder );\n\n\t},\n\n\t_createTrPlaceholder: function( sourceTr, targetTr ) {\n\t\tvar that = this;\n\n\t\tsourceTr.children().each( function() {\n\t\t\t$( \"<td>&#160;</td>\", that.document[ 0 ] )\n\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t.appendTo( targetTr );\n\t\t} );\n\t},\n\n\t_contactContainers: function( event ) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,\n\t\t\tfloating, axis,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// Get innermost container that intersects with item\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\n\t\t\t// Never consider a container that's located within the item itself\n\t\t\tif ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( this._intersectsWith( this.containers[ i ].containerCache ) ) {\n\n\t\t\t\t// If we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif ( innermostContainer &&\n\t\t\t\t\t\t$.contains(\n\t\t\t\t\t\t\tthis.containers[ i ].element[ 0 ],\n\t\t\t\t\t\t\tinnermostContainer.element[ 0 ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[ i ];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"out\", event, this._uiHash( this ) );\n\t\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// If no intersecting containers found, return\n\t\tif ( !innermostContainer ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Move the item into the container if it's not there already\n\t\tif ( this.containers.length === 1 ) {\n\t\t\tif ( !this.containers[ innermostIndex ].containerCache.over ) {\n\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// When entering a new container, we will find the item with the least distance and\n\t\t\t// append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || this._isFloating( this.currentItem );\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\taxis = floating ? \"pageX\" : \"pageY\";\n\n\t\t\tfor ( j = this.items.length - 1; j >= 0; j-- ) {\n\t\t\t\tif ( !$.contains(\n\t\t\t\t\t\tthis.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tcur = this.items[ j ].item.offset()[ posProperty ];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t}\n\n\t\t\t\tif ( Math.abs( event[ axis ] - cur ) < dist ) {\n\t\t\t\t\tdist = Math.abs( event[ axis ] - cur );\n\t\t\t\t\titemWithLeastDistance = this.items[ j ];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\" : \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.currentContainer === this.containers[ innermostIndex ] ) {\n\t\t\t\tif ( !this.currentContainer.containerCache.over ) {\n\t\t\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash() );\n\t\t\t\t\tthis.currentContainer.containerCache.over = 1;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titemWithLeastDistance ?\n\t\t\t\tthis._rearrange( event, itemWithLeastDistance, null, true ) :\n\t\t\t\tthis._rearrange( event, null, this.containers[ innermostIndex ].element, true );\n\t\t\tthis._trigger( \"change\", event, this._uiHash() );\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"change\", event, this._uiHash( this ) );\n\t\t\tthis.currentContainer = this.containers[ innermostIndex ];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update( this.currentContainer, this.placeholder );\n\n\t\t\tthis.containers[ innermostIndex ]._trigger( \"over\", event, this._uiHash( this ) );\n\t\t\tthis.containers[ innermostIndex ].containerCache.over = 1;\n\t\t}\n\n\t},\n\n\t_createHelper: function( event ) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction( o.helper ) ?\n\t\t\t\t$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :\n\t\t\t\t( o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem );\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif ( !helper.parents( \"body\" ).length ) {\n\t\t\t$( o.appendTo !== \"parent\" ?\n\t\t\t\to.appendTo :\n\t\t\t\tthis.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );\n\t\t}\n\n\t\tif ( helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tthis._storedCSS = {\n\t\t\t\twidth: this.currentItem[ 0 ].style.width,\n\t\t\t\theight: this.currentItem[ 0 ].style.height,\n\t\t\t\tposition: this.currentItem.css( \"position\" ),\n\t\t\t\ttop: this.currentItem.css( \"top\" ),\n\t\t\t\tleft: this.currentItem.css( \"left\" )\n\t\t\t};\n\t\t}\n\n\t\tif ( !helper[ 0 ].style.width || o.forceHelperSize ) {\n\t\t\thelper.width( this.currentItem.width() );\n\t\t}\n\t\tif ( !helper[ 0 ].style.height || o.forceHelperSize ) {\n\t\t\thelper.height( this.currentItem.height() );\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function( obj ) {\n\t\tif ( typeof obj === \"string\" ) {\n\t\t\tobj = obj.split( \" \" );\n\t\t}\n\t\tif ( $.isArray( obj ) ) {\n\t\t\tobj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };\n\t\t}\n\t\tif ( \"left\" in obj ) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif ( \"right\" in obj ) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif ( \"top\" in obj ) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif ( \"bottom\" in obj ) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the\n\t\t// following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the\n\t\t// next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't\n\t\t// the document, which means that the scroll is included in the initial calculation of the\n\t\t// offset of the parent, and never recalculated upon drag\n\t\tif ( this.cssPosition === \"absolute\" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this\n\t\t// information with an ugly IE fix\n\t\tif ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||\n\t\t\t\t( this.offsetParent[ 0 ].tagName &&\n\t\t\t\tthis.offsetParent[ 0 ].tagName.toLowerCase() === \"html\" && $.ui.ie ) ) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + ( parseInt( this.offsetParent.css( \"borderTopWidth\" ), 10 ) || 0 ),\n\t\t\tleft: po.left + ( parseInt( this.offsetParent.css( \"borderLeftWidth\" ), 10 ) || 0 )\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif ( this.cssPosition === \"relative\" ) {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - ( parseInt( this.helper.css( \"top\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - ( parseInt( this.helper.css( \"left\" ), 10 ) || 0 ) +\n\t\t\t\t\tthis.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: ( parseInt( this.currentItem.css( \"marginLeft\" ), 10 ) || 0 ),\n\t\t\ttop: ( parseInt( this.currentItem.css( \"marginTop\" ), 10 ) || 0 )\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\t\tif ( o.containment === \"document\" || o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\to.containment === \"document\" ?\n\t\t\t\t\tthis.document.width() :\n\t\t\t\t\tthis.window.width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( o.containment === \"document\" ?\n\t\t\t\t\t( this.document.height() || document.body.parentNode.scrollHeight ) :\n\t\t\t\t\tthis.window.height() || this.document[ 0 ].body.parentNode.scrollHeight\n\t\t\t\t) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {\n\t\t\tce = $( o.containment )[ 0 ];\n\t\t\tco = $( o.containment ).offset();\n\t\t\tover = ( $( ce ).css( \"overflow\" ) !== \"hidden\" );\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + ( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingLeft\" ), 10 ) || 0 ) - this.margins.left,\n\t\t\t\tco.top + ( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) +\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingTop\" ), 10 ) || 0 ) - this.margins.top,\n\t\t\t\tco.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderLeftWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingRight\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.width - this.margins.left,\n\t\t\t\tco.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"borderTopWidth\" ), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( $( ce ).css( \"paddingBottom\" ), 10 ) || 0 ) -\n\t\t\t\t\tthis.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function( d, pos ) {\n\n\t\tif ( !pos ) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.top\t+\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top * mod -\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpos.left +\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left * mod +\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left * mod\t-\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :\n\t\t\t\t\tscroll.scrollLeft() ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function( event ) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" &&\n\t\t\t\t!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\t$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?\n\t\t\t\t\tthis.offsetParent :\n\t\t\t\t\tthis.scrollParent,\n\t\t\t\tscrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif ( this.cssPosition === \"relative\" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&\n\t\t\t\tthis.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif ( this.originalPosition ) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {\n\t\t\t\t\tpageX = this.containment[ 0 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {\n\t\t\t\t\tpageY = this.containment[ 1 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {\n\t\t\t\t\tpageX = this.containment[ 2 ] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {\n\t\t\t\t\tpageY = this.containment[ 3 ] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( o.grid ) {\n\t\t\t\ttop = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /\n\t\t\t\t\to.grid[ 1 ] ) * o.grid[ 1 ];\n\t\t\t\tpageY = this.containment ?\n\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] &&\n\t\t\t\t\t\ttop - this.offset.click.top <= this.containment[ 3 ] ) ?\n\t\t\t\t\t\t\ttop :\n\t\t\t\t\t\t\t( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?\n\t\t\t\t\t\t\t\ttop - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :\n\t\t\t\t\t\t\t\ttop;\n\n\t\t\t\tleft = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /\n\t\t\t\t\to.grid[ 0 ] ) * o.grid[ 0 ];\n\t\t\t\tpageX = this.containment ?\n\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] &&\n\t\t\t\t\t\tleft - this.offset.click.left <= this.containment[ 2 ] ) ?\n\t\t\t\t\t\t\tleft :\n\t\t\t\t\t\t\t( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?\n\t\t\t\t\t\t\t\tleft - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :\n\t\t\t\t\t\t\t\tleft;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageY -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.top -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.top -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.top +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollTop() :\n\t\t\t\t\t( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )\n\t\t\t),\n\t\t\tleft: (\n\n\t\t\t\t// The absolute mouse position\n\t\t\t\tpageX -\n\n\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.click.left -\n\n\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.relative.left -\n\n\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\tthis.offset.parent.left +\n\t\t\t\t( ( this.cssPosition === \"fixed\" ?\n\t\t\t\t\t-this.scrollParent.scrollLeft() :\n\t\t\t\t\tscrollIsRootNode ? 0 : scroll.scrollLeft() ) )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function( event, i, a, hardRefresh ) {\n\n\t\ta ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :\n\t\t\ti.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],\n\t\t\t\t( this.direction === \"down\" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout,\n\t\t// if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay( function() {\n\t\t\tif ( counter === this.counter ) {\n\n\t\t\t\t//Precompute after each DOM insertion, NOT on mousemove\n\t\t\t\tthis.refreshPositions( !hardRefresh );\n\t\t\t}\n\t\t} );\n\n\t},\n\n\t_clear: function( event, noPropagation ) {\n\n\t\tthis.reverting = false;\n\n\t\t// We delay all events that have to be triggered to after the point where the placeholder\n\t\t// has been removed and everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets\n\t\t// reappended (see #4088)\n\t\tif ( !this._noFinalSort && this.currentItem.parent().length ) {\n\t\t\tthis.placeholder.before( this.currentItem );\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {\n\t\t\tfor ( i in this._storedCSS ) {\n\t\t\t\tif ( this._storedCSS[ i ] === \"auto\" || this._storedCSS[ i ] === \"static\" ) {\n\t\t\t\t\tthis._storedCSS[ i ] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css( this._storedCSS );\n\t\t\tthis._removeClass( this.currentItem, \"ui-sortable-helper\" );\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif ( this.fromOutside && !noPropagation ) {\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"receive\", event, this._uiHash( this.fromOutside ) );\n\t\t\t} );\n\t\t}\n\t\tif ( ( this.fromOutside ||\n\t\t\t\tthis.domPosition.prev !==\n\t\t\t\tthis.currentItem.prev().not( \".ui-sortable-helper\" )[ 0 ] ||\n\t\t\t\tthis.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {\n\n\t\t\t// Trigger update callback if the DOM position has changed\n\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\tthis._trigger( \"update\", event, this._uiHash() );\n\t\t\t} );\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif ( this !== this.currentContainer ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( function( event ) {\n\t\t\t\t\tthis._trigger( \"remove\", event, this._uiHash() );\n\t\t\t\t} );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"receive\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t\tdelayedTriggers.push( ( function( c ) {\n\t\t\t\t\treturn function( event ) {\n\t\t\t\t\t\tc._trigger( \"update\", event, this._uiHash( this ) );\n\t\t\t\t\t};\n\t\t\t\t} ).call( this, this.currentContainer ) );\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tfunction delayEvent( type, instance, container ) {\n\t\t\treturn function( event ) {\n\t\t\t\tcontainer._trigger( type, event, instance._uiHash( instance ) );\n\t\t\t};\n\t\t}\n\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\tif ( !noPropagation ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"deactivate\", this, this.containers[ i ] ) );\n\t\t\t}\n\t\t\tif ( this.containers[ i ].containerCache.over ) {\n\t\t\t\tdelayedTriggers.push( delayEvent( \"out\", this, this.containers[ i ] ) );\n\t\t\t\tthis.containers[ i ].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this.storedCursor ) {\n\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\tthis.storedStylesheet.remove();\n\t\t}\n\t\tif ( this._storedOpacity ) {\n\t\t\tthis.helper.css( \"opacity\", this._storedOpacity );\n\t\t}\n\t\tif ( this._storedZIndex ) {\n\t\t\tthis.helper.css( \"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex );\n\t\t}\n\n\t\tthis.dragging = false;\n\n\t\tif ( !noPropagation ) {\n\t\t\tthis._trigger( \"beforeStop\", event, this._uiHash() );\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,\n\t\t// it unbinds ALL events from the original node!\n\t\tthis.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );\n\n\t\tif ( !this.cancelHelperRemoval ) {\n\t\t\tif ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\t}\n\n\t\tif ( !noPropagation ) {\n\t\t\tfor ( i = 0; i < delayedTriggers.length; i++ ) {\n\n\t\t\t\t// Trigger all delayed events\n\t\t\t\tdelayedTriggers[ i ].call( this, event );\n\t\t\t}\n\t\t\tthis._trigger( \"stop\", event, this._uiHash() );\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn !this.cancelHelperRemoval;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function( _inst ) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $( [] ),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n} );\n\n\n/*!\n * jQuery UI Spinner 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Spinner\n//>>group: Widgets\n//>>description: Displays buttons to easily input numbers via the keyboard or mouse.\n//>>docs: http://api.jqueryui.com/spinner/\n//>>demos: http://jqueryui.com/spinner/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/spinner.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\nfunction spinnerModifer( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}\n\n$.widget( \"ui.spinner\", {\n\tversion: \"1.12.1\",\n\tdefaultElement: \"<input>\",\n\twidgetEventPrefix: \"spin\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-spinner\": \"ui-corner-all\",\n\t\t\t\"ui-spinner-down\": \"ui-corner-br\",\n\t\t\t\"ui-spinner-up\": \"ui-corner-tr\"\n\t\t},\n\t\tculture: null,\n\t\ticons: {\n\t\t\tdown: \"ui-icon-triangle-1-s\",\n\t\t\tup: \"ui-icon-triangle-1-n\"\n\t\t},\n\t\tincremental: true,\n\t\tmax: null,\n\t\tmin: null,\n\t\tnumberFormat: null,\n\t\tpage: 10,\n\t\tstep: 1,\n\n\t\tchange: null,\n\t\tspin: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\n\t\t// handle string values that need to be parsed\n\t\tthis._setOption( \"max\", this.options.max );\n\t\tthis._setOption( \"min\", this.options.min );\n\t\tthis._setOption( \"step\", this.options.step );\n\n\t\t// Only format if there is a value, prevents the field from being marked\n\t\t// as invalid in Firefox, see #9573.\n\t\tif ( this.value() !== \"\" ) {\n\n\t\t\t// Format the value, but don't constrain.\n\t\t\tthis._value( this.element.val(), true );\n\t\t}\n\n\t\tthis._draw();\n\t\tthis._on( this._events );\n\t\tthis._refresh();\n\n\t\t// Turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t} );\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar options = this._super();\n\t\tvar element = this.element;\n\n\t\t$.each( [ \"min\", \"max\", \"step\" ], function( i, option ) {\n\t\t\tvar value = element.attr( option );\n\t\t\tif ( value != null && value.length ) {\n\t\t\t\toptions[ option ] = value;\n\t\t\t}\n\t\t} );\n\n\t\treturn options;\n\t},\n\n\t_events: {\n\t\tkeydown: function( event ) {\n\t\t\tif ( this._start( event ) && this._keydown( event ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\tkeyup: \"_stop\",\n\t\tfocus: function() {\n\t\t\tthis.previous = this.element.val();\n\t\t},\n\t\tblur: function( event ) {\n\t\t\tif ( this.cancelBlur ) {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._stop();\n\t\t\tthis._refresh();\n\t\t\tif ( this.previous !== this.element.val() ) {\n\t\t\t\tthis._trigger( \"change\", event );\n\t\t\t}\n\t\t},\n\t\tmousewheel: function( event, delta ) {\n\t\t\tif ( !delta ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.spinning && !this._start( event ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );\n\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\tthis.mousewheelTimer = this._delay( function() {\n\t\t\t\tif ( this.spinning ) {\n\t\t\t\t\tthis._stop( event );\n\t\t\t\t}\n\t\t\t}, 100 );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t\"mousedown .ui-spinner-button\": function( event ) {\n\t\t\tvar previous;\n\n\t\t\t// We never want the buttons to have focus; whenever the user is\n\t\t\t// interacting with the spinner, the focus should be on the input.\n\t\t\t// If the input is focused then this.previous is properly set from\n\t\t\t// when the input first received focus. If the input is not focused\n\t\t\t// then we need to set this.previous based on the value before spinning.\n\t\t\tprevious = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?\n\t\t\t\tthis.previous : this.element.val();\n\t\t\tfunction checkFocus() {\n\t\t\t\tvar isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );\n\t\t\t\tif ( !isActive ) {\n\t\t\t\t\tthis.element.trigger( \"focus\" );\n\t\t\t\t\tthis.previous = previous;\n\n\t\t\t\t\t// support: IE\n\t\t\t\t\t// IE sets focus asynchronously, so we need to check if focus\n\t\t\t\t\t// moved off of the input because the user clicked on the button.\n\t\t\t\t\tthis._delay( function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Ensure focus is on (or stays on) the text field\n\t\t\tevent.preventDefault();\n\t\t\tcheckFocus.call( this );\n\n\t\t\t// Support: IE\n\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t// and check (again) if focus moved off of the input.\n\t\t\tthis.cancelBlur = true;\n\t\t\tthis._delay( function() {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\tcheckFocus.call( this );\n\t\t\t} );\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._repeat( null, $( event.currentTarget )\n\t\t\t\t.hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t\"mouseup .ui-spinner-button\": \"_stop\",\n\t\t\"mouseenter .ui-spinner-button\": function( event ) {\n\n\t\t\t// button will add ui-state-active if mouse was down while mouseleave and kept down\n\t\t\tif ( !$( event.currentTarget ).hasClass( \"ui-state-active\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._repeat( null, $( event.currentTarget )\n\t\t\t\t.hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\n\t\t// TODO: do we really want to consider this a stop?\n\t\t// shouldn't we just stop the repeater and wait until mouseup before\n\t\t// we trigger the stop event?\n\t\t\"mouseleave .ui-spinner-button\": \"_stop\"\n\t},\n\n\t// Support mobile enhanced option and make backcompat more sane\n\t_enhance: function() {\n\t\tthis.uiSpinner = this.element\n\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t.wrap( \"<span>\" )\n\t\t\t.parent()\n\n\t\t\t\t// Add buttons\n\t\t\t\t.append(\n\t\t\t\t\t\"<a></a><a></a>\"\n\t\t\t\t);\n\t},\n\n\t_draw: function() {\n\t\tthis._enhance();\n\n\t\tthis._addClass( this.uiSpinner, \"ui-spinner\", \"ui-widget ui-widget-content\" );\n\t\tthis._addClass( \"ui-spinner-input\" );\n\n\t\tthis.element.attr( \"role\", \"spinbutton\" );\n\n\t\t// Button bindings\n\t\tthis.buttons = this.uiSpinner.children( \"a\" )\n\t\t\t.attr( \"tabIndex\", -1 )\n\t\t\t.attr( \"aria-hidden\", true )\n\t\t\t.button( {\n\t\t\t\tclasses: {\n\t\t\t\t\t\"ui-button\": \"\"\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// TODO: Right now button does not support classes this is already updated in button PR\n\t\tthis._removeClass( this.buttons, \"ui-corner-all\" );\n\n\t\tthis._addClass( this.buttons.first(), \"ui-spinner-button ui-spinner-up\" );\n\t\tthis._addClass( this.buttons.last(), \"ui-spinner-button ui-spinner-down\" );\n\t\tthis.buttons.first().button( {\n\t\t\t\"icon\": this.options.icons.up,\n\t\t\t\"showLabel\": false\n\t\t} );\n\t\tthis.buttons.last().button( {\n\t\t\t\"icon\": this.options.icons.down,\n\t\t\t\"showLabel\": false\n\t\t} );\n\n\t\t// IE 6 doesn't understand height: 50% for the buttons\n\t\t// unless the wrapper has an explicit height\n\t\tif ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&\n\t\t\t\tthis.uiSpinner.height() > 0 ) {\n\t\t\tthis.uiSpinner.height( this.uiSpinner.height() );\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar options = this.options,\n\t\t\tkeyCode = $.ui.keyCode;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase keyCode.UP:\n\t\t\tthis._repeat( null, 1, event );\n\t\t\treturn true;\n\t\tcase keyCode.DOWN:\n\t\t\tthis._repeat( null, -1, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_UP:\n\t\t\tthis._repeat( null, options.page, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_DOWN:\n\t\t\tthis._repeat( null, -options.page, event );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_start: function( event ) {\n\t\tif ( !this.spinning && this._trigger( \"start\", event ) === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\t\tthis.spinning = true;\n\t\treturn true;\n\t},\n\n\t_repeat: function( i, steps, event ) {\n\t\ti = i || 500;\n\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay( function() {\n\t\t\tthis._repeat( 40, steps, event );\n\t\t}, i );\n\n\t\tthis._spin( steps * this.options.step, event );\n\t},\n\n\t_spin: function( step, event ) {\n\t\tvar value = this.value() || 0;\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\n\t\tvalue = this._adjustValue( value + step * this._increment( this.counter ) );\n\n\t\tif ( !this.spinning || this._trigger( \"spin\", event, { value: value } ) !== false ) {\n\t\t\tthis._value( value );\n\t\t\tthis.counter++;\n\t\t}\n\t},\n\n\t_increment: function( i ) {\n\t\tvar incremental = this.options.incremental;\n\n\t\tif ( incremental ) {\n\t\t\treturn $.isFunction( incremental ) ?\n\t\t\t\tincremental( i ) :\n\t\t\t\tMath.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );\n\t\t}\n\n\t\treturn 1;\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_adjustValue: function( value ) {\n\t\tvar base, aboveMin,\n\t\t\toptions = this.options;\n\n\t\t// Make sure we're at a valid step\n\t\t// - find out where we are relative to the base (min or 0)\n\t\tbase = options.min !== null ? options.min : 0;\n\t\taboveMin = value - base;\n\n\t\t// - round to the nearest step\n\t\taboveMin = Math.round( aboveMin / options.step ) * options.step;\n\n\t\t// - rounding is based on 0, so adjust back to our base\n\t\tvalue = base + aboveMin;\n\n\t\t// Fix precision from bad JS floating point math\n\t\tvalue = parseFloat( value.toFixed( this._precision() ) );\n\n\t\t// Clamp the value\n\t\tif ( options.max !== null && value > options.max ) {\n\t\t\treturn options.max;\n\t\t}\n\t\tif ( options.min !== null && value < options.min ) {\n\t\t\treturn options.min;\n\t\t}\n\n\t\treturn value;\n\t},\n\n\t_stop: function( event ) {\n\t\tif ( !this.spinning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout( this.timer );\n\t\tclearTimeout( this.mousewheelTimer );\n\t\tthis.counter = 0;\n\t\tthis.spinning = false;\n\t\tthis._trigger( \"stop\", event );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar prevValue, first, last;\n\n\t\tif ( key === \"culture\" || key === \"numberFormat\" ) {\n\t\t\tprevValue = this._parse( this.element.val() );\n\t\t\tthis.options[ key ] = value;\n\t\t\tthis.element.val( this._format( prevValue ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"max\" || key === \"min\" || key === \"step\" ) {\n\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\tvalue = this._parse( value );\n\t\t\t}\n\t\t}\n\t\tif ( key === \"icons\" ) {\n\t\t\tfirst = this.buttons.first().find( \".ui-icon\" );\n\t\t\tthis._removeClass( first, null, this.options.icons.up );\n\t\t\tthis._addClass( first, null, value.up );\n\t\t\tlast = this.buttons.last().find( \".ui-icon\" );\n\t\t\tthis._removeClass( last, null, this.options.icons.down );\n\t\t\tthis._addClass( last, null, value.down );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis._super( value );\n\n\t\tthis._toggleClass( this.uiSpinner, null, \"ui-state-disabled\", !!value );\n\t\tthis.element.prop( \"disabled\", !!value );\n\t\tthis.buttons.button( value ? \"disable\" : \"enable\" );\n\t},\n\n\t_setOptions: spinnerModifer( function( options ) {\n\t\tthis._super( options );\n\t} ),\n\n\t_parse: function( val ) {\n\t\tif ( typeof val === \"string\" && val !== \"\" ) {\n\t\t\tval = window.Globalize && this.options.numberFormat ?\n\t\t\t\tGlobalize.parseFloat( val, 10, this.options.culture ) : +val;\n\t\t}\n\t\treturn val === \"\" || isNaN( val ) ? null : val;\n\t},\n\n\t_format: function( value ) {\n\t\tif ( value === \"\" ) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn window.Globalize && this.options.numberFormat ?\n\t\t\tGlobalize.format( value, this.options.numberFormat, this.options.culture ) :\n\t\t\tvalue;\n\t},\n\n\t_refresh: function() {\n\t\tthis.element.attr( {\n\t\t\t\"aria-valuemin\": this.options.min,\n\t\t\t\"aria-valuemax\": this.options.max,\n\n\t\t\t// TODO: what should we do with values that can't be parsed?\n\t\t\t\"aria-valuenow\": this._parse( this.element.val() )\n\t\t} );\n\t},\n\n\tisValid: function() {\n\t\tvar value = this.value();\n\n\t\t// Null is invalid\n\t\tif ( value === null ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If value gets adjusted, it's invalid\n\t\treturn value === this._adjustValue( value );\n\t},\n\n\t// Update the value without triggering change\n\t_value: function( value, allowAny ) {\n\t\tvar parsed;\n\t\tif ( value !== \"\" ) {\n\t\t\tparsed = this._parse( value );\n\t\t\tif ( parsed !== null ) {\n\t\t\t\tif ( !allowAny ) {\n\t\t\t\t\tparsed = this._adjustValue( parsed );\n\t\t\t\t}\n\t\t\t\tvalue = this._format( parsed );\n\t\t\t}\n\t\t}\n\t\tthis.element.val( value );\n\t\tthis._refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.prop( \"disabled\", false )\n\t\t\t.removeAttr( \"autocomplete role aria-valuemin aria-valuemax aria-valuenow\" );\n\n\t\tthis.uiSpinner.replaceWith( this.element );\n\t},\n\n\tstepUp: spinnerModifer( function( steps ) {\n\t\tthis._stepUp( steps );\n\t} ),\n\t_stepUp: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( ( steps || 1 ) * this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tstepDown: spinnerModifer( function( steps ) {\n\t\tthis._stepDown( steps );\n\t} ),\n\t_stepDown: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( ( steps || 1 ) * -this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tpageUp: spinnerModifer( function( pages ) {\n\t\tthis._stepUp( ( pages || 1 ) * this.options.page );\n\t} ),\n\n\tpageDown: spinnerModifer( function( pages ) {\n\t\tthis._stepDown( ( pages || 1 ) * this.options.page );\n\t} ),\n\n\tvalue: function( newVal ) {\n\t\tif ( !arguments.length ) {\n\t\t\treturn this._parse( this.element.val() );\n\t\t}\n\t\tspinnerModifer( this._value ).call( this, newVal );\n\t},\n\n\twidget: function() {\n\t\treturn this.uiSpinner;\n\t}\n} );\n\n// DEPRECATED\n// TODO: switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for spinner html extension points\n\t$.widget( \"ui.spinner\", $.ui.spinner, {\n\t\t_enhance: function() {\n\t\t\tthis.uiSpinner = this.element\n\t\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t\t.wrap( this._uiSpinnerHtml() )\n\t\t\t\t.parent()\n\n\t\t\t\t\t// Add buttons\n\t\t\t\t\t.append( this._buttonHtml() );\n\t\t},\n\t\t_uiSpinnerHtml: function() {\n\t\t\treturn \"<span>\";\n\t\t},\n\n\t\t_buttonHtml: function() {\n\t\t\treturn \"<a></a><a></a>\";\n\t\t}\n\t} );\n}\n\nvar widgetsSpinner = $.ui.spinner;\n\n\n/*!\n * jQuery UI Tabs 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Tabs\n//>>group: Widgets\n//>>description: Transforms a set of container elements into a tab structure.\n//>>docs: http://api.jqueryui.com/tabs/\n//>>demos: http://jqueryui.com/tabs/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/tabs.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.tabs\", {\n\tversion: \"1.12.1\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tclasses: {\n\t\t\t\"ui-tabs\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-nav\": \"ui-corner-all\",\n\t\t\t\"ui-tabs-panel\": \"ui-corner-bottom\",\n\t\t\t\"ui-tabs-tab\": \"ui-corner-top\"\n\t\t},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// Callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_isLocal: ( function() {\n\t\tvar rhash = /#.*$/;\n\n\t\treturn function( anchor ) {\n\t\t\tvar anchorUrl, locationUrl;\n\n\t\t\tanchorUrl = anchor.href.replace( rhash, \"\" );\n\t\t\tlocationUrl = location.href.replace( rhash, \"\" );\n\n\t\t\t// Decoding may throw an error if the URL isn't UTF-8 (#9518)\n\t\t\ttry {\n\t\t\t\tanchorUrl = decodeURIComponent( anchorUrl );\n\t\t\t} catch ( error ) {}\n\t\t\ttry {\n\t\t\t\tlocationUrl = decodeURIComponent( locationUrl );\n\t\t\t} catch ( error ) {}\n\n\t\t\treturn anchor.hash.length > 1 && anchorUrl === locationUrl;\n\t\t};\n\t} )(),\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis._addClass( \"ui-tabs\", \"ui-widget ui-widget-content\" );\n\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, options.collapsible );\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t} )\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// Check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each( function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// No active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// Handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// Don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\tvar focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.RIGHT:\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tselectedIndex++;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tgoingForward = false;\n\t\t\tselectedIndex--;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tselectedIndex = 0;\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.SPACE:\n\n\t\t\t// Activate only, no collapsing\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\t\t\tthis._activate( selectedIndex );\n\t\t\treturn;\n\t\tcase $.ui.keyCode.ENTER:\n\n\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\n\t\t\t// Determine if we should collapse or activate\n\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\treturn;\n\t\tdefault:\n\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control/command key will prevent automatic activation\n\t\tif ( !event.ctrlKey && !event.metaKey ) {\n\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay( function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.trigger( \"focus\" );\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).trigger( \"focus\" );\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis._toggleClass( \"ui-tabs-collapsible\", null, value );\n\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// Get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t} );\n\n\t\tthis._processTabs();\n\n\t\t// Was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\n\t\t// was active, active tab still exists\n\t\t} else {\n\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setOptionDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\ttabIndex: -1\n\t\t} );\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr( {\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t} );\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t} );\n\t\t\tthis._addClass( this.active, \"ui-tabs-active\", \"ui-state-active\" );\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr( {\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this,\n\t\t\tprevTabs = this.tabs,\n\t\t\tprevAnchors = this.anchors,\n\t\t\tprevPanels = this.panels;\n\n\t\tthis.tablist = this._getList().attr( \"role\", \"tablist\" );\n\t\tthis._addClass( this.tablist, \"ui-tabs-nav\",\n\t\t\t\"ui-helper-reset ui-helper-clearfix ui-widget-header\" );\n\n\t\t// Prevent users from focusing disabled tabs via click\n\t\tthis.tablist\n\t\t\t.on( \"mousedown\" + this.eventNamespace, \"> li\", function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} )\n\n\t\t\t// Support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.on( \"focus\" + this.eventNamespace, \".ui-tabs-anchor\", function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t} );\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.attr( {\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.tabs, \"ui-tabs-tab\", \"ui-state-default\" );\n\n\t\tthis.anchors = this.tabs.map( function() {\n\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t} )\n\t\t\t.attr( {\n\t\t\t\trole: \"presentation\",\n\t\t\t\ttabIndex: -1\n\t\t\t} );\n\t\tthis._addClass( this.anchors, \"ui-tabs-anchor\" );\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each( function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// Inline tab\n\t\t\tif ( that._isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanelId = selector.substring( 1 );\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\n\t\t\t// remote tab\n\t\t\t} else {\n\n\t\t\t\t// If the tab doesn't already have aria-controls,\n\t\t\t\t// generate an id by using a throw-away element\n\t\t\t\tpanelId = tab.attr( \"aria-controls\" ) || $( {} ).uniqueId()[ 0 ].id;\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length ) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr( {\n\t\t\t\t\"aria-controls\": panelId,\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t} );\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t} );\n\n\t\tthis.panels.attr( \"role\", \"tabpanel\" );\n\t\tthis._addClass( this.panels, \"ui-tabs-panel\", \"ui-widget-content\" );\n\n\t\t// Avoid memory leaks (#10056)\n\t\tif ( prevTabs ) {\n\t\t\tthis._off( prevTabs.not( this.tabs ) );\n\t\t\tthis._off( prevAnchors.not( this.anchors ) );\n\t\t\tthis._off( prevPanels.not( this.panels ) );\n\t\t}\n\t},\n\n\t// Allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.tablist || this.element.find( \"ol, ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setOptionDisabled: function( disabled ) {\n\t\tvar currentItem, li, i;\n\n\t\tif ( $.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// Disable tabs\n\t\tfor ( i = 0; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tcurrentItem = $( li );\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\tcurrentItem.attr( \"aria-disabled\", \"true\" );\n\t\t\t\tthis._addClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t} else {\n\t\t\t\tcurrentItem.removeAttr( \"aria-disabled\" );\n\t\t\t\tthis._removeClass( currentItem, null, \"ui-state-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\n\t\tthis._toggleClass( this.widget(), this.widgetFullName + \"-disabled\", null,\n\t\t\tdisabled === true );\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {};\n\t\tif ( event ) {\n\t\t\t$.each( event.split( \" \" ), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t} );\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\n\t\t// Always prevent the default action, even when disabled\n\t\tthis._on( true, this.anchors, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} );\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each( function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.element.children().not( this.panels ).each( function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t} );\n\n\t\t\tthis.panels.each( function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t} )\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each( function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t} ).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// Handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\tthat._addClass( eventData.newTab.closest( \"li\" ), \"ui-tabs-active\", \"ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// Start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\tthat._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t} );\n\t\t} else {\n\t\t\tthis._removeClass( eventData.oldTab.closest( \"li\" ),\n\t\t\t\t\"ui-tabs-active\", \"ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr( \"aria-hidden\", \"true\" );\n\t\teventData.oldTab.attr( {\n\t\t\t\"aria-selected\": \"false\",\n\t\t\t\"aria-expanded\": \"false\"\n\t\t} );\n\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter( function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t} )\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr( \"aria-hidden\", \"false\" );\n\t\teventData.newTab.attr( {\n\t\t\t\"aria-selected\": \"true\",\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\ttabIndex: 0\n\t\t} );\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// Trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler( {\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t} );\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" +\n\t\t\t\t$.ui.escapeSelector( index ) + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.tablist\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.off( this.eventNamespace );\n\n\t\tthis.anchors\n\t\t\t.removeAttr( \"role tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tabs.add( this.panels ).each( function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this ).removeAttr( \"role tabIndex \" +\n\t\t\t\t\t\"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.tabs.each( function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t} );\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setOptionDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t},\n\t\t\tcomplete = function( jqXHR, status ) {\n\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t}\n\n\t\t\t\tthat._removeClass( tab, \"ui-tabs-loading\" );\n\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\tdelete that.xhr;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Not remote\n\t\tif ( this._isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// Support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\tthis._addClass( tab, \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.done( function( response, status, jqXHR ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} )\n\t\t\t\t.fail( function( jqXHR, status ) {\n\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tcomplete( jqXHR, status );\n\t\t\t\t\t}, 1 );\n\t\t\t\t} );\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\n\t\t\t// Support: IE <11 only\n\t\t\t// Strip any hash that exists to prevent errors with the Ajax request\n\t\t\turl: anchor.attr( \"href\" ).replace( /#.*$/, \"\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n} );\n\n// DEPRECATED\n// TODO: Switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for ui-tab class (now ui-tabs-tab)\n\t$.widget( \"ui.tabs\", $.ui.tabs, {\n\t\t_processTabs: function() {\n\t\t\tthis._superApply( arguments );\n\t\t\tthis._addClass( this.tabs, \"ui-tab\" );\n\t\t}\n\t} );\n}\n\nvar widgetsTabs = $.ui.tabs;\n\n\n/*!\n * jQuery UI Tooltip 1.12.1\n * http://jqueryui.com\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n */\n\n//>>label: Tooltip\n//>>group: Widgets\n//>>description: Shows additional information for any element on hover or focus.\n//>>docs: http://api.jqueryui.com/tooltip/\n//>>demos: http://jqueryui.com/tooltip/\n//>>css.structure: ../../themes/base/core.css\n//>>css.structure: ../../themes/base/tooltip.css\n//>>css.theme: ../../themes/base/theme.css\n\n\n\n$.widget( \"ui.tooltip\", {\n\tversion: \"1.12.1\",\n\toptions: {\n\t\tclasses: {\n\t\t\t\"ui-tooltip\": \"ui-corner-all ui-widget-shadow\"\n\t\t},\n\t\tcontent: function() {\n\n\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\n\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t},\n\t\thide: true,\n\n\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"flipfit flip\"\n\t\t},\n\t\tshow: true,\n\t\ttrack: false,\n\n\t\t// Callbacks\n\t\tclose: null,\n\t\topen: null\n\t},\n\n\t_addDescribedBy: function( elem, id ) {\n\t\tvar describedby = ( elem.attr( \"aria-describedby\" ) || \"\" ).split( /\\s+/ );\n\t\tdescribedby.push( id );\n\t\telem\n\t\t\t.data( \"ui-tooltip-id\", id )\n\t\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n\t},\n\n\t_removeDescribedBy: function( elem ) {\n\t\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\t\tdescribedby = ( elem.attr( \"aria-describedby\" ) || \"\" ).split( /\\s+/ ),\n\t\t\tindex = $.inArray( id, describedby );\n\n\t\tif ( index !== -1 ) {\n\t\t\tdescribedby.splice( index, 1 );\n\t\t}\n\n\t\telem.removeData( \"ui-tooltip-id\" );\n\t\tdescribedby = $.trim( describedby.join( \" \" ) );\n\t\tif ( describedby ) {\n\t\t\telem.attr( \"aria-describedby\", describedby );\n\t\t} else {\n\t\t\telem.removeAttr( \"aria-describedby\" );\n\t\t}\n\t},\n\n\t_create: function() {\n\t\tthis._on( {\n\t\t\tmouseover: \"open\",\n\t\t\tfocusin: \"open\"\n\t\t} );\n\n\t\t// IDs of generated tooltips, needed for destroy\n\t\tthis.tooltips = {};\n\n\t\t// IDs of parent tooltips where we removed the title attribute\n\t\tthis.parents = {};\n\n\t\t// Append the aria-live region so tooltips announce correctly\n\t\tthis.liveRegion = $( \"<div>\" )\n\t\t\t.attr( {\n\t\t\t\trole: \"log\",\n\t\t\t\t\"aria-live\": \"assertive\",\n\t\t\t\t\"aria-relevant\": \"additions\"\n\t\t\t} )\n\t\t\t.appendTo( this.document[ 0 ].body );\n\t\tthis._addClass( this.liveRegion, null, \"ui-helper-hidden-accessible\" );\n\n\t\tthis.disabledTitles = $( [] );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar that = this;\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"content\" ) {\n\t\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\t\tthat._updateContent( tooltipData.element );\n\t\t\t} );\n\t\t}\n\t},\n\n\t_setOptionDisabled: function( value ) {\n\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t},\n\n\t_disable: function() {\n\t\tvar that = this;\n\n\t\t// Close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = tooltipData.element[ 0 ];\n\t\t\tthat.close( event, true );\n\t\t} );\n\n\t\t// Remove title attributes to prevent native tooltips\n\t\tthis.disabledTitles = this.disabledTitles.add(\n\t\t\tthis.element.find( this.options.items ).addBack()\n\t\t\t\t.filter( function() {\n\t\t\t\t\tvar element = $( this );\n\t\t\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\t\t\treturn element\n\t\t\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t\t\t.removeAttr( \"title\" );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t);\n\t},\n\n\t_enable: function() {\n\n\t\t// restore title attributes\n\t\tthis.disabledTitles.each( function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\t} );\n\t\tthis.disabledTitles = $( [] );\n\t},\n\n\topen: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.target : this.element )\n\n\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t// but always pointing at the same event target\n\t\t\t\t.closest( this.options.items );\n\n\t\t// No element to show a tooltip for or the tooltip is already open\n\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( target.attr( \"title\" ) ) {\n\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t}\n\n\t\ttarget.data( \"ui-tooltip-open\", true );\n\n\t\t// Kill parent tooltips, custom or native, for hover\n\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\ttarget.parents().each( function() {\n\t\t\t\tvar parent = $( this ),\n\t\t\t\t\tblurEvent;\n\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t}\n\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t};\n\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis._registerCloseHandlers( event, target );\n\t\tthis._updateContent( target, event );\n\t},\n\n\t_updateContent: function( target, event ) {\n\t\tvar content,\n\t\t\tcontentOption = this.options.content,\n\t\t\tthat = this,\n\t\t\teventType = event ? event.type : null;\n\n\t\tif ( typeof contentOption === \"string\" || contentOption.nodeType ||\n\t\t\t\tcontentOption.jquery ) {\n\t\t\treturn this._open( event, target, contentOption );\n\t\t}\n\n\t\tcontent = contentOption.call( target[ 0 ], function( response ) {\n\n\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\tthat._delay( function() {\n\n\t\t\t\t// Ignore async response if tooltip was closed already\n\t\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// JQuery creates a special event for focusin when it doesn't\n\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.type = eventType;\n\t\t\t\t}\n\t\t\t\tthis._open( event, target, response );\n\t\t\t} );\n\t\t} );\n\t\tif ( content ) {\n\t\t\tthis._open( event, target, content );\n\t\t}\n\t},\n\n\t_open: function( event, target, content ) {\n\t\tvar tooltipData, tooltip, delayedShow, a11yContent,\n\t\t\tpositionOption = $.extend( {}, this.options.position );\n\n\t\tif ( !content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Content can be updated multiple times. If the tooltip already\n\t\t// exists, then just update the content and bail.\n\t\ttooltipData = this._find( target );\n\t\tif ( tooltipData ) {\n\t\t\ttooltipData.tooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\treturn;\n\t\t}\n\n\t\t// If we have a title, clear it to prevent the native tooltip\n\t\t// we have to check first to avoid defining a title if none exists\n\t\t// (we don't want to cause an element to start matching [title])\n\t\t//\n\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t} else {\n\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t}\n\t\t}\n\n\t\ttooltipData = this._tooltip( target );\n\t\ttooltip = tooltipData.tooltip;\n\t\tthis._addDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\n\t\t// Support: Voiceover on OS X, JAWS on IE <= 9\n\t\t// JAWS announces deletions even when aria-relevant=\"additions\"\n\t\t// Voiceover will sometimes re-read the entire log region's contents from the beginning\n\t\tthis.liveRegion.children().hide();\n\t\ta11yContent = $( \"<div>\" ).html( tooltip.find( \".ui-tooltip-content\" ).html() );\n\t\ta11yContent.removeAttr( \"name\" ).find( \"[name]\" ).removeAttr( \"name\" );\n\t\ta11yContent.removeAttr( \"id\" ).find( \"[id]\" ).removeAttr( \"id\" );\n\t\ta11yContent.appendTo( this.liveRegion );\n\n\t\tfunction position( event ) {\n\t\t\tpositionOption.of = event;\n\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttooltip.position( positionOption );\n\t\t}\n\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\tthis._on( this.document, {\n\t\t\t\tmousemove: position\n\t\t\t} );\n\n\t\t\t// trigger once to override element-relative positioning\n\t\t\tposition( event );\n\t\t} else {\n\t\t\ttooltip.position( $.extend( {\n\t\t\t\tof: target\n\t\t\t}, this.options.position ) );\n\t\t}\n\n\t\ttooltip.hide();\n\n\t\tthis._show( tooltip, this.options.show );\n\n\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t// event.\n\t\t// Adds the check to add the timers only when both delay and track options are set (#14682)\n\t\tif ( this.options.track && this.options.show && this.options.show.delay ) {\n\t\t\tdelayedShow = this.delayedShow = setInterval( function() {\n\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t}\n\t\t\t}, $.fx.interval );\n\t\t}\n\n\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\t},\n\n\t_registerCloseHandlers: function( event, target ) {\n\t\tvar events = {\n\t\t\tkeyup: function( event ) {\n\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tvar fakeEvent = $.Event( event );\n\t\t\t\t\tfakeEvent.currentTarget = target[ 0 ];\n\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Only bind remove handler for delegated targets. Non-delegated\n\t\t// tooltips will handle this in destroy.\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tevents.remove = function() {\n\t\t\t\tthis._removeTooltip( this._find( target ).tooltip );\n\t\t\t};\n\t\t}\n\n\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\tevents.mouseleave = \"close\";\n\t\t}\n\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\tevents.focusout = \"close\";\n\t\t}\n\t\tthis._on( true, target, events );\n\t},\n\n\tclose: function( event ) {\n\t\tvar tooltip,\n\t\t\tthat = this,\n\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\ttooltipData = this._find( target );\n\n\t\t// The tooltip may already be closed\n\t\tif ( !tooltipData ) {\n\n\t\t\t// We set ui-tooltip-open immediately upon open (in open()), but only set the\n\t\t\t// additional data once there's actually content to show (in _open()). So even if the\n\t\t\t// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in\n\t\t\t// the period between open() and _open().\n\t\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\t\treturn;\n\t\t}\n\n\t\ttooltip = tooltipData.tooltip;\n\n\t\t// Disabling closes the tooltip, so we need to track when we're closing\n\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\tif ( tooltipData.closing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the interval for delayed tracking tooltips\n\t\tclearInterval( this.delayedShow );\n\n\t\t// Only set title if we had one before (see comment in _open())\n\t\t// If the title attribute has changed since open(), don't restore\n\t\tif ( target.data( \"ui-tooltip-title\" ) && !target.attr( \"title\" ) ) {\n\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t}\n\n\t\tthis._removeDescribedBy( target );\n\n\t\ttooltipData.hiding = true;\n\t\ttooltip.stop( true );\n\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\tthat._removeTooltip( $( this ) );\n\t\t} );\n\n\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\n\t\t// Remove 'remove' binding only on delegated targets\n\t\tif ( target[ 0 ] !== this.element[ 0 ] ) {\n\t\t\tthis._off( target, \"remove\" );\n\t\t}\n\t\tthis._off( this.document, \"mousemove\" );\n\n\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\tdelete that.parents[ id ];\n\t\t\t} );\n\t\t}\n\n\t\ttooltipData.closing = true;\n\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\tif ( !tooltipData.hiding ) {\n\t\t\ttooltipData.closing = false;\n\t\t}\n\t},\n\n\t_tooltip: function( element ) {\n\t\tvar tooltip = $( \"<div>\" ).attr( \"role\", \"tooltip\" ),\n\t\t\tcontent = $( \"<div>\" ).appendTo( tooltip ),\n\t\t\tid = tooltip.uniqueId().attr( \"id\" );\n\n\t\tthis._addClass( content, \"ui-tooltip-content\" );\n\t\tthis._addClass( tooltip, \"ui-tooltip\", \"ui-widget ui-widget-content\" );\n\n\t\ttooltip.appendTo( this._appendTo( element ) );\n\n\t\treturn this.tooltips[ id ] = {\n\t\t\telement: element,\n\t\t\ttooltip: tooltip\n\t\t};\n\t},\n\n\t_find: function( target ) {\n\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\treturn id ? this.tooltips[ id ] : null;\n\t},\n\n\t_removeTooltip: function( tooltip ) {\n\t\ttooltip.remove();\n\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t},\n\n\t_appendTo: function( target ) {\n\t\tvar element = target.closest( \".ui-front, dialog\" );\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[ 0 ].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_destroy: function() {\n\t\tvar that = this;\n\n\t\t// Close open tooltips\n\t\t$.each( this.tooltips, function( id, tooltipData ) {\n\n\t\t\t// Delegate to close method to handle common cleanup\n\t\t\tvar event = $.Event( \"blur\" ),\n\t\t\t\telement = tooltipData.element;\n\t\t\tevent.target = event.currentTarget = element[ 0 ];\n\t\t\tthat.close( event, true );\n\n\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t// hide animation\n\t\t\t$( \"#\" + id ).remove();\n\n\t\t\t// Restore the title\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\n\t\t\t\t// If the title attribute has changed since open(), don't restore\n\t\t\t\tif ( !element.attr( \"title\" ) ) {\n\t\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\t}\n\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t}\n\t\t} );\n\t\tthis.liveRegion.remove();\n\t}\n} );\n\n// DEPRECATED\n// TODO: Switch return back to widget declaration at top of file when this is removed\nif ( $.uiBackCompat !== false ) {\n\n\t// Backcompat for tooltipClass option\n\t$.widget( \"ui.tooltip\", $.ui.tooltip, {\n\t\toptions: {\n\t\t\ttooltipClass: null\n\t\t},\n\t\t_tooltip: function() {\n\t\t\tvar tooltipData = this._superApply( arguments );\n\t\t\tif ( this.options.tooltipClass ) {\n\t\t\t\ttooltipData.tooltip.addClass( this.options.tooltipClass );\n\t\t\t}\n\t\t\treturn tooltipData;\n\t\t}\n\t} );\n}\n\nvar widgetsTooltip = $.ui.tooltip;\n\n\n\n\n}));","/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)\n * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)\n * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.\n *\n * Version: 1.3.8\n *\n */\n(function($) {\n\n $.fn.extend({\n slimScroll: function(options) {\n\n var defaults = {\n\n // width in pixels of the visible scroll area\n width : 'auto',\n\n // height in pixels of the visible scroll area\n height : '250px',\n\n // width in pixels of the scrollbar and rail\n size : '7px',\n\n // scrollbar color, accepts any hex/color value\n color: '#000',\n\n // scrollbar position - left/right\n position : 'right',\n\n // distance in pixels between the side edge and the scrollbar\n distance : '1px',\n\n // default scroll position on load - top / bottom / $('selector')\n start : 'top',\n\n // sets scrollbar opacity\n opacity : .4,\n\n // enables always-on mode for the scrollbar\n alwaysVisible : false,\n\n // check if we should hide the scrollbar when user is hovering over\n disableFadeOut : false,\n\n // sets visibility of the rail\n railVisible : false,\n\n // sets rail color\n railColor : '#333',\n\n // sets rail opacity\n railOpacity : .2,\n\n // whether we should use jQuery UI Draggable to enable bar dragging\n railDraggable : true,\n\n // defautlt CSS class of the slimscroll rail\n railClass : 'slimScrollRail',\n\n // defautlt CSS class of the slimscroll bar\n barClass : 'slimScrollBar',\n\n // defautlt CSS class of the slimscroll wrapper\n wrapperClass : 'slimScrollDiv',\n\n // check if mousewheel should scroll the window if we reach top/bottom\n allowPageScroll : false,\n\n // scroll amount applied to each mouse wheel step\n wheelStep : 20,\n\n // scroll amount applied when user is using gestures\n touchScrollStep : 200,\n\n // sets border radius\n borderRadius: '7px',\n\n // sets border radius of the rail\n railBorderRadius : '7px'\n };\n\n var o = $.extend(defaults, options);\n\n // do it for every element that matches selector\n this.each(function(){\n\n var isOverPanel, isOverBar, isDragg, queueHide, touchDif,\n barHeight, percentScroll, lastScroll,\n divS = '<div></div>',\n minBarHeight = 30,\n releaseScroll = false;\n\n // used in event handlers and for better minification\n var me = $(this);\n\n // ensure we are not binding it again\n if (me.parent().hasClass(o.wrapperClass))\n {\n // start from last bar position\n var offset = me.scrollTop();\n\n // find bar and rail\n bar = me.siblings('.' + o.barClass);\n rail = me.siblings('.' + o.railClass);\n\n getBarHeight();\n\n // check if we should scroll existing instance\n if ($.isPlainObject(options))\n {\n // Pass height: auto to an existing slimscroll object to force a resize after contents have changed\n if ( 'height' in options && options.height == 'auto' ) {\n me.parent().css('height', 'auto');\n me.css('height', 'auto');\n var height = me.parent().parent().height();\n me.parent().css('height', height);\n me.css('height', height);\n } else if ('height' in options) {\n var h = options.height;\n me.parent().css('height', h);\n me.css('height', h);\n }\n\n if ('scrollTo' in options)\n {\n // jump to a static point\n offset = parseInt(o.scrollTo);\n }\n else if ('scrollBy' in options)\n {\n // jump by value pixels\n offset += parseInt(o.scrollBy);\n }\n else if ('destroy' in options)\n {\n // remove slimscroll elements\n bar.remove();\n rail.remove();\n me.unwrap();\n return;\n }\n\n // scroll content by the given offset\n scrollContent(offset, false, true);\n }\n\n return;\n }\n else if ($.isPlainObject(options))\n {\n if ('destroy' in options)\n {\n \treturn;\n }\n }\n\n // optionally set height to the parent's height\n o.height = (o.height == 'auto') ? me.parent().height() : o.height;\n\n // wrap content\n var wrapper = $(divS)\n .addClass(o.wrapperClass)\n .css({\n position: 'relative',\n overflow: 'hidden',\n width: o.width,\n height: o.height\n });\n\n // update style for the div\n me.css({\n overflow: 'hidden',\n width: o.width,\n height: o.height\n });\n\n // create scrollbar rail\n var rail = $(divS)\n .addClass(o.railClass)\n .css({\n width: o.size,\n height: '100%',\n position: 'absolute',\n top: 0,\n display: (o.alwaysVisible && o.railVisible) ? 'block' : 'none',\n 'border-radius': o.railBorderRadius,\n background: o.railColor,\n opacity: o.railOpacity,\n zIndex: 90\n });\n\n // create scrollbar\n var bar = $(divS)\n .addClass(o.barClass)\n .css({\n background: o.color,\n width: o.size,\n position: 'absolute',\n top: 0,\n opacity: o.opacity,\n display: o.alwaysVisible ? 'block' : 'none',\n 'border-radius' : o.borderRadius,\n BorderRadius: o.borderRadius,\n MozBorderRadius: o.borderRadius,\n WebkitBorderRadius: o.borderRadius,\n zIndex: 99\n });\n\n // set position\n var posCss = (o.position == 'right') ? { right: o.distance } : { left: o.distance };\n rail.css(posCss);\n bar.css(posCss);\n\n // wrap it\n me.wrap(wrapper);\n\n // append to parent div\n me.parent().append(bar);\n me.parent().append(rail);\n\n // make it draggable and no longer dependent on the jqueryUI\n if (o.railDraggable){\n bar.bind(\"mousedown\", function(e) {\n var $doc = $(document);\n isDragg = true;\n t = parseFloat(bar.css('top'));\n pageY = e.pageY;\n\n $doc.bind(\"mousemove.slimscroll\", function(e){\n currTop = t + e.pageY - pageY;\n bar.css('top', currTop);\n scrollContent(0, bar.position().top, false);// scroll content\n });\n\n $doc.bind(\"mouseup.slimscroll\", function(e) {\n isDragg = false;hideBar();\n $doc.unbind('.slimscroll');\n });\n return false;\n }).bind(\"selectstart.slimscroll\", function(e){\n e.stopPropagation();\n e.preventDefault();\n return false;\n });\n }\n\n // on rail over\n rail.hover(function(){\n showBar();\n }, function(){\n hideBar();\n });\n\n // on bar over\n bar.hover(function(){\n isOverBar = true;\n }, function(){\n isOverBar = false;\n });\n\n // show on parent mouseover\n me.hover(function(){\n isOverPanel = true;\n showBar();\n hideBar();\n }, function(){\n isOverPanel = false;\n hideBar();\n });\n\n // support for mobile\n me.bind('touchstart', function(e,b){\n if (e.originalEvent.touches.length)\n {\n // record where touch started\n touchDif = e.originalEvent.touches[0].pageY;\n }\n });\n\n me.bind('touchmove', function(e){\n // prevent scrolling the page if necessary\n if(!releaseScroll)\n {\n \t\t e.originalEvent.preventDefault();\n\t\t }\n if (e.originalEvent.touches.length)\n {\n // see how far user swiped\n var diff = (touchDif - e.originalEvent.touches[0].pageY) / o.touchScrollStep;\n // scroll content\n scrollContent(diff, true);\n touchDif = e.originalEvent.touches[0].pageY;\n }\n });\n\n // set up initial height\n getBarHeight();\n\n // check start position\n if (o.start === 'bottom')\n {\n // scroll content to bottom\n bar.css({ top: me.outerHeight() - bar.outerHeight() });\n scrollContent(0, true);\n }\n else if (o.start !== 'top')\n {\n // assume jQuery selector\n scrollContent($(o.start).position().top, null, true);\n\n // make sure bar stays hidden\n if (!o.alwaysVisible) { bar.hide(); }\n }\n\n // attach scroll events\n attachWheel(this);\n\n function _onWheel(e)\n {\n // use mouse wheel only when mouse is over\n if (!isOverPanel) { return; }\n\n var e = e || window.event;\n\n var delta = 0;\n if (e.wheelDelta) { delta = -e.wheelDelta/120; }\n if (e.detail) { delta = e.detail / 3; }\n\n var target = e.target || e.srcTarget || e.srcElement;\n if ($(target).closest('.' + o.wrapperClass).is(me.parent())) {\n // scroll content\n scrollContent(delta, true);\n }\n\n // stop window scroll\n if (e.preventDefault && !releaseScroll) { e.preventDefault(); }\n if (!releaseScroll) { e.returnValue = false; }\n }\n\n function scrollContent(y, isWheel, isJump)\n {\n releaseScroll = false;\n var delta = y;\n var maxTop = me.outerHeight() - bar.outerHeight();\n\n if (isWheel)\n {\n // move bar with mouse wheel\n delta = parseInt(bar.css('top')) + y * parseInt(o.wheelStep) / 100 * bar.outerHeight();\n\n // move bar, make sure it doesn't go out\n delta = Math.min(Math.max(delta, 0), maxTop);\n\n // if scrolling down, make sure a fractional change to the\n // scroll position isn't rounded away when the scrollbar's CSS is set\n // this flooring of delta would happened automatically when\n // bar.css is set below, but we floor here for clarity\n delta = (y > 0) ? Math.ceil(delta) : Math.floor(delta);\n\n // scroll the scrollbar\n bar.css({ top: delta + 'px' });\n }\n\n // calculate actual scroll amount\n percentScroll = parseInt(bar.css('top')) / (me.outerHeight() - bar.outerHeight());\n delta = percentScroll * (me[0].scrollHeight - me.outerHeight());\n\n if (isJump)\n {\n delta = y;\n var offsetTop = delta / me[0].scrollHeight * me.outerHeight();\n offsetTop = Math.min(Math.max(offsetTop, 0), maxTop);\n bar.css({ top: offsetTop + 'px' });\n }\n\n // scroll content\n me.scrollTop(delta);\n\n // fire scrolling event\n me.trigger('slimscrolling', ~~delta);\n\n // ensure bar is visible\n showBar();\n\n // trigger hide when scroll is stopped\n hideBar();\n }\n\n function attachWheel(target)\n {\n if (window.addEventListener)\n {\n target.addEventListener('DOMMouseScroll', _onWheel, false );\n target.addEventListener('mousewheel', _onWheel, false );\n }\n else\n {\n document.attachEvent(\"onmousewheel\", _onWheel)\n }\n }\n\n function getBarHeight()\n {\n // calculate scrollbar height and make sure it is not too small\n barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);\n bar.css({ height: barHeight + 'px' });\n\n // hide scrollbar if content is not long enough\n var display = barHeight == me.outerHeight() ? 'none' : 'block';\n bar.css({ display: display });\n }\n\n function showBar()\n {\n // recalculate bar height\n getBarHeight();\n clearTimeout(queueHide);\n\n // when bar reached top or bottom\n if (percentScroll == ~~percentScroll)\n {\n //release wheel\n releaseScroll = o.allowPageScroll;\n\n // publish approporiate event\n if (lastScroll != percentScroll)\n {\n var msg = (~~percentScroll == 0) ? 'top' : 'bottom';\n me.trigger('slimscroll', msg);\n }\n }\n else\n {\n releaseScroll = false;\n }\n lastScroll = percentScroll;\n\n // show only when required\n if(barHeight >= me.outerHeight()) {\n //allow window scroll\n releaseScroll = true;\n return;\n }\n bar.stop(true,true).fadeIn('fast');\n if (o.railVisible) { rail.stop(true,true).fadeIn('fast'); }\n }\n\n function hideBar()\n {\n // only hide when options allow it\n if (!o.alwaysVisible)\n {\n queueHide = setTimeout(function(){\n if (!(o.disableFadeOut && isOverPanel) && !isOverBar && !isDragg)\n {\n bar.fadeOut('slow');\n rail.fadeOut('slow');\n }\n }, 1000);\n }\n }\n\n });\n\n // maintain chainability\n return this;\n }\n });\n\n $.fn.extend({\n slimscroll: $.fn.slimScroll\n });\n\n})(jQuery);\n","// This [jQuery](https://jquery.com/) plugin implements an `<iframe>`\n// [transport](https://api.jquery.com/jQuery.ajax/#extending-ajax) so that\n// `$.ajax()` calls support the uploading of files using standard HTML file\n// input fields. This is done by switching the exchange from `XMLHttpRequest`\n// to a hidden `iframe` element containing a form that is submitted.\n\n// The [source for the plugin](https://github.com/cmlenz/jquery-iframe-transport)\n// is available on [Github](https://github.com/) and licensed under the [MIT\n// license](https://github.com/cmlenz/jquery-iframe-transport/blob/master/LICENSE).\n\n// ## Usage\n\n// To use this plugin, you simply add an `iframe` option with the value `true`\n// to the Ajax settings an `$.ajax()` call, and specify the file fields to\n// include in the submssion using the `files` option, which can be a selector,\n// jQuery object, or a list of DOM elements containing one or more\n// `<input type=\"file\">` elements:\n\n// $(\"#myform\").submit(function() {\n// $.ajax(this.action, {\n// files: $(\":file\", this),\n// iframe: true\n// }).complete(function(data) {\n// console.log(data);\n// });\n// });\n\n// The plugin will construct hidden `<iframe>` and `<form>` elements, add the\n// file field(s) to that form, submit the form, and process the response.\n\n// If you want to include other form fields in the form submission, include\n// them in the `data` option, and set the `processData` option to `false`:\n\n// $(\"#myform\").submit(function() {\n// $.ajax(this.action, {\n// data: $(\":text\", this).serializeArray(),\n// files: $(\":file\", this),\n// iframe: true,\n// processData: false\n// }).complete(function(data) {\n// console.log(data);\n// });\n// });\n\n// ### Response Data Types\n\n// As the transport does not have access to the HTTP headers of the server\n// response, it is not as simple to make use of the automatic content type\n// detection provided by jQuery as with regular XHR. If you can't set the\n// expected response data type (for example because it may vary depending on\n// the outcome of processing by the server), you will need to employ a\n// workaround on the server side: Send back an HTML document containing just a\n// `<textarea>` element with a `data-type` attribute that specifies the MIME\n// type, and put the actual payload in the textarea:\n\n// <textarea data-type=\"application/json\">\n// {\"ok\": true, \"message\": \"Thanks so much\"}\n// </textarea>\n\n// The iframe transport plugin will detect this and pass the value of the\n// `data-type` attribute on to jQuery as if it was the \"Content-Type\" response\n// header, thereby enabling the same kind of conversions that jQuery applies\n// to regular responses. For the example above you should get a Javascript\n// object as the `data` parameter of the `complete` callback, with the\n// properties `ok: true` and `message: \"Thanks so much\"`.\n\n// ### Handling Server Errors\n\n// Another problem with using an `iframe` for file uploads is that it is\n// impossible for the javascript code to determine the HTTP status code of the\n// servers response. Effectively, all of the calls you make will look like they\n// are getting successful responses, and thus invoke the `done()` or\n// `complete()` callbacks. You can only communicate problems using the content\n// of the response payload. For example, consider using a JSON response such as\n// the following to indicate a problem with an uploaded file:\n\n// <textarea data-type=\"application/json\">\n// {\"ok\": false, \"message\": \"Please only upload reasonably sized files.\"}\n// </textarea>\n\n// ### Compatibility\n\n// This plugin has primarily been tested on Safari 5 (or later), Firefox 4 (or\n// later), and Internet Explorer (all the way back to version 6). While I\n// haven't found any issues with it so far, I'm fairly sure it still doesn't\n// work around all the quirks in all different browsers. But the code is still\n// pretty simple overall, so you should be able to fix it and contribute a\n// patch :)\n\n// ## Annotated Source\n\n(function($, undefined) {\n \"use strict\";\n\n // Register a prefilter that checks whether the `iframe` option is set, and\n // switches to the \"iframe\" data type if it is `true`.\n $.ajaxPrefilter(function(options, origOptions, jqXHR) {\n if (options.iframe) {\n options.originalURL = options.url;\n return \"iframe\";\n }\n });\n\n // Register a transport for the \"iframe\" data type. It will only activate\n // when the \"files\" option has been set to a non-empty list of enabled file\n // inputs.\n $.ajaxTransport(\"iframe\", function(options, origOptions, jqXHR) {\n var form = null,\n iframe = null,\n name = \"iframe-\" + $.now(),\n files = $(options.files).filter(\":file:enabled\"),\n markers = null,\n accepts = null;\n\n // This function gets called after a successful submission or an abortion\n // and should revert all changes made to the page to enable the\n // submission via this transport.\n function cleanUp() {\n files.each(function(i, file) {\n var $file = $(file);\n $file.data(\"clone\").replaceWith($file);\n });\n form.remove();\n iframe.one(\"load\", function() { iframe.remove(); });\n iframe.attr(\"src\", \"about:blank\");\n }\n\n // Remove \"iframe\" from the data types list so that further processing is\n // based on the content type returned by the server, without attempting an\n // (unsupported) conversion from \"iframe\" to the actual type.\n options.dataTypes.shift();\n\n // Use the data from the original AJAX options, as it doesn't seem to be \n // copied over since jQuery 1.7.\n // See https://github.com/cmlenz/jquery-iframe-transport/issues/6\n options.data = origOptions.data;\n\n if (files.length) {\n form = $(\"<form enctype='multipart/form-data' method='post'></form>\").\n hide().attr({action: options.originalURL, target: name});\n\n // If there is any additional data specified via the `data` option,\n // we add it as hidden fields to the form. This (currently) requires\n // the `processData` option to be set to false so that the data doesn't\n // get serialized to a string.\n if (typeof(options.data) === \"string\" && options.data.length > 0) {\n $.error(\"data must not be serialized\");\n }\n $.each(options.data || {}, function(name, value) {\n if ($.isPlainObject(value)) {\n name = value.name;\n value = value.value;\n }\n $(\"<input type='hidden' />\").attr({name: name, value: value}).\n appendTo(form);\n });\n\n // Add a hidden `X-Requested-With` field with the value `IFrame` to the\n // field, to help server-side code to determine that the upload happened\n // through this transport.\n $(\"<input type='hidden' value='IFrame' name='X-Requested-With' />\").\n appendTo(form);\n\n // Borrowed straight from the JQuery source.\n // Provides a way of specifying the accepted data type similar to the\n // HTTP \"Accept\" header\n if (options.dataTypes[0] && options.accepts[options.dataTypes[0]]) {\n accepts = options.accepts[options.dataTypes[0]] +\n (options.dataTypes[0] !== \"*\" ? \", */*; q=0.01\" : \"\");\n } else {\n accepts = options.accepts[\"*\"];\n }\n $(\"<input type='hidden' name='X-HTTP-Accept'>\").\n attr(\"value\", accepts).appendTo(form);\n\n // Move the file fields into the hidden form, but first remember their\n // original locations in the document by replacing them with disabled\n // clones. This should also avoid introducing unwanted changes to the\n // page layout during submission.\n markers = files.after(function(idx) {\n var $this = $(this),\n $clone = $this.clone().prop(\"disabled\", true);\n $this.data(\"clone\", $clone);\n return $clone;\n }).next();\n files.appendTo(form);\n\n return {\n\n // The `send` function is called by jQuery when the request should be\n // sent.\n send: function(headers, completeCallback) {\n iframe = $(\"<iframe src='about:blank' name='\" + name +\n \"' id='\" + name + \"' style='display:none'></iframe>\");\n\n // The first load event gets fired after the iframe has been injected\n // into the DOM, and is used to prepare the actual submission.\n iframe.one(\"load\", function() {\n\n // The second load event gets fired when the response to the form\n // submission is received. The implementation detects whether the\n // actual payload is embedded in a `<textarea>` element, and\n // prepares the required conversions to be made in that case.\n iframe.one(\"load\", function() {\n var doc = this.contentWindow ? this.contentWindow.document :\n (this.contentDocument ? this.contentDocument : this.document),\n root = doc.documentElement ? doc.documentElement : doc.body,\n textarea = root.getElementsByTagName(\"textarea\")[0],\n type = textarea && textarea.getAttribute(\"data-type\") || null,\n status = textarea && textarea.getAttribute(\"data-status\") || 200,\n statusText = textarea && textarea.getAttribute(\"data-statusText\") || \"OK\",\n content = {\n html: root.innerHTML,\n text: type ?\n textarea.value :\n root ? (root.textContent || root.innerText) : null\n };\n cleanUp();\n completeCallback(status, statusText, content, type ?\n (\"Content-Type: \" + type) :\n null);\n });\n\n // Now that the load handler has been set up, submit the form.\n form[0].submit();\n });\n\n // After everything has been set up correctly, the form and iframe\n // get injected into the DOM so that the submission can be\n // initiated.\n $(\"body\").append(form, iframe);\n },\n\n // The `abort` function is called by jQuery when the request should be\n // aborted.\n abort: function() {\n if (iframe !== null) {\n iframe.unbind(\"load\").attr(\"src\", \"about:blank\");\n cleanUp();\n }\n }\n\n };\n }\n });\n\n})(jQuery);\n","/*\n * jQuery File Upload Plugin\n * https://github.com/blueimp/jQuery-File-Upload\n *\n * Copyright 2010, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/MIT\n */\n\n/* jshint nomen:false */\n/* global define, require, window, document, location, Blob, FormData */\n\n;(function (factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n // Register as an anonymous AMD module:\n define([\n 'jquery',\n 'jquery-ui/ui/widget'\n ], factory);\n } else if (typeof exports === 'object') {\n // Node/CommonJS:\n factory(\n require('jquery'),\n require('./vendor/jquery.ui.widget')\n );\n } else {\n // Browser globals:\n factory(window.jQuery);\n }\n}(function ($) {\n 'use strict';\n\n // Detect file input support, based on\n // http://viljamis.com/blog/2012/file-upload-support-on-mobile/\n $.support.fileInput = !(new RegExp(\n // Handle devices which give false positives for the feature detection:\n '(Android (1\\\\.[0156]|2\\\\.[01]))' +\n '|(Windows Phone (OS 7|8\\\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' +\n '|(w(eb)?OSBrowser)|(webOS)' +\n '|(Kindle/(1\\\\.0|2\\\\.[05]|3\\\\.0))'\n ).test(window.navigator.userAgent) ||\n // Feature detection for all other devices:\n $('<input type=\"file\">').prop('disabled'));\n\n // The FileReader API is not actually used, but works as feature detection,\n // as some Safari versions (5?) support XHR file uploads via the FormData API,\n // but not non-multipart XHR file uploads.\n // window.XMLHttpRequestUpload is not available on IE10, so we check for\n // window.ProgressEvent instead to detect XHR2 file upload capability:\n $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader);\n $.support.xhrFormDataFileUpload = !!window.FormData;\n\n // Detect support for Blob slicing (required for chunked uploads):\n $.support.blobSlice = window.Blob && (Blob.prototype.slice ||\n Blob.prototype.webkitSlice || Blob.prototype.mozSlice);\n\n // Helper function to create drag handlers for dragover/dragenter/dragleave:\n function getDragHandler(type) {\n var isDragOver = type === 'dragover';\n return function (e) {\n e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;\n var dataTransfer = e.dataTransfer;\n if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 &&\n this._trigger(\n type,\n $.Event(type, {delegatedEvent: e})\n ) !== false) {\n e.preventDefault();\n if (isDragOver) {\n dataTransfer.dropEffect = 'copy';\n }\n }\n };\n }\n\n // The fileupload widget listens for change events on file input fields defined\n // via fileInput setting and paste or drop events of the given dropZone.\n // In addition to the default jQuery Widget methods, the fileupload widget\n // exposes the \"add\" and \"send\" methods, to add or directly send files using\n // the fileupload API.\n // By default, files added via file input selection, paste, drag & drop or\n // \"add\" method are uploaded immediately, but it is possible to override\n // the \"add\" callback option to queue file uploads.\n $.widget('blueimp.fileupload', {\n\n options: {\n // The drop target element(s), by the default the complete document.\n // Set to null to disable drag & drop support:\n dropZone: $(document),\n // The paste target element(s), by the default undefined.\n // Set to a DOM node or jQuery object to enable file pasting:\n pasteZone: undefined,\n // The file input field(s), that are listened to for change events.\n // If undefined, it is set to the file input fields inside\n // of the widget element on plugin initialization.\n // Set to null to disable the change listener.\n fileInput: undefined,\n // By default, the file input field is replaced with a clone after\n // each input field change event. This is required for iframe transport\n // queues and allows change events to be fired for the same file\n // selection, but can be disabled by setting the following option to false:\n replaceFileInput: true,\n // The parameter name for the file form data (the request argument name).\n // If undefined or empty, the name property of the file input field is\n // used, or \"files[]\" if the file input name property is also empty,\n // can be a string or an array of strings:\n paramName: undefined,\n // By default, each file of a selection is uploaded using an individual\n // request for XHR type uploads. Set to false to upload file\n // selections in one request each:\n singleFileUploads: true,\n // To limit the number of files uploaded with one XHR request,\n // set the following option to an integer greater than 0:\n limitMultiFileUploads: undefined,\n // The following option limits the number of files uploaded with one\n // XHR request to keep the request size under or equal to the defined\n // limit in bytes:\n limitMultiFileUploadSize: undefined,\n // Multipart file uploads add a number of bytes to each uploaded file,\n // therefore the following option adds an overhead for each file used\n // in the limitMultiFileUploadSize configuration:\n limitMultiFileUploadSizeOverhead: 512,\n // Set the following option to true to issue all file upload requests\n // in a sequential order:\n sequentialUploads: false,\n // To limit the number of concurrent uploads,\n // set the following option to an integer greater than 0:\n limitConcurrentUploads: undefined,\n // Set the following option to true to force iframe transport uploads:\n forceIframeTransport: false,\n // Set the following option to the location of a redirect url on the\n // origin server, for cross-domain iframe transport uploads:\n redirect: undefined,\n // The parameter name for the redirect url, sent as part of the form\n // data and set to 'redirect' if this option is empty:\n redirectParamName: undefined,\n // Set the following option to the location of a postMessage window,\n // to enable postMessage transport uploads:\n postMessage: undefined,\n // By default, XHR file uploads are sent as multipart/form-data.\n // The iframe transport is always using multipart/form-data.\n // Set to false to enable non-multipart XHR uploads:\n multipart: true,\n // To upload large files in smaller chunks, set the following option\n // to a preferred maximum chunk size. If set to 0, null or undefined,\n // or the browser does not support the required Blob API, files will\n // be uploaded as a whole.\n maxChunkSize: undefined,\n // When a non-multipart upload or a chunked multipart upload has been\n // aborted, this option can be used to resume the upload by setting\n // it to the size of the already uploaded bytes. This option is most\n // useful when modifying the options object inside of the \"add\" or\n // \"send\" callbacks, as the options are cloned for each file upload.\n uploadedBytes: undefined,\n // By default, failed (abort or error) file uploads are removed from the\n // global progress calculation. Set the following option to false to\n // prevent recalculating the global progress data:\n recalculateProgress: true,\n // Interval in milliseconds to calculate and trigger progress events:\n progressInterval: 100,\n // Interval in milliseconds to calculate progress bitrate:\n bitrateInterval: 500,\n // By default, uploads are started automatically when adding files:\n autoUpload: true,\n\n // Error and info messages:\n messages: {\n uploadedBytes: 'Uploaded bytes exceed file size'\n },\n\n // Translation function, gets the message key to be translated\n // and an object with context specific data as arguments:\n i18n: function (message, context) {\n message = this.messages[message] || message.toString();\n if (context) {\n $.each(context, function (key, value) {\n message = message.replace('{' + key + '}', value);\n });\n }\n return message;\n },\n\n // Additional form data to be sent along with the file uploads can be set\n // using this option, which accepts an array of objects with name and\n // value properties, a function returning such an array, a FormData\n // object (for XHR file uploads), or a simple object.\n // The form of the first fileInput is given as parameter to the function:\n formData: function (form) {\n return form.serializeArray();\n },\n\n // The add callback is invoked as soon as files are added to the fileupload\n // widget (via file input selection, drag & drop, paste or add API call).\n // If the singleFileUploads option is enabled, this callback will be\n // called once for each file in the selection for XHR file uploads, else\n // once for each file selection.\n //\n // The upload starts when the submit method is invoked on the data parameter.\n // The data object contains a files property holding the added files\n // and allows you to override plugin options as well as define ajax settings.\n //\n // Listeners for this callback can also be bound the following way:\n // .bind('fileuploadadd', func);\n //\n // data.submit() returns a Promise object and allows to attach additional\n // handlers using jQuery's Deferred callbacks:\n // data.submit().done(func).fail(func).always(func);\n add: function (e, data) {\n if (e.isDefaultPrevented()) {\n return false;\n }\n if (data.autoUpload || (data.autoUpload !== false &&\n $(this).fileupload('option', 'autoUpload'))) {\n data.process().done(function () {\n data.submit();\n });\n }\n },\n\n // Other callbacks:\n\n // Callback for the submit event of each file upload:\n // submit: function (e, data) {}, // .bind('fileuploadsubmit', func);\n\n // Callback for the start of each file upload request:\n // send: function (e, data) {}, // .bind('fileuploadsend', func);\n\n // Callback for successful uploads:\n // done: function (e, data) {}, // .bind('fileuploaddone', func);\n\n // Callback for failed (abort or error) uploads:\n // fail: function (e, data) {}, // .bind('fileuploadfail', func);\n\n // Callback for completed (success, abort or error) requests:\n // always: function (e, data) {}, // .bind('fileuploadalways', func);\n\n // Callback for upload progress events:\n // progress: function (e, data) {}, // .bind('fileuploadprogress', func);\n\n // Callback for global upload progress events:\n // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);\n\n // Callback for uploads start, equivalent to the global ajaxStart event:\n // start: function (e) {}, // .bind('fileuploadstart', func);\n\n // Callback for uploads stop, equivalent to the global ajaxStop event:\n // stop: function (e) {}, // .bind('fileuploadstop', func);\n\n // Callback for change events of the fileInput(s):\n // change: function (e, data) {}, // .bind('fileuploadchange', func);\n\n // Callback for paste events to the pasteZone(s):\n // paste: function (e, data) {}, // .bind('fileuploadpaste', func);\n\n // Callback for drop events of the dropZone(s):\n // drop: function (e, data) {}, // .bind('fileuploaddrop', func);\n\n // Callback for dragover events of the dropZone(s):\n // dragover: function (e) {}, // .bind('fileuploaddragover', func);\n\n // Callback for the start of each chunk upload request:\n // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func);\n\n // Callback for successful chunk uploads:\n // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func);\n\n // Callback for failed (abort or error) chunk uploads:\n // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func);\n\n // Callback for completed (success, abort or error) chunk upload requests:\n // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func);\n\n // The plugin options are used as settings object for the ajax calls.\n // The following are jQuery ajax settings required for the file uploads:\n processData: false,\n contentType: false,\n cache: false,\n timeout: 0\n },\n\n // A list of options that require reinitializing event listeners and/or\n // special initialization code:\n _specialOptions: [\n 'fileInput',\n 'dropZone',\n 'pasteZone',\n 'multipart',\n 'forceIframeTransport'\n ],\n\n _blobSlice: $.support.blobSlice && function () {\n var slice = this.slice || this.webkitSlice || this.mozSlice;\n return slice.apply(this, arguments);\n },\n\n _BitrateTimer: function () {\n this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime());\n this.loaded = 0;\n this.bitrate = 0;\n this.getBitrate = function (now, loaded, interval) {\n var timeDiff = now - this.timestamp;\n if (!this.bitrate || !interval || timeDiff > interval) {\n this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8;\n this.loaded = loaded;\n this.timestamp = now;\n }\n return this.bitrate;\n };\n },\n\n _isXHRUpload: function (options) {\n return !options.forceIframeTransport &&\n ((!options.multipart && $.support.xhrFileUpload) ||\n $.support.xhrFormDataFileUpload);\n },\n\n _getFormData: function (options) {\n var formData;\n if ($.type(options.formData) === 'function') {\n return options.formData(options.form);\n }\n if ($.isArray(options.formData)) {\n return options.formData;\n }\n if ($.type(options.formData) === 'object') {\n formData = [];\n $.each(options.formData, function (name, value) {\n formData.push({name: name, value: value});\n });\n return formData;\n }\n return [];\n },\n\n _getTotal: function (files) {\n var total = 0;\n $.each(files, function (index, file) {\n total += file.size || 1;\n });\n return total;\n },\n\n _initProgressObject: function (obj) {\n var progress = {\n loaded: 0,\n total: 0,\n bitrate: 0\n };\n if (obj._progress) {\n $.extend(obj._progress, progress);\n } else {\n obj._progress = progress;\n }\n },\n\n _initResponseObject: function (obj) {\n var prop;\n if (obj._response) {\n for (prop in obj._response) {\n if (obj._response.hasOwnProperty(prop)) {\n delete obj._response[prop];\n }\n }\n } else {\n obj._response = {};\n }\n },\n\n _onProgress: function (e, data) {\n if (e.lengthComputable) {\n var now = ((Date.now) ? Date.now() : (new Date()).getTime()),\n loaded;\n if (data._time && data.progressInterval &&\n (now - data._time < data.progressInterval) &&\n e.loaded !== e.total) {\n return;\n }\n data._time = now;\n loaded = Math.floor(\n e.loaded / e.total * (data.chunkSize || data._progress.total)\n ) + (data.uploadedBytes || 0);\n // Add the difference from the previously loaded state\n // to the global loaded counter:\n this._progress.loaded += (loaded - data._progress.loaded);\n this._progress.bitrate = this._bitrateTimer.getBitrate(\n now,\n this._progress.loaded,\n data.bitrateInterval\n );\n data._progress.loaded = data.loaded = loaded;\n data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate(\n now,\n loaded,\n data.bitrateInterval\n );\n // Trigger a custom progress event with a total data property set\n // to the file size(s) of the current upload and a loaded data\n // property calculated accordingly:\n this._trigger(\n 'progress',\n $.Event('progress', {delegatedEvent: e}),\n data\n );\n // Trigger a global progress event for all current file uploads,\n // including ajax calls queued for sequential file uploads:\n this._trigger(\n 'progressall',\n $.Event('progressall', {delegatedEvent: e}),\n this._progress\n );\n }\n },\n\n _initProgressListener: function (options) {\n var that = this,\n xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();\n // Accesss to the native XHR object is required to add event listeners\n // for the upload progress event:\n if (xhr.upload) {\n $(xhr.upload).bind('progress', function (e) {\n var oe = e.originalEvent;\n // Make sure the progress event properties get copied over:\n e.lengthComputable = oe.lengthComputable;\n e.loaded = oe.loaded;\n e.total = oe.total;\n that._onProgress(e, options);\n });\n options.xhr = function () {\n return xhr;\n };\n }\n },\n\n _isInstanceOf: function (type, obj) {\n // Cross-frame instanceof check\n return Object.prototype.toString.call(obj) === '[object ' + type + ']';\n },\n\n _initXHRData: function (options) {\n var that = this,\n formData,\n file = options.files[0],\n // Ignore non-multipart setting if not supported:\n multipart = options.multipart || !$.support.xhrFileUpload,\n paramName = $.type(options.paramName) === 'array' ?\n options.paramName[0] : options.paramName;\n options.headers = $.extend({}, options.headers);\n if (options.contentRange) {\n options.headers['Content-Range'] = options.contentRange;\n }\n if (!multipart || options.blob || !this._isInstanceOf('File', file)) {\n options.headers['Content-Disposition'] = 'attachment; filename=\"' +\n encodeURI(file.name) + '\"';\n }\n if (!multipart) {\n options.contentType = file.type || 'application/octet-stream';\n options.data = options.blob || file;\n } else if ($.support.xhrFormDataFileUpload) {\n if (options.postMessage) {\n // window.postMessage does not allow sending FormData\n // objects, so we just add the File/Blob objects to\n // the formData array and let the postMessage window\n // create the FormData object out of this array:\n formData = this._getFormData(options);\n if (options.blob) {\n formData.push({\n name: paramName,\n value: options.blob\n });\n } else {\n $.each(options.files, function (index, file) {\n formData.push({\n name: ($.type(options.paramName) === 'array' &&\n options.paramName[index]) || paramName,\n value: file\n });\n });\n }\n } else {\n if (that._isInstanceOf('FormData', options.formData)) {\n formData = options.formData;\n } else {\n formData = new FormData();\n $.each(this._getFormData(options), function (index, field) {\n formData.append(field.name, field.value);\n });\n }\n if (options.blob) {\n formData.append(paramName, options.blob, file.name);\n } else {\n $.each(options.files, function (index, file) {\n // This check allows the tests to run with\n // dummy objects:\n if (that._isInstanceOf('File', file) ||\n that._isInstanceOf('Blob', file)) {\n formData.append(\n ($.type(options.paramName) === 'array' &&\n options.paramName[index]) || paramName,\n file,\n file.uploadName || file.name\n );\n }\n });\n }\n }\n options.data = formData;\n }\n // Blob reference is not needed anymore, free memory:\n options.blob = null;\n },\n\n _initIframeSettings: function (options) {\n var targetHost = $('<a></a>').prop('href', options.url).prop('host');\n // Setting the dataType to iframe enables the iframe transport:\n options.dataType = 'iframe ' + (options.dataType || '');\n // The iframe transport accepts a serialized array as form data:\n options.formData = this._getFormData(options);\n // Add redirect url to form data on cross-domain uploads:\n if (options.redirect && targetHost && targetHost !== location.host) {\n options.formData.push({\n name: options.redirectParamName || 'redirect',\n value: options.redirect\n });\n }\n },\n\n _initDataSettings: function (options) {\n if (this._isXHRUpload(options)) {\n if (!this._chunkedUpload(options, true)) {\n if (!options.data) {\n this._initXHRData(options);\n }\n this._initProgressListener(options);\n }\n if (options.postMessage) {\n // Setting the dataType to postmessage enables the\n // postMessage transport:\n options.dataType = 'postmessage ' + (options.dataType || '');\n }\n } else {\n this._initIframeSettings(options);\n }\n },\n\n _getParamName: function (options) {\n var fileInput = $(options.fileInput),\n paramName = options.paramName;\n if (!paramName) {\n paramName = [];\n fileInput.each(function () {\n var input = $(this),\n name = input.prop('name') || 'files[]',\n i = (input.prop('files') || [1]).length;\n while (i) {\n paramName.push(name);\n i -= 1;\n }\n });\n if (!paramName.length) {\n paramName = [fileInput.prop('name') || 'files[]'];\n }\n } else if (!$.isArray(paramName)) {\n paramName = [paramName];\n }\n return paramName;\n },\n\n _initFormSettings: function (options) {\n // Retrieve missing options from the input field and the\n // associated form, if available:\n if (!options.form || !options.form.length) {\n options.form = $(options.fileInput.prop('form'));\n // If the given file input doesn't have an associated form,\n // use the default widget file input's form:\n if (!options.form.length) {\n options.form = $(this.options.fileInput.prop('form'));\n }\n }\n options.paramName = this._getParamName(options);\n if (!options.url) {\n options.url = options.form.prop('action') || location.href;\n }\n // The HTTP request method must be \"POST\" or \"PUT\":\n options.type = (options.type ||\n ($.type(options.form.prop('method')) === 'string' &&\n options.form.prop('method')) || ''\n ).toUpperCase();\n if (options.type !== 'POST' && options.type !== 'PUT' &&\n options.type !== 'PATCH') {\n options.type = 'POST';\n }\n if (!options.formAcceptCharset) {\n options.formAcceptCharset = options.form.attr('accept-charset');\n }\n },\n\n _getAJAXSettings: function (data) {\n var options = $.extend({}, this.options, data);\n this._initFormSettings(options);\n this._initDataSettings(options);\n return options;\n },\n\n // jQuery 1.6 doesn't provide .state(),\n // while jQuery 1.8+ removed .isRejected() and .isResolved():\n _getDeferredState: function (deferred) {\n if (deferred.state) {\n return deferred.state();\n }\n if (deferred.isResolved()) {\n return 'resolved';\n }\n if (deferred.isRejected()) {\n return 'rejected';\n }\n return 'pending';\n },\n\n // Maps jqXHR callbacks to the equivalent\n // methods of the given Promise object:\n _enhancePromise: function (promise) {\n promise.success = promise.done;\n promise.error = promise.fail;\n promise.complete = promise.always;\n return promise;\n },\n\n // Creates and returns a Promise object enhanced with\n // the jqXHR methods abort, success, error and complete:\n _getXHRPromise: function (resolveOrReject, context, args) {\n var dfd = $.Deferred(),\n promise = dfd.promise();\n context = context || this.options.context || promise;\n if (resolveOrReject === true) {\n dfd.resolveWith(context, args);\n } else if (resolveOrReject === false) {\n dfd.rejectWith(context, args);\n }\n promise.abort = dfd.promise;\n return this._enhancePromise(promise);\n },\n\n // Adds convenience methods to the data callback argument:\n _addConvenienceMethods: function (e, data) {\n var that = this,\n getPromise = function (args) {\n return $.Deferred().resolveWith(that, args).promise();\n };\n data.process = function (resolveFunc, rejectFunc) {\n if (resolveFunc || rejectFunc) {\n data._processQueue = this._processQueue =\n (this._processQueue || getPromise([this])).then(\n function () {\n if (data.errorThrown) {\n return $.Deferred()\n .rejectWith(that, [data]).promise();\n }\n return getPromise(arguments);\n }\n ).then(resolveFunc, rejectFunc);\n }\n return this._processQueue || getPromise([this]);\n };\n data.submit = function () {\n if (this.state() !== 'pending') {\n data.jqXHR = this.jqXHR =\n (that._trigger(\n 'submit',\n $.Event('submit', {delegatedEvent: e}),\n this\n ) !== false) && that._onSend(e, this);\n }\n return this.jqXHR || that._getXHRPromise();\n };\n data.abort = function () {\n if (this.jqXHR) {\n return this.jqXHR.abort();\n }\n this.errorThrown = 'abort';\n that._trigger('fail', null, this);\n return that._getXHRPromise(false);\n };\n data.state = function () {\n if (this.jqXHR) {\n return that._getDeferredState(this.jqXHR);\n }\n if (this._processQueue) {\n return that._getDeferredState(this._processQueue);\n }\n };\n data.processing = function () {\n return !this.jqXHR && this._processQueue && that\n ._getDeferredState(this._processQueue) === 'pending';\n };\n data.progress = function () {\n return this._progress;\n };\n data.response = function () {\n return this._response;\n };\n },\n\n // Parses the Range header from the server response\n // and returns the uploaded bytes:\n _getUploadedBytes: function (jqXHR) {\n var range = jqXHR.getResponseHeader('Range'),\n parts = range && range.split('-'),\n upperBytesPos = parts && parts.length > 1 &&\n parseInt(parts[1], 10);\n return upperBytesPos && upperBytesPos + 1;\n },\n\n // Uploads a file in multiple, sequential requests\n // by splitting the file up in multiple blob chunks.\n // If the second parameter is true, only tests if the file\n // should be uploaded in chunks, but does not invoke any\n // upload requests:\n _chunkedUpload: function (options, testOnly) {\n options.uploadedBytes = options.uploadedBytes || 0;\n var that = this,\n file = options.files[0],\n fs = file.size,\n ub = options.uploadedBytes,\n mcs = options.maxChunkSize || fs,\n slice = this._blobSlice,\n dfd = $.Deferred(),\n promise = dfd.promise(),\n jqXHR,\n upload;\n if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||\n options.data) {\n return false;\n }\n if (testOnly) {\n return true;\n }\n if (ub >= fs) {\n file.error = options.i18n('uploadedBytes');\n return this._getXHRPromise(\n false,\n options.context,\n [null, 'error', file.error]\n );\n }\n // The chunk upload method:\n upload = function () {\n // Clone the options object for each chunk upload:\n var o = $.extend({}, options),\n currentLoaded = o._progress.loaded;\n o.blob = slice.call(\n file,\n ub,\n ub + mcs,\n file.type\n );\n // Store the current chunk size, as the blob itself\n // will be dereferenced after data processing:\n o.chunkSize = o.blob.size;\n // Expose the chunk bytes position range:\n o.contentRange = 'bytes ' + ub + '-' +\n (ub + o.chunkSize - 1) + '/' + fs;\n // Process the upload data (the blob and potential form data):\n that._initXHRData(o);\n // Add progress listeners for this chunk upload:\n that._initProgressListener(o);\n jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) ||\n that._getXHRPromise(false, o.context))\n .done(function (result, textStatus, jqXHR) {\n ub = that._getUploadedBytes(jqXHR) ||\n (ub + o.chunkSize);\n // Create a progress event if no final progress event\n // with loaded equaling total has been triggered\n // for this chunk:\n if (currentLoaded + o.chunkSize - o._progress.loaded) {\n that._onProgress($.Event('progress', {\n lengthComputable: true,\n loaded: ub - o.uploadedBytes,\n total: ub - o.uploadedBytes\n }), o);\n }\n options.uploadedBytes = o.uploadedBytes = ub;\n o.result = result;\n o.textStatus = textStatus;\n o.jqXHR = jqXHR;\n that._trigger('chunkdone', null, o);\n that._trigger('chunkalways', null, o);\n if (ub < fs) {\n // File upload not yet complete,\n // continue with the next chunk:\n upload();\n } else {\n dfd.resolveWith(\n o.context,\n [result, textStatus, jqXHR]\n );\n }\n })\n .fail(function (jqXHR, textStatus, errorThrown) {\n o.jqXHR = jqXHR;\n o.textStatus = textStatus;\n o.errorThrown = errorThrown;\n that._trigger('chunkfail', null, o);\n that._trigger('chunkalways', null, o);\n dfd.rejectWith(\n o.context,\n [jqXHR, textStatus, errorThrown]\n );\n });\n };\n this._enhancePromise(promise);\n promise.abort = function () {\n return jqXHR.abort();\n };\n upload();\n return promise;\n },\n\n _beforeSend: function (e, data) {\n if (this._active === 0) {\n // the start callback is triggered when an upload starts\n // and no other uploads are currently running,\n // equivalent to the global ajaxStart event:\n this._trigger('start');\n // Set timer for global bitrate progress calculation:\n this._bitrateTimer = new this._BitrateTimer();\n // Reset the global progress values:\n this._progress.loaded = this._progress.total = 0;\n this._progress.bitrate = 0;\n }\n // Make sure the container objects for the .response() and\n // .progress() methods on the data object are available\n // and reset to their initial state:\n this._initResponseObject(data);\n this._initProgressObject(data);\n data._progress.loaded = data.loaded = data.uploadedBytes || 0;\n data._progress.total = data.total = this._getTotal(data.files) || 1;\n data._progress.bitrate = data.bitrate = 0;\n this._active += 1;\n // Initialize the global progress values:\n this._progress.loaded += data.loaded;\n this._progress.total += data.total;\n },\n\n _onDone: function (result, textStatus, jqXHR, options) {\n var total = options._progress.total,\n response = options._response;\n if (options._progress.loaded < total) {\n // Create a progress event if no final progress event\n // with loaded equaling total has been triggered:\n this._onProgress($.Event('progress', {\n lengthComputable: true,\n loaded: total,\n total: total\n }), options);\n }\n response.result = options.result = result;\n response.textStatus = options.textStatus = textStatus;\n response.jqXHR = options.jqXHR = jqXHR;\n this._trigger('done', null, options);\n },\n\n _onFail: function (jqXHR, textStatus, errorThrown, options) {\n var response = options._response;\n if (options.recalculateProgress) {\n // Remove the failed (error or abort) file upload from\n // the global progress calculation:\n this._progress.loaded -= options._progress.loaded;\n this._progress.total -= options._progress.total;\n }\n response.jqXHR = options.jqXHR = jqXHR;\n response.textStatus = options.textStatus = textStatus;\n response.errorThrown = options.errorThrown = errorThrown;\n this._trigger('fail', null, options);\n },\n\n _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) {\n // jqXHRorResult, textStatus and jqXHRorError are added to the\n // options object via done and fail callbacks\n this._trigger('always', null, options);\n },\n\n _onSend: function (e, data) {\n if (!data.submit) {\n this._addConvenienceMethods(e, data);\n }\n var that = this,\n jqXHR,\n aborted,\n slot,\n pipe,\n options = that._getAJAXSettings(data),\n send = function () {\n that._sending += 1;\n // Set timer for bitrate progress calculation:\n options._bitrateTimer = new that._BitrateTimer();\n jqXHR = jqXHR || (\n ((aborted || that._trigger(\n 'send',\n $.Event('send', {delegatedEvent: e}),\n options\n ) === false) &&\n that._getXHRPromise(false, options.context, aborted)) ||\n that._chunkedUpload(options) || $.ajax(options)\n ).done(function (result, textStatus, jqXHR) {\n that._onDone(result, textStatus, jqXHR, options);\n }).fail(function (jqXHR, textStatus, errorThrown) {\n that._onFail(jqXHR, textStatus, errorThrown, options);\n }).always(function (jqXHRorResult, textStatus, jqXHRorError) {\n that._onAlways(\n jqXHRorResult,\n textStatus,\n jqXHRorError,\n options\n );\n that._sending -= 1;\n that._active -= 1;\n if (options.limitConcurrentUploads &&\n options.limitConcurrentUploads > that._sending) {\n // Start the next queued upload,\n // that has not been aborted:\n var nextSlot = that._slots.shift();\n while (nextSlot) {\n if (that._getDeferredState(nextSlot) === 'pending') {\n nextSlot.resolve();\n break;\n }\n nextSlot = that._slots.shift();\n }\n }\n if (that._active === 0) {\n // The stop callback is triggered when all uploads have\n // been completed, equivalent to the global ajaxStop event:\n that._trigger('stop');\n }\n });\n return jqXHR;\n };\n this._beforeSend(e, options);\n if (this.options.sequentialUploads ||\n (this.options.limitConcurrentUploads &&\n this.options.limitConcurrentUploads <= this._sending)) {\n if (this.options.limitConcurrentUploads > 1) {\n slot = $.Deferred();\n this._slots.push(slot);\n pipe = slot.then(send);\n } else {\n this._sequence = this._sequence.then(send, send);\n pipe = this._sequence;\n }\n // Return the piped Promise object, enhanced with an abort method,\n // which is delegated to the jqXHR object of the current upload,\n // and jqXHR callbacks mapped to the equivalent Promise methods:\n pipe.abort = function () {\n aborted = [undefined, 'abort', 'abort'];\n if (!jqXHR) {\n if (slot) {\n slot.rejectWith(options.context, aborted);\n }\n return send();\n }\n return jqXHR.abort();\n };\n return this._enhancePromise(pipe);\n }\n return send();\n },\n\n _onAdd: function (e, data) {\n var that = this,\n result = true,\n options = $.extend({}, this.options, data),\n files = data.files,\n filesLength = files.length,\n limit = options.limitMultiFileUploads,\n limitSize = options.limitMultiFileUploadSize,\n overhead = options.limitMultiFileUploadSizeOverhead,\n batchSize = 0,\n paramName = this._getParamName(options),\n paramNameSet,\n paramNameSlice,\n fileSet,\n i,\n j = 0;\n if (!filesLength) {\n return false;\n }\n if (limitSize && files[0].size === undefined) {\n limitSize = undefined;\n }\n if (!(options.singleFileUploads || limit || limitSize) ||\n !this._isXHRUpload(options)) {\n fileSet = [files];\n paramNameSet = [paramName];\n } else if (!(options.singleFileUploads || limitSize) && limit) {\n fileSet = [];\n paramNameSet = [];\n for (i = 0; i < filesLength; i += limit) {\n fileSet.push(files.slice(i, i + limit));\n paramNameSlice = paramName.slice(i, i + limit);\n if (!paramNameSlice.length) {\n paramNameSlice = paramName;\n }\n paramNameSet.push(paramNameSlice);\n }\n } else if (!options.singleFileUploads && limitSize) {\n fileSet = [];\n paramNameSet = [];\n for (i = 0; i < filesLength; i = i + 1) {\n batchSize += files[i].size + overhead;\n if (i + 1 === filesLength ||\n ((batchSize + files[i + 1].size + overhead) > limitSize) ||\n (limit && i + 1 - j >= limit)) {\n fileSet.push(files.slice(j, i + 1));\n paramNameSlice = paramName.slice(j, i + 1);\n if (!paramNameSlice.length) {\n paramNameSlice = paramName;\n }\n paramNameSet.push(paramNameSlice);\n j = i + 1;\n batchSize = 0;\n }\n }\n } else {\n paramNameSet = paramName;\n }\n data.originalFiles = files;\n $.each(fileSet || files, function (index, element) {\n var newData = $.extend({}, data);\n newData.files = fileSet ? element : [element];\n newData.paramName = paramNameSet[index];\n that._initResponseObject(newData);\n that._initProgressObject(newData);\n that._addConvenienceMethods(e, newData);\n result = that._trigger(\n 'add',\n $.Event('add', {delegatedEvent: e}),\n newData\n );\n return result;\n });\n return result;\n },\n\n _replaceFileInput: function (data) {\n var input = data.fileInput,\n inputClone = input.clone(true),\n restoreFocus = input.is(document.activeElement);\n // Add a reference for the new cloned file input to the data argument:\n data.fileInputClone = inputClone;\n $('<form></form>').append(inputClone)[0].reset();\n // Detaching allows to insert the fileInput on another form\n // without loosing the file input value:\n input.after(inputClone).detach();\n // If the fileInput had focus before it was detached,\n // restore focus to the inputClone.\n if (restoreFocus) {\n inputClone.focus();\n }\n // Avoid memory leaks with the detached file input:\n $.cleanData(input.unbind('remove'));\n // Replace the original file input element in the fileInput\n // elements set with the clone, which has been copied including\n // event handlers:\n this.options.fileInput = this.options.fileInput.map(function (i, el) {\n if (el === input[0]) {\n return inputClone[0];\n }\n return el;\n });\n // If the widget has been initialized on the file input itself,\n // override this.element with the file input clone:\n if (input[0] === this.element[0]) {\n this.element = inputClone;\n }\n },\n\n _handleFileTreeEntry: function (entry, path) {\n var that = this,\n dfd = $.Deferred(),\n entries = [],\n dirReader,\n errorHandler = function (e) {\n if (e && !e.entry) {\n e.entry = entry;\n }\n // Since $.when returns immediately if one\n // Deferred is rejected, we use resolve instead.\n // This allows valid files and invalid items\n // to be returned together in one set:\n dfd.resolve([e]);\n },\n successHandler = function (entries) {\n that._handleFileTreeEntries(\n entries,\n path + entry.name + '/'\n ).done(function (files) {\n dfd.resolve(files);\n }).fail(errorHandler);\n },\n readEntries = function () {\n dirReader.readEntries(function (results) {\n if (!results.length) {\n successHandler(entries);\n } else {\n entries = entries.concat(results);\n readEntries();\n }\n }, errorHandler);\n };\n path = path || '';\n if (entry.isFile) {\n if (entry._file) {\n // Workaround for Chrome bug #149735\n entry._file.relativePath = path;\n dfd.resolve(entry._file);\n } else {\n entry.file(function (file) {\n file.relativePath = path;\n dfd.resolve(file);\n }, errorHandler);\n }\n } else if (entry.isDirectory) {\n dirReader = entry.createReader();\n readEntries();\n } else {\n // Return an empy list for file system items\n // other than files or directories:\n dfd.resolve([]);\n }\n return dfd.promise();\n },\n\n _handleFileTreeEntries: function (entries, path) {\n var that = this;\n return $.when.apply(\n $,\n $.map(entries, function (entry) {\n return that._handleFileTreeEntry(entry, path);\n })\n ).then(function () {\n return Array.prototype.concat.apply(\n [],\n arguments\n );\n });\n },\n\n _getDroppedFiles: function (dataTransfer) {\n dataTransfer = dataTransfer || {};\n var items = dataTransfer.items;\n if (items && items.length && (items[0].webkitGetAsEntry ||\n items[0].getAsEntry)) {\n return this._handleFileTreeEntries(\n $.map(items, function (item) {\n var entry;\n if (item.webkitGetAsEntry) {\n entry = item.webkitGetAsEntry();\n if (entry) {\n // Workaround for Chrome bug #149735:\n entry._file = item.getAsFile();\n }\n return entry;\n }\n return item.getAsEntry();\n })\n );\n }\n return $.Deferred().resolve(\n $.makeArray(dataTransfer.files)\n ).promise();\n },\n\n _getSingleFileInputFiles: function (fileInput) {\n fileInput = $(fileInput);\n var entries = fileInput.prop('webkitEntries') ||\n fileInput.prop('entries'),\n files,\n value;\n if (entries && entries.length) {\n return this._handleFileTreeEntries(entries);\n }\n files = $.makeArray(fileInput.prop('files'));\n if (!files.length) {\n value = fileInput.prop('value');\n if (!value) {\n return $.Deferred().resolve([]).promise();\n }\n // If the files property is not available, the browser does not\n // support the File API and we add a pseudo File object with\n // the input value as name with path information removed:\n files = [{name: value.replace(/^.*\\\\/, '')}];\n } else if (files[0].name === undefined && files[0].fileName) {\n // File normalization for Safari 4 and Firefox 3:\n $.each(files, function (index, file) {\n file.name = file.fileName;\n file.size = file.fileSize;\n });\n }\n return $.Deferred().resolve(files).promise();\n },\n\n _getFileInputFiles: function (fileInput) {\n if (!(fileInput instanceof $) || fileInput.length === 1) {\n return this._getSingleFileInputFiles(fileInput);\n }\n return $.when.apply(\n $,\n $.map(fileInput, this._getSingleFileInputFiles)\n ).then(function () {\n return Array.prototype.concat.apply(\n [],\n arguments\n );\n });\n },\n\n _onChange: function (e) {\n var that = this,\n data = {\n fileInput: $(e.target),\n form: $(e.target.form)\n };\n this._getFileInputFiles(data.fileInput).always(function (files) {\n data.files = files;\n if (that.options.replaceFileInput) {\n that._replaceFileInput(data);\n }\n if (that._trigger(\n 'change',\n $.Event('change', {delegatedEvent: e}),\n data\n ) !== false) {\n that._onAdd(e, data);\n }\n });\n },\n\n _onPaste: function (e) {\n var items = e.originalEvent && e.originalEvent.clipboardData &&\n e.originalEvent.clipboardData.items,\n data = {files: []};\n if (items && items.length) {\n $.each(items, function (index, item) {\n var file = item.getAsFile && item.getAsFile();\n if (file) {\n data.files.push(file);\n }\n });\n if (this._trigger(\n 'paste',\n $.Event('paste', {delegatedEvent: e}),\n data\n ) !== false) {\n this._onAdd(e, data);\n }\n }\n },\n\n _onDrop: function (e) {\n e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer;\n var that = this,\n dataTransfer = e.dataTransfer,\n data = {};\n if (dataTransfer && dataTransfer.files && dataTransfer.files.length) {\n e.preventDefault();\n this._getDroppedFiles(dataTransfer).always(function (files) {\n data.files = files;\n if (that._trigger(\n 'drop',\n $.Event('drop', {delegatedEvent: e}),\n data\n ) !== false) {\n that._onAdd(e, data);\n }\n });\n }\n },\n\n _onDragOver: getDragHandler('dragover'),\n\n _onDragEnter: getDragHandler('dragenter'),\n\n _onDragLeave: getDragHandler('dragleave'),\n\n _initEventHandlers: function () {\n if (this._isXHRUpload(this.options)) {\n this._on(this.options.dropZone, {\n dragover: this._onDragOver,\n drop: this._onDrop,\n // event.preventDefault() on dragenter is required for IE10+:\n dragenter: this._onDragEnter,\n // dragleave is not required, but added for completeness:\n dragleave: this._onDragLeave\n });\n this._on(this.options.pasteZone, {\n paste: this._onPaste\n });\n }\n if ($.support.fileInput) {\n this._on(this.options.fileInput, {\n change: this._onChange\n });\n }\n },\n\n _destroyEventHandlers: function () {\n this._off(this.options.dropZone, 'dragenter dragleave dragover drop');\n this._off(this.options.pasteZone, 'paste');\n this._off(this.options.fileInput, 'change');\n },\n\n _destroy: function () {\n this._destroyEventHandlers();\n },\n\n _setOption: function (key, value) {\n var reinit = $.inArray(key, this._specialOptions) !== -1;\n if (reinit) {\n this._destroyEventHandlers();\n }\n this._super(key, value);\n if (reinit) {\n this._initSpecialOptions();\n this._initEventHandlers();\n }\n },\n\n _initSpecialOptions: function () {\n var options = this.options;\n if (options.fileInput === undefined) {\n options.fileInput = this.element.is('input[type=\"file\"]') ?\n this.element : this.element.find('input[type=\"file\"]');\n } else if (!(options.fileInput instanceof $)) {\n options.fileInput = $(options.fileInput);\n }\n if (!(options.dropZone instanceof $)) {\n options.dropZone = $(options.dropZone);\n }\n if (!(options.pasteZone instanceof $)) {\n options.pasteZone = $(options.pasteZone);\n }\n },\n\n _getRegExp: function (str) {\n var parts = str.split('/'),\n modifiers = parts.pop();\n parts.shift();\n return new RegExp(parts.join('/'), modifiers);\n },\n\n _isRegExpOption: function (key, value) {\n return key !== 'url' && $.type(value) === 'string' &&\n /^\\/.*\\/[igm]{0,3}$/.test(value);\n },\n\n _initDataAttributes: function () {\n var that = this,\n options = this.options,\n data = this.element.data();\n // Initialize options set via HTML5 data-attributes:\n $.each(\n this.element[0].attributes,\n function (index, attr) {\n var key = attr.name.toLowerCase(),\n value;\n if (/^data-/.test(key)) {\n // Convert hyphen-ated key to camelCase:\n key = key.slice(5).replace(/-[a-z]/g, function (str) {\n return str.charAt(1).toUpperCase();\n });\n value = data[key];\n if (that._isRegExpOption(key, value)) {\n value = that._getRegExp(value);\n }\n options[key] = value;\n }\n }\n );\n },\n\n _create: function () {\n this._initDataAttributes();\n this._initSpecialOptions();\n this._slots = [];\n this._sequence = this._getXHRPromise(true);\n this._sending = this._active = 0;\n this._initProgressObject(this);\n this._initEventHandlers();\n },\n\n // This method is exposed to the widget API and allows to query\n // the number of active uploads:\n active: function () {\n return this._active;\n },\n\n // This method is exposed to the widget API and allows to query\n // the widget upload progress.\n // It returns an object with loaded, total and bitrate properties\n // for the running uploads:\n progress: function () {\n return this._progress;\n },\n\n // This method is exposed to the widget API and allows adding files\n // using the fileupload API. The data parameter accepts an object which\n // must have a files property and can contain additional options:\n // .fileupload('add', {files: filesList});\n add: function (data) {\n var that = this;\n if (!data || this.options.disabled) {\n return;\n }\n if (data.fileInput && !data.files) {\n this._getFileInputFiles(data.fileInput).always(function (files) {\n data.files = files;\n that._onAdd(null, data);\n });\n } else {\n data.files = $.makeArray(data.files);\n this._onAdd(null, data);\n }\n },\n\n // This method is exposed to the widget API and allows sending files\n // using the fileupload API. The data parameter accepts an object which\n // must have a files or fileInput property and can contain additional options:\n // .fileupload('send', {files: filesList});\n // The method returns a Promise object for the file upload call.\n send: function (data) {\n if (data && !this.options.disabled) {\n if (data.fileInput && !data.files) {\n var that = this,\n dfd = $.Deferred(),\n promise = dfd.promise(),\n jqXHR,\n aborted;\n promise.abort = function () {\n aborted = true;\n if (jqXHR) {\n return jqXHR.abort();\n }\n dfd.reject(null, 'abort', 'abort');\n return promise;\n };\n this._getFileInputFiles(data.fileInput).always(\n function (files) {\n if (aborted) {\n return;\n }\n if (!files.length) {\n dfd.reject();\n return;\n }\n data.files = files;\n jqXHR = that._onSend(null, data);\n jqXHR.then(\n function (result, textStatus, jqXHR) {\n dfd.resolve(result, textStatus, jqXHR);\n },\n function (jqXHR, textStatus, errorThrown) {\n dfd.reject(jqXHR, textStatus, errorThrown);\n }\n );\n }\n );\n return this._enhancePromise(promise);\n }\n data.files = $.makeArray(data.files);\n if (data.files.length) {\n return this._onSend(null, data);\n }\n }\n return this._getXHRPromise(false, data && data.context);\n }\n\n });\n\n}));\n",";(function () {\n\t'use strict';\n\n\t/**\n\t * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.\n\t *\n\t * @codingstandard ftlabs-jsv2\n\t * @copyright The Financial Times Limited [All Rights Reserved]\n\t * @license MIT License (see LICENSE.txt)\n\t */\n\n\t/*jslint browser:true, node:true*/\n\t/*global define, Event, Node*/\n\n\n\t/**\n\t * Instantiate fast-clicking listeners on the specified layer.\n\t *\n\t * @constructor\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tfunction FastClick(layer, options) {\n\t\tvar oldOnClick;\n\n\t\toptions = options || {};\n\n\t\t/**\n\t\t * Whether a click is currently being tracked.\n\t\t *\n\t\t * @type boolean\n\t\t */\n\t\tthis.trackingClick = false;\n\n\n\t\t/**\n\t\t * Timestamp for when click tracking started.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.trackingClickStart = 0;\n\n\n\t\t/**\n\t\t * The element being tracked for a click.\n\t\t *\n\t\t * @type EventTarget\n\t\t */\n\t\tthis.targetElement = null;\n\n\n\t\t/**\n\t\t * X-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartX = 0;\n\n\n\t\t/**\n\t\t * Y-coordinate of touch start event.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchStartY = 0;\n\n\n\t\t/**\n\t\t * ID of the last touch, retrieved from Touch.identifier.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.lastTouchIdentifier = 0;\n\n\n\t\t/**\n\t\t * Touchmove boundary, beyond which a click will be cancelled.\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.touchBoundary = options.touchBoundary || 10;\n\n\n\t\t/**\n\t\t * The FastClick layer.\n\t\t *\n\t\t * @type Element\n\t\t */\n\t\tthis.layer = layer;\n\n\t\t/**\n\t\t * The minimum time between tap(touchstart and touchend) events\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapDelay = options.tapDelay || 200;\n\n\t\t/**\n\t\t * The maximum time for a tap\n\t\t *\n\t\t * @type number\n\t\t */\n\t\tthis.tapTimeout = options.tapTimeout || 700;\n\n\t\tif (FastClick.notNeeded(layer)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Some old versions of Android don't have Function.prototype.bind\n\t\tfunction bind(method, context) {\n\t\t\treturn function() { return method.apply(context, arguments); };\n\t\t}\n\n\n\t\tvar methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];\n\t\tvar context = this;\n\t\tfor (var i = 0, l = methods.length; i < l; i++) {\n\t\t\tcontext[methods[i]] = bind(context[methods[i]], context);\n\t\t}\n\n\t\t// Set up event handlers as required\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.addEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.addEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.addEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.addEventListener('click', this.onClick, true);\n\t\tlayer.addEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.addEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.addEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.addEventListener('touchcancel', this.onTouchCancel, false);\n\n\t\t// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick\n\t\t// layer when they are cancelled.\n\t\tif (!Event.prototype.stopImmediatePropagation) {\n\t\t\tlayer.removeEventListener = function(type, callback, capture) {\n\t\t\t\tvar rmv = Node.prototype.removeEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\trmv.call(layer, type, callback.hijacked || callback, capture);\n\t\t\t\t} else {\n\t\t\t\t\trmv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tlayer.addEventListener = function(type, callback, capture) {\n\t\t\t\tvar adv = Node.prototype.addEventListener;\n\t\t\t\tif (type === 'click') {\n\t\t\t\t\tadv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {\n\t\t\t\t\t\tif (!event.propagationStopped) {\n\t\t\t\t\t\t\tcallback(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t}), capture);\n\t\t\t\t} else {\n\t\t\t\t\tadv.call(layer, type, callback, capture);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// If a handler is already declared in the element's onclick attribute, it will be fired before\n\t\t// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and\n\t\t// adding it as listener.\n\t\tif (typeof layer.onclick === 'function') {\n\n\t\t\t// Android browser on at least 3.2 requires a new reference to the function in layer.onclick\n\t\t\t// - the old one won't work if passed to addEventListener directly.\n\t\t\toldOnClick = layer.onclick;\n\t\t\tlayer.addEventListener('click', function(event) {\n\t\t\t\toldOnClick(event);\n\t\t\t}, false);\n\t\t\tlayer.onclick = null;\n\t\t}\n\t}\n\n\t/**\n\t* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.\n\t*\n\t* @type boolean\n\t*/\n\tvar deviceIsWindowsPhone = navigator.userAgent.indexOf(\"Windows Phone\") >= 0;\n\n\t/**\n\t * Android requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;\n\n\n\t/**\n\t * iOS 4 requires an exception for select elements.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOS4 = deviceIsIOS && (/OS 4_\\d(_\\d)?/).test(navigator.userAgent);\n\n\n\t/**\n\t * iOS 6.0-7.* requires the target element to be manually derived\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\\d/).test(navigator.userAgent);\n\n\t/**\n\t * BlackBerry requires exceptions.\n\t *\n\t * @type boolean\n\t */\n\tvar deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;\n\n\t/**\n\t * Determine whether a given element requires a native click.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element needs a native click\n\t */\n\tFastClick.prototype.needsClick = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\n\t\t// Don't send a synthetic click to disabled inputs (issue #62)\n\t\tcase 'button':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\tif (target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'input':\n\n\t\t\t// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)\n\t\t\tif ((deviceIsIOS && target.type === 'file') || target.disabled) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tbreak;\n\t\tcase 'label':\n\t\tcase 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames\n\t\tcase 'video':\n\t\t\treturn true;\n\t\t}\n\n\t\treturn (/\\bneedsclick\\b/).test(target.className);\n\t};\n\n\n\t/**\n\t * Determine whether a given element requires a call to focus to simulate click into element.\n\t *\n\t * @param {EventTarget|Element} target Target DOM element\n\t * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.\n\t */\n\tFastClick.prototype.needsFocus = function(target) {\n\t\tswitch (target.nodeName.toLowerCase()) {\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tcase 'select':\n\t\t\treturn !deviceIsAndroid;\n\t\tcase 'input':\n\t\t\tswitch (target.type) {\n\t\t\tcase 'button':\n\t\t\tcase 'checkbox':\n\t\t\tcase 'file':\n\t\t\tcase 'image':\n\t\t\tcase 'radio':\n\t\t\tcase 'submit':\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// No point in attempting to focus disabled inputs\n\t\t\treturn !target.disabled && !target.readOnly;\n\t\tdefault:\n\t\t\treturn (/\\bneedsfocus\\b/).test(target.className);\n\t\t}\n\t};\n\n\n\t/**\n\t * Send a click event to the specified element.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t * @param {Event} event\n\t */\n\tFastClick.prototype.sendClick = function(targetElement, event) {\n\t\tvar clickEvent, touch;\n\n\t\t// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)\n\t\tif (document.activeElement && document.activeElement !== targetElement) {\n\t\t\tdocument.activeElement.blur();\n\t\t}\n\n\t\ttouch = event.changedTouches[0];\n\n\t\t// Synthesise a click event, with an extra attribute so it can be tracked\n\t\tclickEvent = document.createEvent('MouseEvents');\n\t\tclickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);\n\t\tclickEvent.forwardedTouchEvent = true;\n\t\ttargetElement.dispatchEvent(clickEvent);\n\t};\n\n\tFastClick.prototype.determineEventType = function(targetElement) {\n\n\t\t//Issue #159: Android Chrome Select Box does not open with a synthetic click event\n\t\tif (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {\n\t\t\treturn 'mousedown';\n\t\t}\n\n\t\treturn 'click';\n\t};\n\n\n\t/**\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.focus = function(targetElement) {\n\t\tvar length;\n\n\t\t// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.\n\t\tif (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {\n\t\t\tlength = targetElement.value.length;\n\t\t\ttargetElement.setSelectionRange(length, length);\n\t\t} else {\n\t\t\ttargetElement.focus();\n\t\t}\n\t};\n\n\n\t/**\n\t * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.\n\t *\n\t * @param {EventTarget|Element} targetElement\n\t */\n\tFastClick.prototype.updateScrollParent = function(targetElement) {\n\t\tvar scrollParent, parentElement;\n\n\t\tscrollParent = targetElement.fastClickScrollParent;\n\n\t\t// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the\n\t\t// target element was moved to another parent.\n\t\tif (!scrollParent || !scrollParent.contains(targetElement)) {\n\t\t\tparentElement = targetElement;\n\t\t\tdo {\n\t\t\t\tif (parentElement.scrollHeight > parentElement.offsetHeight) {\n\t\t\t\t\tscrollParent = parentElement;\n\t\t\t\t\ttargetElement.fastClickScrollParent = parentElement;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tparentElement = parentElement.parentElement;\n\t\t\t} while (parentElement);\n\t\t}\n\n\t\t// Always update the scroll top tracker if possible.\n\t\tif (scrollParent) {\n\t\t\tscrollParent.fastClickLastScrollTop = scrollParent.scrollTop;\n\t\t}\n\t};\n\n\n\t/**\n\t * @param {EventTarget} targetElement\n\t * @returns {Element|EventTarget}\n\t */\n\tFastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {\n\n\t\t// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.\n\t\tif (eventTarget.nodeType === Node.TEXT_NODE) {\n\t\t\treturn eventTarget.parentNode;\n\t\t}\n\n\t\treturn eventTarget;\n\t};\n\n\n\t/**\n\t * On touch start, record the position and scroll offset.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchStart = function(event) {\n\t\tvar targetElement, touch, selection;\n\n\t\t// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).\n\t\tif (event.targetTouches.length > 1) {\n\t\t\treturn true;\n\t\t}\n\n\t\ttargetElement = this.getTargetElementFromEventTarget(event.target);\n\t\ttouch = event.targetTouches[0];\n\n\t\tif (deviceIsIOS) {\n\n\t\t\t// Only trusted events will deselect text on iOS (issue #49)\n\t\t\tselection = window.getSelection();\n\t\t\tif (selection.rangeCount && !selection.isCollapsed) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif (!deviceIsIOS4) {\n\n\t\t\t\t// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):\n\t\t\t\t// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched\n\t\t\t\t// with the same identifier as the touch event that previously triggered the click that triggered the alert.\n\t\t\t\t// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an\n\t\t\t\t// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.\n\t\t\t\t// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,\n\t\t\t\t// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,\n\t\t\t\t// random integers, it's safe to to continue if the identifier is 0 here.\n\t\t\t\tif (touch.identifier && touch.identifier === this.lastTouchIdentifier) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tthis.lastTouchIdentifier = touch.identifier;\n\n\t\t\t\t// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:\n\t\t\t\t// 1) the user does a fling scroll on the scrollable layer\n\t\t\t\t// 2) the user stops the fling scroll with another tap\n\t\t\t\t// then the event.target of the last 'touchend' event will be the element that was under the user's finger\n\t\t\t\t// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check\n\t\t\t\t// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).\n\t\t\t\tthis.updateScrollParent(targetElement);\n\t\t\t}\n\t\t}\n\n\t\tthis.trackingClick = true;\n\t\tthis.trackingClickStart = event.timeStamp;\n\t\tthis.targetElement = targetElement;\n\n\t\tthis.touchStartX = touch.pageX;\n\t\tthis.touchStartY = touch.pageY;\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.touchHasMoved = function(event) {\n\t\tvar touch = event.changedTouches[0], boundary = this.touchBoundary;\n\n\t\tif (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Update the last position.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchMove = function(event) {\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If the touch has moved, cancel the click tracking\n\t\tif (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {\n\t\t\tthis.trackingClick = false;\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * Attempt to find the labelled control for the given label element.\n\t *\n\t * @param {EventTarget|HTMLLabelElement} labelElement\n\t * @returns {Element|null}\n\t */\n\tFastClick.prototype.findControl = function(labelElement) {\n\n\t\t// Fast path for newer browsers supporting the HTML5 control attribute\n\t\tif (labelElement.control !== undefined) {\n\t\t\treturn labelElement.control;\n\t\t}\n\n\t\t// All browsers under test that support touch events also support the HTML5 htmlFor attribute\n\t\tif (labelElement.htmlFor) {\n\t\t\treturn document.getElementById(labelElement.htmlFor);\n\t\t}\n\n\t\t// If no for attribute exists, attempt to retrieve the first labellable descendant element\n\t\t// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label\n\t\treturn labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');\n\t};\n\n\n\t/**\n\t * On touch end, determine whether to send a click event at once.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onTouchEnd = function(event) {\n\t\tvar forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;\n\n\t\tif (!this.trackingClick) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Prevent phantom clicks on fast double-tap (issue #36)\n\t\tif ((event.timeStamp - this.lastClickTime) < this.tapDelay) {\n\t\t\tthis.cancelNextClick = true;\n\t\t\treturn true;\n\t\t}\n\n\t\tif ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Reset to prevent wrong click cancel on input (issue #156).\n\t\tthis.cancelNextClick = false;\n\n\t\tthis.lastClickTime = event.timeStamp;\n\n\t\ttrackingClickStart = this.trackingClickStart;\n\t\tthis.trackingClick = false;\n\t\tthis.trackingClickStart = 0;\n\n\t\t// On some iOS devices, the targetElement supplied with the event is invalid if the layer\n\t\t// is performing a transition or scroll, and has to be re-detected manually. Note that\n\t\t// for this to function correctly, it must be called *after* the event target is checked!\n\t\t// See issue #57; also filed as rdar://13048589 .\n\t\tif (deviceIsIOSWithBadTarget) {\n\t\t\ttouch = event.changedTouches[0];\n\n\t\t\t// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null\n\t\t\ttargetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;\n\t\t\ttargetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;\n\t\t}\n\n\t\ttargetTagName = targetElement.tagName.toLowerCase();\n\t\tif (targetTagName === 'label') {\n\t\t\tforElement = this.findControl(targetElement);\n\t\t\tif (forElement) {\n\t\t\t\tthis.focus(targetElement);\n\t\t\t\tif (deviceIsAndroid) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\ttargetElement = forElement;\n\t\t\t}\n\t\t} else if (this.needsFocus(targetElement)) {\n\n\t\t\t// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.\n\t\t\t// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).\n\t\t\tif ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.focus(targetElement);\n\t\t\tthis.sendClick(targetElement, event);\n\n\t\t\t// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.\n\t\t\t// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)\n\t\t\tif (!deviceIsIOS || targetTagName !== 'select') {\n\t\t\t\tthis.targetElement = null;\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (deviceIsIOS && !deviceIsIOS4) {\n\n\t\t\t// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled\n\t\t\t// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).\n\t\t\tscrollParent = targetElement.fastClickScrollParent;\n\t\t\tif (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Prevent the actual click from going though - unless the target node is marked as requiring\n\t\t// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.\n\t\tif (!this.needsClick(targetElement)) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.sendClick(targetElement, event);\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * On touch cancel, stop tracking the click.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.onTouchCancel = function() {\n\t\tthis.trackingClick = false;\n\t\tthis.targetElement = null;\n\t};\n\n\n\t/**\n\t * Determine mouse events which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onMouse = function(event) {\n\n\t\t// If a target element was never set (because a touch event was never fired) allow the event\n\t\tif (!this.targetElement) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (event.forwardedTouchEvent) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Programmatically generated events targeting a specific element should be permitted\n\t\tif (!event.cancelable) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Derive and check the target element to see whether the mouse event needs to be permitted;\n\t\t// unless explicitly enabled, prevent non-touch click events from triggering actions,\n\t\t// to prevent ghost/doubleclicks.\n\t\tif (!this.needsClick(this.targetElement) || this.cancelNextClick) {\n\n\t\t\t// Prevent any user-added listeners declared on FastClick element from being fired.\n\t\t\tif (event.stopImmediatePropagation) {\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t} else {\n\n\t\t\t\t// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)\n\t\t\t\tevent.propagationStopped = true;\n\t\t\t}\n\n\t\t\t// Cancel the event\n\t\t\tevent.stopPropagation();\n\t\t\tevent.preventDefault();\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the mouse event is permitted, return true for the action to go through.\n\t\treturn true;\n\t};\n\n\n\t/**\n\t * On actual clicks, determine whether this is a touch-generated click, a click action occurring\n\t * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or\n\t * an actual click which should be permitted.\n\t *\n\t * @param {Event} event\n\t * @returns {boolean}\n\t */\n\tFastClick.prototype.onClick = function(event) {\n\t\tvar permitted;\n\n\t\t// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.\n\t\tif (this.trackingClick) {\n\t\t\tthis.targetElement = null;\n\t\t\tthis.trackingClick = false;\n\t\t\treturn true;\n\t\t}\n\n\t\t// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.\n\t\tif (event.target.type === 'submit' && event.detail === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\tpermitted = this.onMouse(event);\n\n\t\t// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.\n\t\tif (!permitted) {\n\t\t\tthis.targetElement = null;\n\t\t}\n\n\t\t// If clicks are permitted, return true for the action to go through.\n\t\treturn permitted;\n\t};\n\n\n\t/**\n\t * Remove all FastClick's event listeners.\n\t *\n\t * @returns {void}\n\t */\n\tFastClick.prototype.destroy = function() {\n\t\tvar layer = this.layer;\n\n\t\tif (deviceIsAndroid) {\n\t\t\tlayer.removeEventListener('mouseover', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mousedown', this.onMouse, true);\n\t\t\tlayer.removeEventListener('mouseup', this.onMouse, true);\n\t\t}\n\n\t\tlayer.removeEventListener('click', this.onClick, true);\n\t\tlayer.removeEventListener('touchstart', this.onTouchStart, false);\n\t\tlayer.removeEventListener('touchmove', this.onTouchMove, false);\n\t\tlayer.removeEventListener('touchend', this.onTouchEnd, false);\n\t\tlayer.removeEventListener('touchcancel', this.onTouchCancel, false);\n\t};\n\n\n\t/**\n\t * Check whether FastClick is needed.\n\t *\n\t * @param {Element} layer The layer to listen on\n\t */\n\tFastClick.notNeeded = function(layer) {\n\t\tvar metaViewport;\n\t\tvar chromeVersion;\n\t\tvar blackberryVersion;\n\t\tvar firefoxVersion;\n\n\t\t// Devices that don't support touch don't need FastClick\n\t\tif (typeof window.ontouchstart === 'undefined') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Chrome version - zero for other browsers\n\t\tchromeVersion = +(/Chrome\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (chromeVersion) {\n\n\t\t\tif (deviceIsAndroid) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// Chrome on Android with user-scalable=\"no\" doesn't need FastClick (issue #89)\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// Chrome 32 and above with width=device-width or less don't need FastClick\n\t\t\t\t\tif (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Chrome desktop doesn't need FastClick (issue #15)\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (deviceIsBlackBerry10) {\n\t\t\tblackberryVersion = navigator.userAgent.match(/Version\\/([0-9]*)\\.([0-9]*)/);\n\n\t\t\t// BlackBerry 10.3+ does not require Fastclick library.\n\t\t\t// https://github.com/ftlabs/fastclick/issues/251\n\t\t\tif (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {\n\t\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\n\t\t\t\tif (metaViewport) {\n\t\t\t\t\t// user-scalable=no eliminates click delay.\n\t\t\t\t\tif (metaViewport.content.indexOf('user-scalable=no') !== -1) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t// width=device-width (or less than device-width) eliminates click delay.\n\t\t\t\t\tif (document.documentElement.scrollWidth <= window.outerWidth) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)\n\t\tif (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Firefox version - zero for other browsers\n\t\tfirefoxVersion = +(/Firefox\\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];\n\n\t\tif (firefoxVersion >= 27) {\n\t\t\t// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896\n\n\t\t\tmetaViewport = document.querySelector('meta[name=viewport]');\n\t\t\tif (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version\n\t\t// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx\n\t\tif (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t/**\n\t * Factory method for creating a FastClick object\n\t *\n\t * @param {Element} layer The layer to listen on\n\t * @param {Object} [options={}] The options to override the defaults\n\t */\n\tFastClick.attach = function(layer, options) {\n\t\treturn new FastClick(layer, options);\n\t};\n\n\n\tif (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(function() {\n\t\t\treturn FastClick;\n\t\t});\n\t} else if (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = FastClick.attach;\n\t\tmodule.exports.FastClick = FastClick;\n\t} else {\n\t\twindow.FastClick = FastClick;\n\t}\n}());\n","/*!\n * Bootstrap Colorpicker v2.4.0\n * https://itsjavi.com/bootstrap-colorpicker/\n *\n * Originally written by (c) 2012 Stefan Petre\n * Licensed under the Apache License v2.0\n * http://www.apache.org/licenses/LICENSE-2.0.txt\n *\n */\n\n(function(factory) {\n var global = (typeof window === 'undefined') ? this : window;\n\n if (typeof exports === 'object') {\n module.exports = factory(global.jQuery, global);\n } else if (typeof define === 'function' && define.amd) {\n define(['jquery'], function(jq) {\n return factory(jq, global);\n });\n } else if (global.jQuery && !global.jQuery.fn.colorpicker) {\n factory(global.jQuery, global);\n }\n}(function(jQuery, window) {\n 'use strict';\n\n var $ = jQuery;\n\n /**\n * Color manipulation helper class\n *\n * @param {Object|String} [val]\n * @param {Object} [predefinedColors]\n * @param {String|null} [fallbackColor]\n * @param {String|null} [fallbackFormat]\n * @constructor\n */\n var Color = function(val, predefinedColors, fallbackColor, fallbackFormat) {\n this.fallbackValue = fallbackColor ?\n (\n fallbackColor && (typeof fallbackColor.h !== 'undefined') ?\n fallbackColor :\n this.value = {\n h: 0,\n s: 0,\n b: 0,\n a: 1\n }\n ) :\n null;\n\n this.fallbackFormat = fallbackFormat ? fallbackFormat : 'rgba';\n\n this.value = this.fallbackValue;\n\n this.origFormat = null; // original string format\n\n this.predefinedColors = predefinedColors ? predefinedColors : {};\n\n // We don't want to share aliases across instances so we extend new object\n this.colors = $.extend({}, Color.webColors, this.predefinedColors);\n\n if (val) {\n if (typeof val.h !== 'undefined') {\n this.value = val;\n } else {\n this.setColor(String(val));\n }\n }\n\n if (!this.value) {\n // Initial value is always black if no arguments are passed or val is empty\n this.value = {\n h: 0,\n s: 0,\n b: 0,\n a: 1\n };\n }\n };\n\n Color.webColors = { // 140 predefined colors from the HTML Colors spec\n \"aliceblue\": \"#f0f8ff\",\n \"antiquewhite\": \"#faebd7\",\n \"aqua\": \"#00ffff\",\n \"aquamarine\": \"#7fffd4\",\n \"azure\": \"#f0ffff\",\n \"beige\": \"#f5f5dc\",\n \"bisque\": \"#ffe4c4\",\n \"black\": \"#000000\",\n \"blanchedalmond\": \"#ffebcd\",\n \"blue\": \"#0000ff\",\n \"blueviolet\": \"#8a2be2\",\n \"brown\": \"#a52a2a\",\n \"burlywood\": \"#deb887\",\n \"cadetblue\": \"#5f9ea0\",\n \"chartreuse\": \"#7fff00\",\n \"chocolate\": \"#d2691e\",\n \"coral\": \"#ff7f50\",\n \"cornflowerblue\": \"#6495ed\",\n \"cornsilk\": \"#fff8dc\",\n \"crimson\": \"#dc143c\",\n \"cyan\": \"#00ffff\",\n \"darkblue\": \"#00008b\",\n \"darkcyan\": \"#008b8b\",\n \"darkgoldenrod\": \"#b8860b\",\n \"darkgray\": \"#a9a9a9\",\n \"darkgreen\": \"#006400\",\n \"darkkhaki\": \"#bdb76b\",\n \"darkmagenta\": \"#8b008b\",\n \"darkolivegreen\": \"#556b2f\",\n \"darkorange\": \"#ff8c00\",\n \"darkorchid\": \"#9932cc\",\n \"darkred\": \"#8b0000\",\n \"darksalmon\": \"#e9967a\",\n \"darkseagreen\": \"#8fbc8f\",\n \"darkslateblue\": \"#483d8b\",\n \"darkslategray\": \"#2f4f4f\",\n \"darkturquoise\": \"#00ced1\",\n \"darkviolet\": \"#9400d3\",\n \"deeppink\": \"#ff1493\",\n \"deepskyblue\": \"#00bfff\",\n \"dimgray\": \"#696969\",\n \"dodgerblue\": \"#1e90ff\",\n \"firebrick\": \"#b22222\",\n \"floralwhite\": \"#fffaf0\",\n \"forestgreen\": \"#228b22\",\n \"fuchsia\": \"#ff00ff\",\n \"gainsboro\": \"#dcdcdc\",\n \"ghostwhite\": \"#f8f8ff\",\n \"gold\": \"#ffd700\",\n \"goldenrod\": \"#daa520\",\n \"gray\": \"#808080\",\n \"green\": \"#008000\",\n \"greenyellow\": \"#adff2f\",\n \"honeydew\": \"#f0fff0\",\n \"hotpink\": \"#ff69b4\",\n \"indianred\": \"#cd5c5c\",\n \"indigo\": \"#4b0082\",\n \"ivory\": \"#fffff0\",\n \"khaki\": \"#f0e68c\",\n \"lavender\": \"#e6e6fa\",\n \"lavenderblush\": \"#fff0f5\",\n \"lawngreen\": \"#7cfc00\",\n \"lemonchiffon\": \"#fffacd\",\n \"lightblue\": \"#add8e6\",\n \"lightcoral\": \"#f08080\",\n \"lightcyan\": \"#e0ffff\",\n \"lightgoldenrodyellow\": \"#fafad2\",\n \"lightgrey\": \"#d3d3d3\",\n \"lightgreen\": \"#90ee90\",\n \"lightpink\": \"#ffb6c1\",\n \"lightsalmon\": \"#ffa07a\",\n \"lightseagreen\": \"#20b2aa\",\n \"lightskyblue\": \"#87cefa\",\n \"lightslategray\": \"#778899\",\n \"lightsteelblue\": \"#b0c4de\",\n \"lightyellow\": \"#ffffe0\",\n \"lime\": \"#00ff00\",\n \"limegreen\": \"#32cd32\",\n \"linen\": \"#faf0e6\",\n \"magenta\": \"#ff00ff\",\n \"maroon\": \"#800000\",\n \"mediumaquamarine\": \"#66cdaa\",\n \"mediumblue\": \"#0000cd\",\n \"mediumorchid\": \"#ba55d3\",\n \"mediumpurple\": \"#9370d8\",\n \"mediumseagreen\": \"#3cb371\",\n \"mediumslateblue\": \"#7b68ee\",\n \"mediumspringgreen\": \"#00fa9a\",\n \"mediumturquoise\": \"#48d1cc\",\n \"mediumvioletred\": \"#c71585\",\n \"midnightblue\": \"#191970\",\n \"mintcream\": \"#f5fffa\",\n \"mistyrose\": \"#ffe4e1\",\n \"moccasin\": \"#ffe4b5\",\n \"navajowhite\": \"#ffdead\",\n \"navy\": \"#000080\",\n \"oldlace\": \"#fdf5e6\",\n \"olive\": \"#808000\",\n \"olivedrab\": \"#6b8e23\",\n \"orange\": \"#ffa500\",\n \"orangered\": \"#ff4500\",\n \"orchid\": \"#da70d6\",\n \"palegoldenrod\": \"#eee8aa\",\n \"palegreen\": \"#98fb98\",\n \"paleturquoise\": \"#afeeee\",\n \"palevioletred\": \"#d87093\",\n \"papayawhip\": \"#ffefd5\",\n \"peachpuff\": \"#ffdab9\",\n \"peru\": \"#cd853f\",\n \"pink\": \"#ffc0cb\",\n \"plum\": \"#dda0dd\",\n \"powderblue\": \"#b0e0e6\",\n \"purple\": \"#800080\",\n \"red\": \"#ff0000\",\n \"rosybrown\": \"#bc8f8f\",\n \"royalblue\": \"#4169e1\",\n \"saddlebrown\": \"#8b4513\",\n \"salmon\": \"#fa8072\",\n \"sandybrown\": \"#f4a460\",\n \"seagreen\": \"#2e8b57\",\n \"seashell\": \"#fff5ee\",\n \"sienna\": \"#a0522d\",\n \"silver\": \"#c0c0c0\",\n \"skyblue\": \"#87ceeb\",\n \"slateblue\": \"#6a5acd\",\n \"slategray\": \"#708090\",\n \"snow\": \"#fffafa\",\n \"springgreen\": \"#00ff7f\",\n \"steelblue\": \"#4682b4\",\n \"tan\": \"#d2b48c\",\n \"teal\": \"#008080\",\n \"thistle\": \"#d8bfd8\",\n \"tomato\": \"#ff6347\",\n \"turquoise\": \"#40e0d0\",\n \"violet\": \"#ee82ee\",\n \"wheat\": \"#f5deb3\",\n \"white\": \"#ffffff\",\n \"whitesmoke\": \"#f5f5f5\",\n \"yellow\": \"#ffff00\",\n \"yellowgreen\": \"#9acd32\",\n \"transparent\": \"transparent\"\n };\n\n Color.prototype = {\n constructor: Color,\n colors: {}, // merged web and predefined colors\n predefinedColors: {},\n /**\n * @return {Object}\n */\n getValue: function() {\n return this.value;\n },\n /**\n * @param {Object} val\n */\n setValue: function(val) {\n this.value = val;\n },\n _sanitizeNumber: function(val) {\n if (typeof val === 'number') {\n return val;\n }\n if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {\n return 1;\n }\n if (val === '') {\n return 0;\n }\n if (typeof val.toLowerCase !== 'undefined') {\n if (val.match(/^\\./)) {\n val = \"0\" + val;\n }\n return Math.ceil(parseFloat(val) * 100) / 100;\n }\n return 1;\n },\n isTransparent: function(strVal) {\n if (!strVal || !(typeof strVal === 'string' || strVal instanceof String)) {\n return false;\n }\n strVal = strVal.toLowerCase().trim();\n return (strVal === 'transparent') || (strVal.match(/#?00000000/)) || (strVal.match(/(rgba|hsla)\\(0,0,0,0?\\.?0\\)/));\n },\n rgbaIsTransparent: function(rgba) {\n return ((rgba.r === 0) && (rgba.g === 0) && (rgba.b === 0) && (rgba.a === 0));\n },\n // parse a string to HSB\n /**\n * @protected\n * @param {String} strVal\n * @returns {boolean} Returns true if it could be parsed, false otherwise\n */\n setColor: function(strVal) {\n strVal = strVal.toLowerCase().trim();\n if (strVal) {\n if (this.isTransparent(strVal)) {\n this.value = {\n h: 0,\n s: 0,\n b: 0,\n a: 0\n };\n return true;\n } else {\n var parsedColor = this.parse(strVal);\n if (parsedColor) {\n this.value = this.value = {\n h: parsedColor.h,\n s: parsedColor.s,\n b: parsedColor.b,\n a: parsedColor.a\n };\n if (!this.origFormat) {\n this.origFormat = parsedColor.format;\n }\n } else if (this.fallbackValue) {\n // if parser fails, defaults to fallbackValue if defined, otherwise the value won't be changed\n this.value = this.fallbackValue;\n }\n }\n }\n return false;\n },\n setHue: function(h) {\n this.value.h = 1 - h;\n },\n setSaturation: function(s) {\n this.value.s = s;\n },\n setBrightness: function(b) {\n this.value.b = 1 - b;\n },\n setAlpha: function(a) {\n this.value.a = Math.round((parseInt((1 - a) * 100, 10) / 100) * 100) / 100;\n },\n toRGB: function(h, s, b, a) {\n if (arguments.length === 0) {\n h = this.value.h;\n s = this.value.s;\n b = this.value.b;\n a = this.value.a;\n }\n\n h *= 360;\n var R, G, B, X, C;\n h = (h % 360) / 60;\n C = b * s;\n X = C * (1 - Math.abs(h % 2 - 1));\n R = G = B = b - C;\n\n h = ~~h;\n R += [C, X, 0, 0, X, C][h];\n G += [X, C, C, X, 0, 0][h];\n B += [0, 0, X, C, C, X][h];\n\n return {\n r: Math.round(R * 255),\n g: Math.round(G * 255),\n b: Math.round(B * 255),\n a: a\n };\n },\n toHex: function(h, s, b, a) {\n if (arguments.length === 0) {\n h = this.value.h;\n s = this.value.s;\n b = this.value.b;\n a = this.value.a;\n }\n\n var rgb = this.toRGB(h, s, b, a);\n\n if (this.rgbaIsTransparent(rgb)) {\n return 'transparent';\n }\n\n return \"#\" + ((1 << 24) + (parseInt(rgb.r) << 16) + (parseInt(rgb.g) << 8) + parseInt(rgb.b)).toString(16).slice(1);\n },\n toHSL: function(h, s, b, a) {\n if (arguments.length === 0) {\n h = this.value.h;\n s = this.value.s;\n b = this.value.b;\n a = this.value.a;\n }\n\n var H = h,\n L = (2 - s) * b,\n S = s * b;\n if (L > 0 && L <= 1) {\n S /= L;\n } else {\n S /= 2 - L;\n }\n L /= 2;\n if (S > 1) {\n S = 1;\n }\n return {\n h: isNaN(H) ? 0 : H,\n s: isNaN(S) ? 0 : S,\n l: isNaN(L) ? 0 : L,\n a: isNaN(a) ? 0 : a\n };\n },\n toAlias: function(r, g, b, a) {\n var c, rgb = (arguments.length === 0) ? this.toHex() : this.toHex(r, g, b, a);\n\n // support predef. colors in non-hex format too, as defined in the alias itself\n var original = this.origFormat === 'alias' ? rgb : this.toString(this.origFormat, false);\n\n for (var alias in this.colors) {\n c = this.colors[alias].toLowerCase().trim();\n if ((c === rgb) || (c === original)) {\n return alias;\n }\n }\n return false;\n },\n RGBtoHSB: function(r, g, b, a) {\n r /= 255;\n g /= 255;\n b /= 255;\n\n var H, S, V, C;\n V = Math.max(r, g, b);\n C = V - Math.min(r, g, b);\n H = (C === 0 ? null :\n V === r ? (g - b) / C :\n V === g ? (b - r) / C + 2 :\n (r - g) / C + 4\n );\n H = ((H + 360) % 6) * 60 / 360;\n S = C === 0 ? 0 : C / V;\n return {\n h: this._sanitizeNumber(H),\n s: S,\n b: V,\n a: this._sanitizeNumber(a)\n };\n },\n HueToRGB: function(p, q, h) {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n if ((h * 6) < 1) {\n return p + (q - p) * h * 6;\n } else if ((h * 2) < 1) {\n return q;\n } else if ((h * 3) < 2) {\n return p + (q - p) * ((2 / 3) - h) * 6;\n } else {\n return p;\n }\n },\n HSLtoRGB: function(h, s, l, a) {\n if (s < 0) {\n s = 0;\n }\n var q;\n if (l <= 0.5) {\n q = l * (1 + s);\n } else {\n q = l + s - (l * s);\n }\n\n var p = 2 * l - q;\n\n var tr = h + (1 / 3);\n var tg = h;\n var tb = h - (1 / 3);\n\n var r = Math.round(this.HueToRGB(p, q, tr) * 255);\n var g = Math.round(this.HueToRGB(p, q, tg) * 255);\n var b = Math.round(this.HueToRGB(p, q, tb) * 255);\n return [r, g, b, this._sanitizeNumber(a)];\n },\n /**\n * @param {String} strVal\n * @returns {Object} Object containing h,s,b,a,format properties or FALSE if failed to parse\n */\n parse: function(strVal) {\n if (arguments.length === 0) {\n return false;\n }\n\n var that = this,\n result = false,\n isAlias = (typeof this.colors[strVal] !== 'undefined'),\n values, format;\n\n if (isAlias) {\n strVal = this.colors[strVal].toLowerCase().trim();\n }\n\n $.each(this.stringParsers, function(i, parser) {\n var match = parser.re.exec(strVal);\n values = match && parser.parse.apply(that, [match]);\n if (values) {\n result = {};\n format = (isAlias ? 'alias' : (parser.format ? parser.format : that.getValidFallbackFormat()));\n if (format.match(/hsla?/)) {\n result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));\n } else {\n result = that.RGBtoHSB.apply(that, values);\n }\n if (result instanceof Object) {\n result.format = format;\n }\n return false; // stop iterating\n }\n return true;\n });\n return result;\n },\n getValidFallbackFormat: function() {\n var formats = [\n 'rgba', 'rgb', 'hex', 'hsla', 'hsl'\n ];\n if (this.origFormat && (formats.indexOf(this.origFormat) !== -1)) {\n return this.origFormat;\n }\n if (this.fallbackFormat && (formats.indexOf(this.fallbackFormat) !== -1)) {\n return this.fallbackFormat;\n }\n\n return 'rgba'; // By default, return a format that will not lose the alpha info\n },\n /**\n *\n * @param {string} [format] (default: rgba)\n * @param {boolean} [translateAlias] Return real color for pre-defined (non-standard) aliases (default: false)\n * @returns {String}\n */\n toString: function(format, translateAlias) {\n format = format || this.origFormat || this.fallbackFormat;\n translateAlias = translateAlias || false;\n\n var c = false;\n\n switch (format) {\n case 'rgb':\n {\n c = this.toRGB();\n if (this.rgbaIsTransparent(c)) {\n return 'transparent';\n }\n return 'rgb(' + c.r + ',' + c.g + ',' + c.b + ')';\n }\n break;\n case 'rgba':\n {\n c = this.toRGB();\n return 'rgba(' + c.r + ',' + c.g + ',' + c.b + ',' + c.a + ')';\n }\n break;\n case 'hsl':\n {\n c = this.toHSL();\n return 'hsl(' + Math.round(c.h * 360) + ',' + Math.round(c.s * 100) + '%,' + Math.round(c.l * 100) + '%)';\n }\n break;\n case 'hsla':\n {\n c = this.toHSL();\n return 'hsla(' + Math.round(c.h * 360) + ',' + Math.round(c.s * 100) + '%,' + Math.round(c.l * 100) + '%,' + c.a + ')';\n }\n break;\n case 'hex':\n {\n return this.toHex();\n }\n break;\n case 'alias':\n {\n c = this.toAlias();\n\n if (c === false) {\n return this.toString(this.getValidFallbackFormat());\n }\n\n if (translateAlias && !(c in Color.webColors) && (c in this.predefinedColors)) {\n return this.predefinedColors[c];\n }\n\n return c;\n }\n default:\n {\n return c;\n }\n break;\n }\n },\n // a set of RE's that can match strings and generate color tuples.\n // from John Resig color plugin\n // https://github.com/jquery/jquery-color/\n stringParsers: [{\n re: /rgb\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*?\\)/,\n format: 'rgb',\n parse: function(execResult) {\n return [\n execResult[1],\n execResult[2],\n execResult[3],\n 1\n ];\n }\n }, {\n re: /rgb\\(\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*?\\)/,\n format: 'rgb',\n parse: function(execResult) {\n return [\n 2.55 * execResult[1],\n 2.55 * execResult[2],\n 2.55 * execResult[3],\n 1\n ];\n }\n }, {\n re: /rgba\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d*(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'rgba',\n parse: function(execResult) {\n return [\n execResult[1],\n execResult[2],\n execResult[3],\n execResult[4]\n ];\n }\n }, {\n re: /rgba\\(\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d*(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'rgba',\n parse: function(execResult) {\n return [\n 2.55 * execResult[1],\n 2.55 * execResult[2],\n 2.55 * execResult[3],\n execResult[4]\n ];\n }\n }, {\n re: /hsl\\(\\s*(\\d*(?:\\.\\d+)?)\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*?\\)/,\n format: 'hsl',\n parse: function(execResult) {\n return [\n execResult[1] / 360,\n execResult[2] / 100,\n execResult[3] / 100,\n execResult[4]\n ];\n }\n }, {\n re: /hsla\\(\\s*(\\d*(?:\\.\\d+)?)\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*,\\s*(\\d*(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d*(?:\\.\\d+)?)\\s*)?\\)/,\n format: 'hsla',\n parse: function(execResult) {\n return [\n execResult[1] / 360,\n execResult[2] / 100,\n execResult[3] / 100,\n execResult[4]\n ];\n }\n }, {\n re: /#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,\n format: 'hex',\n parse: function(execResult) {\n return [\n parseInt(execResult[1], 16),\n parseInt(execResult[2], 16),\n parseInt(execResult[3], 16),\n 1\n ];\n }\n }, {\n re: /#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,\n format: 'hex',\n parse: function(execResult) {\n return [\n parseInt(execResult[1] + execResult[1], 16),\n parseInt(execResult[2] + execResult[2], 16),\n parseInt(execResult[3] + execResult[3], 16),\n 1\n ];\n }\n }],\n colorNameToHex: function(name) {\n if (typeof this.colors[name.toLowerCase()] !== 'undefined') {\n return this.colors[name.toLowerCase()];\n }\n return false;\n }\n };\n\n /*\n * Default plugin options\n */\n var defaults = {\n horizontal: false, // horizontal mode layout ?\n inline: false, //forces to show the colorpicker as an inline element\n color: false, //forces a color\n format: false, //forces a format\n input: 'input', // children input selector\n container: false, // container selector\n component: '.add-on, .input-group-addon', // children component selector\n fallbackColor: false, // fallback color value. null = keeps current color.\n fallbackFormat: 'hex', // fallback color format\n sliders: {\n saturation: {\n maxLeft: 100,\n maxTop: 100,\n callLeft: 'setSaturation',\n callTop: 'setBrightness'\n },\n hue: {\n maxLeft: 0,\n maxTop: 100,\n callLeft: false,\n callTop: 'setHue'\n },\n alpha: {\n maxLeft: 0,\n maxTop: 100,\n callLeft: false,\n callTop: 'setAlpha'\n }\n },\n slidersHorz: {\n saturation: {\n maxLeft: 100,\n maxTop: 100,\n callLeft: 'setSaturation',\n callTop: 'setBrightness'\n },\n hue: {\n maxLeft: 100,\n maxTop: 0,\n callLeft: 'setHue',\n callTop: false\n },\n alpha: {\n maxLeft: 100,\n maxTop: 0,\n callLeft: 'setAlpha',\n callTop: false\n }\n },\n template: '<div class=\"colorpicker dropdown-menu\">' +\n '<div class=\"colorpicker-saturation\"><i><b></b></i></div>' +\n '<div class=\"colorpicker-hue\"><i></i></div>' +\n '<div class=\"colorpicker-alpha\"><i></i></div>' +\n '<div class=\"colorpicker-color\"><div /></div>' +\n '<div class=\"colorpicker-selectors\"></div>' +\n '</div>',\n align: 'right',\n customClass: null, // custom class added to the colorpicker element\n colorSelectors: null // custom color aliases\n };\n\n /**\n * Colorpicker component class\n *\n * @param {Object|String} element\n * @param {Object} options\n * @constructor\n */\n var Colorpicker = function(element, options) {\n this.element = $(element).addClass('colorpicker-element');\n this.options = $.extend(true, {}, defaults, this.element.data(), options);\n this.component = this.options.component;\n this.component = (this.component !== false) ? this.element.find(this.component) : false;\n if (this.component && (this.component.length === 0)) {\n this.component = false;\n }\n this.container = (this.options.container === true) ? this.element : this.options.container;\n this.container = (this.container !== false) ? $(this.container) : false;\n\n // Is the element an input? Should we search inside for any input?\n this.input = this.element.is('input') ? this.element : (this.options.input ?\n this.element.find(this.options.input) : false);\n if (this.input && (this.input.length === 0)) {\n this.input = false;\n }\n // Set HSB color\n this.color = this.createColor(this.options.color !== false ? this.options.color : this.getValue());\n\n this.format = this.options.format !== false ? this.options.format : this.color.origFormat;\n\n if (this.options.color !== false) {\n this.updateInput(this.color);\n this.updateData(this.color);\n }\n\n // Setup picker\n var $picker = this.picker = $(this.options.template);\n if (this.options.customClass) {\n $picker.addClass(this.options.customClass);\n }\n if (this.options.inline) {\n $picker.addClass('colorpicker-inline colorpicker-visible');\n } else {\n $picker.addClass('colorpicker-hidden');\n }\n if (this.options.horizontal) {\n $picker.addClass('colorpicker-horizontal');\n }\n if (\n (['rgba', 'hsla', 'alias'].indexOf(this.format) !== -1) ||\n this.options.format === false ||\n this.getValue() === 'transparent'\n ) {\n $picker.addClass('colorpicker-with-alpha');\n }\n if (this.options.align === 'right') {\n $picker.addClass('colorpicker-right');\n }\n if (this.options.inline === true) {\n $picker.addClass('colorpicker-no-arrow');\n }\n if (this.options.colorSelectors) {\n var colorpicker = this,\n selectorsContainer = colorpicker.picker.find('.colorpicker-selectors');\n\n if (selectorsContainer.length > 0) {\n $.each(this.options.colorSelectors, function(name, color) {\n var $btn = $('<i />')\n .addClass('colorpicker-selectors-color')\n .css('background-color', color)\n .data('class', name).data('alias', name);\n\n $btn.on('click.colorpicker touchend.colorpicker', function() {\n colorpicker.setValue(\n colorpicker.format === 'alias' ? $(this).data('alias') : $(this).css('background-color')\n );\n });\n selectorsContainer.append($btn);\n });\n selectorsContainer.show().addClass('colorpicker-visible');\n }\n }\n\n // Prevent closing the colorpicker when clicking on itself\n $picker.on('mousedown.colorpicker touchstart.colorpicker', $.proxy(function(e) {\n if (e.target === e.currentTarget) {\n e.preventDefault();\n }\n }, this));\n\n // Bind click/tap events on the sliders\n $picker.find('.colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha')\n .on('mousedown.colorpicker touchstart.colorpicker', $.proxy(this.mousedown, this));\n\n $picker.appendTo(this.container ? this.container : $('body'));\n\n // Bind other events\n if (this.input !== false) {\n this.input.on({\n 'keyup.colorpicker': $.proxy(this.keyup, this)\n });\n this.input.on({\n 'change.colorpicker': $.proxy(this.change, this)\n });\n if (this.component === false) {\n this.element.on({\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n }\n if (this.options.inline === false) {\n this.element.on({\n 'focusout.colorpicker': $.proxy(this.hide, this)\n });\n }\n }\n\n if (this.component !== false) {\n this.component.on({\n 'click.colorpicker': $.proxy(this.show, this)\n });\n }\n\n if ((this.input === false) && (this.component === false)) {\n this.element.on({\n 'click.colorpicker': $.proxy(this.show, this)\n });\n }\n\n // for HTML5 input[type='color']\n if ((this.input !== false) && (this.component !== false) && (this.input.attr('type') === 'color')) {\n\n this.input.on({\n 'click.colorpicker': $.proxy(this.show, this),\n 'focus.colorpicker': $.proxy(this.show, this)\n });\n }\n this.update();\n\n $($.proxy(function() {\n this.element.trigger('create');\n }, this));\n };\n\n Colorpicker.Color = Color;\n\n Colorpicker.prototype = {\n constructor: Colorpicker,\n destroy: function() {\n this.picker.remove();\n this.element.removeData('colorpicker', 'color').off('.colorpicker');\n if (this.input !== false) {\n this.input.off('.colorpicker');\n }\n if (this.component !== false) {\n this.component.off('.colorpicker');\n }\n this.element.removeClass('colorpicker-element');\n this.element.trigger({\n type: 'destroy'\n });\n },\n reposition: function() {\n if (this.options.inline !== false || this.options.container) {\n return false;\n }\n var type = this.container && this.container[0] !== window.document.body ? 'position' : 'offset';\n var element = this.component || this.element;\n var offset = element[type]();\n if (this.options.align === 'right') {\n offset.left -= this.picker.outerWidth() - element.outerWidth();\n }\n this.picker.css({\n top: offset.top + element.outerHeight(),\n left: offset.left\n });\n },\n show: function(e) {\n if (this.isDisabled()) {\n // Don't show the widget if it's disabled (the input)\n return;\n }\n this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');\n this.reposition();\n $(window).on('resize.colorpicker', $.proxy(this.reposition, this));\n if (e && (!this.hasInput() || this.input.attr('type') === 'color')) {\n if (e.stopPropagation && e.preventDefault) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n if ((this.component || !this.input) && (this.options.inline === false)) {\n $(window.document).on({\n 'mousedown.colorpicker': $.proxy(this.hide, this)\n });\n }\n this.element.trigger({\n type: 'showPicker',\n color: this.color\n });\n },\n hide: function(e) {\n if ((typeof e !== 'undefined') && e.target) {\n // Prevent hide if triggered by an event and an element inside the colorpicker has been clicked/touched\n if (\n $(e.currentTarget).parents('.colorpicker').length > 0 ||\n $(e.target).parents('.colorpicker').length > 0\n ) {\n return false;\n }\n }\n this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');\n $(window).off('resize.colorpicker', this.reposition);\n $(window.document).off({\n 'mousedown.colorpicker': this.hide\n });\n this.update();\n this.element.trigger({\n type: 'hidePicker',\n color: this.color\n });\n },\n updateData: function(val) {\n val = val || this.color.toString(this.format, false);\n this.element.data('color', val);\n return val;\n },\n updateInput: function(val) {\n val = val || this.color.toString(this.format, false);\n if (this.input !== false) {\n this.input.prop('value', val);\n }\n return val;\n },\n updatePicker: function(val) {\n if (typeof val !== 'undefined') {\n this.color = this.createColor(val);\n }\n var sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;\n var icns = this.picker.find('i');\n if (icns.length === 0) {\n return;\n }\n if (this.options.horizontal === false) {\n sl = this.options.sliders;\n icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()\n .eq(2).css('top', sl.alpha.maxTop * (1 - this.color.value.a));\n } else {\n sl = this.options.slidersHorz;\n icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()\n .eq(2).css('left', sl.alpha.maxLeft * (1 - this.color.value.a));\n }\n icns.eq(0).css({\n 'top': sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,\n 'left': this.color.value.s * sl.saturation.maxLeft\n });\n\n this.picker.find('.colorpicker-saturation')\n .css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));\n\n this.picker.find('.colorpicker-alpha')\n .css('backgroundColor', this.color.toHex());\n\n this.picker.find('.colorpicker-color, .colorpicker-color div')\n .css('backgroundColor', this.color.toString(this.format, true));\n\n return val;\n },\n updateComponent: function(val) {\n var color;\n\n if (typeof val !== 'undefined') {\n color = this.createColor(val);\n } else {\n color = this.color;\n }\n\n if (this.component !== false) {\n var icn = this.component.find('i').eq(0);\n if (icn.length > 0) {\n icn.css({\n 'backgroundColor': color.toString(this.format, true)\n });\n } else {\n this.component.css({\n 'backgroundColor': color.toString(this.format, true)\n });\n }\n }\n\n return color.toString(this.format, false);\n },\n update: function(force) {\n var val;\n if ((this.getValue(false) !== false) || (force === true)) {\n // Update input/data only if the current value is not empty\n val = this.updateComponent();\n this.updateInput(val);\n this.updateData(val);\n this.updatePicker(); // only update picker if value is not empty\n }\n return val;\n\n },\n setValue: function(val) { // set color manually\n this.color = this.createColor(val);\n this.update(true);\n this.element.trigger({\n type: 'changeColor',\n color: this.color,\n value: val\n });\n },\n /**\n * Creates a new color using the instance options\n * @protected\n * @param {String} val\n * @returns {Color}\n */\n createColor: function(val) {\n return new Color(\n val ? val : null,\n this.options.colorSelectors,\n this.options.fallbackColor ? this.options.fallbackColor : this.color,\n this.options.fallbackFormat\n );\n },\n getValue: function(defaultValue) {\n defaultValue = (typeof defaultValue === 'undefined') ? this.options.fallbackColor : defaultValue;\n var val;\n if (this.hasInput()) {\n val = this.input.val();\n } else {\n val = this.element.data('color');\n }\n if ((val === undefined) || (val === '') || (val === null)) {\n // if not defined or empty, return default\n val = defaultValue;\n }\n return val;\n },\n hasInput: function() {\n return (this.input !== false);\n },\n isDisabled: function() {\n if (this.hasInput()) {\n return (this.input.prop('disabled') === true);\n }\n return false;\n },\n disable: function() {\n if (this.hasInput()) {\n this.input.prop('disabled', true);\n this.element.trigger({\n type: 'disable',\n color: this.color,\n value: this.getValue()\n });\n return true;\n }\n return false;\n },\n enable: function() {\n if (this.hasInput()) {\n this.input.prop('disabled', false);\n this.element.trigger({\n type: 'enable',\n color: this.color,\n value: this.getValue()\n });\n return true;\n }\n return false;\n },\n currentSlider: null,\n mousePointer: {\n left: 0,\n top: 0\n },\n mousedown: function(e) {\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n e.stopPropagation();\n e.preventDefault();\n\n var target = $(e.target);\n\n //detect the slider and set the limits and callbacks\n var zone = target.closest('div');\n var sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;\n if (!zone.is('.colorpicker')) {\n if (zone.is('.colorpicker-saturation')) {\n this.currentSlider = $.extend({}, sl.saturation);\n } else if (zone.is('.colorpicker-hue')) {\n this.currentSlider = $.extend({}, sl.hue);\n } else if (zone.is('.colorpicker-alpha')) {\n this.currentSlider = $.extend({}, sl.alpha);\n } else {\n return false;\n }\n var offset = zone.offset();\n //reference to guide's style\n this.currentSlider.guide = zone.find('i')[0].style;\n this.currentSlider.left = e.pageX - offset.left;\n this.currentSlider.top = e.pageY - offset.top;\n this.mousePointer = {\n left: e.pageX,\n top: e.pageY\n };\n //trigger mousemove to move the guide to the current position\n $(window.document).on({\n 'mousemove.colorpicker': $.proxy(this.mousemove, this),\n 'touchmove.colorpicker': $.proxy(this.mousemove, this),\n 'mouseup.colorpicker': $.proxy(this.mouseup, this),\n 'touchend.colorpicker': $.proxy(this.mouseup, this)\n }).trigger('mousemove');\n }\n return false;\n },\n mousemove: function(e) {\n if (!e.pageX && !e.pageY && e.originalEvent && e.originalEvent.touches) {\n e.pageX = e.originalEvent.touches[0].pageX;\n e.pageY = e.originalEvent.touches[0].pageY;\n }\n e.stopPropagation();\n e.preventDefault();\n var left = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxLeft,\n this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)\n )\n );\n var top = Math.max(\n 0,\n Math.min(\n this.currentSlider.maxTop,\n this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)\n )\n );\n this.currentSlider.guide.left = left + 'px';\n this.currentSlider.guide.top = top + 'px';\n if (this.currentSlider.callLeft) {\n this.color[this.currentSlider.callLeft].call(this.color, left / this.currentSlider.maxLeft);\n }\n if (this.currentSlider.callTop) {\n this.color[this.currentSlider.callTop].call(this.color, top / this.currentSlider.maxTop);\n }\n // Change format dynamically\n // Only occurs if user choose the dynamic format by\n // setting option format to false\n if (\n this.options.format === false &&\n (this.currentSlider.callTop === 'setAlpha' ||\n this.currentSlider.callLeft === 'setAlpha')\n ) {\n\n // Converting from hex / rgb to rgba\n if (this.color.value.a !== 1) {\n this.format = 'rgba';\n this.color.origFormat = 'rgba';\n }\n\n // Converting from rgba to hex\n else {\n this.format = 'hex';\n this.color.origFormat = 'hex';\n }\n }\n this.update(true);\n\n this.element.trigger({\n type: 'changeColor',\n color: this.color\n });\n return false;\n },\n mouseup: function(e) {\n e.stopPropagation();\n e.preventDefault();\n $(window.document).off({\n 'mousemove.colorpicker': this.mousemove,\n 'touchmove.colorpicker': this.mousemove,\n 'mouseup.colorpicker': this.mouseup,\n 'touchend.colorpicker': this.mouseup\n });\n return false;\n },\n change: function(e) {\n this.keyup(e);\n },\n keyup: function(e) {\n if ((e.keyCode === 38)) {\n if (this.color.value.a < 1) {\n this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;\n }\n this.update(true);\n } else if ((e.keyCode === 40)) {\n if (this.color.value.a > 0) {\n this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;\n }\n this.update(true);\n } else {\n this.color = this.createColor(this.input.val());\n // Change format dynamically\n // Only occurs if user choose the dynamic format by\n // setting option format to false\n if (this.color.origFormat && this.options.format === false) {\n this.format = this.color.origFormat;\n }\n if (this.getValue(false) !== false) {\n this.updateData();\n this.updateComponent();\n this.updatePicker();\n }\n }\n this.element.trigger({\n type: 'changeColor',\n color: this.color,\n value: this.input.val()\n });\n }\n };\n\n $.colorpicker = Colorpicker;\n\n $.fn.colorpicker = function(option) {\n var apiArgs = Array.prototype.slice.call(arguments, 1),\n isSingleElement = (this.length === 1),\n returnValue = null;\n\n var $jq = this.each(function() {\n var $this = $(this),\n inst = $this.data('colorpicker'),\n options = ((typeof option === 'object') ? option : {});\n\n if (!inst) {\n inst = new Colorpicker(this, options);\n $this.data('colorpicker', inst);\n }\n\n if (typeof option === 'string') {\n if ($.isFunction(inst[option])) {\n returnValue = inst[option].apply(inst, apiArgs);\n } else { // its a property ?\n if (apiArgs.length) {\n // set property\n inst[option] = apiArgs[0];\n }\n returnValue = inst[option];\n }\n } else {\n returnValue = $this;\n }\n });\n return isSingleElement ? returnValue : $jq;\n };\n\n $.fn.colorpicker.constructor = Colorpicker;\n\n}));\n","/*!\n * Datepicker for Bootstrap v1.6.4 (https://github.com/eternicode/bootstrap-datepicker)\n *\n * Copyright 2012 Stefan Petre\n * Improvements by Andrew Rowls\n * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n */(function(factory){\n if (typeof define === \"function\" && define.amd) {\n define([\"jquery\"], factory);\n } else if (typeof exports === 'object') {\n factory(require('jquery'));\n } else {\n factory(jQuery);\n }\n}(function($, undefined){\n\n\tfunction UTCDate(){\n\t\treturn new Date(Date.UTC.apply(Date, arguments));\n\t}\n\tfunction UTCToday(){\n\t\tvar today = new Date();\n\t\treturn UTCDate(today.getFullYear(), today.getMonth(), today.getDate());\n\t}\n\tfunction isUTCEquals(date1, date2) {\n\t\treturn (\n\t\t\tdate1.getUTCFullYear() === date2.getUTCFullYear() &&\n\t\t\tdate1.getUTCMonth() === date2.getUTCMonth() &&\n\t\t\tdate1.getUTCDate() === date2.getUTCDate()\n\t\t);\n\t}\n\tfunction alias(method){\n\t\treturn function(){\n\t\t\treturn this[method].apply(this, arguments);\n\t\t};\n\t}\n\tfunction isValidDate(d) {\n\t\treturn d && !isNaN(d.getTime());\n\t}\n\n\tvar DateArray = (function(){\n\t\tvar extras = {\n\t\t\tget: function(i){\n\t\t\t\treturn this.slice(i)[0];\n\t\t\t},\n\t\t\tcontains: function(d){\n\t\t\t\t// Array.indexOf is not cross-browser;\n\t\t\t\t// $.inArray doesn't work with Dates\n\t\t\t\tvar val = d && d.valueOf();\n\t\t\t\tfor (var i=0, l=this.length; i < l; i++)\n\t\t\t\t\tif (this[i].valueOf() === val)\n\t\t\t\t\t\treturn i;\n\t\t\t\treturn -1;\n\t\t\t},\n\t\t\tremove: function(i){\n\t\t\t\tthis.splice(i,1);\n\t\t\t},\n\t\t\treplace: function(new_array){\n\t\t\t\tif (!new_array)\n\t\t\t\t\treturn;\n\t\t\t\tif (!$.isArray(new_array))\n\t\t\t\t\tnew_array = [new_array];\n\t\t\t\tthis.clear();\n\t\t\t\tthis.push.apply(this, new_array);\n\t\t\t},\n\t\t\tclear: function(){\n\t\t\t\tthis.length = 0;\n\t\t\t},\n\t\t\tcopy: function(){\n\t\t\t\tvar a = new DateArray();\n\t\t\t\ta.replace(this);\n\t\t\t\treturn a;\n\t\t\t}\n\t\t};\n\n\t\treturn function(){\n\t\t\tvar a = [];\n\t\t\ta.push.apply(a, arguments);\n\t\t\t$.extend(a, extras);\n\t\t\treturn a;\n\t\t};\n\t})();\n\n\n\t// Picker object\n\n\tvar Datepicker = function(element, options){\n\t\t$(element).data('datepicker', this);\n\t\tthis._process_options(options);\n\n\t\tthis.dates = new DateArray();\n\t\tthis.viewDate = this.o.defaultViewDate;\n\t\tthis.focusDate = null;\n\n\t\tthis.element = $(element);\n\t\tthis.isInput = this.element.is('input');\n\t\tthis.inputField = this.isInput ? this.element : this.element.find('input');\n\t\tthis.component = this.element.hasClass('date') ? this.element.find('.add-on, .input-group-addon, .btn') : false;\n\t\tthis.hasInput = this.component && this.inputField.length;\n\t\tif (this.component && this.component.length === 0)\n\t\t\tthis.component = false;\n\t\tthis.isInline = !this.component && this.element.is('div');\n\n\t\tthis.picker = $(DPGlobal.template);\n\n\t\t// Checking templates and inserting\n\t\tif (this._check_template(this.o.templates.leftArrow)) {\n\t\t\tthis.picker.find('.prev').html(this.o.templates.leftArrow);\n\t\t}\n\t\tif (this._check_template(this.o.templates.rightArrow)) {\n\t\t\tthis.picker.find('.next').html(this.o.templates.rightArrow);\n\t\t}\n\n\t\tthis._buildEvents();\n\t\tthis._attachEvents();\n\n\t\tif (this.isInline){\n\t\t\tthis.picker.addClass('datepicker-inline').appendTo(this.element);\n\t\t}\n\t\telse {\n\t\t\tthis.picker.addClass('datepicker-dropdown dropdown-menu');\n\t\t}\n\n\t\tif (this.o.rtl){\n\t\t\tthis.picker.addClass('datepicker-rtl');\n\t\t}\n\n\t\tthis.viewMode = this.o.startView;\n\n\t\tif (this.o.calendarWeeks)\n\t\t\tthis.picker.find('thead .datepicker-title, tfoot .today, tfoot .clear')\n\t\t\t\t\t\t.attr('colspan', function(i, val){\n\t\t\t\t\t\t\treturn parseInt(val) + 1;\n\t\t\t\t\t\t});\n\n\t\tthis._allow_update = false;\n\n\t\tthis.setStartDate(this._o.startDate);\n\t\tthis.setEndDate(this._o.endDate);\n\t\tthis.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled);\n\t\tthis.setDaysOfWeekHighlighted(this.o.daysOfWeekHighlighted);\n\t\tthis.setDatesDisabled(this.o.datesDisabled);\n\n\t\tthis.fillDow();\n\t\tthis.fillMonths();\n\n\t\tthis._allow_update = true;\n\n\t\tthis.update();\n\t\tthis.showMode();\n\n\t\tif (this.isInline){\n\t\t\tthis.show();\n\t\t}\n\t};\n\n\tDatepicker.prototype = {\n\t\tconstructor: Datepicker,\n\n\t\t_resolveViewName: function(view, default_value){\n\t\t\tif (view === 0 || view === 'days' || view === 'month') {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tif (view === 1 || view === 'months' || view === 'year') {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif (view === 2 || view === 'years' || view === 'decade') {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tif (view === 3 || view === 'decades' || view === 'century') {\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\tif (view === 4 || view === 'centuries' || view === 'millennium') {\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\treturn default_value === undefined ? false : default_value;\n\t\t},\n\n\t\t_check_template: function(tmp){\n\t\t\ttry {\n\t\t\t\t// If empty\n\t\t\t\tif (tmp === undefined || tmp === \"\") {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// If no html, everything ok\n\t\t\t\tif ((tmp.match(/[<>]/g) || []).length <= 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t// Checking if html is fine\n\t\t\t\tvar jDom = $(tmp);\n\t\t\t\treturn jDom.length > 0;\n\t\t\t}\n\t\t\tcatch (ex) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\n\t\t_process_options: function(opts){\n\t\t\t// Store raw options for reference\n\t\t\tthis._o = $.extend({}, this._o, opts);\n\t\t\t// Processed options\n\t\t\tvar o = this.o = $.extend({}, this._o);\n\n\t\t\t// Check if \"de-DE\" style date is available, if not language should\n\t\t\t// fallback to 2 letter code eg \"de\"\n\t\t\tvar lang = o.language;\n\t\t\tif (!dates[lang]){\n\t\t\t\tlang = lang.split('-')[0];\n\t\t\t\tif (!dates[lang])\n\t\t\t\t\tlang = defaults.language;\n\t\t\t}\n\t\t\to.language = lang;\n\n\t\t\t// Retrieve view index from any aliases\n\t\t\to.startView = this._resolveViewName(o.startView, 0);\n\t\t\to.minViewMode = this._resolveViewName(o.minViewMode, 0);\n\t\t\to.maxViewMode = this._resolveViewName(o.maxViewMode, 4);\n\n\t\t\t// Check that the start view is between min and max\n\t\t\to.startView = Math.min(o.startView, o.maxViewMode);\n\t\t\to.startView = Math.max(o.startView, o.minViewMode);\n\n\t\t\t// true, false, or Number > 0\n\t\t\tif (o.multidate !== true){\n\t\t\t\to.multidate = Number(o.multidate) || false;\n\t\t\t\tif (o.multidate !== false)\n\t\t\t\t\to.multidate = Math.max(0, o.multidate);\n\t\t\t}\n\t\t\to.multidateSeparator = String(o.multidateSeparator);\n\n\t\t\to.weekStart %= 7;\n\t\t\to.weekEnd = (o.weekStart + 6) % 7;\n\n\t\t\tvar format = DPGlobal.parseFormat(o.format);\n\t\t\tif (o.startDate !== -Infinity){\n\t\t\t\tif (!!o.startDate){\n\t\t\t\t\tif (o.startDate instanceof Date)\n\t\t\t\t\t\to.startDate = this._local_to_utc(this._zero_time(o.startDate));\n\t\t\t\t\telse\n\t\t\t\t\t\to.startDate = DPGlobal.parseDate(o.startDate, format, o.language, o.assumeNearbyYear);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\to.startDate = -Infinity;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (o.endDate !== Infinity){\n\t\t\t\tif (!!o.endDate){\n\t\t\t\t\tif (o.endDate instanceof Date)\n\t\t\t\t\t\to.endDate = this._local_to_utc(this._zero_time(o.endDate));\n\t\t\t\t\telse\n\t\t\t\t\t\to.endDate = DPGlobal.parseDate(o.endDate, format, o.language, o.assumeNearbyYear);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\to.endDate = Infinity;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\to.daysOfWeekDisabled = o.daysOfWeekDisabled||[];\n\t\t\tif (!$.isArray(o.daysOfWeekDisabled))\n\t\t\t\to.daysOfWeekDisabled = o.daysOfWeekDisabled.split(/[,\\s]*/);\n\t\t\to.daysOfWeekDisabled = $.map(o.daysOfWeekDisabled, function(d){\n\t\t\t\treturn parseInt(d, 10);\n\t\t\t});\n\n\t\t\to.daysOfWeekHighlighted = o.daysOfWeekHighlighted||[];\n\t\t\tif (!$.isArray(o.daysOfWeekHighlighted))\n\t\t\t\to.daysOfWeekHighlighted = o.daysOfWeekHighlighted.split(/[,\\s]*/);\n\t\t\to.daysOfWeekHighlighted = $.map(o.daysOfWeekHighlighted, function(d){\n\t\t\t\treturn parseInt(d, 10);\n\t\t\t});\n\n\t\t\to.datesDisabled = o.datesDisabled||[];\n\t\t\tif (!$.isArray(o.datesDisabled)) {\n\t\t\t\to.datesDisabled = [\n\t\t\t\t\to.datesDisabled\n\t\t\t\t];\n\t\t\t}\n\t\t\to.datesDisabled = $.map(o.datesDisabled,function(d){\n\t\t\t\treturn DPGlobal.parseDate(d, format, o.language, o.assumeNearbyYear);\n\t\t\t});\n\n\t\t\tvar plc = String(o.orientation).toLowerCase().split(/\\s+/g),\n\t\t\t\t_plc = o.orientation.toLowerCase();\n\t\t\tplc = $.grep(plc, function(word){\n\t\t\t\treturn /^auto|left|right|top|bottom$/.test(word);\n\t\t\t});\n\t\t\to.orientation = {x: 'auto', y: 'auto'};\n\t\t\tif (!_plc || _plc === 'auto')\n\t\t\t\t; // no action\n\t\t\telse if (plc.length === 1){\n\t\t\t\tswitch (plc[0]){\n\t\t\t\t\tcase 'top':\n\t\t\t\t\tcase 'bottom':\n\t\t\t\t\t\to.orientation.y = plc[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'left':\n\t\t\t\t\tcase 'right':\n\t\t\t\t\t\to.orientation.x = plc[0];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_plc = $.grep(plc, function(word){\n\t\t\t\t\treturn /^left|right$/.test(word);\n\t\t\t\t});\n\t\t\t\to.orientation.x = _plc[0] || 'auto';\n\n\t\t\t\t_plc = $.grep(plc, function(word){\n\t\t\t\t\treturn /^top|bottom$/.test(word);\n\t\t\t\t});\n\t\t\t\to.orientation.y = _plc[0] || 'auto';\n\t\t\t}\n\t\t\tif (o.defaultViewDate) {\n\t\t\t\tvar year = o.defaultViewDate.year || new Date().getFullYear();\n\t\t\t\tvar month = o.defaultViewDate.month || 0;\n\t\t\t\tvar day = o.defaultViewDate.day || 1;\n\t\t\t\to.defaultViewDate = UTCDate(year, month, day);\n\t\t\t} else {\n\t\t\t\to.defaultViewDate = UTCToday();\n\t\t\t}\n\t\t},\n\t\t_events: [],\n\t\t_secondaryEvents: [],\n\t\t_applyEvents: function(evs){\n\t\t\tfor (var i=0, el, ch, ev; i < evs.length; i++){\n\t\t\t\tel = evs[i][0];\n\t\t\t\tif (evs[i].length === 2){\n\t\t\t\t\tch = undefined;\n\t\t\t\t\tev = evs[i][1];\n\t\t\t\t}\n\t\t\t\telse if (evs[i].length === 3){\n\t\t\t\t\tch = evs[i][1];\n\t\t\t\t\tev = evs[i][2];\n\t\t\t\t}\n\t\t\t\tel.on(ev, ch);\n\t\t\t}\n\t\t},\n\t\t_unapplyEvents: function(evs){\n\t\t\tfor (var i=0, el, ev, ch; i < evs.length; i++){\n\t\t\t\tel = evs[i][0];\n\t\t\t\tif (evs[i].length === 2){\n\t\t\t\t\tch = undefined;\n\t\t\t\t\tev = evs[i][1];\n\t\t\t\t}\n\t\t\t\telse if (evs[i].length === 3){\n\t\t\t\t\tch = evs[i][1];\n\t\t\t\t\tev = evs[i][2];\n\t\t\t\t}\n\t\t\t\tel.off(ev, ch);\n\t\t\t}\n\t\t},\n\t\t_buildEvents: function(){\n var events = {\n keyup: $.proxy(function(e){\n if ($.inArray(e.keyCode, [27, 37, 39, 38, 40, 32, 13, 9]) === -1)\n this.update();\n }, this),\n keydown: $.proxy(this.keydown, this),\n paste: $.proxy(this.paste, this)\n };\n\n if (this.o.showOnFocus === true) {\n events.focus = $.proxy(this.show, this);\n }\n\n if (this.isInput) { // single input\n this._events = [\n [this.element, events]\n ];\n }\n else if (this.component && this.hasInput) { // component: input + button\n this._events = [\n // For components that are not readonly, allow keyboard nav\n [this.inputField, events],\n [this.component, {\n click: $.proxy(this.show, this)\n }]\n ];\n }\n\t\t\telse {\n\t\t\t\tthis._events = [\n\t\t\t\t\t[this.element, {\n\t\t\t\t\t\tclick: $.proxy(this.show, this),\n\t\t\t\t\t\tkeydown: $.proxy(this.keydown, this)\n\t\t\t\t\t}]\n\t\t\t\t];\n\t\t\t}\n\t\t\tthis._events.push(\n\t\t\t\t// Component: listen for blur on element descendants\n\t\t\t\t[this.element, '*', {\n\t\t\t\t\tblur: $.proxy(function(e){\n\t\t\t\t\t\tthis._focused_from = e.target;\n\t\t\t\t\t}, this)\n\t\t\t\t}],\n\t\t\t\t// Input: listen for blur on element\n\t\t\t\t[this.element, {\n\t\t\t\t\tblur: $.proxy(function(e){\n\t\t\t\t\t\tthis._focused_from = e.target;\n\t\t\t\t\t}, this)\n\t\t\t\t}]\n\t\t\t);\n\n\t\t\tif (this.o.immediateUpdates) {\n\t\t\t\t// Trigger input updates immediately on changed year/month\n\t\t\t\tthis._events.push([this.element, {\n\t\t\t\t\t'changeYear changeMonth': $.proxy(function(e){\n\t\t\t\t\t\tthis.update(e.date);\n\t\t\t\t\t}, this)\n\t\t\t\t}]);\n\t\t\t}\n\n\t\t\tthis._secondaryEvents = [\n\t\t\t\t[this.picker, {\n\t\t\t\t\tclick: $.proxy(this.click, this)\n\t\t\t\t}],\n\t\t\t\t[$(window), {\n\t\t\t\t\tresize: $.proxy(this.place, this)\n\t\t\t\t}],\n\t\t\t\t[$(document), {\n\t\t\t\t\tmousedown: $.proxy(function(e){\n\t\t\t\t\t\t// Clicked outside the datepicker, hide it\n\t\t\t\t\t\tif (!(\n\t\t\t\t\t\t\tthis.element.is(e.target) ||\n\t\t\t\t\t\t\tthis.element.find(e.target).length ||\n\t\t\t\t\t\t\tthis.picker.is(e.target) ||\n\t\t\t\t\t\t\tthis.picker.find(e.target).length ||\n\t\t\t\t\t\t\tthis.isInline\n\t\t\t\t\t\t)){\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, this)\n\t\t\t\t}]\n\t\t\t];\n\t\t},\n\t\t_attachEvents: function(){\n\t\t\tthis._detachEvents();\n\t\t\tthis._applyEvents(this._events);\n\t\t},\n\t\t_detachEvents: function(){\n\t\t\tthis._unapplyEvents(this._events);\n\t\t},\n\t\t_attachSecondaryEvents: function(){\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis._applyEvents(this._secondaryEvents);\n\t\t},\n\t\t_detachSecondaryEvents: function(){\n\t\t\tthis._unapplyEvents(this._secondaryEvents);\n\t\t},\n\t\t_trigger: function(event, altdate){\n\t\t\tvar date = altdate || this.dates.get(-1),\n\t\t\t\tlocal_date = this._utc_to_local(date);\n\n\t\t\tthis.element.trigger({\n\t\t\t\ttype: event,\n\t\t\t\tdate: local_date,\n\t\t\t\tdates: $.map(this.dates, this._utc_to_local),\n\t\t\t\tformat: $.proxy(function(ix, format){\n\t\t\t\t\tif (arguments.length === 0){\n\t\t\t\t\t\tix = this.dates.length - 1;\n\t\t\t\t\t\tformat = this.o.format;\n\t\t\t\t\t}\n\t\t\t\t\telse if (typeof ix === 'string'){\n\t\t\t\t\t\tformat = ix;\n\t\t\t\t\t\tix = this.dates.length - 1;\n\t\t\t\t\t}\n\t\t\t\t\tformat = format || this.o.format;\n\t\t\t\t\tvar date = this.dates.get(ix);\n\t\t\t\t\treturn DPGlobal.formatDate(date, format, this.o.language);\n\t\t\t\t}, this)\n\t\t\t});\n\t\t},\n\n\t\tshow: function(){\n\t\t\tif (this.inputField.prop('disabled') || (this.inputField.prop('readonly') && this.o.enableOnReadonly === false))\n\t\t\t\treturn;\n\t\t\tif (!this.isInline)\n\t\t\t\tthis.picker.appendTo(this.o.container);\n\t\t\tthis.place();\n\t\t\tthis.picker.show();\n\t\t\tthis._attachSecondaryEvents();\n\t\t\tthis._trigger('show');\n\t\t\tif ((window.navigator.msMaxTouchPoints || 'ontouchstart' in document) && this.o.disableTouchKeyboard) {\n\t\t\t\t$(this.element).blur();\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\thide: function(){\n\t\t\tif (this.isInline || !this.picker.is(':visible'))\n\t\t\t\treturn this;\n\t\t\tthis.focusDate = null;\n\t\t\tthis.picker.hide().detach();\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis.viewMode = this.o.startView;\n\t\t\tthis.showMode();\n\n\t\t\tif (this.o.forceParse && this.inputField.val())\n\t\t\t\tthis.setValue();\n\t\t\tthis._trigger('hide');\n\t\t\treturn this;\n\t\t},\n\n\t\tdestroy: function(){\n\t\t\tthis.hide();\n\t\t\tthis._detachEvents();\n\t\t\tthis._detachSecondaryEvents();\n\t\t\tthis.picker.remove();\n\t\t\tdelete this.element.data().datepicker;\n\t\t\tif (!this.isInput){\n\t\t\t\tdelete this.element.data().date;\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\tpaste: function(evt){\n\t\t\tvar dateString;\n\t\t\tif (evt.originalEvent.clipboardData && evt.originalEvent.clipboardData.types\n\t\t\t\t&& $.inArray('text/plain', evt.originalEvent.clipboardData.types) !== -1) {\n\t\t\t\tdateString = evt.originalEvent.clipboardData.getData('text/plain');\n\t\t\t}\n\t\t\telse if (window.clipboardData) {\n\t\t\t\tdateString = window.clipboardData.getData('Text');\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.setDate(dateString);\n\t\t\tthis.update();\n\t\t\tevt.preventDefault();\n\t\t},\n\n\t\t_utc_to_local: function(utc){\n\t\t\treturn utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));\n\t\t},\n\t\t_local_to_utc: function(local){\n\t\t\treturn local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));\n\t\t},\n\t\t_zero_time: function(local){\n\t\t\treturn local && new Date(local.getFullYear(), local.getMonth(), local.getDate());\n\t\t},\n\t\t_zero_utc_time: function(utc){\n\t\t\treturn utc && new Date(Date.UTC(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate()));\n\t\t},\n\n\t\tgetDates: function(){\n\t\t\treturn $.map(this.dates, this._utc_to_local);\n\t\t},\n\n\t\tgetUTCDates: function(){\n\t\t\treturn $.map(this.dates, function(d){\n\t\t\t\treturn new Date(d);\n\t\t\t});\n\t\t},\n\n\t\tgetDate: function(){\n\t\t\treturn this._utc_to_local(this.getUTCDate());\n\t\t},\n\n\t\tgetUTCDate: function(){\n\t\t\tvar selected_date = this.dates.get(-1);\n\t\t\tif (typeof selected_date !== 'undefined') {\n\t\t\t\treturn new Date(selected_date);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t},\n\n\t\tclearDates: function(){\n\t\t\tif (this.inputField) {\n\t\t\t\tthis.inputField.val('');\n\t\t\t}\n\n\t\t\tthis.update();\n\t\t\tthis._trigger('changeDate');\n\n\t\t\tif (this.o.autoclose) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t},\n\t\tsetDates: function(){\n\t\t\tvar args = $.isArray(arguments[0]) ? arguments[0] : arguments;\n\t\t\tthis.update.apply(this, args);\n\t\t\tthis._trigger('changeDate');\n\t\t\tthis.setValue();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetUTCDates: function(){\n\t\t\tvar args = $.isArray(arguments[0]) ? arguments[0] : arguments;\n\t\t\tthis.update.apply(this, $.map(args, this._utc_to_local));\n\t\t\tthis._trigger('changeDate');\n\t\t\tthis.setValue();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDate: alias('setDates'),\n\t\tsetUTCDate: alias('setUTCDates'),\n\t\tremove: alias('destroy'),\n\n\t\tsetValue: function(){\n\t\t\tvar formatted = this.getFormattedDate();\n\t\t\tthis.inputField.val(formatted);\n\t\t\treturn this;\n\t\t},\n\n\t\tgetFormattedDate: function(format){\n\t\t\tif (format === undefined)\n\t\t\t\tformat = this.o.format;\n\n\t\t\tvar lang = this.o.language;\n\t\t\treturn $.map(this.dates, function(d){\n\t\t\t\treturn DPGlobal.formatDate(d, format, lang);\n\t\t\t}).join(this.o.multidateSeparator);\n\t\t},\n\n\t\tgetStartDate: function(){\n\t\t\treturn this.o.startDate;\n\t\t},\n\n\t\tsetStartDate: function(startDate){\n\t\t\tthis._process_options({startDate: startDate});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tgetEndDate: function(){\n\t\t\treturn this.o.endDate;\n\t\t},\n\n\t\tsetEndDate: function(endDate){\n\t\t\tthis._process_options({endDate: endDate});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDaysOfWeekDisabled: function(daysOfWeekDisabled){\n\t\t\tthis._process_options({daysOfWeekDisabled: daysOfWeekDisabled});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDaysOfWeekHighlighted: function(daysOfWeekHighlighted){\n\t\t\tthis._process_options({daysOfWeekHighlighted: daysOfWeekHighlighted});\n\t\t\tthis.update();\n\t\t\treturn this;\n\t\t},\n\n\t\tsetDatesDisabled: function(datesDisabled){\n\t\t\tthis._process_options({datesDisabled: datesDisabled});\n\t\t\tthis.update();\n\t\t\tthis.updateNavArrows();\n\t\t},\n\n\t\tplace: function(){\n\t\t\tif (this.isInline)\n\t\t\t\treturn this;\n\t\t\tvar calendarWidth = this.picker.outerWidth(),\n\t\t\t\tcalendarHeight = this.picker.outerHeight(),\n\t\t\t\tvisualPadding = 10,\n\t\t\t\tcontainer = $(this.o.container),\n\t\t\t\twindowWidth = container.width(),\n\t\t\t\tscrollTop = this.o.container === 'body' ? $(document).scrollTop() : container.scrollTop(),\n\t\t\t\tappendOffset = container.offset();\n\n\t\t\tvar parentsZindex = [];\n\t\t\tthis.element.parents().each(function(){\n\t\t\t\tvar itemZIndex = $(this).css('z-index');\n\t\t\t\tif (itemZIndex !== 'auto' && itemZIndex !== 0) parentsZindex.push(parseInt(itemZIndex));\n\t\t\t});\n\t\t\tvar zIndex = Math.max.apply(Math, parentsZindex) + this.o.zIndexOffset;\n\t\t\tvar offset = this.component ? this.component.parent().offset() : this.element.offset();\n\t\t\tvar height = this.component ? this.component.outerHeight(true) : this.element.outerHeight(false);\n\t\t\tvar width = this.component ? this.component.outerWidth(true) : this.element.outerWidth(false);\n\t\t\tvar left = offset.left - appendOffset.left,\n\t\t\t\ttop = offset.top - appendOffset.top;\n\n\t\t\tif (this.o.container !== 'body') {\n\t\t\t\ttop += scrollTop;\n\t\t\t}\n\n\t\t\tthis.picker.removeClass(\n\t\t\t\t'datepicker-orient-top datepicker-orient-bottom '+\n\t\t\t\t'datepicker-orient-right datepicker-orient-left'\n\t\t\t);\n\n\t\t\tif (this.o.orientation.x !== 'auto'){\n\t\t\t\tthis.picker.addClass('datepicker-orient-' + this.o.orientation.x);\n\t\t\t\tif (this.o.orientation.x === 'right')\n\t\t\t\t\tleft -= calendarWidth - width;\n\t\t\t}\n\t\t\t// auto x orientation is best-placement: if it crosses a window\n\t\t\t// edge, fudge it sideways\n\t\t\telse {\n\t\t\t\tif (offset.left < 0) {\n\t\t\t\t\t// component is outside the window on the left side. Move it into visible range\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-left');\n\t\t\t\t\tleft -= offset.left - visualPadding;\n\t\t\t\t} else if (left + calendarWidth > windowWidth) {\n\t\t\t\t\t// the calendar passes the widow right edge. Align it to component right side\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-right');\n\t\t\t\t\tleft += width - calendarWidth;\n\t\t\t\t} else {\n\t\t\t\t\t// Default to left\n\t\t\t\t\tthis.picker.addClass('datepicker-orient-left');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// auto y orientation is best-situation: top or bottom, no fudging,\n\t\t\t// decision based on which shows more of the calendar\n\t\t\tvar yorient = this.o.orientation.y,\n\t\t\t\ttop_overflow;\n\t\t\tif (yorient === 'auto'){\n\t\t\t\ttop_overflow = -scrollTop + top - calendarHeight;\n\t\t\t\tyorient = top_overflow < 0 ? 'bottom' : 'top';\n\t\t\t}\n\n\t\t\tthis.picker.addClass('datepicker-orient-' + yorient);\n\t\t\tif (yorient === 'top')\n\t\t\t\ttop -= calendarHeight + parseInt(this.picker.css('padding-top'));\n\t\t\telse\n\t\t\t\ttop += height;\n\n\t\t\tif (this.o.rtl) {\n\t\t\t\tvar right = windowWidth - (left + width);\n\t\t\t\tthis.picker.css({\n\t\t\t\t\ttop: top,\n\t\t\t\t\tright: right,\n\t\t\t\t\tzIndex: zIndex\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.picker.css({\n\t\t\t\t\ttop: top,\n\t\t\t\t\tleft: left,\n\t\t\t\t\tzIndex: zIndex\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this;\n\t\t},\n\n\t\t_allow_update: true,\n\t\tupdate: function(){\n\t\t\tif (!this._allow_update)\n\t\t\t\treturn this;\n\n\t\t\tvar oldDates = this.dates.copy(),\n\t\t\t\tdates = [],\n\t\t\t\tfromArgs = false;\n\t\t\tif (arguments.length){\n\t\t\t\t$.each(arguments, $.proxy(function(i, date){\n\t\t\t\t\tif (date instanceof Date)\n\t\t\t\t\t\tdate = this._local_to_utc(date);\n\t\t\t\t\tdates.push(date);\n\t\t\t\t}, this));\n\t\t\t\tfromArgs = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdates = this.isInput\n\t\t\t\t\t\t? this.element.val()\n\t\t\t\t\t\t: this.element.data('date') || this.inputField.val();\n\t\t\t\tif (dates && this.o.multidate)\n\t\t\t\t\tdates = dates.split(this.o.multidateSeparator);\n\t\t\t\telse\n\t\t\t\t\tdates = [dates];\n\t\t\t\tdelete this.element.data().date;\n\t\t\t}\n\n\t\t\tdates = $.map(dates, $.proxy(function(date){\n\t\t\t\treturn DPGlobal.parseDate(date, this.o.format, this.o.language, this.o.assumeNearbyYear);\n\t\t\t}, this));\n\t\t\tdates = $.grep(dates, $.proxy(function(date){\n\t\t\t\treturn (\n\t\t\t\t\t!this.dateWithinRange(date) ||\n\t\t\t\t\t!date\n\t\t\t\t);\n\t\t\t}, this), true);\n\t\t\tthis.dates.replace(dates);\n\n\t\t\tif (this.dates.length)\n\t\t\t\tthis.viewDate = new Date(this.dates.get(-1));\n\t\t\telse if (this.viewDate < this.o.startDate)\n\t\t\t\tthis.viewDate = new Date(this.o.startDate);\n\t\t\telse if (this.viewDate > this.o.endDate)\n\t\t\t\tthis.viewDate = new Date(this.o.endDate);\n\t\t\telse\n\t\t\t\tthis.viewDate = this.o.defaultViewDate;\n\n\t\t\tif (fromArgs){\n\t\t\t\t// setting date by clicking\n\t\t\t\tthis.setValue();\n\t\t\t}\n\t\t\telse if (dates.length){\n\t\t\t\t// setting date by typing\n\t\t\t\tif (String(oldDates) !== String(this.dates))\n\t\t\t\t\tthis._trigger('changeDate');\n\t\t\t}\n\t\t\tif (!this.dates.length && oldDates.length)\n\t\t\t\tthis._trigger('clearDate');\n\n\t\t\tthis.fill();\n\t\t\tthis.element.change();\n\t\t\treturn this;\n\t\t},\n\n\t\tfillDow: function(){\n\t\t\tvar dowCnt = this.o.weekStart,\n\t\t\t\thtml = '<tr>';\n\t\t\tif (this.o.calendarWeeks){\n\t\t\t\tthis.picker.find('.datepicker-days .datepicker-switch')\n\t\t\t\t\t.attr('colspan', function(i, val){\n\t\t\t\t\t\treturn parseInt(val) + 1;\n\t\t\t\t\t});\n\t\t\t\thtml += '<th class=\"cw\">&#160;</th>';\n\t\t\t}\n\t\t\twhile (dowCnt < this.o.weekStart + 7){\n\t\t\t\thtml += '<th class=\"dow';\n if ($.inArray(dowCnt, this.o.daysOfWeekDisabled) > -1)\n html += ' disabled';\n html += '\">'+dates[this.o.language].daysMin[(dowCnt++)%7]+'</th>';\n\t\t\t}\n\t\t\thtml += '</tr>';\n\t\t\tthis.picker.find('.datepicker-days thead').append(html);\n\t\t},\n\n\t\tfillMonths: function(){\n var localDate = this._utc_to_local(this.viewDate);\n\t\t\tvar html = '',\n\t\t\ti = 0;\n\t\t\twhile (i < 12){\n var focused = localDate && localDate.getMonth() === i ? ' focused' : '';\n\t\t\t\thtml += '<span class=\"month' + focused + '\">' + dates[this.o.language].monthsShort[i++]+'</span>';\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-months td').html(html);\n\t\t},\n\n\t\tsetRange: function(range){\n\t\t\tif (!range || !range.length)\n\t\t\t\tdelete this.range;\n\t\t\telse\n\t\t\t\tthis.range = $.map(range, function(d){\n\t\t\t\t\treturn d.valueOf();\n\t\t\t\t});\n\t\t\tthis.fill();\n\t\t},\n\n\t\tgetClassNames: function(date){\n\t\t\tvar cls = [],\n\t\t\t\tyear = this.viewDate.getUTCFullYear(),\n\t\t\t\tmonth = this.viewDate.getUTCMonth(),\n\t\t\t\ttoday = new Date();\n\t\t\tif (date.getUTCFullYear() < year || (date.getUTCFullYear() === year && date.getUTCMonth() < month)){\n\t\t\t\tcls.push('old');\n\t\t\t}\n\t\t\telse if (date.getUTCFullYear() > year || (date.getUTCFullYear() === year && date.getUTCMonth() > month)){\n\t\t\t\tcls.push('new');\n\t\t\t}\n\t\t\tif (this.focusDate && date.valueOf() === this.focusDate.valueOf())\n\t\t\t\tcls.push('focused');\n\t\t\t// Compare internal UTC date with local today, not UTC today\n\t\t\tif (this.o.todayHighlight &&\n\t\t\t\tdate.getUTCFullYear() === today.getFullYear() &&\n\t\t\t\tdate.getUTCMonth() === today.getMonth() &&\n\t\t\t\tdate.getUTCDate() === today.getDate()){\n\t\t\t\tcls.push('today');\n\t\t\t}\n\t\t\tif (this.dates.contains(date) !== -1)\n\t\t\t\tcls.push('active');\n\t\t\tif (!this.dateWithinRange(date)){\n\t\t\t\tcls.push('disabled');\n\t\t\t}\n\t\t\tif (this.dateIsDisabled(date)){\n\t\t\t\tcls.push('disabled', 'disabled-date');\t\n\t\t\t} \n\t\t\tif ($.inArray(date.getUTCDay(), this.o.daysOfWeekHighlighted) !== -1){\n\t\t\t\tcls.push('highlighted');\n\t\t\t}\n\n\t\t\tif (this.range){\n\t\t\t\tif (date > this.range[0] && date < this.range[this.range.length-1]){\n\t\t\t\t\tcls.push('range');\n\t\t\t\t}\n\t\t\t\tif ($.inArray(date.valueOf(), this.range) !== -1){\n\t\t\t\t\tcls.push('selected');\n\t\t\t\t}\n\t\t\t\tif (date.valueOf() === this.range[0]){\n cls.push('range-start');\n }\n if (date.valueOf() === this.range[this.range.length-1]){\n cls.push('range-end');\n }\n\t\t\t}\n\t\t\treturn cls;\n\t\t},\n\n\t\t_fill_yearsView: function(selector, cssClass, factor, step, currentYear, startYear, endYear, callback){\n\t\t\tvar html, view, year, steps, startStep, endStep, thisYear, i, classes, tooltip, before;\n\n\t\t\thtml = '';\n\t\t\tview = this.picker.find(selector);\n\t\t\tyear = parseInt(currentYear / factor, 10) * factor;\n\t\t\tstartStep = parseInt(startYear / step, 10) * step;\n\t\t\tendStep = parseInt(endYear / step, 10) * step;\n\t\t\tsteps = $.map(this.dates, function(d){\n\t\t\t\treturn parseInt(d.getUTCFullYear() / step, 10) * step;\n\t\t\t});\n\n\t\t\tview.find('.datepicker-switch').text(year + '-' + (year + step * 9));\n\n\t\t\tthisYear = year - step;\n\t\t\tfor (i = -1; i < 11; i += 1) {\n\t\t\t\tclasses = [cssClass];\n\t\t\t\ttooltip = null;\n\n\t\t\t\tif (i === -1) {\n\t\t\t\t\tclasses.push('old');\n\t\t\t\t} else if (i === 10) {\n\t\t\t\t\tclasses.push('new');\n\t\t\t\t}\n\t\t\t\tif ($.inArray(thisYear, steps) !== -1) {\n\t\t\t\t\tclasses.push('active');\n\t\t\t\t}\n\t\t\t\tif (thisYear < startStep || thisYear > endStep) {\n\t\t\t\t\tclasses.push('disabled');\n\t\t\t\t}\n if (thisYear === this.viewDate.getFullYear()) {\n\t\t\t\t classes.push('focused');\n }\n\n\t\t\t\tif (callback !== $.noop) {\n\t\t\t\t\tbefore = callback(new Date(thisYear, 0, 1));\n\t\t\t\t\tif (before === undefined) {\n\t\t\t\t\t\tbefore = {};\n\t\t\t\t\t} else if (typeof(before) === 'boolean') {\n\t\t\t\t\t\tbefore = {enabled: before};\n\t\t\t\t\t} else if (typeof(before) === 'string') {\n\t\t\t\t\t\tbefore = {classes: before};\n\t\t\t\t\t}\n\t\t\t\t\tif (before.enabled === false) {\n\t\t\t\t\t\tclasses.push('disabled');\n\t\t\t\t\t}\n\t\t\t\t\tif (before.classes) {\n\t\t\t\t\t\tclasses = classes.concat(before.classes.split(/\\s+/));\n\t\t\t\t\t}\n\t\t\t\t\tif (before.tooltip) {\n\t\t\t\t\t\ttooltip = before.tooltip;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\thtml += '<span class=\"' + classes.join(' ') + '\"' + (tooltip ? ' title=\"' + tooltip + '\"' : '') + '>' + thisYear + '</span>';\n\t\t\t\tthisYear += step;\n\t\t\t}\n\t\t\tview.find('td').html(html);\n\t\t},\n\n\t\tfill: function(){\n\t\t\tvar d = new Date(this.viewDate),\n\t\t\t\tyear = d.getUTCFullYear(),\n\t\t\t\tmonth = d.getUTCMonth(),\n\t\t\t\tstartYear = this.o.startDate !== -Infinity ? this.o.startDate.getUTCFullYear() : -Infinity,\n\t\t\t\tstartMonth = this.o.startDate !== -Infinity ? this.o.startDate.getUTCMonth() : -Infinity,\n\t\t\t\tendYear = this.o.endDate !== Infinity ? this.o.endDate.getUTCFullYear() : Infinity,\n\t\t\t\tendMonth = this.o.endDate !== Infinity ? this.o.endDate.getUTCMonth() : Infinity,\n\t\t\t\ttodaytxt = dates[this.o.language].today || dates['en'].today || '',\n\t\t\t\tcleartxt = dates[this.o.language].clear || dates['en'].clear || '',\n\t\t\t\ttitleFormat = dates[this.o.language].titleFormat || dates['en'].titleFormat,\n\t\t\t\ttooltip,\n\t\t\t\tbefore;\n\t\t\tif (isNaN(year) || isNaN(month))\n\t\t\t\treturn;\n\t\t\tthis.picker.find('.datepicker-days .datepicker-switch')\n\t\t\t\t\t\t.text(DPGlobal.formatDate(d, titleFormat, this.o.language));\n\t\t\tthis.picker.find('tfoot .today')\n\t\t\t\t\t\t.text(todaytxt)\n\t\t\t\t\t\t.toggle(this.o.todayBtn !== false);\n\t\t\tthis.picker.find('tfoot .clear')\n\t\t\t\t\t\t.text(cleartxt)\n\t\t\t\t\t\t.toggle(this.o.clearBtn !== false);\n\t\t\tthis.picker.find('thead .datepicker-title')\n\t\t\t\t\t\t.text(this.o.title)\n\t\t\t\t\t\t.toggle(this.o.title !== '');\n\t\t\tthis.updateNavArrows();\n\t\t\tthis.fillMonths();\n\t\t\tvar prevMonth = UTCDate(year, month-1, 28),\n\t\t\t\tday = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth());\n\t\t\tprevMonth.setUTCDate(day);\n\t\t\tprevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.o.weekStart + 7)%7);\n\t\t\tvar nextMonth = new Date(prevMonth);\n\t\t\tif (prevMonth.getUTCFullYear() < 100){\n nextMonth.setUTCFullYear(prevMonth.getUTCFullYear());\n }\n\t\t\tnextMonth.setUTCDate(nextMonth.getUTCDate() + 42);\n\t\t\tnextMonth = nextMonth.valueOf();\n\t\t\tvar html = [];\n\t\t\tvar clsName;\n\t\t\twhile (prevMonth.valueOf() < nextMonth){\n\t\t\t\tif (prevMonth.getUTCDay() === this.o.weekStart){\n\t\t\t\t\thtml.push('<tr>');\n\t\t\t\t\tif (this.o.calendarWeeks){\n\t\t\t\t\t\t// ISO 8601: First week contains first thursday.\n\t\t\t\t\t\t// ISO also states week starts on Monday, but we can be more abstract here.\n\t\t\t\t\t\tvar\n\t\t\t\t\t\t\t// Start of current week: based on weekstart/current date\n\t\t\t\t\t\t\tws = new Date(+prevMonth + (this.o.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5),\n\t\t\t\t\t\t\t// Thursday of this week\n\t\t\t\t\t\t\tth = new Date(Number(ws) + (7 + 4 - ws.getUTCDay()) % 7 * 864e5),\n\t\t\t\t\t\t\t// First Thursday of year, year from thursday\n\t\t\t\t\t\t\tyth = new Date(Number(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5),\n\t\t\t\t\t\t\t// Calendar week: ms between thursdays, div ms per day, div 7 days\n\t\t\t\t\t\t\tcalWeek = (th - yth) / 864e5 / 7 + 1;\n\t\t\t\t\t\thtml.push('<td class=\"cw\">'+ calWeek +'</td>');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclsName = this.getClassNames(prevMonth);\n\t\t\t\tclsName.push('day');\n\n\t\t\t\tif (this.o.beforeShowDay !== $.noop){\n\t\t\t\t\tbefore = this.o.beforeShowDay(this._utc_to_local(prevMonth));\n\t\t\t\t\tif (before === undefined)\n\t\t\t\t\t\tbefore = {};\n\t\t\t\t\telse if (typeof(before) === 'boolean')\n\t\t\t\t\t\tbefore = {enabled: before};\n\t\t\t\t\telse if (typeof(before) === 'string')\n\t\t\t\t\t\tbefore = {classes: before};\n\t\t\t\t\tif (before.enabled === false)\n\t\t\t\t\t\tclsName.push('disabled');\n\t\t\t\t\tif (before.classes)\n\t\t\t\t\t\tclsName = clsName.concat(before.classes.split(/\\s+/));\n\t\t\t\t\tif (before.tooltip)\n\t\t\t\t\t\ttooltip = before.tooltip;\n\t\t\t\t}\n\n\t\t\t\t//Check if uniqueSort exists (supported by jquery >=1.12 and >=2.2)\n\t\t\t\t//Fallback to unique function for older jquery versions\n\t\t\t\tif ($.isFunction($.uniqueSort)) {\n\t\t\t\t\tclsName = $.uniqueSort(clsName);\n\t\t\t\t} else {\n\t\t\t\t\tclsName = $.unique(clsName);\n\t\t\t\t}\n\n\t\t\t\thtml.push('<td class=\"'+clsName.join(' ')+'\"' + (tooltip ? ' title=\"'+tooltip+'\"' : '') + '>'+prevMonth.getUTCDate() + '</td>');\n\t\t\t\ttooltip = null;\n\t\t\t\tif (prevMonth.getUTCDay() === this.o.weekEnd){\n\t\t\t\t\thtml.push('</tr>');\n\t\t\t\t}\n\t\t\t\tprevMonth.setUTCDate(prevMonth.getUTCDate()+1);\n\t\t\t}\n\t\t\tthis.picker.find('.datepicker-days tbody').empty().append(html.join(''));\n\n\t\t\tvar monthsTitle = dates[this.o.language].monthsTitle || dates['en'].monthsTitle || 'Months';\n\t\t\tvar months = this.picker.find('.datepicker-months')\n\t\t\t\t\t\t.find('.datepicker-switch')\n\t\t\t\t\t\t\t.text(this.o.maxViewMode < 2 ? monthsTitle : year)\n\t\t\t\t\t\t\t.end()\n\t\t\t\t\t\t.find('span').removeClass('active');\n\n\t\t\t$.each(this.dates, function(i, d){\n\t\t\t\tif (d.getUTCFullYear() === year)\n\t\t\t\t\tmonths.eq(d.getUTCMonth()).addClass('active');\n\t\t\t});\n\n\t\t\tif (year < startYear || year > endYear){\n\t\t\t\tmonths.addClass('disabled');\n\t\t\t}\n\t\t\tif (year === startYear){\n\t\t\t\tmonths.slice(0, startMonth).addClass('disabled');\n\t\t\t}\n\t\t\tif (year === endYear){\n\t\t\t\tmonths.slice(endMonth+1).addClass('disabled');\n\t\t\t}\n\n\t\t\tif (this.o.beforeShowMonth !== $.noop){\n\t\t\t\tvar that = this;\n\t\t\t\t$.each(months, function(i, month){\n var moDate = new Date(year, i, 1);\n var before = that.o.beforeShowMonth(moDate);\n\t\t\t\t\tif (before === undefined)\n\t\t\t\t\t\tbefore = {};\n\t\t\t\t\telse if (typeof(before) === 'boolean')\n\t\t\t\t\t\tbefore = {enabled: before};\n\t\t\t\t\telse if (typeof(before) === 'string')\n\t\t\t\t\t\tbefore = {classes: before};\n\t\t\t\t\tif (before.enabled === false && !$(month).hasClass('disabled'))\n\t\t\t\t\t $(month).addClass('disabled');\n\t\t\t\t\tif (before.classes)\n\t\t\t\t\t $(month).addClass(before.classes);\n\t\t\t\t\tif (before.tooltip)\n\t\t\t\t\t $(month).prop('title', before.tooltip);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Generating decade/years picker\n\t\t\tthis._fill_yearsView(\n\t\t\t\t'.datepicker-years',\n\t\t\t\t'year',\n\t\t\t\t10,\n\t\t\t\t1,\n\t\t\t\tyear,\n\t\t\t\tstartYear,\n\t\t\t\tendYear,\n\t\t\t\tthis.o.beforeShowYear\n\t\t\t);\n\n\t\t\t// Generating century/decades picker\n\t\t\tthis._fill_yearsView(\n\t\t\t\t'.datepicker-decades',\n\t\t\t\t'decade',\n\t\t\t\t100,\n\t\t\t\t10,\n\t\t\t\tyear,\n\t\t\t\tstartYear,\n\t\t\t\tendYear,\n\t\t\t\tthis.o.beforeShowDecade\n\t\t\t);\n\n\t\t\t// Generating millennium/centuries picker\n\t\t\tthis._fill_yearsView(\n\t\t\t\t'.datepicker-centuries',\n\t\t\t\t'century',\n\t\t\t\t1000,\n\t\t\t\t100,\n\t\t\t\tyear,\n\t\t\t\tstartYear,\n\t\t\t\tendYear,\n\t\t\t\tthis.o.beforeShowCentury\n\t\t\t);\n\t\t},\n\n\t\tupdateNavArrows: function(){\n\t\t\tif (!this._allow_update)\n\t\t\t\treturn;\n\n\t\t\tvar d = new Date(this.viewDate),\n\t\t\t\tyear = d.getUTCFullYear(),\n\t\t\t\tmonth = d.getUTCMonth();\n\t\t\tswitch (this.viewMode){\n\t\t\t\tcase 0:\n\t\t\t\t\tif (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() && month <= this.o.startDate.getUTCMonth()){\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tif (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() && month >= this.o.endDate.getUTCMonth()){\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\tcase 4:\n\t\t\t\t\tif (this.o.startDate !== -Infinity && year <= this.o.startDate.getUTCFullYear() || this.o.maxViewMode < 2){\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.prev').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tif (this.o.endDate !== Infinity && year >= this.o.endDate.getUTCFullYear() || this.o.maxViewMode < 2){\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'hidden'});\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.picker.find('.next').css({visibility: 'visible'});\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\n\t\tclick: function(e){\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tvar target, dir, day, year, month, monthChanged, yearChanged;\n\t\t\ttarget = $(e.target);\n\n\t\t\t// Clicked on the switch\n\t\t\tif (target.hasClass('datepicker-switch')){\n\t\t\t\tthis.showMode(1);\n\t\t\t}\n\n\t\t\t// Clicked on prev or next\n\t\t\tvar navArrow = target.closest('.prev, .next');\n\t\t\tif (navArrow.length > 0) {\n\t\t\t\tdir = DPGlobal.modes[this.viewMode].navStep * (navArrow.hasClass('prev') ? -1 : 1);\n\t\t\t\tif (this.viewMode === 0){\n\t\t\t\t\tthis.viewDate = this.moveMonth(this.viewDate, dir);\n\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t} else {\n\t\t\t\t\tthis.viewDate = this.moveYear(this.viewDate, dir);\n\t\t\t\t\tif (this.viewMode === 1){\n\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.fill();\n\t\t\t}\n\n\t\t\t// Clicked on today button\n\t\t\tif (target.hasClass('today') && !target.hasClass('day')){\n\t\t\t\tthis.showMode(-2);\n\t\t\t\tthis._setDate(UTCToday(), this.o.todayBtn === 'linked' ? null : 'view');\n\t\t\t}\n\n\t\t\t// Clicked on clear button\n\t\t\tif (target.hasClass('clear')){\n\t\t\t\tthis.clearDates();\n\t\t\t}\n\n\t\t\tif (!target.hasClass('disabled')){\n\t\t\t\t// Clicked on a day\n\t\t\t\tif (target.hasClass('day')){\n\t\t\t\t\tday = parseInt(target.text(), 10) || 1;\n\t\t\t\t\tyear = this.viewDate.getUTCFullYear();\n\t\t\t\t\tmonth = this.viewDate.getUTCMonth();\n\n\t\t\t\t\t// From last month\n\t\t\t\t\tif (target.hasClass('old')){\n\t\t\t\t\t\tif (month === 0) {\n\t\t\t\t\t\t\tmonth = 11;\n\t\t\t\t\t\t\tyear = year - 1;\n\t\t\t\t\t\t\tmonthChanged = true;\n\t\t\t\t\t\t\tyearChanged = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmonth = month - 1;\n\t\t\t\t\t\t\tmonthChanged = true;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n\n\t\t\t\t\t// From next month\n\t\t\t\t\tif (target.hasClass('new')) {\n\t\t\t\t\t\tif (month === 11){\n\t\t\t\t\t\t\tmonth = 0;\n\t\t\t\t\t\t\tyear = year + 1;\n\t\t\t\t\t\t\tmonthChanged = true;\n\t\t\t\t\t\t\tyearChanged = true;\n \t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmonth = month + 1;\n\t\t\t\t\t\t\tmonthChanged = true;\n \t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\tif (yearChanged) {\n\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t\tif (monthChanged) {\n\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Clicked on a month\n\t\t\t\tif (target.hasClass('month')) {\n\t\t\t\t\tthis.viewDate.setUTCDate(1);\n\t\t\t\t\tday = 1;\n\t\t\t\t\tmonth = target.parent().find('span').index(target);\n\t\t\t\t\tyear = this.viewDate.getUTCFullYear();\n\t\t\t\t\tthis.viewDate.setUTCMonth(month);\n\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n\t\t\t\t\tif (this.o.minViewMode === 1){\n\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\tthis.showMode();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.showMode(-1);\n\t\t\t\t\t}\n\t\t\t\t\tthis.fill();\n\t\t\t\t}\n\n\t\t\t\t// Clicked on a year\n\t\t\t\tif (target.hasClass('year')\n\t\t\t\t\t\t|| target.hasClass('decade')\n\t\t\t\t\t\t|| target.hasClass('century')) {\n\t\t\t\t\tthis.viewDate.setUTCDate(1);\n\n\t\t\t\t\tday = 1;\n\t\t\t\t\tmonth = 0;\n\t\t\t\t\tyear = parseInt(target.text(), 10)||0;\n\t\t\t\t\tthis.viewDate.setUTCFullYear(year);\n\n\t\t\t\t\tif (target.hasClass('year')){\n\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n\t\t\t\t\t\tif (this.o.minViewMode === 2){\n\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (target.hasClass('decade')){\n\t\t\t\t\t\tthis._trigger('changeDecade', this.viewDate);\n\t\t\t\t\t\tif (this.o.minViewMode === 3){\n\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (target.hasClass('century')){\n\t\t\t\t\t\tthis._trigger('changeCentury', this.viewDate);\n\t\t\t\t\t\tif (this.o.minViewMode === 4){\n\t\t\t\t\t\t\tthis._setDate(UTCDate(year, month, day));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.showMode(-1);\n\t\t\t\t\tthis.fill();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.picker.is(':visible') && this._focused_from){\n\t\t\t\t$(this._focused_from).focus();\n\t\t\t}\n\t\t\tdelete this._focused_from;\n\t\t},\n\n\t\t_toggle_multidate: function(date){\n\t\t\tvar ix = this.dates.contains(date);\n\t\t\tif (!date){\n\t\t\t\tthis.dates.clear();\n\t\t\t}\n\n\t\t\tif (ix !== -1){\n\t\t\t\tif (this.o.multidate === true || this.o.multidate > 1 || this.o.toggleActive){\n\t\t\t\t\tthis.dates.remove(ix);\n\t\t\t\t}\n\t\t\t} else if (this.o.multidate === false) {\n\t\t\t\tthis.dates.clear();\n\t\t\t\tthis.dates.push(date);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis.dates.push(date);\n\t\t\t}\n\n\t\t\tif (typeof this.o.multidate === 'number')\n\t\t\t\twhile (this.dates.length > this.o.multidate)\n\t\t\t\t\tthis.dates.remove(0);\n\t\t},\n\n\t\t_setDate: function(date, which){\n\t\t\tif (!which || which === 'date')\n\t\t\t\tthis._toggle_multidate(date && new Date(date));\n\t\t\tif (!which || which === 'view')\n\t\t\t\tthis.viewDate = date && new Date(date);\n\n\t\t\tthis.fill();\n\t\t\tthis.setValue();\n\t\t\tif (!which || which !== 'view') {\n\t\t\t\tthis._trigger('changeDate');\n\t\t\t}\n\t\t\tif (this.inputField){\n\t\t\t\tthis.inputField.change();\n\t\t\t}\n\t\t\tif (this.o.autoclose && (!which || which === 'date')){\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t},\n\n\t\tmoveDay: function(date, dir){\n\t\t\tvar newDate = new Date(date);\n\t\t\tnewDate.setUTCDate(date.getUTCDate() + dir);\n\n\t\t\treturn newDate;\n\t\t},\n\n\t\tmoveWeek: function(date, dir){\n\t\t\treturn this.moveDay(date, dir * 7);\n\t\t},\n\n\t\tmoveMonth: function(date, dir){\n\t\t\tif (!isValidDate(date))\n\t\t\t\treturn this.o.defaultViewDate;\n\t\t\tif (!dir)\n\t\t\t\treturn date;\n\t\t\tvar new_date = new Date(date.valueOf()),\n\t\t\t\tday = new_date.getUTCDate(),\n\t\t\t\tmonth = new_date.getUTCMonth(),\n\t\t\t\tmag = Math.abs(dir),\n\t\t\t\tnew_month, test;\n\t\t\tdir = dir > 0 ? 1 : -1;\n\t\t\tif (mag === 1){\n\t\t\t\ttest = dir === -1\n\t\t\t\t\t// If going back one month, make sure month is not current month\n\t\t\t\t\t// (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)\n\t\t\t\t\t? function(){\n\t\t\t\t\t\treturn new_date.getUTCMonth() === month;\n\t\t\t\t\t}\n\t\t\t\t\t// If going forward one month, make sure month is as expected\n\t\t\t\t\t// (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)\n\t\t\t\t\t: function(){\n\t\t\t\t\t\treturn new_date.getUTCMonth() !== new_month;\n\t\t\t\t\t};\n\t\t\t\tnew_month = month + dir;\n\t\t\t\tnew_date.setUTCMonth(new_month);\n\t\t\t\t// Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11\n\t\t\t\tif (new_month < 0 || new_month > 11)\n\t\t\t\t\tnew_month = (new_month + 12) % 12;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// For magnitudes >1, move one month at a time...\n\t\t\t\tfor (var i=0; i < mag; i++)\n\t\t\t\t\t// ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...\n\t\t\t\t\tnew_date = this.moveMonth(new_date, dir);\n\t\t\t\t// ...then reset the day, keeping it in the new month\n\t\t\t\tnew_month = new_date.getUTCMonth();\n\t\t\t\tnew_date.setUTCDate(day);\n\t\t\t\ttest = function(){\n\t\t\t\t\treturn new_month !== new_date.getUTCMonth();\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Common date-resetting loop -- if date is beyond end of month, make it\n\t\t\t// end of month\n\t\t\twhile (test()){\n\t\t\t\tnew_date.setUTCDate(--day);\n\t\t\t\tnew_date.setUTCMonth(new_month);\n\t\t\t}\n\t\t\treturn new_date;\n\t\t},\n\n\t\tmoveYear: function(date, dir){\n\t\t\treturn this.moveMonth(date, dir*12);\n\t\t},\n\n\t\tmoveAvailableDate: function(date, dir, fn){\n\t\t\tdo {\n\t\t\t\tdate = this[fn](date, dir);\n\n\t\t\t\tif (!this.dateWithinRange(date))\n\t\t\t\t\treturn false;\n\n\t\t\t\tfn = 'moveDay';\n\t\t\t}\n\t\t\twhile (this.dateIsDisabled(date));\n\n\t\t\treturn date;\n\t\t},\n\n\t\tweekOfDateIsDisabled: function(date){\n\t\t\treturn $.inArray(date.getUTCDay(), this.o.daysOfWeekDisabled) !== -1;\n\t\t},\n\n\t\tdateIsDisabled: function(date){\n\t\t\treturn (\n\t\t\t\tthis.weekOfDateIsDisabled(date) ||\n\t\t\t\t$.grep(this.o.datesDisabled, function(d){\n\t\t\t\t\treturn isUTCEquals(date, d);\n\t\t\t\t}).length > 0\n\t\t\t);\n\t\t},\n\n\t\tdateWithinRange: function(date){\n\t\t\treturn date >= this.o.startDate && date <= this.o.endDate;\n\t\t},\n\n\t\tkeydown: function(e){\n\t\t\tif (!this.picker.is(':visible')){\n\t\t\t\tif (e.keyCode === 40 || e.keyCode === 27) { // allow down to re-show picker\n\t\t\t\t\tthis.show();\n\t\t\t\t\te.stopPropagation();\n }\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar dateChanged = false,\n\t\t\t\tdir, newViewDate,\n\t\t\t\tfocusDate = this.focusDate || this.viewDate;\n\t\t\tswitch (e.keyCode){\n\t\t\t\tcase 27: // escape\n\t\t\t\t\tif (this.focusDate){\n\t\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthis.hide();\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.stopPropagation();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 37: // left\n\t\t\t\tcase 38: // up\n\t\t\t\tcase 39: // right\n\t\t\t\tcase 40: // down\n\t\t\t\t\tif (!this.o.keyboardNavigation || this.o.daysOfWeekDisabled.length === 7)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdir = e.keyCode === 37 || e.keyCode === 38 ? -1 : 1;\n if (this.viewMode === 0) {\n \t\t\t\t\tif (e.ctrlKey){\n \t\t\t\t\t\tnewViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear');\n\n \t\t\t\t\t\tif (newViewDate)\n \t\t\t\t\t\t\tthis._trigger('changeYear', this.viewDate);\n \t\t\t\t\t}\n \t\t\t\t\telse if (e.shiftKey){\n \t\t\t\t\t\tnewViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth');\n\n \t\t\t\t\t\tif (newViewDate)\n \t\t\t\t\t\t\tthis._trigger('changeMonth', this.viewDate);\n \t\t\t\t\t}\n \t\t\t\t\telse if (e.keyCode === 37 || e.keyCode === 39){\n \t\t\t\t\t\tnewViewDate = this.moveAvailableDate(focusDate, dir, 'moveDay');\n \t\t\t\t\t}\n \t\t\t\t\telse if (!this.weekOfDateIsDisabled(focusDate)){\n \t\t\t\t\t\tnewViewDate = this.moveAvailableDate(focusDate, dir, 'moveWeek');\n \t\t\t\t\t}\n } else if (this.viewMode === 1) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n dir = dir * 4;\n }\n newViewDate = this.moveAvailableDate(focusDate, dir, 'moveMonth');\n } else if (this.viewMode === 2) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n dir = dir * 4;\n }\n newViewDate = this.moveAvailableDate(focusDate, dir, 'moveYear');\n }\n\t\t\t\t\tif (newViewDate){\n\t\t\t\t\t\tthis.focusDate = this.viewDate = newViewDate;\n\t\t\t\t\t\tthis.setValue();\n\t\t\t\t\t\tthis.fill();\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13: // enter\n\t\t\t\t\tif (!this.o.forceParse)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tfocusDate = this.focusDate || this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tif (this.o.keyboardNavigation) {\n\t\t\t\t\t\tthis._toggle_multidate(focusDate);\n\t\t\t\t\t\tdateChanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tthis.setValue();\n\t\t\t\t\tthis.fill();\n\t\t\t\t\tif (this.picker.is(':visible')){\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tif (this.o.autoclose)\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 9: // tab\n\t\t\t\t\tthis.focusDate = null;\n\t\t\t\t\tthis.viewDate = this.dates.get(-1) || this.viewDate;\n\t\t\t\t\tthis.fill();\n\t\t\t\t\tthis.hide();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (dateChanged){\n\t\t\t\tif (this.dates.length)\n\t\t\t\t\tthis._trigger('changeDate');\n\t\t\t\telse\n\t\t\t\t\tthis._trigger('clearDate');\n\t\t\t\tif (this.inputField){\n\t\t\t\t\tthis.inputField.change();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tshowMode: function(dir){\n\t\t\tif (dir){\n\t\t\t\tthis.viewMode = Math.max(this.o.minViewMode, Math.min(this.o.maxViewMode, this.viewMode + dir));\n\t\t\t}\n\t\t\tthis.picker\n\t\t\t\t.children('div')\n\t\t\t\t.hide()\n\t\t\t\t.filter('.datepicker-' + DPGlobal.modes[this.viewMode].clsName)\n\t\t\t\t\t.show();\n\t\t\tthis.updateNavArrows();\n\t\t}\n\t};\n\n\tvar DateRangePicker = function(element, options){\n\t\t$(element).data('datepicker', this);\n\t\tthis.element = $(element);\n\t\tthis.inputs = $.map(options.inputs, function(i){\n\t\t\treturn i.jquery ? i[0] : i;\n\t\t});\n\t\tdelete options.inputs;\n\n\t\tdatepickerPlugin.call($(this.inputs), options)\n\t\t\t.on('changeDate', $.proxy(this.dateUpdated, this));\n\n\t\tthis.pickers = $.map(this.inputs, function(i){\n\t\t\treturn $(i).data('datepicker');\n\t\t});\n\t\tthis.updateDates();\n\t};\n\tDateRangePicker.prototype = {\n\t\tupdateDates: function(){\n\t\t\tthis.dates = $.map(this.pickers, function(i){\n\t\t\t\treturn i.getUTCDate();\n\t\t\t});\n\t\t\tthis.updateRanges();\n\t\t},\n\t\tupdateRanges: function(){\n\t\t\tvar range = $.map(this.dates, function(d){\n\t\t\t\treturn d.valueOf();\n\t\t\t});\n\t\t\t$.each(this.pickers, function(i, p){\n\t\t\t\tp.setRange(range);\n\t\t\t});\n\t\t},\n\t\tdateUpdated: function(e){\n\t\t\t// `this.updating` is a workaround for preventing infinite recursion\n\t\t\t// between `changeDate` triggering and `setUTCDate` calling. Until\n\t\t\t// there is a better mechanism.\n\t\t\tif (this.updating)\n\t\t\t\treturn;\n\t\t\tthis.updating = true;\n\n\t\t\tvar dp = $(e.target).data('datepicker');\n\n\t\t\tif (typeof(dp) === \"undefined\") {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar new_date = dp.getUTCDate(),\n\t\t\t\ti = $.inArray(e.target, this.inputs),\n\t\t\t\tj = i - 1,\n\t\t\t\tk = i + 1,\n\t\t\t\tl = this.inputs.length;\n\t\t\tif (i === -1)\n\t\t\t\treturn;\n\n\t\t\t$.each(this.pickers, function(i, p){\n\t\t\t\tif (!p.getUTCDate())\n\t\t\t\t\tp.setUTCDate(new_date);\n\t\t\t});\n\n\t\t\tif (new_date < this.dates[j]){\n\t\t\t\t// Date being moved earlier/left\n\t\t\t\twhile (j >= 0 && new_date < this.dates[j]){\n\t\t\t\t\tthis.pickers[j--].setUTCDate(new_date);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (new_date > this.dates[k]){\n\t\t\t\t// Date being moved later/right\n\t\t\t\twhile (k < l && new_date > this.dates[k]){\n\t\t\t\t\tthis.pickers[k++].setUTCDate(new_date);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.updateDates();\n\n\t\t\tdelete this.updating;\n\t\t},\n\t\tremove: function(){\n\t\t\t$.map(this.pickers, function(p){ p.remove(); });\n\t\t\tdelete this.element.data().datepicker;\n\t\t}\n\t};\n\n\tfunction opts_from_el(el, prefix){\n\t\t// Derive options from element data-attrs\n\t\tvar data = $(el).data(),\n\t\t\tout = {}, inkey,\n\t\t\treplace = new RegExp('^' + prefix.toLowerCase() + '([A-Z])');\n\t\tprefix = new RegExp('^' + prefix.toLowerCase());\n\t\tfunction re_lower(_,a){\n\t\t\treturn a.toLowerCase();\n\t\t}\n\t\tfor (var key in data)\n\t\t\tif (prefix.test(key)){\n\t\t\t\tinkey = key.replace(replace, re_lower);\n\t\t\t\tout[inkey] = data[key];\n\t\t\t}\n\t\treturn out;\n\t}\n\n\tfunction opts_from_locale(lang){\n\t\t// Derive options from locale plugins\n\t\tvar out = {};\n\t\t// Check if \"de-DE\" style date is available, if not language should\n\t\t// fallback to 2 letter code eg \"de\"\n\t\tif (!dates[lang]){\n\t\t\tlang = lang.split('-')[0];\n\t\t\tif (!dates[lang])\n\t\t\t\treturn;\n\t\t}\n\t\tvar d = dates[lang];\n\t\t$.each(locale_opts, function(i,k){\n\t\t\tif (k in d)\n\t\t\t\tout[k] = d[k];\n\t\t});\n\t\treturn out;\n\t}\n\n\tvar old = $.fn.datepicker;\n\tvar datepickerPlugin = function(option){\n\t\tvar args = Array.apply(null, arguments);\n\t\targs.shift();\n\t\tvar internal_return;\n\t\tthis.each(function(){\n\t\t\tvar $this = $(this),\n\t\t\t\tdata = $this.data('datepicker'),\n\t\t\t\toptions = typeof option === 'object' && option;\n\t\t\tif (!data){\n\t\t\t\tvar elopts = opts_from_el(this, 'date'),\n\t\t\t\t\t// Preliminary otions\n\t\t\t\t\txopts = $.extend({}, defaults, elopts, options),\n\t\t\t\t\tlocopts = opts_from_locale(xopts.language),\n\t\t\t\t\t// Options priority: js args, data-attrs, locales, defaults\n\t\t\t\t\topts = $.extend({}, defaults, locopts, elopts, options);\n\t\t\t\tif ($this.hasClass('input-daterange') || opts.inputs){\n\t\t\t\t\t$.extend(opts, {\n\t\t\t\t\t\tinputs: opts.inputs || $this.find('input').toArray()\n\t\t\t\t\t});\n\t\t\t\t\tdata = new DateRangePicker(this, opts);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdata = new Datepicker(this, opts);\n\t\t\t\t}\n\t\t\t\t$this.data('datepicker', data);\n\t\t\t}\n\t\t\tif (typeof option === 'string' && typeof data[option] === 'function'){\n\t\t\t\tinternal_return = data[option].apply(data, args);\n\t\t\t}\n\t\t});\n\n\t\tif (\n\t\t\tinternal_return === undefined ||\n\t\t\tinternal_return instanceof Datepicker ||\n\t\t\tinternal_return instanceof DateRangePicker\n\t\t)\n\t\t\treturn this;\n\n\t\tif (this.length > 1)\n\t\t\tthrow new Error('Using only allowed for the collection of a single element (' + option + ' function)');\n\t\telse\n\t\t\treturn internal_return;\n\t};\n\t$.fn.datepicker = datepickerPlugin;\n\n\tvar defaults = $.fn.datepicker.defaults = {\n\t\tassumeNearbyYear: false,\n\t\tautoclose: false,\n\t\tbeforeShowDay: $.noop,\n\t\tbeforeShowMonth: $.noop,\n\t\tbeforeShowYear: $.noop,\n\t\tbeforeShowDecade: $.noop,\n\t\tbeforeShowCentury: $.noop,\n\t\tcalendarWeeks: false,\n\t\tclearBtn: false,\n\t\ttoggleActive: false,\n\t\tdaysOfWeekDisabled: [],\n\t\tdaysOfWeekHighlighted: [],\n\t\tdatesDisabled: [],\n\t\tendDate: Infinity,\n\t\tforceParse: true,\n\t\tformat: 'mm/dd/yyyy',\n\t\tkeyboardNavigation: true,\n\t\tlanguage: 'en',\n\t\tminViewMode: 0,\n\t\tmaxViewMode: 4,\n\t\tmultidate: false,\n\t\tmultidateSeparator: ',',\n\t\torientation: \"auto\",\n\t\trtl: false,\n\t\tstartDate: -Infinity,\n\t\tstartView: 0,\n\t\ttodayBtn: false,\n\t\ttodayHighlight: false,\n\t\tweekStart: 0,\n\t\tdisableTouchKeyboard: false,\n\t\tenableOnReadonly: true,\n\t\tshowOnFocus: true,\n\t\tzIndexOffset: 10,\n\t\tcontainer: 'body',\n\t\timmediateUpdates: false,\n\t\ttitle: '',\n\t\ttemplates: {\n\t\t\tleftArrow: '&laquo;',\n\t\t\trightArrow: '&raquo;'\n\t\t}\n\t};\n\tvar locale_opts = $.fn.datepicker.locale_opts = [\n\t\t'format',\n\t\t'rtl',\n\t\t'weekStart'\n\t];\n\t$.fn.datepicker.Constructor = Datepicker;\n\tvar dates = $.fn.datepicker.dates = {\n\t\ten: {\n\t\t\tdays: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n\t\t\tdaysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n\t\t\tdaysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n\t\t\tmonths: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n\t\t\tmonthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n\t\t\ttoday: \"Today\",\n\t\t\tclear: \"Clear\",\n\t\t\ttitleFormat: \"MM yyyy\"\n\t\t}\n\t};\n\n\tvar DPGlobal = {\n\t\tmodes: [\n\t\t\t{\n\t\t\t\tclsName: 'days',\n\t\t\t\tnavFnc: 'Month',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'months',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 1\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'years',\n\t\t\t\tnavFnc: 'FullYear',\n\t\t\t\tnavStep: 10\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'decades',\n\t\t\t\tnavFnc: 'FullDecade',\n\t\t\t\tnavStep: 100\n\t\t\t},\n\t\t\t{\n\t\t\t\tclsName: 'centuries',\n\t\t\t\tnavFnc: 'FullCentury',\n\t\t\t\tnavStep: 1000\n\t\t}],\n\t\tisLeapYear: function(year){\n\t\t\treturn (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0));\n\t\t},\n\t\tgetDaysInMonth: function(year, month){\n\t\t\treturn [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month];\n\t\t},\n\t\tvalidParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g,\n\t\tnonpunctuation: /[^ -\\/:-@\\u5e74\\u6708\\u65e5\\[-`{-~\\t\\n\\r]+/g,\n\t\tparseFormat: function(format){\n\t\t\tif (typeof format.toValue === 'function' && typeof format.toDisplay === 'function')\n return format;\n // IE treats \\0 as a string end in inputs (truncating the value),\n\t\t\t// so it's a bad format delimiter, anyway\n\t\t\tvar separators = format.replace(this.validParts, '\\0').split('\\0'),\n\t\t\t\tparts = format.match(this.validParts);\n\t\t\tif (!separators || !separators.length || !parts || parts.length === 0){\n\t\t\t\tthrow new Error(\"Invalid date format.\");\n\t\t\t}\n\t\t\treturn {separators: separators, parts: parts};\n\t\t},\n\t\tparseDate: function(date, format, language, assumeNearby){\n\t\t\tif (!date)\n\t\t\t\treturn undefined;\n\t\t\tif (date instanceof Date)\n\t\t\t\treturn date;\n\t\t\tif (typeof format === 'string')\n\t\t\t\tformat = DPGlobal.parseFormat(format);\n\t\t\tif (format.toValue)\n return format.toValue(date, format, language);\n var part_re = /([\\-+]\\d+)([dmwy])/,\n\t\t\t\tparts = date.match(/([\\-+]\\d+)([dmwy])/g),\n\t\t\t\tfn_map = {\n\t\t\t\t\td: 'moveDay',\n\t\t\t\t\tm: 'moveMonth',\n\t\t\t\t\tw: 'moveWeek',\n\t\t\t\t\ty: 'moveYear'\n\t\t\t\t},\n\t\t\t\tdateAliases = {\n\t\t\t\t\tyesterday: '-1d',\n\t\t\t\t\ttoday: '+0d',\n\t\t\t\t\ttomorrow: '+1d'\n\t\t\t\t},\n\t\t\t\tpart, dir, i, fn;\n\t\t\tif (/^[\\-+]\\d+[dmwy]([\\s,]+[\\-+]\\d+[dmwy])*$/.test(date)){\n\t\t\t\tdate = new Date();\n\t\t\t\tfor (i=0; i < parts.length; i++){\n\t\t\t\t\tpart = part_re.exec(parts[i]);\n\t\t\t\t\tdir = parseInt(part[1]);\n\t\t\t\t\tfn = fn_map[part[2]];\n\t\t\t\t\tdate = Datepicker.prototype[fn](date, dir);\n\t\t\t\t}\n\t\t\t\treturn UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n\t\t\t}\n\n\t\t\tif (typeof dateAliases[date] !== 'undefined') {\n\t\t\t\tdate = dateAliases[date];\n\t\t\t\tparts = date.match(/([\\-+]\\d+)([dmwy])/g);\n\n\t\t\t\tif (/^[\\-+]\\d+[dmwy]([\\s,]+[\\-+]\\d+[dmwy])*$/.test(date)){\n\t\t\t\t\tdate = new Date();\n\t\t\t\t \tfor (i=0; i < parts.length; i++){\n\t\t\t\t\t\tpart = part_re.exec(parts[i]);\n\t\t\t\t\t\tdir = parseInt(part[1]);\n\t\t\t\t\t\tfn = fn_map[part[2]];\n\t\t\t\t\t\tdate = Datepicker.prototype[fn](date, dir);\n\t\t\t\t \t}\n\n\t\t\t \t\treturn UTCDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparts = date && date.match(this.nonpunctuation) || [];\n\t\t\tdate = new Date();\n\n\t\t\tfunction applyNearbyYear(year, threshold){\n\t\t\t\tif (threshold === true)\n\t\t\t\t\tthreshold = 10;\n\n\t\t\t\t// if year is 2 digits or less, than the user most likely is trying to get a recent century\n\t\t\t\tif (year < 100){\n\t\t\t\t\tyear += 2000;\n\t\t\t\t\t// if the new year is more than threshold years in advance, use last century\n\t\t\t\t\tif (year > ((new Date()).getFullYear()+threshold)){\n\t\t\t\t\t\tyear -= 100;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn year;\n\t\t\t}\n\n\t\t\tvar parsed = {},\n\t\t\t\tsetters_order = ['yyyy', 'yy', 'M', 'MM', 'm', 'mm', 'd', 'dd'],\n\t\t\t\tsetters_map = {\n\t\t\t\t\tyyyy: function(d,v){\n\t\t\t\t\t\treturn d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v);\n\t\t\t\t\t},\n\t\t\t\t\tyy: function(d,v){\n\t\t\t\t\t\treturn d.setUTCFullYear(assumeNearby ? applyNearbyYear(v, assumeNearby) : v);\n\t\t\t\t\t},\n\t\t\t\t\tm: function(d,v){\n\t\t\t\t\t\tif (isNaN(d))\n\t\t\t\t\t\t\treturn d;\n\t\t\t\t\t\tv -= 1;\n\t\t\t\t\t\twhile (v < 0) v += 12;\n\t\t\t\t\t\tv %= 12;\n\t\t\t\t\t\td.setUTCMonth(v);\n\t\t\t\t\t\twhile (d.getUTCMonth() !== v)\n\t\t\t\t\t\t\td.setUTCDate(d.getUTCDate()-1);\n\t\t\t\t\t\treturn d;\n\t\t\t\t\t},\n\t\t\t\t\td: function(d,v){\n\t\t\t\t\t\treturn d.setUTCDate(v);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tval, filtered;\n\t\t\tsetters_map['M'] = setters_map['MM'] = setters_map['mm'] = setters_map['m'];\n\t\t\tsetters_map['dd'] = setters_map['d'];\n\t\t\tdate = UTCToday();\n\t\t\tvar fparts = format.parts.slice();\n\t\t\t// Remove noop parts\n\t\t\tif (parts.length !== fparts.length){\n\t\t\t\tfparts = $(fparts).filter(function(i,p){\n\t\t\t\t\treturn $.inArray(p, setters_order) !== -1;\n\t\t\t\t}).toArray();\n\t\t\t}\n\t\t\t// Process remainder\n\t\t\tfunction match_part(){\n\t\t\t\tvar m = this.slice(0, parts[i].length),\n\t\t\t\t\tp = parts[i].slice(0, m.length);\n\t\t\t\treturn m.toLowerCase() === p.toLowerCase();\n\t\t\t}\n\t\t\tif (parts.length === fparts.length){\n\t\t\t\tvar cnt;\n\t\t\t\tfor (i=0, cnt = fparts.length; i < cnt; i++){\n\t\t\t\t\tval = parseInt(parts[i], 10);\n\t\t\t\t\tpart = fparts[i];\n\t\t\t\t\tif (isNaN(val)){\n\t\t\t\t\t\tswitch (part){\n\t\t\t\t\t\t\tcase 'MM':\n\t\t\t\t\t\t\t\tfiltered = $(dates[language].months).filter(match_part);\n\t\t\t\t\t\t\t\tval = $.inArray(filtered[0], dates[language].months) + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'M':\n\t\t\t\t\t\t\t\tfiltered = $(dates[language].monthsShort).filter(match_part);\n\t\t\t\t\t\t\t\tval = $.inArray(filtered[0], dates[language].monthsShort) + 1;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tparsed[part] = val;\n\t\t\t\t}\n\t\t\t\tvar _date, s;\n\t\t\t\tfor (i=0; i < setters_order.length; i++){\n\t\t\t\t\ts = setters_order[i];\n\t\t\t\t\tif (s in parsed && !isNaN(parsed[s])){\n\t\t\t\t\t\t_date = new Date(date);\n\t\t\t\t\t\tsetters_map[s](_date, parsed[s]);\n\t\t\t\t\t\tif (!isNaN(_date))\n\t\t\t\t\t\t\tdate = _date;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn date;\n\t\t},\n\t\tformatDate: function(date, format, language){\n\t\t\tif (!date)\n\t\t\t\treturn '';\n\t\t\tif (typeof format === 'string')\n\t\t\t\tformat = DPGlobal.parseFormat(format);\n\t\t\tif (format.toDisplay)\n return format.toDisplay(date, format, language);\n var val = {\n\t\t\t\td: date.getUTCDate(),\n\t\t\t\tD: dates[language].daysShort[date.getUTCDay()],\n\t\t\t\tDD: dates[language].days[date.getUTCDay()],\n\t\t\t\tm: date.getUTCMonth() + 1,\n\t\t\t\tM: dates[language].monthsShort[date.getUTCMonth()],\n\t\t\t\tMM: dates[language].months[date.getUTCMonth()],\n\t\t\t\tyy: date.getUTCFullYear().toString().substring(2),\n\t\t\t\tyyyy: date.getUTCFullYear()\n\t\t\t};\n\t\t\tval.dd = (val.d < 10 ? '0' : '') + val.d;\n\t\t\tval.mm = (val.m < 10 ? '0' : '') + val.m;\n\t\t\tdate = [];\n\t\t\tvar seps = $.extend([], format.separators);\n\t\t\tfor (var i=0, cnt = format.parts.length; i <= cnt; i++){\n\t\t\t\tif (seps.length)\n\t\t\t\t\tdate.push(seps.shift());\n\t\t\t\tdate.push(val[format.parts[i]]);\n\t\t\t}\n\t\t\treturn date.join('');\n\t\t},\n\t\theadTemplate: '<thead>'+\n\t\t\t '<tr>'+\n\t\t\t '<th colspan=\"7\" class=\"datepicker-title\"></th>'+\n\t\t\t '</tr>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th class=\"prev\">&laquo;</th>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"5\" class=\"datepicker-switch\"></th>'+\n\t\t\t\t\t\t\t\t'<th class=\"next\">&raquo;</th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t'</thead>',\n\t\tcontTemplate: '<tbody><tr><td colspan=\"7\"></td></tr></tbody>',\n\t\tfootTemplate: '<tfoot>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"7\" class=\"today\"></th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t\t'<tr>'+\n\t\t\t\t\t\t\t\t'<th colspan=\"7\" class=\"clear\"></th>'+\n\t\t\t\t\t\t\t'</tr>'+\n\t\t\t\t\t\t'</tfoot>'\n\t};\n\tDPGlobal.template = '<div class=\"datepicker\">'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-days\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\t'<tbody></tbody>'+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-months\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-years\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-decades\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t\t'<div class=\"datepicker-centuries\">'+\n\t\t\t\t\t\t\t\t'<table class=\"table-condensed\">'+\n\t\t\t\t\t\t\t\t\tDPGlobal.headTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.contTemplate+\n\t\t\t\t\t\t\t\t\tDPGlobal.footTemplate+\n\t\t\t\t\t\t\t\t'</table>'+\n\t\t\t\t\t\t\t'</div>'+\n\t\t\t\t\t\t'</div>';\n\n\t$.fn.datepicker.DPGlobal = DPGlobal;\n\n\n\t/* DATEPICKER NO CONFLICT\n\t* =================== */\n\n\t$.fn.datepicker.noConflict = function(){\n\t\t$.fn.datepicker = old;\n\t\treturn this;\n\t};\n\n\t/* DATEPICKER VERSION\n\t * =================== */\n\t$.fn.datepicker.version = '1.6.4';\n\n\t/* DATEPICKER DATA-API\n\t* ================== */\n\n\t$(document).on(\n\t\t'focus.datepicker.data-api click.datepicker.data-api',\n\t\t'[data-provide=\"datepicker\"]',\n\t\tfunction(e){\n\t\t\tvar $this = $(this);\n\t\t\tif ($this.data('datepicker'))\n\t\t\t\treturn;\n\t\t\te.preventDefault();\n\t\t\t// component click requires us to explicitly show it\n\t\t\tdatepickerPlugin.call($this, 'show');\n\t\t}\n\t);\n\t$(function(){\n\t\tdatepickerPlugin.call($('[data-provide=\"datepicker-inline\"]'));\n\t});\n\n}));\n","/*!\n * iCheck v1.0.2, http://git.io/arlzeA\n * ===================================\n * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization\n *\n * (c) 2013 Damir Sultanov, http://fronteed.com\n * MIT Licensed\n */\n\n(function($) {\n\n // Cached vars\n var _iCheck = 'iCheck',\n _iCheckHelper = _iCheck + '-helper',\n _checkbox = 'checkbox',\n _radio = 'radio',\n _checked = 'checked',\n _unchecked = 'un' + _checked,\n _disabled = 'disabled',a\n _determinate = 'determinate',\n _indeterminate = 'in' + _determinate,\n _update = 'update',\n _type = 'type',\n _click = 'click',\n _touch = 'touchbegin.i touchend.i',\n _add = 'addClass',\n _remove = 'removeClass',\n _callback = 'trigger',\n _label = 'label',\n _cursor = 'cursor',\n _mobile = /ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);\n\n // Plugin init\n $.fn[_iCheck] = function(options, fire) {\n\n // Walker\n var handle = 'input[type=\"' + _checkbox + '\"], input[type=\"' + _radio + '\"]',\n stack = $(),\n walker = function(object) {\n object.each(function() {\n var self = $(this);\n\n if (self.is(handle)) {\n stack = stack.add(self);\n } else {\n stack = stack.add(self.find(handle));\n }\n });\n };\n\n // Check if we should operate with some method\n if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {\n\n // Normalize method's name\n options = options.toLowerCase();\n\n // Find checkboxes and radio buttons\n walker(this);\n\n return stack.each(function() {\n var self = $(this);\n\n if (options == 'destroy') {\n tidy(self, 'ifDestroyed');\n } else {\n operate(self, true, options);\n }\n\n // Fire method's callback\n if ($.isFunction(fire)) {\n fire();\n }\n });\n\n // Customization\n } else if (typeof options == 'object' || !options) {\n\n // Check if any options were passed\n var settings = $.extend({\n checkedClass: _checked,\n disabledClass: _disabled,\n indeterminateClass: _indeterminate,\n labelHover: true\n }, options),\n\n selector = settings.handle,\n hoverClass = settings.hoverClass || 'hover',\n focusClass = settings.focusClass || 'focus',\n activeClass = settings.activeClass || 'active',\n labelHover = !!settings.labelHover,\n labelHoverClass = settings.labelHoverClass || 'hover',\n\n // Setup clickable area\n area = ('' + settings.increaseArea).replace('%', '') | 0;\n\n // Selector limit\n if (selector == _checkbox || selector == _radio) {\n handle = 'input[type=\"' + selector + '\"]';\n }\n\n // Clickable area limit\n if (area < -50) {\n area = -50;\n }\n\n // Walk around the selector\n walker(this);\n\n return stack.each(function() {\n var self = $(this);\n\n // If already customized\n tidy(self);\n\n var node = this,\n id = node.id,\n\n // Layer styles\n offset = -area + '%',\n size = 100 + (area * 2) + '%',\n layer = {\n position: 'absolute',\n top: offset,\n left: offset,\n display: 'block',\n width: size,\n height: size,\n margin: 0,\n padding: 0,\n background: '#fff',\n border: 0,\n opacity: 0\n },\n\n // Choose how to hide input\n hide = _mobile ? {\n position: 'absolute',\n visibility: 'hidden'\n } : area ? layer : {\n position: 'absolute',\n opacity: 0\n },\n\n // Get proper class\n className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,\n\n // Find assigned labels\n label = $(_label + '[for=\"' + id + '\"]').add(self.closest(_label)),\n\n // Check ARIA option\n aria = !!settings.aria,\n\n // Set ARIA placeholder\n ariaID = _iCheck + '-' + Math.random().toString(36).substr(2,6),\n\n // Parent & helper\n parent = '<div class=\"' + className + '\" ' + (aria ? 'role=\"' + node[_type] + '\" ' : ''),\n helper;\n\n // Set ARIA \"labelledby\"\n if (aria) {\n label.each(function() {\n parent += 'aria-labelledby=\"';\n\n if (this.id) {\n parent += this.id;\n } else {\n this.id = ariaID;\n parent += ariaID;\n }\n\n parent += '\"';\n });\n }\n\n // Wrap input\n parent = self.wrap(parent + '/>')[_callback]('ifCreated').parent().append(settings.insert);\n\n // Layer addition\n helper = $('<ins class=\"' + _iCheckHelper + '\"/>').css(layer).appendTo(parent);\n\n // Finalize customization\n self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);\n !!settings.inheritClass && parent[_add](node.className || '');\n !!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);\n parent.css('position') == 'static' && parent.css('position', 'relative');\n operate(self, true, _update);\n\n // Label events\n if (label.length) {\n label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {\n var type = event[_type],\n item = $(this);\n\n // Do nothing if input is disabled\n if (!node[_disabled]) {\n\n // Click\n if (type == _click) {\n if ($(event.target).is('a')) {\n return;\n }\n operate(self, false, true);\n\n // Hover state\n } else if (labelHover) {\n\n // mouseout|touchend\n if (/ut|nd/.test(type)) {\n parent[_remove](hoverClass);\n item[_remove](labelHoverClass);\n } else {\n parent[_add](hoverClass);\n item[_add](labelHoverClass);\n }\n }\n\n if (_mobile) {\n event.stopPropagation();\n } else {\n return false;\n }\n }\n });\n }\n\n // Input events\n self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {\n var type = event[_type],\n key = event.keyCode;\n\n // Click\n if (type == _click) {\n return false;\n\n // Keydown\n } else if (type == 'keydown' && key == 32) {\n if (!(node[_type] == _radio && node[_checked])) {\n if (node[_checked]) {\n off(self, _checked);\n } else {\n on(self, _checked);\n }\n }\n\n return false;\n\n // Keyup\n } else if (type == 'keyup' && node[_type] == _radio) {\n !node[_checked] && on(self, _checked);\n\n // Focus/blur\n } else if (/us|ur/.test(type)) {\n parent[type == 'blur' ? _remove : _add](focusClass);\n }\n });\n\n // Helper events\n helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {\n var type = event[_type],\n\n // mousedown|mouseup\n toggle = /wn|up/.test(type) ? activeClass : hoverClass;\n\n // Do nothing if input is disabled\n if (!node[_disabled]) {\n\n // Click\n if (type == _click) {\n operate(self, false, true);\n\n // Active and hover states\n } else {\n\n // State is on\n if (/wn|er|in/.test(type)) {\n\n // mousedown|mouseover|touchbegin\n parent[_add](toggle);\n\n // State is off\n } else {\n parent[_remove](toggle + ' ' + activeClass);\n }\n\n // Label hover\n if (label.length && labelHover && toggle == hoverClass) {\n\n // mouseout|touchend\n label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);\n }\n }\n\n if (_mobile) {\n event.stopPropagation();\n } else {\n return false;\n }\n }\n });\n });\n } else {\n return this;\n }\n };\n\n // Do something with inputs\n function operate(input, direct, method) {\n var node = input[0],\n state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,\n active = method == _update ? {\n checked: node[_checked],\n disabled: node[_disabled],\n indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'\n } : node[state];\n\n // Check, disable or indeterminate\n if (/^(ch|di|in)/.test(method) && !active) {\n on(input, state);\n\n // Uncheck, enable or determinate\n } else if (/^(un|en|de)/.test(method) && active) {\n off(input, state);\n\n // Update\n } else if (method == _update) {\n\n // Handle states\n for (var each in active) {\n if (active[each]) {\n on(input, each, true);\n } else {\n off(input, each, true);\n }\n }\n\n } else if (!direct || method == 'toggle') {\n\n // Helper or label was clicked\n if (!direct) {\n input[_callback]('ifClicked');\n }\n\n // Toggle checked state\n if (active) {\n if (node[_type] !== _radio) {\n off(input, state);\n }\n } else {\n on(input, state);\n }\n }\n }\n\n // Add checked, disabled or indeterminate state\n function on(input, state, keep) {\n var node = input[0],\n parent = input.parent(),\n checked = state == _checked,\n indeterminate = state == _indeterminate,\n disabled = state == _disabled,\n callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',\n regular = option(input, callback + capitalize(node[_type])),\n specific = option(input, state + capitalize(node[_type]));\n\n // Prevent unnecessary actions\n if (node[state] !== true) {\n\n // Toggle assigned radio buttons\n if (!keep && state == _checked && node[_type] == _radio && node.name) {\n var form = input.closest('form'),\n inputs = 'input[name=\"' + node.name + '\"]';\n\n inputs = form.length ? form.find(inputs) : $(inputs);\n\n inputs.each(function() {\n if (this !== node && $(this).data(_iCheck)) {\n off($(this), state);\n }\n });\n }\n\n // Indeterminate state\n if (indeterminate) {\n\n // Add indeterminate state\n node[state] = true;\n\n // Remove checked state\n if (node[_checked]) {\n off(input, _checked, 'force');\n }\n\n // Checked or disabled state\n } else {\n\n // Add checked or disabled state\n if (!keep) {\n node[state] = true;\n }\n\n // Remove indeterminate state\n if (checked && node[_indeterminate]) {\n off(input, _indeterminate, false);\n }\n }\n\n // Trigger callbacks\n callbacks(input, checked, state, keep);\n }\n\n // Add proper cursor\n if (node[_disabled] && !!option(input, _cursor, true)) {\n parent.find('.' + _iCheckHelper).css(_cursor, 'default');\n }\n\n // Add state class\n parent[_add](specific || option(input, state) || '');\n\n // Set ARIA attribute\n if (!!parent.attr('role') && !indeterminate) {\n parent.attr('aria-' + (disabled ? _disabled : _checked), 'true');\n }\n\n // Remove regular state class\n parent[_remove](regular || option(input, callback) || '');\n }\n\n // Remove checked, disabled or indeterminate state\n function off(input, state, keep) {\n var node = input[0],\n parent = input.parent(),\n checked = state == _checked,\n indeterminate = state == _indeterminate,\n disabled = state == _disabled,\n callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',\n regular = option(input, callback + capitalize(node[_type])),\n specific = option(input, state + capitalize(node[_type]));\n\n // Prevent unnecessary actions\n if (node[state] !== false) {\n\n // Toggle state\n if (indeterminate || !keep || keep == 'force') {\n node[state] = false;\n }\n\n // Trigger callbacks\n callbacks(input, checked, callback, keep);\n }\n\n // Add proper cursor\n if (!node[_disabled] && !!option(input, _cursor, true)) {\n parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');\n }\n\n // Remove state class\n parent[_remove](specific || option(input, state) || '');\n\n // Set ARIA attribute\n if (!!parent.attr('role') && !indeterminate) {\n parent.attr('aria-' + (disabled ? _disabled : _checked), 'false');\n }\n\n // Add regular state class\n parent[_add](regular || option(input, callback) || '');\n }\n\n // Remove all traces\n function tidy(input, callback) {\n if (input.data(_iCheck)) {\n\n // Remove everything except input\n input.parent().html(input.attr('style', input.data(_iCheck).s || ''));\n\n // Callback\n if (callback) {\n input[_callback](callback);\n }\n\n // Unbind events\n input.off('.i').unwrap();\n $(_label + '[for=\"' + input[0].id + '\"]').add(input.closest(_label)).off('.i');\n }\n }\n\n // Get some option\n function option(input, state, regular) {\n if (input.data(_iCheck)) {\n return input.data(_iCheck).o[state + (regular ? '' : 'Class')];\n }\n }\n\n // Capitalize some string\n function capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n }\n\n // Executable handlers\n function callbacks(input, checked, callback, keep) {\n if (!keep) {\n if (checked) {\n input[_callback]('ifToggled');\n }\n\n input[_callback]('ifChanged')[_callback]('if' + capitalize(callback));\n }\n }\n})(window.jQuery || window.Zepto);\n","/*!\n * Select2 4.0.3\n * https://select2.github.io\n *\n * Released under the MIT license\n * https://github.com/select2/select2/blob/master/LICENSE.md\n */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n // Node/CommonJS\n factory(require('jquery'));\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function (jQuery) {\n // This is needed so we can catch the AMD loader configuration and use it\n // The inner file should be wrapped (by `banner.start.js`) in a function that\n // returns the AMD loader references.\n var S2 =\n(function () {\n // Restore the Select2 AMD loader so it can be used\n // Needed mostly in the language files, where the loader is not inserted\n if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\n var S2 = jQuery.fn.select2.amd;\n }\nvar S2;(function () { if (!S2 || !S2.requirejs) {\nif (!S2) { S2 = {}; } else { require = S2; }\n/**\n * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.\n * Available via the MIT or new BSD license.\n * see: http://github.com/jrburke/almond for details\n */\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\n//be followed.\n/*jslint sloppy: true */\n/*global setTimeout: false */\n\nvar requirejs, require, define;\n(function (undef) {\n var main, req, makeMap, handlers,\n defined = {},\n waiting = {},\n config = {},\n defining = {},\n hasOwn = Object.prototype.hasOwnProperty,\n aps = [].slice,\n jsSuffixRegExp = /\\.js$/;\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @returns {String} normalized name\n */\n function normalize(name, baseName) {\n var nameParts, nameSegment, mapValue, foundMap, lastIndex,\n foundI, foundStarMap, starI, i, j, part,\n baseParts = baseName && baseName.split(\"/\"),\n map = config.map,\n starMap = (map && map['*']) || {};\n\n //Adjust any relative paths.\n if (name && name.charAt(0) === \".\") {\n //If have a base name, try to normalize against it,\n //otherwise, assume it is a top-level require that will\n //be relative to baseUrl in the end.\n if (baseName) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // Node .js allowance:\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n //Lop off the last part of baseParts, so that . matches the\n //\"directory\" and not name of the baseName's module. For instance,\n //baseName of \"one/two/three\", maps to \"one/two/three.js\", but we\n //want the directory, \"one/two\" for this normalization.\n name = baseParts.slice(0, baseParts.length - 1).concat(name);\n\n //start trimDots\n for (i = 0; i < name.length; i += 1) {\n part = name[i];\n if (part === \".\") {\n name.splice(i, 1);\n i -= 1;\n } else if (part === \"..\") {\n if (i === 1 && (name[2] === '..' || name[0] === '..')) {\n //End of the line. Keep at least one non-dot\n //path segment at the front so it can be mapped\n //correctly to disk. Otherwise, there is likely\n //no path mapping for a path starting with '..'.\n //This can still fail, but catches the most reasonable\n //uses of ..\n break;\n } else if (i > 0) {\n name.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n //end trimDots\n\n name = name.join(\"/\");\n } else if (name.indexOf('./') === 0) {\n // No baseName, so this is ID is resolved relative\n // to baseUrl, pull off the leading dot.\n name = name.substring(2);\n }\n }\n\n //Apply map config if available.\n if ((baseParts || starMap) && map) {\n nameParts = name.split('/');\n\n for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join(\"/\");\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = map[baseParts.slice(0, j).join('/')];\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = mapValue[nameSegment];\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break;\n }\n }\n }\n }\n\n if (foundMap) {\n break;\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && starMap[nameSegment]) {\n foundStarMap = starMap[nameSegment];\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n return name;\n }\n\n function makeRequire(relName, forceSync) {\n return function () {\n //A version of a require function that passes a moduleName\n //value for items that may need to\n //look up paths relative to the moduleName\n var args = aps.call(arguments, 0);\n\n //If first arg is not require('string'), and there is only\n //one arg, it is the array form without a callback. Insert\n //a null so that the following concat is correct.\n if (typeof args[0] !== 'string' && args.length === 1) {\n args.push(null);\n }\n return req.apply(undef, args.concat([relName, forceSync]));\n };\n }\n\n function makeNormalize(relName) {\n return function (name) {\n return normalize(name, relName);\n };\n }\n\n function makeLoad(depName) {\n return function (value) {\n defined[depName] = value;\n };\n }\n\n function callDep(name) {\n if (hasProp(waiting, name)) {\n var args = waiting[name];\n delete waiting[name];\n defining[name] = true;\n main.apply(undef, args);\n }\n\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\n throw new Error('No ' + name);\n }\n return defined[name];\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n /**\n * Makes a name map, normalizing the name, and using a plugin\n * for normalization if necessary. Grabs a ref to plugin\n * too, as an optimization.\n */\n makeMap = function (name, relName) {\n var plugin,\n parts = splitPrefix(name),\n prefix = parts[0];\n\n name = parts[1];\n\n if (prefix) {\n prefix = normalize(prefix, relName);\n plugin = callDep(prefix);\n }\n\n //Normalize according\n if (prefix) {\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, makeNormalize(relName));\n } else {\n name = normalize(name, relName);\n }\n } else {\n name = normalize(name, relName);\n parts = splitPrefix(name);\n prefix = parts[0];\n name = parts[1];\n if (prefix) {\n plugin = callDep(prefix);\n }\n }\n\n //Using ridiculous property names for space reasons\n return {\n f: prefix ? prefix + '!' + name : name, //fullName\n n: name,\n pr: prefix,\n p: plugin\n };\n };\n\n function makeConfig(name) {\n return function () {\n return (config && config.config && config.config[name]) || {};\n };\n }\n\n handlers = {\n require: function (name) {\n return makeRequire(name);\n },\n exports: function (name) {\n var e = defined[name];\n if (typeof e !== 'undefined') {\n return e;\n } else {\n return (defined[name] = {});\n }\n },\n module: function (name) {\n return {\n id: name,\n uri: '',\n exports: defined[name],\n config: makeConfig(name)\n };\n }\n };\n\n main = function (name, deps, callback, relName) {\n var cjsModule, depName, ret, map, i,\n args = [],\n callbackType = typeof callback,\n usingExports;\n\n //Use name if no relName\n relName = relName || name;\n\n //Call the callback to define the module, if necessary.\n if (callbackType === 'undefined' || callbackType === 'function') {\n //Pull out the defined dependencies and pass the ordered\n //values to the callback.\n //Default to [require, exports, module] if no deps\n deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\n for (i = 0; i < deps.length; i += 1) {\n map = makeMap(deps[i], relName);\n depName = map.f;\n\n //Fast path CommonJS standard dependencies.\n if (depName === \"require\") {\n args[i] = handlers.require(name);\n } else if (depName === \"exports\") {\n //CommonJS module spec 1.1\n args[i] = handlers.exports(name);\n usingExports = true;\n } else if (depName === \"module\") {\n //CommonJS module spec 1.1\n cjsModule = args[i] = handlers.module(name);\n } else if (hasProp(defined, depName) ||\n hasProp(waiting, depName) ||\n hasProp(defining, depName)) {\n args[i] = callDep(depName);\n } else if (map.p) {\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n args[i] = defined[depName];\n } else {\n throw new Error(name + ' missing ' + depName);\n }\n }\n\n ret = callback ? callback.apply(defined[name], args) : undefined;\n\n if (name) {\n //If setting exports via \"module\" is in play,\n //favor that over return value and exports. After that,\n //favor a non-undefined return value over exports use.\n if (cjsModule && cjsModule.exports !== undef &&\n cjsModule.exports !== defined[name]) {\n defined[name] = cjsModule.exports;\n } else if (ret !== undef || !usingExports) {\n //Use the return value from the function.\n defined[name] = ret;\n }\n }\n } else if (name) {\n //May just be an object definition for the module. Only\n //worry about defining if have a module name.\n defined[name] = callback;\n }\n };\n\n requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\n if (typeof deps === \"string\") {\n if (handlers[deps]) {\n //callback in this case is really relName\n return handlers[deps](callback);\n }\n //Just return the module wanted. In this scenario, the\n //deps arg is the module name, and second arg (if passed)\n //is just the relName.\n //Normalize module name, if it contains . or ..\n return callDep(makeMap(deps, callback).f);\n } else if (!deps.splice) {\n //deps is a config object, not an array.\n config = deps;\n if (config.deps) {\n req(config.deps, config.callback);\n }\n if (!callback) {\n return;\n }\n\n if (callback.splice) {\n //callback is an array, which means it is a dependency list.\n //Adjust args if there are dependencies\n deps = callback;\n callback = relName;\n relName = null;\n } else {\n deps = undef;\n }\n }\n\n //Support require(['a'])\n callback = callback || function () {};\n\n //If relName is a function, it is an errback handler,\n //so remove it.\n if (typeof relName === 'function') {\n relName = forceSync;\n forceSync = alt;\n }\n\n //Simulate async callback;\n if (forceSync) {\n main(undef, deps, callback, relName);\n } else {\n //Using a non-zero value because of concern for what old browsers\n //do, and latest browsers \"upgrade\" to 4 if lower value is used:\n //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\n //If want a value immediately, use require('id') instead -- something\n //that works in almond on the global level, but not guaranteed and\n //unlikely to work in other AMD implementations.\n setTimeout(function () {\n main(undef, deps, callback, relName);\n }, 4);\n }\n\n return req;\n };\n\n /**\n * Just drops the config on the floor, but returns req in case\n * the config return value is used.\n */\n req.config = function (cfg) {\n return req(cfg);\n };\n\n /**\n * Expose module registry for debugging and tooling\n */\n requirejs._defined = defined;\n\n define = function (name, deps, callback) {\n if (typeof name !== 'string') {\n throw new Error('See almond README: incorrect module build, no module name');\n }\n\n //This module may not have dependencies\n if (!deps.splice) {\n //deps is not an array, so probably means\n //an object literal or factory function for\n //the value. Adjust args.\n callback = deps;\n deps = [];\n }\n\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n waiting[name] = [name, deps, callback];\n }\n };\n\n define.amd = {\n jQuery: true\n };\n}());\n\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\n}\n}());\nS2.define(\"almond\", function(){});\n\n/* global jQuery:false, $:false */\nS2.define('jquery',[],function () {\n var _$ = jQuery || $;\n\n if (_$ == null && console && console.error) {\n console.error(\n 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\n 'found. Make sure that you are including jQuery before Select2 on your ' +\n 'web page.'\n );\n }\n\n return _$;\n});\n\nS2.define('select2/utils',[\n 'jquery'\n], function ($) {\n var Utils = {};\n\n Utils.Extend = function (ChildClass, SuperClass) {\n var __hasProp = {}.hasOwnProperty;\n\n function BaseConstructor () {\n this.constructor = ChildClass;\n }\n\n for (var key in SuperClass) {\n if (__hasProp.call(SuperClass, key)) {\n ChildClass[key] = SuperClass[key];\n }\n }\n\n BaseConstructor.prototype = SuperClass.prototype;\n ChildClass.prototype = new BaseConstructor();\n ChildClass.__super__ = SuperClass.prototype;\n\n return ChildClass;\n };\n\n function getMethods (theClass) {\n var proto = theClass.prototype;\n\n var methods = [];\n\n for (var methodName in proto) {\n var m = proto[methodName];\n\n if (typeof m !== 'function') {\n continue;\n }\n\n if (methodName === 'constructor') {\n continue;\n }\n\n methods.push(methodName);\n }\n\n return methods;\n }\n\n Utils.Decorate = function (SuperClass, DecoratorClass) {\n var decoratedMethods = getMethods(DecoratorClass);\n var superMethods = getMethods(SuperClass);\n\n function DecoratedClass () {\n var unshift = Array.prototype.unshift;\n\n var argCount = DecoratorClass.prototype.constructor.length;\n\n var calledConstructor = SuperClass.prototype.constructor;\n\n if (argCount > 0) {\n unshift.call(arguments, SuperClass.prototype.constructor);\n\n calledConstructor = DecoratorClass.prototype.constructor;\n }\n\n calledConstructor.apply(this, arguments);\n }\n\n DecoratorClass.displayName = SuperClass.displayName;\n\n function ctr () {\n this.constructor = DecoratedClass;\n }\n\n DecoratedClass.prototype = new ctr();\n\n for (var m = 0; m < superMethods.length; m++) {\n var superMethod = superMethods[m];\n\n DecoratedClass.prototype[superMethod] =\n SuperClass.prototype[superMethod];\n }\n\n var calledMethod = function (methodName) {\n // Stub out the original method if it's not decorating an actual method\n var originalMethod = function () {};\n\n if (methodName in DecoratedClass.prototype) {\n originalMethod = DecoratedClass.prototype[methodName];\n }\n\n var decoratedMethod = DecoratorClass.prototype[methodName];\n\n return function () {\n var unshift = Array.prototype.unshift;\n\n unshift.call(arguments, originalMethod);\n\n return decoratedMethod.apply(this, arguments);\n };\n };\n\n for (var d = 0; d < decoratedMethods.length; d++) {\n var decoratedMethod = decoratedMethods[d];\n\n DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\n }\n\n return DecoratedClass;\n };\n\n var Observable = function () {\n this.listeners = {};\n };\n\n Observable.prototype.on = function (event, callback) {\n this.listeners = this.listeners || {};\n\n if (event in this.listeners) {\n this.listeners[event].push(callback);\n } else {\n this.listeners[event] = [callback];\n }\n };\n\n Observable.prototype.trigger = function (event) {\n var slice = Array.prototype.slice;\n var params = slice.call(arguments, 1);\n\n this.listeners = this.listeners || {};\n\n // Params should always come in as an array\n if (params == null) {\n params = [];\n }\n\n // If there are no arguments to the event, use a temporary object\n if (params.length === 0) {\n params.push({});\n }\n\n // Set the `_type` of the first object to the event\n params[0]._type = event;\n\n if (event in this.listeners) {\n this.invoke(this.listeners[event], slice.call(arguments, 1));\n }\n\n if ('*' in this.listeners) {\n this.invoke(this.listeners['*'], arguments);\n }\n };\n\n Observable.prototype.invoke = function (listeners, params) {\n for (var i = 0, len = listeners.length; i < len; i++) {\n listeners[i].apply(this, params);\n }\n };\n\n Utils.Observable = Observable;\n\n Utils.generateChars = function (length) {\n var chars = '';\n\n for (var i = 0; i < length; i++) {\n var randomChar = Math.floor(Math.random() * 36);\n chars += randomChar.toString(36);\n }\n\n return chars;\n };\n\n Utils.bind = function (func, context) {\n return function () {\n func.apply(context, arguments);\n };\n };\n\n Utils._convertData = function (data) {\n for (var originalKey in data) {\n var keys = originalKey.split('-');\n\n var dataLevel = data;\n\n if (keys.length === 1) {\n continue;\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k];\n\n // Lowercase the first letter\n // By default, dash-separated becomes camelCase\n key = key.substring(0, 1).toLowerCase() + key.substring(1);\n\n if (!(key in dataLevel)) {\n dataLevel[key] = {};\n }\n\n if (k == keys.length - 1) {\n dataLevel[key] = data[originalKey];\n }\n\n dataLevel = dataLevel[key];\n }\n\n delete data[originalKey];\n }\n\n return data;\n };\n\n Utils.hasScroll = function (index, el) {\n // Adapted from the function created by @ShadowScripter\n // and adapted by @BillBarry on the Stack Exchange Code Review website.\n // The original code can be found at\n // http://codereview.stackexchange.com/q/13338\n // and was designed to be used with the Sizzle selector engine.\n\n var $el = $(el);\n var overflowX = el.style.overflowX;\n var overflowY = el.style.overflowY;\n\n //Check both x and y declarations\n if (overflowX === overflowY &&\n (overflowY === 'hidden' || overflowY === 'visible')) {\n return false;\n }\n\n if (overflowX === 'scroll' || overflowY === 'scroll') {\n return true;\n }\n\n return ($el.innerHeight() < el.scrollHeight ||\n $el.innerWidth() < el.scrollWidth);\n };\n\n Utils.escapeMarkup = function (markup) {\n var replaceMap = {\n '\\\\': '&#92;',\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n '\\'': '&#39;',\n '/': '&#47;'\n };\n\n // Do not try to escape the markup if it's not a string\n if (typeof markup !== 'string') {\n return markup;\n }\n\n return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n return replaceMap[match];\n });\n };\n\n // Append an array of jQuery nodes to a given element.\n Utils.appendMany = function ($element, $nodes) {\n // jQuery 1.7.x does not support $.fn.append() with an array\n // Fall back to a jQuery object collection using $.fn.add()\n if ($.fn.jquery.substr(0, 3) === '1.7') {\n var $jqNodes = $();\n\n $.map($nodes, function (node) {\n $jqNodes = $jqNodes.add(node);\n });\n\n $nodes = $jqNodes;\n }\n\n $element.append($nodes);\n };\n\n return Utils;\n});\n\nS2.define('select2/results',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Results ($element, options, dataAdapter) {\n this.$element = $element;\n this.data = dataAdapter;\n this.options = options;\n\n Results.__super__.constructor.call(this);\n }\n\n Utils.Extend(Results, Utils.Observable);\n\n Results.prototype.render = function () {\n var $results = $(\n '<ul class=\"select2-results__options\" role=\"tree\"></ul>'\n );\n\n if (this.options.get('multiple')) {\n $results.attr('aria-multiselectable', 'true');\n }\n\n this.$results = $results;\n\n return $results;\n };\n\n Results.prototype.clear = function () {\n this.$results.empty();\n };\n\n Results.prototype.displayMessage = function (params) {\n var escapeMarkup = this.options.get('escapeMarkup');\n\n this.clear();\n this.hideLoading();\n\n var $message = $(\n '<li role=\"treeitem\" aria-live=\"assertive\"' +\n ' class=\"select2-results__option\"></li>'\n );\n\n var message = this.options.get('translations').get(params.message);\n\n $message.append(\n escapeMarkup(\n message(params.args)\n )\n );\n\n $message[0].className += ' select2-results__message';\n\n this.$results.append($message);\n };\n\n Results.prototype.hideMessages = function () {\n this.$results.find('.select2-results__message').remove();\n };\n\n Results.prototype.append = function (data) {\n this.hideLoading();\n\n var $options = [];\n\n if (data.results == null || data.results.length === 0) {\n if (this.$results.children().length === 0) {\n this.trigger('results:message', {\n message: 'noResults'\n });\n }\n\n return;\n }\n\n data.results = this.sort(data.results);\n\n for (var d = 0; d < data.results.length; d++) {\n var item = data.results[d];\n\n var $option = this.option(item);\n\n $options.push($option);\n }\n\n this.$results.append($options);\n };\n\n Results.prototype.position = function ($results, $dropdown) {\n var $resultsContainer = $dropdown.find('.select2-results');\n $resultsContainer.append($results);\n };\n\n Results.prototype.sort = function (data) {\n var sorter = this.options.get('sorter');\n\n return sorter(data);\n };\n\n Results.prototype.highlightFirstItem = function () {\n var $options = this.$results\n .find('.select2-results__option[aria-selected]');\n\n var $selected = $options.filter('[aria-selected=true]');\n\n // Check if there are any selected options\n if ($selected.length > 0) {\n // If there are selected options, highlight the first\n $selected.first().trigger('mouseenter');\n } else {\n // If there are no selected options, highlight the first option\n // in the dropdown\n $options.first().trigger('mouseenter');\n }\n\n this.ensureHighlightVisible();\n };\n\n Results.prototype.setClasses = function () {\n var self = this;\n\n this.data.current(function (selected) {\n var selectedIds = $.map(selected, function (s) {\n return s.id.toString();\n });\n\n var $options = self.$results\n .find('.select2-results__option[aria-selected]');\n\n $options.each(function () {\n var $option = $(this);\n\n var item = $.data(this, 'data');\n\n // id needs to be converted to a string when comparing\n var id = '' + item.id;\n\n if ((item.element != null && item.element.selected) ||\n (item.element == null && $.inArray(id, selectedIds) > -1)) {\n $option.attr('aria-selected', 'true');\n } else {\n $option.attr('aria-selected', 'false');\n }\n });\n\n });\n };\n\n Results.prototype.showLoading = function (params) {\n this.hideLoading();\n\n var loadingMore = this.options.get('translations').get('searching');\n\n var loading = {\n disabled: true,\n loading: true,\n text: loadingMore(params)\n };\n var $loading = this.option(loading);\n $loading.className += ' loading-results';\n\n this.$results.prepend($loading);\n };\n\n Results.prototype.hideLoading = function () {\n this.$results.find('.loading-results').remove();\n };\n\n Results.prototype.option = function (data) {\n var option = document.createElement('li');\n option.className = 'select2-results__option';\n\n var attrs = {\n 'role': 'treeitem',\n 'aria-selected': 'false'\n };\n\n if (data.disabled) {\n delete attrs['aria-selected'];\n attrs['aria-disabled'] = 'true';\n }\n\n if (data.id == null) {\n delete attrs['aria-selected'];\n }\n\n if (data._resultId != null) {\n option.id = data._resultId;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n if (data.children) {\n attrs.role = 'group';\n attrs['aria-label'] = data.text;\n delete attrs['aria-selected'];\n }\n\n for (var attr in attrs) {\n var val = attrs[attr];\n\n option.setAttribute(attr, val);\n }\n\n if (data.children) {\n var $option = $(option);\n\n var label = document.createElement('strong');\n label.className = 'select2-results__group';\n\n var $label = $(label);\n this.template(data, label);\n\n var $children = [];\n\n for (var c = 0; c < data.children.length; c++) {\n var child = data.children[c];\n\n var $child = this.option(child);\n\n $children.push($child);\n }\n\n var $childrenContainer = $('<ul></ul>', {\n 'class': 'select2-results__options select2-results__options--nested'\n });\n\n $childrenContainer.append($children);\n\n $option.append(label);\n $option.append($childrenContainer);\n } else {\n this.template(data, option);\n }\n\n $.data(option, 'data', data);\n\n return option;\n };\n\n Results.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-results';\n\n this.$results.attr('id', id);\n\n container.on('results:all', function (params) {\n self.clear();\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n self.highlightFirstItem();\n }\n });\n\n container.on('results:append', function (params) {\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n }\n });\n\n container.on('query', function (params) {\n self.hideMessages();\n self.showLoading(params);\n });\n\n container.on('select', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n self.highlightFirstItem();\n });\n\n container.on('unselect', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n self.highlightFirstItem();\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expended=\"true\"\n self.$results.attr('aria-expanded', 'true');\n self.$results.attr('aria-hidden', 'false');\n\n self.setClasses();\n self.ensureHighlightVisible();\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expended=\"false\"\n self.$results.attr('aria-expanded', 'false');\n self.$results.attr('aria-hidden', 'true');\n self.$results.removeAttr('aria-activedescendant');\n });\n\n container.on('results:toggle', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n $highlighted.trigger('mouseup');\n });\n\n container.on('results:select', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var data = $highlighted.data('data');\n\n if ($highlighted.attr('aria-selected') == 'true') {\n self.trigger('close', {});\n } else {\n self.trigger('select', {\n data: data\n });\n }\n });\n\n container.on('results:previous', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n // If we are already at te top, don't move further\n if (currentIndex === 0) {\n return;\n }\n\n var nextIndex = currentIndex - 1;\n\n // If none are highlighted, highlight the first\n if ($highlighted.length === 0) {\n nextIndex = 0;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top;\n var nextTop = $next.offset().top;\n var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextTop - currentOffset < 0) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:next', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var nextIndex = currentIndex + 1;\n\n // If we are at the last option, stay there\n if (nextIndex >= $options.length) {\n return;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var nextBottom = $next.offset().top + $next.outerHeight(false);\n var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextBottom > currentOffset) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:focus', function (params) {\n params.element.addClass('select2-results__option--highlighted');\n });\n\n container.on('results:message', function (params) {\n self.displayMessage(params);\n });\n\n if ($.fn.mousewheel) {\n this.$results.on('mousewheel', function (e) {\n var top = self.$results.scrollTop();\n\n var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\n\n var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\n var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\n\n if (isAtTop) {\n self.$results.scrollTop(0);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (isAtBottom) {\n self.$results.scrollTop(\n self.$results.get(0).scrollHeight - self.$results.height()\n );\n\n e.preventDefault();\n e.stopPropagation();\n }\n });\n }\n\n this.$results.on('mouseup', '.select2-results__option[aria-selected]',\n function (evt) {\n var $this = $(this);\n\n var data = $this.data('data');\n\n if ($this.attr('aria-selected') === 'true') {\n if (self.options.get('multiple')) {\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n } else {\n self.trigger('close', {});\n }\n\n return;\n }\n\n self.trigger('select', {\n originalEvent: evt,\n data: data\n });\n });\n\n this.$results.on('mouseenter', '.select2-results__option[aria-selected]',\n function (evt) {\n var data = $(this).data('data');\n\n self.getHighlightedResults()\n .removeClass('select2-results__option--highlighted');\n\n self.trigger('results:focus', {\n data: data,\n element: $(this)\n });\n });\n };\n\n Results.prototype.getHighlightedResults = function () {\n var $highlighted = this.$results\n .find('.select2-results__option--highlighted');\n\n return $highlighted;\n };\n\n Results.prototype.destroy = function () {\n this.$results.remove();\n };\n\n Results.prototype.ensureHighlightVisible = function () {\n var $highlighted = this.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var $options = this.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var currentOffset = this.$results.offset().top;\n var nextTop = $highlighted.offset().top;\n var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\n\n var offsetDelta = nextTop - currentOffset;\n nextOffset -= $highlighted.outerHeight(false) * 2;\n\n if (currentIndex <= 2) {\n this.$results.scrollTop(0);\n } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\n this.$results.scrollTop(nextOffset);\n }\n };\n\n Results.prototype.template = function (result, container) {\n var template = this.options.get('templateResult');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n var content = template(result, container);\n\n if (content == null) {\n container.style.display = 'none';\n } else if (typeof content === 'string') {\n container.innerHTML = escapeMarkup(content);\n } else {\n $(container).append(content);\n }\n };\n\n return Results;\n});\n\nS2.define('select2/keys',[\n\n], function () {\n var KEYS = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46\n };\n\n return KEYS;\n});\n\nS2.define('select2/selection/base',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function BaseSelection ($element, options) {\n this.$element = $element;\n this.options = options;\n\n BaseSelection.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseSelection, Utils.Observable);\n\n BaseSelection.prototype.render = function () {\n var $selection = $(\n '<span class=\"select2-selection\" role=\"combobox\" ' +\n ' aria-haspopup=\"true\" aria-expanded=\"false\">' +\n '</span>'\n );\n\n this._tabindex = 0;\n\n if (this.$element.data('old-tabindex') != null) {\n this._tabindex = this.$element.data('old-tabindex');\n } else if (this.$element.attr('tabindex') != null) {\n this._tabindex = this.$element.attr('tabindex');\n }\n\n $selection.attr('title', this.$element.attr('title'));\n $selection.attr('tabindex', this._tabindex);\n\n this.$selection = $selection;\n\n return $selection;\n };\n\n BaseSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-container';\n var resultsId = container.id + '-results';\n\n this.container = container;\n\n this.$selection.on('focus', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('blur', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n if (evt.which === KEYS.SPACE) {\n evt.preventDefault();\n }\n });\n\n container.on('results:focus', function (params) {\n self.$selection.attr('aria-activedescendant', params.data._resultId);\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expanded=\"true\"\n self.$selection.attr('aria-expanded', 'true');\n self.$selection.attr('aria-owns', resultsId);\n\n self._attachCloseHandler(container);\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expanded=\"false\"\n self.$selection.attr('aria-expanded', 'false');\n self.$selection.removeAttr('aria-activedescendant');\n self.$selection.removeAttr('aria-owns');\n\n self.$selection.focus();\n\n self._detachCloseHandler(container);\n });\n\n container.on('enable', function () {\n self.$selection.attr('tabindex', self._tabindex);\n });\n\n container.on('disable', function () {\n self.$selection.attr('tabindex', '-1');\n });\n };\n\n BaseSelection.prototype._handleBlur = function (evt) {\n var self = this;\n\n // This needs to be delayed as the active element is the body when the tab\n // key is pressed, possibly along with others.\n window.setTimeout(function () {\n // Don't trigger `blur` if the focus is still in the selection\n if (\n (document.activeElement == self.$selection[0]) ||\n ($.contains(self.$selection[0], document.activeElement))\n ) {\n return;\n }\n\n self.trigger('blur', evt);\n }, 1);\n };\n\n BaseSelection.prototype._attachCloseHandler = function (container) {\n var self = this;\n\n $(document.body).on('mousedown.select2.' + container.id, function (e) {\n var $target = $(e.target);\n\n var $select = $target.closest('.select2');\n\n var $all = $('.select2.select2-container--open');\n\n $all.each(function () {\n var $this = $(this);\n\n if (this == $select[0]) {\n return;\n }\n\n var $element = $this.data('element');\n\n $element.select2('close');\n });\n });\n };\n\n BaseSelection.prototype._detachCloseHandler = function (container) {\n $(document.body).off('mousedown.select2.' + container.id);\n };\n\n BaseSelection.prototype.position = function ($selection, $container) {\n var $selectionContainer = $container.find('.selection');\n $selectionContainer.append($selection);\n };\n\n BaseSelection.prototype.destroy = function () {\n this._detachCloseHandler(this.container);\n };\n\n BaseSelection.prototype.update = function (data) {\n throw new Error('The `update` method must be defined in child classes.');\n };\n\n return BaseSelection;\n});\n\nS2.define('select2/selection/single',[\n 'jquery',\n './base',\n '../utils',\n '../keys'\n], function ($, BaseSelection, Utils, KEYS) {\n function SingleSelection () {\n SingleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(SingleSelection, BaseSelection);\n\n SingleSelection.prototype.render = function () {\n var $selection = SingleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--single');\n\n $selection.html(\n '<span class=\"select2-selection__rendered\"></span>' +\n '<span class=\"select2-selection__arrow\" role=\"presentation\">' +\n '<b role=\"presentation\"></b>' +\n '</span>'\n );\n\n return $selection;\n };\n\n SingleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n SingleSelection.__super__.bind.apply(this, arguments);\n\n var id = container.id + '-container';\n\n this.$selection.find('.select2-selection__rendered').attr('id', id);\n this.$selection.attr('aria-labelledby', id);\n\n this.$selection.on('mousedown', function (evt) {\n // Only respond to left clicks\n if (evt.which !== 1) {\n return;\n }\n\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on('focus', function (evt) {\n // User focuses on the container\n });\n\n this.$selection.on('blur', function (evt) {\n // User exits the container\n });\n\n container.on('focus', function (evt) {\n if (!container.isOpen()) {\n self.$selection.focus();\n }\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n };\n\n SingleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n SingleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n SingleSelection.prototype.selectionContainer = function () {\n return $('<span></span>');\n };\n\n SingleSelection.prototype.update = function (data) {\n if (data.length === 0) {\n this.clear();\n return;\n }\n\n var selection = data[0];\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n var formatted = this.display(selection, $rendered);\n\n $rendered.empty().append(formatted);\n $rendered.prop('title', selection.title || selection.text);\n };\n\n return SingleSelection;\n});\n\nS2.define('select2/selection/multiple',[\n 'jquery',\n './base',\n '../utils'\n], function ($, BaseSelection, Utils) {\n function MultipleSelection ($element, options) {\n MultipleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(MultipleSelection, BaseSelection);\n\n MultipleSelection.prototype.render = function () {\n var $selection = MultipleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--multiple');\n\n $selection.html(\n '<ul class=\"select2-selection__rendered\"></ul>'\n );\n\n return $selection;\n };\n\n MultipleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n MultipleSelection.__super__.bind.apply(this, arguments);\n\n this.$selection.on('click', function (evt) {\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on(\n 'click',\n '.select2-selection__choice__remove',\n function (evt) {\n // Ignore the event if it is disabled\n if (self.options.get('disabled')) {\n return;\n }\n\n var $remove = $(this);\n var $selection = $remove.parent();\n\n var data = $selection.data('data');\n\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n }\n );\n };\n\n MultipleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n MultipleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n MultipleSelection.prototype.selectionContainer = function () {\n var $container = $(\n '<li class=\"select2-selection__choice\">' +\n '<span class=\"select2-selection__choice__remove\" role=\"presentation\">' +\n '&times;' +\n '</span>' +\n '</li>'\n );\n\n return $container;\n };\n\n MultipleSelection.prototype.update = function (data) {\n this.clear();\n\n if (data.length === 0) {\n return;\n }\n\n var $selections = [];\n\n for (var d = 0; d < data.length; d++) {\n var selection = data[d];\n\n var $selection = this.selectionContainer();\n var formatted = this.display(selection, $selection);\n\n $selection.append(formatted);\n $selection.prop('title', selection.title || selection.text);\n\n $selection.data('data', selection);\n\n $selections.push($selection);\n }\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n\n Utils.appendMany($rendered, $selections);\n };\n\n return MultipleSelection;\n});\n\nS2.define('select2/selection/placeholder',[\n '../utils'\n], function (Utils) {\n function Placeholder (decorated, $element, options) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options);\n }\n\n Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\n var $placeholder = this.selectionContainer();\n\n $placeholder.html(this.display(placeholder));\n $placeholder.addClass('select2-selection__placeholder')\n .removeClass('select2-selection__choice');\n\n return $placeholder;\n };\n\n Placeholder.prototype.update = function (decorated, data) {\n var singlePlaceholder = (\n data.length == 1 && data[0].id != this.placeholder.id\n );\n var multipleSelections = data.length > 1;\n\n if (multipleSelections || singlePlaceholder) {\n return decorated.call(this, data);\n }\n\n this.clear();\n\n var $placeholder = this.createPlaceholder(this.placeholder);\n\n this.$selection.find('.select2-selection__rendered').append($placeholder);\n };\n\n return Placeholder;\n});\n\nS2.define('select2/selection/allowClear',[\n 'jquery',\n '../keys'\n], function ($, KEYS) {\n function AllowClear () { }\n\n AllowClear.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n if (this.placeholder == null) {\n if (this.options.get('debug') && window.console && console.error) {\n console.error(\n 'Select2: The `allowClear` option should be used in combination ' +\n 'with the `placeholder` option.'\n );\n }\n }\n\n this.$selection.on('mousedown', '.select2-selection__clear',\n function (evt) {\n self._handleClear(evt);\n });\n\n container.on('keypress', function (evt) {\n self._handleKeyboardClear(evt, container);\n });\n };\n\n AllowClear.prototype._handleClear = function (_, evt) {\n // Ignore the event if it is disabled\n if (this.options.get('disabled')) {\n return;\n }\n\n var $clear = this.$selection.find('.select2-selection__clear');\n\n // Ignore the event if nothing has been selected\n if ($clear.length === 0) {\n return;\n }\n\n evt.stopPropagation();\n\n var data = $clear.data('data');\n\n for (var d = 0; d < data.length; d++) {\n var unselectData = {\n data: data[d]\n };\n\n // Trigger the `unselect` event, so people can prevent it from being\n // cleared.\n this.trigger('unselect', unselectData);\n\n // If the event was prevented, don't clear it out.\n if (unselectData.prevented) {\n return;\n }\n }\n\n this.$element.val(this.placeholder.id).trigger('change');\n\n this.trigger('toggle', {});\n };\n\n AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\n if (container.isOpen()) {\n return;\n }\n\n if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\n this._handleClear(evt);\n }\n };\n\n AllowClear.prototype.update = function (decorated, data) {\n decorated.call(this, data);\n\n if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\n data.length === 0) {\n return;\n }\n\n var $remove = $(\n '<span class=\"select2-selection__clear\">' +\n '&times;' +\n '</span>'\n );\n $remove.data('data', data);\n\n this.$selection.find('.select2-selection__rendered').prepend($remove);\n };\n\n return AllowClear;\n});\n\nS2.define('select2/selection/search',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function Search (decorated, $element, options) {\n decorated.call(this, $element, options);\n }\n\n Search.prototype.render = function (decorated) {\n var $search = $(\n '<li class=\"select2-search select2-search--inline\">' +\n '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\n ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\"' +\n ' spellcheck=\"false\" role=\"textbox\" aria-autocomplete=\"list\" />' +\n '</li>'\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n var $rendered = decorated.call(this);\n\n this._transferTabIndex();\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self.$search.trigger('focus');\n });\n\n container.on('close', function () {\n self.$search.val('');\n self.$search.removeAttr('aria-activedescendant');\n self.$search.trigger('focus');\n });\n\n container.on('enable', function () {\n self.$search.prop('disabled', false);\n\n self._transferTabIndex();\n });\n\n container.on('disable', function () {\n self.$search.prop('disabled', true);\n });\n\n container.on('focus', function (evt) {\n self.$search.trigger('focus');\n });\n\n container.on('results:focus', function (params) {\n self.$search.attr('aria-activedescendant', params.id);\n });\n\n this.$selection.on('focusin', '.select2-search--inline', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('focusout', '.select2-search--inline', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', '.select2-search--inline', function (evt) {\n evt.stopPropagation();\n\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n\n var key = evt.which;\n\n if (key === KEYS.BACKSPACE && self.$search.val() === '') {\n var $previousChoice = self.$searchContainer\n .prev('.select2-selection__choice');\n\n if ($previousChoice.length > 0) {\n var item = $previousChoice.data('data');\n\n self.searchRemoveChoice(item);\n\n evt.preventDefault();\n }\n }\n });\n\n // Try to detect the IE version should the `documentMode` property that\n // is stored on the document. This is only implemented in IE and is\n // slightly cleaner than doing a user agent check.\n // This property is not available in Edge, but Edge also doesn't have\n // this bug.\n var msie = document.documentMode;\n var disableInputEvents = msie && msie <= 11;\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$selection.on(\n 'input.searchcheck',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents) {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n // Unbind the duplicated `keyup` event\n self.$selection.off('keyup.search');\n }\n );\n\n this.$selection.on(\n 'keyup.search input.search',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents && evt.type === 'input') {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n var key = evt.which;\n\n // We can freely ignore events from modifier keys\n if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\n return;\n }\n\n // Tabbing will be handled during the `keydown` phase\n if (key == KEYS.TAB) {\n return;\n }\n\n self.handleSearch(evt);\n }\n );\n };\n\n /**\n * This method will transfer the tabindex attribute from the rendered\n * selection to the search box. This allows for the search box to be used as\n * the primary focus instead of the selection container.\n *\n * @private\n */\n Search.prototype._transferTabIndex = function (decorated) {\n this.$search.attr('tabindex', this.$selection.attr('tabindex'));\n this.$selection.attr('tabindex', '-1');\n };\n\n Search.prototype.createPlaceholder = function (decorated, placeholder) {\n this.$search.attr('placeholder', placeholder.text);\n };\n\n Search.prototype.update = function (decorated, data) {\n var searchHadFocus = this.$search[0] == document.activeElement;\n\n this.$search.attr('placeholder', '');\n\n decorated.call(this, data);\n\n this.$selection.find('.select2-selection__rendered')\n .append(this.$searchContainer);\n\n this.resizeSearch();\n if (searchHadFocus) {\n this.$search.focus();\n }\n };\n\n Search.prototype.handleSearch = function () {\n this.resizeSearch();\n\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.searchRemoveChoice = function (decorated, item) {\n this.trigger('unselect', {\n data: item\n });\n\n this.$search.val(item.text);\n this.handleSearch();\n };\n\n Search.prototype.resizeSearch = function () {\n this.$search.css('width', '25px');\n\n var width = '';\n\n if (this.$search.attr('placeholder') !== '') {\n width = this.$selection.find('.select2-selection__rendered').innerWidth();\n } else {\n var minimumWidth = this.$search.val().length + 1;\n\n width = (minimumWidth * 0.75) + 'em';\n }\n\n this.$search.css('width', width);\n };\n\n return Search;\n});\n\nS2.define('select2/selection/eventRelay',[\n 'jquery'\n], function ($) {\n function EventRelay () { }\n\n EventRelay.prototype.bind = function (decorated, container, $container) {\n var self = this;\n var relayEvents = [\n 'open', 'opening',\n 'close', 'closing',\n 'select', 'selecting',\n 'unselect', 'unselecting'\n ];\n\n var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];\n\n decorated.call(this, container, $container);\n\n container.on('*', function (name, params) {\n // Ignore events that should not be relayed\n if ($.inArray(name, relayEvents) === -1) {\n return;\n }\n\n // The parameters should always be an object\n params = params || {};\n\n // Generate the jQuery event for the Select2 event\n var evt = $.Event('select2:' + name, {\n params: params\n });\n\n self.$element.trigger(evt);\n\n // Only handle preventable events if it was one\n if ($.inArray(name, preventableEvents) === -1) {\n return;\n }\n\n params.prevented = evt.isDefaultPrevented();\n });\n };\n\n return EventRelay;\n});\n\nS2.define('select2/translation',[\n 'jquery',\n 'require'\n], function ($, require) {\n function Translation (dict) {\n this.dict = dict || {};\n }\n\n Translation.prototype.all = function () {\n return this.dict;\n };\n\n Translation.prototype.get = function (key) {\n return this.dict[key];\n };\n\n Translation.prototype.extend = function (translation) {\n this.dict = $.extend({}, translation.all(), this.dict);\n };\n\n // Static functions\n\n Translation._cache = {};\n\n Translation.loadPath = function (path) {\n if (!(path in Translation._cache)) {\n var translations = require(path);\n\n Translation._cache[path] = translations;\n }\n\n return new Translation(Translation._cache[path]);\n };\n\n return Translation;\n});\n\nS2.define('select2/diacritics',[\n\n], function () {\n var diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n };\n\n return diacritics;\n});\n\nS2.define('select2/data/base',[\n '../utils'\n], function (Utils) {\n function BaseAdapter ($element, options) {\n BaseAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseAdapter, Utils.Observable);\n\n BaseAdapter.prototype.current = function (callback) {\n throw new Error('The `current` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.query = function (params, callback) {\n throw new Error('The `query` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.bind = function (container, $container) {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.destroy = function () {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.generateResultId = function (container, data) {\n var id = container.id + '-result-';\n\n id += Utils.generateChars(4);\n\n if (data.id != null) {\n id += '-' + data.id.toString();\n } else {\n id += '-' + Utils.generateChars(4);\n }\n return id;\n };\n\n return BaseAdapter;\n});\n\nS2.define('select2/data/select',[\n './base',\n '../utils',\n 'jquery'\n], function (BaseAdapter, Utils, $) {\n function SelectAdapter ($element, options) {\n this.$element = $element;\n this.options = options;\n\n SelectAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(SelectAdapter, BaseAdapter);\n\n SelectAdapter.prototype.current = function (callback) {\n var data = [];\n var self = this;\n\n this.$element.find(':selected').each(function () {\n var $option = $(this);\n\n var option = self.item($option);\n\n data.push(option);\n });\n\n callback(data);\n };\n\n SelectAdapter.prototype.select = function (data) {\n var self = this;\n\n data.selected = true;\n\n // If data.element is a DOM node, use it instead\n if ($(data.element).is('option')) {\n data.element.selected = true;\n\n this.$element.trigger('change');\n\n return;\n }\n\n if (this.$element.prop('multiple')) {\n this.current(function (currentData) {\n var val = [];\n\n data = [data];\n data.push.apply(data, currentData);\n\n for (var d = 0; d < data.length; d++) {\n var id = data[d].id;\n\n if ($.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n self.$element.trigger('change');\n });\n } else {\n var val = data.id;\n\n this.$element.val(val);\n this.$element.trigger('change');\n }\n };\n\n SelectAdapter.prototype.unselect = function (data) {\n var self = this;\n\n if (!this.$element.prop('multiple')) {\n return;\n }\n\n data.selected = false;\n\n if ($(data.element).is('option')) {\n data.element.selected = false;\n\n this.$element.trigger('change');\n\n return;\n }\n\n this.current(function (currentData) {\n var val = [];\n\n for (var d = 0; d < currentData.length; d++) {\n var id = currentData[d].id;\n\n if (id !== data.id && $.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n\n self.$element.trigger('change');\n });\n };\n\n SelectAdapter.prototype.bind = function (container, $container) {\n var self = this;\n\n this.container = container;\n\n container.on('select', function (params) {\n self.select(params.data);\n });\n\n container.on('unselect', function (params) {\n self.unselect(params.data);\n });\n };\n\n SelectAdapter.prototype.destroy = function () {\n // Remove anything added to child elements\n this.$element.find('*').each(function () {\n // Remove any custom data set by Select2\n $.removeData(this, 'data');\n });\n };\n\n SelectAdapter.prototype.query = function (params, callback) {\n var data = [];\n var self = this;\n\n var $options = this.$element.children();\n\n $options.each(function () {\n var $option = $(this);\n\n if (!$option.is('option') && !$option.is('optgroup')) {\n return;\n }\n\n var option = self.item($option);\n\n var matches = self.matches(params, option);\n\n if (matches !== null) {\n data.push(matches);\n }\n });\n\n callback({\n results: data\n });\n };\n\n SelectAdapter.prototype.addOptions = function ($options) {\n Utils.appendMany(this.$element, $options);\n };\n\n SelectAdapter.prototype.option = function (data) {\n var option;\n\n if (data.children) {\n option = document.createElement('optgroup');\n option.label = data.text;\n } else {\n option = document.createElement('option');\n\n if (option.textContent !== undefined) {\n option.textContent = data.text;\n } else {\n option.innerText = data.text;\n }\n }\n\n if (data.id) {\n option.value = data.id;\n }\n\n if (data.disabled) {\n option.disabled = true;\n }\n\n if (data.selected) {\n option.selected = true;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n var $option = $(option);\n\n var normalizedData = this._normalizeItem(data);\n normalizedData.element = option;\n\n // Override the option's data with the combined data\n $.data(option, 'data', normalizedData);\n\n return $option;\n };\n\n SelectAdapter.prototype.item = function ($option) {\n var data = {};\n\n data = $.data($option[0], 'data');\n\n if (data != null) {\n return data;\n }\n\n if ($option.is('option')) {\n data = {\n id: $option.val(),\n text: $option.text(),\n disabled: $option.prop('disabled'),\n selected: $option.prop('selected'),\n title: $option.prop('title')\n };\n } else if ($option.is('optgroup')) {\n data = {\n text: $option.prop('label'),\n children: [],\n title: $option.prop('title')\n };\n\n var $children = $option.children('option');\n var children = [];\n\n for (var c = 0; c < $children.length; c++) {\n var $child = $($children[c]);\n\n var child = this.item($child);\n\n children.push(child);\n }\n\n data.children = children;\n }\n\n data = this._normalizeItem(data);\n data.element = $option[0];\n\n $.data($option[0], 'data', data);\n\n return data;\n };\n\n SelectAdapter.prototype._normalizeItem = function (item) {\n if (!$.isPlainObject(item)) {\n item = {\n id: item,\n text: item\n };\n }\n\n item = $.extend({}, {\n text: ''\n }, item);\n\n var defaults = {\n selected: false,\n disabled: false\n };\n\n if (item.id != null) {\n item.id = item.id.toString();\n }\n\n if (item.text != null) {\n item.text = item.text.toString();\n }\n\n if (item._resultId == null && item.id && this.container != null) {\n item._resultId = this.generateResultId(this.container, item);\n }\n\n return $.extend({}, defaults, item);\n };\n\n SelectAdapter.prototype.matches = function (params, data) {\n var matcher = this.options.get('matcher');\n\n return matcher(params, data);\n };\n\n return SelectAdapter;\n});\n\nS2.define('select2/data/array',[\n './select',\n '../utils',\n 'jquery'\n], function (SelectAdapter, Utils, $) {\n function ArrayAdapter ($element, options) {\n var data = options.get('data') || [];\n\n ArrayAdapter.__super__.constructor.call(this, $element, options);\n\n this.addOptions(this.convertToOptions(data));\n }\n\n Utils.Extend(ArrayAdapter, SelectAdapter);\n\n ArrayAdapter.prototype.select = function (data) {\n var $option = this.$element.find('option').filter(function (i, elm) {\n return elm.value == data.id.toString();\n });\n\n if ($option.length === 0) {\n $option = this.option(data);\n\n this.addOptions($option);\n }\n\n ArrayAdapter.__super__.select.call(this, data);\n };\n\n ArrayAdapter.prototype.convertToOptions = function (data) {\n var self = this;\n\n var $existing = this.$element.find('option');\n var existingIds = $existing.map(function () {\n return self.item($(this)).id;\n }).get();\n\n var $options = [];\n\n // Filter out all items except for the one passed in the argument\n function onlyItem (item) {\n return function () {\n return $(this).val() == item.id;\n };\n }\n\n for (var d = 0; d < data.length; d++) {\n var item = this._normalizeItem(data[d]);\n\n // Skip items which were pre-loaded, only merge the data\n if ($.inArray(item.id, existingIds) >= 0) {\n var $existingOption = $existing.filter(onlyItem(item));\n\n var existingData = this.item($existingOption);\n var newData = $.extend(true, {}, item, existingData);\n\n var $newOption = this.option(newData);\n\n $existingOption.replaceWith($newOption);\n\n continue;\n }\n\n var $option = this.option(item);\n\n if (item.children) {\n var $children = this.convertToOptions(item.children);\n\n Utils.appendMany($option, $children);\n }\n\n $options.push($option);\n }\n\n return $options;\n };\n\n return ArrayAdapter;\n});\n\nS2.define('select2/data/ajax',[\n './array',\n '../utils',\n 'jquery'\n], function (ArrayAdapter, Utils, $) {\n function AjaxAdapter ($element, options) {\n this.ajaxOptions = this._applyDefaults(options.get('ajax'));\n\n if (this.ajaxOptions.processResults != null) {\n this.processResults = this.ajaxOptions.processResults;\n }\n\n AjaxAdapter.__super__.constructor.call(this, $element, options);\n }\n\n Utils.Extend(AjaxAdapter, ArrayAdapter);\n\n AjaxAdapter.prototype._applyDefaults = function (options) {\n var defaults = {\n data: function (params) {\n return $.extend({}, params, {\n q: params.term\n });\n },\n transport: function (params, success, failure) {\n var $request = $.ajax(params);\n\n $request.then(success);\n $request.fail(failure);\n\n return $request;\n }\n };\n\n return $.extend({}, defaults, options, true);\n };\n\n AjaxAdapter.prototype.processResults = function (results) {\n return results;\n };\n\n AjaxAdapter.prototype.query = function (params, callback) {\n var matches = [];\n var self = this;\n\n if (this._request != null) {\n // JSONP requests cannot always be aborted\n if ($.isFunction(this._request.abort)) {\n this._request.abort();\n }\n\n this._request = null;\n }\n\n var options = $.extend({\n type: 'GET'\n }, this.ajaxOptions);\n\n if (typeof options.url === 'function') {\n options.url = options.url.call(this.$element, params);\n }\n\n if (typeof options.data === 'function') {\n options.data = options.data.call(this.$element, params);\n }\n\n function request () {\n var $request = options.transport(options, function (data) {\n var results = self.processResults(data, params);\n\n if (self.options.get('debug') && window.console && console.error) {\n // Check to make sure that the response included a `results` key.\n if (!results || !results.results || !$.isArray(results.results)) {\n console.error(\n 'Select2: The AJAX results did not return an array in the ' +\n '`results` key of the response.'\n );\n }\n }\n\n callback(results);\n }, function () {\n // Attempt to detect if a request was aborted\n // Only works if the transport exposes a status property\n if ($request.status && $request.status === '0') {\n return;\n }\n\n self.trigger('results:message', {\n message: 'errorLoading'\n });\n });\n\n self._request = $request;\n }\n\n if (this.ajaxOptions.delay && params.term != null) {\n if (this._queryTimeout) {\n window.clearTimeout(this._queryTimeout);\n }\n\n this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\n } else {\n request();\n }\n };\n\n return AjaxAdapter;\n});\n\nS2.define('select2/data/tags',[\n 'jquery'\n], function ($) {\n function Tags (decorated, $element, options) {\n var tags = options.get('tags');\n\n var createTag = options.get('createTag');\n\n if (createTag !== undefined) {\n this.createTag = createTag;\n }\n\n var insertTag = options.get('insertTag');\n\n if (insertTag !== undefined) {\n this.insertTag = insertTag;\n }\n\n decorated.call(this, $element, options);\n\n if ($.isArray(tags)) {\n for (var t = 0; t < tags.length; t++) {\n var tag = tags[t];\n var item = this._normalizeItem(tag);\n\n var $option = this.option(item);\n\n this.$element.append($option);\n }\n }\n }\n\n Tags.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n this._removeOldTags();\n\n if (params.term == null || params.page != null) {\n decorated.call(this, params, callback);\n return;\n }\n\n function wrapper (obj, child) {\n var data = obj.results;\n\n for (var i = 0; i < data.length; i++) {\n var option = data[i];\n\n var checkChildren = (\n option.children != null &&\n !wrapper({\n results: option.children\n }, true)\n );\n\n var checkText = option.text === params.term;\n\n if (checkText || checkChildren) {\n if (child) {\n return false;\n }\n\n obj.data = data;\n callback(obj);\n\n return;\n }\n }\n\n if (child) {\n return true;\n }\n\n var tag = self.createTag(params);\n\n if (tag != null) {\n var $option = self.option(tag);\n $option.attr('data-select2-tag', true);\n\n self.addOptions([$option]);\n\n self.insertTag(data, tag);\n }\n\n obj.results = data;\n\n callback(obj);\n }\n\n decorated.call(this, params, wrapper);\n };\n\n Tags.prototype.createTag = function (decorated, params) {\n var term = $.trim(params.term);\n\n if (term === '') {\n return null;\n }\n\n return {\n id: term,\n text: term\n };\n };\n\n Tags.prototype.insertTag = function (_, data, tag) {\n data.unshift(tag);\n };\n\n Tags.prototype._removeOldTags = function (_) {\n var tag = this._lastTag;\n\n var $options = this.$element.find('option[data-select2-tag]');\n\n $options.each(function () {\n if (this.selected) {\n return;\n }\n\n $(this).remove();\n });\n };\n\n return Tags;\n});\n\nS2.define('select2/data/tokenizer',[\n 'jquery'\n], function ($) {\n function Tokenizer (decorated, $element, options) {\n var tokenizer = options.get('tokenizer');\n\n if (tokenizer !== undefined) {\n this.tokenizer = tokenizer;\n }\n\n decorated.call(this, $element, options);\n }\n\n Tokenizer.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n\n this.$search = container.dropdown.$search || container.selection.$search ||\n $container.find('.select2-search__field');\n };\n\n Tokenizer.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n function createAndSelect (data) {\n // Normalize the data object so we can use it for checks\n var item = self._normalizeItem(data);\n\n // Check if the data object already exists as a tag\n // Select it if it doesn't\n var $existingOptions = self.$element.find('option').filter(function () {\n return $(this).val() === item.id;\n });\n\n // If an existing option wasn't found for it, create the option\n if (!$existingOptions.length) {\n var $option = self.option(item);\n $option.attr('data-select2-tag', true);\n\n self._removeOldTags();\n self.addOptions([$option]);\n }\n\n // Select the item, now that we know there is an option for it\n select(item);\n }\n\n function select (data) {\n self.trigger('select', {\n data: data\n });\n }\n\n params.term = params.term || '';\n\n var tokenData = this.tokenizer(params, this.options, createAndSelect);\n\n if (tokenData.term !== params.term) {\n // Replace the search term if we have the search box\n if (this.$search.length) {\n this.$search.val(tokenData.term);\n this.$search.focus();\n }\n\n params.term = tokenData.term;\n }\n\n decorated.call(this, params, callback);\n };\n\n Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\n var separators = options.get('tokenSeparators') || [];\n var term = params.term;\n var i = 0;\n\n var createTag = this.createTag || function (params) {\n return {\n id: params.term,\n text: params.term\n };\n };\n\n while (i < term.length) {\n var termChar = term[i];\n\n if ($.inArray(termChar, separators) === -1) {\n i++;\n\n continue;\n }\n\n var part = term.substr(0, i);\n var partParams = $.extend({}, params, {\n term: part\n });\n\n var data = createTag(partParams);\n\n if (data == null) {\n i++;\n continue;\n }\n\n callback(data);\n\n // Reset the term to not include the tokenized portion\n term = term.substr(i + 1) || '';\n i = 0;\n }\n\n return {\n term: term\n };\n };\n\n return Tokenizer;\n});\n\nS2.define('select2/data/minimumInputLength',[\n\n], function () {\n function MinimumInputLength (decorated, $e, options) {\n this.minimumInputLength = options.get('minimumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MinimumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (params.term.length < this.minimumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooShort',\n args: {\n minimum: this.minimumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MinimumInputLength;\n});\n\nS2.define('select2/data/maximumInputLength',[\n\n], function () {\n function MaximumInputLength (decorated, $e, options) {\n this.maximumInputLength = options.get('maximumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (this.maximumInputLength > 0 &&\n params.term.length > this.maximumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooLong',\n args: {\n maximum: this.maximumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MaximumInputLength;\n});\n\nS2.define('select2/data/maximumSelectionLength',[\n\n], function (){\n function MaximumSelectionLength (decorated, $e, options) {\n this.maximumSelectionLength = options.get('maximumSelectionLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumSelectionLength.prototype.query =\n function (decorated, params, callback) {\n var self = this;\n\n this.current(function (currentData) {\n var count = currentData != null ? currentData.length : 0;\n if (self.maximumSelectionLength > 0 &&\n count >= self.maximumSelectionLength) {\n self.trigger('results:message', {\n message: 'maximumSelected',\n args: {\n maximum: self.maximumSelectionLength\n }\n });\n return;\n }\n decorated.call(self, params, callback);\n });\n };\n\n return MaximumSelectionLength;\n});\n\nS2.define('select2/dropdown',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Dropdown ($element, options) {\n this.$element = $element;\n this.options = options;\n\n Dropdown.__super__.constructor.call(this);\n }\n\n Utils.Extend(Dropdown, Utils.Observable);\n\n Dropdown.prototype.render = function () {\n var $dropdown = $(\n '<span class=\"select2-dropdown\">' +\n '<span class=\"select2-results\"></span>' +\n '</span>'\n );\n\n $dropdown.attr('dir', this.options.get('dir'));\n\n this.$dropdown = $dropdown;\n\n return $dropdown;\n };\n\n Dropdown.prototype.bind = function () {\n // Should be implemented in subclasses\n };\n\n Dropdown.prototype.position = function ($dropdown, $container) {\n // Should be implmented in subclasses\n };\n\n Dropdown.prototype.destroy = function () {\n // Remove the dropdown from the DOM\n this.$dropdown.remove();\n };\n\n return Dropdown;\n});\n\nS2.define('select2/dropdown/search',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function Search () { }\n\n Search.prototype.render = function (decorated) {\n var $rendered = decorated.call(this);\n\n var $search = $(\n '<span class=\"select2-search select2-search--dropdown\">' +\n '<input class=\"select2-search__field\" type=\"search\" tabindex=\"-1\"' +\n ' autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\"' +\n ' spellcheck=\"false\" role=\"textbox\" />' +\n '</span>'\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n $rendered.prepend($search);\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n this.$search.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n });\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$search.on('input', function (evt) {\n // Unbind the duplicated `keyup` event\n $(this).off('keyup');\n });\n\n this.$search.on('keyup input', function (evt) {\n self.handleSearch(evt);\n });\n\n container.on('open', function () {\n self.$search.attr('tabindex', 0);\n\n self.$search.focus();\n\n window.setTimeout(function () {\n self.$search.focus();\n }, 0);\n });\n\n container.on('close', function () {\n self.$search.attr('tabindex', -1);\n\n self.$search.val('');\n });\n\n container.on('focus', function () {\n if (container.isOpen()) {\n self.$search.focus();\n }\n });\n\n container.on('results:all', function (params) {\n if (params.query.term == null || params.query.term === '') {\n var showSearch = self.showSearch(params);\n\n if (showSearch) {\n self.$searchContainer.removeClass('select2-search--hide');\n } else {\n self.$searchContainer.addClass('select2-search--hide');\n }\n }\n });\n };\n\n Search.prototype.handleSearch = function (evt) {\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.showSearch = function (_, params) {\n return true;\n };\n\n return Search;\n});\n\nS2.define('select2/dropdown/hidePlaceholder',[\n\n], function () {\n function HidePlaceholder (decorated, $element, options, dataAdapter) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n HidePlaceholder.prototype.append = function (decorated, data) {\n data.results = this.removePlaceholder(data.results);\n\n decorated.call(this, data);\n };\n\n HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n HidePlaceholder.prototype.removePlaceholder = function (_, data) {\n var modifiedData = data.slice(0);\n\n for (var d = data.length - 1; d >= 0; d--) {\n var item = data[d];\n\n if (this.placeholder.id === item.id) {\n modifiedData.splice(d, 1);\n }\n }\n\n return modifiedData;\n };\n\n return HidePlaceholder;\n});\n\nS2.define('select2/dropdown/infiniteScroll',[\n 'jquery'\n], function ($) {\n function InfiniteScroll (decorated, $element, options, dataAdapter) {\n this.lastParams = {};\n\n decorated.call(this, $element, options, dataAdapter);\n\n this.$loadingMore = this.createLoadingMore();\n this.loading = false;\n }\n\n InfiniteScroll.prototype.append = function (decorated, data) {\n this.$loadingMore.remove();\n this.loading = false;\n\n decorated.call(this, data);\n\n if (this.showLoadingMore(data)) {\n this.$results.append(this.$loadingMore);\n }\n };\n\n InfiniteScroll.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('query', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n container.on('query:append', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n this.$results.on('scroll', function () {\n var isLoadMoreVisible = $.contains(\n document.documentElement,\n self.$loadingMore[0]\n );\n\n if (self.loading || !isLoadMoreVisible) {\n return;\n }\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var loadingMoreOffset = self.$loadingMore.offset().top +\n self.$loadingMore.outerHeight(false);\n\n if (currentOffset + 50 >= loadingMoreOffset) {\n self.loadMore();\n }\n });\n };\n\n InfiniteScroll.prototype.loadMore = function () {\n this.loading = true;\n\n var params = $.extend({}, {page: 1}, this.lastParams);\n\n params.page++;\n\n this.trigger('query:append', params);\n };\n\n InfiniteScroll.prototype.showLoadingMore = function (_, data) {\n return data.pagination && data.pagination.more;\n };\n\n InfiniteScroll.prototype.createLoadingMore = function () {\n var $option = $(\n '<li ' +\n 'class=\"select2-results__option select2-results__option--load-more\"' +\n 'role=\"treeitem\" aria-disabled=\"true\"></li>'\n );\n\n var message = this.options.get('translations').get('loadingMore');\n\n $option.html(message(this.lastParams));\n\n return $option;\n };\n\n return InfiniteScroll;\n});\n\nS2.define('select2/dropdown/attachBody',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function AttachBody (decorated, $element, options) {\n this.$dropdownParent = options.get('dropdownParent') || $(document.body);\n\n decorated.call(this, $element, options);\n }\n\n AttachBody.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n var setupResultsEvents = false;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self._showDropdown();\n self._attachPositioningHandler(container);\n\n if (!setupResultsEvents) {\n setupResultsEvents = true;\n\n container.on('results:all', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n\n container.on('results:append', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n }\n });\n\n container.on('close', function () {\n self._hideDropdown();\n self._detachPositioningHandler(container);\n });\n\n this.$dropdownContainer.on('mousedown', function (evt) {\n evt.stopPropagation();\n });\n };\n\n AttachBody.prototype.destroy = function (decorated) {\n decorated.call(this);\n\n this.$dropdownContainer.remove();\n };\n\n AttachBody.prototype.position = function (decorated, $dropdown, $container) {\n // Clone all of the container classes\n $dropdown.attr('class', $container.attr('class'));\n\n $dropdown.removeClass('select2');\n $dropdown.addClass('select2-container--open');\n\n $dropdown.css({\n position: 'absolute',\n top: -999999\n });\n\n this.$container = $container;\n };\n\n AttachBody.prototype.render = function (decorated) {\n var $container = $('<span></span>');\n\n var $dropdown = decorated.call(this);\n $container.append($dropdown);\n\n this.$dropdownContainer = $container;\n\n return $container;\n };\n\n AttachBody.prototype._hideDropdown = function (decorated) {\n this.$dropdownContainer.detach();\n };\n\n AttachBody.prototype._attachPositioningHandler =\n function (decorated, container) {\n var self = this;\n\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.each(function () {\n $(this).data('select2-scroll-position', {\n x: $(this).scrollLeft(),\n y: $(this).scrollTop()\n });\n });\n\n $watchers.on(scrollEvent, function (ev) {\n var position = $(this).data('select2-scroll-position');\n $(this).scrollTop(position.y);\n });\n\n $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\n function (e) {\n self._positionDropdown();\n self._resizeDropdown();\n });\n };\n\n AttachBody.prototype._detachPositioningHandler =\n function (decorated, container) {\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.off(scrollEvent);\n\n $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\n };\n\n AttachBody.prototype._positionDropdown = function () {\n var $window = $(window);\n\n var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\n var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\n\n var newDirection = null;\n\n var offset = this.$container.offset();\n\n offset.bottom = offset.top + this.$container.outerHeight(false);\n\n var container = {\n height: this.$container.outerHeight(false)\n };\n\n container.top = offset.top;\n container.bottom = offset.top + container.height;\n\n var dropdown = {\n height: this.$dropdown.outerHeight(false)\n };\n\n var viewport = {\n top: $window.scrollTop(),\n bottom: $window.scrollTop() + $window.height()\n };\n\n var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\n var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\n\n var css = {\n left: offset.left,\n top: container.bottom\n };\n\n // Determine what the parent element is to use for calciulating the offset\n var $offsetParent = this.$dropdownParent;\n\n // For statically positoned elements, we need to get the element\n // that is determining the offset\n if ($offsetParent.css('position') === 'static') {\n $offsetParent = $offsetParent.offsetParent();\n }\n\n var parentOffset = $offsetParent.offset();\n\n css.top -= parentOffset.top;\n css.left -= parentOffset.left;\n\n if (!isCurrentlyAbove && !isCurrentlyBelow) {\n newDirection = 'below';\n }\n\n if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\n newDirection = 'above';\n } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\n newDirection = 'below';\n }\n\n if (newDirection == 'above' ||\n (isCurrentlyAbove && newDirection !== 'below')) {\n css.top = container.top - parentOffset.top - dropdown.height;\n }\n\n if (newDirection != null) {\n this.$dropdown\n .removeClass('select2-dropdown--below select2-dropdown--above')\n .addClass('select2-dropdown--' + newDirection);\n this.$container\n .removeClass('select2-container--below select2-container--above')\n .addClass('select2-container--' + newDirection);\n }\n\n this.$dropdownContainer.css(css);\n };\n\n AttachBody.prototype._resizeDropdown = function () {\n var css = {\n width: this.$container.outerWidth(false) + 'px'\n };\n\n if (this.options.get('dropdownAutoWidth')) {\n css.minWidth = css.width;\n css.position = 'relative';\n css.width = 'auto';\n }\n\n this.$dropdown.css(css);\n };\n\n AttachBody.prototype._showDropdown = function (decorated) {\n this.$dropdownContainer.appendTo(this.$dropdownParent);\n\n this._positionDropdown();\n this._resizeDropdown();\n };\n\n return AttachBody;\n});\n\nS2.define('select2/dropdown/minimumResultsForSearch',[\n\n], function () {\n function countResults (data) {\n var count = 0;\n\n for (var d = 0; d < data.length; d++) {\n var item = data[d];\n\n if (item.children) {\n count += countResults(item.children);\n } else {\n count++;\n }\n }\n\n return count;\n }\n\n function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\n this.minimumResultsForSearch = options.get('minimumResultsForSearch');\n\n if (this.minimumResultsForSearch < 0) {\n this.minimumResultsForSearch = Infinity;\n }\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\n if (countResults(params.data.results) < this.minimumResultsForSearch) {\n return false;\n }\n\n return decorated.call(this, params);\n };\n\n return MinimumResultsForSearch;\n});\n\nS2.define('select2/dropdown/selectOnClose',[\n\n], function () {\n function SelectOnClose () { }\n\n SelectOnClose.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('close', function (params) {\n self._handleSelectOnClose(params);\n });\n };\n\n SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\n if (params && params.originalSelect2Event != null) {\n var event = params.originalSelect2Event;\n\n // Don't select an item if the close event was triggered from a select or\n // unselect event\n if (event._type === 'select' || event._type === 'unselect') {\n return;\n }\n }\n\n var $highlightedResults = this.getHighlightedResults();\n\n // Only select highlighted results\n if ($highlightedResults.length < 1) {\n return;\n }\n\n var data = $highlightedResults.data('data');\n\n // Don't re-select already selected resulte\n if (\n (data.element != null && data.element.selected) ||\n (data.element == null && data.selected)\n ) {\n return;\n }\n\n this.trigger('select', {\n data: data\n });\n };\n\n return SelectOnClose;\n});\n\nS2.define('select2/dropdown/closeOnSelect',[\n\n], function () {\n function CloseOnSelect () { }\n\n CloseOnSelect.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('select', function (evt) {\n self._selectTriggered(evt);\n });\n\n container.on('unselect', function (evt) {\n self._selectTriggered(evt);\n });\n };\n\n CloseOnSelect.prototype._selectTriggered = function (_, evt) {\n var originalEvent = evt.originalEvent;\n\n // Don't close if the control key is being held\n if (originalEvent && originalEvent.ctrlKey) {\n return;\n }\n\n this.trigger('close', {\n originalEvent: originalEvent,\n originalSelect2Event: evt\n });\n };\n\n return CloseOnSelect;\n});\n\nS2.define('select2/i18n/en',[],function () {\n // English\n return {\n errorLoading: function () {\n return 'The results could not be loaded.';\n },\n inputTooLong: function (args) {\n var overChars = args.input.length - args.maximum;\n\n var message = 'Please delete ' + overChars + ' character';\n\n if (overChars != 1) {\n message += 's';\n }\n\n return message;\n },\n inputTooShort: function (args) {\n var remainingChars = args.minimum - args.input.length;\n\n var message = 'Please enter ' + remainingChars + ' or more characters';\n\n return message;\n },\n loadingMore: function () {\n return 'Loading more results…';\n },\n maximumSelected: function (args) {\n var message = 'You can only select ' + args.maximum + ' item';\n\n if (args.maximum != 1) {\n message += 's';\n }\n\n return message;\n },\n noResults: function () {\n return 'No results found';\n },\n searching: function () {\n return 'Searching…';\n }\n };\n});\n\nS2.define('select2/defaults',[\n 'jquery',\n 'require',\n\n './results',\n\n './selection/single',\n './selection/multiple',\n './selection/placeholder',\n './selection/allowClear',\n './selection/search',\n './selection/eventRelay',\n\n './utils',\n './translation',\n './diacritics',\n\n './data/select',\n './data/array',\n './data/ajax',\n './data/tags',\n './data/tokenizer',\n './data/minimumInputLength',\n './data/maximumInputLength',\n './data/maximumSelectionLength',\n\n './dropdown',\n './dropdown/search',\n './dropdown/hidePlaceholder',\n './dropdown/infiniteScroll',\n './dropdown/attachBody',\n './dropdown/minimumResultsForSearch',\n './dropdown/selectOnClose',\n './dropdown/closeOnSelect',\n\n './i18n/en'\n], function ($, require,\n\n ResultsList,\n\n SingleSelection, MultipleSelection, Placeholder, AllowClear,\n SelectionSearch, EventRelay,\n\n Utils, Translation, DIACRITICS,\n\n SelectData, ArrayData, AjaxData, Tags, Tokenizer,\n MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\n\n Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\n AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\n\n EnglishTranslation) {\n function Defaults () {\n this.reset();\n }\n\n Defaults.prototype.apply = function (options) {\n options = $.extend(true, {}, this.defaults, options);\n\n if (options.dataAdapter == null) {\n if (options.ajax != null) {\n options.dataAdapter = AjaxData;\n } else if (options.data != null) {\n options.dataAdapter = ArrayData;\n } else {\n options.dataAdapter = SelectData;\n }\n\n if (options.minimumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MinimumInputLength\n );\n }\n\n if (options.maximumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumInputLength\n );\n }\n\n if (options.maximumSelectionLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumSelectionLength\n );\n }\n\n if (options.tags) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\n }\n\n if (options.tokenSeparators != null || options.tokenizer != null) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Tokenizer\n );\n }\n\n if (options.query != null) {\n var Query = require(options.amdBase + 'compat/query');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Query\n );\n }\n\n if (options.initSelection != null) {\n var InitSelection = require(options.amdBase + 'compat/initSelection');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n InitSelection\n );\n }\n }\n\n if (options.resultsAdapter == null) {\n options.resultsAdapter = ResultsList;\n\n if (options.ajax != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n InfiniteScroll\n );\n }\n\n if (options.placeholder != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n HidePlaceholder\n );\n }\n\n if (options.selectOnClose) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n SelectOnClose\n );\n }\n }\n\n if (options.dropdownAdapter == null) {\n if (options.multiple) {\n options.dropdownAdapter = Dropdown;\n } else {\n var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\n\n options.dropdownAdapter = SearchableDropdown;\n }\n\n if (options.minimumResultsForSearch !== 0) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n MinimumResultsForSearch\n );\n }\n\n if (options.closeOnSelect) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n CloseOnSelect\n );\n }\n\n if (\n options.dropdownCssClass != null ||\n options.dropdownCss != null ||\n options.adaptDropdownCssClass != null\n ) {\n var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n DropdownCSS\n );\n }\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n AttachBody\n );\n }\n\n if (options.selectionAdapter == null) {\n if (options.multiple) {\n options.selectionAdapter = MultipleSelection;\n } else {\n options.selectionAdapter = SingleSelection;\n }\n\n // Add the placeholder mixin if a placeholder was specified\n if (options.placeholder != null) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n Placeholder\n );\n }\n\n if (options.allowClear) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n AllowClear\n );\n }\n\n if (options.multiple) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n SelectionSearch\n );\n }\n\n if (\n options.containerCssClass != null ||\n options.containerCss != null ||\n options.adaptContainerCssClass != null\n ) {\n var ContainerCSS = require(options.amdBase + 'compat/containerCss');\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n ContainerCSS\n );\n }\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n EventRelay\n );\n }\n\n if (typeof options.language === 'string') {\n // Check if the language is specified with a region\n if (options.language.indexOf('-') > 0) {\n // Extract the region information if it is included\n var languageParts = options.language.split('-');\n var baseLanguage = languageParts[0];\n\n options.language = [options.language, baseLanguage];\n } else {\n options.language = [options.language];\n }\n }\n\n if ($.isArray(options.language)) {\n var languages = new Translation();\n options.language.push('en');\n\n var languageNames = options.language;\n\n for (var l = 0; l < languageNames.length; l++) {\n var name = languageNames[l];\n var language = {};\n\n try {\n // Try to load it with the original name\n language = Translation.loadPath(name);\n } catch (e) {\n try {\n // If we couldn't load it, check if it wasn't the full path\n name = this.defaults.amdLanguageBase + name;\n language = Translation.loadPath(name);\n } catch (ex) {\n // The translation could not be loaded at all. Sometimes this is\n // because of a configuration problem, other times this can be\n // because of how Select2 helps load all possible translation files.\n if (options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The language file for \"' + name + '\" could not be ' +\n 'automatically loaded. A fallback will be used instead.'\n );\n }\n\n continue;\n }\n }\n\n languages.extend(language);\n }\n\n options.translations = languages;\n } else {\n var baseTranslation = Translation.loadPath(\n this.defaults.amdLanguageBase + 'en'\n );\n var customTranslation = new Translation(options.language);\n\n customTranslation.extend(baseTranslation);\n\n options.translations = customTranslation;\n }\n\n return options;\n };\n\n Defaults.prototype.reset = function () {\n function stripDiacritics (text) {\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n function match(a) {\n return DIACRITICS[a] || a;\n }\n\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n }\n\n function matcher (params, data) {\n // Always return the object if there is nothing to compare\n if ($.trim(params.term) === '') {\n return data;\n }\n\n // Do a recursive check for options with children\n if (data.children && data.children.length > 0) {\n // Clone the data object if there are children\n // This is required as we modify the object to remove any non-matches\n var match = $.extend(true, {}, data);\n\n // Check each child of the option\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n\n var matches = matcher(params, child);\n\n // If there wasn't a match, remove the object in the array\n if (matches == null) {\n match.children.splice(c, 1);\n }\n }\n\n // If any children matched, return the new object\n if (match.children.length > 0) {\n return match;\n }\n\n // If there were no matching children, check just the plain object\n return matcher(params, match);\n }\n\n var original = stripDiacritics(data.text).toUpperCase();\n var term = stripDiacritics(params.term).toUpperCase();\n\n // Check if the text contains the term\n if (original.indexOf(term) > -1) {\n return data;\n }\n\n // If it doesn't contain the term, don't return anything\n return null;\n }\n\n this.defaults = {\n amdBase: './',\n amdLanguageBase: './i18n/',\n closeOnSelect: true,\n debug: false,\n dropdownAutoWidth: false,\n escapeMarkup: Utils.escapeMarkup,\n language: EnglishTranslation,\n matcher: matcher,\n minimumInputLength: 0,\n maximumInputLength: 0,\n maximumSelectionLength: 0,\n minimumResultsForSearch: 0,\n selectOnClose: false,\n sorter: function (data) {\n return data;\n },\n templateResult: function (result) {\n return result.text;\n },\n templateSelection: function (selection) {\n return selection.text;\n },\n theme: 'default',\n width: 'resolve'\n };\n };\n\n Defaults.prototype.set = function (key, value) {\n var camelKey = $.camelCase(key);\n\n var data = {};\n data[camelKey] = value;\n\n var convertedData = Utils._convertData(data);\n\n $.extend(this.defaults, convertedData);\n };\n\n var defaults = new Defaults();\n\n return defaults;\n});\n\nS2.define('select2/options',[\n 'require',\n 'jquery',\n './defaults',\n './utils'\n], function (require, $, Defaults, Utils) {\n function Options (options, $element) {\n this.options = options;\n\n if ($element != null) {\n this.fromElement($element);\n }\n\n this.options = Defaults.apply(this.options);\n\n if ($element && $element.is('input')) {\n var InputCompat = require(this.get('amdBase') + 'compat/inputData');\n\n this.options.dataAdapter = Utils.Decorate(\n this.options.dataAdapter,\n InputCompat\n );\n }\n }\n\n Options.prototype.fromElement = function ($e) {\n var excludedData = ['select2'];\n\n if (this.options.multiple == null) {\n this.options.multiple = $e.prop('multiple');\n }\n\n if (this.options.disabled == null) {\n this.options.disabled = $e.prop('disabled');\n }\n\n if (this.options.language == null) {\n if ($e.prop('lang')) {\n this.options.language = $e.prop('lang').toLowerCase();\n } else if ($e.closest('[lang]').prop('lang')) {\n this.options.language = $e.closest('[lang]').prop('lang');\n }\n }\n\n if (this.options.dir == null) {\n if ($e.prop('dir')) {\n this.options.dir = $e.prop('dir');\n } else if ($e.closest('[dir]').prop('dir')) {\n this.options.dir = $e.closest('[dir]').prop('dir');\n } else {\n this.options.dir = 'ltr';\n }\n }\n\n $e.prop('disabled', this.options.disabled);\n $e.prop('multiple', this.options.multiple);\n\n if ($e.data('select2Tags')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-select2-tags` attribute has been changed to ' +\n 'use the `data-data` and `data-tags=\"true\"` attributes and will be ' +\n 'removed in future versions of Select2.'\n );\n }\n\n $e.data('data', $e.data('select2Tags'));\n $e.data('tags', true);\n }\n\n if ($e.data('ajaxUrl')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-ajax-url` attribute has been changed to ' +\n '`data-ajax--url` and support for the old attribute will be removed' +\n ' in future versions of Select2.'\n );\n }\n\n $e.attr('ajax--url', $e.data('ajaxUrl'));\n $e.data('ajax--url', $e.data('ajaxUrl'));\n }\n\n var dataset = {};\n\n // Prefer the element's `dataset` attribute if it exists\n // jQuery 1.x does not correctly handle data attributes with multiple dashes\n if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\n dataset = $.extend(true, {}, $e[0].dataset, $e.data());\n } else {\n dataset = $e.data();\n }\n\n var data = $.extend(true, {}, dataset);\n\n data = Utils._convertData(data);\n\n for (var key in data) {\n if ($.inArray(key, excludedData) > -1) {\n continue;\n }\n\n if ($.isPlainObject(this.options[key])) {\n $.extend(this.options[key], data[key]);\n } else {\n this.options[key] = data[key];\n }\n }\n\n return this;\n };\n\n Options.prototype.get = function (key) {\n return this.options[key];\n };\n\n Options.prototype.set = function (key, val) {\n this.options[key] = val;\n };\n\n return Options;\n});\n\nS2.define('select2/core',[\n 'jquery',\n './options',\n './utils',\n './keys'\n], function ($, Options, Utils, KEYS) {\n var Select2 = function ($element, options) {\n if ($element.data('select2') != null) {\n $element.data('select2').destroy();\n }\n\n this.$element = $element;\n\n this.id = this._generateId($element);\n\n options = options || {};\n\n this.options = new Options(options, $element);\n\n Select2.__super__.constructor.call(this);\n\n // Set up the tabindex\n\n var tabindex = $element.attr('tabindex') || 0;\n $element.data('old-tabindex', tabindex);\n $element.attr('tabindex', '-1');\n\n // Set up containers and adapters\n\n var DataAdapter = this.options.get('dataAdapter');\n this.dataAdapter = new DataAdapter($element, this.options);\n\n var $container = this.render();\n\n this._placeContainer($container);\n\n var SelectionAdapter = this.options.get('selectionAdapter');\n this.selection = new SelectionAdapter($element, this.options);\n this.$selection = this.selection.render();\n\n this.selection.position(this.$selection, $container);\n\n var DropdownAdapter = this.options.get('dropdownAdapter');\n this.dropdown = new DropdownAdapter($element, this.options);\n this.$dropdown = this.dropdown.render();\n\n this.dropdown.position(this.$dropdown, $container);\n\n var ResultsAdapter = this.options.get('resultsAdapter');\n this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\n this.$results = this.results.render();\n\n this.results.position(this.$results, this.$dropdown);\n\n // Bind events\n\n var self = this;\n\n // Bind the container to all of the adapters\n this._bindAdapters();\n\n // Register any DOM event handlers\n this._registerDomEvents();\n\n // Register any internal event handlers\n this._registerDataEvents();\n this._registerSelectionEvents();\n this._registerDropdownEvents();\n this._registerResultsEvents();\n this._registerEvents();\n\n // Set the initial state\n this.dataAdapter.current(function (initialData) {\n self.trigger('selection:update', {\n data: initialData\n });\n });\n\n // Hide the original select\n $element.addClass('select2-hidden-accessible');\n $element.attr('aria-hidden', 'true');\n\n // Synchronize any monitored attributes\n this._syncAttributes();\n\n $element.data('select2', this);\n };\n\n Utils.Extend(Select2, Utils.Observable);\n\n Select2.prototype._generateId = function ($element) {\n var id = '';\n\n if ($element.attr('id') != null) {\n id = $element.attr('id');\n } else if ($element.attr('name') != null) {\n id = $element.attr('name') + '-' + Utils.generateChars(2);\n } else {\n id = Utils.generateChars(4);\n }\n\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = 'select2-' + id;\n\n return id;\n };\n\n Select2.prototype._placeContainer = function ($container) {\n $container.insertAfter(this.$element);\n\n var width = this._resolveWidth(this.$element, this.options.get('width'));\n\n if (width != null) {\n $container.css('width', width);\n }\n };\n\n Select2.prototype._resolveWidth = function ($element, method) {\n var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\n\n if (method == 'resolve') {\n var styleWidth = this._resolveWidth($element, 'style');\n\n if (styleWidth != null) {\n return styleWidth;\n }\n\n return this._resolveWidth($element, 'element');\n }\n\n if (method == 'element') {\n var elementWidth = $element.outerWidth(false);\n\n if (elementWidth <= 0) {\n return 'auto';\n }\n\n return elementWidth + 'px';\n }\n\n if (method == 'style') {\n var style = $element.attr('style');\n\n if (typeof(style) !== 'string') {\n return null;\n }\n\n var attrs = style.split(';');\n\n for (var i = 0, l = attrs.length; i < l; i = i + 1) {\n var attr = attrs[i].replace(/\\s/g, '');\n var matches = attr.match(WIDTH);\n\n if (matches !== null && matches.length >= 1) {\n return matches[1];\n }\n }\n\n return null;\n }\n\n return method;\n };\n\n Select2.prototype._bindAdapters = function () {\n this.dataAdapter.bind(this, this.$container);\n this.selection.bind(this, this.$container);\n\n this.dropdown.bind(this, this.$container);\n this.results.bind(this, this.$container);\n };\n\n Select2.prototype._registerDomEvents = function () {\n var self = this;\n\n this.$element.on('change.select2', function () {\n self.dataAdapter.current(function (data) {\n self.trigger('selection:update', {\n data: data\n });\n });\n });\n\n this.$element.on('focus.select2', function (evt) {\n self.trigger('focus', evt);\n });\n\n this._syncA = Utils.bind(this._syncAttributes, this);\n this._syncS = Utils.bind(this._syncSubtree, this);\n\n if (this.$element[0].attachEvent) {\n this.$element[0].attachEvent('onpropertychange', this._syncA);\n }\n\n var observer = window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n ;\n\n if (observer != null) {\n this._observer = new observer(function (mutations) {\n $.each(mutations, self._syncA);\n $.each(mutations, self._syncS);\n });\n this._observer.observe(this.$element[0], {\n attributes: true,\n childList: true,\n subtree: false\n });\n } else if (this.$element[0].addEventListener) {\n this.$element[0].addEventListener(\n 'DOMAttrModified',\n self._syncA,\n false\n );\n this.$element[0].addEventListener(\n 'DOMNodeInserted',\n self._syncS,\n false\n );\n this.$element[0].addEventListener(\n 'DOMNodeRemoved',\n self._syncS,\n false\n );\n }\n };\n\n Select2.prototype._registerDataEvents = function () {\n var self = this;\n\n this.dataAdapter.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerSelectionEvents = function () {\n var self = this;\n var nonRelayEvents = ['toggle', 'focus'];\n\n this.selection.on('toggle', function () {\n self.toggleDropdown();\n });\n\n this.selection.on('focus', function (params) {\n self.focus(params);\n });\n\n this.selection.on('*', function (name, params) {\n if ($.inArray(name, nonRelayEvents) !== -1) {\n return;\n }\n\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerDropdownEvents = function () {\n var self = this;\n\n this.dropdown.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerResultsEvents = function () {\n var self = this;\n\n this.results.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerEvents = function () {\n var self = this;\n\n this.on('open', function () {\n self.$container.addClass('select2-container--open');\n });\n\n this.on('close', function () {\n self.$container.removeClass('select2-container--open');\n });\n\n this.on('enable', function () {\n self.$container.removeClass('select2-container--disabled');\n });\n\n this.on('disable', function () {\n self.$container.addClass('select2-container--disabled');\n });\n\n this.on('blur', function () {\n self.$container.removeClass('select2-container--focus');\n });\n\n this.on('query', function (params) {\n if (!self.isOpen()) {\n self.trigger('open', {});\n }\n\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:all', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('query:append', function (params) {\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:append', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('keypress', function (evt) {\n var key = evt.which;\n\n if (self.isOpen()) {\n if (key === KEYS.ESC || key === KEYS.TAB ||\n (key === KEYS.UP && evt.altKey)) {\n self.close();\n\n evt.preventDefault();\n } else if (key === KEYS.ENTER) {\n self.trigger('results:select', {});\n\n evt.preventDefault();\n } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\n self.trigger('results:toggle', {});\n\n evt.preventDefault();\n } else if (key === KEYS.UP) {\n self.trigger('results:previous', {});\n\n evt.preventDefault();\n } else if (key === KEYS.DOWN) {\n self.trigger('results:next', {});\n\n evt.preventDefault();\n }\n } else {\n if (key === KEYS.ENTER || key === KEYS.SPACE ||\n (key === KEYS.DOWN && evt.altKey)) {\n self.open();\n\n evt.preventDefault();\n }\n }\n });\n };\n\n Select2.prototype._syncAttributes = function () {\n this.options.set('disabled', this.$element.prop('disabled'));\n\n if (this.options.get('disabled')) {\n if (this.isOpen()) {\n this.close();\n }\n\n this.trigger('disable', {});\n } else {\n this.trigger('enable', {});\n }\n };\n\n Select2.prototype._syncSubtree = function (evt, mutations) {\n var changed = false;\n var self = this;\n\n // Ignore any mutation events raised for elements that aren't options or\n // optgroups. This handles the case when the select element is destroyed\n if (\n evt && evt.target && (\n evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'\n )\n ) {\n return;\n }\n\n if (!mutations) {\n // If mutation events aren't supported, then we can only assume that the\n // change affected the selections\n changed = true;\n } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {\n for (var n = 0; n < mutations.addedNodes.length; n++) {\n var node = mutations.addedNodes[n];\n\n if (node.selected) {\n changed = true;\n }\n }\n } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\n changed = true;\n }\n\n // Only re-pull the data if we think there is a change\n if (changed) {\n this.dataAdapter.current(function (currentData) {\n self.trigger('selection:update', {\n data: currentData\n });\n });\n }\n };\n\n /**\n * Override the trigger method to automatically trigger pre-events when\n * there are events that can be prevented.\n */\n Select2.prototype.trigger = function (name, args) {\n var actualTrigger = Select2.__super__.trigger;\n var preTriggerMap = {\n 'open': 'opening',\n 'close': 'closing',\n 'select': 'selecting',\n 'unselect': 'unselecting'\n };\n\n if (args === undefined) {\n args = {};\n }\n\n if (name in preTriggerMap) {\n var preTriggerName = preTriggerMap[name];\n var preTriggerArgs = {\n prevented: false,\n name: name,\n args: args\n };\n\n actualTrigger.call(this, preTriggerName, preTriggerArgs);\n\n if (preTriggerArgs.prevented) {\n args.prevented = true;\n\n return;\n }\n }\n\n actualTrigger.call(this, name, args);\n };\n\n Select2.prototype.toggleDropdown = function () {\n if (this.options.get('disabled')) {\n return;\n }\n\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n };\n\n Select2.prototype.open = function () {\n if (this.isOpen()) {\n return;\n }\n\n this.trigger('query', {});\n };\n\n Select2.prototype.close = function () {\n if (!this.isOpen()) {\n return;\n }\n\n this.trigger('close', {});\n };\n\n Select2.prototype.isOpen = function () {\n return this.$container.hasClass('select2-container--open');\n };\n\n Select2.prototype.hasFocus = function () {\n return this.$container.hasClass('select2-container--focus');\n };\n\n Select2.prototype.focus = function (data) {\n // No need to re-trigger focus events if we are already focused\n if (this.hasFocus()) {\n return;\n }\n\n this.$container.addClass('select2-container--focus');\n this.trigger('focus', {});\n };\n\n Select2.prototype.enable = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"enable\")` method has been deprecated and will' +\n ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' +\n ' instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n args = [true];\n }\n\n var disabled = !args[0];\n\n this.$element.prop('disabled', disabled);\n };\n\n Select2.prototype.data = function () {\n if (this.options.get('debug') &&\n arguments.length > 0 && window.console && console.warn) {\n console.warn(\n 'Select2: Data can no longer be set using `select2(\"data\")`. You ' +\n 'should consider setting the value instead using `$element.val()`.'\n );\n }\n\n var data = [];\n\n this.dataAdapter.current(function (currentData) {\n data = currentData;\n });\n\n return data;\n };\n\n Select2.prototype.val = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"val\")` method has been deprecated and will be' +\n ' removed in later Select2 versions. Use $element.val() instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n return this.$element.val();\n }\n\n var newVal = args[0];\n\n if ($.isArray(newVal)) {\n newVal = $.map(newVal, function (obj) {\n return obj.toString();\n });\n }\n\n this.$element.val(newVal).trigger('change');\n };\n\n Select2.prototype.destroy = function () {\n this.$container.remove();\n\n if (this.$element[0].detachEvent) {\n this.$element[0].detachEvent('onpropertychange', this._syncA);\n }\n\n if (this._observer != null) {\n this._observer.disconnect();\n this._observer = null;\n } else if (this.$element[0].removeEventListener) {\n this.$element[0]\n .removeEventListener('DOMAttrModified', this._syncA, false);\n this.$element[0]\n .removeEventListener('DOMNodeInserted', this._syncS, false);\n this.$element[0]\n .removeEventListener('DOMNodeRemoved', this._syncS, false);\n }\n\n this._syncA = null;\n this._syncS = null;\n\n this.$element.off('.select2');\n this.$element.attr('tabindex', this.$element.data('old-tabindex'));\n\n this.$element.removeClass('select2-hidden-accessible');\n this.$element.attr('aria-hidden', 'false');\n this.$element.removeData('select2');\n\n this.dataAdapter.destroy();\n this.selection.destroy();\n this.dropdown.destroy();\n this.results.destroy();\n\n this.dataAdapter = null;\n this.selection = null;\n this.dropdown = null;\n this.results = null;\n };\n\n Select2.prototype.render = function () {\n var $container = $(\n '<span class=\"select2 select2-container\">' +\n '<span class=\"selection\"></span>' +\n '<span class=\"dropdown-wrapper\" aria-hidden=\"true\"></span>' +\n '</span>'\n );\n\n $container.attr('dir', this.options.get('dir'));\n\n this.$container = $container;\n\n this.$container.addClass('select2-container--' + this.options.get('theme'));\n\n $container.data('element', this.$element);\n\n return $container;\n };\n\n return Select2;\n});\n\nS2.define('select2/compat/utils',[\n 'jquery'\n], function ($) {\n function syncCssClasses ($dest, $src, adapter) {\n var classes, replacements = [], adapted;\n\n classes = $.trim($dest.attr('class'));\n\n if (classes) {\n classes = '' + classes; // for IE which returns object\n\n $(classes.split(/\\s+/)).each(function () {\n // Save all Select2 classes\n if (this.indexOf('select2-') === 0) {\n replacements.push(this);\n }\n });\n }\n\n classes = $.trim($src.attr('class'));\n\n if (classes) {\n classes = '' + classes; // for IE which returns object\n\n $(classes.split(/\\s+/)).each(function () {\n // Only adapt non-Select2 classes\n if (this.indexOf('select2-') !== 0) {\n adapted = adapter(this);\n\n if (adapted != null) {\n replacements.push(adapted);\n }\n }\n });\n }\n\n $dest.attr('class', replacements.join(' '));\n }\n\n return {\n syncCssClasses: syncCssClasses\n };\n});\n\nS2.define('select2/compat/containerCss',[\n 'jquery',\n './utils'\n], function ($, CompatUtils) {\n // No-op CSS adapter that discards all classes by default\n function _containerAdapter (clazz) {\n return null;\n }\n\n function ContainerCSS () { }\n\n ContainerCSS.prototype.render = function (decorated) {\n var $container = decorated.call(this);\n\n var containerCssClass = this.options.get('containerCssClass') || '';\n\n if ($.isFunction(containerCssClass)) {\n containerCssClass = containerCssClass(this.$element);\n }\n\n var containerCssAdapter = this.options.get('adaptContainerCssClass');\n containerCssAdapter = containerCssAdapter || _containerAdapter;\n\n if (containerCssClass.indexOf(':all:') !== -1) {\n containerCssClass = containerCssClass.replace(':all:', '');\n\n var _cssAdapter = containerCssAdapter;\n\n containerCssAdapter = function (clazz) {\n var adapted = _cssAdapter(clazz);\n\n if (adapted != null) {\n // Append the old one along with the adapted one\n return adapted + ' ' + clazz;\n }\n\n return clazz;\n };\n }\n\n var containerCss = this.options.get('containerCss') || {};\n\n if ($.isFunction(containerCss)) {\n containerCss = containerCss(this.$element);\n }\n\n CompatUtils.syncCssClasses($container, this.$element, containerCssAdapter);\n\n $container.css(containerCss);\n $container.addClass(containerCssClass);\n\n return $container;\n };\n\n return ContainerCSS;\n});\n\nS2.define('select2/compat/dropdownCss',[\n 'jquery',\n './utils'\n], function ($, CompatUtils) {\n // No-op CSS adapter that discards all classes by default\n function _dropdownAdapter (clazz) {\n return null;\n }\n\n function DropdownCSS () { }\n\n DropdownCSS.prototype.render = function (decorated) {\n var $dropdown = decorated.call(this);\n\n var dropdownCssClass = this.options.get('dropdownCssClass') || '';\n\n if ($.isFunction(dropdownCssClass)) {\n dropdownCssClass = dropdownCssClass(this.$element);\n }\n\n var dropdownCssAdapter = this.options.get('adaptDropdownCssClass');\n dropdownCssAdapter = dropdownCssAdapter || _dropdownAdapter;\n\n if (dropdownCssClass.indexOf(':all:') !== -1) {\n dropdownCssClass = dropdownCssClass.replace(':all:', '');\n\n var _cssAdapter = dropdownCssAdapter;\n\n dropdownCssAdapter = function (clazz) {\n var adapted = _cssAdapter(clazz);\n\n if (adapted != null) {\n // Append the old one along with the adapted one\n return adapted + ' ' + clazz;\n }\n\n return clazz;\n };\n }\n\n var dropdownCss = this.options.get('dropdownCss') || {};\n\n if ($.isFunction(dropdownCss)) {\n dropdownCss = dropdownCss(this.$element);\n }\n\n CompatUtils.syncCssClasses($dropdown, this.$element, dropdownCssAdapter);\n\n $dropdown.css(dropdownCss);\n $dropdown.addClass(dropdownCssClass);\n\n return $dropdown;\n };\n\n return DropdownCSS;\n});\n\nS2.define('select2/compat/initSelection',[\n 'jquery'\n], function ($) {\n function InitSelection (decorated, $element, options) {\n if (options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `initSelection` option has been deprecated in favor' +\n ' of a custom data adapter that overrides the `current` method. ' +\n 'This method is now called multiple times instead of a single ' +\n 'time when the instance is initialized. Support will be removed ' +\n 'for the `initSelection` option in future versions of Select2'\n );\n }\n\n this.initSelection = options.get('initSelection');\n this._isInitialized = false;\n\n decorated.call(this, $element, options);\n }\n\n InitSelection.prototype.current = function (decorated, callback) {\n var self = this;\n\n if (this._isInitialized) {\n decorated.call(this, callback);\n\n return;\n }\n\n this.initSelection.call(null, this.$element, function (data) {\n self._isInitialized = true;\n\n if (!$.isArray(data)) {\n data = [data];\n }\n\n callback(data);\n });\n };\n\n return InitSelection;\n});\n\nS2.define('select2/compat/inputData',[\n 'jquery'\n], function ($) {\n function InputData (decorated, $element, options) {\n this._currentData = [];\n this._valueSeparator = options.get('valueSeparator') || ',';\n\n if ($element.prop('type') === 'hidden') {\n if (options.get('debug') && console && console.warn) {\n console.warn(\n 'Select2: Using a hidden input with Select2 is no longer ' +\n 'supported and may stop working in the future. It is recommended ' +\n 'to use a `<select>` element instead.'\n );\n }\n }\n\n decorated.call(this, $element, options);\n }\n\n InputData.prototype.current = function (_, callback) {\n function getSelected (data, selectedIds) {\n var selected = [];\n\n if (data.selected || $.inArray(data.id, selectedIds) !== -1) {\n data.selected = true;\n selected.push(data);\n } else {\n data.selected = false;\n }\n\n if (data.children) {\n selected.push.apply(selected, getSelected(data.children, selectedIds));\n }\n\n return selected;\n }\n\n var selected = [];\n\n for (var d = 0; d < this._currentData.length; d++) {\n var data = this._currentData[d];\n\n selected.push.apply(\n selected,\n getSelected(\n data,\n this.$element.val().split(\n this._valueSeparator\n )\n )\n );\n }\n\n callback(selected);\n };\n\n InputData.prototype.select = function (_, data) {\n if (!this.options.get('multiple')) {\n this.current(function (allData) {\n $.map(allData, function (data) {\n data.selected = false;\n });\n });\n\n this.$element.val(data.id);\n this.$element.trigger('change');\n } else {\n var value = this.$element.val();\n value += this._valueSeparator + data.id;\n\n this.$element.val(value);\n this.$element.trigger('change');\n }\n };\n\n InputData.prototype.unselect = function (_, data) {\n var self = this;\n\n data.selected = false;\n\n this.current(function (allData) {\n var values = [];\n\n for (var d = 0; d < allData.length; d++) {\n var item = allData[d];\n\n if (data.id == item.id) {\n continue;\n }\n\n values.push(item.id);\n }\n\n self.$element.val(values.join(self._valueSeparator));\n self.$element.trigger('change');\n });\n };\n\n InputData.prototype.query = function (_, params, callback) {\n var results = [];\n\n for (var d = 0; d < this._currentData.length; d++) {\n var data = this._currentData[d];\n\n var matches = this.matches(params, data);\n\n if (matches !== null) {\n results.push(matches);\n }\n }\n\n callback({\n results: results\n });\n };\n\n InputData.prototype.addOptions = function (_, $options) {\n var options = $.map($options, function ($option) {\n return $.data($option[0], 'data');\n });\n\n this._currentData.push.apply(this._currentData, options);\n };\n\n return InputData;\n});\n\nS2.define('select2/compat/matcher',[\n 'jquery'\n], function ($) {\n function oldMatcher (matcher) {\n function wrappedMatcher (params, data) {\n var match = $.extend(true, {}, data);\n\n if (params.term == null || $.trim(params.term) === '') {\n return match;\n }\n\n if (data.children) {\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n\n // Check if the child object matches\n // The old matcher returned a boolean true or false\n var doesMatch = matcher(params.term, child.text, child);\n\n // If the child didn't match, pop it off\n if (!doesMatch) {\n match.children.splice(c, 1);\n }\n }\n\n if (match.children.length > 0) {\n return match;\n }\n }\n\n if (matcher(params.term, data.text, data)) {\n return match;\n }\n\n return null;\n }\n\n return wrappedMatcher;\n }\n\n return oldMatcher;\n});\n\nS2.define('select2/compat/query',[\n\n], function () {\n function Query (decorated, $element, options) {\n if (options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `query` option has been deprecated in favor of a ' +\n 'custom data adapter that overrides the `query` method. Support ' +\n 'will be removed for the `query` option in future versions of ' +\n 'Select2.'\n );\n }\n\n decorated.call(this, $element, options);\n }\n\n Query.prototype.query = function (_, params, callback) {\n params.callback = callback;\n\n var query = this.options.get('query');\n\n query.call(null, params);\n };\n\n return Query;\n});\n\nS2.define('select2/dropdown/attachContainer',[\n\n], function () {\n function AttachContainer (decorated, $element, options) {\n decorated.call(this, $element, options);\n }\n\n AttachContainer.prototype.position =\n function (decorated, $dropdown, $container) {\n var $dropdownContainer = $container.find('.dropdown-wrapper');\n $dropdownContainer.append($dropdown);\n\n $dropdown.addClass('select2-dropdown--below');\n $container.addClass('select2-container--below');\n };\n\n return AttachContainer;\n});\n\nS2.define('select2/dropdown/stopPropagation',[\n\n], function () {\n function StopPropagation () { }\n\n StopPropagation.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n\n var stoppedEvents = [\n 'blur',\n 'change',\n 'click',\n 'dblclick',\n 'focus',\n 'focusin',\n 'focusout',\n 'input',\n 'keydown',\n 'keyup',\n 'keypress',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseover',\n 'mouseup',\n 'search',\n 'touchend',\n 'touchstart'\n ];\n\n this.$dropdown.on(stoppedEvents.join(' '), function (evt) {\n evt.stopPropagation();\n });\n };\n\n return StopPropagation;\n});\n\nS2.define('select2/selection/stopPropagation',[\n\n], function () {\n function StopPropagation () { }\n\n StopPropagation.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n\n var stoppedEvents = [\n 'blur',\n 'change',\n 'click',\n 'dblclick',\n 'focus',\n 'focusin',\n 'focusout',\n 'input',\n 'keydown',\n 'keyup',\n 'keypress',\n 'mousedown',\n 'mouseenter',\n 'mouseleave',\n 'mousemove',\n 'mouseover',\n 'mouseup',\n 'search',\n 'touchend',\n 'touchstart'\n ];\n\n this.$selection.on(stoppedEvents.join(' '), function (evt) {\n evt.stopPropagation();\n });\n };\n\n return StopPropagation;\n});\n\n/*!\n * jQuery Mousewheel 3.1.13\n *\n * Copyright jQuery Foundation and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n */\n\n(function (factory) {\n if ( typeof S2.define === 'function' && S2.define.amd ) {\n // AMD. Register as an anonymous module.\n S2.define('jquery-mousewheel',['jquery'], factory);\n } else if (typeof exports === 'object') {\n // Node/CommonJS style for Browserify\n module.exports = factory;\n } else {\n // Browser globals\n factory(jQuery);\n }\n}(function ($) {\n\n var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],\n toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?\n ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],\n slice = Array.prototype.slice,\n nullLowestDeltaTimeout, lowestDelta;\n\n if ( $.event.fixHooks ) {\n for ( var i = toFix.length; i; ) {\n $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\n }\n }\n\n var special = $.event.special.mousewheel = {\n version: '3.1.12',\n\n setup: function() {\n if ( this.addEventListener ) {\n for ( var i = toBind.length; i; ) {\n this.addEventListener( toBind[--i], handler, false );\n }\n } else {\n this.onmousewheel = handler;\n }\n // Store the line height and page height for this particular element\n $.data(this, 'mousewheel-line-height', special.getLineHeight(this));\n $.data(this, 'mousewheel-page-height', special.getPageHeight(this));\n },\n\n teardown: function() {\n if ( this.removeEventListener ) {\n for ( var i = toBind.length; i; ) {\n this.removeEventListener( toBind[--i], handler, false );\n }\n } else {\n this.onmousewheel = null;\n }\n // Clean up the data we added to the element\n $.removeData(this, 'mousewheel-line-height');\n $.removeData(this, 'mousewheel-page-height');\n },\n\n getLineHeight: function(elem) {\n var $elem = $(elem),\n $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();\n if (!$parent.length) {\n $parent = $('body');\n }\n return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;\n },\n\n getPageHeight: function(elem) {\n return $(elem).height();\n },\n\n settings: {\n adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\n normalizeOffset: true // calls getBoundingClientRect for each event\n }\n };\n\n $.fn.extend({\n mousewheel: function(fn) {\n return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');\n },\n\n unmousewheel: function(fn) {\n return this.unbind('mousewheel', fn);\n }\n });\n\n\n function handler(event) {\n var orgEvent = event || window.event,\n args = slice.call(arguments, 1),\n delta = 0,\n deltaX = 0,\n deltaY = 0,\n absDelta = 0,\n offsetX = 0,\n offsetY = 0;\n event = $.event.fix(orgEvent);\n event.type = 'mousewheel';\n\n // Old school scrollwheel delta\n if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }\n if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }\n if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }\n if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\n\n // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\n if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\n deltaX = deltaY * -1;\n deltaY = 0;\n }\n\n // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\n delta = deltaY === 0 ? deltaX : deltaY;\n\n // New school wheel delta (wheel event)\n if ( 'deltaY' in orgEvent ) {\n deltaY = orgEvent.deltaY * -1;\n delta = deltaY;\n }\n if ( 'deltaX' in orgEvent ) {\n deltaX = orgEvent.deltaX;\n if ( deltaY === 0 ) { delta = deltaX * -1; }\n }\n\n // No change actually happened, no reason to go any further\n if ( deltaY === 0 && deltaX === 0 ) { return; }\n\n // Need to convert lines and pages to pixels if we aren't already in pixels\n // There are three delta modes:\n // * deltaMode 0 is by pixels, nothing to do\n // * deltaMode 1 is by lines\n // * deltaMode 2 is by pages\n if ( orgEvent.deltaMode === 1 ) {\n var lineHeight = $.data(this, 'mousewheel-line-height');\n delta *= lineHeight;\n deltaY *= lineHeight;\n deltaX *= lineHeight;\n } else if ( orgEvent.deltaMode === 2 ) {\n var pageHeight = $.data(this, 'mousewheel-page-height');\n delta *= pageHeight;\n deltaY *= pageHeight;\n deltaX *= pageHeight;\n }\n\n // Store lowest absolute delta to normalize the delta values\n absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\n\n if ( !lowestDelta || absDelta < lowestDelta ) {\n lowestDelta = absDelta;\n\n // Adjust older deltas if necessary\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n lowestDelta /= 40;\n }\n }\n\n // Adjust older deltas if necessary\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\n // Divide all the things by 40!\n delta /= 40;\n deltaX /= 40;\n deltaY /= 40;\n }\n\n // Get a whole, normalized value for the deltas\n delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);\n deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);\n deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);\n\n // Normalise offsetX and offsetY properties\n if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\n var boundingRect = this.getBoundingClientRect();\n offsetX = event.clientX - boundingRect.left;\n offsetY = event.clientY - boundingRect.top;\n }\n\n // Add information to the event object\n event.deltaX = deltaX;\n event.deltaY = deltaY;\n event.deltaFactor = lowestDelta;\n event.offsetX = offsetX;\n event.offsetY = offsetY;\n // Go ahead and set deltaMode to 0 since we converted to pixels\n // Although this is a little odd since we overwrite the deltaX/Y\n // properties with normalized deltas.\n event.deltaMode = 0;\n\n // Add event and delta to the front of the arguments\n args.unshift(event, delta, deltaX, deltaY);\n\n // Clearout lowestDelta after sometime to better\n // handle multiple device types that give different\n // a different lowestDelta\n // Ex: trackpad = 3 and mouse wheel = 120\n if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\n nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\n\n return ($.event.dispatch || $.event.handle).apply(this, args);\n }\n\n function nullLowestDelta() {\n lowestDelta = null;\n }\n\n function shouldAdjustOldDeltas(orgEvent, absDelta) {\n // If this is an older event and the delta is divisable by 120,\n // then we are assuming that the browser is treating this as an\n // older mouse wheel event and that we should divide the deltas\n // by 40 to try and get a more usable deltaFactor.\n // Side note, this actually impacts the reported scroll distance\n // in older browsers and can cause scrolling to be slower than native.\n // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\n return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;\n }\n\n}));\n\nS2.define('jquery.select2',[\n 'jquery',\n 'jquery-mousewheel',\n\n './select2/core',\n './select2/defaults'\n], function ($, _, Select2, Defaults) {\n if ($.fn.select2 == null) {\n // All methods that should return the element\n var thisMethods = ['open', 'close', 'destroy'];\n\n $.fn.select2 = function (options) {\n options = options || {};\n\n if (typeof options === 'object') {\n this.each(function () {\n var instanceOptions = $.extend(true, {}, options);\n\n var instance = new Select2($(this), instanceOptions);\n });\n\n return this;\n } else if (typeof options === 'string') {\n var ret;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function () {\n var instance = $(this).data('select2');\n\n if (instance == null && window.console && console.error) {\n console.error(\n 'The select2(\\'' + options + '\\') method was called on an ' +\n 'element that is not using Select2.'\n );\n }\n\n ret = instance[options].apply(instance, args);\n });\n\n // Check if we should be returning `this`\n if ($.inArray(options, thisMethods) > -1) {\n return this;\n }\n\n return ret;\n } else {\n throw new Error('Invalid arguments for Select2: ' + options);\n }\n };\n }\n\n if ($.fn.select2.defaults == null) {\n $.fn.select2.defaults = Defaults;\n }\n\n return Select2;\n});\n\n // Return the AMD loader configuration so it can be used outside of this file\n return {\n define: S2.define,\n require: S2.require\n };\n}());\n\n // Autoload the jQuery bindings\n // We know that all of the modules exist above this, so we're safe\n var select2 = S2.require('jquery.select2');\n\n // Hold the AMD module references on the jQuery function that was just loaded\n // This allows Select2 to use the internal loader outside of this file, such\n // as in the language files.\n jQuery.fn.select2.amd = S2;\n\n // Return the Select2 instance for anyone who is importing it.\n return select2;\n}));\n","/*!\n * Lightbox for Bootstrap by @ashleydw\n * https://github.com/ashleydw/lightbox\n *\n * License: https://github.com/ashleydw/lightbox/blob/master/LICENSE\n */\n+function ($) {\n\n'use strict';\n\nvar _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\n\nvar Lightbox = (function ($) {\n\n\tvar NAME = 'ekkoLightbox';\n\tvar JQUERY_NO_CONFLICT = $.fn[NAME];\n\n\tvar Default = {\n\t\ttitle: '',\n\t\tfooter: '',\n\t\tshowArrows: true, //display the left / right arrows or not\n\t\ttype: null, //force the lightbox into image / youtube mode. if null, or not image|youtube|vimeo; detect it\n\t\talwaysShowClose: false, //always show the close button, even if there is no title\n\t\tloadingMessage: '<div class=\"ekko-lightbox-loader\"><div><div></div><div></div></div></div>', // http://tobiasahlin.com/spinkit/\n\t\tleftArrow: '<span>&#10094;</span>',\n\t\trightArrow: '<span>&#10095;</span>',\n\t\tstrings: {\n\t\t\tclose: 'Close',\n\t\t\tfail: 'Failed to load image:',\n\t\t\ttype: 'Could not detect remote target type. Force the type using data-type'\n\t\t},\n\t\tdoc: document, // if in an iframe can specify top.document\n\t\tonShow: function onShow() {},\n\t\tonShown: function onShown() {},\n\t\tonHide: function onHide() {},\n\t\tonHidden: function onHidden() {},\n\t\tonNavigate: function onNavigate() {},\n\t\tonContentLoaded: function onContentLoaded() {}\n\t};\n\n\tvar Lightbox = (function () {\n\t\t_createClass(Lightbox, null, [{\n\t\t\tkey: 'Default',\n\n\t\t\t/**\n \n Class properties:\n \n _$element: null -> the <a> element currently being displayed\n _$modal: The bootstrap modal generated\n _$modalDialog: The .modal-dialog\n _$modalContent: The .modal-content\n _$modalBody: The .modal-body\n _$modalHeader: The .modal-header\n _$modalFooter: The .modal-footer\n _$lightboxContainerOne: Container of the first lightbox element\n _$lightboxContainerTwo: Container of the second lightbox element\n _$lightboxBody: First element in the container\n _$modalArrows: The overlayed arrows container\n \t _$galleryItems: Other <a>'s available for this gallery\n _galleryName: Name of the current data('gallery') showing\n _galleryIndex: The current index of the _$galleryItems being shown\n \t _config: {} the options for the modal\n _modalId: unique id for the current lightbox\n _padding / _border: CSS properties for the modal container; these are used to calculate the available space for the content\n \t */\n\n\t\t\tget: function get() {\n\t\t\t\treturn Default;\n\t\t\t}\n\t\t}]);\n\n\t\tfunction Lightbox($element, config) {\n\t\t\tvar _this = this;\n\n\t\t\t_classCallCheck(this, Lightbox);\n\n\t\t\tthis._config = $.extend({}, Default, config);\n\t\t\tthis._$modalArrows = null;\n\t\t\tthis._galleryIndex = 0;\n\t\t\tthis._galleryName = null;\n\t\t\tthis._padding = null;\n\t\t\tthis._border = null;\n\t\t\tthis._titleIsShown = false;\n\t\t\tthis._footerIsShown = false;\n\t\t\tthis._wantedWidth = 0;\n\t\t\tthis._wantedHeight = 0;\n\t\t\tthis._modalId = 'ekkoLightbox-' + Math.floor(Math.random() * 1000 + 1);\n\t\t\tthis._$element = $element instanceof jQuery ? $element : $($element);\n\n\t\t\tvar header = '<div class=\"modal-header\"' + (this._config.title || this._config.alwaysShowClose ? '' : ' style=\"display:none\"') + '><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"' + this._config.strings.close + '\"><span aria-hidden=\"true\">&times;</span></button><h4 class=\"modal-title\">' + (this._config.title || \"&nbsp;\") + '</h4></div>';\n\t\t\tvar footer = '<div class=\"modal-footer\"' + (this._config.footer ? '' : ' style=\"display:none\"') + '>' + (this._config.footer || \"&nbsp;\") + '</div>';\n\t\t\tvar body = '<div class=\"modal-body\"><div class=\"ekko-lightbox-container\"><div class=\"ekko-lightbox-item fade in\"></div><div class=\"ekko-lightbox-item fade\"></div></div></div>';\n\t\t\tvar dialog = '<div class=\"modal-dialog\" role=\"document\"><div class=\"modal-content\">' + header + body + footer + '</div></div>';\n\t\t\t$(this._config.doc.body).append('<div id=\"' + this._modalId + '\" class=\"ekko-lightbox modal fade\" tabindex=\"-1\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">' + dialog + '</div>');\n\n\t\t\tthis._$modal = $('#' + this._modalId, this._config.doc);\n\t\t\tthis._$modalDialog = this._$modal.find('.modal-dialog').first();\n\t\t\tthis._$modalContent = this._$modal.find('.modal-content').first();\n\t\t\tthis._$modalBody = this._$modal.find('.modal-body').first();\n\t\t\tthis._$modalHeader = this._$modal.find('.modal-header').first();\n\t\t\tthis._$modalFooter = this._$modal.find('.modal-footer').first();\n\n\t\t\tthis._$lightboxContainer = this._$modalBody.find('.ekko-lightbox-container').first();\n\t\t\tthis._$lightboxBodyOne = this._$lightboxContainer.find('> div:first-child').first();\n\t\t\tthis._$lightboxBodyTwo = this._$lightboxContainer.find('> div:last-child').first();\n\n\t\t\tthis._border = this._calculateBorders();\n\t\t\tthis._padding = this._calculatePadding();\n\n\t\t\tthis._galleryName = this._$element.data('gallery');\n\t\t\tif (this._galleryName) {\n\t\t\t\tthis._$galleryItems = $(document.body).find('*[data-gallery=\"' + this._galleryName + '\"]');\n\t\t\t\tthis._galleryIndex = this._$galleryItems.index(this._$element);\n\t\t\t\t$(document).on('keydown.ekkoLightbox', this._navigationalBinder.bind(this));\n\n\t\t\t\t// add the directional arrows to the modal\n\t\t\t\tif (this._config.showArrows && this._$galleryItems.length > 1) {\n\t\t\t\t\tthis._$lightboxContainer.append('<div class=\"ekko-lightbox-nav-overlay\"><a href=\"#\">' + this._config.leftArrow + '</a><a href=\"#\">' + this._config.rightArrow + '</a></div>');\n\t\t\t\t\tthis._$modalArrows = this._$lightboxContainer.find('div.ekko-lightbox-nav-overlay').first();\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:first-child', function (event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn _this.navigateLeft();\n\t\t\t\t\t});\n\t\t\t\t\tthis._$lightboxContainer.on('click', 'a:last-child', function (event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn _this.navigateRight();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._$modal.on('show.bs.modal', this._config.onShow.bind(this)).on('shown.bs.modal', function () {\n\t\t\t\t_this._toggleLoading(true);\n\t\t\t\t_this._handle();\n\t\t\t\treturn _this._config.onShown.call(_this);\n\t\t\t}).on('hide.bs.modal', this._config.onHide.bind(this)).on('hidden.bs.modal', function () {\n\t\t\t\tif (_this._galleryName) {\n\t\t\t\t\t$(document).off('keydown.ekkoLightbox');\n\t\t\t\t\t$(window).off('resize.ekkoLightbox');\n\t\t\t\t}\n\t\t\t\t_this._$modal.remove();\n\t\t\t\treturn _this._config.onHidden.call(_this);\n\t\t\t}).modal(this._config);\n\n\t\t\t$(window).on('resize.ekkoLightbox', function () {\n\t\t\t\t_this._resize(_this._wantedWidth, _this._wantedHeight);\n\t\t\t});\n\t\t}\n\n\t\t_createClass(Lightbox, [{\n\t\t\tkey: 'element',\n\t\t\tvalue: function element() {\n\t\t\t\treturn this._$element;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'modal',\n\t\t\tvalue: function modal() {\n\t\t\t\treturn this._$modal;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'navigateTo',\n\t\t\tvalue: function navigateTo(index) {\n\n\t\t\t\tif (index < 0 || index > this._$galleryItems.length - 1) return this;\n\n\t\t\t\tthis._galleryIndex = index;\n\n\t\t\t\tthis._$element = $(this._$galleryItems.get(this._galleryIndex));\n\t\t\t\tthis._handle();\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'navigateLeft',\n\t\t\tvalue: function navigateLeft() {\n\n\t\t\t\tif (this._$galleryItems.length === 1) return;\n\n\t\t\t\tif (this._galleryIndex === 0) this._galleryIndex = this._$galleryItems.length - 1;else //circular\n\t\t\t\t\tthis._galleryIndex--;\n\n\t\t\t\tthis._config.onNavigate.call(this, 'left', this._galleryIndex);\n\t\t\t\treturn this.navigateTo(this._galleryIndex);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'navigateRight',\n\t\t\tvalue: function navigateRight() {\n\n\t\t\t\tif (this._$galleryItems.length === 1) return;\n\n\t\t\t\tif (this._galleryIndex === this._$galleryItems.length - 1) this._galleryIndex = 0;else //circular\n\t\t\t\t\tthis._galleryIndex++;\n\n\t\t\t\tthis._config.onNavigate.call(this, 'right', this._galleryIndex);\n\t\t\t\treturn this.navigateTo(this._galleryIndex);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: 'close',\n\t\t\tvalue: function close() {\n\t\t\t\treturn this._$modal.modal('hide');\n\t\t\t}\n\n\t\t\t// helper private methods\n\t\t}, {\n\t\t\tkey: '_navigationalBinder',\n\t\t\tvalue: function _navigationalBinder(event) {\n\t\t\t\tevent = event || window.event;\n\t\t\t\tif (event.keyCode === 39) return this.navigateRight();\n\t\t\t\tif (event.keyCode === 37) return this.navigateLeft();\n\t\t\t}\n\n\t\t\t// type detection private methods\n\t\t}, {\n\t\t\tkey: '_detectRemoteType',\n\t\t\tvalue: function _detectRemoteType(src, type) {\n\n\t\t\t\ttype = type || false;\n\n\t\t\t\tif (!type && this._isImage(src)) type = 'image';\n\t\t\t\tif (!type && this._getYoutubeId(src)) type = 'youtube';\n\t\t\t\tif (!type && this._getVimeoId(src)) type = 'vimeo';\n\t\t\t\tif (!type && this._getInstagramId(src)) type = 'instagram';\n\n\t\t\t\tif (!type || ['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(type) < 0) type = 'url';\n\n\t\t\t\treturn type;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_isImage',\n\t\t\tvalue: function _isImage(string) {\n\t\t\t\treturn string && string.match(/(^data:image\\/.*,)|(\\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\\?|#).*)?$)/i);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_containerToUse',\n\t\t\tvalue: function _containerToUse() {\n\t\t\t\tvar _this2 = this;\n\n\t\t\t\t// if currently showing an image, fade it out and remove\n\t\t\t\tvar $toUse = this._$lightboxBodyTwo;\n\t\t\t\tvar $current = this._$lightboxBodyOne;\n\n\t\t\t\tif (this._$lightboxBodyTwo.hasClass('in')) {\n\t\t\t\t\t$toUse = this._$lightboxBodyOne;\n\t\t\t\t\t$current = this._$lightboxBodyTwo;\n\t\t\t\t}\n\n\t\t\t\t$current.removeClass('in');\n\t\t\t\tsetTimeout(function () {\n\t\t\t\t\tif (!_this2._$lightboxBodyTwo.hasClass('in')) _this2._$lightboxBodyTwo.empty();\n\t\t\t\t\tif (!_this2._$lightboxBodyOne.hasClass('in')) _this2._$lightboxBodyOne.empty();\n\t\t\t\t}, 500);\n\n\t\t\t\t$toUse.addClass('in');\n\t\t\t\treturn $toUse;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_handle',\n\t\t\tvalue: function _handle() {\n\n\t\t\t\tvar $toUse = this._containerToUse();\n\t\t\t\tthis._updateTitleAndFooter();\n\n\t\t\t\tvar currentRemote = this._$element.attr('data-remote') || this._$element.attr('href');\n\t\t\t\tvar currentType = this._detectRemoteType(currentRemote, this._$element.attr('data-type') || false);\n\n\t\t\t\tif (['image', 'youtube', 'vimeo', 'instagram', 'video', 'url'].indexOf(currentType) < 0) return this._error(this._config.strings.type);\n\n\t\t\t\tswitch (currentType) {\n\t\t\t\t\tcase 'image':\n\t\t\t\t\t\tthis._preloadImage(currentRemote, $toUse);\n\t\t\t\t\t\tthis._preloadImageByIndex(this._galleryIndex, 3);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'youtube':\n\t\t\t\t\t\tthis._showYoutubeVideo(currentRemote, $toUse);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'vimeo':\n\t\t\t\t\t\tthis._showVimeoVideo(this._getVimeoId(currentRemote), $toUse);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'instagram':\n\t\t\t\t\t\tthis._showInstagramVideo(this._getInstagramId(currentRemote), $toUse);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'video':\n\t\t\t\t\t\tthis._showHtml5Video(currentRemote, $toUse);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// url\n\t\t\t\t\t\tthis._loadRemoteContent(currentRemote, $toUse);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_getYoutubeId',\n\t\t\tvalue: function _getYoutubeId(string) {\n\t\t\t\tif (!string) return false;\n\t\t\t\tvar matches = string.match(/^.*(youtu.be\\/|v\\/|u\\/\\w\\/|embed\\/|watch\\?v=|\\&v=)([^#\\&\\?]*).*/);\n\t\t\t\treturn matches && matches[2].length === 11 ? matches[2] : false;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_getVimeoId',\n\t\t\tvalue: function _getVimeoId(string) {\n\t\t\t\treturn string && string.indexOf('vimeo') > 0 ? string : false;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_getInstagramId',\n\t\t\tvalue: function _getInstagramId(string) {\n\t\t\t\treturn string && string.indexOf('instagram') > 0 ? string : false;\n\t\t\t}\n\n\t\t\t// layout private methods\n\t\t}, {\n\t\t\tkey: '_toggleLoading',\n\t\t\tvalue: function _toggleLoading(show) {\n\t\t\t\tshow = show || false;\n\t\t\t\tif (show) {\n\t\t\t\t\tthis._$modalDialog.css('display', 'none');\n\t\t\t\t\tthis._$modal.removeClass('in');\n\t\t\t\t\t$('.modal-backdrop').append(this._config.loadingMessage);\n\t\t\t\t} else {\n\t\t\t\t\tthis._$modalDialog.css('display', 'block');\n\t\t\t\t\tthis._$modal.addClass('in');\n\t\t\t\t\t$('.modal-backdrop').find('.ekko-lightbox-loader').remove();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_calculateBorders',\n\t\t\tvalue: function _calculateBorders() {\n\t\t\t\treturn {\n\t\t\t\t\ttop: this._totalCssByAttribute('border-top-width'),\n\t\t\t\t\tright: this._totalCssByAttribute('border-right-width'),\n\t\t\t\t\tbottom: this._totalCssByAttribute('border-bottom-width'),\n\t\t\t\t\tleft: this._totalCssByAttribute('border-left-width')\n\t\t\t\t};\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_calculatePadding',\n\t\t\tvalue: function _calculatePadding() {\n\t\t\t\treturn {\n\t\t\t\t\ttop: this._totalCssByAttribute('padding-top'),\n\t\t\t\t\tright: this._totalCssByAttribute('padding-right'),\n\t\t\t\t\tbottom: this._totalCssByAttribute('padding-bottom'),\n\t\t\t\t\tleft: this._totalCssByAttribute('padding-left')\n\t\t\t\t};\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_totalCssByAttribute',\n\t\t\tvalue: function _totalCssByAttribute(attribute) {\n\t\t\t\treturn parseInt(this._$modalDialog.css(attribute), 10) + parseInt(this._$modalContent.css(attribute), 10) + parseInt(this._$modalBody.css(attribute), 10);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_updateTitleAndFooter',\n\t\t\tvalue: function _updateTitleAndFooter() {\n\t\t\t\tvar title = this._$element.data('title') || \"\";\n\t\t\t\tvar caption = this._$element.data('footer') || \"\";\n\n\t\t\t\tthis._titleIsShown = false;\n\t\t\t\tif (title || this._config.alwaysShowClose) {\n\t\t\t\t\tthis._titleIsShown = true;\n\t\t\t\t\tthis._$modalHeader.css('display', '').find('.modal-title').html(title || \"&nbsp;\");\n\t\t\t\t} else this._$modalHeader.css('display', 'none');\n\n\t\t\t\tthis._footerIsShown = false;\n\t\t\t\tif (caption) {\n\t\t\t\t\tthis._footerIsShown = true;\n\t\t\t\t\tthis._$modalFooter.css('display', '').html(caption);\n\t\t\t\t} else this._$modalFooter.css('display', 'none');\n\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_showYoutubeVideo',\n\t\t\tvalue: function _showYoutubeVideo(remote, $containerForElement) {\n\t\t\t\tvar id = this._getYoutubeId(remote);\n\t\t\t\tvar query = remote.indexOf('&') > 0 ? remote.substr(remote.indexOf('&')) : '';\n\t\t\t\tvar width = this._$element.data('width') || 560;\n\t\t\t\tvar height = this._$element.data('height') || width / (560 / 315);\n\t\t\t\treturn this._showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + query, width, height, $containerForElement);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_showVimeoVideo',\n\t\t\tvalue: function _showVimeoVideo(id, $containerForElement) {\n\t\t\t\tvar width = 500;\n\t\t\t\tvar height = this._$element.data('height') || width / (560 / 315);\n\t\t\t\treturn this._showVideoIframe(id + '?autoplay=1', width, height, $containerForElement);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_showInstagramVideo',\n\t\t\tvalue: function _showInstagramVideo(id, $containerForElement) {\n\t\t\t\t// instagram load their content into iframe's so this can be put straight into the element\n\t\t\t\tvar width = this._$element.data('width') || 612;\n\t\t\t\tvar height = width + 80;\n\t\t\t\tid = id.substr(-1) !== '/' ? id + '/' : id; // ensure id has trailing slash\n\t\t\t\t$containerForElement.html('<iframe width=\"' + width + '\" height=\"' + height + '\" src=\"' + id + 'embed/\" frameborder=\"0\" allowfullscreen></iframe>');\n\t\t\t\tthis._resize(width, height);\n\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t\tif (this._$modalArrows) //hide the arrows when showing video\n\t\t\t\t\tthis._$modalArrows.css('display', 'none');\n\t\t\t\tthis._toggleLoading(false);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_showVideoIframe',\n\t\t\tvalue: function _showVideoIframe(url, width, height, $containerForElement) {\n\t\t\t\t// should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\t\theight = height || width; // default to square\n\t\t\t\t$containerForElement.html('<div class=\"embed-responsive embed-responsive-16by9\"><iframe width=\"' + width + '\" height=\"' + height + '\" src=\"' + url + '\" frameborder=\"0\" allowfullscreen class=\"embed-responsive-item\"></iframe></div>');\n\t\t\t\tthis._resize(width, height);\n\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t\tif (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\t\tthis._toggleLoading(false);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_showHtml5Video',\n\t\t\tvalue: function _showHtml5Video(url, $containerForElement) {\n\t\t\t\t// should be used for videos only. for remote content use loadRemoteContent (data-type=url)\n\t\t\t\tvar width = this._$element.data('width') || 560;\n\t\t\t\tvar height = this._$element.data('height') || width / (560 / 315);\n\t\t\t\t$containerForElement.html('<div class=\"embed-responsive embed-responsive-16by9\"><video width=\"' + width + '\" height=\"' + height + '\" src=\"' + url + '\" preload=\"auto\" autoplay controls class=\"embed-responsive-item\"></video></div>');\n\t\t\t\tthis._resize(width, height);\n\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t\tif (this._$modalArrows) this._$modalArrows.css('display', 'none'); //hide the arrows when showing video\n\t\t\t\tthis._toggleLoading(false);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_loadRemoteContent',\n\t\t\tvalue: function _loadRemoteContent(url, $containerForElement) {\n\t\t\t\tvar _this3 = this;\n\n\t\t\t\tvar width = this._$element.data('width') || 560;\n\t\t\t\tvar height = this._$element.data('height') || 560;\n\n\t\t\t\tvar disableExternalCheck = this._$element.data('disableExternalCheck') || false;\n\t\t\t\tthis._toggleLoading(false);\n\n\t\t\t\t// external urls are loading into an iframe\n\t\t\t\t// local ajax can be loaded into the container itself\n\t\t\t\tif (!disableExternalCheck && !this._isExternal(url)) {\n\t\t\t\t\t$containerForElement.load(url, $.proxy(function () {\n\t\t\t\t\t\treturn _this3._$element.trigger('loaded.bs.modal');l;\n\t\t\t\t\t}));\n\t\t\t\t} else {\n\t\t\t\t\t$containerForElement.html('<iframe src=\"' + url + '\" frameborder=\"0\" allowfullscreen></iframe>');\n\t\t\t\t\tthis._config.onContentLoaded.call(this);\n\t\t\t\t}\n\n\t\t\t\tif (this._$modalArrows) //hide the arrows when remote content\n\t\t\t\t\tthis._$modalArrows.css('display', 'none');\n\n\t\t\t\tthis._resize(width, height);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_isExternal',\n\t\t\tvalue: function _isExternal(url) {\n\t\t\t\tvar match = url.match(/^([^:\\/?#]+:)?(?:\\/\\/([^\\/?#]*))?([^?#]+)?(\\?[^#]*)?(#.*)?/);\n\t\t\t\tif (typeof match[1] === \"string\" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) return true;\n\n\t\t\t\tif (typeof match[2] === \"string\" && match[2].length > 0 && match[2].replace(new RegExp(':(' + ({\n\t\t\t\t\t\"http:\": 80,\n\t\t\t\t\t\"https:\": 443\n\t\t\t\t})[location.protocol] + ')?$'), \"\") !== location.host) return true;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_error',\n\t\t\tvalue: function _error(message) {\n\t\t\t\tconsole.error(message);\n\t\t\t\tthis._containerToUse().html(message);\n\t\t\t\tthis._resize(300, 300);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_preloadImageByIndex',\n\t\t\tvalue: function _preloadImageByIndex(startIndex, numberOfTimes) {\n\n\t\t\t\tif (!this._$galleryItems) return;\n\n\t\t\t\tvar next = $(this._$galleryItems.get(startIndex), false);\n\t\t\t\tif (typeof next == 'undefined') return;\n\n\t\t\t\tvar src = next.attr('data-remote') || next.attr('href');\n\t\t\t\tif (next.attr('data-type') === 'image' || this._isImage(src)) this._preloadImage(src, false);\n\n\t\t\t\tif (numberOfTimes > 0) return this._preloadImageByIndex(startIndex + 1, numberOfTimes - 1);\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_preloadImage',\n\t\t\tvalue: function _preloadImage(src, $containerForImage) {\n\t\t\t\tvar _this4 = this;\n\n\t\t\t\t$containerForImage = $containerForImage || false;\n\n\t\t\t\tvar img = new Image();\n\t\t\t\tif ($containerForImage) {\n\t\t\t\t\t(function () {\n\n\t\t\t\t\t\t// if loading takes > 200ms show a loader\n\t\t\t\t\t\tvar loadingTimeout = setTimeout(function () {\n\t\t\t\t\t\t\t$containerForImage.append(_this4._config.loadingMessage);\n\t\t\t\t\t\t}, 200);\n\n\t\t\t\t\t\timg.onload = function () {\n\t\t\t\t\t\t\tif (loadingTimeout) clearTimeout(loadingTimeout);\n\t\t\t\t\t\t\tloadingTimeout = null;\n\t\t\t\t\t\t\tvar image = $('<img />');\n\t\t\t\t\t\t\timage.attr('src', img.src);\n\t\t\t\t\t\t\timage.addClass('img-fluid');\n\t\t\t\t\t\t\t$containerForImage.html(image);\n\t\t\t\t\t\t\tif (_this4._$modalArrows) _this4._$modalArrows.css('display', ''); // remove display to default to css property\n\n\t\t\t\t\t\t\t_this4._resize(img.width, img.height);\n\t\t\t\t\t\t\t_this4._toggleLoading(false);\n\t\t\t\t\t\t\treturn _this4._config.onContentLoaded.call(_this4);\n\t\t\t\t\t\t};\n\t\t\t\t\t\timg.onerror = function () {\n\t\t\t\t\t\t\t_this4._toggleLoading(false);\n\t\t\t\t\t\t\treturn _this4._error(_this4._config.strings.fail + (' ' + src));\n\t\t\t\t\t\t};\n\t\t\t\t\t})();\n\t\t\t\t}\n\n\t\t\t\timg.src = src;\n\t\t\t\treturn img;\n\t\t\t}\n\t\t}, {\n\t\t\tkey: '_resize',\n\t\t\tvalue: function _resize(width, height) {\n\n\t\t\t\theight = height || width;\n\t\t\t\tthis._wantedWidth = width;\n\t\t\t\tthis._wantedHeight = height;\n\n\t\t\t\t// if width > the available space, scale down the expected width and height\n\t\t\t\tvar widthBorderAndPadding = this._padding.left + this._padding.right + this._border.left + this._border.right;\n\t\t\t\tvar maxWidth = Math.min(width + widthBorderAndPadding, this._config.doc.body.clientWidth);\n\t\t\t\tif (width + widthBorderAndPadding > maxWidth) {\n\t\t\t\t\theight = (maxWidth - widthBorderAndPadding) / width * height;\n\t\t\t\t\twidth = maxWidth;\n\t\t\t\t} else width = width + widthBorderAndPadding;\n\n\t\t\t\tvar headerHeight = 0,\n\t\t\t\t footerHeight = 0;\n\n\t\t\t\t// as the resize is performed the modal is show, the calculate might fail\n\t\t\t\t// if so, default to the default sizes\n\t\t\t\tif (this._footerIsShown) footerHeight = this._$modalFooter.outerHeight(true) || 55;\n\n\t\t\t\tif (this._titleIsShown) headerHeight = this._$modalHeader.outerHeight(true) || 67;\n\n\t\t\t\tvar borderPadding = this._padding.top + this._padding.bottom + this._border.bottom + this._border.top;\n\n\t\t\t\t//calculated each time as resizing the window can cause them to change due to Bootstraps fluid margins\n\t\t\t\tvar margins = parseFloat(this._$modalDialog.css('margin-top')) + parseFloat(this._$modalDialog.css('margin-bottom'));\n\n\t\t\t\tvar maxHeight = Math.min(height, $(window).height() - borderPadding - margins - headerHeight - footerHeight);\n\t\t\t\tif (height > maxHeight) {\n\t\t\t\t\t// if height > the available height, scale down the width\n\t\t\t\t\tvar factor = Math.min(maxHeight / height, 1);\n\t\t\t\t\twidth = Math.ceil(factor * width);\n\t\t\t\t}\n\n\t\t\t\tthis._$lightboxContainer.css('height', maxHeight);\n\t\t\t\tthis._$modalDialog.css('width', 'auto').css('maxWidth', width);\n\n\t\t\t\tthis._$modal.modal('_handleUpdate');\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}], [{\n\t\t\tkey: '_jQueryInterface',\n\t\t\tvalue: function _jQueryInterface(config) {\n\t\t\t\tvar _this5 = this;\n\n\t\t\t\tconfig = config || {};\n\t\t\t\treturn this.each(function () {\n\t\t\t\t\tvar $this = $(_this5);\n\t\t\t\t\tvar _config = $.extend({}, Lightbox.Default, $this.data(), typeof config === 'object' && config);\n\n\t\t\t\t\tnew Lightbox(_this5, _config);\n\t\t\t\t});\n\t\t\t}\n\t\t}]);\n\n\t\treturn Lightbox;\n\t})();\n\n\t$.fn[NAME] = Lightbox._jQueryInterface;\n\t$.fn[NAME].Constructor = Lightbox;\n\t$.fn[NAME].noConflict = function () {\n\t\t$.fn[NAME] = JQUERY_NO_CONFLICT;\n\t\treturn Lightbox._jQueryInterface;\n\t};\n\n\treturn Lightbox;\n})(jQuery);\n//# sourceMappingURL=ekko-lightbox.js.map\n\n}(jQuery);\n","\n/**\n * Module containing core application logic.\n * @param {jQuery} $ Insulated jQuery object\n * @param {JSON} settings Insulated `window.snipeit.settings` object.\n * @return {IIFE} Immediately invoked. Returns self.\n */\n\n\nvar pieOptions = {\n //Boolean - Whether we should show a stroke on each segment\n segmentShowStroke: true,\n //String - The colour of each segment stroke\n segmentStrokeColor: \"#fff\",\n //Number - The width of each segment stroke\n segmentStrokeWidth: 1,\n //Number - The percentage of the chart that we cut out of the middle\n percentageInnerCutout: 50, // This is 0 for Pie charts\n //Number - Amount of animation steps\n animationSteps: 100,\n //String - Animation easing effect\n animationEasing: \"easeOutBounce\",\n //Boolean - Whether we animate the rotation of the Doughnut\n animateRotate: true,\n //Boolean - Whether we animate scaling the Doughnut from the centre\n animateScale: false,\n //Boolean - whether to make the chart responsive to window resizing\n responsive: true,\n // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container\n maintainAspectRatio: false,\n\n //String - A legend template\n legendTemplate: \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<segments.length; i++){%><li>\" +\n \"<i class='fa fa-circle-o' style='color: <%=segments[i].fillColor%>'></i>\" +\n \"<%if(segments[i].label){%><%=segments[i].label%><%}%> foo</li><%}%></ul>\",\n //String - A tooltip template\n tooltipTemplate: \"<%=value %> <%=label%> \"\n};\n\n//-----------------\n//- END PIE CHART -\n//-----------------\n\n\n\n(function($, settings) {\n var Components = {};\n Components.modals = {};\n\n // confirm delete modal\n Components.modals.confirmDelete = function() {\n var $el = $('table');\n\n var events = {\n 'click': function(evnt) {\n var $context = $(this);\n var $dataConfirmModal = $('#dataConfirmModal');\n var href = $context.attr('href');\n var message = $context.attr('data-content');\n var title = $context.attr('data-title');\n\n $('#myModalLabel').text(title);\n $dataConfirmModal.find('.modal-body').text(message);\n $('#deleteForm').attr('action', href);\n $dataConfirmModal.modal({\n show: true\n });\n return false;\n }\n };\n\n var render = function() {\n $el.on('click', '.delete-asset', events['click']);\n };\n\n return {\n render: render\n };\n };\n\n\n /**\n * Application start point\n * Component definition stays out of load event, execution only happens.\n */\n $(function() {\n new Components.modals.confirmDelete().render();\n });\n}(jQuery, window.snipeit.settings));\n\n\n\n\n\n$(document).ready(function () {\n\n /*\n * Slideout help menu\n */\n $('.slideout-menu-toggle').on('click', function(event){\n console.log('clicked');\n event.preventDefault();\n // create menu variables\n var slideoutMenu = $('.slideout-menu');\n var slideoutMenuWidth = $('.slideout-menu').width();\n\n // toggle open class\n slideoutMenu.toggleClass(\"open\");\n\n // slide menu\n if (slideoutMenu.hasClass(\"open\")) {\n slideoutMenu.show();\n slideoutMenu.animate({\n right: \"0px\"\n });\n } else {\n slideoutMenu.animate({\n right: -slideoutMenuWidth\n }, \"-350px\");\n slideoutMenu.fadeOut();\n }\n });\n\n /*\n * iCheck checkbox plugin\n */\n\n $('input[type=\"checkbox\"].minimal, input[type=\"radio\"].minimal').iCheck({\n checkboxClass: 'icheckbox_minimal-blue',\n radioClass: 'iradio_minimal-blue'\n });\n\n\n /*\n * Select2\n */\n\n var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;\n if(!iOS)\n {\n // Vue collision: Avoid overriding a vue select2 instance\n // by checking to see if the item has already been select2'd.\n $('select.select2:not(\".select2-hidden-accessible\")').each((i,obj) => {\n {\n $(obj).select2();\n }\n });\n }\n $('.datepicker').datepicker();\n\n\n\n});\n","/*! AdminLTE app.js\n * ================\n * Main JS application file for AdminLTE v2. This file\n * should be included in all pages. It controls some layout\n * options and implements exclusive AdminLTE plugins.\n *\n * @Author Almsaeed Studio\n * @Support <http://www.almsaeedstudio.com>\n * @Email <[email protected]>\n * @version 2.3.0\n * @license MIT <http://opensource.org/licenses/MIT>\n */\n\n//Make sure jQuery has been loaded before app.js\nif (typeof jQuery === \"undefined\") {\n throw new Error(\"AdminLTE requires jQuery\");\n}\n\n\n/* AdminLTE\n *\n * @type Object\n * @description $.AdminLTE is the main object for the template's app.\n * It's used for implementing functions and options related\n * to the template. Keeping everything wrapped in an object\n * prevents conflict with other plugins and is a better\n * way to organize our code.\n */\n$.AdminLTE = {};\n\n/* --------------------\n * - AdminLTE Options -\n * --------------------\n * Modify these options to suit your implementation\n */\n$.AdminLTE.options = {\n //Add slimscroll to navbar menus\n //This requires you to load the slimscroll plugin\n //in every page before app.js\n navbarMenuSlimscroll: true,\n navbarMenuSlimscrollWidth: \"3px\", //The width of the scroll bar\n navbarMenuHeight: \"200px\", //The height of the inner menu\n //General animation speed for JS animated elements such as box collapse/expand and\n //sidebar treeview slide up/down. This options accepts an integer as milliseconds,\n //'fast', 'normal', or 'slow'\n animationSpeed: 500,\n //Sidebar push menu toggle button selector\n sidebarToggleSelector: \"[data-toggle='offcanvas']\",\n //Activate sidebar push menu\n sidebarPushMenu: true,\n //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)\n sidebarSlimScroll: true,\n //Enable sidebar expand on hover effect for sidebar mini\n //This option is forced to true if both the fixed layout and sidebar mini\n //are used together\n sidebarExpandOnHover: false,\n //BoxRefresh Plugin\n enableBoxRefresh: true,\n //Bootstrap.js tooltip\n enableBSToppltip: true,\n BSTooltipSelector: \"[data-toggle='tooltip']\",\n //Enable Fast Click. Fastclick.js creates a more\n //native touch experience with touch devices. If you\n //choose to enable the plugin, make sure you load the script\n //before AdminLTE's app.js\n enableFastclick: true,\n //Control Sidebar Options\n enableControlSidebar: true,\n controlSidebarOptions: {\n //Which button should trigger the open/close event\n toggleBtnSelector: \"[data-toggle='control-sidebar']\",\n //The sidebar selector\n selector: \".control-sidebar\",\n //Enable slide over content\n slide: true\n },\n //Box Widget Plugin. Enable this plugin\n //to allow boxes to be collapsed and/or removed\n enableBoxWidget: true,\n //Box Widget plugin options\n boxWidgetOptions: {\n boxWidgetIcons: {\n //Collapse icon\n collapse: 'fa-minus',\n //Open icon\n open: 'fa-plus',\n //Remove icon\n remove: 'fa-times'\n },\n boxWidgetSelectors: {\n //Remove button selector\n remove: '[data-widget=\"remove\"]',\n //Collapse button selector\n collapse: '[data-widget=\"collapse\"]'\n }\n },\n //Direct Chat plugin options\n directChat: {\n //Enable direct chat by default\n enable: true,\n //The button to open and close the chat contacts pane\n contactToggleSelector: '[data-widget=\"chat-pane-toggle\"]'\n },\n //Define the set of colors to use globally around the website\n colors: {\n lightBlue: \"#3c8dbc\",\n red: \"#f56954\",\n green: \"#00a65a\",\n aqua: \"#00c0ef\",\n yellow: \"#f39c12\",\n blue: \"#0073b7\",\n navy: \"#001F3F\",\n teal: \"#39CCCC\",\n olive: \"#3D9970\",\n lime: \"#01FF70\",\n orange: \"#FF851B\",\n fuchsia: \"#F012BE\",\n purple: \"#8E24AA\",\n maroon: \"#D81B60\",\n black: \"#222222\",\n gray: \"#d2d6de\"\n },\n //The standard screen sizes that bootstrap uses.\n //If you change these in the variables.less file, change\n //them here too.\n screenSizes: {\n xs: 480,\n sm: 768,\n md: 992,\n lg: 1200\n }\n};\n\n/* ------------------\n * - Implementation -\n * ------------------\n * The next block of code implements AdminLTE's\n * functions and plugins as specified by the\n * options above.\n */\n$(function () {\n \"use strict\";\n\n //Fix for IE page transitions\n $(\"body\").removeClass(\"hold-transition\");\n\n //Extend options if external options exist\n if (typeof AdminLTEOptions !== \"undefined\") {\n $.extend(true,\n $.AdminLTE.options,\n AdminLTEOptions);\n }\n\n //Easy access to options\n var o = $.AdminLTE.options;\n\n //Set up the object\n _init();\n\n //Activate the layout maker\n $.AdminLTE.layout.activate();\n\n //Enable sidebar tree view controls\n $.AdminLTE.tree('.sidebar');\n\n //Enable control sidebar\n if (o.enableControlSidebar) {\n $.AdminLTE.controlSidebar.activate();\n }\n\n //Add slimscroll to navbar dropdown\n if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {\n $(\".navbar .menu\").slimscroll({\n height: o.navbarMenuHeight,\n alwaysVisible: false,\n size: o.navbarMenuSlimscrollWidth\n }).css(\"width\", \"100%\");\n }\n\n //Activate sidebar push menu\n if (o.sidebarPushMenu) {\n $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);\n }\n\n //Activate Bootstrap tooltip\n if (o.enableBSToppltip) {\n $('body').tooltip({\n selector: o.BSTooltipSelector\n });\n }\n\n //Activate box widget\n if (o.enableBoxWidget) {\n $.AdminLTE.boxWidget.activate();\n }\n\n //Activate fast click\n if (o.enableFastclick && typeof FastClick != 'undefined') {\n FastClick.attach(document.body);\n }\n\n //Activate direct chat widget\n if (o.directChat.enable) {\n $(document).on('click', o.directChat.contactToggleSelector, function () {\n var box = $(this).parents('.direct-chat').first();\n box.toggleClass('direct-chat-contacts-open');\n });\n }\n\n /*\n * INITIALIZE BUTTON TOGGLE\n * ------------------------\n */\n $('.btn-group[data-toggle=\"btn-toggle\"]').each(function () {\n var group = $(this);\n $(this).find(\".btn\").on('click', function (e) {\n group.find(\".btn.active\").removeClass(\"active\");\n $(this).addClass(\"active\");\n e.preventDefault();\n });\n\n });\n});\n\n/* ----------------------------------\n * - Initialize the AdminLTE Object -\n * ----------------------------------\n * All AdminLTE functions are implemented below.\n */\nfunction _init() {\n 'use strict';\n /* Layout\n * ======\n * Fixes the layout height in case min-height fails.\n *\n * @type Object\n * @usage $.AdminLTE.layout.activate()\n * $.AdminLTE.layout.fix()\n * $.AdminLTE.layout.fixSidebar()\n */\n $.AdminLTE.layout = {\n activate: function () {\n var _this = this;\n _this.fix();\n _this.fixSidebar();\n $(window, \".wrapper\").resize(function () {\n _this.fix();\n _this.fixSidebar();\n });\n },\n fix: function () {\n //Get window height and the wrapper height\n var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();\n var window_height = $(window).height();\n var sidebar_height = $(\".sidebar\").height();\n //Set the min-height of the content and sidebar based on the\n //the height of the document.\n if ($(\"body\").hasClass(\"fixed\")) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - $('.main-footer').outerHeight());\n } else {\n var postSetWidth;\n if (window_height >= sidebar_height) {\n $(\".content-wrapper, .right-side\").css('min-height', window_height - neg);\n postSetWidth = window_height - neg;\n } else {\n $(\".content-wrapper, .right-side\").css('min-height', sidebar_height);\n postSetWidth = sidebar_height;\n }\n\n //Fix for the control sidebar height\n var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);\n if (typeof controlSidebar !== \"undefined\") {\n if (controlSidebar.height() > postSetWidth)\n $(\".content-wrapper, .right-side\").css('min-height', controlSidebar.height());\n }\n\n }\n },\n fixSidebar: function () {\n //Make sure the body tag has the .fixed class\n if (!$(\"body\").hasClass(\"fixed\")) {\n if (typeof $.fn.slimScroll != 'undefined') {\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n }\n return;\n } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {\n window.console.error(\"Error: the fixed layout requires the slimscroll plugin!\");\n }\n //Enable slimscroll for fixed layout\n if ($.AdminLTE.options.sidebarSlimScroll) {\n if (typeof $.fn.slimScroll != 'undefined') {\n //Destroy if it exists\n $(\".sidebar\").slimScroll({destroy: true}).height(\"auto\");\n //Add slimscroll\n $(\".sidebar\").slimscroll({\n height: ($(window).height() - $(\".main-header\").height()) + \"px\",\n color: \"rgba(0,0,0,0.2)\",\n size: \"3px\"\n });\n }\n }\n }\n };\n\n /* PushMenu()\n * ==========\n * Adds the push menu functionality to the sidebar.\n *\n * @type Function\n * @usage: $.AdminLTE.pushMenu(\"[data-toggle='offcanvas']\")\n */\n $.AdminLTE.pushMenu = {\n activate: function (toggleBtn) {\n //Get the screen sizes\n var screenSizes = $.AdminLTE.options.screenSizes;\n\n //Enable sidebar toggle\n $(toggleBtn).on('click', function (e) {\n e.preventDefault();\n\n //Enable sidebar push menu\n if ($(window).width() > (screenSizes.sm - 1)) {\n if ($(\"body\").hasClass('sidebar-collapse')) {\n $(\"body\").removeClass('sidebar-collapse').trigger('expanded.pushMenu');\n } else {\n $(\"body\").addClass('sidebar-collapse').trigger('collapsed.pushMenu');\n }\n }\n //Handle sidebar push menu for small screens\n else {\n if ($(\"body\").hasClass('sidebar-open')) {\n $(\"body\").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');\n } else {\n $(\"body\").addClass('sidebar-open').trigger('expanded.pushMenu');\n }\n }\n });\n\n $(\".content-wrapper\").click(function () {\n //Enable hide menu when clicking on the content-wrapper on small screens\n if ($(window).width() <= (screenSizes.sm - 1) && $(\"body\").hasClass(\"sidebar-open\")) {\n $(\"body\").removeClass('sidebar-open');\n }\n });\n\n //Enable expand on hover for sidebar mini\n if ($.AdminLTE.options.sidebarExpandOnHover\n || ($('body').hasClass('fixed')\n && $('body').hasClass('sidebar-mini'))) {\n this.expandOnHover();\n }\n },\n expandOnHover: function () {\n var _this = this;\n var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;\n //Expand sidebar on hover\n $('.main-sidebar').hover(function () {\n if ($('body').hasClass('sidebar-mini')\n && $(\"body\").hasClass('sidebar-collapse')\n && $(window).width() > screenWidth) {\n _this.expand();\n }\n }, function () {\n if ($('body').hasClass('sidebar-mini')\n && $('body').hasClass('sidebar-expanded-on-hover')\n && $(window).width() > screenWidth) {\n _this.collapse();\n }\n });\n },\n expand: function () {\n $(\"body\").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');\n },\n collapse: function () {\n if ($('body').hasClass('sidebar-expanded-on-hover')) {\n $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');\n }\n }\n };\n\n /* Tree()\n * ======\n * Converts the sidebar into a multilevel\n * tree view menu.\n *\n * @type Function\n * @Usage: $.AdminLTE.tree('.sidebar')\n */\n $.AdminLTE.tree = function (menu) {\n var _this = this;\n var animationSpeed = $.AdminLTE.options.animationSpeed;\n $(document).on('click', menu + ' li a', function (e) {\n //Get the clicked link and the next element\n var $this = $(this);\n var checkElement = $this.next();\n\n //Check if the next element is a menu and is visible\n if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) {\n //Close the menu\n checkElement.slideUp(animationSpeed, function () {\n checkElement.removeClass('menu-open');\n //Fix the layout in case the sidebar stretches over the height of the window\n //_this.layout.fix();\n });\n checkElement.parent(\"li\").removeClass(\"active\");\n }\n //If the menu is not visible\n else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {\n //Get the parent menu\n var parent = $this.parents('ul').first();\n //Close all open menus within the parent\n var ul = parent.find('ul:visible').slideUp(animationSpeed);\n //Remove the menu-open class from the parent\n ul.removeClass('menu-open');\n //Get the parent li\n var parent_li = $this.parent(\"li\");\n\n //Open the target menu and add the menu-open class\n checkElement.slideDown(animationSpeed, function () {\n //Add the class active to the parent li\n checkElement.addClass('menu-open');\n parent.find('li.active').removeClass('active');\n parent_li.addClass('active');\n //Fix the layout in case the sidebar stretches over the height of the window\n _this.layout.fix();\n });\n }\n //if this isn't a link, prevent the page from being redirected\n if (checkElement.is('.treeview-menu')) {\n e.preventDefault();\n }\n });\n };\n\n /* ControlSidebar\n * ==============\n * Adds functionality to the right sidebar\n *\n * @type Object\n * @usage $.AdminLTE.controlSidebar.activate(options)\n */\n $.AdminLTE.controlSidebar = {\n //instantiate the object\n activate: function () {\n //Get the object\n var _this = this;\n //Update options\n var o = $.AdminLTE.options.controlSidebarOptions;\n //Get the sidebar\n var sidebar = $(o.selector);\n //The toggle button\n var btn = $(o.toggleBtnSelector);\n\n //Listen to the click event\n btn.on('click', function (e) {\n e.preventDefault();\n //If the sidebar is not open\n if (!sidebar.hasClass('control-sidebar-open')\n && !$('body').hasClass('control-sidebar-open')) {\n //Open the sidebar\n _this.open(sidebar, o.slide);\n } else {\n _this.close(sidebar, o.slide);\n }\n });\n\n //If the body has a boxed layout, fix the sidebar bg position\n var bg = $(\".control-sidebar-bg\");\n _this._fix(bg);\n\n //If the body has a fixed layout, make the control sidebar fixed\n if ($('body').hasClass('fixed')) {\n _this._fixForFixed(sidebar);\n } else {\n //If the content height is less than the sidebar's height, force max height\n if ($('.content-wrapper, .right-side').height() < sidebar.height()) {\n _this._fixForContent(sidebar);\n }\n }\n },\n //Open the control sidebar\n open: function (sidebar, slide) {\n //Slide over content\n if (slide) {\n sidebar.addClass('control-sidebar-open');\n } else {\n //Push the content by adding the open class to the body instead\n //of the sidebar itself\n $('body').addClass('control-sidebar-open');\n }\n },\n //Close the control sidebar\n close: function (sidebar, slide) {\n if (slide) {\n sidebar.removeClass('control-sidebar-open');\n } else {\n $('body').removeClass('control-sidebar-open');\n }\n },\n _fix: function (sidebar) {\n var _this = this;\n if ($(\"body\").hasClass('layout-boxed')) {\n sidebar.css('position', 'absolute');\n sidebar.height($(\".wrapper\").height());\n $(window).resize(function () {\n _this._fix(sidebar);\n });\n } else {\n sidebar.css({\n 'position': 'fixed',\n 'height': 'auto'\n });\n }\n },\n _fixForFixed: function (sidebar) {\n sidebar.css({\n 'position': 'fixed',\n 'max-height': '100%',\n 'overflow': 'auto',\n 'padding-bottom': '50px'\n });\n },\n _fixForContent: function (sidebar) {\n $(\".content-wrapper, .right-side\").css('min-height', sidebar.height());\n }\n };\n\n /* BoxWidget\n * =========\n * BoxWidget is a plugin to handle collapsing and\n * removing boxes from the screen.\n *\n * @type Object\n * @usage $.AdminLTE.boxWidget.activate()\n * Set all your options in the main $.AdminLTE.options object\n */\n $.AdminLTE.boxWidget = {\n selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,\n icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,\n animationSpeed: $.AdminLTE.options.animationSpeed,\n activate: function (_box) {\n var _this = this;\n if (!_box) {\n _box = document; // activate all boxes per default\n }\n //Listen for collapse event triggers\n $(_box).on('click', _this.selectors.collapse, function (e) {\n e.preventDefault();\n _this.collapse($(this));\n });\n\n //Listen for remove event triggers\n $(_box).on('click', _this.selectors.remove, function (e) {\n e.preventDefault();\n _this.remove($(this));\n });\n },\n collapse: function (element) {\n var _this = this;\n //Find the box parent\n var box = element.parents(\".box\").first();\n //Find the body and the footer\n var box_content = box.find(\"> .box-body, > .box-footer, > form >.box-body, > form > .box-footer\");\n if (!box.hasClass(\"collapsed-box\")) {\n //Convert minus into plus\n element.children(\":first\")\n .removeClass(_this.icons.collapse)\n .addClass(_this.icons.open);\n //Hide the content\n box_content.slideUp(_this.animationSpeed, function () {\n box.addClass(\"collapsed-box\");\n });\n } else {\n //Convert plus into minus\n element.children(\":first\")\n .removeClass(_this.icons.open)\n .addClass(_this.icons.collapse);\n //Show the content\n box_content.slideDown(_this.animationSpeed, function () {\n box.removeClass(\"collapsed-box\");\n });\n }\n },\n remove: function (element) {\n //Find the box parent\n var box = element.parents(\".box\").first();\n box.slideUp(this.animationSpeed);\n }\n };\n}\n\n/* ------------------\n * - Custom Plugins -\n * ------------------\n * All custom plugins are defined below.\n */\n\n/*\n * BOX REFRESH BUTTON\n * ------------------\n * This is a custom plugin to use with the component BOX. It allows you to add\n * a refresh button to the box. It converts the box's state to a loading state.\n *\n * @type plugin\n * @usage $(\"#box-widget\").boxRefresh( options );\n */\n(function ($) {\n\n \"use strict\";\n\n $.fn.boxRefresh = function (options) {\n\n // Render options\n var settings = $.extend({\n //Refresh button selector\n trigger: \".refresh-btn\",\n //File source to be loaded (e.g: ajax/src.php)\n source: \"\",\n //Callbacks\n onLoadStart: function (box) {\n return box;\n }, //Right after the button has been clicked\n onLoadDone: function (box) {\n return box;\n } //When the source has been loaded\n\n }, options);\n\n //The overlay\n var overlay = $('<div class=\"overlay\"><div class=\"fa fa-refresh fa-spin\"></div></div>');\n\n return this.each(function () {\n //if a source is specified\n if (settings.source === \"\") {\n if (window.console) {\n window.console.log(\"Please specify a source first - boxRefresh()\");\n }\n return;\n }\n //the box\n var box = $(this);\n //the button\n var rBtn = box.find(settings.trigger).first();\n\n //On trigger click\n rBtn.on('click', function (e) {\n e.preventDefault();\n //Add loading overlay\n start(box);\n\n //Perform ajax call\n box.find(\".box-body\").load(settings.source, function () {\n done(box);\n });\n });\n });\n\n function start(box) {\n //Add overlay and loading img\n box.append(overlay);\n\n settings.onLoadStart.call(box);\n }\n\n function done(box) {\n //Remove overlay and loading img\n box.find(overlay).remove();\n\n settings.onLoadDone.call(box);\n }\n\n };\n\n})(jQuery);\n\n/*\n * EXPLICIT BOX ACTIVATION\n * -----------------------\n * This is a custom plugin to use with the component BOX. It allows you to activate\n * a box inserted in the DOM after the app.js was loaded.\n *\n * @type plugin\n * @usage $(\"#box-widget\").activateBox();\n */\n(function ($) {\n\n 'use strict';\n\n $.fn.activateBox = function () {\n $.AdminLTE.boxWidget.activate(this);\n };\n\n})(jQuery);\n"]}