diff --git a/libraries/bootstrap.js b/libraries/bootstrap.js
deleted file mode 100644
index b04a0e82..00000000
--- a/libraries/bootstrap.js
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.1.1 (http://getbootstrap.com)
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript 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]};return!1}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()})}(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)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&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()})}(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.bs.carousel",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&&(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]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(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.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),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())})})}(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("collapse 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?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):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&&f.toggle&&"show"==c&&(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){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.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){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i'}),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?"string"==typeof c?"html":"append":"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||"destroy"!=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}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window: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=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[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);if(g&&b<=e[0])return g!=(a=f[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).parentsUntil(this.options.target,".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.bs.scrollspy")};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())})})}(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.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")})}(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=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},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;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));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;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-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)})})}(jQuery);
\ No newline at end of file
diff --git a/libraries/bootstrap/js/bootstrap-colorpicker.js b/libraries/bootstrap/js/bootstrap-colorpicker.js
deleted file mode 100644
index f723b1fd..00000000
--- a/libraries/bootstrap/js/bootstrap-colorpicker.js
+++ /dev/null
@@ -1,947 +0,0 @@
-/*!
- * Bootstrap Colorpicker
- * http://mjolnic.github.io/bootstrap-colorpicker/
- *
- * Originally written by (c) 2012 Stefan Petre
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0.txt
- *
- * @todo Update DOCS
- */
-(function ($) {
- // Color object
- const Color = function (val) {
- this.value = {
- h: 0,
- s: 0,
- b: 0,
- a: 1,
- };
- this.origFormat = null; // original string format
- if (val) {
- if (val.toLowerCase !== undefined) {
- this.setColor(val);
- } else if (val.h !== undefined) {
- this.value = val;
- }
- }
- };
-
- Color.prototype = {
- constructor: Color,
- _sanitizeNumber(val) {
- if (typeof val === 'number') {
- return val;
- }
- if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {
- return 1;
- }
- if (val.toLowerCase !== undefined) {
- return parseFloat(val);
- }
- return 1;
- },
- // parse a string to HSB
- setColor(strVal) {
- strVal = strVal.toLowerCase();
- this.value = this.stringToHSB(strVal) || {
- h: 0,
- s: 0,
- b: 0,
- a: 1,
- };
- },
- stringToHSB(strVal) {
- strVal = strVal.toLowerCase();
- const that = this;
- let result = false;
- $.each(this.stringParsers, (i, parser) => {
- const match = parser.re.exec(strVal);
- const values = match && parser.parse.apply(that, [match]);
- const format = parser.format || 'rgba';
- if (values) {
- if (format.match(/hsla?/)) {
- result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));
- } else {
- result = that.RGBtoHSB.apply(that, values);
- }
- that.origFormat = format;
- return false;
- }
- return true;
- });
- return result;
- },
- setHue(h) {
- this.value.h = 1 - h;
- },
- setSaturation(s) {
- this.value.s = s;
- },
- setBrightness(b) {
- this.value.b = 1 - b;
- },
- setAlpha(a) {
- this.value.a = parseInt((1 - a) * 100, 10) / 100;
- },
- toRGB(h, s, v, a) {
- h = h || this.value.h;
- s = s || this.value.s;
- v = v || this.value.b;
- a = a || this.value.a;
-
- let r; let g; let b; let i; let f; let p; let q; let
- t;
- if (h && s === undefined && v === undefined) {
- s = h.s, v = h.v, h = h.h;
- }
- i = Math.floor(h * 6);
- f = h * 6 - i;
- p = v * (1 - s);
- q = v * (1 - f * s);
- t = v * (1 - (1 - f) * s);
- switch (i % 6) {
- case 0:
- r = v, g = t, b = p;
- break;
- case 1:
- r = q, g = v, b = p;
- break;
- case 2:
- r = p, g = v, b = t;
- break;
- case 3:
- r = p, g = q, b = v;
- break;
- case 4:
- r = t, g = p, b = v;
- break;
- case 5:
- r = v, g = p, b = q;
- break;
- }
- return {
- r: Math.floor(r * 255),
- g: Math.floor(g * 255),
- b: Math.floor(b * 255),
- a,
- };
- },
- toHex(h, s, b, a) {
- const rgb = this.toRGB(h, s, b, a);
- return `#${((1 << 24) | (parseInt(rgb.r) << 16) | (parseInt(rgb.g) << 8) | parseInt(rgb.b)).toString(16).substr(1)}`;
- },
- toHSL(h, s, b, a) {
- h = h || this.value.h;
- s = s || this.value.s;
- b = b || this.value.b;
- a = a || this.value.a;
-
- const H = h;
- let L = (2 - s) * b;
- let S = s * b;
- if (L > 0 && L <= 1) {
- S /= L;
- } else {
- S /= 2 - L;
- }
- L /= 2;
- if (S > 1) {
- S = 1;
- }
- return {
- h: isNaN(H) ? 0 : H,
- s: isNaN(S) ? 0 : S,
- l: isNaN(L) ? 0 : L,
- a: isNaN(a) ? 0 : a,
- };
- },
- RGBtoHSB(r, g, b, a) {
- r /= 255;
- g /= 255;
- b /= 255;
-
- let H; let S; let V; let
- C;
- V = Math.max(r, g, b);
- C = V - Math.min(r, g, b);
- H = (C === 0 ? null
- : V === r ? (g - b) / C
- : V === g ? (b - r) / C + 2
- : (r - g) / C + 4
- );
- H = ((H + 360) % 6) * 60 / 360;
- S = C === 0 ? 0 : C / V;
- return {
- h: this._sanitizeNumber(H),
- s: S,
- b: V,
- a: this._sanitizeNumber(a),
- };
- },
- HueToRGB(p, q, h) {
- if (h < 0) {
- h += 1;
- } else if (h > 1) {
- h -= 1;
- }
- if ((h * 6) < 1) {
- return p + (q - p) * h * 6;
- } if ((h * 2) < 1) {
- return q;
- } if ((h * 3) < 2) {
- return p + (q - p) * ((2 / 3) - h) * 6;
- }
- return p;
- },
- HSLtoRGB(h, s, l, a) {
- if (s < 0) {
- s = 0;
- }
- let q;
- if (l <= 0.5) {
- q = l * (1 + s);
- } else {
- q = l + s - (l * s);
- }
-
- const p = 2 * l - q;
-
- const tr = h + (1 / 3);
- const tg = h;
- const tb = h - (1 / 3);
-
- const r = Math.round(this.HueToRGB(p, q, tr) * 255);
- const g = Math.round(this.HueToRGB(p, q, tg) * 255);
- const b = Math.round(this.HueToRGB(p, q, tb) * 255);
- return [r, g, b, this._sanitizeNumber(a)];
- },
- toString(format) {
- format = format || 'rgba';
- switch (format) {
- case 'rgb':
- {
- var rgb = this.toRGB();
- return `rgb(${rgb.r},${rgb.g},${rgb.b})`;
- }
- break;
- case 'rgba':
- {
- var rgb = this.toRGB();
- return `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`;
- }
- break;
- case 'hsl':
- {
- var hsl = this.toHSL();
- return `hsl(${Math.round(hsl.h * 360)},${Math.round(hsl.s * 100)}%,${Math.round(hsl.l * 100)}%)`;
- }
- break;
- case 'hsla':
- {
- var hsl = this.toHSL();
- return `hsla(${Math.round(hsl.h * 360)},${Math.round(hsl.s * 100)}%,${Math.round(hsl.l * 100)}%,${hsl.a})`;
- }
- break;
- case 'hex':
- {
- return this.toHex();
- }
- break;
- default:
- {
- return false;
- }
- break;
- }
- },
- // a set of RE's that can match strings and generate color tuples.
- // from John Resig color plugin
- // https://github.com/jquery/jquery-color/
- stringParsers: [{
- re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
- format: 'hex',
- parse(execResult) {
- return [
- parseInt(execResult[1], 16),
- parseInt(execResult[2], 16),
- parseInt(execResult[3], 16),
- 1,
- ];
- },
- }, {
- re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
- format: 'hex',
- parse(execResult) {
- return [
- parseInt(execResult[1] + execResult[1], 16),
- parseInt(execResult[2] + execResult[2], 16),
- parseInt(execResult[3] + execResult[3], 16),
- 1,
- ];
- },
- }, {
- re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,
- format: 'rgb',
- parse(execResult) {
- return [
- execResult[1],
- execResult[2],
- execResult[3],
- 1,
- ];
- },
- }, {
- re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
- format: 'rgb',
- parse(execResult) {
- return [
- 2.55 * execResult[1],
- 2.55 * execResult[2],
- 2.55 * execResult[3],
- 1,
- ];
- },
- }, {
- re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'rgba',
- parse(execResult) {
- return [
- execResult[1],
- execResult[2],
- execResult[3],
- execResult[4],
- ];
- },
- }, {
- re: /rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'rgba',
- parse(execResult) {
- return [
- 2.55 * execResult[1],
- 2.55 * execResult[2],
- 2.55 * execResult[3],
- execResult[4],
- ];
- },
- }, {
- re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
- format: 'hsl',
- parse(execResult) {
- return [
- execResult[1] / 360,
- execResult[2] / 100,
- execResult[3] / 100,
- execResult[4],
- ];
- },
- }, {
- re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'hsla',
- parse(execResult) {
- return [
- execResult[1] / 360,
- execResult[2] / 100,
- execResult[3] / 100,
- execResult[4],
- ];
- },
- }, {
- // predefined color name
- re: /^([a-z]{3,})$/,
- format: 'alias',
- parse(execResult) {
- const hexval = this.colorNameToHex(execResult[0]) || '#000000';
- const match = this.stringParsers[0].re.exec(hexval);
- const values = match && this.stringParsers[0].parse.apply(this, [match]);
- return values;
- },
- }],
- colorNameToHex(name) {
- // 140 predefined colors from the HTML Colors spec
- const colors = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#00ffff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000000',
- blanchedalmond: '#ffebcd',
- blue: '#0000ff',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#00ffff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#ff00ff',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- 'indianred ': '#cd5c5c',
- 'indigo ': '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgrey: '#d3d3d3',
- lightgreen: '#90ee90',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#00ff00',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370d8',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#d87093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- red: '#ff0000',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#ffffff',
- whitesmoke: '#f5f5f5',
- yellow: '#ffff00',
- yellowgreen: '#9acd32',
- };
-
- if (typeof colors[name.toLowerCase()] !== 'undefined') {
- return colors[name.toLowerCase()];
- }
- return false;
- },
- };
-
- const defaults = {
- horizontal: false, // horizontal mode layout ?
- inline: false, // forces to show the colorpicker as an inline element
- color: false, // forces a color
- format: false, // forces a format
- input: 'input', // children input selector
- container: false, // container selector
- component: '.add-on, .input-group-addon', // children component selector
- sliders: {
- saturation: {
- maxLeft: 100,
- maxTop: 100,
- callLeft: 'setSaturation',
- callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 0,
- maxTop: 100,
- callLeft: false,
- callTop: 'setHue',
- },
- alpha: {
- maxLeft: 0,
- maxTop: 100,
- callLeft: false,
- callTop: 'setAlpha',
- },
- },
- slidersHorz: {
- saturation: {
- maxLeft: 100,
- maxTop: 100,
- callLeft: 'setSaturation',
- callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 100,
- maxTop: 0,
- callLeft: 'setHue',
- callTop: false,
- },
- alpha: {
- maxLeft: 100,
- maxTop: 0,
- callLeft: 'setAlpha',
- callTop: false,
- },
- },
- template: '',
- };
-
- const Colorpicker = function (element, options) {
- this.element = $(element).addClass('colorpicker-element');
- this.options = $.extend({}, defaults, this.element.data(), options);
- this.component = this.options.component;
- this.component = (this.component !== false) ? this.element.find(this.component) : false;
- if (this.component && (this.component.length === 0)) {
- this.component = false;
- }
- this.container = (this.options.container === true) ? this.element : this.options.container;
- this.container = (this.container !== false) ? $(this.container) : false;
-
- // Is the element an input? Should we search inside for any input?
- this.input = this.element.is('input') ? this.element : (this.options.input
- ? this.element.find(this.options.input) : false);
- if (this.input && (this.input.length === 0)) {
- this.input = false;
- }
- // Set HSB color
- this.color = new Color(this.options.color !== false ? this.options.color : this.getValue());
- this.format = this.options.format !== false ? this.options.format : this.color.origFormat;
-
- // Setup picker
- this.picker = $(this.options.template);
- if (this.options.inline) {
- this.picker.addClass('colorpicker-inline colorpicker-visible');
- } else {
- this.picker.addClass('colorpicker-hidden');
- }
- if (this.options.horizontal) {
- this.picker.addClass('colorpicker-horizontal');
- }
- if (this.format === 'rgba' || this.format === 'hsla') {
- this.picker.addClass('colorpicker-with-alpha');
- }
- this.picker.on('mousedown.colorpicker', $.proxy(this.mousedown, this));
- this.picker.appendTo(this.container ? this.container : $('body'));
-
- // Bind events
- if (this.input !== false) {
- this.input.on({
- 'keyup.colorpicker': $.proxy(this.keyup, this),
- });
- if (this.component === false) {
- this.element.on({
- 'focus.colorpicker': $.proxy(this.show, this),
- });
- }
- if (this.options.inline === false) {
- this.element.on({
- 'focusout.colorpicker': $.proxy(this.hide, this),
- });
- }
- }
-
- if (this.component !== false) {
- this.component.on({
- 'click.colorpicker': $.proxy(this.show, this),
- });
- }
-
- if ((this.input === false) && (this.component === false)) {
- this.element.on({
- 'click.colorpicker': $.proxy(this.show, this),
- });
- }
- this.update();
-
- $($.proxy(function () {
- this.element.trigger('create');
- }, this));
- };
-
- Colorpicker.version = '2.0.0-beta';
-
- Colorpicker.Color = Color;
-
- Colorpicker.prototype = {
- constructor: Colorpicker,
- destroy() {
- this.picker.remove();
- this.element.removeData('colorpicker').off('.colorpicker');
- if (this.input !== false) {
- this.input.off('.colorpicker');
- }
- if (this.component !== false) {
- this.component.off('.colorpicker');
- }
- this.element.removeClass('colorpicker-element');
- this.element.trigger({
- type: 'destroy',
- });
- },
- reposition() {
- if (this.options.inline !== false) {
- return false;
- }
- const offset = this.component ? this.component.offset() : this.element.offset();
- this.picker.css({
- top: offset.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()),
- left: offset.left,
- });
- },
- show(e) {
- if (this.isDisabled()) {
- return false;
- }
- this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');
- this.reposition();
- $(window).on('resize.colorpicker', $.proxy(this.reposition, this));
- if (!this.hasInput() && e) {
- if (e.stopPropagation && e.preventDefault) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
- if (this.options.inline === false) {
- $(window.document).on({
- 'mousedown.colorpicker': $.proxy(this.hide, this),
- });
- }
- this.element.trigger({
- type: 'showPicker',
- color: this.color,
- });
- },
- hide() {
- this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');
- $(window).off('resize.colorpicker', this.reposition);
- $(document).off({
- 'mousedown.colorpicker': this.hide,
- });
- this.update();
- this.element.trigger({
- type: 'hidePicker',
- color: this.color,
- });
- },
- updateData(val) {
- val = val || this.color.toString(this.format);
- this.element.data('color', val);
- return val;
- },
- updateInput(val) {
- val = val || this.color.toString(this.format);
- if (this.input !== false) {
- this.input.prop('value', val);
- }
- return val;
- },
- updatePicker(val) {
- if (val !== undefined) {
- this.color = new Color(val);
- }
- let sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;
- const icns = this.picker.find('i');
- if (icns.length === 0) {
- return;
- }
- if (this.options.horizontal === false) {
- sl = this.options.sliders;
- icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()
- .eq(2)
- .css('top', sl.alpha.maxTop * (1 - this.color.value.a));
- } else {
- sl = this.options.slidersHorz;
- icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()
- .eq(2)
- .css('left', sl.alpha.maxLeft * (1 - this.color.value.a));
- }
- icns.eq(0).css({
- top: sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,
- left: this.color.value.s * sl.saturation.maxLeft,
- });
- this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));
- this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex());
- this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format));
- return val;
- },
- updateComponent(val) {
- val = val || this.color.toString(this.format);
- if (this.component !== false) {
- const icn = this.component.find('i').eq(0);
- if (icn.length > 0) {
- icn.css({
- backgroundColor: val,
- });
- } else {
- this.component.css({
- backgroundColor: val,
- });
- }
- }
- return val;
- },
- update(force) {
- const val = this.updateComponent();
- if ((this.getValue(false) !== false) || (force === true)) {
- // Update input/data only if the current value is not blank
- this.updateInput(val);
- this.updateData(val);
- }
- this.updatePicker();
- return val;
- },
- setValue(val) { // set color manually
- this.color = new Color(val);
- this.update();
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- value: val,
- });
- },
- getValue(defaultValue) {
- defaultValue = (defaultValue === undefined) ? '#000000' : defaultValue;
- let val;
- if (this.hasInput()) {
- val = this.input.val();
- } else {
- val = this.element.data('color');
- }
- if ((val === undefined) || (val === '') || (val === null)) {
- // if not defined or empty, return default
- val = defaultValue;
- }
- return val;
- },
- hasInput() {
- return (this.input !== false);
- },
- isDisabled() {
- if (this.hasInput()) {
- return (this.input.prop('disabled') === true);
- }
- return false;
- },
- disable() {
- if (this.hasInput()) {
- this.input.prop('disabled', true);
- return true;
- }
- return false;
- },
- enable() {
- if (this.hasInput()) {
- this.input.prop('disabled', false);
- return true;
- }
- return false;
- },
- currentSlider: null,
- mousePointer: {
- left: 0,
- top: 0,
- },
- mousedown(e) {
- e.stopPropagation();
- e.preventDefault();
-
- const target = $(e.target);
-
- // detect the slider and set the limits and callbacks
- const zone = target.closest('div');
- const sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;
- if (!zone.is('.colorpicker')) {
- if (zone.is('.colorpicker-saturation')) {
- this.currentSlider = $.extend({}, sl.saturation);
- } else if (zone.is('.colorpicker-hue')) {
- this.currentSlider = $.extend({}, sl.hue);
- } else if (zone.is('.colorpicker-alpha')) {
- this.currentSlider = $.extend({}, sl.alpha);
- } else {
- return false;
- }
- const offset = zone.offset();
- // reference to guide's style
- this.currentSlider.guide = zone.find('i')[0].style;
- this.currentSlider.left = e.pageX - offset.left;
- this.currentSlider.top = e.pageY - offset.top;
- this.mousePointer = {
- left: e.pageX,
- top: e.pageY,
- };
- // trigger mousemove to move the guide to the current position
- $(document).on({
- 'mousemove.colorpicker': $.proxy(this.mousemove, this),
- 'mouseup.colorpicker': $.proxy(this.mouseup, this),
- }).trigger('mousemove');
- }
- return false;
- },
- mousemove(e) {
- e.stopPropagation();
- e.preventDefault();
- const left = Math.max(
- 0,
- Math.min(
- this.currentSlider.maxLeft,
- this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left),
- ),
- );
- const top = Math.max(
- 0,
- Math.min(
- this.currentSlider.maxTop,
- this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top),
- ),
- );
- this.currentSlider.guide.left = `${left}px`;
- this.currentSlider.guide.top = `${top}px`;
- if (this.currentSlider.callLeft) {
- this.color[this.currentSlider.callLeft].call(this.color, left / 100);
- }
- if (this.currentSlider.callTop) {
- this.color[this.currentSlider.callTop].call(this.color, top / 100);
- }
- this.update(true);
-
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- });
- return false;
- },
- mouseup(e) {
- e.stopPropagation();
- e.preventDefault();
- $(document).off({
- 'mousemove.colorpicker': this.mousemove,
- 'mouseup.colorpicker': this.mouseup,
- });
- return false;
- },
- keyup(e) {
- if ((e.keyCode === 38)) {
- if (this.color.value.a < 1) {
- this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;
- }
- this.update(true);
- } else if ((e.keyCode === 40)) {
- if (this.color.value.a > 0) {
- this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;
- }
- this.update(true);
- } else {
- var val = this.input.val();
- this.color = new Color(val);
- if (this.getValue(false) !== false) {
- this.updateData();
- this.updateComponent();
- this.updatePicker();
- }
- }
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- value: val,
- });
- },
- };
-
- $.colorpicker = Colorpicker;
-
- $.fn.colorpicker = function (option) {
- const pickerArgs = arguments;
-
- return this.each(function () {
- const $this = $(this);
- const inst = $this.data('colorpicker');
- const options = ((typeof option === 'object') ? option : {});
- if ((!inst) && (typeof option !== 'string')) {
- $this.data('colorpicker', new Colorpicker(this, options));
- } else if (typeof option === 'string') {
- inst[option].apply(inst, Array.prototype.slice.call(pickerArgs, 1));
- }
- });
- };
-
- $.fn.colorpicker.constructor = Colorpicker;
-}(window.jQuery));
diff --git a/libraries/bootstrap/js/bootstrap-colorpicker.min.js b/libraries/bootstrap/js/bootstrap-colorpicker.min.js
deleted file mode 100644
index 9289449f..00000000
--- a/libraries/bootstrap/js/bootstrap-colorpicker.min.js
+++ /dev/null
@@ -1,103 +0,0 @@
-!(function (a) {
- const b = function (a) {
- this.value = {
- h: 0, s: 0, b: 0, a: 1,
- }, this.origFormat = null, a && (void 0 !== a.toLowerCase ? this.setColor(a) : void 0 !== a.h && (this.value = a));
- }; b.prototype = {
- constructor: b,
- _sanitizeNumber(a) { return typeof a === 'number' ? a : isNaN(a) || a === null || a === '' || void 0 === a ? 1 : void 0 !== a.toLowerCase ? parseFloat(a) : 1; },
- setColor(a) {
- a = a.toLowerCase(), this.value = this.stringToHSB(a) || {
- h: 0, s: 0, b: 0, a: 1,
- };
- },
- stringToHSB(b) { b = b.toLowerCase(); const c = this; let d = !1; return a.each(this.stringParsers, (a, e) => { const f = e.re.exec(b); const g = f && e.parse.apply(c, [f]); const h = e.format || 'rgba'; return g ? (d = h.match(/hsla?/) ? c.RGBtoHSB.apply(c, c.HSLtoRGB.apply(c, g)) : c.RGBtoHSB.apply(c, g), c.origFormat = h, !1) : !0; }), d; },
- setHue(a) { this.value.h = 1 - a; },
- setSaturation(a) { this.value.s = a; },
- setBrightness(a) { this.value.b = 1 - a; },
- setAlpha(a) { this.value.a = parseInt(100 * (1 - a), 10) / 100; },
- toRGB(a, b, c, d) {
- a = a || this.value.h, b = b || this.value.s, c = c || this.value.b, d = d || this.value.a; let e; let f; let g; let h; let i; let j; let k; let l; switch (a && void 0 === b && void 0 === c && (b = a.s, c = a.v, a = a.h), h = Math.floor(6 * a), i = 6 * a - h, j = c * (1 - b), k = c * (1 - i * b), l = c * (1 - (1 - i) * b), h % 6) { case 0: e = c, f = l, g = j; break; case 1: e = k, f = c, g = j; break; case 2: e = j, f = c, g = l; break; case 3: e = j, f = k, g = c; break; case 4: e = l, f = j, g = c; break; case 5: e = c, f = j, g = k; } return {
- r: Math.floor(255 * e), g: Math.floor(255 * f), b: Math.floor(255 * g), a: d,
- };
- },
- toHex(a, b, c, d) { const e = this.toRGB(a, b, c, d); return `#${(1 << 24 | parseInt(e.r) << 16 | parseInt(e.g) << 8 | parseInt(e.b)).toString(16).substr(1)}`; },
- toHSL(a, b, c, d) {
- a = a || this.value.h, b = b || this.value.s, c = c || this.value.b, d = d || this.value.a; const e = a; let f = (2 - b) * c; let g = b * c; return g /= f > 0 && f <= 1 ? f : 2 - f, f /= 2, g > 1 && (g = 1), {
- h: isNaN(e) ? 0 : e, s: isNaN(g) ? 0 : g, l: isNaN(f) ? 0 : f, a: isNaN(d) ? 0 : d,
- };
- },
- RGBtoHSB(a, b, c, d) {
- a /= 255, b /= 255, c /= 255; let e; let f; let g; let h; return g = Math.max(a, b, c), h = g - Math.min(a, b, c), e = h === 0 ? null : g === a ? (b - c) / h : g === b ? (c - a) / h + 2 : (a - b) / h + 4, e = (e + 360) % 6 * 60 / 360, f = h === 0 ? 0 : h / g, {
- h: this._sanitizeNumber(e), s: f, b: g, a: this._sanitizeNumber(d),
- };
- },
- HueToRGB(a, b, c) { return c < 0 ? c += 1 : c > 1 && (c -= 1), 6 * c < 1 ? a + (b - a) * c * 6 : 2 * c < 1 ? b : 3 * c < 2 ? a + (b - a) * (2 / 3 - c) * 6 : a; },
- HSLtoRGB(a, b, c, d) { b < 0 && (b = 0); let e; e = c <= 0.5 ? c * (1 + b) : c + b - c * b; const f = 2 * c - e; const g = a + 1 / 3; const h = a; const i = a - 1 / 3; const j = Math.round(255 * this.HueToRGB(f, e, g)); const k = Math.round(255 * this.HueToRGB(f, e, h)); const l = Math.round(255 * this.HueToRGB(f, e, i)); return [j, k, l, this._sanitizeNumber(d)]; },
- toString(a) { switch (a = a || 'rgba') { case 'rgb': var b = this.toRGB(); return `rgb(${b.r},${b.g},${b.b})`; case 'rgba': var b = this.toRGB(); return `rgba(${b.r},${b.g},${b.b},${b.a})`; case 'hsl': var c = this.toHSL(); return `hsl(${Math.round(360 * c.h)},${Math.round(100 * c.s)}%,${Math.round(100 * c.l)}%)`; case 'hsla': var c = this.toHSL(); return `hsla(${Math.round(360 * c.h)},${Math.round(100 * c.s)}%,${Math.round(100 * c.l)}%,${c.a})`; case 'hex': return this.toHex(); default: return !1; } },
- stringParsers: [{ re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, format: 'hex', parse(a) { return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16), 1]; } }, { re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/, format: 'hex', parse(a) { return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16), 1]; } }, { re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/, format: 'rgb', parse(a) { return [a[1], a[2], a[3], 1]; } }, { re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/, format: 'rgb', parse(a) { return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], 1]; } }, { re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, format: 'rgba', parse(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*)?\)/, format: 'rgba', parse(a) { return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], a[4]]; } }, { re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/, format: 'hsl', parse(a) { return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]; } }, { re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, format: 'hsla', parse(a) { return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]; } }, { re: /^([a-z]{3,})$/, format: 'alias', parse(a) { const b = this.colorNameToHex(a[0]) || '#000000'; const c = this.stringParsers[0].re.exec(b); const d = c && this.stringParsers[0].parse.apply(this, [c]); return d; } }],
- colorNameToHex(a) {
- const b = {
- aliceblue: '#f0f8ff', antiquewhite: '#faebd7', aqua: '#00ffff', aquamarine: '#7fffd4', azure: '#f0ffff', beige: '#f5f5dc', bisque: '#ffe4c4', black: '#000000', blanchedalmond: '#ffebcd', blue: '#0000ff', blueviolet: '#8a2be2', brown: '#a52a2a', burlywood: '#deb887', cadetblue: '#5f9ea0', chartreuse: '#7fff00', chocolate: '#d2691e', coral: '#ff7f50', cornflowerblue: '#6495ed', cornsilk: '#fff8dc', crimson: '#dc143c', cyan: '#00ffff', darkblue: '#00008b', darkcyan: '#008b8b', darkgoldenrod: '#b8860b', darkgray: '#a9a9a9', darkgreen: '#006400', darkkhaki: '#bdb76b', darkmagenta: '#8b008b', darkolivegreen: '#556b2f', darkorange: '#ff8c00', darkorchid: '#9932cc', darkred: '#8b0000', darksalmon: '#e9967a', darkseagreen: '#8fbc8f', darkslateblue: '#483d8b', darkslategray: '#2f4f4f', darkturquoise: '#00ced1', darkviolet: '#9400d3', deeppink: '#ff1493', deepskyblue: '#00bfff', dimgray: '#696969', dodgerblue: '#1e90ff', firebrick: '#b22222', floralwhite: '#fffaf0', forestgreen: '#228b22', fuchsia: '#ff00ff', gainsboro: '#dcdcdc', ghostwhite: '#f8f8ff', gold: '#ffd700', goldenrod: '#daa520', gray: '#808080', green: '#008000', greenyellow: '#adff2f', honeydew: '#f0fff0', hotpink: '#ff69b4', 'indianred ': '#cd5c5c', 'indigo ': '#4b0082', ivory: '#fffff0', khaki: '#f0e68c', lavender: '#e6e6fa', lavenderblush: '#fff0f5', lawngreen: '#7cfc00', lemonchiffon: '#fffacd', lightblue: '#add8e6', lightcoral: '#f08080', lightcyan: '#e0ffff', lightgoldenrodyellow: '#fafad2', lightgrey: '#d3d3d3', lightgreen: '#90ee90', lightpink: '#ffb6c1', lightsalmon: '#ffa07a', lightseagreen: '#20b2aa', lightskyblue: '#87cefa', lightslategray: '#778899', lightsteelblue: '#b0c4de', lightyellow: '#ffffe0', lime: '#00ff00', limegreen: '#32cd32', linen: '#faf0e6', magenta: '#ff00ff', maroon: '#800000', mediumaquamarine: '#66cdaa', mediumblue: '#0000cd', mediumorchid: '#ba55d3', mediumpurple: '#9370d8', mediumseagreen: '#3cb371', mediumslateblue: '#7b68ee', mediumspringgreen: '#00fa9a', mediumturquoise: '#48d1cc', mediumvioletred: '#c71585', midnightblue: '#191970', mintcream: '#f5fffa', mistyrose: '#ffe4e1', moccasin: '#ffe4b5', navajowhite: '#ffdead', navy: '#000080', oldlace: '#fdf5e6', olive: '#808000', olivedrab: '#6b8e23', orange: '#ffa500', orangered: '#ff4500', orchid: '#da70d6', palegoldenrod: '#eee8aa', palegreen: '#98fb98', paleturquoise: '#afeeee', palevioletred: '#d87093', papayawhip: '#ffefd5', peachpuff: '#ffdab9', peru: '#cd853f', pink: '#ffc0cb', plum: '#dda0dd', powderblue: '#b0e0e6', purple: '#800080', red: '#ff0000', rosybrown: '#bc8f8f', royalblue: '#4169e1', saddlebrown: '#8b4513', salmon: '#fa8072', sandybrown: '#f4a460', seagreen: '#2e8b57', seashell: '#fff5ee', sienna: '#a0522d', silver: '#c0c0c0', skyblue: '#87ceeb', slateblue: '#6a5acd', slategray: '#708090', snow: '#fffafa', springgreen: '#00ff7f', steelblue: '#4682b4', tan: '#d2b48c', teal: '#008080', thistle: '#d8bfd8', tomato: '#ff6347', turquoise: '#40e0d0', violet: '#ee82ee', wheat: '#f5deb3', white: '#ffffff', whitesmoke: '#f5f5f5', yellow: '#ffff00', yellowgreen: '#9acd32',
- }; return typeof b[a.toLowerCase()] !== 'undefined' ? b[a.toLowerCase()] : !1;
- },
- }; const c = {
- horizontal: !1,
- inline: !1,
- color: !1,
- format: !1,
- input: 'input',
- container: !1,
- component: '.add-on, .input-group-addon',
- sliders: {
- saturation: {
- maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 0, maxTop: 100, callLeft: !1, callTop: 'setHue',
- },
- alpha: {
- maxLeft: 0, maxTop: 100, callLeft: !1, callTop: 'setAlpha',
- },
- },
- slidersHorz: {
- saturation: {
- maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 100, maxTop: 0, callLeft: 'setHue', callTop: !1,
- },
- alpha: {
- maxLeft: 100, maxTop: 0, callLeft: 'setAlpha', callTop: !1,
- },
- },
- template: '',
- }; const d = function (d, e) { this.element = a(d).addClass('colorpicker-element'), this.options = a.extend({}, c, this.element.data(), e), this.component = this.options.component, this.component = this.component !== !1 ? this.element.find(this.component) : !1, this.component && this.component.length === 0 && (this.component = !1), this.container = this.options.container === !0 ? this.element : this.options.container, this.container = this.container !== !1 ? a(this.container) : !1, this.input = this.element.is('input') ? this.element : this.options.input ? this.element.find(this.options.input) : !1, this.input && this.input.length === 0 && (this.input = !1), this.color = new b(this.options.color !== !1 ? this.options.color : this.getValue()), this.format = this.options.format !== !1 ? this.options.format : this.color.origFormat, this.picker = a(this.options.template), this.options.inline ? this.picker.addClass('colorpicker-inline colorpicker-visible') : this.picker.addClass('colorpicker-hidden'), this.options.horizontal && this.picker.addClass('colorpicker-horizontal'), (this.format === 'rgba' || this.format === 'hsla') && this.picker.addClass('colorpicker-with-alpha'), this.picker.on('mousedown.colorpicker', a.proxy(this.mousedown, this)), this.picker.appendTo(this.container ? this.container : a('body')), this.input !== !1 && (this.input.on({ 'keyup.colorpicker': a.proxy(this.keyup, this) }), this.component === !1 && this.element.on({ 'focus.colorpicker': a.proxy(this.show, this) }), this.options.inline === !1 && this.element.on({ 'focusout.colorpicker': a.proxy(this.hide, this) })), this.component !== !1 && this.component.on({ 'click.colorpicker': a.proxy(this.show, this) }), this.input === !1 && this.component === !1 && this.element.on({ 'click.colorpicker': a.proxy(this.show, this) }), this.update(), a(a.proxy(function () { this.element.trigger('create'); }, this)); }; d.version = '2.0.0-beta', d.Color = b, d.prototype = {
- constructor: d,
- destroy() { this.picker.remove(), this.element.removeData('colorpicker').off('.colorpicker'), this.input !== !1 && this.input.off('.colorpicker'), this.component !== !1 && this.component.off('.colorpicker'), this.element.removeClass('colorpicker-element'), this.element.trigger({ type: 'destroy' }); },
- reposition() { if (this.options.inline !== !1) return !1; const a = this.component ? this.component.offset() : this.element.offset(); this.picker.css({ top: a.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()), left: a.left }); },
- show(b) { return this.isDisabled() ? !1 : (this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden'), this.reposition(), a(window).on('resize.colorpicker', a.proxy(this.reposition, this)), !this.hasInput() && b && b.stopPropagation && b.preventDefault && (b.stopPropagation(), b.preventDefault()), this.options.inline === !1 && a(window.document).on({ 'mousedown.colorpicker': a.proxy(this.hide, this) }), this.element.trigger({ type: 'showPicker', color: this.color }), void 0); },
- hide() { this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible'), a(window).off('resize.colorpicker', this.reposition), a(document).off({ 'mousedown.colorpicker': this.hide }), this.update(), this.element.trigger({ type: 'hidePicker', color: this.color }); },
- updateData(a) { return a = a || this.color.toString(this.format), this.element.data('color', a), a; },
- updateInput(a) { return a = a || this.color.toString(this.format), this.input !== !1 && this.input.prop('value', a), a; },
- updatePicker(a) {
- void 0 !== a && (this.color = new b(a)); let c = this.options.horizontal === !1 ? this.options.sliders : this.options.slidersHorz; const d = this.picker.find('i'); return d.length !== 0 ? (this.options.horizontal === !1 ? (c = this.options.sliders, d.eq(1).css('top', c.hue.maxTop * (1 - this.color.value.h)).end().eq(2)
- .css('top', c.alpha.maxTop * (1 - this.color.value.a))) : (c = this.options.slidersHorz, d.eq(1).css('left', c.hue.maxLeft * (1 - this.color.value.h)).end().eq(2)
- .css('left', c.alpha.maxLeft * (1 - this.color.value.a))), d.eq(0).css({ top: c.saturation.maxTop - this.color.value.b * c.saturation.maxTop, left: this.color.value.s * c.saturation.maxLeft }), this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1)), this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex()), this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format)), a) : void 0;
- },
- updateComponent(a) { if (a = a || this.color.toString(this.format), this.component !== !1) { const b = this.component.find('i').eq(0); b.length > 0 ? b.css({ backgroundColor: a }) : this.component.css({ backgroundColor: a }); } return a; },
- update(a) { const b = this.updateComponent(); return (this.getValue(!1) !== !1 || a === !0) && (this.updateInput(b), this.updateData(b)), this.updatePicker(), b; },
- setValue(a) { this.color = new b(a), this.update(), this.element.trigger({ type: 'changeColor', color: this.color, value: a }); },
- getValue(a) { a = void 0 === a ? '#000000' : a; let b; return b = this.hasInput() ? this.input.val() : this.element.data('color'), (void 0 === b || b === '' || b === null) && (b = a), b; },
- hasInput() { return this.input !== !1; },
- isDisabled() { return this.hasInput() ? this.input.prop('disabled') === !0 : !1; },
- disable() { return this.hasInput() ? (this.input.prop('disabled', !0), !0) : !1; },
- enable() { return this.hasInput() ? (this.input.prop('disabled', !1), !0) : !1; },
- currentSlider: null,
- mousePointer: { left: 0, top: 0 },
- mousedown(b) { b.stopPropagation(), b.preventDefault(); const c = a(b.target); const d = c.closest('div'); const e = this.options.horizontal ? this.options.slidersHorz : this.options.sliders; if (!d.is('.colorpicker')) { if (d.is('.colorpicker-saturation')) this.currentSlider = a.extend({}, e.saturation); else if (d.is('.colorpicker-hue')) this.currentSlider = a.extend({}, e.hue); else { if (!d.is('.colorpicker-alpha')) return !1; this.currentSlider = a.extend({}, e.alpha); } const f = d.offset(); this.currentSlider.guide = d.find('i')[0].style, this.currentSlider.left = b.pageX - f.left, this.currentSlider.top = b.pageY - f.top, this.mousePointer = { left: b.pageX, top: b.pageY }, a(document).on({ 'mousemove.colorpicker': a.proxy(this.mousemove, this), 'mouseup.colorpicker': a.proxy(this.mouseup, this) }).trigger('mousemove'); } return !1; },
- mousemove(a) { a.stopPropagation(), a.preventDefault(); const b = Math.max(0, Math.min(this.currentSlider.maxLeft, this.currentSlider.left + ((a.pageX || this.mousePointer.left) - this.mousePointer.left))); const c = Math.max(0, Math.min(this.currentSlider.maxTop, this.currentSlider.top + ((a.pageY || this.mousePointer.top) - this.mousePointer.top))); return this.currentSlider.guide.left = `${b}px`, this.currentSlider.guide.top = `${c}px`, this.currentSlider.callLeft && this.color[this.currentSlider.callLeft].call(this.color, b / 100), this.currentSlider.callTop && this.color[this.currentSlider.callTop].call(this.color, c / 100), this.update(!0), this.element.trigger({ type: 'changeColor', color: this.color }), !1; },
- mouseup(b) { return b.stopPropagation(), b.preventDefault(), a(document).off({ 'mousemove.colorpicker': this.mousemove, 'mouseup.colorpicker': this.mouseup }), !1; },
- keyup(a) { if (a.keyCode === 38) this.color.value.a < 1 && (this.color.value.a = Math.round(100 * (this.color.value.a + 0.01)) / 100), this.update(!0); else if (a.keyCode === 40) this.color.value.a > 0 && (this.color.value.a = Math.round(100 * (this.color.value.a - 0.01)) / 100), this.update(!0); else { var c = this.input.val(); this.color = new b(c), this.getValue(!1) !== !1 && (this.updateData(), this.updateComponent(), this.updatePicker()); } this.element.trigger({ type: 'changeColor', color: this.color, value: c }); },
- }, a.colorpicker = d, a.fn.colorpicker = function (b) { const c = arguments; return this.each(function () { const e = a(this); const f = e.data('colorpicker'); const g = typeof b === 'object' ? b : {}; f || typeof b === 'string' ? typeof b === 'string' && f[b].apply(f, Array.prototype.slice.call(c, 1)) : e.data('colorpicker', new d(this, g)); }); }, a.fn.colorpicker.constructor = d;
-}(window.jQuery));
diff --git a/packages/mindplot/src/components/DesignerBuilder.js b/packages/mindplot/src/components/DesignerBuilder.js
index 5e0fd389..a3410bae 100644
--- a/packages/mindplot/src/components/DesignerBuilder.js
+++ b/packages/mindplot/src/components/DesignerBuilder.js
@@ -23,9 +23,6 @@ import Menu from './widget/Menu';
import $notifyModal from './widget/ModalDialogNotifier';
import { $msg } from './Messages';
-global.jQuery = $;
-global.$ = $;
-
let designer = null;
export function buildDesigner(options) {
@@ -105,13 +102,6 @@ export async function loadOptions(jsonConf, options) {
dataType: 'json',
method: 'get',
});
-
+
return { ...result, ...buildOptions(options) };
}
-
-export function loadExample(exampleFn) {
- $(() => {
- // eslint-disable-next-line import/no-extraneous-dependencies
- import('@libraries/bootstrap').then(exampleFn);
- });
-}
diff --git a/packages/mindplot/src/index.js b/packages/mindplot/src/index.js
index 840304fd..dcd61020 100644
--- a/packages/mindplot/src/index.js
+++ b/packages/mindplot/src/index.js
@@ -1,3 +1,5 @@
+/* eslint-disable import/no-unresolved */
+import jquery from 'jquery';
import * as DesignerBuilder from './components/DesignerBuilder';
import Mindmap from './components/model/Mindmap';
import PersistenceManager from './components/PersistenceManager';
@@ -6,6 +8,10 @@ import LocalStorageManager from './components/LocalStorageManager';
import Menu from './components/widget/Menu';
+// This hack is required to initialize Bootstrap. In future, this should be removed.
+global.jQuery = jquery;
+require('@libraries/bootstrap/js/bootstrap');
+
export {
Mindmap, PersistenceManager, Designer, LocalStorageManager, Menu, DesignerBuilder,
};
diff --git a/packages/mindplot/src/indexLoader.js b/packages/mindplot/src/indexLoader.js
index 50952d3e..d30078e5 100644
--- a/packages/mindplot/src/indexLoader.js
+++ b/packages/mindplot/src/indexLoader.js
@@ -1,23 +1,14 @@
/* eslint-disable vars-on-top */
import { $notify } from '@wisemapping/core-js';
-import jquery from 'jquery';
-
import { buildDesigner, buildOptions } from './components/DesignerBuilder';
import RESTPersistenceManager from './components/RestPersistenceManager';
import PersistenceManager from './components/PersistenceManager';
import LocalStorageManager from './components/LocalStorageManager';
-global.jQuery = jquery;
-var jQuery = jquery;
-console.log(jQuery);
-
-require('@libraries/bootstrap/js/bootstrap');
-require('@libraries/bootstrap/js/bootstrap-colorpicker');
-
// Configure designer options ...
-let p;
+let persistence;
if (!global.memoryPersistence && !global.readOnlyMode) {
- p = new RESTPersistenceManager(
+ persistence = new RESTPersistenceManager(
{
documentUrl: '/c/restful/maps/{id}/document',
revertUrl: '/c/restful/maps/{id}/history/latest',
@@ -29,21 +20,22 @@ if (!global.memoryPersistence && !global.readOnlyMode) {
} else {
// @todo: review ...
// persistenceManager = new LocalStorageManager('c/restful/maps/{id}${hid != null ? '/' : ''}${hid != null ? hid : ''}/document/xml${principal != null ? '' : '-pub'}", true);
- p = new LocalStorageManager('/c/restful/maps/{id}', true);
+ persistence = new LocalStorageManager('/c/restful/maps/{id}', true);
}
-const options = buildOptions({ persistenceManager: p, isReadOnly: global.isReadOnly || false });
-options.zoom = global.userOptions.zoom;
-
-// Set map id ...
-options.mapId = global.mapId;
+const options = buildOptions({
+ persistenceManager: persistence,
+ isReadOnly: global.readOnlyMode || false,
+ mapId: global.mapId,
+ zoom: global.userOptions.zoom,
+});
// Build designer ...
const designer = buildDesigner(options);
// Load map from XML file persisted on disk...
-const persistence = PersistenceManager.getInstance();
-const mindmap = persistence.load(global.mapId);
+const instance = PersistenceManager.getInstance();
+const mindmap = instance.load(global.mapId);
designer.loadMap(mindmap);
if (global.mindmapLocked) {
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.eot b/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.eot
deleted file mode 100644
index 4a4ca865..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.eot and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.svg b/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.svg
deleted file mode 100644
index e3e2dc73..00000000
--- a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.svg
+++ /dev/null
@@ -1,229 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.ttf b/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.ttf
deleted file mode 100644
index 67fa00bf..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.ttf and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.woff b/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.woff
deleted file mode 100644
index 8c54182a..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/fonts/glyphicons-halflings-regular.woff and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha-horizontal.png b/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha-horizontal.png
deleted file mode 100644
index d0a65c08..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha-horizontal.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha.png b/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha.png
deleted file mode 100644
index 38043f1c..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/alpha.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue-horizontal.png b/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue-horizontal.png
deleted file mode 100644
index a0d9add8..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue-horizontal.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue.png b/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue.png
deleted file mode 100644
index d89560e9..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/hue.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/saturation.png b/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/saturation.png
deleted file mode 100644
index 594ae50e..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/bootstrap-colorpicker/saturation.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/img/glyphicons-halflings-blue.png b/packages/mindplot/test/playground/map-render/bootstrap/img/glyphicons-halflings-blue.png
deleted file mode 100644
index a8dca0fc..00000000
Binary files a/packages/mindplot/test/playground/map-render/bootstrap/img/glyphicons-halflings-blue.png and /dev/null differ
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.js b/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.js
deleted file mode 100644
index f723b1fd..00000000
--- a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.js
+++ /dev/null
@@ -1,947 +0,0 @@
-/*!
- * Bootstrap Colorpicker
- * http://mjolnic.github.io/bootstrap-colorpicker/
- *
- * Originally written by (c) 2012 Stefan Petre
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0.txt
- *
- * @todo Update DOCS
- */
-(function ($) {
- // Color object
- const Color = function (val) {
- this.value = {
- h: 0,
- s: 0,
- b: 0,
- a: 1,
- };
- this.origFormat = null; // original string format
- if (val) {
- if (val.toLowerCase !== undefined) {
- this.setColor(val);
- } else if (val.h !== undefined) {
- this.value = val;
- }
- }
- };
-
- Color.prototype = {
- constructor: Color,
- _sanitizeNumber(val) {
- if (typeof val === 'number') {
- return val;
- }
- if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {
- return 1;
- }
- if (val.toLowerCase !== undefined) {
- return parseFloat(val);
- }
- return 1;
- },
- // parse a string to HSB
- setColor(strVal) {
- strVal = strVal.toLowerCase();
- this.value = this.stringToHSB(strVal) || {
- h: 0,
- s: 0,
- b: 0,
- a: 1,
- };
- },
- stringToHSB(strVal) {
- strVal = strVal.toLowerCase();
- const that = this;
- let result = false;
- $.each(this.stringParsers, (i, parser) => {
- const match = parser.re.exec(strVal);
- const values = match && parser.parse.apply(that, [match]);
- const format = parser.format || 'rgba';
- if (values) {
- if (format.match(/hsla?/)) {
- result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));
- } else {
- result = that.RGBtoHSB.apply(that, values);
- }
- that.origFormat = format;
- return false;
- }
- return true;
- });
- return result;
- },
- setHue(h) {
- this.value.h = 1 - h;
- },
- setSaturation(s) {
- this.value.s = s;
- },
- setBrightness(b) {
- this.value.b = 1 - b;
- },
- setAlpha(a) {
- this.value.a = parseInt((1 - a) * 100, 10) / 100;
- },
- toRGB(h, s, v, a) {
- h = h || this.value.h;
- s = s || this.value.s;
- v = v || this.value.b;
- a = a || this.value.a;
-
- let r; let g; let b; let i; let f; let p; let q; let
- t;
- if (h && s === undefined && v === undefined) {
- s = h.s, v = h.v, h = h.h;
- }
- i = Math.floor(h * 6);
- f = h * 6 - i;
- p = v * (1 - s);
- q = v * (1 - f * s);
- t = v * (1 - (1 - f) * s);
- switch (i % 6) {
- case 0:
- r = v, g = t, b = p;
- break;
- case 1:
- r = q, g = v, b = p;
- break;
- case 2:
- r = p, g = v, b = t;
- break;
- case 3:
- r = p, g = q, b = v;
- break;
- case 4:
- r = t, g = p, b = v;
- break;
- case 5:
- r = v, g = p, b = q;
- break;
- }
- return {
- r: Math.floor(r * 255),
- g: Math.floor(g * 255),
- b: Math.floor(b * 255),
- a,
- };
- },
- toHex(h, s, b, a) {
- const rgb = this.toRGB(h, s, b, a);
- return `#${((1 << 24) | (parseInt(rgb.r) << 16) | (parseInt(rgb.g) << 8) | parseInt(rgb.b)).toString(16).substr(1)}`;
- },
- toHSL(h, s, b, a) {
- h = h || this.value.h;
- s = s || this.value.s;
- b = b || this.value.b;
- a = a || this.value.a;
-
- const H = h;
- let L = (2 - s) * b;
- let S = s * b;
- if (L > 0 && L <= 1) {
- S /= L;
- } else {
- S /= 2 - L;
- }
- L /= 2;
- if (S > 1) {
- S = 1;
- }
- return {
- h: isNaN(H) ? 0 : H,
- s: isNaN(S) ? 0 : S,
- l: isNaN(L) ? 0 : L,
- a: isNaN(a) ? 0 : a,
- };
- },
- RGBtoHSB(r, g, b, a) {
- r /= 255;
- g /= 255;
- b /= 255;
-
- let H; let S; let V; let
- C;
- V = Math.max(r, g, b);
- C = V - Math.min(r, g, b);
- H = (C === 0 ? null
- : V === r ? (g - b) / C
- : V === g ? (b - r) / C + 2
- : (r - g) / C + 4
- );
- H = ((H + 360) % 6) * 60 / 360;
- S = C === 0 ? 0 : C / V;
- return {
- h: this._sanitizeNumber(H),
- s: S,
- b: V,
- a: this._sanitizeNumber(a),
- };
- },
- HueToRGB(p, q, h) {
- if (h < 0) {
- h += 1;
- } else if (h > 1) {
- h -= 1;
- }
- if ((h * 6) < 1) {
- return p + (q - p) * h * 6;
- } if ((h * 2) < 1) {
- return q;
- } if ((h * 3) < 2) {
- return p + (q - p) * ((2 / 3) - h) * 6;
- }
- return p;
- },
- HSLtoRGB(h, s, l, a) {
- if (s < 0) {
- s = 0;
- }
- let q;
- if (l <= 0.5) {
- q = l * (1 + s);
- } else {
- q = l + s - (l * s);
- }
-
- const p = 2 * l - q;
-
- const tr = h + (1 / 3);
- const tg = h;
- const tb = h - (1 / 3);
-
- const r = Math.round(this.HueToRGB(p, q, tr) * 255);
- const g = Math.round(this.HueToRGB(p, q, tg) * 255);
- const b = Math.round(this.HueToRGB(p, q, tb) * 255);
- return [r, g, b, this._sanitizeNumber(a)];
- },
- toString(format) {
- format = format || 'rgba';
- switch (format) {
- case 'rgb':
- {
- var rgb = this.toRGB();
- return `rgb(${rgb.r},${rgb.g},${rgb.b})`;
- }
- break;
- case 'rgba':
- {
- var rgb = this.toRGB();
- return `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`;
- }
- break;
- case 'hsl':
- {
- var hsl = this.toHSL();
- return `hsl(${Math.round(hsl.h * 360)},${Math.round(hsl.s * 100)}%,${Math.round(hsl.l * 100)}%)`;
- }
- break;
- case 'hsla':
- {
- var hsl = this.toHSL();
- return `hsla(${Math.round(hsl.h * 360)},${Math.round(hsl.s * 100)}%,${Math.round(hsl.l * 100)}%,${hsl.a})`;
- }
- break;
- case 'hex':
- {
- return this.toHex();
- }
- break;
- default:
- {
- return false;
- }
- break;
- }
- },
- // a set of RE's that can match strings and generate color tuples.
- // from John Resig color plugin
- // https://github.com/jquery/jquery-color/
- stringParsers: [{
- re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
- format: 'hex',
- parse(execResult) {
- return [
- parseInt(execResult[1], 16),
- parseInt(execResult[2], 16),
- parseInt(execResult[3], 16),
- 1,
- ];
- },
- }, {
- re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
- format: 'hex',
- parse(execResult) {
- return [
- parseInt(execResult[1] + execResult[1], 16),
- parseInt(execResult[2] + execResult[2], 16),
- parseInt(execResult[3] + execResult[3], 16),
- 1,
- ];
- },
- }, {
- re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,
- format: 'rgb',
- parse(execResult) {
- return [
- execResult[1],
- execResult[2],
- execResult[3],
- 1,
- ];
- },
- }, {
- re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
- format: 'rgb',
- parse(execResult) {
- return [
- 2.55 * execResult[1],
- 2.55 * execResult[2],
- 2.55 * execResult[3],
- 1,
- ];
- },
- }, {
- re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'rgba',
- parse(execResult) {
- return [
- execResult[1],
- execResult[2],
- execResult[3],
- execResult[4],
- ];
- },
- }, {
- re: /rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'rgba',
- parse(execResult) {
- return [
- 2.55 * execResult[1],
- 2.55 * execResult[2],
- 2.55 * execResult[3],
- execResult[4],
- ];
- },
- }, {
- re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
- format: 'hsl',
- parse(execResult) {
- return [
- execResult[1] / 360,
- execResult[2] / 100,
- execResult[3] / 100,
- execResult[4],
- ];
- },
- }, {
- re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- format: 'hsla',
- parse(execResult) {
- return [
- execResult[1] / 360,
- execResult[2] / 100,
- execResult[3] / 100,
- execResult[4],
- ];
- },
- }, {
- // predefined color name
- re: /^([a-z]{3,})$/,
- format: 'alias',
- parse(execResult) {
- const hexval = this.colorNameToHex(execResult[0]) || '#000000';
- const match = this.stringParsers[0].re.exec(hexval);
- const values = match && this.stringParsers[0].parse.apply(this, [match]);
- return values;
- },
- }],
- colorNameToHex(name) {
- // 140 predefined colors from the HTML Colors spec
- const colors = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#00ffff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000000',
- blanchedalmond: '#ffebcd',
- blue: '#0000ff',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#00ffff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#ff00ff',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- 'indianred ': '#cd5c5c',
- 'indigo ': '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgrey: '#d3d3d3',
- lightgreen: '#90ee90',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#00ff00',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370d8',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#d87093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- red: '#ff0000',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#ffffff',
- whitesmoke: '#f5f5f5',
- yellow: '#ffff00',
- yellowgreen: '#9acd32',
- };
-
- if (typeof colors[name.toLowerCase()] !== 'undefined') {
- return colors[name.toLowerCase()];
- }
- return false;
- },
- };
-
- const defaults = {
- horizontal: false, // horizontal mode layout ?
- inline: false, // forces to show the colorpicker as an inline element
- color: false, // forces a color
- format: false, // forces a format
- input: 'input', // children input selector
- container: false, // container selector
- component: '.add-on, .input-group-addon', // children component selector
- sliders: {
- saturation: {
- maxLeft: 100,
- maxTop: 100,
- callLeft: 'setSaturation',
- callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 0,
- maxTop: 100,
- callLeft: false,
- callTop: 'setHue',
- },
- alpha: {
- maxLeft: 0,
- maxTop: 100,
- callLeft: false,
- callTop: 'setAlpha',
- },
- },
- slidersHorz: {
- saturation: {
- maxLeft: 100,
- maxTop: 100,
- callLeft: 'setSaturation',
- callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 100,
- maxTop: 0,
- callLeft: 'setHue',
- callTop: false,
- },
- alpha: {
- maxLeft: 100,
- maxTop: 0,
- callLeft: 'setAlpha',
- callTop: false,
- },
- },
- template: '',
- };
-
- const Colorpicker = function (element, options) {
- this.element = $(element).addClass('colorpicker-element');
- this.options = $.extend({}, defaults, this.element.data(), options);
- this.component = this.options.component;
- this.component = (this.component !== false) ? this.element.find(this.component) : false;
- if (this.component && (this.component.length === 0)) {
- this.component = false;
- }
- this.container = (this.options.container === true) ? this.element : this.options.container;
- this.container = (this.container !== false) ? $(this.container) : false;
-
- // Is the element an input? Should we search inside for any input?
- this.input = this.element.is('input') ? this.element : (this.options.input
- ? this.element.find(this.options.input) : false);
- if (this.input && (this.input.length === 0)) {
- this.input = false;
- }
- // Set HSB color
- this.color = new Color(this.options.color !== false ? this.options.color : this.getValue());
- this.format = this.options.format !== false ? this.options.format : this.color.origFormat;
-
- // Setup picker
- this.picker = $(this.options.template);
- if (this.options.inline) {
- this.picker.addClass('colorpicker-inline colorpicker-visible');
- } else {
- this.picker.addClass('colorpicker-hidden');
- }
- if (this.options.horizontal) {
- this.picker.addClass('colorpicker-horizontal');
- }
- if (this.format === 'rgba' || this.format === 'hsla') {
- this.picker.addClass('colorpicker-with-alpha');
- }
- this.picker.on('mousedown.colorpicker', $.proxy(this.mousedown, this));
- this.picker.appendTo(this.container ? this.container : $('body'));
-
- // Bind events
- if (this.input !== false) {
- this.input.on({
- 'keyup.colorpicker': $.proxy(this.keyup, this),
- });
- if (this.component === false) {
- this.element.on({
- 'focus.colorpicker': $.proxy(this.show, this),
- });
- }
- if (this.options.inline === false) {
- this.element.on({
- 'focusout.colorpicker': $.proxy(this.hide, this),
- });
- }
- }
-
- if (this.component !== false) {
- this.component.on({
- 'click.colorpicker': $.proxy(this.show, this),
- });
- }
-
- if ((this.input === false) && (this.component === false)) {
- this.element.on({
- 'click.colorpicker': $.proxy(this.show, this),
- });
- }
- this.update();
-
- $($.proxy(function () {
- this.element.trigger('create');
- }, this));
- };
-
- Colorpicker.version = '2.0.0-beta';
-
- Colorpicker.Color = Color;
-
- Colorpicker.prototype = {
- constructor: Colorpicker,
- destroy() {
- this.picker.remove();
- this.element.removeData('colorpicker').off('.colorpicker');
- if (this.input !== false) {
- this.input.off('.colorpicker');
- }
- if (this.component !== false) {
- this.component.off('.colorpicker');
- }
- this.element.removeClass('colorpicker-element');
- this.element.trigger({
- type: 'destroy',
- });
- },
- reposition() {
- if (this.options.inline !== false) {
- return false;
- }
- const offset = this.component ? this.component.offset() : this.element.offset();
- this.picker.css({
- top: offset.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()),
- left: offset.left,
- });
- },
- show(e) {
- if (this.isDisabled()) {
- return false;
- }
- this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');
- this.reposition();
- $(window).on('resize.colorpicker', $.proxy(this.reposition, this));
- if (!this.hasInput() && e) {
- if (e.stopPropagation && e.preventDefault) {
- e.stopPropagation();
- e.preventDefault();
- }
- }
- if (this.options.inline === false) {
- $(window.document).on({
- 'mousedown.colorpicker': $.proxy(this.hide, this),
- });
- }
- this.element.trigger({
- type: 'showPicker',
- color: this.color,
- });
- },
- hide() {
- this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');
- $(window).off('resize.colorpicker', this.reposition);
- $(document).off({
- 'mousedown.colorpicker': this.hide,
- });
- this.update();
- this.element.trigger({
- type: 'hidePicker',
- color: this.color,
- });
- },
- updateData(val) {
- val = val || this.color.toString(this.format);
- this.element.data('color', val);
- return val;
- },
- updateInput(val) {
- val = val || this.color.toString(this.format);
- if (this.input !== false) {
- this.input.prop('value', val);
- }
- return val;
- },
- updatePicker(val) {
- if (val !== undefined) {
- this.color = new Color(val);
- }
- let sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;
- const icns = this.picker.find('i');
- if (icns.length === 0) {
- return;
- }
- if (this.options.horizontal === false) {
- sl = this.options.sliders;
- icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()
- .eq(2)
- .css('top', sl.alpha.maxTop * (1 - this.color.value.a));
- } else {
- sl = this.options.slidersHorz;
- icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()
- .eq(2)
- .css('left', sl.alpha.maxLeft * (1 - this.color.value.a));
- }
- icns.eq(0).css({
- top: sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,
- left: this.color.value.s * sl.saturation.maxLeft,
- });
- this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));
- this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex());
- this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format));
- return val;
- },
- updateComponent(val) {
- val = val || this.color.toString(this.format);
- if (this.component !== false) {
- const icn = this.component.find('i').eq(0);
- if (icn.length > 0) {
- icn.css({
- backgroundColor: val,
- });
- } else {
- this.component.css({
- backgroundColor: val,
- });
- }
- }
- return val;
- },
- update(force) {
- const val = this.updateComponent();
- if ((this.getValue(false) !== false) || (force === true)) {
- // Update input/data only if the current value is not blank
- this.updateInput(val);
- this.updateData(val);
- }
- this.updatePicker();
- return val;
- },
- setValue(val) { // set color manually
- this.color = new Color(val);
- this.update();
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- value: val,
- });
- },
- getValue(defaultValue) {
- defaultValue = (defaultValue === undefined) ? '#000000' : defaultValue;
- let val;
- if (this.hasInput()) {
- val = this.input.val();
- } else {
- val = this.element.data('color');
- }
- if ((val === undefined) || (val === '') || (val === null)) {
- // if not defined or empty, return default
- val = defaultValue;
- }
- return val;
- },
- hasInput() {
- return (this.input !== false);
- },
- isDisabled() {
- if (this.hasInput()) {
- return (this.input.prop('disabled') === true);
- }
- return false;
- },
- disable() {
- if (this.hasInput()) {
- this.input.prop('disabled', true);
- return true;
- }
- return false;
- },
- enable() {
- if (this.hasInput()) {
- this.input.prop('disabled', false);
- return true;
- }
- return false;
- },
- currentSlider: null,
- mousePointer: {
- left: 0,
- top: 0,
- },
- mousedown(e) {
- e.stopPropagation();
- e.preventDefault();
-
- const target = $(e.target);
-
- // detect the slider and set the limits and callbacks
- const zone = target.closest('div');
- const sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;
- if (!zone.is('.colorpicker')) {
- if (zone.is('.colorpicker-saturation')) {
- this.currentSlider = $.extend({}, sl.saturation);
- } else if (zone.is('.colorpicker-hue')) {
- this.currentSlider = $.extend({}, sl.hue);
- } else if (zone.is('.colorpicker-alpha')) {
- this.currentSlider = $.extend({}, sl.alpha);
- } else {
- return false;
- }
- const offset = zone.offset();
- // reference to guide's style
- this.currentSlider.guide = zone.find('i')[0].style;
- this.currentSlider.left = e.pageX - offset.left;
- this.currentSlider.top = e.pageY - offset.top;
- this.mousePointer = {
- left: e.pageX,
- top: e.pageY,
- };
- // trigger mousemove to move the guide to the current position
- $(document).on({
- 'mousemove.colorpicker': $.proxy(this.mousemove, this),
- 'mouseup.colorpicker': $.proxy(this.mouseup, this),
- }).trigger('mousemove');
- }
- return false;
- },
- mousemove(e) {
- e.stopPropagation();
- e.preventDefault();
- const left = Math.max(
- 0,
- Math.min(
- this.currentSlider.maxLeft,
- this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left),
- ),
- );
- const top = Math.max(
- 0,
- Math.min(
- this.currentSlider.maxTop,
- this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top),
- ),
- );
- this.currentSlider.guide.left = `${left}px`;
- this.currentSlider.guide.top = `${top}px`;
- if (this.currentSlider.callLeft) {
- this.color[this.currentSlider.callLeft].call(this.color, left / 100);
- }
- if (this.currentSlider.callTop) {
- this.color[this.currentSlider.callTop].call(this.color, top / 100);
- }
- this.update(true);
-
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- });
- return false;
- },
- mouseup(e) {
- e.stopPropagation();
- e.preventDefault();
- $(document).off({
- 'mousemove.colorpicker': this.mousemove,
- 'mouseup.colorpicker': this.mouseup,
- });
- return false;
- },
- keyup(e) {
- if ((e.keyCode === 38)) {
- if (this.color.value.a < 1) {
- this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;
- }
- this.update(true);
- } else if ((e.keyCode === 40)) {
- if (this.color.value.a > 0) {
- this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;
- }
- this.update(true);
- } else {
- var val = this.input.val();
- this.color = new Color(val);
- if (this.getValue(false) !== false) {
- this.updateData();
- this.updateComponent();
- this.updatePicker();
- }
- }
- this.element.trigger({
- type: 'changeColor',
- color: this.color,
- value: val,
- });
- },
- };
-
- $.colorpicker = Colorpicker;
-
- $.fn.colorpicker = function (option) {
- const pickerArgs = arguments;
-
- return this.each(function () {
- const $this = $(this);
- const inst = $this.data('colorpicker');
- const options = ((typeof option === 'object') ? option : {});
- if ((!inst) && (typeof option !== 'string')) {
- $this.data('colorpicker', new Colorpicker(this, options));
- } else if (typeof option === 'string') {
- inst[option].apply(inst, Array.prototype.slice.call(pickerArgs, 1));
- }
- });
- };
-
- $.fn.colorpicker.constructor = Colorpicker;
-}(window.jQuery));
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.min.js b/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.min.js
deleted file mode 100644
index 9289449f..00000000
--- a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap-colorpicker.min.js
+++ /dev/null
@@ -1,103 +0,0 @@
-!(function (a) {
- const b = function (a) {
- this.value = {
- h: 0, s: 0, b: 0, a: 1,
- }, this.origFormat = null, a && (void 0 !== a.toLowerCase ? this.setColor(a) : void 0 !== a.h && (this.value = a));
- }; b.prototype = {
- constructor: b,
- _sanitizeNumber(a) { return typeof a === 'number' ? a : isNaN(a) || a === null || a === '' || void 0 === a ? 1 : void 0 !== a.toLowerCase ? parseFloat(a) : 1; },
- setColor(a) {
- a = a.toLowerCase(), this.value = this.stringToHSB(a) || {
- h: 0, s: 0, b: 0, a: 1,
- };
- },
- stringToHSB(b) { b = b.toLowerCase(); const c = this; let d = !1; return a.each(this.stringParsers, (a, e) => { const f = e.re.exec(b); const g = f && e.parse.apply(c, [f]); const h = e.format || 'rgba'; return g ? (d = h.match(/hsla?/) ? c.RGBtoHSB.apply(c, c.HSLtoRGB.apply(c, g)) : c.RGBtoHSB.apply(c, g), c.origFormat = h, !1) : !0; }), d; },
- setHue(a) { this.value.h = 1 - a; },
- setSaturation(a) { this.value.s = a; },
- setBrightness(a) { this.value.b = 1 - a; },
- setAlpha(a) { this.value.a = parseInt(100 * (1 - a), 10) / 100; },
- toRGB(a, b, c, d) {
- a = a || this.value.h, b = b || this.value.s, c = c || this.value.b, d = d || this.value.a; let e; let f; let g; let h; let i; let j; let k; let l; switch (a && void 0 === b && void 0 === c && (b = a.s, c = a.v, a = a.h), h = Math.floor(6 * a), i = 6 * a - h, j = c * (1 - b), k = c * (1 - i * b), l = c * (1 - (1 - i) * b), h % 6) { case 0: e = c, f = l, g = j; break; case 1: e = k, f = c, g = j; break; case 2: e = j, f = c, g = l; break; case 3: e = j, f = k, g = c; break; case 4: e = l, f = j, g = c; break; case 5: e = c, f = j, g = k; } return {
- r: Math.floor(255 * e), g: Math.floor(255 * f), b: Math.floor(255 * g), a: d,
- };
- },
- toHex(a, b, c, d) { const e = this.toRGB(a, b, c, d); return `#${(1 << 24 | parseInt(e.r) << 16 | parseInt(e.g) << 8 | parseInt(e.b)).toString(16).substr(1)}`; },
- toHSL(a, b, c, d) {
- a = a || this.value.h, b = b || this.value.s, c = c || this.value.b, d = d || this.value.a; const e = a; let f = (2 - b) * c; let g = b * c; return g /= f > 0 && f <= 1 ? f : 2 - f, f /= 2, g > 1 && (g = 1), {
- h: isNaN(e) ? 0 : e, s: isNaN(g) ? 0 : g, l: isNaN(f) ? 0 : f, a: isNaN(d) ? 0 : d,
- };
- },
- RGBtoHSB(a, b, c, d) {
- a /= 255, b /= 255, c /= 255; let e; let f; let g; let h; return g = Math.max(a, b, c), h = g - Math.min(a, b, c), e = h === 0 ? null : g === a ? (b - c) / h : g === b ? (c - a) / h + 2 : (a - b) / h + 4, e = (e + 360) % 6 * 60 / 360, f = h === 0 ? 0 : h / g, {
- h: this._sanitizeNumber(e), s: f, b: g, a: this._sanitizeNumber(d),
- };
- },
- HueToRGB(a, b, c) { return c < 0 ? c += 1 : c > 1 && (c -= 1), 6 * c < 1 ? a + (b - a) * c * 6 : 2 * c < 1 ? b : 3 * c < 2 ? a + (b - a) * (2 / 3 - c) * 6 : a; },
- HSLtoRGB(a, b, c, d) { b < 0 && (b = 0); let e; e = c <= 0.5 ? c * (1 + b) : c + b - c * b; const f = 2 * c - e; const g = a + 1 / 3; const h = a; const i = a - 1 / 3; const j = Math.round(255 * this.HueToRGB(f, e, g)); const k = Math.round(255 * this.HueToRGB(f, e, h)); const l = Math.round(255 * this.HueToRGB(f, e, i)); return [j, k, l, this._sanitizeNumber(d)]; },
- toString(a) { switch (a = a || 'rgba') { case 'rgb': var b = this.toRGB(); return `rgb(${b.r},${b.g},${b.b})`; case 'rgba': var b = this.toRGB(); return `rgba(${b.r},${b.g},${b.b},${b.a})`; case 'hsl': var c = this.toHSL(); return `hsl(${Math.round(360 * c.h)},${Math.round(100 * c.s)}%,${Math.round(100 * c.l)}%)`; case 'hsla': var c = this.toHSL(); return `hsla(${Math.round(360 * c.h)},${Math.round(100 * c.s)}%,${Math.round(100 * c.l)}%,${c.a})`; case 'hex': return this.toHex(); default: return !1; } },
- stringParsers: [{ re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/, format: 'hex', parse(a) { return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16), 1]; } }, { re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/, format: 'hex', parse(a) { return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16), 1]; } }, { re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/, format: 'rgb', parse(a) { return [a[1], a[2], a[3], 1]; } }, { re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/, format: 'rgb', parse(a) { return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], 1]; } }, { re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, format: 'rgba', parse(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*)?\)/, format: 'rgba', parse(a) { return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], a[4]]; } }, { re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/, format: 'hsl', parse(a) { return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]; } }, { re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, format: 'hsla', parse(a) { return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]; } }, { re: /^([a-z]{3,})$/, format: 'alias', parse(a) { const b = this.colorNameToHex(a[0]) || '#000000'; const c = this.stringParsers[0].re.exec(b); const d = c && this.stringParsers[0].parse.apply(this, [c]); return d; } }],
- colorNameToHex(a) {
- const b = {
- aliceblue: '#f0f8ff', antiquewhite: '#faebd7', aqua: '#00ffff', aquamarine: '#7fffd4', azure: '#f0ffff', beige: '#f5f5dc', bisque: '#ffe4c4', black: '#000000', blanchedalmond: '#ffebcd', blue: '#0000ff', blueviolet: '#8a2be2', brown: '#a52a2a', burlywood: '#deb887', cadetblue: '#5f9ea0', chartreuse: '#7fff00', chocolate: '#d2691e', coral: '#ff7f50', cornflowerblue: '#6495ed', cornsilk: '#fff8dc', crimson: '#dc143c', cyan: '#00ffff', darkblue: '#00008b', darkcyan: '#008b8b', darkgoldenrod: '#b8860b', darkgray: '#a9a9a9', darkgreen: '#006400', darkkhaki: '#bdb76b', darkmagenta: '#8b008b', darkolivegreen: '#556b2f', darkorange: '#ff8c00', darkorchid: '#9932cc', darkred: '#8b0000', darksalmon: '#e9967a', darkseagreen: '#8fbc8f', darkslateblue: '#483d8b', darkslategray: '#2f4f4f', darkturquoise: '#00ced1', darkviolet: '#9400d3', deeppink: '#ff1493', deepskyblue: '#00bfff', dimgray: '#696969', dodgerblue: '#1e90ff', firebrick: '#b22222', floralwhite: '#fffaf0', forestgreen: '#228b22', fuchsia: '#ff00ff', gainsboro: '#dcdcdc', ghostwhite: '#f8f8ff', gold: '#ffd700', goldenrod: '#daa520', gray: '#808080', green: '#008000', greenyellow: '#adff2f', honeydew: '#f0fff0', hotpink: '#ff69b4', 'indianred ': '#cd5c5c', 'indigo ': '#4b0082', ivory: '#fffff0', khaki: '#f0e68c', lavender: '#e6e6fa', lavenderblush: '#fff0f5', lawngreen: '#7cfc00', lemonchiffon: '#fffacd', lightblue: '#add8e6', lightcoral: '#f08080', lightcyan: '#e0ffff', lightgoldenrodyellow: '#fafad2', lightgrey: '#d3d3d3', lightgreen: '#90ee90', lightpink: '#ffb6c1', lightsalmon: '#ffa07a', lightseagreen: '#20b2aa', lightskyblue: '#87cefa', lightslategray: '#778899', lightsteelblue: '#b0c4de', lightyellow: '#ffffe0', lime: '#00ff00', limegreen: '#32cd32', linen: '#faf0e6', magenta: '#ff00ff', maroon: '#800000', mediumaquamarine: '#66cdaa', mediumblue: '#0000cd', mediumorchid: '#ba55d3', mediumpurple: '#9370d8', mediumseagreen: '#3cb371', mediumslateblue: '#7b68ee', mediumspringgreen: '#00fa9a', mediumturquoise: '#48d1cc', mediumvioletred: '#c71585', midnightblue: '#191970', mintcream: '#f5fffa', mistyrose: '#ffe4e1', moccasin: '#ffe4b5', navajowhite: '#ffdead', navy: '#000080', oldlace: '#fdf5e6', olive: '#808000', olivedrab: '#6b8e23', orange: '#ffa500', orangered: '#ff4500', orchid: '#da70d6', palegoldenrod: '#eee8aa', palegreen: '#98fb98', paleturquoise: '#afeeee', palevioletred: '#d87093', papayawhip: '#ffefd5', peachpuff: '#ffdab9', peru: '#cd853f', pink: '#ffc0cb', plum: '#dda0dd', powderblue: '#b0e0e6', purple: '#800080', red: '#ff0000', rosybrown: '#bc8f8f', royalblue: '#4169e1', saddlebrown: '#8b4513', salmon: '#fa8072', sandybrown: '#f4a460', seagreen: '#2e8b57', seashell: '#fff5ee', sienna: '#a0522d', silver: '#c0c0c0', skyblue: '#87ceeb', slateblue: '#6a5acd', slategray: '#708090', snow: '#fffafa', springgreen: '#00ff7f', steelblue: '#4682b4', tan: '#d2b48c', teal: '#008080', thistle: '#d8bfd8', tomato: '#ff6347', turquoise: '#40e0d0', violet: '#ee82ee', wheat: '#f5deb3', white: '#ffffff', whitesmoke: '#f5f5f5', yellow: '#ffff00', yellowgreen: '#9acd32',
- }; return typeof b[a.toLowerCase()] !== 'undefined' ? b[a.toLowerCase()] : !1;
- },
- }; const c = {
- horizontal: !1,
- inline: !1,
- color: !1,
- format: !1,
- input: 'input',
- container: !1,
- component: '.add-on, .input-group-addon',
- sliders: {
- saturation: {
- maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 0, maxTop: 100, callLeft: !1, callTop: 'setHue',
- },
- alpha: {
- maxLeft: 0, maxTop: 100, callLeft: !1, callTop: 'setAlpha',
- },
- },
- slidersHorz: {
- saturation: {
- maxLeft: 100, maxTop: 100, callLeft: 'setSaturation', callTop: 'setBrightness',
- },
- hue: {
- maxLeft: 100, maxTop: 0, callLeft: 'setHue', callTop: !1,
- },
- alpha: {
- maxLeft: 100, maxTop: 0, callLeft: 'setAlpha', callTop: !1,
- },
- },
- template: '',
- }; const d = function (d, e) { this.element = a(d).addClass('colorpicker-element'), this.options = a.extend({}, c, this.element.data(), e), this.component = this.options.component, this.component = this.component !== !1 ? this.element.find(this.component) : !1, this.component && this.component.length === 0 && (this.component = !1), this.container = this.options.container === !0 ? this.element : this.options.container, this.container = this.container !== !1 ? a(this.container) : !1, this.input = this.element.is('input') ? this.element : this.options.input ? this.element.find(this.options.input) : !1, this.input && this.input.length === 0 && (this.input = !1), this.color = new b(this.options.color !== !1 ? this.options.color : this.getValue()), this.format = this.options.format !== !1 ? this.options.format : this.color.origFormat, this.picker = a(this.options.template), this.options.inline ? this.picker.addClass('colorpicker-inline colorpicker-visible') : this.picker.addClass('colorpicker-hidden'), this.options.horizontal && this.picker.addClass('colorpicker-horizontal'), (this.format === 'rgba' || this.format === 'hsla') && this.picker.addClass('colorpicker-with-alpha'), this.picker.on('mousedown.colorpicker', a.proxy(this.mousedown, this)), this.picker.appendTo(this.container ? this.container : a('body')), this.input !== !1 && (this.input.on({ 'keyup.colorpicker': a.proxy(this.keyup, this) }), this.component === !1 && this.element.on({ 'focus.colorpicker': a.proxy(this.show, this) }), this.options.inline === !1 && this.element.on({ 'focusout.colorpicker': a.proxy(this.hide, this) })), this.component !== !1 && this.component.on({ 'click.colorpicker': a.proxy(this.show, this) }), this.input === !1 && this.component === !1 && this.element.on({ 'click.colorpicker': a.proxy(this.show, this) }), this.update(), a(a.proxy(function () { this.element.trigger('create'); }, this)); }; d.version = '2.0.0-beta', d.Color = b, d.prototype = {
- constructor: d,
- destroy() { this.picker.remove(), this.element.removeData('colorpicker').off('.colorpicker'), this.input !== !1 && this.input.off('.colorpicker'), this.component !== !1 && this.component.off('.colorpicker'), this.element.removeClass('colorpicker-element'), this.element.trigger({ type: 'destroy' }); },
- reposition() { if (this.options.inline !== !1) return !1; const a = this.component ? this.component.offset() : this.element.offset(); this.picker.css({ top: a.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()), left: a.left }); },
- show(b) { return this.isDisabled() ? !1 : (this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden'), this.reposition(), a(window).on('resize.colorpicker', a.proxy(this.reposition, this)), !this.hasInput() && b && b.stopPropagation && b.preventDefault && (b.stopPropagation(), b.preventDefault()), this.options.inline === !1 && a(window.document).on({ 'mousedown.colorpicker': a.proxy(this.hide, this) }), this.element.trigger({ type: 'showPicker', color: this.color }), void 0); },
- hide() { this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible'), a(window).off('resize.colorpicker', this.reposition), a(document).off({ 'mousedown.colorpicker': this.hide }), this.update(), this.element.trigger({ type: 'hidePicker', color: this.color }); },
- updateData(a) { return a = a || this.color.toString(this.format), this.element.data('color', a), a; },
- updateInput(a) { return a = a || this.color.toString(this.format), this.input !== !1 && this.input.prop('value', a), a; },
- updatePicker(a) {
- void 0 !== a && (this.color = new b(a)); let c = this.options.horizontal === !1 ? this.options.sliders : this.options.slidersHorz; const d = this.picker.find('i'); return d.length !== 0 ? (this.options.horizontal === !1 ? (c = this.options.sliders, d.eq(1).css('top', c.hue.maxTop * (1 - this.color.value.h)).end().eq(2)
- .css('top', c.alpha.maxTop * (1 - this.color.value.a))) : (c = this.options.slidersHorz, d.eq(1).css('left', c.hue.maxLeft * (1 - this.color.value.h)).end().eq(2)
- .css('left', c.alpha.maxLeft * (1 - this.color.value.a))), d.eq(0).css({ top: c.saturation.maxTop - this.color.value.b * c.saturation.maxTop, left: this.color.value.s * c.saturation.maxLeft }), this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1)), this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex()), this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format)), a) : void 0;
- },
- updateComponent(a) { if (a = a || this.color.toString(this.format), this.component !== !1) { const b = this.component.find('i').eq(0); b.length > 0 ? b.css({ backgroundColor: a }) : this.component.css({ backgroundColor: a }); } return a; },
- update(a) { const b = this.updateComponent(); return (this.getValue(!1) !== !1 || a === !0) && (this.updateInput(b), this.updateData(b)), this.updatePicker(), b; },
- setValue(a) { this.color = new b(a), this.update(), this.element.trigger({ type: 'changeColor', color: this.color, value: a }); },
- getValue(a) { a = void 0 === a ? '#000000' : a; let b; return b = this.hasInput() ? this.input.val() : this.element.data('color'), (void 0 === b || b === '' || b === null) && (b = a), b; },
- hasInput() { return this.input !== !1; },
- isDisabled() { return this.hasInput() ? this.input.prop('disabled') === !0 : !1; },
- disable() { return this.hasInput() ? (this.input.prop('disabled', !0), !0) : !1; },
- enable() { return this.hasInput() ? (this.input.prop('disabled', !1), !0) : !1; },
- currentSlider: null,
- mousePointer: { left: 0, top: 0 },
- mousedown(b) { b.stopPropagation(), b.preventDefault(); const c = a(b.target); const d = c.closest('div'); const e = this.options.horizontal ? this.options.slidersHorz : this.options.sliders; if (!d.is('.colorpicker')) { if (d.is('.colorpicker-saturation')) this.currentSlider = a.extend({}, e.saturation); else if (d.is('.colorpicker-hue')) this.currentSlider = a.extend({}, e.hue); else { if (!d.is('.colorpicker-alpha')) return !1; this.currentSlider = a.extend({}, e.alpha); } const f = d.offset(); this.currentSlider.guide = d.find('i')[0].style, this.currentSlider.left = b.pageX - f.left, this.currentSlider.top = b.pageY - f.top, this.mousePointer = { left: b.pageX, top: b.pageY }, a(document).on({ 'mousemove.colorpicker': a.proxy(this.mousemove, this), 'mouseup.colorpicker': a.proxy(this.mouseup, this) }).trigger('mousemove'); } return !1; },
- mousemove(a) { a.stopPropagation(), a.preventDefault(); const b = Math.max(0, Math.min(this.currentSlider.maxLeft, this.currentSlider.left + ((a.pageX || this.mousePointer.left) - this.mousePointer.left))); const c = Math.max(0, Math.min(this.currentSlider.maxTop, this.currentSlider.top + ((a.pageY || this.mousePointer.top) - this.mousePointer.top))); return this.currentSlider.guide.left = `${b}px`, this.currentSlider.guide.top = `${c}px`, this.currentSlider.callLeft && this.color[this.currentSlider.callLeft].call(this.color, b / 100), this.currentSlider.callTop && this.color[this.currentSlider.callTop].call(this.color, c / 100), this.update(!0), this.element.trigger({ type: 'changeColor', color: this.color }), !1; },
- mouseup(b) { return b.stopPropagation(), b.preventDefault(), a(document).off({ 'mousemove.colorpicker': this.mousemove, 'mouseup.colorpicker': this.mouseup }), !1; },
- keyup(a) { if (a.keyCode === 38) this.color.value.a < 1 && (this.color.value.a = Math.round(100 * (this.color.value.a + 0.01)) / 100), this.update(!0); else if (a.keyCode === 40) this.color.value.a > 0 && (this.color.value.a = Math.round(100 * (this.color.value.a - 0.01)) / 100), this.update(!0); else { var c = this.input.val(); this.color = new b(c), this.getValue(!1) !== !1 && (this.updateData(), this.updateComponent(), this.updatePicker()); } this.element.trigger({ type: 'changeColor', color: this.color, value: c }); },
- }, a.colorpicker = d, a.fn.colorpicker = function (b) { const c = arguments; return this.each(function () { const e = a(this); const f = e.data('colorpicker'); const g = typeof b === 'object' ? b : {}; f || typeof b === 'string' ? typeof b === 'string' && f[b].apply(f, Array.prototype.slice.call(c, 1)) : e.data('colorpicker', new d(this, g)); }); }, a.fn.colorpicker.constructor = d;
-}(window.jQuery));
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.js b/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.js
deleted file mode 100644
index bf5287cc..00000000
--- a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.js
+++ /dev/null
@@ -1,1860 +0,0 @@
-/*!
- * Bootstrap v3.1.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'); }
-
-/* ========================================================================
- * Bootstrap: transition.js v3.1.1
- * http://getbootstrap.com/javascript/#transitions
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
- // ============================================================
-
- function transitionEnd() {
- const el = document.createElement('bootstrap');
-
- const transEndEventNames = {
- WebkitTransition: 'webkitTransitionEnd',
- MozTransition: 'transitionend',
- OTransition: 'oTransitionEnd otransitionend',
- transition: 'transitionend',
- };
-
- for (const name in transEndEventNames) {
- if (el.style[name] !== undefined) {
- return { end: transEndEventNames[name] };
- }
- }
-
- return false; // explicit for ie8 ( ._.)
- }
-
- // http://blog.alexmaccaw.com/css-transitions
- $.fn.emulateTransitionEnd = function (duration) {
- let called = false; const
- $el = this;
- $(this).one($.support.transition.end, () => { called = true; });
- const callback = function () { if (!called) $($el).trigger($.support.transition.end); };
- setTimeout(callback, duration);
- return this;
- };
-
- $(() => {
- $.support.transition = transitionEnd();
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: alert.js v3.1.1
- * http://getbootstrap.com/javascript/#alerts
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // ALERT CLASS DEFINITION
- // ======================
-
- const dismiss = '[data-dismiss="alert"]';
- const Alert = function (el) {
- $(el).on('click', dismiss, this.close);
- };
-
- Alert.prototype.close = function (e) {
- const $this = $(this);
- let selector = $this.attr('data-target');
-
- if (!selector) {
- selector = $this.attr('href');
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ''); // strip for ie7
- }
-
- let $parent = $(selector);
-
- if (e) e.preventDefault();
-
- if (!$parent.length) {
- $parent = $this.hasClass('alert') ? $this : $this.parent();
- }
-
- $parent.trigger(e = $.Event('close.bs.alert'));
-
- if (e.isDefaultPrevented()) return;
-
- $parent.removeClass('in');
-
- function removeElement() {
- $parent.trigger('closed.bs.alert').remove();
- }
-
- $.support.transition && $parent.hasClass('fade')
- ? $parent
- .one($.support.transition.end, removeElement)
- .emulateTransitionEnd(150)
- : removeElement();
- };
-
- // ALERT PLUGIN DEFINITION
- // =======================
-
- const old = $.fn.alert;
-
- $.fn.alert = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.alert');
-
- if (!data) $this.data('bs.alert', (data = new Alert(this)));
- if (typeof option === 'string') data[option].call($this);
- });
- };
-
- $.fn.alert.Constructor = Alert;
-
- // ALERT NO CONFLICT
- // =================
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old;
- return this;
- };
-
- // ALERT DATA-API
- // ==============
-
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close);
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: button.js v3.1.1
- * http://getbootstrap.com/javascript/#buttons
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // BUTTON PUBLIC CLASS DEFINITION
- // ==============================
-
- var Button = function (element, options) {
- this.$element = $(element);
- this.options = $.extend({}, Button.DEFAULTS, options);
- this.isLoading = false;
- };
-
- Button.DEFAULTS = {
- loadingText: 'loading...',
- };
-
- Button.prototype.setState = function (state) {
- const d = 'disabled';
- const $el = this.$element;
- const val = $el.is('input') ? 'val' : 'html';
- const data = $el.data();
-
- state += 'Text';
-
- if (!data.resetText) $el.data('resetText', $el[val]());
-
- $el[val](data[state] || this.options[state]);
-
- // push to event loop to allow forms to submit
- setTimeout($.proxy(function () {
- if (state == 'loadingText') {
- this.isLoading = true;
- $el.addClass(d).attr(d, d);
- } else if (this.isLoading) {
- this.isLoading = false;
- $el.removeClass(d).removeAttr(d);
- }
- }, this), 0);
- };
-
- Button.prototype.toggle = function () {
- let changed = true;
- const $parent = this.$element.closest('[data-toggle="buttons"]');
-
- if ($parent.length) {
- const $input = this.$element.find('input');
- if ($input.prop('type') == 'radio') {
- if ($input.prop('checked') && this.$element.hasClass('active')) changed = false;
- else $parent.find('.active').removeClass('active');
- }
- if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change');
- }
-
- if (changed) this.$element.toggleClass('active');
- };
-
- // BUTTON PLUGIN DEFINITION
- // ========================
-
- const old = $.fn.button;
-
- $.fn.button = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.button');
- const options = typeof option === 'object' && option;
-
- if (!data) $this.data('bs.button', (data = new Button(this, options)));
-
- if (option == 'toggle') data.toggle();
- else if (option) data.setState(option);
- });
- };
-
- $.fn.button.Constructor = Button;
-
- // BUTTON NO CONFLICT
- // ==================
-
- $.fn.button.noConflict = function () {
- $.fn.button = old;
- return this;
- };
-
- // BUTTON DATA-API
- // ===============
-
- $(document).on('click.bs.button.data-api', '[data-toggle^=button]', (e) => {
- let $btn = $(e.target);
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn');
- $btn.button('toggle');
- e.preventDefault();
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: carousel.js v3.1.1
- * http://getbootstrap.com/javascript/#carousel
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // CAROUSEL CLASS DEFINITION
- // =========================
-
- const Carousel = function (element, options) {
- this.$element = $(element);
- this.$indicators = this.$element.find('.carousel-indicators');
- this.options = options;
- this.paused = this.sliding = this.interval = this.$active = this.$items = null;
-
- this.options.pause == 'hover' && this.$element
- .on('mouseenter', $.proxy(this.pause, this))
- .on('mouseleave', $.proxy(this.cycle, this));
- };
-
- Carousel.DEFAULTS = {
- interval: 5000,
- pause: 'hover',
- wrap: true,
- };
-
- Carousel.prototype.cycle = function (e) {
- e || (this.paused = false);
-
- this.interval && clearInterval(this.interval);
-
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval));
-
- return this;
- };
-
- Carousel.prototype.getActiveIndex = function () {
- this.$active = this.$element.find('.item.active');
- this.$items = this.$active.parent().children();
-
- return this.$items.index(this.$active);
- };
-
- Carousel.prototype.to = function (pos) {
- const that = this;
- const activeIndex = this.getActiveIndex();
-
- if (pos > (this.$items.length - 1) || pos < 0) return;
-
- if (this.sliding) return this.$element.one('slid.bs.carousel', () => { that.to(pos); });
- if (activeIndex == pos) return this.pause().cycle();
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]));
- };
-
- Carousel.prototype.pause = function (e) {
- e || (this.paused = true);
-
- if (this.$element.find('.next, .prev').length && $.support.transition) {
- this.$element.trigger($.support.transition.end);
- this.cycle(true);
- }
-
- this.interval = clearInterval(this.interval);
-
- return this;
- };
-
- Carousel.prototype.next = function () {
- if (this.sliding) return;
- return this.slide('next');
- };
-
- Carousel.prototype.prev = function () {
- if (this.sliding) return;
- return this.slide('prev');
- };
-
- Carousel.prototype.slide = function (type, next) {
- const $active = this.$element.find('.item.active');
- let $next = next || $active[type]();
- const isCycling = this.interval;
- const direction = type == 'next' ? 'left' : 'right';
- const fallback = type == 'next' ? 'first' : 'last';
- const that = this;
-
- if (!$next.length) {
- if (!this.options.wrap) return;
- $next = this.$element.find('.item')[fallback]();
- }
-
- if ($next.hasClass('active')) return this.sliding = false;
-
- const e = $.Event('slide.bs.carousel', { relatedTarget: $next[0], direction });
- this.$element.trigger(e);
- if (e.isDefaultPrevented()) return;
-
- this.sliding = true;
-
- isCycling && this.pause();
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active');
- this.$element.one('slid.bs.carousel', () => {
- const $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]);
- $nextIndicator && $nextIndicator.addClass('active');
- });
- }
-
- if ($.support.transition && this.$element.hasClass('slide')) {
- $next.addClass(type);
- $next[0].offsetWidth; // force reflow
- $active.addClass(direction);
- $next.addClass(direction);
- $active
- .one($.support.transition.end, () => {
- $next.removeClass([type, direction].join(' ')).addClass('active');
- $active.removeClass(['active', direction].join(' '));
- that.sliding = false;
- setTimeout(() => { that.$element.trigger('slid.bs.carousel'); }, 0);
- })
- .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000);
- } else {
- $active.removeClass('active');
- $next.addClass('active');
- this.sliding = false;
- this.$element.trigger('slid.bs.carousel');
- }
-
- isCycling && this.cycle();
-
- return this;
- };
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- const old = $.fn.carousel;
-
- $.fn.carousel = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.carousel');
- const options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option === 'object' && option);
- const action = typeof option === 'string' ? option : options.slide;
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)));
- if (typeof option === 'number') data.to(option);
- else if (action) data[action]();
- else if (options.interval) data.pause().cycle();
- });
- };
-
- $.fn.carousel.Constructor = Carousel;
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old;
- return this;
- };
-
- // CAROUSEL DATA-API
- // =================
-
- $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
- const $this = $(this); let
- href;
- const $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')); // strip for ie7
- const options = $.extend({}, $target.data(), $this.data());
- let slideIndex = $this.attr('data-slide-to');
- if (slideIndex) options.interval = false;
-
- $target.carousel(options);
-
- if (slideIndex = $this.attr('data-slide-to')) {
- $target.data('bs.carousel').to(slideIndex);
- }
-
- e.preventDefault();
- });
-
- $(window).on('load', () => {
- $('[data-ride="carousel"]').each(function () {
- const $carousel = $(this);
- $carousel.carousel($carousel.data());
- });
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: collapse.js v3.1.1
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element);
- this.options = $.extend({}, Collapse.DEFAULTS, options);
- this.transitioning = null;
-
- if (this.options.parent) this.$parent = $(this.options.parent);
- if (this.options.toggle) this.toggle();
- };
-
- Collapse.DEFAULTS = {
- toggle: true,
- };
-
- Collapse.prototype.dimension = function () {
- const hasWidth = this.$element.hasClass('width');
- return hasWidth ? 'width' : 'height';
- };
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return;
-
- const startEvent = $.Event('show.bs.collapse');
- this.$element.trigger(startEvent);
- if (startEvent.isDefaultPrevented()) return;
-
- const actives = this.$parent && this.$parent.find('> .panel > .in');
-
- if (actives && actives.length) {
- const hasData = actives.data('bs.collapse');
- if (hasData && hasData.transitioning) return;
- actives.collapse('hide');
- hasData || actives.data('bs.collapse', null);
- }
-
- const dimension = this.dimension();
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')
- [dimension](0);
-
- this.transitioning = 1;
-
- const complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')
- [dimension]('auto');
- this.transitioning = 0;
- this.$element.trigger('shown.bs.collapse');
- };
-
- if (!$.support.transition) return complete.call(this);
-
- const scrollSize = $.camelCase(['scroll', dimension].join('-'));
-
- this.$element
- .one($.support.transition.end, $.proxy(complete, this))
- .emulateTransitionEnd(350)
- [dimension](this.$element[0][scrollSize]);
- };
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return;
-
- const startEvent = $.Event('hide.bs.collapse');
- this.$element.trigger(startEvent);
- if (startEvent.isDefaultPrevented()) return;
-
- const dimension = this.dimension();
-
- this.$element
- [dimension](this.$element[dimension]())
- [0].offsetHeight;
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse')
- .removeClass('in');
-
- this.transitioning = 1;
-
- const complete = function () {
- this.transitioning = 0;
- this.$element
- .trigger('hidden.bs.collapse')
- .removeClass('collapsing')
- .addClass('collapse');
- };
-
- if (!$.support.transition) return complete.call(this);
-
- this.$element
- [dimension](0)
- .one($.support.transition.end, $.proxy(complete, this))
- .emulateTransitionEnd(350);
- };
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']();
- };
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- const old = $.fn.collapse;
-
- $.fn.collapse = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.collapse');
- const options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option === 'object' && option);
-
- if (!data && options.toggle && option == 'show') option = !option;
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.collapse.Constructor = Collapse;
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old;
- return this;
- };
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
- const $this = $(this); let
- href;
- const target = $this.attr('data-target')
- || e.preventDefault()
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, ''); // strip for ie7
- const $target = $(target);
- const data = $target.data('bs.collapse');
- const option = data ? 'toggle' : $this.data();
- const parent = $this.attr('data-parent');
- const $parent = parent && $(parent);
-
- if (!data || !data.transitioning) {
- if ($parent) $parent.find(`[data-toggle=collapse][data-parent="${parent}"]`).not($this).addClass('collapsed');
- $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed');
- }
-
- $target.collapse(option);
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: dropdown.js v3.1.1
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- const backdrop = '.dropdown-backdrop';
- const toggle = '[data-toggle=dropdown]';
- const Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle);
- };
-
- Dropdown.prototype.toggle = function (e) {
- const $this = $(this);
-
- if ($this.is('.disabled, :disabled')) return;
-
- const $parent = getParent($this);
- const isActive = $parent.hasClass('open');
-
- clearMenus();
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $('').insertAfter($(this)).on('click', clearMenus);
- }
-
- const relatedTarget = { relatedTarget: this };
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget));
-
- if (e.isDefaultPrevented()) return;
-
- $parent
- .toggleClass('open')
- .trigger('shown.bs.dropdown', relatedTarget);
-
- $this.focus();
- }
-
- return false;
- };
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27)/.test(e.keyCode)) return;
-
- const $this = $(this);
-
- e.preventDefault();
- e.stopPropagation();
-
- if ($this.is('.disabled, :disabled')) return;
-
- const $parent = getParent($this);
- const isActive = $parent.hasClass('open');
-
- if (!isActive || (isActive && e.keyCode == 27)) {
- if (e.which == 27) $parent.find(toggle).focus();
- return $this.click();
- }
-
- const desc = ' li:not(.divider):visible a';
- const $items = $parent.find(`[role=menu]${desc}, [role=listbox]${desc}`);
-
- if (!$items.length) return;
-
- let index = $items.index($items.filter(':focus'));
-
- if (e.keyCode == 38 && index > 0) index--; // up
- if (e.keyCode == 40 && index < $items.length - 1) index++; // down
- if (!~index) index = 0;
-
- $items.eq(index).focus();
- };
-
- function clearMenus(e) {
- $(backdrop).remove();
- $(toggle).each(function () {
- const $parent = getParent($(this));
- const relatedTarget = { relatedTarget: this };
- if (!$parent.hasClass('open')) return;
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget));
- if (e.isDefaultPrevented()) return;
- $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget);
- });
- }
-
- function getParent($this) {
- let selector = $this.attr('data-target');
-
- if (!selector) {
- selector = $this.attr('href');
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, ''); // strip for ie7
- }
-
- const $parent = selector && $(selector);
-
- return $parent && $parent.length ? $parent : $this.parent();
- }
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- const old = $.fn.dropdown;
-
- $.fn.dropdown = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.dropdown');
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)));
- if (typeof option === 'string') data[option].call($this);
- });
- };
-
- $.fn.dropdown.Constructor = Dropdown;
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old;
- return this;
- };
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', (e) => { e.stopPropagation(); })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', `${toggle}, [role=menu], [role=listbox]`, Dropdown.prototype.keydown);
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: modal.js v3.1.1
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // MODAL CLASS DEFINITION
- // ======================
-
- const Modal = function (element, options) {
- this.options = options;
- this.$element = $(element);
- this.$backdrop = this.isShown = null;
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal');
- }, this));
- }
- };
-
- Modal.DEFAULTS = {
- backdrop: true,
- keyboard: true,
- show: true,
- };
-
- Modal.prototype.toggle = function (_relatedTarget) {
- return this[!this.isShown ? 'show' : 'hide'](_relatedTarget);
- };
-
- Modal.prototype.show = function (_relatedTarget) {
- const that = this;
- const e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget });
-
- this.$element.trigger(e);
-
- if (this.isShown || e.isDefaultPrevented()) return;
-
- this.isShown = true;
-
- this.escape();
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this));
-
- this.backdrop(() => {
- const transition = $.support.transition && that.$element.hasClass('fade');
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(document.body); // don't move modals dom position
- }
-
- that.$element
- .show()
- .scrollTop(0);
-
- if (transition) {
- that.$element[0].offsetWidth; // force reflow
- }
-
- that.$element
- .addClass('in')
- .attr('aria-hidden', false);
-
- that.enforceFocus();
-
- const e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget });
-
- transition
- ? that.$element.find('.modal-dialog') // wait for modal to slide in
- .one($.support.transition.end, () => {
- that.$element.focus().trigger(e);
- })
- .emulateTransitionEnd(300)
- : that.$element.focus().trigger(e);
- });
- };
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault();
-
- e = $.Event('hide.bs.modal');
-
- this.$element.trigger(e);
-
- if (!this.isShown || e.isDefaultPrevented()) return;
-
- this.isShown = false;
-
- this.escape();
-
- $(document).off('focusin.bs.modal');
-
- this.$element
- .removeClass('in')
- .attr('aria-hidden', true)
- .off('click.dismiss.bs.modal');
-
- $.support.transition && this.$element.hasClass('fade')
- ? this.$element
- .one($.support.transition.end, $.proxy(this.hideModal, this))
- .emulateTransitionEnd(300)
- : this.hideModal();
- };
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.focus();
- }
- }, this));
- };
-
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide();
- }, this));
- } else if (!this.isShown) {
- this.$element.off('keyup.dismiss.bs.modal');
- }
- };
-
- Modal.prototype.hideModal = function () {
- const that = this;
- this.$element.hide();
- this.backdrop(() => {
- that.removeBackdrop();
- that.$element.trigger('hidden.bs.modal');
- });
- };
-
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove();
- this.$backdrop = null;
- };
-
- Modal.prototype.backdrop = function (callback) {
- const animate = this.$element.hasClass('fade') ? 'fade' : '';
-
- if (this.isShown && this.options.backdrop) {
- const doAnimate = $.support.transition && animate;
-
- this.$backdrop = $(``)
- .appendTo(document.body);
-
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (e.target !== e.currentTarget) return;
- this.options.backdrop == 'static'
- ? this.$element[0].focus.call(this.$element[0])
- : this.hide.call(this);
- }, this));
-
- if (doAnimate) this.$backdrop[0].offsetWidth; // force reflow
-
- this.$backdrop.addClass('in');
-
- if (!callback) return;
-
- doAnimate
- ? this.$backdrop
- .one($.support.transition.end, callback)
- .emulateTransitionEnd(150)
- : callback();
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in');
-
- $.support.transition && this.$element.hasClass('fade')
- ? this.$backdrop
- .one($.support.transition.end, callback)
- .emulateTransitionEnd(150)
- : callback();
- } else if (callback) {
- callback();
- }
- };
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- const old = $.fn.modal;
-
- $.fn.modal = function (option, _relatedTarget) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.modal');
- const options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option === 'object' && option);
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)));
- if (typeof option === 'string') data[option](_relatedTarget);
- else if (options.show) data.show(_relatedTarget);
- });
- };
-
- $.fn.modal.Constructor = Modal;
-
- // MODAL NO CONFLICT
- // =================
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old;
- return this;
- };
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- const $this = $(this);
- const href = $this.attr('href');
- const $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))); // strip for ie7
- const option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data());
-
- if ($this.is('a')) e.preventDefault();
-
- $target
- .modal(option, this)
- .one('hide', () => {
- $this.is(':visible') && $this.focus();
- });
- });
-
- $(document)
- .on('show.bs.modal', '.modal', () => { $(document.body).addClass('modal-open'); })
- .on('hidden.bs.modal', '.modal', () => { $(document.body).removeClass('modal-open'); });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: tooltip.js v3.1.1
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- const Tooltip = function (element, options) {
- this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null;
-
- this.init('tooltip', element, options);
- };
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- container: false,
- };
-
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true;
- this.type = type;
- this.$element = $(element);
- this.options = this.getOptions(options);
-
- const triggers = this.options.trigger.split(' ');
-
- for (let i = triggers.length; i--;) {
- const trigger = triggers[i];
-
- if (trigger == 'click') {
- this.$element.on(`click.${this.type}`, this.options.selector, $.proxy(this.toggle, this));
- } else if (trigger != 'manual') {
- const eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin';
- const eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout';
-
- this.$element.on(`${eventIn}.${this.type}`, this.options.selector, $.proxy(this.enter, this));
- this.$element.on(`${eventOut}.${this.type}`, this.options.selector, $.proxy(this.leave, this));
- }
- }
-
- this.options.selector
- ? (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' }))
- : this.fixTitle();
- };
-
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS;
- };
-
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options);
-
- if (options.delay && typeof options.delay === 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay,
- };
- }
-
- return options;
- };
-
- Tooltip.prototype.getDelegateOptions = function () {
- const options = {};
- const defaults = this.getDefaults();
-
- this._options && $.each(this._options, (key, value) => {
- if (defaults[key] != value) options[key] = value;
- });
-
- return options;
- };
-
- Tooltip.prototype.enter = function (obj) {
- const self = obj instanceof this.constructor
- ? obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`);
-
- clearTimeout(self.timeout);
-
- self.hoverState = 'in';
-
- if (!self.options.delay || !self.options.delay.show) return self.show();
-
- self.timeout = setTimeout(() => {
- if (self.hoverState == 'in') self.show();
- }, self.options.delay.show);
- };
-
- Tooltip.prototype.leave = function (obj) {
- const self = obj instanceof this.constructor
- ? obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`);
-
- clearTimeout(self.timeout);
-
- self.hoverState = 'out';
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide();
-
- self.timeout = setTimeout(() => {
- if (self.hoverState == 'out') self.hide();
- }, self.options.delay.hide);
- };
-
- Tooltip.prototype.show = function () {
- const e = $.Event(`show.bs.${this.type}`);
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e);
-
- if (e.isDefaultPrevented()) return;
- const that = this;
-
- const $tip = this.tip();
-
- this.setContent();
-
- if (this.options.animation) $tip.addClass('fade');
-
- let placement = typeof this.options.placement === 'function'
- ? this.options.placement.call(this, $tip[0], this.$element[0])
- : this.options.placement;
-
- const autoToken = /\s?auto?\s?/i;
- const autoPlace = autoToken.test(placement);
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top';
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement);
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element);
-
- const pos = this.getPosition();
- const actualWidth = $tip[0].offsetWidth;
- const actualHeight = $tip[0].offsetHeight;
-
- if (autoPlace) {
- const $parent = this.$element.parent();
-
- const orgPlacement = placement;
- const docScroll = document.documentElement.scrollTop || document.body.scrollTop;
- const parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth();
- const parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight();
- const parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left;
-
- placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top'
- : placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom'
- : placement == 'right' && pos.right + actualWidth > parentWidth ? 'left'
- : placement == 'left' && pos.left - actualWidth < parentLeft ? 'right'
- : placement;
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement);
- }
-
- const calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight);
-
- this.applyPlacement(calculatedOffset, placement);
- this.hoverState = null;
-
- const complete = function () {
- that.$element.trigger(`shown.bs.${that.type}`);
- };
-
- $.support.transition && this.$tip.hasClass('fade')
- ? $tip
- .one($.support.transition.end, complete)
- .emulateTransitionEnd(150)
- : complete();
- }
- };
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- let replace;
- const $tip = this.tip();
- const width = $tip[0].offsetWidth;
- const height = $tip[0].offsetHeight;
-
- // manually read margins because getBoundingClientRect includes difference
- let marginTop = parseInt($tip.css('margin-top'), 10);
- let marginLeft = parseInt($tip.css('margin-left'), 10);
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0;
- if (isNaN(marginLeft)) marginLeft = 0;
-
- offset.top += marginTop;
- offset.left += marginLeft;
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using(props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left),
- });
- },
- }, offset), 0);
-
- $tip.addClass('in');
-
- // check to see if placing tip in new offset caused the tip to resize itself
- let actualWidth = $tip[0].offsetWidth;
- let actualHeight = $tip[0].offsetHeight;
-
- if (placement == 'top' && actualHeight != height) {
- replace = true;
- offset.top = offset.top + height - actualHeight;
- }
-
- if (/bottom|top/.test(placement)) {
- let delta = 0;
-
- if (offset.left < 0) {
- delta = offset.left * -2;
- offset.left = 0;
-
- $tip.offset(offset);
-
- actualWidth = $tip[0].offsetWidth;
- actualHeight = $tip[0].offsetHeight;
- }
-
- this.replaceArrow(delta - width + actualWidth, actualWidth, 'left');
- } else {
- this.replaceArrow(actualHeight - height, actualHeight, 'top');
- }
-
- if (replace) $tip.offset(offset);
- };
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
- this.arrow().css(position, delta ? (`${50 * (1 - delta / dimension)}%`) : '');
- };
-
- Tooltip.prototype.setContent = function () {
- const $tip = this.tip();
- const title = this.getTitle();
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title);
- $tip.removeClass('fade in top bottom left right');
- };
-
- Tooltip.prototype.hide = function () {
- const that = this;
- const $tip = this.tip();
- const e = $.Event(`hide.bs.${this.type}`);
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach();
- that.$element.trigger(`hidden.bs.${that.type}`);
- }
-
- this.$element.trigger(e);
-
- if (e.isDefaultPrevented()) return;
-
- $tip.removeClass('in');
-
- $.support.transition && this.$tip.hasClass('fade')
- ? $tip
- .one($.support.transition.end, complete)
- .emulateTransitionEnd(150)
- : complete();
-
- this.hoverState = null;
-
- return this;
- };
-
- Tooltip.prototype.fixTitle = function () {
- const $e = this.$element;
- if ($e.attr('title') || typeof ($e.attr('data-original-title')) !== 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '');
- }
- };
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle();
- };
-
- Tooltip.prototype.getPosition = function () {
- const el = this.$element[0];
- return $.extend({}, (typeof el.getBoundingClientRect === 'function') ? el.getBoundingClientRect() : {
- width: el.offsetWidth,
- height: el.offsetHeight,
- }, this.$element.offset());
- };
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 }
- : placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 }
- : placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth }
- /* placement == 'right' */ : { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width };
- };
-
- Tooltip.prototype.getTitle = function () {
- let title;
- const $e = this.$element;
- const o = this.options;
-
- title = $e.attr('data-original-title')
- || (typeof o.title === 'function' ? o.title.call($e[0]) : o.title);
-
- return title;
- };
-
- Tooltip.prototype.tip = function () {
- return this.$tip = this.$tip || $(this.options.template);
- };
-
- Tooltip.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow');
- };
-
- Tooltip.prototype.validate = function () {
- if (!this.$element[0].parentNode) {
- this.hide();
- this.$element = null;
- this.options = null;
- }
- };
-
- Tooltip.prototype.enable = function () {
- this.enabled = true;
- };
-
- Tooltip.prototype.disable = function () {
- this.enabled = false;
- };
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled;
- };
-
- Tooltip.prototype.toggle = function (e) {
- const self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`) : this;
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self);
- };
-
- Tooltip.prototype.destroy = function () {
- clearTimeout(this.timeout);
- this.hide().$element.off(`.${this.type}`).removeData(`bs.${this.type}`);
- };
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- const old = $.fn.tooltip;
-
- $.fn.tooltip = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.tooltip');
- const options = typeof option === 'object' && option;
-
- if (!data && option == 'destroy') return;
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.tooltip.Constructor = Tooltip;
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old;
- return this;
- };
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: popover.js v3.1.1
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- const Popover = function (element, options) {
- this.init('popover', element, options);
- };
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js');
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: '',
- });
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype);
-
- Popover.prototype.constructor = Popover;
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS;
- };
-
- Popover.prototype.setContent = function () {
- const $tip = this.tip();
- const title = this.getTitle();
- const content = this.getContent();
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title);
- $tip.find('.popover-content')[// we use append for html objects to maintain js events
- this.options.html ? (typeof content === 'string' ? 'html' : 'append') : 'text'
- ](content);
-
- $tip.removeClass('fade top bottom left right in');
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide();
- };
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent();
- };
-
- Popover.prototype.getContent = function () {
- const $e = this.$element;
- const o = this.options;
-
- return $e.attr('data-content')
- || (typeof o.content === 'function'
- ? o.content.call($e[0])
- : o.content);
- };
-
- Popover.prototype.arrow = function () {
- return this.$arrow = this.$arrow || this.tip().find('.arrow');
- };
-
- Popover.prototype.tip = function () {
- if (!this.$tip) this.$tip = $(this.options.template);
- return this.$tip;
- };
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- const old = $.fn.popover;
-
- $.fn.popover = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.popover');
- const options = typeof option === 'object' && option;
-
- if (!data && option == 'destroy') return;
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.popover.Constructor = Popover;
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old;
- return this;
- };
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: scrollspy.js v3.1.1
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- let href;
- const process = $.proxy(this.process, this);
-
- this.$element = $(element).is('body') ? $(window) : $(element);
- this.$body = $('body');
- this.$scrollElement = this.$element.on('scroll.bs.scroll-spy.data-api', process);
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options);
- this.selector = `${this.options.target
- || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
- || ''} .nav li > a`;
- this.offsets = $([]);
- this.targets = $([]);
- this.activeTarget = null;
-
- this.refresh();
- this.process();
- }
-
- ScrollSpy.DEFAULTS = {
- offset: 10,
- };
-
- ScrollSpy.prototype.refresh = function () {
- const offsetMethod = this.$element[0] == window ? 'offset' : 'position';
-
- this.offsets = $([]);
- this.targets = $([]);
-
- const self = this;
- const $targets = this.$body
- .find(this.selector)
- .map(function () {
- const $el = $(this);
- const href = $el.data('target') || $el.attr('href');
- const $href = /^#./.test(href) && $(href);
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[$href[offsetMethod]().top + (!$.isWindow(self.$scrollElement.get(0)) && self.$scrollElement.scrollTop()), href]]) || null;
- })
- .sort((a, b) => a[0] - b[0])
- .each(function () {
- self.offsets.push(this[0]);
- self.targets.push(this[1]);
- });
- };
-
- ScrollSpy.prototype.process = function () {
- const scrollTop = this.$scrollElement.scrollTop() + this.options.offset;
- const scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight;
- const maxScroll = scrollHeight - this.$scrollElement.height();
- const { offsets } = this;
- const { targets } = this;
- const { activeTarget } = this;
- let i;
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets.last()[0]) && this.activate(i);
- }
-
- if (activeTarget && scrollTop <= offsets[0]) {
- return activeTarget != (i = targets[0]) && this.activate(i);
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
- && this.activate(targets[i]);
- }
- };
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target;
-
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active');
-
- const selector = `${this.selector
- }[data-target="${target}"],${
- this.selector}[href="${target}"]`;
-
- let active = $(selector)
- .parents('li')
- .addClass('active');
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active');
- }
-
- active.trigger('activate.bs.scrollspy');
- };
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- const old = $.fn.scrollspy;
-
- $.fn.scrollspy = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.scrollspy');
- const options = typeof option === 'object' && option;
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.scrollspy.Constructor = ScrollSpy;
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old;
- return this;
- };
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load', () => {
- $('[data-spy="scroll"]').each(function () {
- const $spy = $(this);
- $spy.scrollspy($spy.data());
- });
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: tab.js v3.1.1
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // TAB CLASS DEFINITION
- // ====================
-
- const Tab = function (element) {
- this.element = $(element);
- };
-
- Tab.prototype.show = function () {
- const $this = this.element;
- const $ul = $this.closest('ul:not(.dropdown-menu)');
- let selector = $this.data('target');
-
- if (!selector) {
- selector = $this.attr('href');
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ''); // strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return;
-
- const previous = $ul.find('.active:last a')[0];
- const e = $.Event('show.bs.tab', {
- relatedTarget: previous,
- });
-
- $this.trigger(e);
-
- if (e.isDefaultPrevented()) return;
-
- const $target = $(selector);
-
- this.activate($this.parent('li'), $ul);
- this.activate($target, $target.parent(), () => {
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: previous,
- });
- });
- };
-
- Tab.prototype.activate = function (element, container, callback) {
- const $active = container.find('> .active');
- const transition = callback
- && $.support.transition
- && $active.hasClass('fade');
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active');
-
- element.addClass('active');
-
- if (transition) {
- element[0].offsetWidth; // reflow for transition
- element.addClass('in');
- } else {
- element.removeClass('fade');
- }
-
- if (element.parent('.dropdown-menu')) {
- element.closest('li.dropdown').addClass('active');
- }
-
- callback && callback();
- }
-
- transition
- ? $active
- .one($.support.transition.end, next)
- .emulateTransitionEnd(150)
- : next();
-
- $active.removeClass('in');
- };
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- const old = $.fn.tab;
-
- $.fn.tab = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.tab');
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.tab.Constructor = Tab;
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old;
- return this;
- };
-
- // TAB DATA-API
- // ============
-
- $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
- e.preventDefault();
- $(this).tab('show');
- });
-}(jQuery));
-
-/* ========================================================================
- * Bootstrap: affix.js v3.1.1
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-+(function ($) {
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options);
- this.$window = $(window)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this));
-
- this.$element = $(element);
- this.affixed = this.unpin = this.pinnedOffset = null;
-
- this.checkPosition();
- };
-
- Affix.RESET = 'affix affix-top affix-bottom';
-
- Affix.DEFAULTS = {
- offset: 0,
- };
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset;
- this.$element.removeClass(Affix.RESET).addClass('affix');
- const scrollTop = this.$window.scrollTop();
- const position = this.$element.offset();
- return (this.pinnedOffset = position.top - scrollTop);
- };
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1);
- };
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return;
-
- const scrollHeight = $(document).height();
- const scrollTop = this.$window.scrollTop();
- const position = this.$element.offset();
- const { offset } = this.options;
- let offsetTop = offset.top;
- let offsetBottom = offset.bottom;
-
- if (this.affixed == 'top') position.top += scrollTop;
-
- if (typeof offset !== 'object') offsetBottom = offsetTop = offset;
- if (typeof offsetTop === 'function') offsetTop = offset.top(this.$element);
- if (typeof offsetBottom === 'function') offsetBottom = offset.bottom(this.$element);
-
- const affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false
- : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom'
- : offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false;
-
- if (this.affixed === affix) return;
- if (this.unpin) this.$element.css('top', '');
-
- const affixType = `affix${affix ? `-${affix}` : ''}`;
- const e = $.Event(`${affixType}.bs.affix`);
-
- this.$element.trigger(e);
-
- if (e.isDefaultPrevented()) return;
-
- this.affixed = affix;
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null;
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger($.Event(affixType.replace('affix', 'affixed')));
-
- if (affix == 'bottom') {
- this.$element.offset({ top: scrollHeight - offsetBottom - this.$element.height() });
- }
- };
-
- // AFFIX PLUGIN DEFINITION
- // =======================
-
- const old = $.fn.affix;
-
- $.fn.affix = function (option) {
- return this.each(function () {
- const $this = $(this);
- let data = $this.data('bs.affix');
- const options = typeof option === 'object' && option;
-
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)));
- if (typeof option === 'string') data[option]();
- });
- };
-
- $.fn.affix.Constructor = Affix;
-
- // AFFIX NO CONFLICT
- // =================
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old;
- return this;
- };
-
- // AFFIX DATA-API
- // ==============
-
- $(window).on('load', () => {
- $('[data-spy="affix"]').each(function () {
- const $spy = $(this);
- const data = $spy.data();
-
- data.offset = data.offset || {};
-
- if (data.offsetBottom) data.offset.bottom = data.offsetBottom;
- if (data.offsetTop) data.offset.top = data.offsetTop;
-
- $spy.affix(data);
- });
- });
-}(jQuery));
diff --git a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.min.js b/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.min.js
deleted file mode 100644
index 9e121935..00000000
--- a/packages/mindplot/test/playground/map-render/bootstrap/js/bootstrap.min.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*!
- * Bootstrap v3.1.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) {
- function b() {
- const a = document.createElement('bootstrap'); const b = {
- WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd otransitionend', transition: 'transitionend',
- }; for (const c in b) if (void 0 !== a.style[c]) return { end: b[c] }; return !1;
- }a.fn.emulateTransitionEnd = function (b) { let c = !1; const d = this; a(this).one(a.support.transition.end, () => { c = !0; }); const e = function () { c || a(d).trigger(a.support.transition.end); }; return setTimeout(e, b), this; }, a(() => { a.support.transition = b(); });
-}(jQuery)), +(function (a) {
- const b = '[data-dismiss="alert"]'; const c = function (c) { a(c).on('click', b, this.close); }; c.prototype.close = function (b) { function c() { f.trigger('closed.bs.alert').remove(); } const d = a(this); let 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()); }; const d = a.fn.alert; a.fn.alert = function (b) { return this.each(function () { const d = a(this); let e = d.data('bs.alert'); e || d.data('bs.alert', e = new c(this)), typeof b === 'string' && 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);
-}(jQuery)), +(function (a) {
- var b = function (c, d) { this.$element = a(c), this.options = a.extend({}, b.DEFAULTS, d), this.isLoading = !1; }; b.DEFAULTS = { loadingText: 'loading...' }, b.prototype.setState = function (b) { const c = 'disabled'; const d = this.$element; const e = d.is('input') ? 'val' : 'html'; const f = d.data(); b += 'Text', f.resetText || d.data('resetText', d[e]()), d[e](f[b] || this.options[b]), setTimeout(a.proxy(function () { b == 'loadingText' ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c)); }, this), 0); }, b.prototype.toggle = function () { let a = !0; const b = this.$element.closest('[data-toggle="buttons"]'); if (b.length) { const c = this.$element.find('input'); c.prop('type') == 'radio' && (c.prop('checked') && this.$element.hasClass('active') ? a = !1 : b.find('.active').removeClass('active')), a && c.prop('checked', !this.$element.hasClass('active')).trigger('change'); }a && this.$element.toggleClass('active'); }; const c = a.fn.button; a.fn.button = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.button'); const f = typeof c === 'object' && c; e || d.data('bs.button', e = new b(this, f)), c == 'toggle' ? 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]', (b) => { let c = a(b.target); c.hasClass('btn') || (c = c.closest('.btn')), c.button('toggle'), b.preventDefault(); });
-}(jQuery)), +(function (a) {
- const 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, this.options.pause == 'hover' && 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) { const c = this; const d = this.getActiveIndex(); return b > this.$items.length - 1 || b < 0 ? void 0 : this.sliding ? this.$element.one('slid.bs.carousel', () => { 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 && (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) { const d = this.$element.find('.item.active'); let e = c || d[b](); const f = this.interval; const g = b == 'next' ? 'left' : 'right'; const h = b == 'next' ? 'first' : 'last'; const i = this; if (!e.length) { if (!this.options.wrap) return; e = this.$element.find('.item')[h](); } if (e.hasClass('active')) return this.sliding = !1; const j = a.Event('slide.bs.carousel', { relatedTarget: e[0], direction: g }); return this.$element.trigger(j), j.isDefaultPrevented() ? void 0 : (this.sliding = !0, f && this.pause(), this.$indicators.length && (this.$indicators.find('.active').removeClass('active'), this.$element.one('slid.bs.carousel', () => { const b = a(i.$indicators.children()[i.getActiveIndex()]); b && b.addClass('active'); })), a.support.transition && this.$element.hasClass('slide') ? (e.addClass(b), e[0].offsetWidth, d.addClass(g), e.addClass(g), d.one(a.support.transition.end, () => { e.removeClass([b, g].join(' ')).addClass('active'), d.removeClass(['active', g].join(' ')), i.sliding = !1, setTimeout(() => { i.$element.trigger('slid.bs.carousel'); }, 0); }).emulateTransitionEnd(1e3 * d.css('transition-duration').slice(0, -1))) : (d.removeClass('active'), e.addClass('active'), this.sliding = !1, this.$element.trigger('slid.bs.carousel')), f && this.cycle(), this); }; const c = a.fn.carousel; a.fn.carousel = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.carousel'); const f = a.extend({}, b.DEFAULTS, d.data(), typeof c === 'object' && c); const g = typeof c === 'string' ? c : f.slide; e || d.data('bs.carousel', e = new b(this, f)), typeof c === 'number' ? 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) { let c; const d = a(this); const e = a(d.attr('data-target') || (c = d.attr('href')) && c.replace(/.*(?=#[^\s]+$)/, '')); const f = a.extend({}, e.data(), d.data()); let 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', () => { a('[data-ride="carousel"]').each(function () { const b = a(this); b.carousel(b.data()); }); });
-}(jQuery)), +(function (a) {
- 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 () { const a = this.$element.hasClass('width'); return a ? 'width' : 'height'; }, b.prototype.show = function () { if (!this.transitioning && !this.$element.hasClass('in')) { const b = a.Event('show.bs.collapse'); if (this.$element.trigger(b), !b.isDefaultPrevented()) { const c = this.$parent && this.$parent.find('> .panel > .in'); if (c && c.length) { const d = c.data('bs.collapse'); if (d && d.transitioning) return; c.collapse('hide'), d || c.data('bs.collapse', null); } const e = this.dimension(); this.$element.removeClass('collapse').addClass('collapsing')[e](0), this.transitioning = 1; const f = function () { this.$element.removeClass('collapsing').addClass('collapse in')[e]('auto'), this.transitioning = 0, this.$element.trigger('shown.bs.collapse'); }; if (!a.support.transition) return f.call(this); const 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')) { const b = a.Event('hide.bs.collapse'); if (this.$element.trigger(b), !b.isDefaultPrevented()) { const c = this.dimension(); this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass('collapsing').removeClass('collapse').removeClass('in'), this.transitioning = 1; const d = function () { this.transitioning = 0, this.$element.trigger('hidden.bs.collapse').removeClass('collapsing').addClass('collapse'); }; return a.support.transition ? void this.$element[c](0).one(a.support.transition.end, a.proxy(d, this)).emulateTransitionEnd(350) : d.call(this); } } }, b.prototype.toggle = function () { this[this.$element.hasClass('in') ? 'hide' : 'show'](); }; const c = a.fn.collapse; a.fn.collapse = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.collapse'); const f = a.extend({}, b.DEFAULTS, d.data(), typeof c === 'object' && c); !e && f.toggle && c == 'show' && (c = !c), e || d.data('bs.collapse', e = new b(this, f)), typeof c === 'string' && 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) { let c; const d = a(this); const e = d.attr('data-target') || b.preventDefault() || (c = d.attr('href')) && c.replace(/.*(?=#[^\s]+$)/, ''); const f = a(e); const g = f.data('bs.collapse'); const h = g ? 'toggle' : d.data(); const i = d.attr('data-parent'); const j = i && a(i); g && g.transitioning || (j && j.find(`[data-toggle=collapse][data-parent="${i}"]`).not(d).addClass('collapsed'), d[f.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')), f.collapse(h); });
-}(jQuery)), +(function (a) {
- function b(b) { a(d).remove(), a(e).each(function () { const d = c(a(this)); const e = { relatedTarget: this }; d.hasClass('open') && (d.trigger(b = a.Event('hide.bs.dropdown', e)), b.isDefaultPrevented() || d.removeClass('open').trigger('hidden.bs.dropdown', e)); }); } function c(b) { let c = b.attr('data-target'); c || (c = b.attr('href'), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, '')); const d = c && a(c); return d && d.length ? d : b.parent(); } var d = '.dropdown-backdrop'; var e = '[data-toggle=dropdown]'; const f = function (b) { a(b).on('click.bs.dropdown', this.toggle); }; f.prototype.toggle = function (d) { const e = a(this); if (!e.is('.disabled, :disabled')) { const f = c(e); const g = f.hasClass('open'); if (b(), !g) { 'ontouchstart' in document.documentElement && !f.closest('.navbar-nav').length && a('').insertAfter(a(this)).on('click', b); const h = { relatedTarget: this }; if (f.trigger(d = a.Event('show.bs.dropdown', h)), d.isDefaultPrevented()) return; f.toggleClass('open').trigger('shown.bs.dropdown', h), e.focus(); } return !1; } }, f.prototype.keydown = function (b) { if (/(38|40|27)/.test(b.keyCode)) { const d = a(this); if (b.preventDefault(), b.stopPropagation(), !d.is('.disabled, :disabled')) { const f = c(d); const g = f.hasClass('open'); if (!g || g && b.keyCode == 27) return b.which == 27 && f.find(e).focus(), d.click(); const h = ' li:not(.divider):visible a'; const i = f.find(`[role=menu]${h}, [role=listbox]${h}`); if (i.length) { let j = i.index(i.filter(':focus')); b.keyCode == 38 && j > 0 && j--, b.keyCode == 40 && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).focus(); } } } }; const g = a.fn.dropdown; a.fn.dropdown = function (b) { return this.each(function () { const c = a(this); let d = c.data('bs.dropdown'); d || c.data('bs.dropdown', d = new f(this)), typeof b === 'string' && d[b].call(c); }); }, a.fn.dropdown.Constructor = f, a.fn.dropdown.noConflict = function () { return a.fn.dropdown = g, this; }, a(document).on('click.bs.dropdown.data-api', b).on('click.bs.dropdown.data-api', '.dropdown form', (a) => { a.stopPropagation(); }).on('click.bs.dropdown.data-api', e, f.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', `${e}, [role=menu], [role=listbox]`, f.prototype.keydown);
-}(jQuery)), +(function (a) {
- const b = function (b, c) { this.options = c, this.$element = a(b), this.$backdrop = this.isShown = null, this.options.remote && this.$element.find('.modal-content').load(this.options.remote, a.proxy(function () { this.$element.trigger('loaded.bs.modal'); }, this)); }; b.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }, b.prototype.toggle = function (a) { return this[this.isShown ? 'hide' : 'show'](a); }, b.prototype.show = function (b) { const c = this; const d = a.Event('show.bs.modal', { relatedTarget: b }); this.$element.trigger(d), this.isShown || d.isDefaultPrevented() || (this.isShown = !0, this.escape(), this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.backdrop(() => { const d = a.support.transition && c.$element.hasClass('fade'); c.$element.parent().length || c.$element.appendTo(document.body), c.$element.show().scrollTop(0), d && c.$element[0].offsetWidth, c.$element.addClass('in').attr('aria-hidden', !1), c.enforceFocus(); const e = a.Event('shown.bs.modal', { relatedTarget: b }); d ? c.$element.find('.modal-dialog').one(a.support.transition.end, () => { c.$element.focus().trigger(e); }).emulateTransitionEnd(300) : c.$element.focus().trigger(e); })); }, b.prototype.hide = function (b) { b && b.preventDefault(), b = a.Event('hide.bs.modal'), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), a(document).off('focusin.bs.modal'), this.$element.removeClass('in').attr('aria-hidden', !0).off('click.dismiss.bs.modal'), a.support.transition && this.$element.hasClass('fade') ? this.$element.one(a.support.transition.end, a.proxy(this.hideModal, this)).emulateTransitionEnd(300) : this.hideModal()); }, b.prototype.enforceFocus = function () { a(document).off('focusin.bs.modal').on('focusin.bs.modal', a.proxy(function (a) { this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.focus(); }, this)); }, b.prototype.escape = function () { this.isShown && this.options.keyboard ? this.$element.on('keyup.dismiss.bs.modal', a.proxy(function (a) { a.which == 27 && this.hide(); }, this)) : this.isShown || this.$element.off('keyup.dismiss.bs.modal'); }, b.prototype.hideModal = function () { const a = this; this.$element.hide(), this.backdrop(() => { a.removeBackdrop(), a.$element.trigger('hidden.bs.modal'); }); }, b.prototype.removeBackdrop = function () { this.$backdrop && this.$backdrop.remove(), this.$backdrop = null; }, b.prototype.backdrop = function (b) { const c = this.$element.hasClass('fade') ? 'fade' : ''; if (this.isShown && this.options.backdrop) { const d = a.support.transition && c; if (this.$backdrop = a(``).appendTo(document.body), this.$element.on('click.dismiss.bs.modal', a.proxy(function (a) { a.target === a.currentTarget && (this.options.backdrop == 'static' ? this.$element[0].focus.call(this.$element[0]) : this.hide.call(this)); }, this)), d && this.$backdrop[0].offsetWidth, this.$backdrop.addClass('in'), !b) return; d ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b(); } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass('in'), a.support.transition && this.$element.hasClass('fade') ? this.$backdrop.one(a.support.transition.end, b).emulateTransitionEnd(150) : b()) : b && b(); }; const c = a.fn.modal; a.fn.modal = function (c, d) { return this.each(function () { const e = a(this); let f = e.data('bs.modal'); const g = a.extend({}, b.DEFAULTS, e.data(), typeof c === 'object' && c); f || e.data('bs.modal', f = new b(this, g)), typeof c === 'string' ? f[c](d) : g.show && f.show(d); }); }, a.fn.modal.Constructor = b, a.fn.modal.noConflict = function () { return a.fn.modal = c, this; }, a(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (b) { const c = a(this); const d = c.attr('href'); const e = a(c.attr('data-target') || d && d.replace(/.*(?=#[^\s]+$)/, '')); const f = e.data('bs.modal') ? 'toggle' : a.extend({ remote: !/#/.test(d) && d }, e.data(), c.data()); c.is('a') && b.preventDefault(), e.modal(f, this).one('hide', () => { c.is(':visible') && c.focus(); }); }), a(document).on('show.bs.modal', '.modal', () => { a(document.body).addClass('modal-open'); }).on('hidden.bs.modal', '.modal', () => { a(document.body).removeClass('modal-open'); });
-}(jQuery)), +(function (a) {
- const b = function (a, b) { this.type = this.options = this.enabled = this.timeout = this.hoverState = this.$element = null, this.init('tooltip', a, b); }; b.DEFAULTS = {
- animation: !0, placement: 'top', selector: !1, template: '', trigger: 'hover focus', title: '', delay: 0, html: !1, container: !1,
- }, b.prototype.init = function (b, c, d) { this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d); for (let e = this.options.trigger.split(' '), f = e.length; f--;) { const g = e[f]; if (g == 'click') this.$element.on(`click.${this.type}`, this.options.selector, a.proxy(this.toggle, this)); else if (g != 'manual') { const h = g == 'hover' ? 'mouseenter' : 'focusin'; const i = g == 'hover' ? 'mouseleave' : 'focusout'; this.$element.on(`${h}.${this.type}`, this.options.selector, a.proxy(this.enter, this)), this.$element.on(`${i}.${this.type}`, this.options.selector, a.proxy(this.leave, this)); } } this.options.selector ? this._options = a.extend({}, this.options, { trigger: 'manual', selector: '' }) : this.fixTitle(); }, b.prototype.getDefaults = function () { return b.DEFAULTS; }, b.prototype.getOptions = function (b) { return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && typeof b.delay === 'number' && (b.delay = { show: b.delay, hide: b.delay }), b; }, b.prototype.getDelegateOptions = function () { const b = {}; const c = this.getDefaults(); return this._options && a.each(this._options, (a, d) => { c[a] != d && (b[a] = d); }), b; }, b.prototype.enter = function (b) { const c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); return clearTimeout(c.timeout), c.hoverState = 'in', c.options.delay && c.options.delay.show ? void (c.timeout = setTimeout(() => { c.hoverState == 'in' && c.show(); }, c.options.delay.show)) : c.show(); }, b.prototype.leave = function (b) { const c = b instanceof this.constructor ? b : a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`); return clearTimeout(c.timeout), c.hoverState = 'out', c.options.delay && c.options.delay.hide ? void (c.timeout = setTimeout(() => { c.hoverState == 'out' && c.hide(); }, c.options.delay.hide)) : c.hide(); }, b.prototype.show = function () { const b = a.Event(`show.bs.${this.type}`); if (this.hasContent() && this.enabled) { if (this.$element.trigger(b), b.isDefaultPrevented()) return; const c = this; const d = this.tip(); this.setContent(), this.options.animation && d.addClass('fade'); let e = typeof this.options.placement === 'function' ? this.options.placement.call(this, d[0], this.$element[0]) : this.options.placement; const f = /\s?auto?\s?/i; const g = f.test(e); g && (e = e.replace(f, '') || 'top'), d.detach().css({ top: 0, left: 0, display: 'block' }).addClass(e), this.options.container ? d.appendTo(this.options.container) : d.insertAfter(this.$element); const h = this.getPosition(); const i = d[0].offsetWidth; const j = d[0].offsetHeight; if (g) { const k = this.$element.parent(); const l = e; const m = document.documentElement.scrollTop || document.body.scrollTop; const n = this.options.container == 'body' ? window.innerWidth : k.outerWidth(); const o = this.options.container == 'body' ? window.innerHeight : k.outerHeight(); const p = this.options.container == 'body' ? 0 : k.offset().left; e = e == 'bottom' && h.top + h.height + j - m > o ? 'top' : e == 'top' && h.top - m - j < 0 ? 'bottom' : e == 'right' && h.right + i > n ? 'left' : e == 'left' && h.left - i < p ? 'right' : e, d.removeClass(l).addClass(e); } const q = this.getCalculatedOffset(e, h, i, j); this.applyPlacement(q, e), this.hoverState = null; const r = function () { c.$element.trigger(`shown.bs.${c.type}`); }; a.support.transition && this.$tip.hasClass('fade') ? d.one(a.support.transition.end, r).emulateTransitionEnd(150) : r(); } }, b.prototype.applyPlacement = function (b, c) { let d; const e = this.tip(); const f = e[0].offsetWidth; const g = e[0].offsetHeight; let h = parseInt(e.css('margin-top'), 10); let i = parseInt(e.css('margin-left'), 10); isNaN(h) && (h = 0), isNaN(i) && (i = 0), b.top += h, b.left += i, a.offset.setOffset(e[0], a.extend({ using(a) { e.css({ top: Math.round(a.top), left: Math.round(a.left) }); } }, b), 0), e.addClass('in'); let j = e[0].offsetWidth; let k = e[0].offsetHeight; if (c == 'top' && k != g && (d = !0, b.top = b.top + g - k), /bottom|top/.test(c)) { let l = 0; b.left < 0 && (l = -2 * b.left, b.left = 0, e.offset(b), j = e[0].offsetWidth, k = e[0].offsetHeight), this.replaceArrow(l - f + j, j, 'left'); } else this.replaceArrow(k - g, k, 'top'); d && e.offset(b); }, b.prototype.replaceArrow = function (a, b, c) { this.arrow().css(c, a ? `${50 * (1 - a / b)}%` : ''); }, b.prototype.setContent = function () { const a = this.tip(); const b = this.getTitle(); a.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](b), a.removeClass('fade in top bottom left right'); }, b.prototype.hide = function () { function b() { c.hoverState != 'in' && d.detach(), c.$element.trigger(`hidden.bs.${c.type}`); } var c = this; var d = this.tip(); const e = a.Event(`hide.bs.${this.type}`); return this.$element.trigger(e), e.isDefaultPrevented() ? void 0 : (d.removeClass('in'), a.support.transition && this.$tip.hasClass('fade') ? d.one(a.support.transition.end, b).emulateTransitionEnd(150) : b(), this.hoverState = null, this); }, b.prototype.fixTitle = function () { const a = this.$element; (a.attr('title') || typeof a.attr('data-original-title') !== 'string') && a.attr('data-original-title', a.attr('title') || '').attr('title', ''); }, b.prototype.hasContent = function () { return this.getTitle(); }, b.prototype.getPosition = function () { const b = this.$element[0]; return a.extend({}, typeof b.getBoundingClientRect === 'function' ? b.getBoundingClientRect() : { width: b.offsetWidth, height: b.offsetHeight }, this.$element.offset()); }, b.prototype.getCalculatedOffset = function (a, b, c, d) { return a == 'bottom' ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 } : a == 'top' ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 } : a == 'left' ? { top: b.top + b.height / 2 - d / 2, left: b.left - c } : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width }; }, b.prototype.getTitle = function () { let a; const b = this.$element; const c = this.options; return a = b.attr('data-original-title') || (typeof c.title === 'function' ? c.title.call(b[0]) : c.title); }, b.prototype.tip = function () { return this.$tip = this.$tip || a(this.options.template); }, b.prototype.arrow = function () { return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'); }, b.prototype.validate = function () { this.$element[0].parentNode || (this.hide(), this.$element = null, this.options = null); }, b.prototype.enable = function () { this.enabled = !0; }, b.prototype.disable = function () { this.enabled = !1; }, b.prototype.toggleEnabled = function () { this.enabled = !this.enabled; }, b.prototype.toggle = function (b) { const c = b ? a(b.currentTarget)[this.type](this.getDelegateOptions()).data(`bs.${this.type}`) : this; c.tip().hasClass('in') ? c.leave(c) : c.enter(c); }, b.prototype.destroy = function () { clearTimeout(this.timeout), this.hide().$element.off(`.${this.type}`).removeData(`bs.${this.type}`); }; const c = a.fn.tooltip; a.fn.tooltip = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.tooltip'); const f = typeof c === 'object' && c; (e || c != 'destroy') && (e || d.data('bs.tooltip', e = new b(this, f)), typeof c === 'string' && e[c]()); }); }, a.fn.tooltip.Constructor = b, a.fn.tooltip.noConflict = function () { return a.fn.tooltip = c, this; };
-}(jQuery)), +(function (a) {
- const b = function (a, b) { this.init('popover', a, b); }; if (!a.fn.tooltip) throw new Error('Popover requires tooltip.js'); b.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right', trigger: 'click', content: '', template: '',
- }), b.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), b.prototype.constructor = b, b.prototype.getDefaults = function () { return b.DEFAULTS; }, b.prototype.setContent = function () { const a = this.tip(); const b = this.getTitle(); const c = this.getContent(); a.find('.popover-title')[this.options.html ? 'html' : 'text'](b), a.find('.popover-content')[this.options.html ? typeof c === 'string' ? 'html' : 'append' : '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 () { const a = this.$element; const b = this.options; return a.attr('data-content') || (typeof b.content === 'function' ? 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; }; const c = a.fn.popover; a.fn.popover = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.popover'); const f = typeof c === 'object' && c; (e || c != 'destroy') && (e || d.data('bs.popover', e = new b(this, f)), typeof c === 'string' && e[c]()); }); }, a.fn.popover.Constructor = b, a.fn.popover.noConflict = function () { return a.fn.popover = c, this; };
-}(jQuery)), +(function (a) {
- function b(c, d) { let e; const f = a.proxy(this.process, this); this.$element = a(a(c).is('body') ? window : 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 () { const b = this.$element[0] == window ? 'offset' : 'position'; this.offsets = a([]), this.targets = a([]); { const c = this; this.$body.find(this.selector).map(function () { const d = a(this); const e = d.data('target') || d.attr('href'); const f = /^#./.test(e) && a(e); return f && f.length && f.is(':visible') && [[f[b]().top + (!a.isWindow(c.$scrollElement.get(0)) && c.$scrollElement.scrollTop()), e]] || null; }).sort((a, b) => a[0] - b[0]).each(function () { c.offsets.push(this[0]), c.targets.push(this[1]); }); } }, b.prototype.process = function () { let a; const b = this.$scrollElement.scrollTop() + this.options.offset; const c = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight; const d = c - this.$scrollElement.height(); const e = this.offsets; const f = this.targets; const g = this.activeTarget; if (b >= d) return g != (a = f.last()[0]) && this.activate(a); if (g && b <= e[0]) return g != (a = f[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).parentsUntil(this.options.target, '.active').removeClass('active'); const c = `${this.selector}[data-target="${b}"],${this.selector}[href="${b}"]`; let d = a(c).parents('li').addClass('active'); d.parent('.dropdown-menu').length && (d = d.closest('li.dropdown').addClass('active')), d.trigger('activate.bs.scrollspy'); }; const c = a.fn.scrollspy; a.fn.scrollspy = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.scrollspy'); const f = typeof c === 'object' && c; e || d.data('bs.scrollspy', e = new b(this, f)), typeof c === 'string' && e[c](); }); }, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () { return a.fn.scrollspy = c, this; }, a(window).on('load', () => { a('[data-spy="scroll"]').each(function () { const b = a(this); b.scrollspy(b.data()); }); });
-}(jQuery)), +(function (a) {
- const b = function (b) { this.element = a(b); }; b.prototype.show = function () { const b = this.element; const c = b.closest('ul:not(.dropdown-menu)'); let d = b.data('target'); if (d || (d = b.attr('href'), d = d && d.replace(/.*(?=#[^\s]*$)/, '')), !b.parent('li').hasClass('active')) { const e = c.find('.active:last a')[0]; const f = a.Event('show.bs.tab', { relatedTarget: e }); if (b.trigger(f), !f.isDefaultPrevented()) { const g = a(d); this.activate(b.parent('li'), c), this.activate(g, g.parent(), () => { 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'); var g = d && a.support.transition && f.hasClass('fade'); g ? f.one(a.support.transition.end, e).emulateTransitionEnd(150) : e(), f.removeClass('in'); }; const c = a.fn.tab; a.fn.tab = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.tab'); e || d.data('bs.tab', e = new b(this)), typeof c === 'string' && 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'); });
-}(jQuery)), +(function (a) {
- 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 = this.pinnedOffset = null, this.checkPosition(); }; b.RESET = 'affix affix-top affix-bottom', b.DEFAULTS = { offset: 0 }, b.prototype.getPinnedOffset = function () { if (this.pinnedOffset) return this.pinnedOffset; this.$element.removeClass(b.RESET).addClass('affix'); const a = this.$window.scrollTop(); const c = this.$element.offset(); return this.pinnedOffset = c.top - a; }, b.prototype.checkPositionWithEventLoop = function () { setTimeout(a.proxy(this.checkPosition, this), 1); }, b.prototype.checkPosition = function () { if (this.$element.is(':visible')) { const c = a(document).height(); const d = this.$window.scrollTop(); const e = this.$element.offset(); const f = this.options.offset; let g = f.top; let h = f.bottom; this.affixed == 'top' && (e.top += d), typeof f !== 'object' && (h = g = f), typeof g === 'function' && (g = f.top(this.$element)), typeof h === 'function' && (h = f.bottom(this.$element)); const i = this.unpin != null && d + this.unpin <= e.top ? !1 : h != null && e.top + this.$element.height() >= c - h ? 'bottom' : g != null && g >= d ? 'top' : !1; if (this.affixed !== i) { this.unpin && this.$element.css('top', ''); const j = `affix${i ? `-${i}` : ''}`; const k = a.Event(`${j}.bs.affix`); this.$element.trigger(k), k.isDefaultPrevented() || (this.affixed = i, this.unpin = i == 'bottom' ? this.getPinnedOffset() : null, this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace('affix', 'affixed'))), i == 'bottom' && this.$element.offset({ top: c - h - this.$element.height() })); } } }; const c = a.fn.affix; a.fn.affix = function (c) { return this.each(function () { const d = a(this); let e = d.data('bs.affix'); const f = typeof c === 'object' && c; e || d.data('bs.affix', e = new b(this, f)), typeof c === 'string' && e[c](); }); }, a.fn.affix.Constructor = b, a.fn.affix.noConflict = function () { return a.fn.affix = c, this; }, a(window).on('load', () => { a('[data-spy="affix"]').each(function () { const b = a(this); const c = b.data(); c.offset = c.offset || {}, c.offsetBottom && (c.offset.bottom = c.offsetBottom), c.offsetTop && (c.offset.top = c.offsetTop), b.affix(c); }); });
-}(jQuery));
diff --git a/packages/mindplot/test/playground/map-render/js/editor.js b/packages/mindplot/test/playground/map-render/js/editor.js
index d415f742..33b205b3 100644
--- a/packages/mindplot/test/playground/map-render/js/editor.js
+++ b/packages/mindplot/test/playground/map-render/js/editor.js
@@ -1,21 +1,17 @@
import '../css/editor.less';
-import { buildDesigner, buildOptions, loadExample } from '../../../../src/components/DesignerBuilder';
+import { buildDesigner, buildOptions } from '../../../../src/components/DesignerBuilder';
import { PersistenceManager, LocalStorageManager } from '../../../../src';
-const example = async () => {
- const p = new LocalStorageManager('samples/{id}.xml');
- const options = buildOptions({ persistenceManager: p });
- const designer = buildDesigner(options);
+const p = new LocalStorageManager('samples/{id}.xml');
+const options = buildOptions({ persistenceManager: p });
+const designer = buildDesigner(options);
- designer.addEvent('loadSuccess', () => {
- document.getElementById('mindplot').classList.add('ready');
- });
+designer.addEvent('loadSuccess', () => {
+ document.getElementById('mindplot').classList.add('ready');
+});
- // Load map from XML file persisted on disk...
- const mapId = 'welcome';
- const persistence = PersistenceManager.getInstance();
- const mindmap = persistence.load(mapId);
- designer.loadMap(mindmap);
-};
-
-loadExample(example);
+// Load map from XML file persisted on disk...
+const mapId = 'welcome';
+const persistence = PersistenceManager.getInstance();
+const mindmap = persistence.load(mapId);
+designer.loadMap(mindmap);
diff --git a/packages/mindplot/test/playground/map-render/js/embedded.js b/packages/mindplot/test/playground/map-render/js/embedded.js
index c56f2eab..91c38f55 100644
--- a/packages/mindplot/test/playground/map-render/js/embedded.js
+++ b/packages/mindplot/test/playground/map-render/js/embedded.js
@@ -1,22 +1,18 @@
import '../css/embedded.less';
-import { buildDesigner, buildOptions, loadExample } from '../../../../src/components/DesignerBuilder';
+import { buildDesigner, buildOptions } from '../../../../src/components/DesignerBuilder';
import { PersistenceManager, LocalStorageManager } from '../../../../src';
-const example = async () => {
- // Options has been defined in by a external ile ?
- const p = new LocalStorageManager('samples/{id}.xml');
- const options = buildOptions({ persistenceManager: p });
- const designer = buildDesigner(options);
+// Options has been defined in by a external ile ?
+const p = new LocalStorageManager('samples/{id}.xml');
+const options = buildOptions({ persistenceManager: p });
+const designer = buildDesigner(options);
- designer.addEvent('loadSuccess', () => {
- document.getElementById('mindplot').classList.add('ready');
- });
+designer.addEvent('loadSuccess', () => {
+ document.getElementById('mindplot').classList.add('ready');
+});
- // Load map from XML file persisted on disk...
- const mapId = 'welcome';
- const persistence = PersistenceManager.getInstance();
- const mindmap = persistence.load(mapId);
- designer.loadMap(mindmap);
-};
-
-loadExample(example);
+// Load map from XML file persisted on disk...
+const mapId = 'welcome';
+const persistence = PersistenceManager.getInstance();
+const mindmap = persistence.load(mapId);
+designer.loadMap(mindmap);
diff --git a/packages/mindplot/test/playground/map-render/js/viewmode.js b/packages/mindplot/test/playground/map-render/js/viewmode.js
index 5403bc5e..436e6ba7 100644
--- a/packages/mindplot/test/playground/map-render/js/viewmode.js
+++ b/packages/mindplot/test/playground/map-render/js/viewmode.js
@@ -1,21 +1,17 @@
import '../css/embedded.less';
-import { buildDesigner, buildOptions, loadExample } from '../../../../src/components/DesignerBuilder';
+import { buildDesigner, buildOptions } from '../../../../src/components/DesignerBuilder';
import { PersistenceManager, LocalStorageManager } from '../../../../src';
-const example = async () => {
- const p = new LocalStorageManager('samples/{id}.xml');
- const options = buildOptions({ persistenceManager: p, readOnly: false });
+const p = new LocalStorageManager('samples/{id}.xml');
+const options = buildOptions({ persistenceManager: p, readOnly: false });
- const mapId = 'welcome';
- const designer = buildDesigner(options);
- designer.addEvent('loadSuccess', () => {
- document.getElementById('mindplot').classList.add('ready');
- });
+const mapId = 'welcome';
+const designer = buildDesigner(options);
+designer.addEvent('loadSuccess', () => {
+ document.getElementById('mindplot').classList.add('ready');
+});
- // Load map from XML file persisted on disk...
- const persistence = PersistenceManager.getInstance();
- const mindmap = persistence.load(mapId);
- designer.loadMap(mindmap);
-};
-
-loadExample(example);
+// Load map from XML file persisted on disk...
+const persistence = PersistenceManager.getInstance();
+const mindmap = persistence.load(mapId);
+designer.loadMap(mindmap);
diff --git a/packages/mindplot/webpack.playground.js b/packages/mindplot/webpack.playground.js
index 03e2118c..e163d1fd 100644
--- a/packages/mindplot/webpack.playground.js
+++ b/packages/mindplot/webpack.playground.js
@@ -38,7 +38,7 @@ const playgroundConfig = {
{ from: 'test/playground/map-render/images', to: 'images' },
{ from: 'test/playground/map-render/js', to: 'js' },
{ from: 'test/playground/map-render/samples', to: 'samples' },
- { from: 'test/playground/map-render/bootstrap', to: 'bootstrap' },
+ { from: '../../libraries/bootstrap', to: 'bootstrap' },
{ from: 'test/playground/index.html', to: 'index.html' },
{ from: 'test/playground/map-render/html/container.json', to: 'html/container.json' },
{ from: 'test/playground/map-render/html/container.html', to: 'container.html' },