Add noConflict to many widgets.
authorSalvatore Iovene <salvatore@iovene.com>
Thu, 25 Jul 2013 11:16:20 +0000 (14:16 +0300)
committerSalvatore Iovene <salvatore@iovene.com>
Thu, 25 Jul 2013 11:16:20 +0000 (14:16 +0300)
15 files changed:
dist/cowhide.js
dist/cowhide.min.js
src/javascripts/cowhide-button.js
src/javascripts/cowhide-checkbox-input.js
src/javascripts/cowhide-header.js
src/javascripts/cowhide-page.js
src/javascripts/cowhide-radio-input.js
src/javascripts/cowhide-select.js
src/javascripts/cowhide-simple-scrollable.js
tests/unit/cowhide-button.js
tests/unit/cowhide-checkbox-input.js
tests/unit/cowhide-header.js
tests/unit/cowhide-radio-input.js
tests/unit/cowhide-select.js
tests/unit/cowhide-simple-scrollable.js

index 1216610..b8ff9a1 100644 (file)
@@ -32750,6 +32750,12 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHBUTTON PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_button;
+
     $.fn.ch_button = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -32773,8 +32779,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_button.Constructor = ChButton;
 
+
+    /* CHBUTTON NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_button.noConflict = function() {
+        $.fn.ch_button = old;
+        return this;
+    };
+
+
     /* CHBUTTON DATA-API
      * ================= */
+
     $(function() {
         $('.btn, button, input[type=button]').ch_button();
     })
@@ -33017,6 +33034,11 @@ $.widget( "ui.tooltip", {
         }
     );
 
+    /* CHRADIOINPUT PLUGIN DEFINITION
+     * ============================== */
+
+    var old = $.fn.ch_radio_input;
+
     $.fn.ch_radio_input = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -33032,8 +33054,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_radio_input.Constructor = ChRadioInput;
 
+
+    /* CHRADIOINPUT NO CONFLICT
+     * ======================== */
+
+    $.fn.ch_radio_input.noConflict = function() {
+        $.fn.ch_radio_input = old;
+        return this;
+    };
+
+
     /* CHRADIOINPUT DATA-API
-     * ================= */
+     * ===================== */
+
     $(function() {
         $('input[type=radio]').ch_radio_input();
     })
@@ -33070,6 +33103,12 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHCHECKBOXINPUT PLUGIN DEFINITION
+     * ================================= */
+
+    var old = $.fn.ch_checkbox_input;
+
     $.fn.ch_checkbox_input = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -33085,8 +33124,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_checkbox_input.Constructor = ChCheckboxInput;
 
+
+    /* CHCHECKBOXINPUT NO CONFLICT
+     * =========================== */
+
+    $.fn.ch_checkbox_input.noConflict = function() {
+        $.fn.ch_checkbox_input = old;
+        return this;
+    };
+
+
     /* CHCHECKBOXINPUT DATA-API
      * ================= */
+
     $(function() {
         $('input[type=checkbox]').ch_checkbox_input();
     })
@@ -33123,6 +33173,12 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHSELECT PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_select;
+
     $.fn.ch_select = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -33138,8 +33194,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_select.Constructor = ChSelect;
 
+
+    /* CHSELECT NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_select.noConflict = function() {
+        $.fn.ch_select = old;
+        return this;
+    };
+
+
     /* CHBUTTON DATA-API
      * ================= */
+
     $(function() {
         $('select').ch_select();
     })
@@ -33197,6 +33264,10 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHPAGE PLUGIN DEFINITION
+     * ======================== */
+
     $.fn.ch_page = function(option, value) {
         return this.each(function() {
             var $this = $(this),
@@ -33220,8 +33291,10 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_page.Constructor = ChPage;
 
+
     /* CHPAGE DATA-API
      * ================= */
+
     $(function() {
         $('div.page').ch_page();
     })
@@ -33274,6 +33347,12 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHHEADER PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_header;
+
     $.fn.ch_header = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -33296,8 +33375,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_button.Constructor = ChHeader;
 
+
+    /* CHHEADER NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_header.noConflict = function() {
+        $.fn.ch_header = old;
+        return this;
+    };
+
+
     /* CHHEADER DATA-API
      * ================= */
+
     $(function() {
         $('.ch-header').ch_header('show');
     })
@@ -33360,6 +33450,12 @@ $.widget( "ui.tooltip", {
         }
     );
 
+
+    /* CHSIMPLESCROLLABLE PLUGIN DEFINITION
+     * ==================================== */
+
+    var old = $.fn.ch_simple_scrollable;
+
     $.fn.ch_simple_scrollable = function(option) {
         return this.each(function() {
             var $this = $(this),
@@ -33378,8 +33474,19 @@ $.widget( "ui.tooltip", {
 
     $.fn.ch_simple_scrollable.Constructor = ChSimpleScrollable;
 
+
+    /* CHSIMPLESCROLLABLE NO CONFLICT
+     * ============================== */
+
+    $.fn.ch_simple_scrollable.noConflict = function() {
+        $.fn.ch_simple_scrollable = old;
+        return this;
+    };
+
+
     /* CHSIMPLESCROLLABLE DATA-API
-     * ================= */
+     * =========================== */
+
     $(function() {
         $('div.ch-simple-scrollable').ch_simple_scrollable('enable');
     })
index f709fa7..c9f85d2 100644 (file)
@@ -9,4 +9,4 @@ return t}),gt:d(function(t,e,i){for(var n=0>i?i+e:i;e>++n;)t.push(n);return t})}
 }})}}(jQuery),function(t){t.effects.effect.transfer=function(e,i){var n=t(this),s=t(e.to),o="fixed"===s.css("position"),r=t("body"),a=o?r.scrollTop():0,l=o?r.scrollLeft():0,h=s.offset(),c={top:h.top-a,left:h.left-l,height:s.innerHeight(),width:s.innerWidth()},u=n.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-a,left:u.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t){t.widget("ui.menu",{version:"@VERSION",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var n,s,o,r,a,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,s=this.previousFilter||"",o=String.fromCharCode(e.keyCode),r=!1,clearTimeout(this.filterTimer),o===s?r=!0:o=s+o,a=RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())}),n=r&&-1!==n.index(this.active.next())?this.active.nextAll(".ui-menu-item"):n,n.length||(o=String.fromCharCode(e.keyCode),a=RegExp("^"+i(o),"i"),n=this.activeMenu.children(".ui-menu-item").filter(function(){return a.test(t(this).children("a").text())})),n.length?(this.focus(e,n),n.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,n=this.element.find(this.options.menus);n.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),n=e.prev("a"),s=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);n.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",n.attr("id"))}),e=n.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},focus:function(t,e){var i,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),n=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",n.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,n,s,o,r,a;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,s=e.offset().top-this.activeMenu.offset().top-i-n,o=this.activeMenu.scrollTop(),r=this.activeMenu.height(),a=e.height(),0>s?this.activeMenu.scrollTop(o+s):s+a>r&&this.activeMenu.scrollTop(o+s-r+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));n.length||(n=this.element),this._close(n),this.blur(e),this.activeMenu=n},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var n;this.active&&(n="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,n)},nextPage:function(e){var i,n,s;return this.active?(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-n-s}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,n,s;return this.active?(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,s=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-n+s>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function n(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,r=Math.max,a=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,n,s=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=s.children()[0];return t("body").append(s),i=r.offsetWidth,s.css("overflow","scroll"),n=r.offsetWidth,i===n&&(n=s[0].clientWidth),s.remove(),o=i-n},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),n=e.isWindow?"":e.element.css("overflow-y"),s="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:s?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),n=t.isWindow(i[0]);return{element:i,isWindow:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,y,b=t(e.of),_=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(_),x=(e.collision||"flip").split(" "),C={};return y=s(b),b[0].preventDefault&&(e.at="left top"),p=y.width,g=y.height,m=y.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,n=(e[this]||"").split(" ");1===n.length&&(n=h.test(n[0])?n.concat(["center"]):c.test(n[0])?["center"].concat(n):["center","center"]),n[0]=h.test(n[0])?n[0]:"center",n[1]=c.test(n[1])?n[1]:"center",t=u.exec(n[0]),i=u.exec(n[1]),C[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(n[0])[0],d.exec(n[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(C.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var s,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=n(this,"marginLeft"),y=n(this,"marginTop"),k=u+f+n(this,"marginRight")+w.width,D=d+y+n(this,"marginBottom")+w.height,T=t.extend({},v),S=i(C.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?T.left-=u:"center"===e.my[0]&&(T.left-=u/2),"bottom"===e.my[1]?T.top-=d:"center"===e.my[1]&&(T.top-=d/2),T.left+=S[0],T.top+=S[1],t.support.offsetFractions||(T.left=l(T.left),T.top=l(T.top)),s={marginLeft:f,marginTop:y},t.each(["left","top"],function(i,n){t.ui.position[x[i]]&&t.ui.position[x[i]][n](T,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:s,collisionWidth:k,collisionHeight:D,offset:[o[0]+S[0],o[1]+S[1]],my:e.my,at:e.at,within:_,elem:c})}),e.using&&(h=function(t){var i=m.left-T.left,n=i+p-u,s=m.top-T.top,o=s+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:T.left,top:T.top,width:u,height:d},horizontal:0>n?"left":i>0?"right":"center",vertical:0>o?"top":s>0?"bottom":"middle"};u>p&&p>a(i+n)&&(l.horizontal="center"),d>g&&g>a(s+o)&&(l.vertical="middle"),l.important=r(a(i),a(n))>r(a(s),a(o))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(T,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollLeft:n.offset.left,o=n.width,a=t.left-e.collisionPosition.marginLeft,l=s-a,h=a+e.collisionWidth-o-s;e.collisionWidth>o?l>0&&0>=h?(i=t.left+l+e.collisionWidth-o-s,t.left+=l-i):t.left=h>0&&0>=l?s:l>h?s+o-e.collisionWidth:s:l>0?t.left+=l:h>0?t.left-=h:t.left=r(t.left-a,t.left)},top:function(t,e){var i,n=e.within,s=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,l=s-a,h=a+e.collisionHeight-o-s;e.collisionHeight>o?l>0&&0>=h?(i=t.top+l+e.collisionHeight-o-s,t.top+=l-i):t.top=h>0&&0>=l?s:l>h?s+o-e.collisionHeight:s:l>0?t.top+=l:h>0?t.top-=h:t.top=r(t.top-a,t.top)}},flip:{left:function(t,e){var i,n,s=e.within,o=s.offset.left+s.scrollLeft,r=s.width,l=s.isWindow?s.scrollLeft:s.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(n=t.left-e.collisionPosition.marginLeft+d+p+f-l,(n>0||u>a(n))&&(t.left+=d+p+f))},top:function(t,e){var i,n,s=e.within,o=s.offset.top+s.scrollTop,r=s.height,l=s.isWindow?s.scrollTop:s.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(n=t.top+p+f+g+e.collisionHeight-r-o,t.top+p+f+g>c&&(0>n||a(c)>n)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,n,s,o,r=document.getElementsByTagName("body")[0],a=document.createElement("div");e=document.createElement(r?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&t.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in n)e.style[o]=n[o];e.appendChild(a),i=r||document.documentElement,i.insertBefore(e,i.firstChild),a.style.cssText="position: absolute; left: 10.7432222px;",s=t(a).offset().left,t.support.offsetFractions=s>10&&11>s,e.innerHTML="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",{version:"@VERSION",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!e).attr("aria-disabled",e),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"@VERSION",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=[];for(i=n.values&&n.values.length||1,s.length>i&&(s.slice(i).remove(),s=s.slice(0,i)),e=s.length;i>e;e++)r.push(o);this.handles=s.add(t(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,n,s,o,r,a,l,h,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(n-c.values(e));(s>i||s===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(s=i,o=t(this),r=e)}),a=this._start(e,r),a===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,o.addClass("ui-state-active").focus(),l=o.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-o.width()/2,top:e.pageY-l.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,r,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,n,s,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/e,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var n,s,o;this.options.values&&this.options.values.length?(n=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>n||1===e&&n>i)&&(i=n),i!==this.values(e)&&(s=this.values(),s[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:s}),n=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var n,s,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(n=this.options.values,s=arguments[0],o=0;n.length>o;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var n,s=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(s=this.options.values.length),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!i),this._super(e,i),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=0;s>n;n+=1)this._change(null,n);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,n;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),n=0;i.length>n;n+=1)i[n]=this._trimAlignValue(i[n]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,n=t-i;return 2*Math.abs(i)>=e&&(n+=i>0?e:-e),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,n,s,o,r=this.options.range,a=this.options,l=this,h=this._animateOff?!1:a.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(n){i=100*((l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())),c["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](c,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},a.animate),1===n&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),i=o!==s?100*((n-s)/(o-s)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](c,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:a.animate}))},_handleEvents:{keydown:function(i){var n,s,o,r,a=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),n=this._start(i,a),n===!1))return}switch(r=this.options.step,s=o=this.options.values&&this.options.values.length?this.values(a):this.value(),i.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(s===this._valueMax())return;o=this._trimAlignValue(s+r);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(s===this._valueMin())return;o=this._trimAlignValue(s-r)}this._slide(i,a,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(jQuery),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"@VERSION",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,n){var s=i.attr(n);void 0!==s&&s.length&&(e[n]=s)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n}))}var n;n=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,n=t.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,i.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)
 },_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,n=this.options;return e=null!==n.min?n.min:0,i=t-e,i=Math.round(i/n.step)*n.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==n.max&&t>n.max?n.max:null!==n.min&&n.min>t?n.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(this.widget().toggleClass("ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable"))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}(jQuery),function(t,e){function i(){return++s}function n(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var s=0,o=/#.*$/;t.widget("ui.tabs",{version:"@VERSION",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,n=this.options.collapsible,s=location.hash.substring(1);return null===i&&(s&&this.tabs.each(function(n,o){return t(o).attr("aria-controls")===s?(i=n,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=n?!1:0)),!n&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var n=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(n),o=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(s),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),e;default:return}i.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,o),i.ctrlKey||(n.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function n(){return e>s&&(e=0),0>e&&(e=s),e}for(var s=this.tabs.length-1;-1!==t.inArray(n(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,s){var o,r,a,l=t(s).uniqueId().attr("id"),h=t(s).closest("li"),c=h.attr("aria-controls");n(s)?(o=s.hash,r=e.element.find(e._sanitizeSelector(o))):(a=e._tabId(h),o="#"+a,r=e.element.find(o),r.length||(r=e._createPanel(a),r.insertAfter(e.panels[i-1]||e.tablist)),r.attr("aria-live","polite")),r.length&&(e.panels=e.panels.add(r)),c&&h.data("ui-tabs-aria-controls",c),h.attr({"aria-controls":o.substring(1),"aria-labelledby":l}),r.attr("aria-labelledby",l)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,n=0;i=this.tabs[n];n++)e===!0||-1!==t.inArray(n,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,n=this.element.parent();"fill"===e?(i=n.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),n=e.css("position");"absolute"!==n&&"fixed"!==n&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,n=this.active,s=t(e.currentTarget),o=s.closest("li"),r=o[0]===n[0],a=r&&i.collapsible,l=a?t():this._getPanelForTab(o),h=n.length?this._getPanelForTab(n):t(),c={oldTab:n,oldPanel:h,newTab:a?t():o,newPanel:l};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=a?!1:this.tabs.index(o),this.active=r?t():o,this.xhr&&this.xhr.abort(),h.length||l.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),l.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function n(){o.running=!1,o._trigger("activate",e,i)}function s(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&o.options.show?o._show(r,o.options.show,n):(r.show(),n())}var o=this,r=i.newPanel,a=i.oldPanel;this.running=!0,a.length&&this.options.hide?this._hide(a,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),a.hide(),s()),a.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),r.length&&a.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),i=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var n=this.options.disabled;n!==!1&&(i===e?n=!1:(i=this._getIndex(i),n=t.isArray(n)?t.map(n,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(n))},disable:function(i){var n=this.options.disabled;if(n!==!0){if(i===e)n=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,n))return;n=t.isArray(n)?t.merge([i],n).sort():[i]}this._setupDisabled(n)}},load:function(e,i){e=this._getIndex(e);var s=this,o=this.tabs.eq(e),r=o.find(".ui-tabs-anchor"),a=this._getPanelForTab(o),l={tab:o,panel:a};n(r[0])||(this.xhr=t.ajax(this._ajaxSettings(r,i,l)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){a.html(t),s._trigger("load",i,l)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&s.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),a.removeAttr("aria-busy"),t===s.xhr&&delete s.xhr},1)})))},_ajaxSettings:function(e,i,n){var s=this;return{url:e.attr("href"),beforeSend:function(e,o){return s._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},n))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function e(e,i){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(n.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),s=t.inArray(i,n);-1!==s&&n.splice(s,1),e.removeData("ui-tooltip-id"),n=t.trim(n.join(" ")),n?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")}var n=0;t.widget("ui.tooltip",{version:"@VERSION",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var n=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n[0],e.close(s,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,s=this,o=e?e.type:null;return"string"==typeof n?this._open(e,t,n):(i=n.call(t[0],function(i){t.data("ui-tooltip-open")&&s._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,n,s){function o(t){h.of=t,r.is(":hidden")||r.position(h)}var r,a,l,h=t.extend({},this.options.position);if(s){if(r=this._find(n),r.length)return r.find(".ui-tooltip-content").html(s),void 0;n.is("[title]")&&(i&&"mouseover"===i.type?n.attr("title",""):n.removeAttr("title")),r=this._tooltip(n),e(n,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):r.position(t.extend({of:n},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){r.is(":visible")&&(o(h.of),clearInterval(l))},t.fx.interval)),this._trigger("open",i,{tooltip:r}),a={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=n[0],this.close(i,!0)}},remove:function(){this._removeTooltip(r)}},i&&"mouseover"!==i.type||(a.mouseleave="close"),i&&"focusin"!==i.type||(a.focusout="close"),this._on(!0,n,a)}},close:function(e){var n=this,s=t(e?e.currentTarget:this.element),o=this._find(s);this.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&s.attr("title",s.data("ui-tooltip-title")),i(s),o.stop(!0),this._hide(o,this.options.hide,function(){n._removeTooltip(t(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+n++,s=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(s),s.appendTo(this.document[0].body),this.tooltips[i]=e,s},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n[0],e.close(s,!0),t("#"+i).remove(),n.data("ui-tooltip-title")&&(n.attr("title",n.data("ui-tooltip-title")),n.removeData("ui-tooltip-title"))})}})}(jQuery),function(t){function e(t,e,i){for(var n=(i||0)-1,s=t.length;s>++n;)if(t[n]===e)return n;return-1}function i(t,i){var n=typeof i;if(t=t.cache,"boolean"==n||null==i)return t[i];"number"!=n&&"string"!=n&&(n="object");var s="number"==n?i:x+i;return t=t[n]||(t[n]={}),"object"==n?t[s]&&e(t[s],i)>-1?0:-1:t[s]?0:-1}function n(t){var e=this.cache,i=typeof t;if("boolean"==i||null==t)e[t]=!0;else{"number"!=i&&"string"!=i&&(i="object");var n="number"==i?t:x+t,s=e[i]||(e[i]={});"object"==i?(s[n]||(s[n]=[])).push(t):s[n]=!0}}function s(t){return t.charCodeAt(0)}function o(t,e){var i=t.index,n=e.index;if(t=t.criteria,e=e.criteria,t!==e){if(t>e||t===m)return 1;if(e>t||e===m)return-1}return n>i?-1:1}function r(t){var e=-1,i=t.length,s=t[0],o=t[i-1];if(s&&"object"==typeof s&&o&&"object"==typeof o)return!1;var r=h();r["false"]=r["null"]=r["true"]=r.undefined=!1;var a=h();for(a.array=t,a.cache=r,a.push=n;i>++e;)a.push(t[e]);return a}function a(t){return"\\"+G[t]}function l(){return v.pop()||[]}function h(){return y.pop()||{args:"",array:null,bottom:"",cache:null,criteria:null,"false":!1,firstArg:"",index:0,init:"",leading:!1,loop:"",maxWait:0,"null":!1,number:null,object:null,push:null,shadowedProps:null,string:null,support:null,top:"",trailing:!1,"true":!1,undefined:!1,useHas:!1,useKeys:!1,value:null}}function c(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function u(){}function d(t){t.length=0,k>v.length&&v.push(t)}function p(t){var e=t.cache;e&&p(e),t.array=t.cache=t.criteria=t.object=t.number=t.string=t.value=null,k>y.length&&y.push(t)}function f(t,e,i){e||(e=0),i===m&&(i=t?t.length:0);for(var n=-1,s=i-e||0,o=Array(0>s?0:s);s>++n;)o[n]=t[e+n];return o}function g(n){function v(t){return t&&"object"==typeof t&&!Rn(t)&&gn.call(t,"__wrapped__")?t:new y(t)}function y(t){this.__wrapped__=t}function k(t,e,i){for(var n=-1,s=t?t.length:0,o=[];s>++n;){var r=t[n];i&&(r=i(r,n,t)),r&&"object"==typeof r&&(Rn(r)||le(r))?mn.apply(o,e?r:k(r)):o.push(r)}return o}function G(t,n,s){var o=-1,a=se(),h=t?t.length:0,c=[],u=!n&&h>=C&&a===e,f=s||u?l():c;if(u){var g=r(f);g?(a=i,f=g):(u=!1,f=s?f:(d(f),c))}for(;h>++o;){var m=t[o],v=s?s(m,o,t):m;(n?!o||f[f.length-1]!==v:0>a(f,v))&&((s||u)&&f.push(v),c.push(m))}return u?(d(f.array),p(f)):s&&d(f),c}function J(t,e,i,n){function s(){var n=arguments,h=r?this:e;if(o||(t=e[a]),i.length&&(n=n.length?(n=En.call(n),l?n.concat(i):i.concat(n)):i),this instanceof s){h=ie(t.prototype);var c=t.apply(h,n);return xe(c)?c:h}return t.apply(h,n)}var o=we(t),r=!i,a=e;if(r){var l=n;i=e}else if(!o){if(!n)throw new en;e=t}return s}function te(){var t=h(),e=w.keys;t.shadowedProps=W,t.support=On,t.array=t.bottom=t.loop=t.top="",t.init="iterable",t.useHas=!0,t.useKeys=!!e;for(var i,n=0;i=arguments[n];n++)for(var s in i)t[s]=i[s];var o=t.args;t.firstArg=/^[^,]+/.exec(o)[0];var r=Qi("errorClass, errorProto, hasOwnProperty, indicatorObject, isArguments, isArray, isString, keys, lodash, objectProto, objectTypes, nonEnumProps, stringClass, stringProto, toString","return function("+o+") {\n"+Wn(t)+"\n}");return p(t),r(q,sn,gn,_,le,Rn,Se,e,v,on,X,jn,K,rn,_n)}function ie(t){return xe(t)?xn(t):{}}function ne(t){return Yn[t]}function se(){var t=(t=v.indexOf)===oi?e:t;return t}function oe(t){return function(e,i,n,s){return"boolean"!=typeof i&&null!=i&&(s=n,n=s&&s[i]===e?m:i,i=!1),null!=n&&(n=v.createCallback(n,s)),t(e,i,n,s)}}function re(t){var e,i;return!t||_n.call(t)!=U||(e=t.constructor,we(e)&&!(e instanceof e))||!On.argsClass&&le(t)||!On.nodeClass&&c(t)?!1:On.ownLast?(Gn(t,function(t,e,n){return i=gn.call(n,e),!1}),i!==!1):(Gn(t,function(t,e){i=e}),i===m||gn.call(t,i))}function ae(t){return Un[t]}function le(t){return t&&"object"==typeof t?_n.call(t)==$:!1}function he(t,e,i,n,s,o){var r=t;if("boolean"!=typeof e&&null!=e&&(n=i,i=e,e=!1),"function"==typeof i){if(i=n===m?i:v.createCallback(i,n,1),r=i(r),r!==m)return r;r=t}var a=xe(r);if(a){var h=_n.call(r);if(!Q[h]||!On.nodeClass&&c(r))return r;var u=Rn(r)}if(!a||!e)return a?u?f(r):Qn({},r):r;var p=Hn[h];switch(h){case R:case L:return new p(+r);case Y:case K:return new p(r);case V:return p(r.source,M.exec(r))}var g=!s;s||(s=l()),o||(o=l());for(var y=s.length;y--;)if(s[y]==t)return o[y];return r=u?p(r.length):{},u&&(gn.call(t,"index")&&(r.index=t.index),gn.call(t,"input")&&(r.input=t.input)),s.push(t),o.push(r),(u?Bn:Jn)(t,function(t,n){r[n]=he(t,e,i,m,s,o)}),g&&(d(s),d(o)),r}function ce(t,e,i){return he(t,!0,e,i)}function ue(t,e,i){var n;return e=v.createCallback(e,i),Jn(t,function(t,i,s){return e(t,i,s)?(n=i,!1):m}),n}function de(t){var e=[];return Gn(t,function(t,i){we(t)&&e.push(i)}),e.sort()}function pe(t,e){return t?gn.call(t,e):!1}function fe(t){for(var e=-1,i=qn(t),n=i.length,s={};n>++e;){var o=i[e];s[t[o]]=o}return s}function ge(t){return t===!0||t===!1||_n.call(t)==R}function me(t){return t?"object"==typeof t&&_n.call(t)==L:!1}function ve(t){return t?1===t.nodeType:!1}function ye(t){var e=!0;if(!t)return e;var i=_n.call(t),n=t.length;return i==F||i==K||(On.argsClass?i==$:le(t))||i==U&&"number"==typeof n&&we(t.splice)?!n:(Jn(t,function(){return e=!1}),e)}function be(t,e,i,n,s,o){var r=i===_;if("function"==typeof i&&!r){i=v.createCallback(i,n,2);var a=i(t,e);if(a!==m)return!!a}if(t===e)return 0!==t||1/t==1/e;var h=typeof t,u=typeof e;if(t===t&&(!t||"function"!=h&&"object"!=h)&&(!e||"function"!=u&&"object"!=u))return!1;if(null==t||null==e)return t===e;var p=_n.call(t),f=_n.call(e);if(p==$&&(p=U),f==$&&(f=U),p!=f)return!1;switch(p){case R:case L:return+t==+e;case Y:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case V:case K:return t==tn(e)}var g=p==F;if(!g){if(gn.call(t,"__wrapped__ ")||gn.call(e,"__wrapped__"))return be(t.__wrapped__||t,e.__wrapped__||e,i,n,s,o);if(p!=U||!On.nodeClass&&(c(t)||c(e)))return!1;var y=!On.argsObject&&le(t)?Ji:t.constructor,b=!On.argsObject&&le(e)?Ji:e.constructor;if(y!=b&&!(we(y)&&y instanceof y&&we(b)&&b instanceof b))return!1}var w=!s;s||(s=l()),o||(o=l());for(var x=s.length;x--;)if(s[x]==t)return o[x]==e;var C=0;if(a=!0,s.push(t),o.push(e),g){if(x=t.length,C=e.length,a=C==t.length,!a&&!r)return a;for(;C--;){var k=x,D=e[C];if(r)for(;k--&&!(a=be(t[k],D,i,n,s,o)););else if(!(a=be(t[C],D,i,n,s,o)))break}return a}return Gn(e,function(e,r,l){return gn.call(l,r)?(C++,a=gn.call(t,r)&&be(t[r],e,i,n,s,o)):m}),a&&!r&&Gn(t,function(t,e,i){return gn.call(i,e)?a=--C>-1:m}),w&&(d(s),d(o)),a}function _e(t){return kn(t)&&!Dn(parseFloat(t))}function we(t){return"function"==typeof t}function xe(t){return!(!t||!X[typeof t])}function Ce(t){return De(t)&&t!=+t}function ke(t){return null===t}function De(t){return"number"==typeof t||_n.call(t)==Y}function Te(t){return t&&X[typeof t]?_n.call(t)==V:!1}function Se(t){return"string"==typeof t||_n.call(t)==K}function Pe(t){return t===m}function Ie(t,e,i){var n=arguments,s=0,o=2;if(!xe(t))return t;if(i===_)var r=n[3],a=n[4],h=n[5];else{var c=!0;a=l(),h=l(),"number"!=typeof i&&(o=n.length),o>3&&"function"==typeof n[o-2]?r=v.createCallback(n[--o-1],n[o--],2):o>2&&"function"==typeof n[o-1]&&(r=n[--o])}for(;o>++s;)(Rn(n[s])?Re:Jn)(n[s],function(e,i){var n,s,o=e,l=t[i];if(e&&((s=Rn(e))||Zn(e))){for(var c=a.length;c--;)if(n=a[c]==e){l=h[c];break}if(!n){var u;r&&(o=r(l,e),(u=o!==m)&&(l=o)),u||(l=s?Rn(l)?l:[]:Zn(l)?l:{}),a.push(e),h.push(l),u||(l=Ie(l,e,_,r,a,h))}}else r&&(o=r(l,e),o===m&&(o=e)),o!==m&&(l=o);t[i]=l});return c&&(d(a),d(h)),t}function Me(t,e,i){var n=se(),s="function"==typeof e,o={};if(s)e=v.createCallback(e,i);else var r=un.apply(nn,En.call(arguments,1));return Gn(t,function(t,i,a){(s?!e(t,i,a):0>n(r,i))&&(o[i]=t)}),o}function Ee(t){for(var e=-1,i=qn(t),n=i.length,s=Yi(n);n>++e;){var o=i[e];s[e]=[o,t[o]]}return s}function Ne(t,e,i){var n={};if("function"!=typeof e)for(var s=-1,o=un.apply(nn,En.call(arguments,1)),r=xe(t)?o.length:0;r>++s;){var a=o[s];a in t&&(n[a]=t[a])}else e=v.createCallback(e,i),Gn(t,function(t,i,s){e(t,i,s)&&(n[i]=t)});return n}function Ae(t,e,i,n){var s=Rn(t);if(e=v.createCallback(e,n,4),null==i)if(s)i=[];else{var o=t&&t.constructor,r=o&&o.prototype;i=ie(r)}return(s?Bn:Jn)(t,function(t,n,s){return e(i,t,n,s)}),i}function He(t){for(var e=-1,i=qn(t),n=i.length,s=Yi(n);n>++e;)s[e]=t[i[e]];return s}function je(t){var e=-1,i=un.apply(nn,En.call(arguments,1)),n=i.length,s=Yi(n);for(On.unindexedChars&&Se(t)&&(t=t.split(""));n>++e;)s[e]=t[i[e]];return s}function Oe(t,e,i){var n=-1,s=se(),o=t?t.length:0,r=!1;return i=(0>i?Sn(0,o+i):i)||0,o&&"number"==typeof o?r=(Se(t)?t.indexOf(e,i):s(t,e,i))>-1:Bn(t,function(t){return++n>=i?!(r=t===e):m}),r}function We(t,e,i){var n={};return e=v.createCallback(e,i),Re(t,function(t,i,s){i=tn(e(t,i,s)),gn.call(n,i)?n[i]++:n[i]=1}),n}function ze(t,e,i){var n=!0;if(e=v.createCallback(e,i),Rn(t))for(var s=-1,o=t.length;o>++s&&(n=!!e(t[s],s,t)););else Bn(t,function(t,i,s){return n=!!e(t,i,s)});return n}function $e(t,e,i){var n=[];if(e=v.createCallback(e,i),Rn(t))for(var s=-1,o=t.length;o>++s;){var r=t[s];e(r,s,t)&&n.push(r)}else Bn(t,function(t,i,s){e(t,i,s)&&n.push(t)});return n}function Fe(t,e,i){if(e=v.createCallback(e,i),!Rn(t)){var n;return Bn(t,function(t,i,s){return e(t,i,s)?(n=t,!1):m}),n}for(var s=-1,o=t.length;o>++s;){var r=t[s];if(e(r,s,t))return r}}function Re(t,e,i){if(e&&i===m&&Rn(t))for(var n=-1,s=t.length;s>++n&&e(t[n],n,t)!==!1;);else Bn(t,e,i);return t}function Le(t,e,i){var n={};return e=v.createCallback(e,i),Re(t,function(t,i,s){i=tn(e(t,i,s)),(gn.call(n,i)?n[i]:n[i]=[]).push(t)}),n}function qe(t,e){var i=En.call(arguments,2),n=-1,s="function"==typeof e,o=t?t.length:0,r=Yi("number"==typeof o?o:0);return Re(t,function(t){r[++n]=(s?e:t[e]).apply(t,i)}),r}function Be(t,e,i){var n=-1,s=t?t.length:0,o=Yi("number"==typeof s?s:0);if(e=v.createCallback(e,i),Rn(t))for(;s>++n;)o[n]=e(t[n],n,t);else Bn(t,function(t,i,s){o[++n]=e(t,i,s)});return o}function Ye(t,e,i){var n=-1/0,o=n;if(!e&&Rn(t))for(var r=-1,a=t.length;a>++r;){var l=t[r];l>o&&(o=l)}else e=!e&&Se(t)?s:v.createCallback(e,i),Bn(t,function(t,i,s){var r=e(t,i,s);r>n&&(n=r,o=t)});return o}function Ue(t,e,i){var n=1/0,o=n;if(!e&&Rn(t))for(var r=-1,a=t.length;a>++r;){var l=t[r];o>l&&(o=l)}else e=!e&&Se(t)?s:v.createCallback(e,i),Bn(t,function(t,i,s){var r=e(t,i,s);n>r&&(n=r,o=t)});return o}function Ve(t,e,i,n){var s=3>arguments.length;if(e=v.createCallback(e,n,4),Rn(t)){var o=-1,r=t.length;for(s&&(i=t[++o]);r>++o;)i=e(i,t[o],o,t)}else Bn(t,function(t,n,o){i=s?(s=!1,t):e(i,t,n,o)});return i}function Ke(t,e,i,n){var s=t,o=t?t.length:0,r=3>arguments.length;if("number"!=typeof o){var a=qn(t);o=a.length}else On.unindexedChars&&Se(t)&&(s=t.split(""));return e=v.createCallback(e,n,4),Re(t,function(t,n,l){n=a?a[--o]:--o,i=r?(r=!1,s[n]):e(i,s[n],n,l)}),i}function Qe(t,e,i){return e=v.createCallback(e,i),$e(t,function(t,i,n){return!e(t,i,n)})}function Xe(t){var e=-1,i=t?t.length:0,n=Yi("number"==typeof i?i:0);return Re(t,function(t){var i=dn(Mn()*(++e+1));n[e]=n[i],n[i]=t}),n}function Ge(t){var e=t?t.length:0;return"number"==typeof e?e:qn(t).length}function Je(t,e,i){var n;if(e=v.createCallback(e,i),Rn(t))for(var s=-1,o=t.length;o>++s&&!(n=e(t[s],s,t)););else Bn(t,function(t,i,s){return!(n=e(t,i,s))});return!!n}function Ze(t,e,i){var n=-1,s=t?t.length:0,r=Yi("number"==typeof s?s:0);for(e=v.createCallback(e,i),Re(t,function(t,i,s){var o=r[++n]=h();o.criteria=e(t,i,s),o.index=n,o.value=t}),s=r.length,r.sort(o);s--;){var a=r[s];r[s]=a.value,p(a)}return r}function ti(t){return t&&"number"==typeof t.length?On.unindexedChars&&Se(t)?t.split(""):f(t):He(t)}function ei(t){for(var e=-1,i=t?t.length:0,n=[];i>++e;){var s=t[e];s&&n.push(s)}return n}function ii(t){var n=-1,s=se(),o=t?t.length:0,a=un.apply(nn,En.call(arguments,1)),l=[],h=o>=C&&s===e;if(h){var c=r(a);c?(s=i,a=c):h=!1}for(;o>++n;){var u=t[n];0>s(a,u)&&l.push(u)}return h&&p(a),l}function ni(t,e,i){var n=-1,s=t?t.length:0;for(e=v.createCallback(e,i);s>++n;)if(e(t[n],n,t))return n;return-1}function si(t,e,i){if(t){var n=0,s=t.length;if("number"!=typeof e&&null!=e){var o=-1;for(e=v.createCallback(e,i);s>++o&&e(t[o],o,t);)n++}else if(n=e,null==n||i)return t[0];return f(t,0,Pn(Sn(0,n),s))}}function oi(t,i,n){if("number"==typeof n){var s=t?t.length:0;n=0>n?Sn(0,s+n):n||0}else if(n){var o=di(t,i);return t[o]===i?o:-1}return t?e(t,i,n):-1}function ri(t,e,i){if(!t)return[];var n=0,s=t.length;if("number"!=typeof e&&null!=e){var o=s;for(e=v.createCallback(e,i);o--&&e(t[o],o,t);)n++}else n=null==e||i?1:e||n;return f(t,0,Pn(Sn(0,s-n),s))}function ai(t){for(var n=arguments,s=n.length,o=-1,a=l(),h=-1,c=se(),u=t?t.length:0,f=[],g=l();s>++o;){var m=n[o];a[o]=c===e&&(m?m.length:0)>=C&&r(o?n[o]:g)}t:for(;u>++h;){var v=a[0];if(m=t[h],0>(v?i(v,m):c(g,m))){for(o=s,(v||g).push(m);--o;)if(v=a[o],0>(v?i(v,m):c(n[o],m)))continue t;f.push(m)}}for(;s--;)v=a[s],v&&p(v);return d(a),d(g),f}function li(t,e,i){if(t){var n=0,s=t.length;if("number"!=typeof e&&null!=e){var o=s;for(e=v.createCallback(e,i);o--&&e(t[o],o,t);)n++}else if(n=e,null==n||i)return t[s-1];return f(t,Sn(0,s-n))}}function hi(t,e,i){var n=t?t.length:0;for("number"==typeof i&&(n=(0>i?Sn(0,n+i):Pn(i,n-1))+1);n--;)if(t[n]===e)return n;
 return-1}function ci(t,e,i){t=+t||0,i=+i||1,null==e&&(e=t,t=0);for(var n=-1,s=Sn(0,hn((e-t)/i)),o=Yi(s);s>++n;)o[n]=t,t+=i;return o}function ui(t,e,i){if("number"!=typeof e&&null!=e){var n=0,s=-1,o=t?t.length:0;for(e=v.createCallback(e,i);o>++s&&e(t[s],s,t);)n++}else n=null==e||i?1:Sn(0,e);return f(t,n)}function di(t,e,i,n){var s=0,o=t?t.length:s;for(i=i?v.createCallback(i,n,1):Ai,e=i(e);o>s;){var r=s+o>>>1;e>i(t[r])?s=r+1:o=r}return s}function pi(t){return t||(arguments[0]=nn),G(k(arguments,!0))}function fi(t){return ii(t,En.call(arguments,1))}function gi(){for(var t=arguments.length>1?arguments:arguments[0],e=-1,i=t?Ye(ts(t,"length")):0,n=Yi(0>i?0:i);i>++e;)n[e]=ts(t,e);return n}function mi(t,e){for(var i=-1,n=t?t.length:0,s={};n>++i;){var o=t[i];e?s[o]=e[i]:s[o[0]]=o[1]}return s}function vi(t,e){return function(){return 1>--t?e.apply(this,arguments):m}}function yi(t,e){return On.fastBind||wn&&arguments.length>2?wn.call.apply(wn,arguments):J(t,e,En.call(arguments,2))}function bi(t){for(var e=arguments.length>1?un.apply(nn,En.call(arguments,1)):de(t),i=-1,n=e.length;n>++i;){var s=e[i];t[s]=yi(t[s],t)}return t}function _i(t,e){return J(t,e,En.call(arguments,2),_)}function wi(){var t=arguments;return function(){for(var e=arguments,i=t.length;i--;)e=[t[i].apply(this,e)];return e[0]}}function xi(t,e,i){if(null==t)return Ai;var n=typeof t;if("function"!=n){if("object"!=n)return function(e){return e[t]};var s=qn(t);return function(e){for(var i=s.length,n=!1;i--&&(n=be(e[s[i]],t[s[i]],_)););return n}}return e===m||H&&!H.test(pn.call(t))?t:1===i?function(i){return t.call(e,i)}:2===i?function(i,n){return t.call(e,i,n)}:4===i?function(i,n,s,o){return t.call(e,i,n,s,o)}:function(i,n,s){return t.call(e,i,n,s)}}function Ci(t,e,i){function n(){cn(d),cn(p),h=0,d=p=null}function s(){var e=f&&(!g||h>1);n(),e&&(u!==!1&&(c=new Vi),a=t.apply(l,r))}function o(){n(),(f||u!==e)&&(c=new Vi,a=t.apply(l,r))}var r,a,l,h=0,c=0,u=!1,d=null,p=null,f=!0;if(e=Sn(0,e||0),i===!0){var g=!0;f=!1}else xe(i)&&(g=i.leading,u="maxWait"in i&&Sn(e,i.maxWait||0),f="trailing"in i?i.trailing:f);return function(){if(r=arguments,l=this,h++,cn(p),u===!1)g&&2>h&&(a=t.apply(l,r));else{var i=new Vi;d||g||(c=i);var n=u-(i-c);0>=n?(cn(d),d=null,c=i,a=t.apply(l,r)):d||(d=bn(o,n))}return e!==u&&(p=bn(s,e)),a}}function ki(t){var e=En.call(arguments,1);return bn(function(){t.apply(m,e)},1)}function Di(t,e){var i=En.call(arguments,2);return bn(function(){t.apply(m,i)},e)}function Ti(t,e){function i(){var n=i.cache,s=x+(e?e.apply(this,arguments):arguments[0]);return gn.call(n,s)?n[s]:n[s]=t.apply(this,arguments)}return i.cache={},i}function Si(t){var e,i;return function(){return e?i:(e=!0,i=t.apply(this,arguments),t=null,i)}}function Pi(t){return J(t,En.call(arguments,1))}function Ii(t){return J(t,En.call(arguments,1),null,_)}function Mi(t,e,i){var n=!0,s=!0;i===!1?n=!1:xe(i)&&(n="leading"in i?i.leading:n,s="trailing"in i?i.trailing:s),i=h(),i.leading=n,i.maxWait=e,i.trailing=s;var o=Ci(t,e,i);return p(i),o}function Ei(t,e){return function(){var i=[t];return mn.apply(i,arguments),e.apply(this,i)}}function Ni(t){return null==t?"":tn(t).replace(Kn,ne)}function Ai(t){return t}function Hi(t){Re(de(t),function(e){var i=v[e]=t[e];v.prototype[e]=function(){var t=this.__wrapped__,e=[t];mn.apply(e,arguments);var n=i.apply(v,e);return t&&"object"==typeof t&&t===n?this:new y(n)}})}function ji(){return n._=an,this}function Oi(t,e){null==t&&null==e&&(e=1),t=+t||0,null==e?(e=t,t=0):e=+e||0;var i=Mn();return t%1||e%1?t+Pn(i*(e-t+parseFloat("1e-"+((i+"").length-1))),e):t+dn(i*(e-t+1))}function Wi(t,e){var i=t?t[e]:m;return we(i)?t[e]():i}function zi(t,e,i){var n=v.templateSettings;t||(t=""),i=Wn?Xn({},i,n):n;var s,o=Wn&&Xn({},i.imports,n.imports),r=Wn?qn(o):["_"],l=Wn?He(o):[v],h=0,c=i.interpolate||A,u="__p += '",d=Zi((i.escape||A).source+"|"+c.source+"|"+(c===E?I:A).source+"|"+(i.evaluate||A).source+"|$","g");t.replace(d,function(e,i,n,o,r,l){return n||(n=o),u+=t.slice(h,l).replace(j,a),i&&(u+="' +\n__e("+i+") +\n'"),r&&(s=!0,u+="';\n"+r+";\n__p += '"),n&&(u+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),h=l+e.length,e}),u+="';\n";var p=i.variable,f=p;f||(p="obj",u="with ("+p+") {\n"+u+"\n}\n"),u=(s?u.replace(T,""):u).replace(S,"$1").replace(P,"$1;"),u="function("+p+") {\n"+(f?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+u+"return __p\n}";var g="\n/*\n//# sourceURL="+(i.sourceURL||"/lodash/template/source["+z++ +"]")+"\n*/";try{var y=Qi(r,"return "+u+g).apply(m,l)}catch(b){throw b.source=u,b}return e?y(e):(y.source=u,y)}function $i(t,e,i){t=(t=+t)>-1?t:0;var n=-1,s=Yi(t);for(e=v.createCallback(e,i,1);t>++n;)s[n]=e(n);return s}function Fi(t){return null==t?"":tn(t).replace(Vn,ae)}function Ri(t){var e=++b;return tn(null==t?"":t)+e}function Li(t,e){return e(t),t}function qi(){return tn(this.__wrapped__)}function Bi(){return this.__wrapped__}n=n?ee.defaults(t.Object(),n,ee.pick(t,O)):t;var Yi=n.Array,Ui=n.Boolean,Vi=n.Date,Ki=n.Error,Qi=n.Function,Xi=n.Math,Gi=n.Number,Ji=n.Object,Zi=n.RegExp,tn=n.String,en=n.TypeError,nn=[],sn=Ki.prototype,on=Ji.prototype,rn=tn.prototype,an=n._,ln=Zi("^"+tn(on.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),hn=Xi.ceil,cn=n.clearTimeout,un=nn.concat,dn=Xi.floor,pn=Qi.prototype.toString,fn=ln.test(fn=Ji.getPrototypeOf)&&fn,gn=on.hasOwnProperty,mn=nn.push,vn=on.propertyIsEnumerable,yn=n.setImmediate,bn=n.setTimeout,_n=on.toString,wn=ln.test(wn=_n.bind)&&wn,xn=ln.test(xn=Ji.create)&&xn,Cn=ln.test(Cn=Yi.isArray)&&Cn,kn=n.isFinite,Dn=n.isNaN,Tn=ln.test(Tn=Ji.keys)&&Tn,Sn=Xi.max,Pn=Xi.min,In=n.parseInt,Mn=Xi.random,En=nn.slice,Nn=ln.test(n.attachEvent),An=wn&&!/\n|true/.test(wn+Nn),Hn={};Hn[F]=Yi,Hn[R]=Ui,Hn[L]=Vi,Hn[B]=Qi,Hn[U]=Ji,Hn[Y]=Gi,Hn[V]=Zi,Hn[K]=tn;var jn={};jn[F]=jn[L]=jn[Y]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},jn[R]=jn[K]={constructor:!0,toString:!0,valueOf:!0},jn[q]=jn[B]=jn[V]={constructor:!0,toString:!0},jn[U]={constructor:!0},function(){for(var t=W.length;t--;){var e=W[t];for(var i in jn)gn.call(jn,i)&&!gn.call(jn[i],e)&&(jn[i][e]=!1)}}(),y.prototype=v.prototype;var On=v.support={};(function(){var t=function(){this.x=1},e={0:1,length:1},i=[];t.prototype={valueOf:1,y:1};for(var n in new t)i.push(n);for(n in arguments);On.argsObject=arguments.constructor==Ji&&!(arguments instanceof Yi),On.argsClass=_n.call(arguments)==$,On.enumErrorProps=vn.call(sn,"message")||vn.call(sn,"name"),On.enumPrototypes=vn.call(t,"prototype"),On.fastBind=wn&&!An,On.ownLast="x"!=i[0],On.nonEnumArgs=0!=n,On.nonEnumShadows=!/valueOf/.test(i),On.spliceObjects=(nn.splice.call(e,0,1),!e[0]),On.unindexedChars="xx"!="x"[0]+Ji("x")[0];try{On.nodeClass=!(_n.call(document)==U&&!({toString:0}+""))}catch(s){On.nodeClass=!0}})(1),v.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:E,variable:"",imports:{_:v}};var Wn=zi("var index, iterable = <%= firstArg %>, result = <%= init %>;\nif (!iterable) return result;\n<%= top %>;<% if (array) { %>\nvar length = iterable.length; index = -1;\nif (<%= array %>) {  <% if (support.unindexedChars) { %>\n  if (isString(iterable)) {\n    iterable = iterable.split('')\n  }  <% } %>\n  while (++index < length) {\n    <%= loop %>;\n  }\n}\nelse {  <% } else if (support.nonEnumArgs) { %>\n  var length = iterable.length; index = -1;\n  if (length && isArguments(iterable)) {\n    while (++index < length) {\n      index += '';\n      <%= loop %>;\n    }\n  } else {  <% } %>  <% if (support.enumPrototypes) { %>\n  var skipProto = typeof iterable == 'function';\n  <% } %>  <% if (support.enumErrorProps) { %>\n  var skipErrorProps = iterable === errorProto || iterable instanceof Error;\n  <% } %>  <%    var conditions = [];    if (support.enumPrototypes) { conditions.push('!(skipProto && index == \"prototype\")'); }    if (support.enumErrorProps)  { conditions.push('!(skipErrorProps && (index == \"message\" || index == \"name\"))'); }  %>  <% if (useHas && useKeys) { %>\n  var ownIndex = -1,\n      ownProps = objectTypes[typeof iterable] && keys(iterable),\n      length = ownProps ? ownProps.length : 0;\n\n  while (++ownIndex < length) {\n    index = ownProps[ownIndex];\n<%    if (conditions.length) { %>    if (<%= conditions.join(' && ') %>) {\n  <% } %>    <%= loop %>;    <% if (conditions.length) { %>\n    }<% } %>\n  }  <% } else { %>\n  for (index in iterable) {\n<%    if (useHas) { conditions.push(\"hasOwnProperty.call(iterable, index)\"); }    if (conditions.length) { %>    if (<%= conditions.join(' && ') %>) {\n  <% } %>    <%= loop %>;    <% if (conditions.length) { %>\n    }<% } %>\n  }    <% if (support.nonEnumShadows) { %>\n\n  if (iterable !== objectProto) {\n    var ctor = iterable.constructor,\n        isProto = iterable === (ctor && ctor.prototype),\n        className = iterable === stringProto ? stringClass : iterable === errorProto ? errorClass : toString.call(iterable),\n        nonEnum = nonEnumProps[className];\n      <% for (k = 0; k < 7; k++) { %>\n    index = '<%= shadowedProps[k] %>';\n    if ((!(isProto && nonEnum[index]) && hasOwnProperty.call(iterable, index))<%        if (!useHas) { %> || (!nonEnum[index] && iterable[index] !== objectProto[index])<% }      %>) {\n      <%= loop %>;\n    }      <% } %>\n  }    <% } %>  <% } %>  <% if (array || support.nonEnumArgs) { %>\n}<% } %>\n<%= bottom %>;\nreturn result"),zn={args:"object, source, guard",top:"var args = arguments,\n    argsIndex = 0,\n    argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n  iterable = args[argsIndex];\n  if (iterable && objectTypes[typeof iterable]) {",loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:"  }\n}"},$n={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg)",array:"typeof length == 'number'",loop:"if (callback(iterable[index], index, collection) === false) return result"},Fn={top:"if (!objectTypes[typeof iterable]) return result;\n"+$n.top,array:!1};if(!xn)var ie=function(t){if(xe(t)){u.prototype=t;var e=new u;u.prototype=null}return e||{}};On.argsClass||(le=function(t){return t&&"object"==typeof t?gn.call(t,"callee"):!1});var Rn=Cn||function(t){return t&&"object"==typeof t?_n.call(t)==F:!1},Ln=te({args:"object",init:"[]",top:"if (!(objectTypes[typeof object])) return result",loop:"result.push(index)"}),qn=w.keys=Tn?function(t){return xe(t)?On.enumPrototypes&&"function"==typeof t||On.nonEnumArgs&&t.length&&le(t)?Ln(t):Tn(t):[]}:Ln,Bn=te($n),Yn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Un=fe(Yn),Vn=Zi("("+qn(Un).join("|")+")","g"),Kn=Zi("["+qn(Yn).join("")+"]","g"),Qn=te(zn,{top:zn.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n  var callback = lodash.createCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n  callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),Xn=te(zn),Gn=te($n,Fn,{useHas:!1}),Jn=te($n,Fn);we(/x/)&&(we=function(t){return"function"==typeof t&&_n.call(t)==B});var Zn=fn?function(t){if(!t||_n.call(t)!=U||!On.argsClass&&le(t))return!1;var e=t.valueOf,i="function"==typeof e&&(i=fn(e))&&fn(i);return i?t==i||fn(t)==i:re(t)}:re,ts=Be,es=$e,is=oe(k),ns=oe(G);An&&Z&&"function"==typeof yn&&(ki=yi(yn,n));var ss=8==In(D+"08")?In:function(t,e){return In(Se(t)?t.replace(N,""):t,e||0)};return v.after=vi,v.assign=Qn,v.at=je,v.bind=yi,v.bindAll=bi,v.bindKey=_i,v.compact=ei,v.compose=wi,v.countBy=We,v.createCallback=xi,v.debounce=Ci,v.defaults=Xn,v.defer=ki,v.delay=Di,v.difference=ii,v.filter=$e,v.flatten=is,v.forEach=Re,v.forIn=Gn,v.forOwn=Jn,v.functions=de,v.groupBy=Le,v.initial=ri,v.intersection=ai,v.invert=fe,v.invoke=qe,v.keys=qn,v.map=Be,v.max=Ye,v.memoize=Ti,v.merge=Ie,v.min=Ue,v.omit=Me,v.once=Si,v.pairs=Ee,v.partial=Pi,v.partialRight=Ii,v.pick=Ne,v.pluck=ts,v.range=ci,v.reject=Qe,v.rest=ui,v.shuffle=Xe,v.sortBy=Ze,v.tap=Li,v.throttle=Mi,v.times=$i,v.toArray=ti,v.transform=Ae,v.union=pi,v.uniq=ns,v.values=He,v.where=es,v.without=fi,v.wrap=Ei,v.zip=gi,v.zipObject=mi,v.collect=Be,v.drop=ui,v.each=Re,v.extend=Qn,v.methods=de,v.object=mi,v.select=$e,v.tail=ui,v.unique=ns,v.unzip=gi,Hi(v),v.chain=v,v.prototype.chain=function(){return this},v.clone=he,v.cloneDeep=ce,v.contains=Oe,v.escape=Ni,v.every=ze,v.find=Fe,v.findIndex=ni,v.findKey=ue,v.has=pe,v.identity=Ai,v.indexOf=oi,v.isArguments=le,v.isArray=Rn,v.isBoolean=ge,v.isDate=me,v.isElement=ve,v.isEmpty=ye,v.isEqual=be,v.isFinite=_e,v.isFunction=we,v.isNaN=Ce,v.isNull=ke,v.isNumber=De,v.isObject=xe,v.isPlainObject=Zn,v.isRegExp=Te,v.isString=Se,v.isUndefined=Pe,v.lastIndexOf=hi,v.mixin=Hi,v.noConflict=ji,v.parseInt=ss,v.random=Oi,v.reduce=Ve,v.reduceRight=Ke,v.result=Wi,v.runInContext=g,v.size=Ge,v.some=Je,v.sortedIndex=di,v.template=zi,v.unescape=Fi,v.uniqueId=Ri,v.all=ze,v.any=Je,v.detect=Fe,v.findWhere=Fe,v.foldl=Ve,v.foldr=Ke,v.include=Oe,v.inject=Ve,Jn(v,function(t,e){v.prototype[e]||(v.prototype[e]=function(){var e=[this.__wrapped__];return mn.apply(e,arguments),t.apply(v,e)})}),v.first=si,v.last=li,v.take=si,v.head=si,Jn(v,function(t,e){v.prototype[e]||(v.prototype[e]=function(e,i){var n=t(this.__wrapped__,e,i);return null==e||i&&"function"!=typeof e?n:new y(n)})}),v.VERSION="1.3.1",v.prototype.toString=qi,v.prototype.value=Bi,v.prototype.valueOf=Bi,Bn(["join","pop","shift"],function(t){var e=nn[t];v.prototype[t]=function(){return e.apply(this.__wrapped__,arguments)}}),Bn(["push","reverse","sort","unshift"],function(t){var e=nn[t];v.prototype[t]=function(){return e.apply(this.__wrapped__,arguments),this}}),Bn(["concat","slice","splice"],function(t){var e=nn[t];v.prototype[t]=function(){return new y(e.apply(this.__wrapped__,arguments))}}),On.spliceObjects||Bn(["pop","shift","splice"],function(t){var e=nn[t],i="splice"==t;v.prototype[t]=function(){var t=this.__wrapped__,n=e.apply(t,arguments);return 0===t.length&&delete t[0],i?new y(n):n}}),v._basicEach=Bn,v._iteratorTemplate=Wn,v._shimKeys=Ln,v}var m,v=[],y=[],b=0,_={},w={},x=+new Date+"",C=75,k=40,D="  \v\f \n\r\u2028\u2029 ᠎              ",T=/\b__p \+= '';/g,S=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,I=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,M=/\w*$/,E=/<%=([\s\S]+?)%>/g,N=RegExp("^["+D+"]*0+(?=.$)"),A=/($^)/,H=(H=/\bthis\b/)&&H.test(g)&&H,j=/['\n\r\t\u2028\u2029\\]/g,O=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setImmediate","setTimeout"],W=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],z=0,$="[object Arguments]",F="[object Array]",R="[object Boolean]",L="[object Date]",q="[object Error]",B="[object Function]",Y="[object Number]",U="[object Object]",V="[object RegExp]",K="[object String]",Q={};Q[B]=!1,Q[$]=Q[F]=Q[R]=Q[L]=Q[Y]=Q[U]=Q[V]=Q[K]=!0;var X={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},G={"\\":"\\","'":"'","\n":"n","\r":"r","   ":"t","\u2028":"u2028","\u2029":"u2029"},J=X[typeof exports]&&exports,Z=X[typeof module]&&module&&module.exports==J&&module,te=X[typeof global]&&global;!te||te.global!==te&&te.window!==te||(t=te);var ee=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(t._=ee,define(function(){return ee})):J&&!J.nodeType?Z?(Z.exports=ee)._=ee:J._=ee:t._=ee}(this),!function(t){"use strict";t(function(){t.support.transition=function(){var t=function(){var t,e=document.createElement("bootstrap"),i={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(t in i)if(void 0!==e.style[t])return i[t]}();return t&&{end:t}}()})}(window.jQuery),!function(t){"use strict";var e='[data-dismiss="alert"]',i=function(i){t(i).on("click",e,this.close)};i.prototype.close=function(e){function i(){n.trigger("closed").remove()}var n,s=t(this),o=s.attr("data-target");o||(o=s.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),n=t(o),e&&e.preventDefault(),n.length||(n=s.hasClass("alert")?s:s.parent()),n.trigger(e=t.Event("close")),e.isDefaultPrevented()||(n.removeClass("in"),t.support.transition&&n.hasClass("fade")?n.on(t.support.transition.end,i):i())};var n=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var n=t(this),s=n.data("alert");s||n.data("alert",s=new i(this)),"string"==typeof e&&s[e].call(n)})},t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.alert.data-api",e,i.prototype.close)}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.button.defaults,i)};e.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.data(),s=i.is("input")?"val":"html";t+="Text",n.resetText||i.data("resetText",i[s]()),i[s](n[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},e.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons-radio"]');t&&t.find(".active").removeClass("active"),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=function(i){return this.each(function(){var n=t(this),s=n.data("button"),o="object"==typeof i&&i;s||n.data("button",s=new e(this,o)),"toggle"==i?s.toggle():i&&s.setState(i)})},t.fn.button.defaults={loadingText:"loading..."},t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.button.data-api","[data-toggle^=button]",function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),i.button("toggle")})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.prototype={cycle:function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(e){var i=this.getActiveIndex(),n=this;if(!(e>this.$items.length-1||0>e))return this.sliding?this.$element.one("slid",function(){n.to(e)}):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(e,i){var n,s=this.$element.find(".item.active"),o=i||s[e](),r=this.interval,a="next"==e?"left":"right",l="next"==e?"first":"last",h=this;if(this.sliding=!0,r&&this.pause(),o=o.length?o:this.$element.find(".item")[l](),n=t.Event("slide",{relatedTarget:o[0],direction:a}),!o.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(h.$indicators.children()[h.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(n),n.isDefaultPrevented())return;o.addClass(e),o[0].offsetWidth,s.addClass(a),o.addClass(a),this.$element.one(t.support.transition.end,function(){o.removeClass([e,a].join(" ")).addClass("active"),s.removeClass(["active",a].join(" ")),h.sliding=!1,setTimeout(function(){h.$element.trigger("slid")},0)})}else{if(this.$element.trigger(n),n.isDefaultPrevented())return;s.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return r&&this.cycle(),this}}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var n=t(this),s=n.data("carousel"),o=t.extend({},t.fn.carousel.defaults,"object"==typeof i&&i),r="string"==typeof i?i:o.slide;s||n.data("carousel",s=new e(this,o)),"number"==typeof i?s.to(i):r?s[r]():o.interval&&s.pause().cycle()})},t.fn.carousel.defaults={interval:5e3,pause:"hover"},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,n,s=t(this),o=t(s.attr("data-target")||(i=s.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),r=t.extend({},o.data(),s.data());o.carousel(r),(n=s.attr("data-slide-to"))&&o.data("carousel").pause().to(n).cycle(),e.preventDefault()})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.collapse.defaults,i),this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.prototype={constructor:e,dimension:function(){var t=this.$element.hasClass("width");return t?"width":"height"},show:function(){var e,i,n,s;if(!this.transitioning&&!this.$element.hasClass("in")){if(e=this.dimension(),i=t.camelCase(["scroll",e].join("-")),n=this.$parent&&this.$parent.find("> .accordion-group > .in"),n&&n.length){if(s=n.data("collapse"),s&&s.transitioning)return;n.collapse("hide"),s||n.data("collapse",null)}this.$element[e](0),this.transition("addClass",t.Event("show"),"shown"),t.support.transition&&this.$element[e](this.$element[0][i])}},hide:function(){var e;!this.transitioning&&this.$element.hasClass("in")&&(e=this.dimension(),this.reset(this.$element[e]()),this.transition("removeClass",t.Event("hide"),"hidden"),this.$element[e](0))},reset:function(t){var e=this.dimension();return this.$element.removeClass("collapse")[e](t||"auto")[0].offsetWidth,this.$element[null!==t?"addClass":"removeClass"]("collapse"),this},transition:function(e,i,n){var s=this,o=function(){"show"==i.type&&s.reset(),s.transitioning=0,s.$element.trigger(n)};this.$element.trigger(i),i.isDefaultPrevented()||(this.transitioning=1,this.$element[e]("in"),t.support.transition&&this.$element.hasClass("collapse")?this.$element.one(t.support.transition.end,o):o())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var n=t(this),s=n.data("collapse"),o=t.extend({},t.fn.collapse.defaults,n.data(),"object"==typeof i&&i);s||n.data("collapse",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.collapse.defaults={toggle:!0},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var i,n=t(this),s=n.attr("data-target")||e.preventDefault()||(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),o=t(s).data("collapse")?"toggle":n.data();n[t(s).hasClass("in")?"addClass":"removeClass"]("collapsed"),t(s).collapse(o)})}(window.jQuery),!function(t){"use strict";function e(){t(".dropdown-backdrop").remove(),t(n).each(function(){i(t(this)).removeClass("open")})}function i(e){var i,n=e.attr("data-target");return n||(n=e.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),i=n&&t(n),i&&i.length||(i=e.parent()),i}var n="[data-toggle=dropdown]",s=function(e){var i=t(e).on("click.dropdown.data-api",this.toggle);t("html").on("click.dropdown.data-api",function(){i.parent().removeClass("open")})};s.prototype={constructor:s,toggle:function(){var n,s,o=t(this);if(!o.is(".disabled, :disabled"))return n=i(o),s=n.hasClass("open"),e(),s||("ontouchstart"in document.documentElement&&t('<div class="dropdown-backdrop"/>').insertBefore(t(this)).on("click",e),n.toggleClass("open")),o.focus(),!1},keydown:function(e){var s,o,r,a,l;if(/(38|40|27)/.test(e.keyCode)&&(s=t(this),e.preventDefault(),e.stopPropagation(),!s.is(".disabled, :disabled"))){if(r=i(s),a=r.hasClass("open"),!a||a&&27==e.keyCode)return 27==e.which&&r.find(n).focus(),s.click();o=t("[role=menu] li:not(.divider):visible a",r),o.length&&(l=o.index(o.filter(":focus")),38==e.keyCode&&l>0&&l--,40==e.keyCode&&o.length-1>l&&l++,~l||(l=0),o.eq(l).focus())}}};var o=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var i=t(this),n=i.data("dropdown");n||i.data("dropdown",n=new s(this)),"string"==typeof e&&n[e].call(i)})},t.fn.dropdown.Constructor=s,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=o,this},t(document).on("click.dropdown.data-api",e).on("click.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.dropdown.data-api",n,s.prototype.toggle).on("keydown.dropdown.data-api",n+", [role=menu]",s.prototype.keydown)}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=i,this.$element=t(e).delegate('[data-dismiss="modal"]',"click.dismiss.modal",t.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};e.prototype={constructor:e,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var e=this,i=t.Event("show");this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var i=t.support.transition&&e.$element.hasClass("fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show(),i&&e.$element[0].offsetWidth,e.$element.addClass("in").attr("aria-hidden",!1),e.enforceFocus(),i?e.$element.one(t.support.transition.end,function(){e.$element.focus().trigger("shown")}):e.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=t.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),t(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),t.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var e=this;t(document).on("focusin.modal",function(t){e.$element[0]===t.target||e.$element.has(t.target).length||e.$element.focus()})},escape:function(){var t=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&t.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var e=this,i=setTimeout(function(){e.$element.off(t.support.transition.end),e.hideModal()},500);this.$element.one(t.support.transition.end,function(){clearTimeout(i),e.hideModal()})},hideModal:function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(e){var i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var n=t.support.transition&&i;if(this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?t.proxy(this.$element[0].focus,this.$element[0]):t.proxy(this.hide,this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;n?this.$backdrop.one(t.support.transition.end,e):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,e):e()):e&&e()}};var i=t.fn.modal;t.fn.modal=function(i){return this.each(function(){var n=t(this),s=n.data("modal"),o=t.extend({},t.fn.modal.defaults,n.data(),"object"==typeof i&&i);s||n.data("modal",s=new e(this,o)),"string"==typeof i?s[i]():o.show&&s.show()})},t.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.modal.data-api",'[data-toggle="modal"]',function(e){var i=t(this),n=i.attr("href"),s=t(i.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),o=s.data("modal")?"toggle":t.extend({remote:!/#/.test(n)&&n},s.data(),i.data());e.preventDefault(),s.modal(o).one("hide",function(){i.focus()})})}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("tooltip",t,e)};e.prototype={constructor:e,init:function(e,i,n){var s,o,r,a,l;for(this.type=e,this.$element=t(i),this.options=this.getOptions(n),this.enabled=!0,r=this.options.trigger.split(" "),l=r.length;l--;)a=r[l],"click"==a?this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this)):"manual"!=a&&(s="hover"==a?"mouseenter":"focus",o="hover"==a?"mouseleave":"blur",this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(o+"."+this.type,this.options.selector,t.proxy(this.leave,this)));this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(e){return e=t.extend({},t.fn[this.type].defaults,this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},enter:function(e){var i,n=t.fn[this.type].defaults,s={};return this._options&&t.each(this._options,function(t,e){n[t]!=e&&(s[t]=e)},this),i=t(e.currentTarget)[this.type](s).data(this.type),i.options.delay&&i.options.delay.show?(clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show),void 0):i.show()},leave:function(e){var i=t(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),i.options.delay&&i.options.delay.hide?(i.hoverState="out",this.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide),void 0):i.hide()},show:function(){var e,i,n,s,o,r,a=t.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(a),a.isDefaultPrevented())return;switch(e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),o="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,e.detach().css({top:0,left:0,display:"block"}),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element),i=this.getPosition(),n=e[0].offsetWidth,s=e[0].offsetHeight,o){case"bottom":r={top:i.top+i.height,left:i.left+i.width/2-n/2};break;case"top":r={top:i.top-s,left:i.left+i.width/2-n/2};break;case"left":r={top:i.top+i.height/2-s/2,left:i.left-n};break;case"right":r={top:i.top+i.height/2-s/2,left:i.left+i.width}}this.applyPlacement(r,o),this.$element.trigger("shown")}},applyPlacement:function(t,e){var i,n,s,o,r=this.tip(),a=r[0].offsetWidth,l=r[0].offsetHeight;r.offset(t).addClass(e).addClass("in"),i=r[0].offsetWidth,n=r[0].offsetHeight,"top"==e&&n!=l&&(t.top=t.top+l-n,o=!0),"bottom"==e||"top"==e?(s=0,0>t.left&&(s=-2*t.left,t.left=0,r.offset(t),i=r[0].offsetWidth,n=r[0].offsetHeight),this.replaceArrow(s-a+i,i,"left")):this.replaceArrow(n-l,n,"top"),o&&r.offset(t)},replaceArrow:function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},setContent:function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},hide:function(){function e(){var e=setTimeout(function(){i.off(t.support.transition.end).detach()},500);i.one(t.support.transition.end,function(){clearTimeout(e),i.detach()})}var i=this.tip(),n=t.Event("hide");return this.$element.trigger(n),n.isDefaultPrevented()?void 0:(i.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?e():i.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()
-},getPosition:function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},getTitle:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var i=e?t(e.currentTarget)[this.type](this._options).data(this.type):this;i.tip().hasClass("in")?i.hide():i.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each(function(){var n=t(this),s=n.data("tooltip"),o="object"==typeof i&&i;s||n.data("tooltip",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,i=this.options;return t=("function"==typeof i.content?i.content.call(e[0]):i.content)||e.attr("data-content")},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),s=n.data("popover"),o="object"==typeof i&&i;s||n.data("popover",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),!function(t){"use strict";function e(e,i){var n,s=t.proxy(this.process,this),o=t(e).is("body")?t(window):t(e);this.options=t.extend({},t.fn.scrollspy.defaults,i),this.$scrollElement=o.on("scroll.scroll-spy.data-api",s),this.selector=(this.options.target||(n=t(e).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,i=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#\w/.test(n)&&t(n);return s&&s.length&&[[s.position().top+(!t.isWindow(i.$scrollElement.get(0))&&i.$scrollElement.scrollTop()),n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=i-this.$scrollElement.height(),s=this.offsets,o=this.targets,r=this.activeTarget;if(e>=n)return r!=(t=o.last()[0])&&this.activate(t);for(t=s.length;t--;)r!=o[t]&&e>=s[t]&&(!s[t+1]||s[t+1]>=e)&&this.activate(o[t])},activate:function(e){var i,n;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parent("li").addClass("active"),i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")}};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var n=t(this),s=n.data("scrollspy"),o="object"==typeof i&&i;s||n.data("scrollspy",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,i,n,s=this.element,o=s.closest("ul:not(.dropdown-menu)"),r=s.attr("data-target");r||(r=s.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),s.parent("li").hasClass("active")||(e=o.find(".active:last a")[0],n=t.Event("show",{relatedTarget:e}),s.trigger(n),n.isDefaultPrevented()||(i=t(r),this.activate(s.parent("li"),o),this.activate(i,i.parent(),function(){s.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,i,n){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var o=i.find("> .active"),r=n&&t.support.transition&&o.hasClass("fade");r?o.one(t.support.transition.end,s):s(),o.removeClass("in")}};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var n=t(this),s=n.data("tab");s||n.data("tab",s=new e(this)),"string"==typeof i&&s[i]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,i),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var i=this;return e=t.grep(e,function(t){return i.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,i=[],n=[],s=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?n.push(e):s.push(e):i.push(e);return i.concat(n,s)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var i=this;return e=t(e).map(function(e,n){return e=t(i.options.item).attr("data-value",n),e.find("a").html(i.highlighter(n)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),i=e.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var i=t.fn.typeahead;t.fn.typeahead=function(i){return this.each(function(){var n=t(this),s=n.data("typeahead"),o="object"==typeof i&&i;s||n.data("typeahead",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=i,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=t.extend({},t.fn.affix.defaults,i),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,i=t(document).height(),n=this.$window.scrollTop(),s=this.$element.offset(),o=this.options.offset,r=o.bottom,a=o.top,l="affix affix-top affix-bottom";"object"!=typeof o&&(r=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof r&&(r=o.bottom()),e=null!=this.unpin&&n+this.unpin<=s.top?!1:null!=r&&s.top+this.$element.height()>=i-r?"bottom":null!=a&&a>=n?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?s.top-n:null,this.$element.removeClass(l).addClass("affix"+(e?"-"+e:"")))}};var i=t.fn.affix;t.fn.affix=function(i){return this.each(function(){var n=t(this),s=n.data("affix"),o="object"==typeof i&&i;s||n.data("affix",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),e.affix(i)})})}(window.jQuery),function(t){function e(e,i,n,s){function o(){"WebSocket"in t?(r.socket=r.socketProtocol.length>0?new WebSocket(r.socketUrl,r.socketProtocol):new WebSocket(r.socketUrl),r.socket.onopen=function(){r.connected=!0,r.iSuccessCB(5>r.retries?"(RECONNECTED)":""),r.retries=5},r.socket.onclose=function(){r.connected=!1,r.iErrorCB("socket closed "+(r.retries>0?"retrying in 5 seconds ...":"")),r.retries>0&&setTimeout(function(){r.retries--,o()},5e3)},r.socket.onerror=function(t){r.iErrorCB(t.data)},r.socket.onmessage=function(t){r.receive(t.data)}):console.log("This browser doesn't appear to support websockets!")}var r=this;this.iSuccessCB=e,this.iErrorCB=i,this.methodIdx=0,this.methodCalls=[];for(var a=0;100>a;a++)this.methodCalls[a]=null;this.retries=5,this.connected=!1,this.timeouttime=5e3,this.socketUrl="ws://localhost:23000/vehicle",this.socketProtocol="http-only",void 0!==n&&(this.socketUrl=n),void 0!==s&&(this.socketProtocol=s),this.VehicleMethodCall=function(t,e,i,n){var s=this;this.successCB=i,this.errorCB=n,this.transactionid=t,this.name=e,this.done=!1,this.start=function(){s.timeout=setTimeout(function(){void 0!==s.errorCB&&s.errorCB('"'+s.name+'" method timed out after '+r.timeouttime+"ms"),s.finish()},r.timeouttime)},this.finish=function(){void 0!==s.timeout&&clearTimeout(s.timeout),s.done=!0}},o()}e.prototype.generateTransactionId=function(){var t,e=[];for(t=0;8>t;t++){var i=Math.floor(65536*(Math.random()+1));e[t]=i.toString(16).substring(1)}var n=e[0]+e[1]+"-"+e[2]+"-"+e[3]+"-"+e[4]+"-"+e[5]+e[6]+e[7];return n},e.prototype.send=function(t,e,i){if(!this.connected)return void 0!==i&&i('"'+t.name+'" method failed because socket is closed'),void 0;var n=this.methodIdx;this.methodIdx=(this.methodIdx+1)%100,this.methodCalls[n]=new this.VehicleMethodCall(t.transactionid,t.name,e,i),this.socket.send(JSON.stringify(t)),this.methodCalls[n].start()},e.prototype.getSupportedEventTypes=function(t,e,i,n){var s={type:"method",name:"getSupportedEventTypes",writeable:e,transactionid:this.generateTransactionId(),data:t};this.send(s,i,n)},e.prototype.get=function(t,e,i){if(!(0>=t.length)){var n={type:"method",name:"get",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)}},e.prototype.getHistory=function(t,e,i,n,s){if(!(0>=t.length)){var o={property:t,timeBegin:""+e.getTime()/1e3,timeEnd:""+i.getTime()/1e3,sequenceBegin:"-1",sequenceEnd:"-1"},r={type:"method",name:"getRanged",transactionid:this.generateTransactionId(),data:o};this.send(r,n,s)}},e.prototype.set=function(t,e,i,n){if(!(t.length!=e.length||0>=t.length)){for(var s={type:"method",name:"set",transactionid:this.generateTransactionId(),data:[]},o=[],r=0;t.length>r;r++){var a={property:t[r],value:e[r]};o[o.length]=a}s.data=o,this.send(s,i,n)}},e.prototype.subscribe=function(t,e,i){var n={type:"method",name:"subscribe",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)},e.prototype.unsubscribe=function(t,e,i){var n={type:"method",name:"unsubscribe",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)},e.prototype.sendEvent=function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.name=t,i.value=e,document.dispatchEvent(i),console.log(i)},e.prototype.receive=function(t){var e,i=this;try{e=JSON.parse(t)}catch(n){return i.iErrorCB("GARBAGE MESSAGE: "+t),void 0}if(void 0===e||void 0===e.type||void 0===e.name)return i.iErrorCB("BADLY FORMED MESSAGE: "+t),void 0;if("methodReply"===e.type)for(var s=this.methodCalls,o=0;s.length>o;o++){var r=s[o];if(r&&!r.done&&r.transactionid===e.transactionid)return r.finish(),void 0!==e.error&&r.errorCB(e.error),void 0!==e.data&&void 0!==r.successCB&&r.successCB(e.data),void 0}else"valuechanged"===e.type&&i.sendEvent(e.name,e.data)},t.Vehicle=e}(window),function(t,e,i){"use strict";t.cowhide=t.cowhide||{},t.extend(t.cowhide,{version:"0.0.1",options:{monitorFrameworkRestrictions:!1,connectToAMB:!1},themeEngineOptions:{path:"css",initial:"default",minified:!1},registeredWidgets:[],drivingMode:!1,nightMode:!1,currentTheme:"default",vehicle:null,GUID:function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},register:function(t){var i=this,n=e.map(i.registeredWidgets,function(t){return t.guid});-1==e.indexOf(n,t.guid)&&i.registeredWidgets.push(t)},backdrop:function(){var e=t('<div class="modal-backdrop theme-change-backdrop fade" />');return e.appendTo(document.body),e[0].offsetWidth,e.addClass("in"),e},initThemeEngine:function(e){t.extend(this.themeEngineOptions,e),this.currentTheme=this.themeEngineOptions.initial;var i=t("link#cowhide-theme");0===i.length&&this.fatal("#40: could not find <link> with id 'cowhide-theme'.")},setTheme:function(e,n){if(e!==this.currentTheme||n!=this.nightMode){var s=t("link#cowhide-theme"),o=this.themeEngineOptions.path+"/cowhide-"+e||"default";(n===!0||n===i&&this.nightMode===!0)&&(o+="-night"),this.themeEngineOptions.minified&&(o+=".min"),o+=".css";var r=this.backdrop();setTimeout(function(){s.attr("href",o),r.remove()},200),this.currentTheme=e,n!==i&&(this.nightMode=n)}},setNightMode:function(t){this.nightMode!=t&&this.setTheme(this.currentTheme,!this.nightMode)},toggleNightMode:function(){this.setNightMode(!this.nightMode)},toggleDrivingMode:function(){this.setDrivingMode(!this.drivingMode)},setDrivingMode:function(t){var i=this;i.drivingMode!=t&&(i.drivingMode=t,e.each(this.registeredWidgets,function(t){t.setDrivingMode&&t.setDrivingMode(i.drivingMode)}))},listenToVehicle:function(){var e=this;e.vehicle=new window.Vehicle(function(){t(document).on("VehicleSpeed",function(t){e.setDrivingMode(t.originalEvent.value>0)})},function(){e.fatal("There was a problem connecting to AMB's web socket.")})},verifyFrameworkRestrictions:function(){e.each(this.registeredWidgets,function(t){t.verifyMinFontSize(),t.verifyMaxFontSize(),t.verifyMinWidth()})},fatal:function(t,e){var n="";if(n+="[Cowhide] Fatal error",e!==i){n+=" (offending widget: ";var s=e.attr("id"),o=e.attr("class");s&&(n+="#("+s+")"),o&&(n+=".("+o+")"),n+=")"}throw n+=": "+t,Error(n)}}),t(function(){t.cowhide.options.connectToAMB&&t.cowhide.listenToVehicle(),t.cowhide.options.monitorFrameworkRestrictions&&setInterval(function(){t.cowhide.verifyFrameworkRestrictions()},1e3)})}(window.jQuery,window._),function(t,e){"use strict";var i=function(e){if(this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults),this.drivingMode=!1,"DIV"!=this.$element[0].tagName||!this.$element.hasClass("page")){var i=this.$element.parent().closest("div.page");0===i.length?t.cowhide.fatal("#30: every widget must be within a div with class='page'.",this.$element):i.ch_page("register",this)}};i.prototype=t.extend({},{register:function(){this.guid=t.cowhide.GUID(),t.cowhide.register(this)},verifyMinWidth:function(){this.$element.width()<this.options.minWidth&&this.options.minWidth>0&&t.cowhide.fatal("#10: this widget has a minimum allowed width of "+this.options.minWidth+"px",this.$element)},verifyMinFontSize:function(){if(this.options.minFontSize>0){var e=this.$element.css("font-size");parseFloat(e)<this.options.minFontSize&&t.cowhide.fatal("#20: this widget has a minimum allowed font-size of "+this.options.minFontSize+"px",this.$element)}},verifyMaxFontSize:function(){if(this.options.maxFontSize>0){var e=this.$element.css("font-size");parseFloat(e)>this.options.maxFontSize&&t.cowhide.fatal("#21: this widget has a maximum allowed font-size of "+this.options.maxFontSize+"px",this.$element)}},setDrivingMode:function(t){if(this.$element.data("ignore-driving-mode")===e&&this.options.disableWhenDriving){var i="disabled"==this.$element.attr("disabled"),n="disabled";if(!t&&!this.drivingMode&&i)return;t?(this.$element.attr(n,n),this.$element.disabled=!0,this.$element.addClass(n),this.onDrivingModeEnter&&this.onDrivingModeEnter(),this.drivingMode=!0):this.drivingMode&&(this.$element.removeAttr(n),this.$element.disabled=!1,this.$element.removeClass(n),this.onDrivingModeExit&&this.onDrivingModeExit(),this.drivingMode=!1)}},onDrivingModeEnter:e,onDrivingModeExit:e}),t.fn.ch_widget=function(){},t.fn.ch_widget.defaults={minWidth:0,minFontSize:0,maxFontSize:0,disableWhenDriving:!1},t.fn.ch_widget.Constructor=i}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{minFontSize:12,maxFontSize:24,disableWhenDriving:!0}),this.options.fixedWidth&&this.$element.css({width:this.options.fixedWidth}),this.options.marquee&&this.enableMarquee()};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,disableMarquee:function(){var t=this.$element.find("marquee");if(t.length>0){var e=t.text();t.remove(),this.$element.text(e)}},enableMarquee:function(){if(this.options.marquee&&("A"==this.$element[0].tagName||"BUTTON"==this.$element[0].tagName)){var e=this.$element.text(),i=t("<marquee/>");i.attr("behavior","alternate"),i.attr("scrollamount",1),i.attr("width",this.$element.width()),i.text(e),this.$element.html(i)}},onDrivingModeEnter:function(){this.disableMarquee()},onDrivingModeExit:function(){this.enableMarquee()}}),t.fn.ch_button=function(i){return this.each(function(){var n=t(this),s=n.data("ch_button"),o="object"==typeof i&&i;n.data("marquee")&&(o=t.extend(o,{marquee:!0})),n.data("fixed-width")&&(o=t.extend(o,{fixedWidth:n.data("fixed-width")})),s||(n.data("ch_button",s=new e(this,o)),s.register()),n.button(i)})},t.fn.ch_button.Constructor=e,t(function(){t(".btn, button, input[type=button]").ch_button()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,removeSelection:function(){var t=this.$element.find("table");t.removeClass("front-left"),t.removeClass("front-right"),t.removeClass("rear-left"),t.removeClass("rear-right")},frontLeft:function(){this.removeSelection(),this.$element.find("table").addClass("front-left")},frontRight:function(){this.removeSelection(),this.$element.find("table").addClass("front-right")},rearLeft:function(){this.removeSelection(),this.$element.find("table").addClass("rear-left")},rearRight:function(){this.removeSelection(),this.$element.find("table").addClass("rear-right")}}),t.fn.ch_seat_selector=function(i){return this.each(function(){var n=t(this),s=n.data("ch_seat_selector"),o="object"==typeof i&&i;if(s)"frontLeft"==i?s.frontLeft():"frontRight"==i?s.frontRight():"rearLeft"==i?s.rearLeft():"rearRight"==i?s.rearRight():"removeSelection"==i&&s.removeSelection();else{n.data("ch_seat_selector",s=new e(this,o)),s.register();var r=["<table>","    <tr>",'        <td class="front-left"></td>','        <td class="front-right"></td>',"    </tr>","    <tr>",'        <td class="rear-left"></td>','        <td class="rear-right"></td>',"    </tr>","</table>"].join("\n");n.html(r)}})},t.fn.ch_seat_selector.Constructor=e,t(function(){t(".ch-seat-selector").ch_seat_selector()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_slider=function(i){return this.each(function(){var n=t(this),s=n.data("ch_slider"),o="object"==typeof i&&i;n.attr("data-height")&&(o=t.extend(o,{height:n.attr("data-height")})),s||(n.data("ch_slider",s=new e(this,o)),s.register()),n.slider(o)})},t.fn.ch_button.Constructor=e,t(function(){t(".ch-slider").ch_slider(),t(".ch-slider-vertical").ch_slider({orientation:"vertical"})})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_text_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_text_input"),o="object"==typeof i&&i;s||(n.data("ch_text_input",s=new e(this,o)),s.register())})},t.fn.ch_text_input.Constructor=e,t(function(){t("input[type=text]").ch_text_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_radio_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_radio_input"),o="object"==typeof i&&i;s||(n.data("ch_radio_input",s=new e(this,o)),s.register())})},t.fn.ch_radio_input.Constructor=e,t(function(){t("input[type=radio]").ch_radio_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_checkbox_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_checkbox_input"),o="object"==typeof i&&i;s||(n.data("ch_checkbox_input",s=new e(this,o)),s.register())})},t.fn.ch_checkbox_input.Constructor=e,t(function(){t("input[type=checkbox]").ch_checkbox_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_select=function(i){return this.each(function(){var n=t(this),s=n.data("ch_select"),o="object"==typeof i&&i;s||(n.data("ch_select",s=new e(this,o)),s.register())})},t.fn.ch_select.Constructor=e,t(function(){t("select").ch_select()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{maxWidgets:0});var n=this.$element.parent().closest("div.page");0!==n.length&&t.cowhide.fatal("#31: pages cannot be nested.")};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,registeredWidgets:0,registerWidget:function(){this.registeredWidgets++,this.options.maxWidgets>0&&this.registeredWidgets>this.options.maxWidgets&&t.cowhide.fatal("#32: a page cannot have more than "+this.options.maxWidgets+" widgets.")},setMaxWidgets:function(t){this.options.maxWidgets=t}}),t.fn.ch_page=function(i,n){return this.each(function(){var s=t(this),o=s.data("ch_page"),r="object"==typeof i&&i;o||(s.data("ch_page",o=new e(this,r)),o.register()),"register"==i&&o.registerWidget(n),"setMaxWidgets"==i&&o.setMaxWidgets(n)})},t.fn.ch_page.Constructor=e,t(function(){t("div.page").ch_page()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},i)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,show:function(){var e=this.$element,i=t("<h1/>").text(this.$element.text());if(e.html(i),this.options.show_back_button){var n=t("<button/>").addClass("btn"),s=t("<i/>").addClass("icon-backward");n.html(s),e.append(n),n.click(function(i){i.preventDefault(),e.trigger(t.Event("back"))})}}}),t.fn.ch_header=function(i){return this.each(function(){var n=t(this),s=n.data("ch_header"),o="object"==typeof i&&i;n.data("show-back-button")&&(o=t.extend(o,{show_back_button:!0})),s||(n.data("ch_header",s=new e(this,o)),s.register()),"string"==typeof i&&s[i]()})},t.fn.ch_button.Constructor=e,t(function(){t(".ch-header").ch_header("show")})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,enable:function(){var e,i=this,n=i.$element,s=t("<div/>").addClass("ch-simple-scrollable-up"),o=t("<div/>").addClass("ch-simple-scrollable-dn"),r=n.find("ul, ol, div, p");r.addClass("ch-simple-scrollable-content"),r.height(r.parent().height()-160),e=r.height()-40,s.css({top:r.offset().top}),s.html('<a href="#"><i class="icon-chevron-up"></i></a>'),o.html('<a href="#"><i class="icon-chevron-down"></i></a>'),o.click(function(){r.animate({scrollTop:r.scrollTop()+e},200)}),s.click(function(){r.animate({scrollTop:r.scrollTop()-e},200)}),s.insertBefore(r),o.insertAfter(r)}}),t.fn.ch_simple_scrollable=function(i){return this.each(function(){var n=t(this),s=n.data("ch_simple_scrollable"),o="object"==typeof i&&i;s||(n.data("ch_simple_scrollable",s=new e(this,o)),s.register()),"string"==typeof i&&s[i]()})},t.fn.ch_simple_scrollable.Constructor=e,t(function(){t("div.ch-simple-scrollable").ch_simple_scrollable("enable")})}(window.jQuery);
\ No newline at end of file
+},getPosition:function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},getTitle:function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},tip:function(){return this.$tip=this.$tip||t(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var i=e?t(e.currentTarget)[this.type](this._options).data(this.type):this;i.tip().hasClass("in")?i.hide():i.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var i=t.fn.tooltip;t.fn.tooltip=function(i){return this.each(function(){var n=t(this),s=n.data("tooltip"),o="object"==typeof i&&i;s||n.data("tooltip",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.tooltip.Constructor=e,t.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(window.jQuery),!function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype,{constructor:e,setContent:function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var t,e=this.$element,i=this.options;return t=("function"==typeof i.content?i.content.call(e[0]):i.content)||e.attr("data-content")},tip:function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var n=t(this),s=n.data("popover"),o="object"==typeof i&&i;s||n.data("popover",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.popover.Constructor=e,t.fn.popover.defaults=t.extend({},t.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),!function(t){"use strict";function e(e,i){var n,s=t.proxy(this.process,this),o=t(e).is("body")?t(window):t(e);this.options=t.extend({},t.fn.scrollspy.defaults,i),this.$scrollElement=o.on("scroll.scroll-spy.data-api",s),this.selector=(this.options.target||(n=t(e).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=t("body"),this.refresh(),this.process()}e.prototype={constructor:e,refresh:function(){var e,i=this;this.offsets=t([]),this.targets=t([]),e=this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#\w/.test(n)&&t(n);return s&&s.length&&[[s.position().top+(!t.isWindow(i.$scrollElement.get(0))&&i.$scrollElement.scrollTop()),n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},process:function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=i-this.$scrollElement.height(),s=this.offsets,o=this.targets,r=this.activeTarget;if(e>=n)return r!=(t=o.last()[0])&&this.activate(t);for(t=s.length;t--;)r!=o[t]&&e>=s[t]&&(!s[t+1]||s[t+1]>=e)&&this.activate(o[t])},activate:function(e){var i,n;this.activeTarget=e,t(this.selector).parent(".active").removeClass("active"),n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parent("li").addClass("active"),i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate")}};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var n=t(this),s=n.data("scrollspy"),o="object"==typeof i&&i;s||n.data("scrollspy",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.defaults={offset:10},t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),!function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype={constructor:e,show:function(){var e,i,n,s=this.element,o=s.closest("ul:not(.dropdown-menu)"),r=s.attr("data-target");r||(r=s.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),s.parent("li").hasClass("active")||(e=o.find(".active:last a")[0],n=t.Event("show",{relatedTarget:e}),s.trigger(n),n.isDefaultPrevented()||(i=t(r),this.activate(s.parent("li"),o),this.activate(i,i.parent(),function(){s.trigger({type:"shown",relatedTarget:e})})))},activate:function(e,i,n){function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),n&&n()}var o=i.find("> .active"),r=n&&t.support.transition&&o.hasClass("fade");r?o.one(t.support.transition.end,s):s(),o.removeClass("in")}};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var n=t(this),s=n.data("tab");s||n.data("tab",s=new e(this)),"string"==typeof i&&s[i]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,i),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var i=this;return e=t.grep(e,function(t){return i.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,i=[],n=[],s=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?n.push(e):s.push(e):i.push(e);return i.concat(n,s)},highlighter:function(t){var e=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return t.replace(RegExp("("+e+")","ig"),function(t,e){return"<strong>"+e+"</strong>"})},render:function(e){var i=this;return e=t(e).map(function(e,n){return e=t(i.options.item).attr("data-value",n),e.find("a").html(i.highlighter(n)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),i=e.next();i.length||(i=t(this.$menu.find("li")[0])),i.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var i=t.fn.typeahead;t.fn.typeahead=function(i){return this.each(function(){var n=t(this),s=n.data("typeahead"),o="object"==typeof i&&i;s||n.data("typeahead",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=i,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery),!function(t){"use strict";var e=function(e,i){this.options=t.extend({},t.fn.affix.defaults,i),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,i=t(document).height(),n=this.$window.scrollTop(),s=this.$element.offset(),o=this.options.offset,r=o.bottom,a=o.top,l="affix affix-top affix-bottom";"object"!=typeof o&&(r=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof r&&(r=o.bottom()),e=null!=this.unpin&&n+this.unpin<=s.top?!1:null!=r&&s.top+this.$element.height()>=i-r?"bottom":null!=a&&a>=n?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?s.top-n:null,this.$element.removeClass(l).addClass("affix"+(e?"-"+e:"")))}};var i=t.fn.affix;t.fn.affix=function(i){return this.each(function(){var n=t(this),s=n.data("affix"),o="object"==typeof i&&i;s||n.data("affix",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),e.affix(i)})})}(window.jQuery),function(t){function e(e,i,n,s){function o(){"WebSocket"in t?(r.socket=r.socketProtocol.length>0?new WebSocket(r.socketUrl,r.socketProtocol):new WebSocket(r.socketUrl),r.socket.onopen=function(){r.connected=!0,r.iSuccessCB(5>r.retries?"(RECONNECTED)":""),r.retries=5},r.socket.onclose=function(){r.connected=!1,r.iErrorCB("socket closed "+(r.retries>0?"retrying in 5 seconds ...":"")),r.retries>0&&setTimeout(function(){r.retries--,o()},5e3)},r.socket.onerror=function(t){r.iErrorCB(t.data)},r.socket.onmessage=function(t){r.receive(t.data)}):console.log("This browser doesn't appear to support websockets!")}var r=this;this.iSuccessCB=e,this.iErrorCB=i,this.methodIdx=0,this.methodCalls=[];for(var a=0;100>a;a++)this.methodCalls[a]=null;this.retries=5,this.connected=!1,this.timeouttime=5e3,this.socketUrl="ws://localhost:23000/vehicle",this.socketProtocol="http-only",void 0!==n&&(this.socketUrl=n),void 0!==s&&(this.socketProtocol=s),this.VehicleMethodCall=function(t,e,i,n){var s=this;this.successCB=i,this.errorCB=n,this.transactionid=t,this.name=e,this.done=!1,this.start=function(){s.timeout=setTimeout(function(){void 0!==s.errorCB&&s.errorCB('"'+s.name+'" method timed out after '+r.timeouttime+"ms"),s.finish()},r.timeouttime)},this.finish=function(){void 0!==s.timeout&&clearTimeout(s.timeout),s.done=!0}},o()}e.prototype.generateTransactionId=function(){var t,e=[];for(t=0;8>t;t++){var i=Math.floor(65536*(Math.random()+1));e[t]=i.toString(16).substring(1)}var n=e[0]+e[1]+"-"+e[2]+"-"+e[3]+"-"+e[4]+"-"+e[5]+e[6]+e[7];return n},e.prototype.send=function(t,e,i){if(!this.connected)return void 0!==i&&i('"'+t.name+'" method failed because socket is closed'),void 0;var n=this.methodIdx;this.methodIdx=(this.methodIdx+1)%100,this.methodCalls[n]=new this.VehicleMethodCall(t.transactionid,t.name,e,i),this.socket.send(JSON.stringify(t)),this.methodCalls[n].start()},e.prototype.getSupportedEventTypes=function(t,e,i,n){var s={type:"method",name:"getSupportedEventTypes",writeable:e,transactionid:this.generateTransactionId(),data:t};this.send(s,i,n)},e.prototype.get=function(t,e,i){if(!(0>=t.length)){var n={type:"method",name:"get",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)}},e.prototype.getHistory=function(t,e,i,n,s){if(!(0>=t.length)){var o={property:t,timeBegin:""+e.getTime()/1e3,timeEnd:""+i.getTime()/1e3,sequenceBegin:"-1",sequenceEnd:"-1"},r={type:"method",name:"getRanged",transactionid:this.generateTransactionId(),data:o};this.send(r,n,s)}},e.prototype.set=function(t,e,i,n){if(!(t.length!=e.length||0>=t.length)){for(var s={type:"method",name:"set",transactionid:this.generateTransactionId(),data:[]},o=[],r=0;t.length>r;r++){var a={property:t[r],value:e[r]};o[o.length]=a}s.data=o,this.send(s,i,n)}},e.prototype.subscribe=function(t,e,i){var n={type:"method",name:"subscribe",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)},e.prototype.unsubscribe=function(t,e,i){var n={type:"method",name:"unsubscribe",transactionid:this.generateTransactionId(),data:t};this.send(n,e,i)},e.prototype.sendEvent=function(t,e){var i=document.createEvent("Event");i.initEvent(t,!0,!0),i.name=t,i.value=e,document.dispatchEvent(i),console.log(i)},e.prototype.receive=function(t){var e,i=this;try{e=JSON.parse(t)}catch(n){return i.iErrorCB("GARBAGE MESSAGE: "+t),void 0}if(void 0===e||void 0===e.type||void 0===e.name)return i.iErrorCB("BADLY FORMED MESSAGE: "+t),void 0;if("methodReply"===e.type)for(var s=this.methodCalls,o=0;s.length>o;o++){var r=s[o];if(r&&!r.done&&r.transactionid===e.transactionid)return r.finish(),void 0!==e.error&&r.errorCB(e.error),void 0!==e.data&&void 0!==r.successCB&&r.successCB(e.data),void 0}else"valuechanged"===e.type&&i.sendEvent(e.name,e.data)},t.Vehicle=e}(window),function(t,e,i){"use strict";t.cowhide=t.cowhide||{},t.extend(t.cowhide,{version:"0.0.1",options:{monitorFrameworkRestrictions:!1,connectToAMB:!1},themeEngineOptions:{path:"css",initial:"default",minified:!1},registeredWidgets:[],drivingMode:!1,nightMode:!1,currentTheme:"default",vehicle:null,GUID:function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},register:function(t){var i=this,n=e.map(i.registeredWidgets,function(t){return t.guid});-1==e.indexOf(n,t.guid)&&i.registeredWidgets.push(t)},backdrop:function(){var e=t('<div class="modal-backdrop theme-change-backdrop fade" />');return e.appendTo(document.body),e[0].offsetWidth,e.addClass("in"),e},initThemeEngine:function(e){t.extend(this.themeEngineOptions,e),this.currentTheme=this.themeEngineOptions.initial;var i=t("link#cowhide-theme");0===i.length&&this.fatal("#40: could not find <link> with id 'cowhide-theme'.")},setTheme:function(e,n){if(e!==this.currentTheme||n!=this.nightMode){var s=t("link#cowhide-theme"),o=this.themeEngineOptions.path+"/cowhide-"+e||"default";(n===!0||n===i&&this.nightMode===!0)&&(o+="-night"),this.themeEngineOptions.minified&&(o+=".min"),o+=".css";var r=this.backdrop();setTimeout(function(){s.attr("href",o),r.remove()},200),this.currentTheme=e,n!==i&&(this.nightMode=n)}},setNightMode:function(t){this.nightMode!=t&&this.setTheme(this.currentTheme,!this.nightMode)},toggleNightMode:function(){this.setNightMode(!this.nightMode)},toggleDrivingMode:function(){this.setDrivingMode(!this.drivingMode)},setDrivingMode:function(t){var i=this;i.drivingMode!=t&&(i.drivingMode=t,e.each(this.registeredWidgets,function(t){t.setDrivingMode&&t.setDrivingMode(i.drivingMode)}))},listenToVehicle:function(){var e=this;e.vehicle=new window.Vehicle(function(){t(document).on("VehicleSpeed",function(t){e.setDrivingMode(t.originalEvent.value>0)})},function(){e.fatal("There was a problem connecting to AMB's web socket.")})},verifyFrameworkRestrictions:function(){e.each(this.registeredWidgets,function(t){t.verifyMinFontSize(),t.verifyMaxFontSize(),t.verifyMinWidth()})},fatal:function(t,e){var n="";if(n+="[Cowhide] Fatal error",e!==i){n+=" (offending widget: ";var s=e.attr("id"),o=e.attr("class");s&&(n+="#("+s+")"),o&&(n+=".("+o+")"),n+=")"}throw n+=": "+t,Error(n)}}),t(function(){t.cowhide.options.connectToAMB&&t.cowhide.listenToVehicle(),t.cowhide.options.monitorFrameworkRestrictions&&setInterval(function(){t.cowhide.verifyFrameworkRestrictions()},1e3)})}(window.jQuery,window._),function(t,e){"use strict";var i=function(e){if(this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults),this.drivingMode=!1,"DIV"!=this.$element[0].tagName||!this.$element.hasClass("page")){var i=this.$element.parent().closest("div.page");0===i.length?t.cowhide.fatal("#30: every widget must be within a div with class='page'.",this.$element):i.ch_page("register",this)}};i.prototype=t.extend({},{register:function(){this.guid=t.cowhide.GUID(),t.cowhide.register(this)},verifyMinWidth:function(){this.$element.width()<this.options.minWidth&&this.options.minWidth>0&&t.cowhide.fatal("#10: this widget has a minimum allowed width of "+this.options.minWidth+"px",this.$element)},verifyMinFontSize:function(){if(this.options.minFontSize>0){var e=this.$element.css("font-size");parseFloat(e)<this.options.minFontSize&&t.cowhide.fatal("#20: this widget has a minimum allowed font-size of "+this.options.minFontSize+"px",this.$element)}},verifyMaxFontSize:function(){if(this.options.maxFontSize>0){var e=this.$element.css("font-size");parseFloat(e)>this.options.maxFontSize&&t.cowhide.fatal("#21: this widget has a maximum allowed font-size of "+this.options.maxFontSize+"px",this.$element)}},setDrivingMode:function(t){if(this.$element.data("ignore-driving-mode")===e&&this.options.disableWhenDriving){var i="disabled"==this.$element.attr("disabled"),n="disabled";if(!t&&!this.drivingMode&&i)return;t?(this.$element.attr(n,n),this.$element.disabled=!0,this.$element.addClass(n),this.onDrivingModeEnter&&this.onDrivingModeEnter(),this.drivingMode=!0):this.drivingMode&&(this.$element.removeAttr(n),this.$element.disabled=!1,this.$element.removeClass(n),this.onDrivingModeExit&&this.onDrivingModeExit(),this.drivingMode=!1)}},onDrivingModeEnter:e,onDrivingModeExit:e}),t.fn.ch_widget=function(){},t.fn.ch_widget.defaults={minWidth:0,minFontSize:0,maxFontSize:0,disableWhenDriving:!1},t.fn.ch_widget.Constructor=i}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{minFontSize:12,maxFontSize:24,disableWhenDriving:!0}),this.options.fixedWidth&&this.$element.css({width:this.options.fixedWidth}),this.options.marquee&&this.enableMarquee()};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,disableMarquee:function(){var t=this.$element.find("marquee");if(t.length>0){var e=t.text();t.remove(),this.$element.text(e)}},enableMarquee:function(){if(this.options.marquee&&("A"==this.$element[0].tagName||"BUTTON"==this.$element[0].tagName)){var e=this.$element.text(),i=t("<marquee/>");i.attr("behavior","alternate"),i.attr("scrollamount",1),i.attr("width",this.$element.width()),i.text(e),this.$element.html(i)}},onDrivingModeEnter:function(){this.disableMarquee()},onDrivingModeExit:function(){this.enableMarquee()}});var i=t.fn.ch_button;t.fn.ch_button=function(i){return this.each(function(){var n=t(this),s=n.data("ch_button"),o="object"==typeof i&&i;n.data("marquee")&&(o=t.extend(o,{marquee:!0})),n.data("fixed-width")&&(o=t.extend(o,{fixedWidth:n.data("fixed-width")})),s||(n.data("ch_button",s=new e(this,o)),s.register()),n.button(i)})},t.fn.ch_button.Constructor=e,t.fn.ch_button.noConflict=function(){return t.fn.ch_button=i,this},t(function(){t(".btn, button, input[type=button]").ch_button()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,removeSelection:function(){var t=this.$element.find("table");t.removeClass("front-left"),t.removeClass("front-right"),t.removeClass("rear-left"),t.removeClass("rear-right")},frontLeft:function(){this.removeSelection(),this.$element.find("table").addClass("front-left")},frontRight:function(){this.removeSelection(),this.$element.find("table").addClass("front-right")},rearLeft:function(){this.removeSelection(),this.$element.find("table").addClass("rear-left")},rearRight:function(){this.removeSelection(),this.$element.find("table").addClass("rear-right")}}),t.fn.ch_seat_selector=function(i){return this.each(function(){var n=t(this),s=n.data("ch_seat_selector"),o="object"==typeof i&&i;if(s)"frontLeft"==i?s.frontLeft():"frontRight"==i?s.frontRight():"rearLeft"==i?s.rearLeft():"rearRight"==i?s.rearRight():"removeSelection"==i&&s.removeSelection();else{n.data("ch_seat_selector",s=new e(this,o)),s.register();var r=["<table>","    <tr>",'        <td class="front-left"></td>','        <td class="front-right"></td>',"    </tr>","    <tr>",'        <td class="rear-left"></td>','        <td class="rear-right"></td>',"    </tr>","</table>"].join("\n");n.html(r)}})},t.fn.ch_seat_selector.Constructor=e,t(function(){t(".ch-seat-selector").ch_seat_selector()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_slider=function(i){return this.each(function(){var n=t(this),s=n.data("ch_slider"),o="object"==typeof i&&i;n.attr("data-height")&&(o=t.extend(o,{height:n.attr("data-height")})),s||(n.data("ch_slider",s=new e(this,o)),s.register()),n.slider(o)})},t.fn.ch_button.Constructor=e,t(function(){t(".ch-slider").ch_slider(),t(".ch-slider-vertical").ch_slider({orientation:"vertical"})})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e}),t.fn.ch_text_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_text_input"),o="object"==typeof i&&i;s||(n.data("ch_text_input",s=new e(this,o)),s.register())})},t.fn.ch_text_input.Constructor=e,t(function(){t("input[type=text]").ch_text_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e});var i=t.fn.ch_radio_input;t.fn.ch_radio_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_radio_input"),o="object"==typeof i&&i;s||(n.data("ch_radio_input",s=new e(this,o)),s.register())})},t.fn.ch_radio_input.Constructor=e,t.fn.ch_radio_input.noConflict=function(){return t.fn.ch_radio_input=i,this},t(function(){t("input[type=radio]").ch_radio_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e});var i=t.fn.ch_checkbox_input;t.fn.ch_checkbox_input=function(i){return this.each(function(){var n=t(this),s=n.data("ch_checkbox_input"),o="object"==typeof i&&i;s||(n.data("ch_checkbox_input",s=new e(this,o)),s.register())})},t.fn.ch_checkbox_input.Constructor=e,t.fn.ch_checkbox_input.noConflict=function(){return t.fn.ch_checkbox_input=i,this},t(function(){t("input[type=checkbox]").ch_checkbox_input()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},t.fn.ch_widget.defaults,{disableWhenDriving:!0})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e});var i=t.fn.ch_select;t.fn.ch_select=function(i){return this.each(function(){var n=t(this),s=n.data("ch_select"),o="object"==typeof i&&i;s||(n.data("ch_select",s=new e(this,o)),s.register())})},t.fn.ch_select.Constructor=e,t.fn.ch_select.noConflict=function(){return t.fn.ch_select=i,this},t(function(){t("select").ch_select()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{maxWidgets:0});var n=this.$element.parent().closest("div.page");0!==n.length&&t.cowhide.fatal("#31: pages cannot be nested.")};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,registeredWidgets:0,registerWidget:function(){this.registeredWidgets++,this.options.maxWidgets>0&&this.registeredWidgets>this.options.maxWidgets&&t.cowhide.fatal("#32: a page cannot have more than "+this.options.maxWidgets+" widgets.")},setMaxWidgets:function(t){this.options.maxWidgets=t}}),t.fn.ch_page=function(i,n){return this.each(function(){var s=t(this),o=s.data("ch_page"),r="object"==typeof i&&i;o||(s.data("ch_page",o=new e(this,r)),o.register()),"register"==i&&o.registerWidget(n),"setMaxWidgets"==i&&o.setMaxWidgets(n)})},t.fn.ch_page.Constructor=e,t(function(){t("div.page").ch_page()})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend({},i)};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,show:function(){var e=this.$element,i=t("<h1/>").text(this.$element.text());if(e.html(i),this.options.show_back_button){var n=t("<button/>").addClass("btn"),s=t("<i/>").addClass("icon-backward");n.html(s),e.append(n),n.click(function(i){i.preventDefault(),e.trigger(t.Event("back"))})}}});var i=t.fn.ch_header;t.fn.ch_header=function(i){return this.each(function(){var n=t(this),s=n.data("ch_header"),o="object"==typeof i&&i;n.data("show-back-button")&&(o=t.extend(o,{show_back_button:!0})),s||(n.data("ch_header",s=new e(this,o)),s.register()),"string"==typeof i&&s[i]()})},t.fn.ch_button.Constructor=e,t.fn.ch_header.noConflict=function(){return t.fn.ch_header=i,this},t(function(){t(".ch-header").ch_header("show")})}(window.jQuery),function(t){"use strict";var e=function(e,i){t.fn.ch_widget.Constructor(e,i),this.$element=t(e),this.options=t.extend(i,t.fn.ch_widget.defaults,{})};e.prototype=t.extend({},t.fn.ch_widget.Constructor.prototype,{constructor:e,enable:function(){var e,i=this,n=i.$element,s=t("<div/>").addClass("ch-simple-scrollable-up"),o=t("<div/>").addClass("ch-simple-scrollable-dn"),r=n.find("ul, ol, div, p");r.addClass("ch-simple-scrollable-content"),r.height(r.parent().height()-160),e=r.height()-40,s.css({top:r.offset().top}),s.html('<a href="#"><i class="icon-chevron-up"></i></a>'),o.html('<a href="#"><i class="icon-chevron-down"></i></a>'),o.click(function(){r.animate({scrollTop:r.scrollTop()+e},200)}),s.click(function(){r.animate({scrollTop:r.scrollTop()-e},200)}),s.insertBefore(r),o.insertAfter(r)}});var i=t.fn.ch_simple_scrollable;t.fn.ch_simple_scrollable=function(i){return this.each(function(){var n=t(this),s=n.data("ch_simple_scrollable"),o="object"==typeof i&&i;s||(n.data("ch_simple_scrollable",s=new e(this,o)),s.register()),"string"==typeof i&&s[i]()})},t.fn.ch_simple_scrollable.Constructor=e,t.fn.ch_simple_scrollable.noConflict=function(){return t.fn.ch_simple_scrollable=i,this},t(function(){t("div.ch-simple-scrollable").ch_simple_scrollable("enable")})}(window.jQuery);
\ No newline at end of file
index c51dd56..f5693fe 100644 (file)
         }
     );
 
+
+    /* CHBUTTON PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_button;
+
     $.fn.ch_button = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_button.Constructor = ChButton;
 
+
+    /* CHBUTTON NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_button.noConflict = function() {
+        $.fn.ch_button = old;
+        return this;
+    };
+
+
     /* CHBUTTON DATA-API
      * ================= */
+
     $(function() {
         $('.btn, button, input[type=button]').ch_button();
     })
index ab3557b..e5b7c0d 100644 (file)
         }
     );
 
+
+    /* CHCHECKBOXINPUT PLUGIN DEFINITION
+     * ================================= */
+
+    var old = $.fn.ch_checkbox_input;
+
     $.fn.ch_checkbox_input = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_checkbox_input.Constructor = ChCheckboxInput;
 
+
+    /* CHCHECKBOXINPUT NO CONFLICT
+     * =========================== */
+
+    $.fn.ch_checkbox_input.noConflict = function() {
+        $.fn.ch_checkbox_input = old;
+        return this;
+    };
+
+
     /* CHCHECKBOXINPUT DATA-API
      * ================= */
+
     $(function() {
         $('input[type=checkbox]').ch_checkbox_input();
     })
index 4f49c39..df9836c 100644 (file)
         }
     );
 
+
+    /* CHHEADER PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_header;
+
     $.fn.ch_header = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_button.Constructor = ChHeader;
 
+
+    /* CHHEADER NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_header.noConflict = function() {
+        $.fn.ch_header = old;
+        return this;
+    };
+
+
     /* CHHEADER DATA-API
      * ================= */
+
     $(function() {
         $('.ch-header').ch_header('show');
     })
index 5c90cd8..6dbcc2f 100644 (file)
         }
     );
 
+
+    /* CHPAGE PLUGIN DEFINITION
+     * ======================== */
+
     $.fn.ch_page = function(option, value) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_page.Constructor = ChPage;
 
+
     /* CHPAGE DATA-API
      * ================= */
+
     $(function() {
         $('div.page').ch_page();
     })
index ec800b2..053aaa4 100644 (file)
         }
     );
 
+    /* CHRADIOINPUT PLUGIN DEFINITION
+     * ============================== */
+
+    var old = $.fn.ch_radio_input;
+
     $.fn.ch_radio_input = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_radio_input.Constructor = ChRadioInput;
 
+
+    /* CHRADIOINPUT NO CONFLICT
+     * ======================== */
+
+    $.fn.ch_radio_input.noConflict = function() {
+        $.fn.ch_radio_input = old;
+        return this;
+    };
+
+
     /* CHRADIOINPUT DATA-API
-     * ================= */
+     * ===================== */
+
     $(function() {
         $('input[type=radio]').ch_radio_input();
     })
index b1cefc1..2f48ca9 100644 (file)
         }
     );
 
+
+    /* CHSELECT PLUGIN DEFINITION
+     * ========================== */
+
+    var old = $.fn.ch_select;
+
     $.fn.ch_select = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_select.Constructor = ChSelect;
 
+
+    /* CHSELECT NO CONFLICT
+     * ==================== */
+
+    $.fn.ch_select.noConflict = function() {
+        $.fn.ch_select = old;
+        return this;
+    };
+
+
     /* CHBUTTON DATA-API
      * ================= */
+
     $(function() {
         $('select').ch_select();
     })
index ca2c667..0d0ea38 100644 (file)
         }
     );
 
+
+    /* CHSIMPLESCROLLABLE PLUGIN DEFINITION
+     * ==================================== */
+
+    var old = $.fn.ch_simple_scrollable;
+
     $.fn.ch_simple_scrollable = function(option) {
         return this.each(function() {
             var $this = $(this),
 
     $.fn.ch_simple_scrollable.Constructor = ChSimpleScrollable;
 
+
+    /* CHSIMPLESCROLLABLE NO CONFLICT
+     * ============================== */
+
+    $.fn.ch_simple_scrollable.noConflict = function() {
+        $.fn.ch_simple_scrollable = old;
+        return this;
+    };
+
+
     /* CHSIMPLESCROLLABLE DATA-API
-     * ================= */
+     * =========================== */
+
     $(function() {
         $('div.ch-simple-scrollable').ch_simple_scrollable('enable');
     })
index 3962f2d..4a540be 100644 (file)
@@ -7,6 +7,12 @@ $(function () {
       }
     })
 
+      test("should provide no conflict", function () {
+        var button = $.fn.ch_button.noConflict()
+        ok(!$.fn.ch_button, 'button was set back to undefined (org value)')
+        $.fn.ch_button = button
+      })
+
       test("should be disabled when driving", function () {
         var page = $('<div class="page"></div>')
         var btn = $('<button class="btn">test</button>')
index dac1f1f..fdd54be 100644 (file)
@@ -7,6 +7,12 @@ $(function () {
       }
     })
 
+      test("should provide no conflict", function () {
+        var input = $.fn.ch_checkbox_input.noConflict()
+        ok(!$.fn.ch_checkbox_input, 'checkbox_input was set back to undefined (org value)')
+        $.fn.ch_checkbox_input = input
+      })
+
       test("should be disabled when driving", function () {
         var page = $('<div class="page"></div>')
         var input = $('<input type="checkbox">test</input>')
index 41828bc..3e5f06b 100644 (file)
@@ -2,6 +2,12 @@ $(function () {
 
     module("cowhide-header")
 
+      test("should provide no conflict", function () {
+        var header = $.fn.ch_header.noConflict()
+        ok(!$.fn.ch_header, 'header was set back to undefined (org value)')
+        $.fn.ch_header = header
+      })
+
       test("header contains h1 element", function () {
         var page = $('<div class="page"></div>')
         var header = $('<div class="ch-header">Test title</div>')
index 0936006..caf114e 100644 (file)
@@ -7,6 +7,12 @@ $(function () {
       }
     })
 
+      test("should provide no conflict", function () {
+        var input = $.fn.ch_radio_input.noConflict()
+        ok(!$.fn.ch_radio_input, 'radio_input was set back to undefined (org value)')
+        $.fn.ch_radio_input = input
+      })
+
       test("should be disabled when driving", function () {
         var page = $('<div class="page"></div>')
         var input = $('<input type="radio">test</input>')
index 6e6b4ae..70e49f2 100644 (file)
@@ -7,6 +7,12 @@ $(function () {
       }
     })
 
+      test("should provide no conflict", function () {
+        var select = $.fn.ch_select.noConflict()
+        ok(!$.fn.ch_select, 'select was set back to undefined (org value)')
+        $.fn.ch_select = select
+      })
+
       test("should be disabled when driving", function () {
         var page = $('<div class="page"></div>')
         var input = $('<select><option>test</option></select>')
index 8acdbe4..1276daf 100644 (file)
@@ -2,6 +2,12 @@ $(function () {
 
     module("cowhide-simple-scrollable")
 
+      test("should provide no conflict", function () {
+        var simple_scrollable = $.fn.ch_simple_scrollable.noConflict()
+        ok(!$.fn.ch_simple_scrollable, 'simple_scrollable was set back to undefined (org value)')
+        $.fn.ch_simple_scrollable = simple_scrollable
+      })
+
       test("widget has been made scrollable", function () {
         var page = $('<div class="page"></div>')
         var scrollable = $('<div class="ch-simple-scrollable"><p>Test</p></div>')