/*
* Bootstrap v3.3.1 (http://getbootstrap.com)
* Copyright 2011-2014 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(a){var b=a.fn.jquery.split(" ")[0].split(".");if((b[0]<2&&b[1]<9)||(b[0]==1&&b[1]==9&&b[2]<1)){throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}}(jQuery);+function(a){function b(){var c=document.createElement("bootstrap");var e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var d in e){if(c.style[d]!==undefined){return{end:e[d]}}}return false}a.fn.emulateTransitionEnd=function(f){var e=false;var c=this;a(this).one("bsTransitionEnd",function(){e=true});var d=function(){if(!e){a(c).trigger(a.support.transition.end)}};setTimeout(d,f);return this};a(function(){a.support.transition=b();if(!a.support.transition){return}a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(c){if(a(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(a){var c='[data-dismiss="alert"]';var b=function(f){a(f).on("click",c,this.close)};b.VERSION="3.3.1";b.TRANSITION_DURATION=150;b.prototype.close=function(h){var g=a(this);var j=g.attr("data-target");if(!j){j=g.attr("href");j=j&&j.replace(/.*(?=#[^\s]*$)/,"")}var f=a(j);if(h){h.preventDefault()}if(!f.length){f=g.closest(".alert")}f.trigger(h=a.Event("close.bs.alert"));if(h.isDefaultPrevented()){return}f.removeClass("in");function i(){f.detach().trigger("closed.bs.alert").remove()}a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",i).emulateTransitionEnd(b.TRANSITION_DURATION):i()};function e(f){return this.each(function(){var g=a(this);var h=g.data("bs.alert");if(!h){g.data("bs.alert",(h=new b(this)))}if(typeof f=="string"){h[f].call(g)}})}var d=a.fn.alert;a.fn.alert=e;a.fn.alert.Constructor=b;a.fn.alert.noConflict=function(){a.fn.alert=d;return this};a(document).on("click.bs.alert.data-api",c,b.prototype.close)}(jQuery);+function(a){var b=function(e,f){this.$element=a(e);this.options=a.extend({},b.DEFAULTS,f);this.isLoading=false};b.VERSION="3.3.1";b.DEFAULTS={loadingText:"loading..."};b.prototype.setState=function(h){var f="disabled";var e=this.$element;var i=e.is("input")?"val":"html";var g=e.data();h=h+"Text";if(g.resetText==null){e.data("resetText",e[i]())}setTimeout(a.proxy(function(){e[i](g[h]==null?this.options[h]:g[h]);if(h=="loadingText"){this.isLoading=true;e.addClass(f).attr(f,f)}else{if(this.isLoading){this.isLoading=false;e.removeClass(f).removeAttr(f)}}},this),0)};b.prototype.toggle=function(){var g=true;var f=this.$element.closest('[data-toggle="buttons"]');if(f.length){var e=this.$element.find("input");if(e.prop("type")=="radio"){if(e.prop("checked")&&this.$element.hasClass("active")){g=false}else{f.find(".active").removeClass("active")}}if(g){e.prop("checked",!this.$element.hasClass("active")).trigger("change")}}else{this.$element.attr("aria-pressed",!this.$element.hasClass("active"))}if(g){this.$element.toggleClass("active")}};function d(e){return this.each(function(){var f=a(this);var g=f.data("bs.button");var h=typeof e=="object"&&e;if(!g){f.data("bs.button",(g=new b(this,h)))}if(e=="toggle"){g.toggle()}else{if(e){g.setState(e)}}})}var c=a.fn.button;a.fn.button=d;a.fn.button.Constructor=b;a.fn.button.noConflict=function(){a.fn.button=c;return this};a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(g){var f=a(g.target);if(!f.hasClass("btn")){f=f.closest(".btn")}d.call(f,"toggle");g.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(f){a(f.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(f.type))})}(jQuery);+function(a){var b=function(f,g){this.$element=a(f);this.$indicators=this.$element.find(".carousel-indicators");this.options=g;this.paused=this.sliding=this.interval=this.$active=this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};b.VERSION="3.3.1";b.TRANSITION_DURATION=600;b.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};b.prototype.keydown=function(f){if(/input|textarea/i.test(f.target.tagName)){return}switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return}f.preventDefault()};b.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval));return this};b.prototype.getItemIndex=function(f){this.$items=f.parent().children(".item");return this.$items.index(f||this.$active)};b.prototype.getItemForDirection=function(i,f){var h=i=="prev"?-1:1;var g=this.getItemIndex(f);var j=(g+h)%this.$items.length;return this.$items.eq(j)};b.prototype.to=function(g){var h=this;var f=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(g>(this.$items.length-1)||g<0){return}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){h.to(g)})}if(f==g){return this.pause().cycle()}return this.slide(g>f?"next":"prev",this.$items.eq(g))};b.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".next, .prev").length&&a.support.transition){this.$element.trigger(a.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};b.prototype.next=function(){if(this.sliding){return}return this.slide("next")};b.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};b.prototype.slide=function(q,l){var f=this.$element.find(".item.active");var g=l||this.getItemForDirection(q,f);var k=this.interval;var i=q=="next"?"left":"right";var j=q=="next"?"first":"last";var p=this;if(!g.length){if(!this.options.wrap){return}g=this.$element.find(".item")[j]()}if(g.hasClass("active")){return(this.sliding=false)}var m=g[0];var n=a.Event("slide.bs.carousel",{relatedTarget:m,direction:i});this.$element.trigger(n);if(n.isDefaultPrevented()){return}this.sliding=true;k&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=a(this.$indicators.children()[this.getItemIndex(g)]);h&&h.addClass("active")}var o=a.Event("slid.bs.carousel",{relatedTarget:m,direction:i});if(a.support.transition&&this.$element.hasClass("slide")){g.addClass(q);g[0].offsetWidth;f.addClass(i);g.addClass(i);f.one("bsTransitionEnd",function(){g.removeClass([q,i].join(" ")).addClass("active");f.removeClass(["active",i].join(" "));p.sliding=false;setTimeout(function(){p.$element.trigger(o)},0)}).emulateTransitionEnd(b.TRANSITION_DURATION)}else{f.removeClass("active");g.addClass("active");this.sliding=false;this.$element.trigger(o)}k&&this.cycle();return this};function e(f){return this.each(function(){var g=a(this);var i=g.data("bs.carousel");var j=a.extend({},b.DEFAULTS,g.data(),typeof f=="object"&&f);var h=typeof f=="string"?f:j.slide;if(!i){g.data("bs.carousel",(i=new b(this,j)))}if(typeof f=="number"){i.to(f)}else{if(h){i[h]()}else{if(j.interval){i.pause().cycle()}}}})}var d=a.fn.carousel;a.fn.carousel=e;a.fn.carousel.Constructor=b;a.fn.carousel.noConflict=function(){a.fn.carousel=d;return this};var c=function(h){var i;var g=a(this);var f=a(g.attr("data-target")||(i=g.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(!f.hasClass("carousel")){return}var j=a.extend({},f.data(),g.data());var k=g.attr("data-slide-to");if(k){j.interval=false}e.call(f,j);if(k){f.data("bs.carousel").to(k)}h.preventDefault()};a(document).on("click.bs.carousel.data-api","[data-slide]",c).on("click.bs.carousel.data-api","[data-slide-to]",c);a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var f=a(this);e.call(f,f.data())})})}(jQuery);+function(a){var b=function(f,g){this.$element=a(f);this.options=a.extend({},b.DEFAULTS,g);this.$trigger=a(this.options.trigger).filter('[href="#'+f.id+'"], [data-target="#'+f.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle){this.toggle()}};b.VERSION="3.3.1";b.TRANSITION_DURATION=350;b.DEFAULTS={toggle:true,trigger:'[data-toggle="collapse"]'};b.prototype.dimension=function(){var f=this.$element.hasClass("width");return f?"width":"height"};b.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return}var g;var f=this.$parent&&this.$parent.find("> .panel").children(".in, .collapsing");if(f&&f.length){g=f.data("bs.collapse");if(g&&g.transitioning){return}}var k=a.Event("show.bs.collapse");this.$element.trigger(k);if(k.isDefaultPrevented()){return}if(f&&f.length){e.call(f,"hide");g||f.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!a.support.transition){return h.call(this)}var j=a.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(b.TRANSITION_DURATION)[i](this.$element[0][j])};b.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return}var h=a.Event("hide.bs.collapse");this.$element.trigger(h);if(h.isDefaultPrevented()){return}var g=this.dimension();this.$element[g](this.$element[g]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var f=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!a.support.transition){return f.call(this)}this.$element[g](0).one("bsTransitionEnd",a.proxy(f,this)).emulateTransitionEnd(b.TRANSITION_DURATION)};b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};b.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(h,g){var f=a(g);this.addAriaAndCollapsedClass(c(f),f)},this)).end()};b.prototype.addAriaAndCollapsedClass=function(f,g){var h=f.hasClass("in");f.attr("aria-expanded",h);g.toggleClass("collapsed",!h).attr("aria-expanded",h)};function c(f){var g;var h=f.attr("data-target")||(g=f.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,"");return a(h)}function e(f){return this.each(function(){var g=a(this);var h=g.data("bs.collapse");var i=a.extend({},b.DEFAULTS,g.data(),typeof f=="object"&&f);if(!h&&i.toggle&&f=="show"){i.toggle=false}if(!h){g.data("bs.collapse",(h=new b(this,i)))}if(typeof f=="string"){h[f]()}})}var d=a.fn.collapse;a.fn.collapse=e;a.fn.collapse.Constructor=b;a.fn.collapse.noConflict=function(){a.fn.collapse=d;return this};a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var g=a(this);if(!g.attr("data-target")){i.preventDefault()}var f=c(g);var h=f.data("bs.collapse");var j=h?"toggle":a.extend({},g.data(),{trigger:this});e.call(f,j)})}(jQuery);+function(a){var b=".dropdown-backdrop";var h='[data-toggle="dropdown"]';var d=function(i){a(i).on("click.bs.dropdown",this.toggle)};d.VERSION="3.3.1";d.prototype.toggle=function(k){var j=a(this);if(j.is(".disabled, :disabled")){return}var i=e(j);var l=i.hasClass("open");c();if(!l){if("ontouchstart" in document.documentElement&&!i.closest(".navbar-nav").length){a('
').insertAfter(a(this)).on("click",c)}var m={relatedTarget:this};i.trigger(k=a.Event("show.bs.dropdown",m));if(k.isDefaultPrevented()){return}j.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger("shown.bs.dropdown",m)}return false};d.prototype.keydown=function(m){if(!/(38|40|27|32)/.test(m.which)||/input|textarea/i.test(m.target.tagName)){return}var k=a(this);m.preventDefault();m.stopPropagation();if(k.is(".disabled, :disabled")){return}var j=e(k);var o=j.hasClass("open");if((!o&&m.which!=27)||(o&&m.which==27)){if(m.which==27){j.find(h).trigger("focus")}return k.trigger("click")}var l=" li:not(.divider):visible a";var i=j.find('[role="menu"]'+l+', [role="listbox"]'+l);if(!i.length){return}var n=i.index(m.target);if(m.which==38&&n>0){n--}if(m.which==40&&n').prependTo(this.$element).on("click.dismiss.bs.modal",a.proxy(function(j){if(j.target!==j.currentTarget){return}this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this));if(h){this.$backdrop[0].offsetWidth}this.$backdrop.addClass("in");if(!f){return}h?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(b.BACKDROP_TRANSITION_DURATION):f()}else{if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){i.removeBackdrop();f&&f()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(b.BACKDROP_TRANSITION_DURATION):g()}else{if(f){f()}}}};b.prototype.handleUpdate=function(){if(this.options.backdrop){this.adjustBackdrop()}this.adjustDialog()};b.prototype.adjustBackdrop=function(){this.$backdrop.css("height",0).css("height",this.$element[0].scrollHeight)};b.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})};b.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};b.prototype.checkScrollbar=function(){this.bodyIsOverflowing=document.body.scrollHeight>document.documentElement.clientHeight;this.scrollbarWidth=this.measureScrollbar()};b.prototype.setScrollbar=function(){var e=parseInt((this.$body.css("padding-right")||0),10);if(this.bodyIsOverflowing){this.$body.css("padding-right",e+this.scrollbarWidth)}};b.prototype.resetScrollbar=function(){this.$body.css("padding-right","")};b.prototype.measureScrollbar=function(){var f=document.createElement("div");f.className="modal-scrollbar-measure";this.$body.append(f);var e=f.offsetWidth-f.clientWidth;this.$body[0].removeChild(f);return e};function d(f,e){return this.each(function(){var g=a(this);var h=g.data("bs.modal");var i=a.extend({},b.DEFAULTS,g.data(),typeof f=="object"&&f);if(!h){g.data("bs.modal",(h=new b(this,i)))}if(typeof f=="string"){h[f](e)}else{if(i.show){h.show(e)}}})}var c=a.fn.modal;a.fn.modal=d;a.fn.modal.Constructor=b;a.fn.modal.noConflict=function(){a.fn.modal=c;return this};a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(h){var g=a(this);var i=g.attr("href");var f=a(g.attr("data-target")||(i&&i.replace(/.*(?=#[^\s]+$)/,"")));var j=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(i)&&i},f.data(),g.data());if(g.is("a")){h.preventDefault()}f.one("show.bs.modal",function(e){if(e.isDefaultPrevented()){return}f.one("hidden.bs.modal",function(){g.is(":visible")&&g.trigger("focus")})});d.call(f,j,this)})}(jQuery);+function(a){var d=function(e,f){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",e,f)};d.VERSION="3.3.1";d.TRANSITION_DURATION=150;d.DEFAULTS={animation:true,placement:"top",selector:false,template:'',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};d.prototype.init=function(m,e,j){this.enabled=true;this.type=m;this.$element=a(e);this.options=this.getOptions(j);this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);var l=this.options.trigger.split(" ");for(var h=l.length;h--;){var k=l[h];if(k=="click"){this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this))}else{if(k!="manual"){var f=k=="hover"?"mouseenter":"focusin";var g=k=="hover"?"mouseleave":"focusout";this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.enter,this));this.$element.on(g+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}}this.options.selector?(this._options=a.extend({},this.options,{trigger:"manual",selector:""})):this.fixTitle()};d.prototype.getDefaults=function(){return d.DEFAULTS};d.prototype.getOptions=function(e){e=a.extend({},this.getDefaults(),this.$element.data(),e);if(e.delay&&typeof e.delay=="number"){e.delay={show:e.delay,hide:e.delay}}return e};d.prototype.getDelegateOptions=function(){var f={};var e=this.getDefaults();this._options&&a.each(this._options,function(g,h){if(e[g]!=h){f[g]=h}});return f};d.prototype.enter=function(e){var f=e instanceof this.constructor?e:a(e.currentTarget).data("bs."+this.type);if(f&&f.$tip&&f.$tip.is(":visible")){f.hoverState="in";return}if(!f){f=new this.constructor(e.currentTarget,this.getDelegateOptions());a(e.currentTarget).data("bs."+this.type,f)}clearTimeout(f.timeout);f.hoverState="in";if(!f.options.delay||!f.options.delay.show){return f.show()}f.timeout=setTimeout(function(){if(f.hoverState=="in"){f.show()}},f.options.delay.show)};d.prototype.leave=function(e){var f=e instanceof this.constructor?e:a(e.currentTarget).data("bs."+this.type);if(!f){f=new this.constructor(e.currentTarget,this.getDelegateOptions());a(e.currentTarget).data("bs."+this.type,f)}clearTimeout(f.timeout);f.hoverState="out";if(!f.options.delay||!f.options.delay.hide){return f.hide()}f.timeout=setTimeout(function(){if(f.hoverState=="out"){f.hide()}},f.options.delay.hide)};d.prototype.show=function(){var o=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(o);var p=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(o.isDefaultPrevented()||!p){return}var t=this;var g=this.tip();var u=this.getUID(this.type);this.setContent();g.attr("id",u);this.$element.attr("aria-describedby",u);if(this.options.animation){g.addClass("fade")}var r=typeof this.options.placement=="function"?this.options.placement.call(this,g[0],this.$element[0]):this.options.placement;var k=/\s?auto?\s?/i;var j=k.test(r);if(j){r=r.replace(k,"")||"top"}g.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this);this.options.container?g.appendTo(this.options.container):g.insertAfter(this.$element);var s=this.getPosition();var i=g[0].offsetWidth;var h=g[0].offsetHeight;if(j){var q=r;var f=this.options.container?a(this.options.container):this.$element.parent();var n=this.getPosition(f);r=r=="bottom"&&s.bottom+h>n.bottom?"top":r=="top"&&s.top-hn.width?"left":r=="left"&&s.left-in.top+n.height){h.top=n.top+n.height-g}}}else{var i=k.left-o;var l=k.left+o+f;if(in.width){h.left=n.left+n.width-l}}}return h};d.prototype.getTitle=function(){var g;var e=this.$element;var f=this.options;g=e.attr("data-original-title")||(typeof f.title=="function"?f.title.call(e[0]):f.title);return g};d.prototype.getUID=function(e){do{e+=~~(Math.random()*1000000)}while(document.getElementById(e));return e};d.prototype.tip=function(){return(this.$tip=this.$tip||a(this.options.template))};d.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow"))};d.prototype.enable=function(){this.enabled=true};d.prototype.disable=function(){this.enabled=false};d.prototype.toggleEnabled=function(){this.enabled=!this.enabled};d.prototype.toggle=function(f){var g=this;if(f){g=a(f.currentTarget).data("bs."+this.type);if(!g){g=new this.constructor(f.currentTarget,this.getDelegateOptions());a(f.currentTarget).data("bs."+this.type,g)}}g.tip().hasClass("in")?g.leave(g):g.enter(g)};d.prototype.destroy=function(){var e=this;clearTimeout(this.timeout);this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type)})};function c(e){return this.each(function(){var f=a(this);var g=f.data("bs.tooltip");var h=typeof e=="object"&&e;var i=h&&h.selector;if(!g&&e=="destroy"){return}if(i){if(!g){f.data("bs.tooltip",(g={}))}if(!g[i]){g[i]=new d(this,h)}}else{if(!g){f.data("bs.tooltip",(g=new d(this,h)))}}if(typeof e=="string"){g[e]()}})}var b=a.fn.tooltip;a.fn.tooltip=c;a.fn.tooltip.Constructor=d;a.fn.tooltip.noConflict=function(){a.fn.tooltip=b;return this}}(jQuery);+function(a){var d=function(e,f){this.init("popover",e,f)};if(!a.fn.tooltip){throw new Error("Popover requires tooltip.js")}d.VERSION="3.3.1";d.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''});d.prototype=a.extend({},a.fn.tooltip.Constructor.prototype);d.prototype.constructor=d;d.prototype.getDefaults=function(){return d.DEFAULTS};d.prototype.setContent=function(){var e=this.tip();var g=this.getTitle();var f=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](g);e.find(".popover-content").children().detach().end()[this.options.html?(typeof f=="string"?"html":"append"):"text"](f);e.removeClass("fade top bottom left right in");if(!e.find(".popover-title").html()){e.find(".popover-title").hide()}};d.prototype.hasContent=function(){return this.getTitle()||this.getContent()};d.prototype.getContent=function(){var e=this.$element;var f=this.options;return e.attr("data-content")||(typeof f.content=="function"?f.content.call(e[0]):f.content)};d.prototype.arrow=function(){return(this.$arrow=this.$arrow||this.tip().find(".arrow"))};d.prototype.tip=function(){if(!this.$tip){this.$tip=a(this.options.template)}return this.$tip};function c(e){return this.each(function(){var f=a(this);var g=f.data("bs.popover");var h=typeof e=="object"&&e;var i=h&&h.selector;if(!g&&e=="destroy"){return}if(i){if(!g){f.data("bs.popover",(g={}))}if(!g[i]){g[i]=new d(this,h)}}else{if(!g){f.data("bs.popover",(g=new d(this,h)))}}if(typeof e=="string"){g[e]()}})}var b=a.fn.popover;a.fn.popover=c;a.fn.popover.Constructor=d;a.fn.popover.noConflict=function(){a.fn.popover=b;return this}}(jQuery);+function(a){function d(e,f){var g=a.proxy(this.process,this);this.$body=a("body");this.$scrollElement=a(e).is("body")?a(window):a(e);this.options=a.extend({},d.DEFAULTS,f);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",g);this.refresh();this.process()}d.VERSION="3.3.1";d.DEFAULTS={offset:10};d.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};d.prototype.refresh=function(){var f="offset";var e=0;if(!a.isWindow(this.$scrollElement[0])){f="position";e=this.$scrollElement.scrollTop()}this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();var g=this;this.$body.find(this.selector).map(function(){var h=a(this);var j=h.data("target")||h.attr("href");var i=/^#./.test(j)&&a(j);return(i&&i.length&&i.is(":visible")&&[[i[f]().top+e,j]])||null}).sort(function(h,i){return h[0]-i[0]}).each(function(){g.offsets.push(this[0]);g.targets.push(this[1])})};d.prototype.process=function(){var k=this.$scrollElement.scrollTop()+this.options.offset;var j=this.getScrollHeight();var g=this.options.offset+j-this.$scrollElement.height();var h=this.offsets;var l=this.targets;var e=this.activeTarget;var f;if(this.scrollHeight!=j){this.refresh()}if(k>=g){return e!=(f=l[l.length-1])&&this.activate(f)}if(e&&k=h[f]&&(!h[f+1]||k<=h[f+1])&&this.activate(l[f])}};d.prototype.activate=function(g){this.activeTarget=g;this.clear();var f=this.selector+'[data-target="'+g+'"],'+this.selector+'[href="'+g+'"]';var e=a(f).parents("li").addClass("active");if(e.parent(".dropdown-menu").length){e=e.closest("li.dropdown").addClass("active")}e.trigger("activate.bs.scrollspy")};d.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};function c(e){return this.each(function(){var f=a(this);var g=f.data("bs.scrollspy");var h=typeof e=="object"&&e;if(!g){f.data("bs.scrollspy",(g=new d(this,h)))}if(typeof e=="string"){g[e]()}})}var b=a.fn.scrollspy;a.fn.scrollspy=c;a.fn.scrollspy.Constructor=d;a.fn.scrollspy.noConflict=function(){a.fn.scrollspy=b;return this};a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var e=a(this);c.call(e,e.data())})})}(jQuery);+function(a){var e=function(f){this.element=a(f)};e.VERSION="3.3.1";e.TRANSITION_DURATION=150;e.prototype.show=function(){var h=this.element;var i=h.closest("ul:not(.dropdown-menu)");var k=h.data("target");if(!k){k=h.attr("href");k=k&&k.replace(/.*(?=#[^\s]*$)/,"")}if(h.parent("li").hasClass("active")){return}var f=i.find(".active:last a");var j=a.Event("hide.bs.tab",{relatedTarget:h[0]});var l=a.Event("show.bs.tab",{relatedTarget:f[0]});f.trigger(j);h.trigger(l);if(l.isDefaultPrevented()||j.isDefaultPrevented()){return}var g=a(k);this.activate(h.closest("li"),i);this.activate(g,g.parent(),function(){f.trigger({type:"hidden.bs.tab",relatedTarget:h[0]});h.trigger({type:"shown.bs.tab",relatedTarget:f[0]})})};e.prototype.activate=function(i,h,g){var f=h.find("> .active");var k=g&&a.support.transition&&((f.length&&f.hasClass("fade"))||!!h.find("> .fade").length);function j(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",false);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",true);if(k){i[0].offsetWidth;i.addClass("in")}else{i.removeClass("fade")}if(i.parent(".dropdown-menu")){i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",true)}g&&g()}f.length&&k?f.one("bsTransitionEnd",j).emulateTransitionEnd(e.TRANSITION_DURATION):j();f.removeClass("in")};function d(f){return this.each(function(){var g=a(this);var h=g.data("bs.tab");if(!h){g.data("bs.tab",(h=new e(this)))}if(typeof f=="string"){h[f]()}})}var c=a.fn.tab;a.fn.tab=d;a.fn.tab.Constructor=e;a.fn.tab.noConflict=function(){a.fn.tab=c;return this};var b=function(f){f.preventDefault();d.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',b).on("click.bs.tab.data-api",'[data-toggle="pill"]',b)}(jQuery);+function(a){var b=function(e,f){this.options=a.extend({},b.DEFAULTS,f);this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this));this.$element=a(e);this.affixed=this.unpin=this.pinnedOffset=null;this.checkPosition()};b.VERSION="3.3.1";b.RESET="affix affix-top affix-bottom";b.DEFAULTS={offset:0,target:window};b.prototype.getState=function(l,g,j,i){var m=this.$target.scrollTop();var k=this.$element.offset();var n=this.$target.height();if(j!=null&&this.affixed=="top"){return m=l-i)){return"bottom"}return false};b.prototype.getPinnedOffset=function(){if(this.pinnedOffset){return this.pinnedOffset}this.$element.removeClass(b.RESET).addClass("affix");var f=this.$target.scrollTop();var e=this.$element.offset();return(this.pinnedOffset=e.top-f)};b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)};b.prototype.checkPosition=function(){if(!this.$element.is(":visible")){return}var i=this.$element.height();var j=this.options.offset;var l=j.top;var k=j.bottom;var m=a("body").height();if(typeof j!="object"){k=l=j}if(typeof l=="function"){l=j.top(this.$element)}if(typeof k=="function"){k=j.bottom(this.$element)}var f=this.getState(m,i,l,k);if(this.affixed!=f){if(this.unpin!=null){this.$element.css("top","")}var g="affix"+(f?"-"+f:"");var h=a.Event(g+".bs.affix");this.$element.trigger(h);if(h.isDefaultPrevented()){return}this.affixed=f;this.unpin=f=="bottom"?this.getPinnedOffset():null;this.$element.removeClass(b.RESET).addClass(g).trigger(g.replace("affix","affixed")+".bs.affix")}if(f=="bottom"){this.$element.offset({top:m-i-k})}};function d(e){return this.each(function(){var f=a(this);var g=f.data("bs.affix");var h=typeof e=="object"&&e;if(!g){f.data("bs.affix",(g=new b(this,h)))}if(typeof e=="string"){g[e]()}})}var c=a.fn.affix;a.fn.affix=d;a.fn.affix.Constructor=b;a.fn.affix.noConflict=function(){a.fn.affix=c;return this};a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var e=a(this);var f=e.data();f.offset=f.offset||{};if(f.offsetBottom!=null){f.offset.bottom=f.offsetBottom}if(f.offsetTop!=null){f.offset.top=f.offsetTop}d.call(e,f)})})}(jQuery);(function(b,a){if(typeof module!=="undefined"&&module.exports){module.exports=a(require("jquery")(b))}else{if(typeof define==="function"&&define.amd){define("bootstrap-dialog",["jquery"],function(c){return a(c)})}else{b.BootstrapDialog=a(b.jQuery)}}}(this,function(a){var d=a.fn.modal.Constructor;var c=function(e,f){d.call(this,e,f)};c.getModalVersion=function(){var e=null;if(typeof a.fn.modal.Constructor.VERSION==="undefined"){e="v3.1"}else{if(/3\.2\.\d+/.test(a.fn.modal.Constructor.VERSION)){e="v3.2"}else{e="v3.3"}}return e};c.ORIGINAL_BODY_PADDING=a("body").css("padding-right")||0;c.METHODS_TO_OVERRIDE={};c.METHODS_TO_OVERRIDE["v3.1"]={};c.METHODS_TO_OVERRIDE["v3.2"]={hide:function(f){if(f){f.preventDefault()}f=a.Event("hide.bs.modal");this.$element.trigger(f);if(!this.isShown||f.isDefaultPrevented()){return}this.isShown=false;var g=this.getGlobalOpenedDialogs();if(g.length===0){this.$body.removeClass("modal-open")}this.resetScrollbar();this.escape();a(document).off("focusin.bs.modal");this.$element.removeClass("in").attr("aria-hidden",true).off("click.dismiss.bs.modal");a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()}};c.METHODS_TO_OVERRIDE["v3.3"]={setScrollbar:function(){var e=c.ORIGINAL_BODY_PADDING;if(this.bodyIsOverflowing){this.$body.css("padding-right",e+this.scrollbarWidth)}},resetScrollbar:function(){var e=this.getGlobalOpenedDialogs();if(e.length===0){this.$body.css("padding-right",c.ORIGINAL_BODY_PADDING)}},hideModal:function(){this.$element.hide();this.backdrop(a.proxy(function(){var e=this.getGlobalOpenedDialogs();if(e.length===0){this.$body.removeClass("modal-open")}this.resetAdjustments();this.resetScrollbar();this.$element.trigger("hidden.bs.modal")},this))}};c.prototype={constructor:c,getGlobalOpenedDialogs:function(){var e=[];a.each(b.dialogs,function(g,f){if(f.isRealized()&&f.isOpened()){e.push(f)}});return e}};c.prototype=a.extend(c.prototype,d.prototype,c.METHODS_TO_OVERRIDE[c.getModalVersion()]);var b=function(e){this.defaultOptions=a.extend(true,{id:b.newGuid(),buttons:[],data:{},onshow:null,onshown:null,onhide:null,onhidden:null},b.defaultOptions);this.indexedButtons={};this.registeredButtonHotkeys={};this.draggableData={isMouseDown:false,mouseOffset:{}};this.realized=false;this.opened=false;this.initOptions(e);this.holdThisInstance()};b.NAMESPACE="bootstrap-dialog";b.TYPE_DEFAULT="type-default";b.TYPE_INFO="type-info";b.TYPE_PRIMARY="type-primary";b.TYPE_SUCCESS="type-success";b.TYPE_WARNING="type-warning";b.TYPE_DANGER="type-danger";b.DEFAULT_TEXTS={};b.DEFAULT_TEXTS[b.TYPE_DEFAULT]="Information";b.DEFAULT_TEXTS[b.TYPE_INFO]="Information";b.DEFAULT_TEXTS[b.TYPE_PRIMARY]="Information";b.DEFAULT_TEXTS[b.TYPE_SUCCESS]="Success";b.DEFAULT_TEXTS[b.TYPE_WARNING]="Warning";b.DEFAULT_TEXTS[b.TYPE_DANGER]="Danger";b.DEFAULT_TEXTS.OK="OK";b.DEFAULT_TEXTS.CANCEL="Cancel";b.SIZE_NORMAL="size-normal";b.SIZE_SMALL="size-small";b.SIZE_WIDE="size-wide";b.SIZE_LARGE="size-large";b.BUTTON_SIZES={};b.BUTTON_SIZES[b.SIZE_NORMAL]="";b.BUTTON_SIZES[b.SIZE_SMALL]="";b.BUTTON_SIZES[b.SIZE_WIDE]="";b.BUTTON_SIZES[b.SIZE_LARGE]="btn-lg";b.ICON_SPINNER="glyphicon glyphicon-asterisk";b.defaultOptions={type:b.TYPE_PRIMARY,size:b.SIZE_NORMAL,cssClass:"",title:null,message:null,nl2br:true,closable:true,closeByBackdrop:true,closeByKeyboard:true,spinicon:b.ICON_SPINNER,autodestroy:true,draggable:false,animate:true,description:"",width:-1};b.configDefaultOptions=function(e){b.defaultOptions=a.extend(true,b.defaultOptions,e)};b.dialogs={};b.openAll=function(){a.each(b.dialogs,function(f,e){e.open()})};b.closeAll=function(){a.each(b.dialogs,function(f,e){e.close()})};b.moveFocus=function(){var e=null;a.each(b.dialogs,function(g,f){e=f});if(e!==null&&e.isRealized()){e.getModal().focus()}};b.METHODS_TO_OVERRIDE={};b.METHODS_TO_OVERRIDE["v3.1"]={handleModalBackdropEvent:function(){this.getModal().on("click",{dialog:this},function(e){e.target===this&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByBackdrop()&&e.data.dialog.close()});return this},updateZIndex:function(){var h=1040;var i=1050;var g=0;a.each(b.dialogs,function(j,k){g++});var f=this.getModal();var e=f.data("bs.modal").$backdrop;f.css("z-index",i+(g-1)*20);e.css("z-index",h+(g-1)*20);return this},open:function(){!this.isRealized()&&this.realize();this.getModal().modal("show");this.updateZIndex();this.setOpened(true);return this}};b.METHODS_TO_OVERRIDE["v3.2"]={handleModalBackdropEvent:b.METHODS_TO_OVERRIDE["v3.1"]["handleModalBackdropEvent"],updateZIndex:b.METHODS_TO_OVERRIDE["v3.1"]["updateZIndex"],open:b.METHODS_TO_OVERRIDE["v3.1"]["open"]};b.METHODS_TO_OVERRIDE["v3.3"]={};b.prototype={constructor:b,initOptions:function(e){this.options=a.extend(true,this.defaultOptions,e);return this},holdThisInstance:function(){b.dialogs[this.getId()]=this;return this},initModalStuff:function(){this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter());this.getModal().append(this.getModalDialog());this.getModalDialog().append(this.getModalContent());this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter());return this},createModal:function(){var e=a('');e.prop("id",this.getId()).attr("aria-labelledby",this.getId()+"_title");return e},getModal:function(){return this.$modal},setModal:function(e){this.$modal=e;return this},createModalDialog:function(){if(this.defaultOptions.width>0){return a('')}return a('')},getModalDialog:function(){return this.$modalDialog},setModalDialog:function(e){this.$modalDialog=e;return this},createModalContent:function(){return a('')},getModalContent:function(){return this.$modalContent},setModalContent:function(e){this.$modalContent=e;return this},createModalHeader:function(){return a('')},getModalHeader:function(){return this.$modalHeader},setModalHeader:function(e){this.$modalHeader=e;return this},createModalBody:function(){return a('')},getModalBody:function(){return this.$modalBody},setModalBody:function(e){this.$modalBody=e;return this},createModalFooter:function(){return a('')},getModalFooter:function(){return this.$modalFooter},setModalFooter:function(e){this.$modalFooter=e;return this},createDynamicContent:function(f){var e=null;if(typeof f==="function"){e=f.call(f,this)}else{e=f}if(typeof e==="string"){e=this.formatStringContent(e)}return e},formatStringContent:function(e){if(this.options.nl2br){return e.replace(/\r\n/g,"
").replace(/[\r\n]/g,"
")}return e},setData:function(e,f){this.options.data[e]=f;return this},getData:function(e){return this.options.data[e]},setId:function(e){this.options.id=e;return this},getId:function(){return this.options.id},getType:function(){return this.options.type},setType:function(e){this.options.type=e;this.updateType();return this},updateType:function(){if(this.isRealized()){var e=[b.TYPE_DEFAULT,b.TYPE_INFO,b.TYPE_PRIMARY,b.TYPE_SUCCESS,b.TYPE_WARNING,b.TYPE_DANGER];this.getModal().removeClass(e.join(" ")).addClass(this.getType())}return this},getSize:function(){return this.options.size},setSize:function(e){this.options.size=e;this.updateSize();return this},updateSize:function(){if(this.isRealized()){var e=this;this.getModal().removeClass(b.SIZE_NORMAL).removeClass(b.SIZE_SMALL).removeClass(b.SIZE_WIDE).removeClass(b.SIZE_LARGE);this.getModal().addClass(this.getSize());this.getModalDialog().removeClass("modal-sm");if(this.getSize()===b.SIZE_SMALL){this.getModalDialog().addClass("modal-sm")}this.getModalDialog().removeClass("modal-lg");if(this.getSize()===b.SIZE_WIDE){this.getModalDialog().addClass("modal-lg")}a.each(this.options.buttons,function(j,h){var f=e.getButton(h.id);var i=["btn-lg","btn-sm","btn-xs"];var k=false;if(typeof h.cssClass==="string"){var g=h.cssClass.split(" ");a.each(g,function(m,l){if(a.inArray(l,i)!==-1){k=true}})}if(!k){f.removeClass(i.join(" "));f.addClass(e.getButtonSize())}})}return this},getCssClass:function(){return this.options.cssClass},setCssClass:function(e){this.options.cssClass=e;return this},getTitle:function(){return this.options.title},setTitle:function(e){this.options.title=e;this.updateTitle();return this},updateTitle:function(){if(this.isRealized()){var e=this.getTitle()!==null?this.createDynamicContent(this.getTitle()):this.getDefaultText();this.getModalHeader().find("."+this.getNamespace("title")).html("").append(e).prop("id",this.getId()+"_title")}return this},getMessage:function(){return this.options.message},setMessage:function(e){this.options.message=e;this.updateMessage();return this},updateMessage:function(){if(this.isRealized()){var e=this.createDynamicContent(this.getMessage());this.getModalBody().find("."+this.getNamespace("message")).html("").append(e)}return this},isClosable:function(){return this.options.closable},setClosable:function(e){this.options.closable=e;this.updateClosable();return this},setCloseByBackdrop:function(e){this.options.closeByBackdrop=e;return this},canCloseByBackdrop:function(){return this.options.closeByBackdrop},setCloseByKeyboard:function(e){this.options.closeByKeyboard=e;return this},canCloseByKeyboard:function(){return this.options.closeByKeyboard},isAnimate:function(){return this.options.animate},setAnimate:function(e){this.options.animate=e;return this},updateAnimate:function(){if(this.isRealized()){this.getModal().toggleClass("fade",this.isAnimate())}return this},getSpinicon:function(){return this.options.spinicon},setSpinicon:function(e){this.options.spinicon=e;return this},addButton:function(e){this.options.buttons.push(e);return this},addButtons:function(e){var f=this;a.each(e,function(h,g){f.addButton(g)});return this},getButtons:function(){return this.options.buttons},setButtons:function(e){this.options.buttons=e;this.updateButtons();return this},getButton:function(e){if(typeof this.indexedButtons[e]!=="undefined"){return this.indexedButtons[e]}return null},getButtonSize:function(){if(typeof b.BUTTON_SIZES[this.getSize()]!=="undefined"){return b.BUTTON_SIZES[this.getSize()]}return""},updateButtons:function(){if(this.isRealized()){if(this.getButtons().length===0){this.getModalFooter().hide()}else{this.getModalFooter().find("."+this.getNamespace("footer")).html("").append(this.createFooterButtons())}}return this},isAutodestroy:function(){return this.options.autodestroy},setAutodestroy:function(e){this.options.autodestroy=e},getDescription:function(){return this.options.description},setDescription:function(e){this.options.description=e;return this},getDefaultText:function(){return b.DEFAULT_TEXTS[this.getType()]},getNamespace:function(e){return b.NAMESPACE+"-"+e},createHeaderContent:function(){var e=a("");e.addClass(this.getNamespace("header"));e.append(this.createTitleContent());e.prepend(this.createCloseButton());return e},createTitleContent:function(){var e=a("");e.addClass(this.getNamespace("title"));return e},createCloseButton:function(){var e=a("");e.addClass(this.getNamespace("close-button"));var f=a('');e.append(f);e.on("click",{dialog:this},function(g){g.data.dialog.close()});return e},createBodyContent:function(){var e=a("");e.addClass(this.getNamespace("body"));e.append(this.createMessageContent());return e},createMessageContent:function(){var e=a("");e.addClass(this.getNamespace("message"));return e},createFooterContent:function(){var e=a("");e.addClass(this.getNamespace("footer"));return e},createFooterButtons:function(){var f=this;var e=a("");e.addClass(this.getNamespace("footer-buttons"));this.indexedButtons={};a.each(this.options.buttons,function(i,h){if(!h.id){h.id=b.newGuid()}var g=f.createButton(h);f.indexedButtons[h.id]=g;e.append(g)});return e},createButton:function(f){var e=a('');e.prop("id",f.id);if(typeof f.icon!=="undefined"&&a.trim(f.icon)!==""){e.append(this.createButtonIcon(f.icon))}if(typeof f.label!=="undefined"){e.append(f.label)}if(typeof f.cssClass!=="undefined"&&a.trim(f.cssClass)!==""){if(f.useCustomStyle){e.removeClass("btn")}e.addClass(f.cssClass)}else{e.addClass("btn-default")}if(typeof f.hotkey!=="undefined"){this.registeredButtonHotkeys[f.hotkey]=e}e.on("click",{dialog:this,$button:e,button:f},function(j){var i=j.data.dialog;var g=j.data.$button;var h=j.data.button;if(typeof h.action==="function"){h.action.call(g,i)}if(h.autospin){g.toggleSpin(true)}});this.enhanceButton(e);return e},enhanceButton:function(e){e.dialog=this;e.toggleEnable=function(g){var f=this;if(typeof g!=="undefined"){f.prop("disabled",!g).toggleClass("disabled",!g)}else{f.prop("disabled",!f.prop("disabled"))}return f};e.enable=function(){var f=this;f.toggleEnable(true);return f};e.disable=function(){var f=this;f.toggleEnable(false);return f};e.toggleSpin=function(i){var g=this;var h=g.dialog;var f=g.find("."+h.getNamespace("button-icon"));if(typeof i==="undefined"){i=!(e.find(".icon-spin").length>0)}if(i){f.hide();e.prepend(h.createButtonIcon(h.getSpinicon()).addClass("icon-spin"))}else{f.show();e.find(".icon-spin").remove()}return g};e.spin=function(){var f=this;f.toggleSpin(true);return f};e.stopSpin=function(){var f=this;f.toggleSpin(false);return f};return this},createButtonIcon:function(f){var e=a("");e.addClass(this.getNamespace("button-icon")).addClass(f);return e},enableButtons:function(e){a.each(this.indexedButtons,function(g,f){f.toggleEnable(e)});return this},updateClosable:function(){if(this.isRealized()){this.getModalHeader().find("."+this.getNamespace("close-button")).toggle(this.isClosable())}return this},onShow:function(e){this.options.onshow=e;return this},onShown:function(e){this.options.onshown=e;return this},onHide:function(e){this.options.onhide=e;return this},onHidden:function(e){this.options.onhidden=e;return this},isRealized:function(){return this.realized},setRealized:function(e){this.realized=e;return this},isOpened:function(){return this.opened},setOpened:function(e){this.opened=e;return this},handleModalEvents:function(){this.getModal().on("show.bs.modal",{dialog:this},function(f){var e=f.data.dialog;if(e.isModalEvent(f)&&typeof e.options.onshow==="function"){return e.options.onshow(e)}});this.getModal().on("shown.bs.modal",{dialog:this},function(f){var e=f.data.dialog;e.isModalEvent(f)&&typeof e.options.onshown==="function"&&e.options.onshown(e)});this.getModal().on("hide.bs.modal",{dialog:this},function(f){var e=f.data.dialog;if(e.isModalEvent(f)&&typeof e.options.onhide==="function"){return e.options.onhide(e)}});this.getModal().on("hidden.bs.modal",{dialog:this},function(f){var e=f.data.dialog;e.isModalEvent(f)&&typeof e.options.onhidden==="function"&&e.options.onhidden(e);e.isAutodestroy()&&a(this).remove();b.moveFocus()});this.handleModalBackdropEvent();this.getModal().on("keyup",{dialog:this},function(e){e.which===27&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByKeyboard()&&e.data.dialog.close()});this.getModal().on("keyup",{dialog:this},function(g){var f=g.data.dialog;if(typeof f.registeredButtonHotkeys[g.which]!=="undefined"){var e=a(f.registeredButtonHotkeys[g.which]);!e.prop("disabled")&&e.focus().trigger("click")}});return this},handleModalBackdropEvent:function(){this.getModal().on("click",{dialog:this},function(e){a(e.target).hasClass("modal-backdrop")&&e.data.dialog.isClosable()&&e.data.dialog.canCloseByBackdrop()&&e.data.dialog.close()});return this},isModalEvent:function(e){return typeof e.namespace!=="undefined"&&e.namespace==="bs.modal"},makeModalDraggable:function(){if(this.options.draggable){this.getModalHeader().addClass(this.getNamespace("draggable")).on("mousedown",{dialog:this},function(g){var e=g.data.dialog;e.draggableData.isMouseDown=true;var f=e.getModalDialog().offset();e.draggableData.mouseOffset={top:g.clientY-f.top,left:g.clientX-f.left}});this.getModal().on("mouseup mouseleave",{dialog:this},function(e){e.data.dialog.draggableData.isMouseDown=false});a("body").on("mousemove",{dialog:this},function(f){var e=f.data.dialog;if(!e.draggableData.isMouseDown){return}e.getModalDialog().offset({top:f.clientY-e.draggableData.mouseOffset.top,left:f.clientX-e.draggableData.mouseOffset.left})})}return this},realize:function(){this.initModalStuff();this.getModal().addClass(b.NAMESPACE).addClass(this.getCssClass());this.updateSize();if(this.getDescription()){this.getModal().attr("aria-describedby",this.getDescription())}this.getModalFooter().append(this.createFooterContent());this.getModalHeader().append(this.createHeaderContent());this.getModalBody().append(this.createBodyContent());this.getModal().data("bs.modal",new c(this.getModal(),{backdrop:"static",keyboard:false,show:false}));this.makeModalDraggable();this.handleModalEvents();this.setRealized(true);this.updateButtons();this.updateType();this.updateTitle();this.updateMessage();this.updateClosable();this.updateAnimate();this.updateSize();return this},open:function(){!this.isRealized()&&this.realize();this.getModal().modal("show");this.setOpened(true);return this},close:function(){if(this.isAutodestroy()){delete b.dialogs[this.getId()]}this.getModal().modal("hide");this.setOpened(false);return this}};b.prototype=a.extend(b.prototype,b.METHODS_TO_OVERRIDE[c.getModalVersion()]);b.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var f=Math.random()*16|0,g=e==="x"?f:(f&3|8);return g.toString(16)})};b.show=function(e){return new b(e).open()};b.alert=function(){var f={};var e={type:b.TYPE_PRIMARY,title:null,message:null,closable:true,buttonLabel:b.DEFAULT_TEXTS.OK,callback:null};if(typeof arguments[0]==="object"&&arguments[0].constructor==={}.constructor){f=a.extend(true,e,arguments[0])}else{f=a.extend(true,e,{message:arguments[0],closable:false,buttonLabel:b.DEFAULT_TEXTS.OK,callback:typeof arguments[1]!=="undefined"?arguments[1]:null})}return new b({type:f.type,title:f.title,message:f.message,closable:f.closable,data:{callback:f.callback},onhide:function(g){!g.getData("btnClicked")&&g.isClosable()&&typeof g.getData("callback")==="function"&&g.getData("callback")(false)},buttons:[{label:f.buttonLabel,action:function(g){g.setData("btnClicked",true);typeof g.getData("callback")==="function"&&g.getData("callback")(true);g.close()}}]}).open()};b.confirm=function(f,e){return new b({title:"Confirmation",message:f,closable:false,data:{callback:e},buttons:[{label:b.DEFAULT_TEXTS.CANCEL,action:function(g){typeof g.getData("callback")==="function"&&g.getData("callback")(false);g.close()}},{label:b.DEFAULT_TEXTS.OK,cssClass:"btn-primary",action:function(g){typeof g.getData("callback")==="function"&&g.getData("callback")(true);g.close()}}]}).open()};b.warning=function(f,e){return new b({type:b.TYPE_WARNING,message:f}).open()};b.danger=function(f,e){return new b({type:b.TYPE_DANGER,message:f}).open()};b.success=function(f,e){return new b({type:b.TYPE_SUCCESS,message:f}).open()};return b}));