/** * bootstrap.js v3.0.0 by @fat and @mdo * Copyright 2013 Twitter Inc. * http://www.apache.org/licenses/LICENSE-2.0 */ if(!jQuery)throw new Error("Bootstrap requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]}}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(window.jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d)};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.is("input")?"val":"html",e=c.data();a+="Text",e.resetText||c.data("resetText",c[d]()),c[d](e[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons"]');if(a.length){var b=this.$element.find("input").prop("checked",!this.$element.hasClass("active")).trigger("change");"radio"===b.prop("type")&&a.find(".active").removeClass("active")}this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(window.jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}this.sliding=!0,f&&this.pause();var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});if(!e.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(j),j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(j),j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?(this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350),void 0):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){none}(window.jQuery),+function(a){"use strict";function b(){a(d).remove(),a(e).each(function(b){var d=c(a(this));d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown")),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown"))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){if("ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#\w/.test(e)&&a(e);return f&&f.length&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parents(".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).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(c),this.affixed=this.unpin=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top()),"function"==typeof h&&(h=f.bottom());var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;this.affixed!==i&&(this.unpin&&this.$element.css("top",""),this.affixed=i,this.unpin="bottom"==i?e.top-d:null,this.$element.removeClass(b.RESET).addClass("affix"+(i?"-"+i:"")),"bottom"==i&&this.$element.offset({top:document.body.offsetHeight-h-this.$element.height()}))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery); /* ========================================================== * prettyCheckable / Author: Arthur Gouveia * ========================================================== */ (function(f,c,h){var e="prettyCheckable",a=c.document,g={labelPosition:"right",customClass:"",color:"blue"};function b(j,i){this.element=j;this.options=f.extend({},g,i);this._defaults=g;this._name=e;this.init()}function d(i){i.find("a, label").on("touchstart click",function(m){m.preventDefault();var j=f(this).closest(".clearfix");var k=j.find("input");var l=j.find("a");if(k.prop("disabled")===true){console.log("sdf");return}if(k.prop("type")==="radio"){f('input[name="'+k.attr("name")+'"]').each(function(n,o){f(o).prop("checked",false).parent().find("a").removeClass("checked")})}if(k.prop("checked")){k.prop("checked",false).change()}else{k.prop("checked",true).change()}l.toggleClass("checked")});i.find("a").on("keyup",function(j){if(j.keyCode===32){f(this).click()}})}b.prototype.init=function(){var i=f(this.element);i.css("display","none");var j=i.data("type")!==h?i.data("type"):i.attr("type");var p=i.data("label")!==h?i.data("label"):"";var o=i.data("labelposition")!==h?"label"+i.data("labelposition"):"label"+this.options.labelPosition;var s=i.data("customclass")!==h?i.data("customclass"):this.options.customClass;var l=i.data("color")!==h?i.data("color"):this.options.color;var n=i.prop("disabled")===true?"disabled":"";var r=["pretty"+j,o,s,l,n].join(" ");i.wrap('
').parent().html();var m=[];var k=i.prop("checked")?"checked":"";var q=i.prop("disabled")?true:false;if(o==="labelright"){m.push('');m.push('")}else{m.push('");m.push('')}i.parent().append(m.join("\n"));d(i.parent())};b.prototype.disableInput=function(){var i=f(this.element);i.parent().addClass("disabled");i.prop("disabled",true)};b.prototype.enableInput=function(){var i=f(this.element);i.parent().removeClass("disabled");i.prop("disabled",false)};f.fn[e]=function(j){var i=[];this.each(function(){if(!f.data(this,"plugin_"+e)){i.push(f.data(this,"plugin_"+e,new b(this,j)))}});return i}}(jQuery,window)); /* =========================================================== * bootstrap-select.js * ========================================================== */ !function(c){var d=function(b,e,a){if(a){a.stopPropagation();a.preventDefault()}this.$element=c(b);this.$newElement=null;this.button=null;this.options=c.extend({},c.fn.selectpicker.defaults,this.$element.data(),typeof e=="object"&&e);if(this.options.title==null){this.options.title=this.$element.attr("title")}this.val=d.prototype.val;this.render=d.prototype.render;this.refresh=d.prototype.refresh;this.selectAll=d.prototype.selectAll;this.deselectAll=d.prototype.deselectAll;this.init()};d.prototype={constructor:d,init:function(i){if(!this.options.container){this.$element.hide()}else{this.$element.css("visibility","hidden")}this.multiple=this.$element.prop("multiple");var e=this.$element.attr("class")!==undefined?this.$element.attr("class").split(/\s+/):"";var a=this.$element.attr("id");this.$element.after(this.createView());this.$newElement=this.$element.next(".bootstrap-select");if(this.options.container){this.selectPosition()}this.button=this.$newElement.find("> button");if(a!==undefined){var b=this;this.button.attr("data-id",a);c('label[for="'+a+'"]').click(function(){b.$newElement.find("button[data-id="+a+"]").focus()})}for(var j=0;j'+s.data("subtext")+"":"";var r=s.data("icon")!==undefined?' ':"";if(s.is(":disabled")||s.parent().is(":disabled")){r=""+r+""}f=r+''+f+h+"";if(a.options.hideDisabled&&(s.is(":disabled")||s.parent().is(":disabled"))){b.push('')}else{if(s.parent().is("optgroup")&&s.data("divider")!=true){if(s.index()==0){var g=s.parent().attr("label");var e=s.parent().data("subtext")!==undefined?''+s.parent().data("subtext")+"":"";var v=s.parent().data("icon")?' ':"";g=v+''+g+e+"";if(s[0].index!=0){b.push('
'+g+"
"+a.createA(f,"opt "+u))}else{b.push("
"+g+"
"+a.createA(f,"opt "+u))}}else{b.push(a.createA(f,"opt "+u))}}else{if(s.data("divider")==true){b.push('
')}else{if(c(this).data("hidden")==true){b.push("")}else{b.push(a.createA(f,u))}}}}});if(j.length>0){for(var k=0;k"+b[k]+""}}if(!this.multiple&&this.$element.find("option:selected").length==0&&!a.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return c(l)},createA:function(a,b){return''+a+''},render:function(){var a=this;this.$element.find("option").each(function(e){a.setDisabled(e,c(this).is(":disabled")||c(this).parent().is(":disabled"));a.setSelected(e,c(this).is(":selected"))});var b=this.$element.find("option:selected").map(function(g,e){var f;if(a.options.showSubtext&&c(this).attr("data-subtext")&&!a.multiple){f=' '+c(this).data("subtext")+""}else{f=""}if(c(this).attr("title")!=undefined){return c(this).attr("title")}else{return c(this).text()+f}}).toArray();var i=!this.multiple?b[0]:b.join(", ");if(a.multiple&&a.options.selectedTextFormat.indexOf("count")>-1){var l=a.options.selectedTextFormat.split(">");var j=this.options.hideDisabled?":not([disabled])":"";if((l.length>1&&b.length>l[1])||(l.length==1&&b.length>=2)){i=b.length+" of "+this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+j).length+" selected"}}if(!i){i=a.options.title!=undefined?a.options.title:a.options.noneSelectedText}var k;if(this.options.showSubtext&&this.$element.find("option:selected").attr("data-subtext")){k=' '+this.$element.find("option:selected").data("subtext")+""}else{k=""}a.$newElement.find(".filter-option").html(i+k)},setSize:function(){if(this.options.container){this.$newElement.toggle(this.$element.parent().is(":visible"))}var u=this;var z=this.$newElement.find(".dropdown-menu");var s=z.find("li > a");var b=this.$newElement.addClass("open").find(".dropdown-menu li > a").outerHeight();this.$newElement.removeClass("open");var w=z.find("li .divider").outerHeight(true);var x=this.$newElement.offset().top;var t=this.$newElement.outerHeight();var B=parseInt(z.css("padding-top"))+parseInt(z.css("padding-bottom"))+parseInt(z.css("border-top-width"))+parseInt(z.css("border-bottom-width"));var A=this.options.hideDisabled?":not(.disabled)":"";var y;if(this.options.size=="auto"){var a=function(){var i=x-c(window).scrollTop();var e=window.innerHeight;var h=B+parseInt(z.css("margin-top"))+parseInt(z.css("margin-bottom"))+2;var f=e-i-t-h;var g;y=f;if(u.$newElement.hasClass("dropup")){y=i-h}if((z.find("li").length+z.find("dt").length)>3){g=b*3+h-2}else{g=0}z.css({"max-height":y+"px","overflow-y":"auto","min-height":g+"px"})};a();c(window).resize(a);c(window).scroll(a)}else{if(this.options.size&&this.options.size!="auto"&&z.find("li"+A).length>this.options.size){var q=z.find("li"+A+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index();var r=z.find("li").slice(0,q+1).find(".div-contain").length;y=b*this.options.size+r*w+B;z.css({"max-height":y+"px","overflow-y":"auto"})}}if(this.options.width=="auto"){this.$newElement.find(".dropdown-menu").css("min-width","0");var v=this.$newElement.find(".dropdown-menu").css("width");this.$newElement.css("width",v);if(this.options.container){this.$element.css("width",v)}}else{if(this.options.width){if(this.options.container){this.$element.css("width",this.options.width);this.$newElement.width(this.$element.outerWidth())}else{this.$newElement.css("width",this.options.width)}}else{if(this.options.container){this.$newElement.width(this.$element.outerWidth())}}}},selectPosition:function(){var b=c(this.options.container).offset();var g=this.$element.offset();if(b&&g){var a=g.top-b.top;var h=g.left-b.left;this.$newElement.appendTo(this.options.container);this.$newElement.css({position:"absolute",top:a+"px",left:h+"px"})}},refresh:function(){this.reloadLi();this.render();this.setSize();this.checkDisabled();if(this.options.container){this.selectPosition()}},setSelected:function(b,a){if(a){this.$newElement.find("li").eq(b).addClass("selected")}else{this.$newElement.find("li").eq(b).removeClass("selected")}},setDisabled:function(b,a){if(a){this.$newElement.find("li").eq(b).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1)}else{this.$newElement.find("li").eq(b).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)}},isDisabled:function(){return this.$element.is(":disabled")||this.$element.attr("readonly")},checkDisabled:function(){if(this.isDisabled()){this.button.addClass("disabled");this.button.click(function(a){a.preventDefault()});this.button.attr("tabindex","-1")}else{if(!this.isDisabled()&&this.button.hasClass("disabled")){this.button.removeClass("disabled");this.button.click(function(){return true});this.button.removeAttr("tabindex")}}},checkTabIndex:function(){if(this.$element.is("[tabindex]")){var a=this.$element.attr("tabindex");this.button.attr("tabindex",a)}},clickListener:function(){var a=this;c("body").on("touchstart.dropdown",".dropdown-menu",function(b){b.stopPropagation()});this.$newElement.on("click","li a",function(b){var l=c(this).parent().index(),e=c(this).parent(),n=e.parents(".bootstrap-select"),k=a.$element.val();if(a.multiple){b.stopPropagation()}b.preventDefault();if(a.$element.not(":disabled")&&!c(this).parent().hasClass("disabled")){if(!a.multiple){a.$element.find("option").prop("selected",false);a.$element.find("option").eq(l).prop("selected",true)}else{var m=a.$element.find("option").eq(l).prop("selected");if(m){a.$element.find("option").eq(l).prop("selected",false)}else{a.$element.find("option").eq(l).prop("selected",true)}}n.find(".filter-option").html(e.text());n.find("button").focus();if(k!=a.$element.val()){a.$element.trigger("change")}a.render()}});this.$newElement.on("click","li.disabled a, li dt, li .div-contain",function(b){b.preventDefault();b.stopPropagation();var e=c(this).parent().parents(".bootstrap-select");e.find("button").focus()});this.$element.on("change",function(b){a.render()})},val:function(a){if(a!=undefined){this.$element.val(a);this.$element.trigger("change");return this.$element}else{return this.$element.val()}},selectAll:function(){this.$element.find("option").prop("selected",true).attr("selected","selected");this.render()},deselectAll:function(){this.$element.find("option").prop("selected",false).removeAttr("selected");this.render()},keydown:function(r){var e,s,x,t,v,w,b,A,y;e=c(this);x=e.parent();s=c("[role=menu] li:not(.divider):visible a",x);if(!s.length){return}if(/(38|40)/.test(r.keyCode)){t=s.index(s.filter(":focus"));w=s.parent(":not(.disabled)").first().index();b=s.parent(":not(.disabled)").last().index();v=s.eq(t).parent().nextAll(":not(.disabled)").eq(0).index();A=s.eq(t).parent().prevAll(":not(.disabled)").eq(0).index();y=s.eq(v).parent().prevAll(":not(.disabled)").eq(0).index();if(r.keyCode==38){if(t!=y&&t>A){t=A}if(tb){t=b}}s.eq(t).focus()}else{var z={48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};var B=[];s.each(function(){if(c(this).parent().is(":not(.disabled)")){if(c.trim(c(this).text().toLowerCase()).substring(0,1)==z[r.keyCode]){B.push(c(this).parent().index())}}});var u=c(document).data("keycount");u++;c(document).data("keycount",u);var a=c.trim(c(":focus").text().toLowerCase()).substring(0,1);if(a!=z[r.keyCode]){u=1;c(document).data("keycount",u)}else{if(u>=B.length){c(document).data("keycount",0)}}s.eq(B[u-1]).focus()}if(/(13)/.test(r.keyCode)){c(":focus").click();x.addClass("open");c(document).data("keycount",0)}}};c.fn.selectpicker=function(h,b){var j=arguments;var a;var i=this.each(function(){if(c(this).is("select")){var e=c(this),f=e.data("selectpicker"),o=typeof h=="object"&&h;if(!f){e.data("selectpicker",(f=new d(this,o,b)))}else{if(o){for(var n in o){f.options[n]=o[n]}}}if(typeof h=="string"){var g=h;if(f[g] instanceof Function){[].shift.apply(j);a=f[g].apply(f,j)}else{a=f.options[g]}}}});if(a!=undefined){return a}else{return i}};c.fn.selectpicker.defaults={style:null,size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",width:null,container:false,hideDisabled:false,showSubtext:false};c(document).data("keycount",0).on("keydown","[data-toggle=dropdown], [role=menu]",d.prototype.keydown)}(window.jQuery); /* =========================================================== * bootstrap-rowlink.js * ========================================================== */ !function(e){var t=function(t,n){n=e.extend({},e.fn.rowlink.defaults,n);var r=t.nodeName.toLowerCase()=="tr"?e(t):e(t).find("tr:has(td)");r.each(function(){var t=e(this).find(n.target).first();if(!t.length)return;var r=t.attr("href");e(this).find("td").not(".nolink").click(function(){window.location=r}),e(this).addClass("rowlink"),t.replaceWith(t.html())})};e.fn.rowlink=function(n){return this.each(function(){var r=e(this),i=r.data("rowlink");i||r.data("rowlink",i=new t(this,n))})},e.fn.rowlink.defaults={target:"a"},e.fn.rowlink.Constructor=t,e(function(){e('[data-provide="rowlink"],[data-provides="rowlink"]').each(function(){e(this).rowlink(e(this).data())})})}(window.jQuery); /* =========================================================== * bootstrap-inputmask.js j2 * Based on Masked Input plugin by Josh Bush (digitalbush.com) * =========================================================== * Copyright 2012 Jasny BV, Netherlands. * ========================================================== */ !function(d){var c=(window.orientation!==undefined),b=navigator.userAgent.toLowerCase().indexOf("android")>-1;var a=function(f,e){if(b){return}this.$element=d(f);this.options=d.extend({},d.fn.inputmask.defaults,e);this.mask=String(e.mask);this.init();this.listen();this.checkVal()};a.prototype={init:function(){var f=this.options.definitions;var e=this.mask.length;this.tests=[];this.partialPosition=this.mask.length;this.firstNonMaskPos=null;d.each(this.mask.split(""),d.proxy(function(g,h){if(h=="?"){e--;this.partialPosition=g}else{if(f[h]){this.tests.push(new RegExp(f[h]));if(this.firstNonMaskPos===null){this.firstNonMaskPos=this.tests.length-1}}else{this.tests.push(null)}}},this));this.buffer=d.map(this.mask.split(""),d.proxy(function(h,g){if(h!="?"){return f[h]?this.options.placeholder:h}},this));this.focusText=this.$element.val();this.$element.data("rawMaskFn",d.proxy(function(){return d.map(this.buffer,function(h,g){return this.tests[g]&&h!=this.options.placeholder?h:null}).join("")},this))},listen:function(){if(this.$element.attr("readonly")){return}var e=(navigator.userAgent.match(/msie/i)?"paste":"input")+".mask";this.$element.on("unmask",d.proxy(this.unmask,this)).on("focus.mask",d.proxy(this.focusEvent,this)).on("blur.mask",d.proxy(this.blurEvent,this)).on("keydown.mask",d.proxy(this.keydownEvent,this)).on("keypress.mask",d.proxy(this.keypressEvent,this)).on(e,d.proxy(this.pasteEvent,this))},caret:function(g,e){if(this.$element.length===0){return}if(typeof g=="number"){e=(typeof e=="number")?e:g;return this.$element.each(function(){if(this.setSelectionRange){this.setSelectionRange(g,e)}else{if(this.createTextRange){var h=this.createTextRange();h.collapse(true);h.moveEnd("character",e);h.moveStart("character",g);h.select()}}})}else{if(this.$element[0].setSelectionRange){g=this.$element[0].selectionStart;e=this.$element[0].selectionEnd}else{if(document.selection&&document.selection.createRange){var f=document.selection.createRange();g=0-f.duplicate().moveStart("character",-100000);e=g+f.text.length}}return{begin:g,end:e}}},seekNext:function(f){var e=this.mask.length;while(++f<=e&&!this.tests[f]){}return f},seekPrev:function(e){while(--e>=0&&!this.tests[e]){}return e},shiftL:function(k,f){var e=this.mask.length;if(k<0){return}for(var h=k,g=this.seekNext(f);hl.length){break}}else{if(this.buffer[f]==l.charAt(j)&&f!=this.partialPosition){j++;k=f}}}if(!g&&k+1=this.partialPosition){this.writeBuffer();if(!g){this.$element.val(this.$element.val().substring(0,k+1))}}}return(this.partialPosition?f:this.firstNonMaskPos)}};d.fn.inputmask=function(e){return this.each(function(){var g=d(this),f=g.data("inputmask");if(!f){g.data("inputmask",(f=new a(this,e)))}})};d.fn.inputmask.defaults={mask:"",placeholder:"_",definitions:{"9":"[0-9]",a:"[A-Za-z]","?":"[A-Za-z0-9]","*":"."}};d.fn.inputmask.Constructor=a;d(document).on("focus.inputmask.data-api","[data-mask]",function(g){var f=d(this);if(f.data("inputmask")){return}g.preventDefault();f.inputmask(f.data())})}(window.jQuery); /* =========================================================== * jQuery Flickr Feed Plugin * ========================================================== */ (function(a){a.fn.jflickrfeed=function(d,f){d=a.extend(true,{flickrbase:"http://api.flickr.com/services/feeds/",feedapi:"photos_public.gne",limit:20,qstrings:{lang:"en-us",format:"json",jsoncallback:"?"},cleanDescription:true,useTemplate:true,itemTemplate:"",itemCallback:function(){}},d);var b=d.flickrbase+d.feedapi+"?";var e=true;for(var c in d.qstrings){if(!e){b+="&"}b+=c+"="+d.qstrings[c];e=false}return a(this).each(function(){var h=a(this);var g=this;a.getJSON(b,function(i){a.each(i.items,function(m,p){if(m(.*?)<\/p>/g;var j=p.description;if(o.test(j)){p.description=j.match(o)[2];if(p.description!=undefined){p.description=p.description.replace("

","").replace("

","")}}}p.image_s=p.media.m.replace("_m","_s");p.image_t=p.media.m.replace("_m","_t");p.image_m=p.media.m.replace("_m","_m");p.image=p.media.m.replace("_m","");p.image_b=p.media.m.replace("_m","_b");delete p.media;if(d.useTemplate){var n=d.itemTemplate;for(var l in p){var k=new RegExp("{{"+l+"}}","g");n=n.replace(k,p[l])}h.append(n)}d.itemCallback.call(g,p)}});if(a.isFunction(f)){f.call(g,i)}})})}})(jQuery); /* ========================================================== * bootstrap-maxlength.js v1.3.7 * Copyright (c) 2013 Maurizio Napoleoni; * ========================================================== */ (function(){(function(e){"use strict";e.fn.extend({maxlength:function(t,n){function s(e){var t=e.val(),n=t.match(/\n/g),r=n?n.length:0;return e.val().length+r}function o(e,n,r){var i=!0;return!t.alwaysShow&&r-s(e)>n&&(i=!1),i}function u(e,t){var n=t-s(e);return n}function a(e){e.css({display:"block"})}function f(e){e.css({display:"none"})}function l(e,n){var r="";return t.preText&&(r+=t.preText),t.showMaxLength?r=r+n+t.separator+e:r+=n,t.postText&&(r+=t.postText),r}function c(e,n,r,i){i.html(l(r,e)),e>0?o(n,t.threshold,r)?a(i.removeClass(t.limitReachedClass).addClass(t.warningClass)):f(i):a(i.removeClass(t.warningClass).addClass(t.limitReachedClass))}function h(t){var n=t[0];return e.extend({},typeof n.getBoundingClientRect=="function"?n.getBoundingClientRect():{width:n.offsetWidth,height:n.offsetHeight},t.offset())}function p(e,n){var r=h(e),i=e.outerWidth(),s=n.outerWidth(),o=n.width(),u=n.height();switch(t.placement){case"bottom":n.css({top:r.top+r.height,left:r.left+r.width/2-o/2});break;case"top":n.css({top:r.top-u,left:r.left+r.width/2-o/2});break;case"left":n.css({top:r.top+r.height/2-u/2,left:r.left-o});break;case"right":n.css({top:r.top+r.height/2-u/2,left:r.left+r.width});break;case"bottom-right":n.css({top:r.top+r.height,left:r.left+r.width});break;case"top-right":n.css({top:r.top-u,left:r.left+i});break;case"top-left":n.css({top:r.top-u,left:r.left-s});break;case"bottom-left":n.css({top:r.top+e.outerHeight(),left:r.left-s});break;case"centered-right":n.css({top:r.top+u/2,left:r.left+i-s-3})}}function d(e){return e.attr("maxlength")||e.attr("size")}var r=e("body"),i={alwaysShow:!1,threshold:10,warningClass:"badge badge-success",limitReachedClass:"badge badge-important",separator:" / ",preText:"",postText:"",showMaxLength:!0,placement:"bottom",validate:!1};return e.isFunction(t)&&!n&&(n=t,t={}),t=e.extend(i,t),this.each(function(){var n=e(this),i=d(n),s=e("").css({display:"none",position:"absolute",whiteSpace:"nowrap",zIndex:999}).html(l(i,"0"));n.is("textarea")&&(n.data("maxlenghtsizex",n.outerWidth()),n.data("maxlenghtsizey",n.outerHeight()),n.mouseup(function(){(n.outerWidth()!==n.data("maxlenghtsizex")||n.outerHeight()!==n.data("maxlenghtsizey"))&&p(n,s),n.data("maxlenghtsizex",n.outerWidth()),n.data("maxlenghtsizey",n.outerHeight())})),r.append(s),n.focus(function(){var e=u(n,d(n));c(e,n,i,s),p(n,s)}),n.blur(function(){s.css("display","none")}),n.keyup(function(){var e=u(n,d(n)),r=!0;return t.validate&&e<0?r=!1:c(e,n,i,s),r}),n.keydown(function(e){var t=u(n,d(n));if(t<=0&&e.keyCode!==46&&e.keyCode!==8)return!1})})}})})(jQuery)}).call(this); /* =========================================================== * Bootstrap Color Picker Plugin * =========================================================== */ !function(h){var g=function(a){this.value={h:1,s:1,b:1,a:1};this.setColor(a)};g.prototype={constructor:g,setColor:function(a){a=a.toLowerCase();var b=this;h.each(e.stringParsers,function(i,c){var m=c.re.exec(a),n=m&&c.parse(m),d=c.space||"rgba";if(n){if(d==="hsla"){b.value=e.RGBtoHSB.apply(null,e.HSLtoRGB.apply(null,n))}else{b.value=e.RGBtoHSB.apply(null,n)}return false}})},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setLightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=parseInt((1-a)*100,10)/100},toRGB:function(o,a,d,c){if(!o){o=this.value.h;a=this.value.s;d=this.value.b}o*=360;var p,b,r,q,s;o=(o%360)/60;s=d*a;q=s*(1-Math.abs(o%2-1));p=b=r=d-s;o=~~o;p+=[s,q,0,0,q,s][o];b+=[q,s,s,q,0,0][o];r+=[0,0,q,s,s,q][o];return{r:Math.round(p*255),g:Math.round(b*255),b:Math.round(r*255),a:c||this.value.a}},toHex:function(a,b,k,d){var c=this.toRGB(a,b,k,d);return"#"+((1<<24)|(parseInt(c.r)<<16)|(parseInt(c.g)<<8)|parseInt(c.b)).toString(16).substr(1)},toHSL:function(a,b,n,m){if(!a){a=this.value.h;b=this.value.s;n=this.value.b}var c=a,o=(2-b)*n,d=b*n;if(o>0&&o<=1){d/=o}else{d/=2-o}o/=2;if(d>1){d=1}return{h:c,s:d,l:o,a:m||this.value.a}}};var f=function(b,c){this.element=h(b);var a=c.format||this.element.data("color-format")||"hex";this.format=e.translateFormats[a];this.isInput=this.element.is("input");this.component=this.element.is(".color")?this.element.find(".input-group-addon"):false;this.picker=h(e.template).appendTo("body").on("mousedown",h.proxy(this.mousedown,this));if(this.isInput){this.element.on({focus:h.proxy(this.show,this),keyup:h.proxy(this.update,this)})}else{if(this.component){this.component.on({click:h.proxy(this.show,this)})}else{this.element.on({click:h.proxy(this.show,this)})}}if(a==="rgba"||a==="hsla"){this.picker.addClass("alpha");this.alpha=this.picker.find(".colorpicker-alpha")[0].style}if(this.component){this.picker.find(".colorpicker-color").hide();this.preview=this.element.find("i")[0].style}else{this.preview=this.picker.find("div:last")[0].style}this.base=this.picker.find("div:first")[0].style;this.update()};f.prototype={constructor:f,show:function(a){this.picker.show();this.height=this.component?this.component.outerHeight():this.element.outerHeight();this.place();h(window).on("resize",h.proxy(this.place,this));if(!this.isInput){if(a){a.stopPropagation();a.preventDefault()}}h(document).on({mousedown:h.proxy(this.hide,this)});this.element.trigger({type:"show",color:this.color})},update:function(){this.color=new g(this.isInput?this.element.prop("value"):this.element.data("color"));this.picker.find("i").eq(0).css({left:this.color.value.s*100,top:100-this.color.value.b*100}).end().eq(1).css("top",100*(1-this.color.value.h)).end().eq(2).css("top",100*(1-this.color.value.a));this.previewColor()},setValue:function(a){this.color=new g(a);this.picker.find("i").eq(0).css({left:this.color.value.s*100,top:100-this.color.value.b*100}).end().eq(1).css("top",100*(1-this.color.value.h)).end().eq(2).css("top",100*(1-this.color.value.a));this.previewColor();this.element.trigger({type:"changeColor",color:this.color})},hide:function(){this.picker.hide();h(window).off("resize",this.place);if(!this.isInput){h(document).off({mousedown:this.hide});if(this.component){this.element.find("input").prop("value",this.format.call(this))}this.element.data("color",this.format.call(this))}else{this.element.prop("value",this.format.call(this))}this.element.trigger({type:"hide",color:this.color})},place:function(){var a=this.component?this.component.offset():this.element.offset();this.picker.css({top:a.top+this.height,left:a.left})},previewColor:function(){try{this.preview.backgroundColor=this.format.call(this)}catch(a){this.preview.backgroundColor=this.color.toHex()}this.base.backgroundColor=this.color.toHex(this.color.value.h,1,1,1);if(this.alpha){this.alpha.backgroundColor=this.color.toHex()}},pointer:null,slider:null,mousedown:function(b){b.stopPropagation();b.preventDefault();var c=h(b.target);var d=c.closest("div");if(!d.is(".colorpicker")){if(d.is(".colorpicker-saturation")){this.slider=h.extend({},e.sliders.saturation)}else{if(d.is(".colorpicker-hue")){this.slider=h.extend({},e.sliders.hue)}else{if(d.is(".colorpicker-alpha")){this.slider=h.extend({},e.sliders.alpha)}else{return false}}}var a=d.offset();this.slider.knob=d.find("i")[0].style;this.slider.left=b.pageX-a.left;this.slider.top=b.pageY-a.top;this.pointer={left:b.pageX,top:b.pageY};h(document).on({mousemove:h.proxy(this.mousemove,this),mouseup:h.proxy(this.mouseup,this)}).trigger("mousemove")}return false},mousemove:function(a){a.stopPropagation();a.preventDefault();var b=Math.max(0,Math.min(this.slider.maxLeft,this.slider.left+((a.pageX||this.pointer.left)-this.pointer.left)));var c=Math.max(0,Math.min(this.slider.maxTop,this.slider.top+((a.pageY||this.pointer.top)-this.pointer.top)));this.slider.knob.left=b+"px";this.slider.knob.top=c+"px";if(this.slider.callLeft){this.color[this.slider.callLeft].call(this.color,b/100)}if(this.slider.callTop){this.color[this.slider.callTop].call(this.color,c/100)}this.previewColor();this.element.trigger({type:"changeColor",color:this.color});return false},mouseup:function(a){a.stopPropagation();a.preventDefault();h(document).off({mousemove:this.mousemove,mouseup:this.mouseup});return false}};h.fn.colorpicker=function(b,a){return this.each(function(){var c=h(this),d=c.data("colorpicker"),j=typeof b==="object"&&b;if(!d){c.data("colorpicker",(d=new f(this,h.extend({},h.fn.colorpicker.defaults,j))))}if(typeof b==="string"){d[b](a)}})};h.fn.colorpicker.defaults={};h.fn.colorpicker.Constructor=f;var e={translateFormats:{rgb:function(){var a=this.color.toRGB();return"rgb("+a.r+","+a.g+","+a.b+")"},rgba:function(){var a=this.color.toRGB();return"rgba("+a.r+","+a.g+","+a.b+","+a.a+")"},hsl:function(){var a=this.color.toHSL();return"hsl("+Math.round(a.h*360)+","+Math.round(a.s*100)+"%,"+Math.round(a.l*100)+"%)"},hsla:function(){var a=this.color.toHSL();return"hsla("+Math.round(a.h*360)+","+Math.round(a.s*100)+"%,"+Math.round(a.l*100)+"%,"+a.a+")"},hex:function(){return this.color.toHex()}},sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setLightness"},hue:{maxLeft:0,maxTop:100,callLeft:false,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:false,callTop:"setAlpha"}},RGBtoHSB:function(b,c,q,o){b/=255;c/=255;q/=255;var d,n,p,a;p=Math.max(b,c,q);a=p-Math.min(b,c,q);d=(a===0?null:p==b?(c-q)/a:p==c?(q-b)/a+2:(b-c)/a+4);d=((d+360)%6)*60/360;n=a===0?0:a/p;return{h:d||1,s:n,b:p,a:o||1}},HueToRGB:function(a,b,c){if(c<0){c+=1}else{if(c>1){c-=1}}if((c*6)<1){return a+(b-a)*c*6}else{if((c*2)<1){return b}else{if((c*3)<2){return a+(b-a)*((2/3)-c)*6}else{return a}}}},HSLtoRGB:function(b,s,d,x){if(s<0){s=0}var q;if(d<=0.5){q=d*(1+s)}else{q=d+s-(d*s)}var p=2*d-q;var z=b+(1/3);var l=b;var c=b-(1/3);var r=Math.round(e.HueToRGB(p,q,z)*255);var a=Math.round(e.HueToRGB(p,q,l)*255);var y=Math.round(e.HueToRGB(p,q,c)*255);return[r,a,y,x||1]},stringParsers:[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}}],template:'