/*! * Ace v1.4.0 */ if("undefined"==typeof jQuery)throw new Error("Ace's JavaScript requires jQuery");!function(a,b){var c=function(b,c){function d(a){a.preventDefault(),a.stopPropagation();var b=A.offset(),c=b[o],d=u?a.pageY:a.pageX;d>c+G?(G=d-c-F+I,G>H&&(G=H)):(G=d-c-I,0>G&&(G=0)),l.update_scroll()}function e(b){b.preventDefault(),b.stopPropagation(),ba=aa=u?b.pageY:b.pageX,Q=!0,a("html").off("mousemove.ace_scroll").on("mousemove.ace_scroll",f),a(R).off("mouseup.ace_scroll").on("mouseup.ace_scroll",g),A.addClass("active"),S&&l.$element.trigger("drag.start")}function f(a){a.preventDefault(),a.stopPropagation(),ba=u?a.pageY:a.pageX,ba-aa+G>H?ba=aa+H-G:0>ba-aa+G&&(ba=aa-G),G+=ba-aa,aa=ba,0>G?G=0:G>H&&(G=H),l.update_scroll()}function g(b){b.preventDefault(),b.stopPropagation(),Q=!1,a("html").off(".ace_scroll"),a(R).off(".ace_scroll"),A.removeClass("active"),S&&l.$element.trigger("drag.end"),w&&W&&!Y&&i()}function h(a){var b=+new Date;if(Z&&b-da>1e3){var c=z[t];$!=c&&($=c,_=!0,l.reset(!0)),da=b}w&&W&&(null!=ca&&(clearTimeout(ca),ca=null),A.addClass("not-idle"),Y||1!=a||i())}function i(){null!=ca&&(clearTimeout(ca),ca=null),ca=setTimeout(function(){ca=null,A.removeClass("not-idle")},X)}function j(){A.css("visibility","hidden").addClass("scroll-hover"),N=u?parseInt(A.outerWidth())||0:parseInt(A.outerHeight())||0,A.css("visibility","").removeClass("scroll-hover")}function k(){if(V!==!1){var a=y.offset(),b=a.left,c=a.top;u?M||(b+=y.outerWidth()-N):M||(c+=y.outerHeight()-N),V===!0?A.css({top:parseInt(c),left:parseInt(b)}):"left"===V?A.css("left",parseInt(b)):"top"===V&&A.css("top",parseInt(c))}}var l=this,m=ace.helper.getAttrSettings(b,a.fn.ace_scroll.defaults),n=a.extend({},a.fn.ace_scroll.defaults,c,m);this.size=0,this.lock=!1,this.lock_anyway=!1,this.$element=a(b),this.element=b;var o,p,q,r,s,t,u=!0,v=!1,w=!1,x=!1,y=null,z=null,A=null,B=null,C=null,D=null,E=null,F=0,G=0,H=0,I=0,J=!0,K=!1,L="",M=!1,N=0,O=1,P=!1,Q=!1,R="onmouseup"in window?window:"html",S=n.dragEvent||!1,T=c.scrollEvent||!1,U=n.detached||!1,V=n.updatePos||!1,W=n.hideOnIdle||!1,X=n.hideDelay||1500,Y=!1,Z=n.observeContent||!1,$=0,_=!0;this.ref=function(){return this},this.create=function(b){if(!x){b&&(n=a.extend({},a.fn.ace_scroll.defaults,b)),this.size=parseInt(this.$element.attr("data-size"))||n.size||200,u=!n.horizontal,o=u?"top":"left",p=u?"height":"width",q=u?"maxHeight":"maxWidth",r=u?"clientHeight":"clientWidth",s=u?"scrollTop":"scrollLeft",t=u?"scrollHeight":"scrollWidth",this.$element.addClass("ace-scroll"),"static"==this.$element.css("position")?(P=this.element.style.position,this.element.style.position="relative"):P=!1;var c=null;U?c=a('
').appendTo("body"):(this.$element.wrapInner('
'),this.$element.prepend('
')),y=this.$element,U||(y=this.$element.find(".scroll-content").eq(0)),u||y.wrapInner("
"),z=y.get(0),U?(A=c,k()):A=this.$element.find(".scroll-track").eq(0),B=A.find(".scroll-bar").eq(0),C=A.get(0),D=B.get(0),E=D.style,u||A.addClass("scroll-hz"),n.styleClass&&(L=n.styleClass,A.addClass(L),M=!!L.match(/scroll\-left|scroll\-top/)),0==N&&(A.show(),j()),A.hide(),A.on("mousedown",d),B.on("mousedown",e),y.on("scroll",function(){J&&(G=parseInt(Math.round(this[s]*O)),E[o]=G+"px"),J=!1,T&&this.$element.trigger("scroll",[z])}),n.mouseWheel&&(this.lock=n.mouseWheelLock,this.lock_anyway=n.lockAnyway,this.$element.on(a.event.special.mousewheel?"mousewheel.ace_scroll":"mousewheel.ace_scroll DOMMouseScroll.ace_scroll",function(b){if(!v){if(h(!0),!w)return!l.lock_anyway;Q&&(Q=!1,a("html").off(".ace_scroll"),a(R).off(".ace_scroll"),S&&l.$element.trigger("drag.end")),b.deltaY=b.deltaY||0;var c=b.deltaY>0||b.originalEvent.detail<0||b.originalEvent.wheelDelta>0?1:-1,d=!1,e=z[r],f=z[s];l.lock||(d=-1==c?z[t]<=f+e:0==f),l.move_bar(!0);var g=parseInt(e/8);return 80>g&&(g=80),g>l.size&&(g=l.size),g+=1,z[s]=f-c*g,d&&!l.lock_anyway}}));var f=ace.vars.touch&&"ace_drag"in a.event.special&&n.touchDrag;if(f){var g="",m=f?"ace_drag":"swipe";this.$element.on(m+".ace_scroll",function(a){if(v)return void(a.retval.cancel=!0);if(h(!0),!w)return void(a.retval.cancel=this.lock_anyway);if(g=a.direction,u&&("up"==g||"down"==g)||!u&&("left"==g||"right"==g)){var b=u?a.dy:a.dx;0!=b&&(Math.abs(b)>20&&f&&(b=2*b),l.move_bar(!0),z[s]=z[s]+b)}})}W&&A.addClass("idle-hide"),Z&&A.on("mouseenter.ace_scroll",function(){Y=!0,h(!1)}).on("mouseleave.ace_scroll",function(){Y=!1,0==Q&&i()}),this.$element.on("mouseenter.ace_scroll touchstart.ace_scroll",function(a){_=!0,Z?h(!0):n.hoverReset&&l.reset(!0),A.addClass("scroll-hover")}).on("mouseleave.ace_scroll touchend.ace_scroll",function(){A.removeClass("scroll-hover")}),u||y.children(0).css(p,this.size),y.css(q,this.size),v=!1,x=!0}},this.is_active=function(){return w},this.is_enabled=function(){return!v},this.move_bar=function(a){J=a},this.get_track=function(){return C},this.reset=function(a){if(!v){x||this.create();var b=this.size;if(!a||_){if(_=!1,U){var c=parseInt(Math.round((parseInt(y.css("border-top-width"))+parseInt(y.css("border-bottom-width")))/2.5));b-=c}var d=u?z[t]:b;if(u&&0==d||!u&&0==this.element.scrollWidth)return void A.removeClass("scroll-active");var e=u?b:z.clientWidth;u||y.children(0).css(p,b),y.css(q,this.size),d>e?(w=!0,A.css(p,e).show(),O=parseFloat((e/d).toFixed(5)),F=parseInt(Math.round(e*O)),I=parseInt(Math.round(F/2)),H=e-F,G=parseInt(Math.round(z[s]*O)),E[p]=F+"px",E[o]=G+"px",A.addClass("scroll-active"),0==N&&j(),K||(n.reset&&(z[s]=0,E[o]=0),K=!0),U&&k()):(w=!1,A.hide(),A.removeClass("scroll-active"),y.css(q,""))}}},this.disable=function(){z[s]=0,E[o]=0,v=!0,w=!1,A.hide(),this.$element.addClass("scroll-disabled"),A.removeClass("scroll-active"),y.css(q,"")},this.enable=function(){v=!1,this.$element.removeClass("scroll-disabled")},this.destroy=function(){w=!1,v=!1,x=!1,this.$element.removeClass("ace-scroll scroll-disabled scroll-active"),this.$element.off(".ace_scroll"),U||(u||y.find("> div").children().unwrap(),y.children().unwrap(),y.remove()),A.remove(),P!==!1&&(this.element.style.position=P),null!=ca&&(clearTimeout(ca),ca=null)},this.modify=function(b){b&&(n=a.extend({},n,b)),this.destroy(),this.create(),_=!0,this.reset(!0)},this.update=function(b){b&&(n=a.extend({},n,b)),this.size=n.size||this.size,this.lock=n.mouseWheelLock||this.lock,this.lock_anyway=n.lockAnyway||this.lock_anyway,W=n.hideOnIdle||W,X=n.hideDelay||X,Z=n.observeContent||!1,S=n.dragEvent||!1,"undefined"!=typeof b.styleClass&&(L&&A.removeClass(L),L=b.styleClass,L&&A.addClass(L),M=!!L.match(/scroll\-left|scroll\-top/))},this.start=function(){z[s]=0},this.end=function(){z[s]=z[t]},this.hide=function(){A.hide()},this.show=function(){A.show()},this.update_scroll=function(){J=!1,E[o]=G+"px",z[s]=parseInt(Math.round(G/O))};var aa=-1,ba=-1,ca=null,da=0;return this.track_size=function(){return 0==N&&j(),N},this.create(),_=!0,this.reset(!0),$=z[t],this};a.fn.ace_scroll=function(d,e){var f,g=this.each(function(){var b=a(this),g=b.data("ace_scroll"),h="object"==typeof d&&d;g||b.data("ace_scroll",g=new c(this,h)),"string"==typeof d&&(f=g[d](e))});return f===b?g:f},a.fn.ace_scroll.defaults={size:200,horizontal:!1,mouseWheel:!0,mouseWheelLock:!1,lockAnyway:!1,styleClass:!1,observeContent:!1,hideOnIdle:!1,hideDelay:1500,hoverReset:!0,reset:!1,dragEvent:!1,touchDrag:!0,touchSwipe:!1,scrollEvent:!1,detached:!1,updatePos:!0}}(window.jQuery),function(a,b){var c=function(b,c){var d=ace.helper.getAttrSettings(b,a.fn.ace_colorpicker.defaults),e=a.extend({},a.fn.ace_colorpicker.defaults,c,d),f=a(b),g="",h="",i=null,j=[];f.addClass("hide").find("option").each(function(){var a="colorpick-btn",b=this.value.replace(/[^\w\s,#\(\)\.]/g,"");b.indexOf("number")>=0||(this.value!=b&&(this.value=b),this.selected&&(a+=" selected",h=b),j.push(b),g+='
  • ')}).end().on("change.color",function(){f.next().find(".btn-colorpicker").css("background-color",this.value)}).after('");var k=f.next().find(".dropdown-menu");k.on(ace.click_event,function(b,c){var d=a(b.target);if(!d.is(".colorpick-btn"))return!1;i&&i.removeClass("selected"),i=d,i.addClass("selected");var e=i.data("color");return c!==!0&&f.val(e).trigger("change"),f.next().find(".btn-colorpicker").css("background-color",e),b.preventDefault(),!0}),i=f.next().find("a.selected"),this.pick=function(c,d){if("number"==typeof c){if(c>=j.length)return;b.selectedIndex=c,k.find("a:eq("+c+")").trigger(ace.click_event,[!0])}else if("string"==typeof c){var e=c.replace(/[^\w\s,#\(\)\.]/g,"");if(c=j.indexOf(e),-1==c&&d===!0&&(j.push(e),a("