1!function(a,b){"function"==typeof define&&define.amd?define("pnotify",["jquery"],function(c){return b(c,a)}):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),global||a):a.PNotify=b(a.jQuery,a)}(this,function(a,b){var c=function(b){var d,e,f={dir1:"down",dir2:"left",push:"bottom",spacing1:36,spacing2:36,context:a("body"),modal:!1},g=a(b),h=function(){e=a("body"),j.prototype.options.stack.context=e,g=a(b),g.bind("resize",function(){d&&clearTimeout(d),d=setTimeout(function(){j.positionAll(!0)},10)})},i=function(b){var c=a("<div />",{class:"ui-pnotify-modal-overlay"});return c.prependTo(b.context),b.overlay_close&&c.click(function(){j.removeStack(b)}),c},j=function(a){this.parseOptions(a),this.init()};return a.extend(j.prototype,{version:"3.0.0",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"brighttheme",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,animation:"fade",animate_speed:"normal",shadow:!0,hide:!0,delay:8e3,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:f},modules:{},runModules:function(a,b){var c;for(var d in this.modules)c="object"==typeof b&&d in b?b[d]:b,"function"==typeof this.modules[d][a]&&(this.modules[d].notice=this,this.modules[d].options="object"==typeof this.options[d]?this.options[d]:{},this.modules[d][a](this,"object"==typeof this.options[d]?this.options[d]:{},c))},state:"initializing",timer:null,animTimer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,timerHide:!1,init:function(){var b=this;return this.modules={},a.extend(!0,this.modules,j.prototype.modules),"object"==typeof this.options.styling?this.styles=this.options.styling:this.styles=j.styling[this.options.styling],this.elem=a("<div />",{class:"ui-pnotify "+this.options.addclass,css:{display:"none"},"aria-live":"assertive","aria-role":"alertdialog",mouseenter:function(a){if(b.options.mouse_reset&&"out"===b.animating){if(!b.timerHide)return;b.cancelRemove()}b.options.hide&&b.options.mouse_reset&&b.cancelRemove()},mouseleave:function(a){b.options.hide&&b.options.mouse_reset&&"out"!==b.animating&&b.queueRemove(),j.positionAll()}}),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed),this.container=a("<div />",{class:this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),role:"alert"}).appendTo(this.elem),""!==this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass),this.options.shadow&&this.container.addClass("ui-pnotify-sha
1dow"),this.options.icon!==!1&&a("<div />",{class:"ui-pnotify-icon"}).append(a("<span />",{class:this.options.icon===!0?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container),this.title_container=a("<h4 />",{class:"ui-pnotify-title"}).appendTo(this.container),this.options.title===!1?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),this.text_container=a("<div />",{class:"ui-pnotify-text","aria-role":"alert"}).appendTo(this.container),this.options.text===!1?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),"string"==typeof this.options.width&&this.elem.css("width",this.options.width),"string"==typeof this.options.min_height&&this.container.css("min-height",this.options.min_height),"top"===this.options.stack.push?j.notices=a.merge([this],j.notices):j.notices=a.merge(j.notices,[this]),"top"===this.options.stack.push&&this.queuePosition(!1,1),this.options.stack.animation=!1,this.runModules("init"),this.options.auto_display&&this.open(),this},update:function(b){var c=this.options;return this.parseOptions(c,b),this.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-"+this.options.animate_speed),this.options.cornerclass!==c.cornerclass&&this.container.removeClass("ui-corner-all "+c.cornerclass).addClass(this.options.cornerclass),this.options.shadow!==c.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-sha
1dow"):this.container.removeClass("ui-pnotify-shadow")),this.options.addclass===!1?this.elem.removeClass(c.addclass):this.options.addclass!==c.addclass&&this.elem.removeClass(c.addclass).addClass(this.options.addclass),this.options.title===!1?this.title_container.slideUp("fast"):this.options.title!==c.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),c.title===!1&&this.title_container.slideDown(200)),this.options.text===!1?this.text_container.slideUp("fast"):this.options.text!==c.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),c.text===!1&&this.text_container.slideDown(200)),this.options.type!==c.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),(this.options.icon!==c.icon||this.options.icon===!0&&this.options.type!==c.type)&&(this.container.find("div.ui-pnotify-icon").remove(),this.options.icon!==!1&&a("<div />",{class:"ui-pnotify-icon"}).append(a("<span />",{class:this.options.icon===!0?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)),this.options.width!==c.width&&this.elem.animate({width:this.options.width}),this.options.min_height!==c.min_height&&this.container.animate({minHeight:this.options.min_height}),this.options.hide?c.hide||this.queueRemove():this.cancelRemove(),this.queuePosition(!0),this.runModules("update",c),this},open:function(){this.state="opening",this.runModules("beforeOpen");var a=this;return this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:e),"top"!==this.options.stack.push&&this.position(!0),this.animateIn(function(){a.queuePosition(!0),a.options.hide&&a.queueRemove(),a.state="open",a.runModules("afterOpen")}),this},remove:function(c){this.state="closing",this.timerHide=!!c,this.runModules("beforeClose");var d=this;return this.timer&&(b.clearTimeout(this.timer),this.timer=null),this.animateOut(function(){if(d.state="closed",d.runModules("afterClose"),d.queuePosition(!0),d.options.remove&&d.elem.detach(),d.runModules("beforeDestroy"),d.options.destroy&&null!==j.notices){var b=a.inArray(d,j.notices);b!==-1&&j.notices.splice(b,1)}d.runModules("afterDestroy")}),this},get:function(){return this.elem},parseOptions:function(b,c){this.options=a.extend(!0,{},j.prototype.options),this.options.stack=j.prototype.options.stack;for(var d,e=[b,c],f=0;f<e.length&&(d=e[f],"undefined"!=typeof d);f++)if("object"!=typeof d)this.options.text=d;else for(var g in d)this.modules[g]?a.extend(!0,this.options[g],d[g]):this.options[g]=d[g]},animateIn:function(a){this.animating="in";var b=this;a=function(){b.animTimer&&clearTimeout(b.animTimer),"in"===b.animating&&(b.elem.is(":visible")?(this&&this.call(),b.animating=!1):b.animTimer=setTimeout(a,40))}.bind(a),"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",a).addClass("ui-pnotify-in"),this.elem.css("opacity"),this.elem.addClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(a,650)):(this.elem.addClass("ui-pnotify-in"),a())},animateOut:function(a){this.animating="out";var b=this;a=function(){b.animTimer&&clearTimeout(b.animTimer),"out"===b.animating&&("0"!=b.elem.css("opacity")&&b.elem.is(":visible")?b.animTimer=setTimeout(a,40):(b.elem.removeClass("ui-pnotify-in"),this&&this.call(),b.animating=!1))}.bind(a),"fade"===this.options.animation?(this.elem.one("webkitTransitionEnd mozTransitionEnd MSTransitionEnd oTransitionEnd transitionend",a).removeClass("ui-pnotify-fade-in"),this.animTimer=setTimeout(a,650)):(this.elem.removeClass("ui-pnotify-in"),a())},position:function(a){var b=this.options.stack,c=this.elem;if("undefined"==typeof b.context&&(b.context=e),b){"number"!=typeof b.nextpos1&&(b.nextpos1=b.firstpos1),"number"!=typeof b.nextpos2&&(b.nextpos2=b.firstpos2),"number"!=typeof b.addpos2&&(b.addpos2=0);var d=!c.hasClass("ui-pnotify-in");if(!d||a){b.modal&&(b.overlay?b.overlay.show():b.overlay=i(b)),c.addClass("ui-pnotify-move");var f,h,j;switch(b.dir1){case"down":j="top";break;case"up":j="bottom";break;case"left":j="right";break;case"right":j="left"}f=parseInt(c.css(j).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(f)&&(f=0),"undefined"!=typeof b.firstpos1||d||(b.firstpos1=f,b.nextpos1=b.firstpos1);var k;switch(b.dir2){case"down":k="top";break;case"up":k="bottom";break;case"left":k="right";break;case"right":k="left"}switch(h=parseInt(c.css(k).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(h)&&(h=0),"undefined"!=typeof b.firstpos2||d||(b.firstpos2=h,b.nextpos2=b.firstpos2),("down"===b.dir1&&b.nextpos1+c.height()>
1(b.context.is(e)?g.height():b.context.prop("scrollHeight"))||"up"===b.dir1&&b.nextpos1+c.height()>(b.context.is(e)?g.height():b.context.prop("scrollHeight"))||"left"===b.dir1&&b.nextpos1+c.width()>(b.context.is(e)?g.width():b.context.prop("scrollWidth"))||"right"===b.dir1&&b.nextpos1+c.width()>(b.context.is(e)?g.width():b.context.prop("scrollWidth")))&&(b.nextpos1=b.firstpos1,b.nextpos2+=b.addpos2+("undefined"==typeof b.spacing2?25:b.spacing2),b.addpos2=0),"number"==typeof b.nextpos2&&(b.animation?c.css(k,b.nextpos2+"px"):(c.removeClass("ui-pnotify-move"),c.css(k,b.nextpos2+"px"),c.css(k),c.addClass("ui-pnotify-move"))),b.dir2){case"down":case"up":c.outerHeight(!0)>b.addpos2&&(b.addpos2=c.height());break;case"left":case"right":c.outerWidth(!0)>b.addpos2&&(b.addpos2=c.width())}switch("number"==typeof b.nextpos1&&(b.animation?c.css(j,b.nextpos1+"px"):(c.removeClass("ui-pnotify-move"),c.css(j,b.nextpos1+"px"),c.css(j),c.addClass("ui-pnotify-move"))),b.dir1){case"down":case"up":b.nextpos1+=c.height()+("undefined"==typeof b.spacing1?25:b.spacing1);break;case"left":case"right":b.nextpos1+=c.width()+("undefined"==typeof b.spacing1?25:b.spacing1)}}return this}},queuePosition:function(a,b){return d&&clearTimeout(d),b||(b=10),d=setTimeout(function(){j.positionAll(a)},b),this},cancelRemove:function(){return this.timer&&b.clearTimeout(this.timer),this.animTimer&&b.clearTimeout(this.animTimer),"closing"===this.state&&(this.state="open",this.animating=!1,this.elem.addClass("ui-pnotify-in"),"fade"===this.options.animation&&this.elem.addClass("ui-pnotify-fade-in")),this},queueRemove:function(){var a=this;return this.cancelRemove(),this.timer=b.setTimeout(function(){a.remove(!0)},isNaN(this.options.delay)?0:this.options.delay),this}}),a.extend(j,{notices:[],reload:c,removeAll:function(){a.each(j.notices,function(){this.remove&&this.remove(!1)})},removeStack:function(b){a.each(j.notices,function(){this.remove&&this.options.stack===b&&this.remove(!1)})},positionAll:function(b){if(d&&clearTimeout(d),d=null,j.notices&&j.notices.length)a.each(j.notices,function(){var a=this.options.stack;a&&(a.overlay&&a.overlay.hide(),a.nextpos1=a.firstpos1,a.nextpos2=a.firstpos2,a.addpos2=0,a.animation=b)}),a.each(j.notices,function(){this.position()});else{var c=j.prototype.options.stack;c&&(delete c.nextpos1,delete c.nextpos2)}},styling:{brighttheme:{container:"brighttheme",notice:"brighttheme-notice",notice_icon:"brighttheme-icon-notice",info:"brighttheme-info",info_icon:"brighttheme-icon-info",success:"brighttheme-success",success_icon:"brighttheme-icon-success",error:"brighttheme-error",error_icon:"brighttheme-icon-error"},jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}}),j.styling.fontawesome=a.extend({},j.styling.bootstrap3),a.extend(j.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"}),b.document.body?h():a(h),j};return c(b)}),function(a,b){"function"==typeof define&&define.amd?define("pnotify.animate",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}(this,function(a,b){b.prototype.options.animate={animate:!1,in_class:"",out_class:""},b.prototype.modules.animate={init:function(a,b){this.setUpAnimations(a,b),a.attention=function(b,c){a.elem.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a.elem.removeClass(b),c&&c.call(a)}).addClass("animated "+b)}},update:function(a,b,c){b.animate!=c.animate&&this.setUpAnimations(a,b)},setUpAnimations:function(a,b){if(b.animate){a.options.animation="none",a.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast"),a._animateIn||(a._animateIn=a.animateIn),a._animateOut||(a._animateOut=a.animateOut),a.animateIn=this.animateIn.bind(this),a.animateOut=this.animateOut.bind(this);var c=400;"slow"===a.options.animate_speed?c=600:"fast"===a.options.animate_speed?c=200:a.options.animate_speed>0&&(c=a.options.animate_speed),c/=1e3,a.elem.addClass("animated").css({"-webkit-animation-duration":c+"s","-moz-animation-duration":c+"s","animation-duration":c+"s"})}else a._animateIn&&a._animateOut&&(a.animateIn=a._animateIn,delete a._animateIn,a.animateOut=a._animateOut,delete a._animateOut,a.elem.addClass("animated"))},animateIn:function(a){this.notice.animating="in";var b=this;a=function(){this&&this.call(),b.notice.animating=!1}.bind(a),this.notice.elem.show().one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",a).removeClass(this.options.out_class).addClass("ui-pnotify-in").addClass(this.options.in_class)},animateOut:function(a){this.notice.animating="out";var b=this;a=function(){b.notice.elem.removeClass("ui-pnotify-in"),this&&this.call(),b.notice.animating=!1}.bind(a),this.notice.elem.one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",a).removeClass(this.options.in_class).addClass(this.options.out_class)}}}),function(a,b){"function"==typeof define&&define.amd?define("pnotify.buttons",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}(this,function(a,b){b.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,show_on_nonblock:!1,labels:{close:"Close",stick:"Stick",unstick:"Unstick"},classes:{closer:null,pin_up:null,pin_down:null}},b.prototype.modules.buttons={closer:null,sticker:null,init:function(b,c){var d=this;b.elem.on({mouseenter:function(a){!d.options.sticker||b.options.nonblock&&b.options.nonblock.nonblock&&!d.options.show_on_nonblock||d.sticker.trigger("pnotify:buttons:toggleStick").css("visibility","visible"),!d.options.closer||b.options.nonblock&&b.options.nonblock.nonblock&&!d.options.show_on_nonblock||d.closer.css("visibility","visible")},mouseleave:function(a){d.options.sticker_hover&&d.sticker.css("visibility","hidden"),d.options.closer_hover&&d.closer.css("visibility","hidden")}}),this.sticker=a("<div />",{class:"ui-pnotify-sticker","aria-role":"button","aria-pressed":b.options.hide?"false":"true",tabindex:"0",title:b.options.hide?c.labels.stick:c.labels.unstick,css:{curs
1or:"pointer",visibility:c.sticker_hover?"hidden":"visible"},click:function(){b.options.hide=!b.options.hide,b.options.hide?b.queueRemove():b.cancelRemove(),a(this).trigger("pnotify:buttons:toggleStick")}}).bind("pnotify:buttons:toggleStick",function(){var c=null===d.options.classes.pin_up?b.styles.pin_up:d.options.classes.pin_up,e=null===d.options.classes.pin_down?b.styles.pin_down:d.options.classes.pin_down;a(this).attr("title",b.options.hide?d.options.labels.stick:d.options.labels.unstick).children().attr("class","").addClass(b.options.hide?c:e).attr("aria-pressed",b.options.hide?"false":"true")}).append("<span />").trigger("pnotify:buttons:toggleStick").prependTo(b.container),(!c.sticker||b.options.nonblock&&b.options.nonblock.nonblock&&!c.show_on_nonblock)&&this.sticker.css("display","none"),this.closer=a("<div />",{class:"ui-pnotify-closer","aria-role":"button",tabindex:"0",title:c.labels.close,css:{cursor:"pointer",visibility:c.closer_hover?"hidden":"visible"},click:function(){b.remove(!1),d.sticker.css("visibility","hidden"),d.closer.css("visibility","hidden")}}).append(a("<span />",{class:null===c.classes.closer?b.styles.closer:c.classes.closer})).prependTo(b.container),(!c.closer||b.options.nonblock&&b.options.nonblock.nonblock&&!c.show_on_nonblock)&&this.closer.css("display","none")},update:function(a,b){!b.closer||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.closer.css("display","none"):b.closer&&this.closer.css("display","block"),!b.sticker||a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock?this.sticker.css("display","none"):b.sticker&&this.sticker.css("display","block"),this.sticker.trigger("pnotify:buttons:toggleStick"),this.closer.find("span").attr("class","").addClass(null===b.classes.closer?a.styles.closer:b.classes.closer),b.sticker_hover?this.sticker.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.sticker.css("visibility","visible"),b.closer_hover?this.closer.css("visibility","hidden"):a.options.nonblock&&a.options.nonblock.nonblock&&!b.show_on_nonblock||this.closer.css("visibility","visible")}},a.extend(b.styling.brighttheme,{closer:"brighttheme-icon-closer",pin_up:"brighttheme-icon-sticker",pin_down:"brighttheme-icon-sticker brighttheme-icon-stuck"}),a.extend(b.styling.jqueryui,{closer:"ui-icon ui-icon-close",pin_up:"ui-icon ui-icon-pin-w",pin_down:"ui-icon ui-icon-pin-s"}),a.extend(b.styling.bootstrap2,{closer:"icon-remove",pin_up:"icon-pause",pin_down:"icon-play"}),a.extend(b.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"}),a.extend(b.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"})}),function(a,b){"function"==typeof define&&define.amd?define("pnotify.callbacks",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}(this,function(a,b){var c=b.prototype.init,d=b.prototype.open,e=b.prototype.remove;b.prototype.init=function(){this.options.before_init&&this.options.before_init(this.options),c.apply(this,arguments),this.options.after_init&&this.options.after_init(this)},b.prototype.open=function(){var a;this.options.before_open&&(a=this.options.before_open(this)),a!==!1&&(d.apply(this,arguments),this.options.after_open&&this.options.after_open(this))},b.prototype.remove=function(a){var b;this.options.before_close&&(b=this.options.before_close(this,a)),b!==!1&&(e.apply(this,arguments),this.options.after_close&&this.options.after_close(this,a))}}),function(a,b){"function"==typeof define&&define.amd?define("pnotify.desktop",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}(this,function(a,b){var c,d=function(a,b){return(d="Notification"in window?function(a,b){return new Notification(a,b)}:"mozNotification"in navigator?function(a,b){return navigator.mozNotification.createNotification(a,b.body,b.icon).show()}:"webkitNotifications"in window?function(a,b){return window.webkitNotifications.createNotification(b.icon,a,b.body)}:function(a,b){return null})(a,b)};b.prototype.options.desktop={desktop:!1,fallback:!0,icon:null,tag:null},b.prototype.modules.desktop={tag:null,icon:null,genNotice:function(a,b){null===b.
1icon?this.icon="http://sciactive.com/pnotify/includes/desktop/"+a.options.type+".png":b.icon===!1?this.icon=null:this.icon=b.icon,null!==this.tag&&null===b.tag||(this.tag=null===b.tag?"PNotify-"+Math.round(1e6*Math.random()):b.tag),a.desktop=d(a.options.title,{icon:this.icon,body:b.text||a.options.text,tag:this.tag}),!("close"in a.desktop)&&"cancel"in a.desktop&&(a.desktop.close=function(){a.desktop.cancel()}),a.desktop.onclick=function(){a.elem.trigger("click")},a.desktop.onclose=function(){"closing"!==a.state&&"closed"!==a.state&&a.remove()}},init:function(a,d){if(d.desktop)return c=b.desktop.checkPermission(),0!==c?void(d.fallback||(a.options.auto_display=!1)):void this.genNotice(a,d)},update:function(a,b,d){0!==c&&b.fallback||!b.desktop||this.genNotice(a,b)},beforeOpen:function(a,b){0!==c&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterOpen:function(a,b){0!==c&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),"show"in a.desktop&&a.desktop.show())},beforeClose:function(a,b){0!==c&&b.fallback||!b.desktop||a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in")},afterClose:function(a,b){0!==c&&b.fallback||!b.desktop||(a.elem.css({left:"-10000px"}).removeClass("ui-pnotify-in"),"close"in a.desktop&&a.desktop.close())}},b.desktop={permission:function(){"undefined"!=typeof Notification&&"requestPermission"in Notification?Notification.requestPermission():"webkitNotifications"in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return"undefined"!=typeof Notification&&"permission"in Notification?"granted"===Notification.permission?0:1:"webkitNotifications"in window&&0==window.webkitNotifications.checkPermission()?0:1}},c=b.desktop.checkPermission()}),function(a,b){"function"==typeof define&&define.amd?define("pnotify.mobile",["jquery","pnotify"],b):"object"==typeof exports&&"undefined"!=typeof module?module.exports=b(require("jquery"),require("./pnotify")):b(a.jQuery,a.PNotify)}(this,function(a,b){b.prototype.options.mobile={swipe_dismiss:!0,styling:!0},b.prototype.modules.mobile={swipe_dismiss:!0,init:function(a,b){var c=this,d=null,e=null,f=null;this.swipe_dismiss=b.swipe_dismiss,this.doMobileStyling(a,b),a.elem.on({touchstart:function(b){c.swipe_dismiss&&(d=b.originalEvent.touches[0].screenX,f=a.elem.width(),a.container.css("left","0"))},touchmove:function(b){if(d&&c.swipe_dismiss){var g=b.originalEvent.touches[0].screenX;e=g-d;var h=(1-Math.abs(e)/f)*a.options.opacity;a.elem.css("opacity",h),a.container.css("left",e)}},touchend:function(){if(d&&c.swipe_dismiss){if(Math.abs(e)>40){var b=e<0?f*-2:2*f;a.elem.animate({opacity:0}
1,100),a.container.animate({left:b},100),a.remove()}else a.elem.animate({opacity:a.options.opacity},100),a.container.animate({left:0},100);d=null,e=null,f=null}},touchcancel:function(){d&&c.swipe_dismiss&&(a.elem.animate({opacity:a.options.opacity},100),a.container.animate({left:0},100),d=null,e=null,f=null)}})},update:function(a,b){this.swipe_dismiss=b.swipe_dismiss,this.doMobileStyling(a,b)},doMobileStyling:function(b,c){c.styling?(b.elem.addClass("ui-pnotify-mobile-able"),a(window).width()<=480?(b.options.stack.mobileOrigSpacing1||(b.options.stack.mobileOrigSpacing1=b.options.stack.spacing1,b.options.stack.mobileOrigSpacing2=b.options.stack.spacing2),b.options.stack.spacing1=0,b.options.stack.spacing2=0):(b.options.stack.mobileOrigSpacing1||b.options.stack.mobileOrigSpacing2)&&(b.options.stack.spacing1=b.options.stack.mobileOrigSpacing1,delete b.options.stack.mobileOrigSpacing1,b.options.stack.spacing2=b.options.stack.mobileOrigSpacing2,delete b.options.stack.mobileOrigSpacing2)):(b.elem.removeClass("ui-pnotify-mobile-able"),b.options.stack.mobileOrigSpacing1&&(b.options.stack.spacing1=b.options.stack.mobileOrigSpacing1,delete b.options.stack.mobileOrigSpacing1),b.options.stack.mobileOrigSpacing2&&(b.options.stack.spacing2=b.options.stack.mobileOrigSpacing2,delete b.options.stack.mobileOrigSpacing2))}}}),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return a<10?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];
vendor: 2,411 bytes, line 1
1return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;c<f;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;c<f;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;d<c;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCo
1deAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(a){function b(){if(a.fn.ajaxSubmit.debug){var b="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(b):window.opera&&window.opera.postError&&window.opera.postError(b)}}a.fn.ajaxSubmit=function(c){function d(d){function f(a){var b=a.contentWindow?a.contentWindow.document:a.contentDocument?a.contentDocument:a.document;return b}function g(){function c(){try{var a=f(p).readyState;b("state = "+a),"uninitialized"==a.toLowerCase()&&setTimeout(c,50)}catch(a){b("Server abort: ",a," (",a.name,")"),i(y),u&&clearTimeout(u),u=void 0}}var d=h.attr("target"),g=h.attr("action");v.setAttribute("target",n),e||v.setAttribute("method","POST"),g!=l.url&&v.setAttribute("action",l.url),l.skipEncodingOverride||e&&!/post/i.test(e)||h.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(u=setTimeout(function(){t=!0,i(x)},l.timeout));var j=[];try{if(l.extraData)for(var k in l.extraData)j.push(a('<input type="hidden" name="'+k+'" />').attr("value",l.extraData[k]).appendTo(v)[0]);l.iframeTarget||(o.appendTo("body"),p.attachEvent?p.attachEvent("onload",i):p.addEventListener("load",i,!1)),setTimeout(c,15),v.submit()}finally{v.setAttribute("action",g),d?v.setAttribute("target",d):h.removeAttr("target"),a(j).remove()}}function i(c){if(!q.aborted&&!B){try{A=f(p)}catch(a){b("cannot access response document: ",a),c=y}if(c===x&&q)return void q.abort("timeout");if(c==y&&q)return void q.abort("server abort");if(A&&A.location.href!=l.iframeSrc||t){p.detachEvent?p.detachEvent("onload",i):p.removeEventListener("load",i,!1);var d,e="success";try{if(t)throw"timeout";var g="xml"==l.dataType||A.XMLDocument||a.isXMLDoc(A);if(b("isXml="+g),!g&&window.opera&&(null==A.body||""==A.body.innerHTML)&&--C)return b("requeing onLoad callback, DOM not available"),void setTimeout(i,250);var h=A.body?A.body:A.documentElement;q.responseText=h?h.innerHTML:null,q.responseXML=A.XMLDocument?A.XMLDocument:A,g&&(l.dataType="xml"),q.getResponseHeader=function(a){var b={"content-type":l.dataType};return b[a]},h&&(q.status=Number(h.getAttribute("status"))||q.status,q.statusText=h.getAttribute("statusText")||q.statusText);var j=(l.dataType||"").toLowerCase(),k=/(json|script|text)/.test(j);if(k||l.textarea){var n=A.getElementsByTagName("textarea")[0];if(n)q.responseText=n.value,q.status=Number(n.getAttribute("status"))||q.status,q.statusText=n.getAttribute("statusText")||q.statusText;else if(k){var r=A.getElementsByTagName("pre")[0],s=A.getElementsByTagName("body")[0];r?q.responseText=r.textContent?r.textContent:r.innerText:s&&(q.responseText=s.textContent?s.textContent:s.innerText)}}else"xml"!=j||q.responseXML||null==q.responseText||(q.responseXML=D(q.responseText));try{z=F(q,j,l)}catch(a){e="parsererror",q.error=d=a||e}}catch(a){b("error caught: ",a),e="error",q.error=d=a||e}q.aborted&&(b("upload aborted"),e=null),q.status&&(e=q.status>=200&&q.status<300||304===q.status?"success":"error"),"success"===e?(l.success&&l.success.call(l.context,z,"success",q),m&&a.event.trigger("ajaxSuccess",[q,l])):e&&(void 0==d&&(d=q.statusText),l.error&&l.error.call(l.context,q,e,d),m&&a.event.trigger("ajaxError",[q,l,d])),m&&a.event.trigger("ajaxComplete",[q,l]),m&&!--a.active&&a.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,q,e),B=!0,l.timeout&&clearTimeout(u),setTimeout(function(){l.iframeTarget||o.remove(),q.responseXML=null},100)}}}var j,k,l,m,n,o,p,q,r,s,t,u,v=h[0],w=!!a.fn.prop;if(d)if(w)for(k=0;k<d.length;k++)j=a(v[d[k].name]),j.prop("disabled",!1);else for(k=0;k<d.length;k++)j=a(v[d[k].name]),j.removeAttr("disabled");if(a(":input[name=submit],:input[id=submit]",v).length)return void alert('Error: Form elements must not have name or id of "submit".');if(l=a.extend(!0,{},a.ajaxSettings,c),l.context=l.context||l,n="jqFormIO"+(new Date).getTime(),l.iframeTarget?(o=a(l.iframeTarget),s=o.attr("name"),null==s?o.attr("name",n):n=s):(o=a('<iframe name="'+n+'" src="'+l.iframeSrc+'" />'),o.css({position:"absolute",top:"-1000px",left:"-1000px"})),p=o[0],q={aborted:0,responseText:null,responseXML:null,status:0, 2statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(c){var d="timeout"===c?"timeout":"aborted";b("aborting upload... "+d),this.aborted=1,o.attr("src",l.iframeSrc),q.error=d,l.error&&l.error.call(l.context,q,d,c),m&&a.event.trigger("ajaxError",[q,l,d]),l.complete&&l.complete.call(l.context,q,d)}},m=l.global,m&&!a.active++&&a.event.trigger("ajaxStart"),m&&a.event.trigger("ajaxSend",[q,l]),l.beforeSend&&l.beforeSend.c
2all(l.context,q,l)===!1)return void(l.global&&a.active--);if(!q.aborted){r=v.clk,r&&(s=r.name,s&&!r.disabled&&(l.extraData=l.extraData||{},l.extraData[s]=r.value,"image"==r.type&&(l.extraData[s+".x"]=v.clk_x,l.extraData[s+".y"]=v.clk_y)));var x=1,y=2;l.forceSync?g():setTimeout(g,10);var z,A,B,C=50,D=a.parseXML||function(a,b){return window.ActiveXObject?(b=new ActiveXObject("Microsoft.XMLDOM"),b.async="false",b.loadXML(a)):b=(new DOMParser).parseFromString(a,"text/xml"),b&&b.documentElement&&"parsererror"!=b.documentElement.nodeName?b:null},E=a.parseJSON||function(a){return window.eval("("+a+")")},F=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f="xml"===c||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;return f&&"parsererror"===g.documentElement.nodeName&&a.error&&a.error("parsererror"),d&&d.dataFilter&&(g=d.dataFilter(g,c)),"string"==typeof g&&("json"===c||!c&&e.indexOf("json")>=0?g=E(g):("script"===c||!c&&e.indexOf("javascript")>=0)&&a.globalEval(g)),g}}}if(!this.length)return b("ajaxSubmit: skipping submit process - no element selected"),this;var e,f,g,h=this;"function"==typeof c&&(c={success:c}),e=this.attr("method"),f=this.attr("action"),g="string"==typeof f?a.trim(f):"",g=g||window.location.href||"",g&&(g=(g.match(/^([^#]+)/)||[])[1]),c=a.extend(!0,{url:g,success:a.ajaxSettings.success,type:e||"GET",iframeSrc:"about:blank"},c);var i={};if(this.trigger("form-pre-serialize",[this,c,i]),i.veto)return b("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(c.beforeSerialize&&c.beforeSerialize(this,c)===!1)return b("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var j=c.traditional;void 0===j&&(j=a.ajaxSettings.traditional);var k,l=this.formToArray(c.semantic);if(c.data&&(c.extraData=c.data,k=a.param(c.data,j)),c.beforeSubmit&&c.beforeSubmit(l,this,c)===!1)return b("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[l,this,c,i]),i.veto)return b("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var m=a.param(l,j);k&&(m=m?m+"&"+k:k),"GET"==c.type.toUpperCase()?(c.url+=(c.url.indexOf("?")>=0?"&":"?")+m,c.data=null):c.data=m;var n=[];if(c.resetForm&&n.push(function(){h.resetForm()}),c.clearForm&&n.push(function(){h.clearForm(c.includeHidden)}),!c.dataType&&c.target){var o=c.success||function(){};n.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(o,arguments)})}else c.success&&n.push(c.success);c.success=function(a,b,d){for(var e=c.context||c,f=0,g=n.length;f<g;f++)n[f].apply(e,[a,b,d||h,h])};var p=a("input:file",this).length>0,q="multipart/form-data",r=h.attr("enctype")==q||h.attr("encoding")==q;return c.iframe!==!1&&(p||c.iframe||r)?c.closeKeepAlive?a.get(c.closeKeepAlive,function(){d(l)}):d(l):a.ajax(c),this.trigger("form-submit-notify",[this,c]),this},a.fn.ajaxForm=function(c){if(0===this.length){var d={s:this.selector,c:this.context};return!a.isReady&&d.s?(b("DOM not ready, queuing ajaxForm"),a(function(){a(d.s,d.c).ajaxForm(c)}),this):(b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)")),this)}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){b.isDefaultPrevented()||(b.preventDefault(),a(this).ajaxSubmit(c))}).bind("click.form-plugin",function(b){var c=b.target,d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");if(0==e.length)return;c=e[0]}var f=this;if(f.clk=c,"image"==c.type)if(void 0!=b.offsetX)f.clk_x=b.offsetX,f.clk_y=b.offsetY;else if("function"==typeof a.fn.offset){var g=d.offset();f.clk_x=b.pageX-g.left,f.clk_y=b.pageY-g.top}else f.clk_x=b.pageX-c.offsetLeft,f.clk_y=b.pageY-c.offsetTop;setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})},a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")},a.fn.formToArray=function(b){var c=[];if(0===this.length)return c;var d=this[0],e=b?d.getElementsByTagName("*"):d.elements;if(!e)return c;var f,g,h,i,j,k,l;for(f=0,k=e.length;f<k;f++)if(j=e[f],h=j.name)if(b&&d.clk&&"image"==j.type)j.disabled||d.clk!=j||(c.push({name:h,value:a(j).val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}));else if(i=a.fieldValue(j,!0),i&&i.constructor==Array)for(g=0,l=i.length;g<l;g++)c.push({name:h,value:i[g]});else null!==i&&"undefined"!=typeof i&&c.push({name:h,value:i});if(!b&&d.clk){var m=a(d.clk),n=m[0];h=n.name,h&&!n.disabled&&"image"==n.type&&(c.push({name:h,value:m.val()}),c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y}))}return c}
2,a.fn.formSerialize=function(b){return a.param(this.formToArray(b))},a.fn.fieldSerialize=function(b){var c=[];return this.each(function(){var d=this.name;if(d){var e=a.fieldValue(this,b);if(e&&e.constructor==Array)for(var f=0,g=e.length;f<g;f++)c.push({name:d,value:e[f]});else null!==e&&"undefined"!=typeof e&&c.push({name:this.name,value:e})}}),a.param(c)},a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d],g=a.fieldValue(f,b);null===g||"undefined"==typeof g||g.constructor==Array&&!g.length||(g.constructor==Array?a.merge(c,g):c.push(g))}return c},a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(void 0===c&&(c=!0),c&&(!d||b.disabled||"reset"==e||"button"==e||("checkbox"==e||"radio"==e)&&!b.checked||("submit"==e||"image"==e)&&b.form&&b.form.clk!=b||"select"==f&&b.selectedIndex==-1))return null;if("select"==f){var g=b.selectedIndex;if(g<0)return null;for(var h=[],i=b.options,j="select-one"==e,k=j?g+1:i.length,l=j?g:0;l<k;l++){var m=i[l];if(m.selected){var n=m.value;if(n||(n=m.attributes&&m.attributes.value&&!m.attributes.value.specified?m.text:m.value),j)return n;h.push(n)}}return h}return a(b).val()},a.fn.clearForm=function(b){return this.each(function(){a("input,select,textarea",this).clearFields(b)})},a.fn.clearFields=a.fn.clearInputs=function(a){var b=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var c=this.type,d=this.tagName.toLowerCase();b.test(c)||"textarea"==d||a&&/hidden/.test(c)?this.value="":"checkbox"==c||"radio"==c?this.checked=!1:"select"==d&&(this.selectedIndex=-1)})},a.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},a.fn.enable=function(a){return void 0===a&&(a=!0),this.each(function(){this.disabled=!a})},a.fn.selected=function(b){return void 0===b&&(b=!0),this.each(function(){var c=this.type;if("checkbox"==c||"radio"==c)this.checked=b;else if("option"==this.tagName.toLowerCase()){var d=a(this).parent("select");b&&d[0]&&"select-one"==d[0].type&&d.find("option").selected(!1),this.selected=b}})},a.fn.ajaxSubmit.debug=!1}(jQuery),function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=g.detail*-1),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=g.wheelDeltaX*-1),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=m*-1,m=0),j=0===m?l:m,"deltaY"in g&&(m=g.deltaY*-1,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=l*-1)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||n<f)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}),function(a,b){"use strict";function c(a,b){return a[b]}function d(a,b,e){b+="";var f="get"+b.substr(0,1).toUpperCase()+b.substr(1),g="set"+b.substr(0,1).toUpperCase()+b.substr(1);return"undefined"==typeof this[f]&&(this[f]=_.partial(c,a,b)),"undefined"==typeof this[g]&&(this[g]=_.partial(d,a,b)),a[b]=e,e}var e=b("html");a.Concrete={editMode:null,event:ConcreteEvent,createGetterSetters:function(a){var b=this;return b.getAttr=_.partial(c,a),b.setAttr=_.partial(d,a),_(a).each(function(a,c){b.setAttr(c,a)}),!0},forceRefresh:function(){e.hide(0,function(){b(this).show()})},const:{}}}(window,jQuery),function(a){var b=null;a.fn.liveUpdate=function(b,c){return this.each(function(){new a.liveUpdate(this,b,c)})},a.liveUpdate=function(b,c,d){this.field=a(b),a(b).data("liveUpdate",this),this.list=a("#"+c),this.lutype="blocktypes","undefined"!=typeof d&&(this.lutype=d),this.list.length>0&&this.init()},a.liveUpdate.prototype={init:function(){var a=this;this.setupCache(),this.field.parents("form").on("submit.liveupdate",function(){return!1}),this.field.keyup(function(){a.filter()}),a.filter()},filter:function(){if(this.field.val()!=b){if(""==a.trim(this.field.val()))return void("blocktypes"==this.lutype?(this.list.find("li").show(),this.list.find(".ccm-panel-add-block-set").show()):"attributes"==this.lutype?(this.list.find("h5").show(),this.list.find("li").show()):"stacks"==this.lutype?(this.list.children("li").addClass("ccm-stack-available"),this.list.children("li").removeClass("ccm-stack-selected")):"intelligent-search"==this.lutype?this.list.is(":visible")&&this.list.hide():this.list.children("li,div.li").show());"intelligent-search"!=this.lutype||this.field.val().length>2?this.displayResults(this.getScores(this.field.val().toLowerCase())):"intelligent-search"==this.lutype&&this.list.is(":visible")&&this.list.hide()}b=this.field.val(),""==b&&"intelligent-search"==this.lutype&&this.list.is(":visible")&&this.list.hide()},setupCache:function(){var b=this;this.cache=[],this.rows=[];var c=this.lutype;this.list.find("li,div.li").each(function(){if("blocktypes"==c)b.cache.push(a(this).find("span").html().toLowerCase());else if("attributes"==c){var d=a(this).find("a,span").html().toLowerCase();b.cache.push(d)}else if("stacks"==c){var d=a(this).find("a,span").html().toLowerCase();b.cache.push(d)}else if("fileset"==c)b.cache.push(a(this).find("span[data-label=file-set-name]").html().toLowerCase());else if("folder"==c)b.cache.push(a(this).find("span[data-label=folder-name]").html().toLowerCase());else if("intelligent-search"==c){var e=a(this).find("span").html();e&&b.cache.push(e.toLowerCase())}b.rows.push(a(this))}),this.cache_length=this.cache.length},displayResults:function(b){var c=this;if("blocktypes"==this.lutype)this.list.find(".ccm-panel-add-block-set").hide(),this.list.find("li,div.li").hide(),a.each(b,function(a,b){c.rows[b[1]].show(),c.rows[b[1]].closest(".ccm-panel-add-block-set").show()});else if("attributes"==this.lutype)this.list.find("h5").hide(),this.list.find("li").hide(),a.each(b,function(a,b){c.rows[b[1]].show()});else if("stacks"==this.lutype)this.list.children("li").removeClass("ccm-stack-available"),this.list.children("li").removeClass("ccm-stack-selected"),this.list.children("li").removeClass("ccm-item-selected"),a.each(b,function(a,b){c.rows[b[1]].addClass("ccm-stack-available")}),this.list.children("li.item-select-list-header").removeClass("ccm-stack-available"),a(this.list.find("li.ccm-stack-available")[0]).addClass("ccm-item-selected");else if("intelligent-search"==this.lutype){this.list.is(":visible")||this.list.fadeIn(160,"easeOutExpo"),this.list.find(".ccm-intelligent-search-results-module-onsite").hide(),this.list.find("li").hide();var d=0;a.each(b,function(a,b){$li=c.rows[b[1]],b[0]>.75&&(d++,$li.parent().parent().is(":visible")||$li.parent().parent().show(),$li.show())}),this.list.find("li a").removeClass("ccm-intelligent-search-result-selected"),this.list.find("li:visible a:first").addClass("ccm-intelligent-search-result-selected")}else this.list.children("li,div.li").hide(),a.each(b,function(a,b){c.rows[b[1]].show()})},getScores:function(a){for(var b=[],c=0;c<this.cache_length;c++){var d=this.cache[c].score(a);d>0&&b.push([d,c])}return b.sort(function(a,b){return b[0]-a[0]})}}}(jQuery),function(a,b){if("function"==typeof define&&define.amd)define(["exports","module"],b);else if("undefined"!=typeof exports&&"undefined"!=typeof module)b(exports,module);else{var c={exports:{}};b(c.exports,c),a.autosize=c.exports}}(this,function(a,b){"use strict";function c(a){function b(){var b=window.getComputedStyle(a,null);n=b.overflowY,"vertical"===b.resize?a.style.resize="none":"both"===b.resize&&(a.style.resize="horizontal"),m="content-box"===b.boxSizing?-(parseFloat(b.paddingTop)+parseFloat(b.paddingBottom)):parseFloat(b.borderTopWidth)+parseFloat(b.borderBottomWidth),isNaN(m)&&(m=0),e()}function c(b){var c=a.style.width;a.style.width="0px",a.offsetWidth,a.style.width=c,n=b,l&&(a.style.overflowY=b),d()}function d(){var b=window.pageYOffset,c=document.body.scrollTop,d=a.style.height;a.style.height="auto";var e=a.scrollHeight+m;return 0===a.scrollHeight?void(a.style.height=d):(a.style.height=e+"px",o=a.clientWidth,document.documentElement.scrollTop=b,void(document.body.scrollTop=c))}function e(){var b=a.style.height;d();var e=window.getComputedStyle(a,null);if(e.height!==a.style.height?"visible"!==n&&c("visible"):"hidden"!==n&&c("hidden"),b!==a.style.height){var f=g("autosize:resized");a.dispatchEvent(f)}}var h=void 0===arguments[1]?{}:arguments[1],i=h.setOverflowX,j=void 0===i||i,k=h.setOverflowY,l=void 0===k||k;if(a&&a.nodeName&&"TEXTAREA"===a.nodeName&&!f.has(a)){var m=null,n=null,o=a.clientWidth,p=function(){a.clientWidth!==o&&e()},q=function(b){window.removeEventListener("resize",p,!1),a.removeEventListener("input",e,!1),a.removeEventListener("keyup",e,!1),a.removeEventListener("autosize:destroy",q,!1),a.removeEventListener("autosize:update",e,!1),f.delete(a),Object.keys(b).forEach(function(c){a.style[c]=b[c]})}.bind(a,{height:a.style.height,resize:a.style.resize,overflowY:a.style.overflowY,overflowX:a.style.overflowX,wordWrap:a.style.wordWrap});a.addEventListener("autosize:destroy",q,!1),"onpropertychange"in a&&"oninput"in a&&a.addEventListener("keyup",e,!1),window.addEventListener("resize",p,!1),a.addEventListener("input",e,!1),a.addEventListener("autosize:update",e,!1),f.add(a),j&&(a.style.overflowX="hidden",a.style.wordWrap="break-word"),b()}}function d(a){if(a&&a.nodeName&&"TEXTAREA"===a.nodeName){var b=g("autosize:destroy");a.dispatchEvent(b)}}function e(a){if(a&&a.nodeName&&"TEXTAREA"===a.nodeName){var b=g("autosize:update");a.dispatchEvent(b)}}var f="function"==typeof Set?new Set:function(){var a=[];return{has:function(b){return Boolean(a.indexOf(b)>-1)},add:function(b){a.push(b)},delete:function(b){a.splice(a.indexOf(b),1)}}}(),g=function(a){return new Event(a)};try{new Event("test")}catch(a){g=function(a){var b=document.createEvent("Event");return b.initEvent(a,!0,!1),b}}var h=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(h=function(a){return a},h.destroy=function(a){return a},h.update=function(a){return a}):(h=function(a,b){return a&&Array.prototype.forEach.call(a.length?a:[a],function(a){return c(a,b)}),a},h.destroy=function(a){return a&&Array.prototype.forEach.call(a.length?a:[a],d),a},h.update=function(a){return a&&Array.prototype.forEach.call(a.length?a:[a],e),a}),b.exports=h}),function(a,b,c){"use strict";function d(b,c){this.name=e,this.el=b,this.$el=a(b),this.options=a.extend({},f,c),this.$document=a(this.$el[0].ownerDocument),this.$body=this.$document.find("body"),this.moveTrigger="MSPointerMove touchmove mousemove",this.startTrigger="MSPointerDown touchstart mousedown",this.stopTrigger="MSPointerUp touchend mouseup",this.startTriggerArray=this.startTrigger.split(" "),this.moveTriggerArray=this.moveTrigger.split(" "),this.stopTriggerArray=this.stopTrigger.split(" "),this.stopEvents=[this.stopTrigger,this.options.stopEvents].join(" "),"window"===this.options.constrainTo?this.$container=this.$document:this.options.constrainTo&&"parent"!==this.options.constrainTo?this.$container=a(this.options.constrainTo):this.$container=this.$el.parent(),this.isPointerEventCompatible()&&this.applyMSDefaults(),this.CSSEaseHash=this.getCSSEaseHash(),this.scale=1,this.started=!1,this.disabled=!1,this.activeDropRegions=[],this.resetVelocityQueue(),this.init()}var e="pep",f={initiate:function(){},start:function(){},drag:function(){},stop:function(){},rest:function(){},moveTo:!1,callIfNotStarted:["stop","rest"],startThreshold:[0,0],grid:[1,1],debug:!1,activeClass:"pep-active",multiplier:1,velocityMultiplier:2.5,shouldPreventDefault:!0,allowDragEventPropagation:!0,stopEvents:"",hardwareAccelerate:!0,useCSSTranslation:!0,disableSelect:!0,cssEaseString:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",cssEaseDuration:1e3,shouldEase:!0,droppable:!1,droppableActiveClass:"pep-dpa",overlapFunction:!1,constrainTo:!1,removeMargins:!0,place:!0,deferPlacement:!1,axis:null,forceNonCSS3Movement:!1,elementsWithInteraction:"input",revert:!1,revertAfter:"stop",revertIf:function(){return!0},ignoreRightClick:!0};d.prototype.init=function(){this.options.debug&&this.buildDebugDiv(),this.options.disableSelect&&this.disableSelect(),this.options.place&&!this.options.deferPlacement&&(this.positionParent(),this.placeObject()),this.ev={},this.pos={},this.subscribe()},d.prototype.subscribe=function(){var a=this;this.onStartEvent=function(b){a.handleStart(b)},this.$el.on(this.startTrigger,this.onStartEvent),this.onStartEventOnElementsWithInteraction=function(a){a.stopPropagation()},this.$el.on(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction),this.onStopEvents=function(b){a.handleStop(b)},this.$document.on(this.stopEvents,this.onStopEvents),this.onMoveEvents=function(b){a.moveEvent=b},this.$document.on(this.moveTrigger,this.onMoveEvents)},d.prototype.unsubscribe=function(){this.$el.off(this.startTrigger,this.onStartEvent),this.$el.off(this.startTrigger,this.options.elementsWithInteraction,this.onStartEventOnElementsWithInteraction),this.$document.off(this.stopEvents,this.onStopEvents),this.$document.off(this.moveTrigger,this.onMoveEvents)},d.prototype.handleStart=function(b){var c=this;if(this.isValidMoveEvent(b)&&!this.disabled&&(!this.options.ignoreRightClick||3!==b.which)){this.isPointerEventCompatible()&&b.preventManipulation&&b.preventManipulation(),b=this.normalizeEvent(b),this.options.place&&this.options.deferPlacement&&(this.positionParent(),this.placeObject()),this.log({type:"event",event:b.type}),this.options.hardwareAccelerate&&!this.hardwareAccelerated&&(this.hardwareAccelerate(),this.hardwareAccelerated=!0);var d=this.options.initiate.call(this,b,this);if(d===!1)return;clearTimeout(this.restTimeout),this.$el.addClass(this.options.activeClass),this.removeCSSEasing(),this.startX=this.ev.x=b.pep.x,this.startY=this.ev.y=b.pep.y,this.initialPosition=this.initialPosition||this.$el.position(),this.startEvent=this.moveEvent=b,this.active=!0,this.options.shouldPreventDefault&&b.preventDefault(),this.options.allowDragEventPropagation||b.stopPropagation(),function a(){c.active&&(c.handleMove(),c.requestAnimationFrame(a))}(a,c)}},d.prototype.handleMove=function(){if("undefined"!=typeof this.moveEvent){var c=this.normalizeEvent(this.moveEvent),d=b.parseInt(c.pep.x/this.options.grid[0])*this.options.grid[0],e=b.parseInt(c.pep.y/this.options.grid[1])*this.options.grid[1];this.addToLIFO({time:c.timeSta
2mp,x:d,y:e});var f,g;if(a.inArray(c.type,this.startTriggerArray)>-1?(f=0,g=0):(f=d-this.ev.x,g=e-this.ev.y),this.dx=f,this.dy=g,this.ev.x=d,this.ev.y=e,0===f&&0===g)return void this.log({type:"event",event:"** stopped **"});var h=Math.abs(this.startX-d),i=Math.abs(this.startY-e);!this.started&&(h>this.options.startThreshold[0]||i>this.options.startThreshold[1])&&(this.started=!0,this.$el.addClass("pep-start"),this.options.start.call(this,this.startEvent,this)),this.options.droppable&&this.calculateActiveDropRegions();var j=this.options.drag.call(this,c,this);if(j===!1)return void this.resetVelocityQueue();this.log({type:"event",event:c.type}),this.log({type:"event-coords",x:this.ev.x,y:this.ev.y}),this.log({type:"velocity"}),this.doMoveTo(f,g)}},d.prototype.doMoveTo=function(a,b){var c,d,e=this.handleConstraint(a,b);"function"==typeof this.options.moveTo?(c=a>=0?"+="+Math.abs(a/this.scale)*this.options.multiplier:"-="+Math.abs(a/this.scale)*this.options.multiplier,d=b>=0?"+="+Math.abs(b/this.scale)*this.options.multiplier:"-="+Math.abs(b/this.scale)*this.options.multiplier,this.options.constrainTo&&(c=e.x!==!1?e.x:c,d=e.y!==!1?e.y:d),"x"===this.options.axis&&(d=e.y),"y"===this.options.axis&&(c=e.x),this.options.moveTo.call(this,c,d)):this.shouldUseCSSTranslation()?(a=a/this.scale*this.options.multiplier,b=b/this.scale*this.options.multiplier,this.options.constrainTo&&(a=e.x===!1?a:0,b=e.y===!1?b:0),"x"===this.options.axis&&(b=0),"y"===this.options.axis&&(a=0),this.moveToUsingTransforms(a,b)):(c=a>=0?"+="+Math.abs(a/this.scale)*this.options.multiplier:"-="+Math.abs(a/this.scale)*this.options.multiplier,d=b>=0?"+="+Math.abs(b/this.scale)*this.options.multiplier:"-="+Math.abs(b/this.scale)*this.options.multiplier,this.options.constrainTo&&(c=e.x!==!1?e.x:c,d=e.y!==!1?e.y:d),"x"===this.options.axis&&(d=e.y),"y"===this.options.axis&&(c=e.x),this.moveTo(c,d))},d.prototype.handleStop=function(b){this.active&&(this.log({type:"event",event:b.type}),this.active=!1,this.$el.removeClass("pep-start").addClass("pep-ease"),this.options.droppable&&this.calculateActiveDropRegions(),(this.started||!this.started&&a.inArray("stop",this.options.callIfNotStarted)>-1)&&this.options.stop.call(this,b,this),this.options.shouldEase?this.ease(b,this.started):this.removeActiveClass(),this.options.revert&&("stop"===this.options.revertAfter||!this.options.shouldEase)&&this.options.revertIf&&this.options.revertIf.call(this)&&this.revert(),this.started=!1,this.resetVelocityQueue())},d.prototype.ease=function(b,c){var d=(this.$el.position(),this.velocity()),e=(this.dt,d.x/this.scale*this.options.multiplier),f=d.y/this.scale*this.options.multiplier,g=this.handleConstraint(e,f,!0);this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash());var h=d.x>0?"+="+e:"-="+Math.abs(e),i=d.y>0?"+="+f:"-="+Math.abs(f);this.options.constrainTo&&(h=g.x!==!1?g.x:h,i=g.y!==!1?g.y:i),"x"===this.options.axis&&(i="+=0"),"y"===this.options.axis&&(h="+=0");var j=!this.cssAnimationsSupported()||this.options.forceNonCSS3Movement;"function"==typeof this.options.moveTo?this.options.moveTo.call(this,h,i):this.moveTo(h,i,j);var k=this;this.restTimeout=setTimeout(function(){k.options.droppable&&k.calculateActiveDropRegions(),(c||!c&&a.inArray("rest",k.options.callIfNotStarted)>-1)&&k.options.rest.call(k,b,k),k.options.revert&&"ease"===k.options.revertAfter&&k.options.shouldEase&&k.options.revertIf&&k.options.revertIf.call(k)&&k.revert(),k.removeActiveClass()},this.options.cssEaseDuration)},d.prototype.normalizeEvent=function(a){return a.pep={},this.isPointerEventCompatible()||!this.isTouch(a)?(a.pageX?(a.pep.x=a.pageX,a.pep.y=a.pageY):(a.pep.x=a.originalEvent.pageX,a.pep.y=a.originalEvent.pageY),a.pep.type=a.type):(a.pep.x=a.originalEvent.touches[0].pageX,a.pep.y=a.originalEvent.touches[0].pageY,a.pep.type=a.type),a},d.prototype.resetVelocityQueue=function(){this.velocityQueue=new Array(5)},d.prototype.moveTo=function(a,b,c){this.log({type:"delta",x:a,y:b}),c?this.$el.animate({top:b,left:a},0,"easeOutQuad",{queue:!1}):this.$el.stop(!0,!1).css({top:b,left:a})},d.prototype.moveToUsingTransforms=function(a,b){var c=this.matrixToArray(this.matrixString());this.cssX||(this.cssX=this.xTranslation(c)),this.cssY||(this.cssY=this.yTranslation(c)),this.cssX=this.cssX+a,this.cssY=this.cssY+b,this.log({type:"delta",x:a,y:b}),c[4]=this.cssX,c[5]=this.cssY,this.translation=this.arrayToMatrix(c),this.transform(this.translation)},d.prototype.transform=function(a){this.$el.css({"-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a})},d.prototype.xTranslation=function(a){return a=a||this.matrixToArray(this.matrixString()),parseInt(a[4],10)},d.prototype.yTranslation=function(a){return a=a||this.matrixToArray(this.matrixString()),parseInt(a[5],10)},d.prototype.matrixString=function(){var a=function(a){return!(!a||"none"===a||a.indexOf("matrix")<0)},b="matrix(1, 0, 0, 1, 0, 0)";return a(this.$el.css("-webkit-transform"))&&(b=this.$el.css("-webkit-transform")),a(this.$el.css("-moz-transform"))&&(b=this.$el.css("-moz-transform")),a(this.$el.css("-ms-transform"))&&(b=this.$el.css("-ms-transform")),a(this.$el.css("-o-transform"))&&(b=this.$el.css("-o-transform")),a(this.$el.css("transform"))&&(b=this.$el.css("transform")),b},d.prototype.matrixToArray=function(a){return a.split("(")[1].split(")")[0].split(",")},d.prototype.arrayToMatrix=function(a){return"matrix("+a.join(",")+")"},d.prototype.addToLIFO=function(a){var b=this.velocityQueue;b=b.slice(1,b.length),b.push(a),this.velocityQueue=b},d.prototype.velocity=function(){for(var a=0,b=0,c=0;c<this.velocityQueue.length-1;c++)this.velocityQueue[c]&&(a+=this.velocityQueue[c+1].x-this.velocityQueue[c].x,b+=this.velocityQueue[c+1].y-this.velocityQueue[c].y,this.dt=this.velocityQueue[c+1].time-this.velocityQueue[c].time);return{x:a*this.options.velocityMultiplier,y:b*this.options.velocityMultiplier}},d.prototype.revert=function(){this.shouldUseCSSTranslation()&&this.moveToUsingTransforms(-this.xTranslation(),-this.yTranslation()),this.moveTo(this.initialPosition.left,this.initialPosition.top)},d.prototype.requestAnimationFrame=function(a){return b.requestAnimationFrame&&b.requestAnimationFrame(a)||b.webkitRequestAnimationFrame&&b.webkitRequestAnimationFrame(a)||b.mozRequestAnimationFrame&&b.mozRequestAnimationFrame(a)||b.oRequestAnimationFrame&&b.mozRequestAnimationFrame(a)||b.msRequestAnimationFrame&&b.msRequestAnimationFrame(a)||b.setTimeout(a,1e3/60)},d.prototype.positionParent=function(){this.options.constrainTo&&!this.parentPositioned&&(this.parentPositioned=!0,"parent"===this.options.constrainTo?this.$container.css({position:"relative"}):"window"===this.options.constrainTo&&"#document"!==this.$container.get(0).nodeName&&"static"!==this.$container.css("position")&&this.$container.css({position:"static"}))},d.prototype.placeObject=function(){this.objectPlaced||(this.objectPlaced=!0,this.offset="parent"===this.options.constrainTo||this.hasNonBodyRelative()?this.$el.position():this.$el.offset(),parseInt(this.$el.css("left"),10)&&(this.offset.left=this.$el.css("left")),parseInt(this.$el.css("top"),10)&&(this.offset.top=this.$el.css("top")),this.options.removeMargins&&this.$el.css({margin:0}
2),this.$el.css({position:"absolute",top:this.offset.top,left:this.offset.left}))},d.prototype.hasNonBodyRelative=function(){return this.$el.parents().filter(function(){var b=a(this);return b.is("body")||"relative"===b.css("position")}).length>1},d.prototype.setScale=function(a){this.scale=a},d.prototype.setMultiplier=function(a){this.options.multiplier=a},d.prototype.removeCSSEasing=function(){this.cssAnimationsSupported()&&this.$el.css(this.getCSSEaseHash(!0))},d.prototype.disableSelect=function(){this.$el.css({"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"})},d.prototype.removeActiveClass=function(){this.$el.removeClass([this.options.activeClass,"pep-ease"].join(" "))},d.prototype.handleConstraint=function(b,d,e){var f=this.$el.position();this.pos.x=f.left,this.pos.y=f.top;var g,h,i,j,k={x:!1,y:!1};return this.log({type:"pos-coords",x:this.pos.x,y:this.pos.y}),a.isArray(this.options.constrainTo)?(this.options.constrainTo[3]!==c&&this.options.constrainTo[1]!==c&&(h=this.options.constrainTo[1]===!1?1/0:this.options.constrainTo[1],i=this.options.constrainTo[3]===!1?-(1/0):this.options.constrainTo[3]),this.options.constrainTo[0]!==!1&&this.options.constrainTo[2]!==!1&&(g=this.options.constrainTo[2]===!1?1/0:this.options.constrainTo[2],j=this.options.constrainTo[0]===!1?-(1/0):this.options.constrainTo[0]),this.pos.x+b<i&&(k.x=i),this.pos.y+d<j&&(k.y=j)):"string"==typeof this.options.constrainTo&&(i=0,j=0,h=this.$container.width()-this.$el.outerWidth(),g=this.$container.height()-this.$el.outerHeight(),this.pos.x+b<0&&(k.x=0),this.pos.y+d<0&&(k.y=0)),this.pos.x+b>h&&(k.x=h),this.pos.y+d>g&&(k.y=g),this.shouldUseCSSTranslation()&&e&&(k.x===i&&this.xTranslation()&&(k.x=i-this.xTranslation()),k.x===h&&this.xTranslation()&&(k.x=h-this.xTranslation()),k.y===j&&this.yTranslation()&&(k.y=j-this.yTranslation()),k.y===g&&this.yTranslation()&&(k.y=g-this.yTranslation())),k},d.prototype.getCSSEaseHash=function(a){"undefined"==typeof a&&(a=!1);var b;if(a)b="";else{if(this.CSSEaseHash)return this.CSSEaseHash;b=["all",this.options.cssEaseDuration+"ms",this.options.cssEaseString].join(" ")}return{"-webkit-transition":b,"-moz-transition":b,"-ms-transition":b,"-o-transition":b,transition:b}},d.prototype.calculateActiveDropRegions=function(){var b=this;this.activeDropRegions.length=0,a.each(a(this.options.droppable),function(c,d){var e=a(d);b.isOverlapping(e,b.$el)?(e.addClass(b.options.droppableActiveClass),b.activeDropRegions.push(e)):e.removeClass(b.options.droppableActiveClass)})},d.prototype.isOverlapping=function(a,b){if(this.options.overlapFunction)return this.options.overlapFunction(a,b);var c=a[0].getBoundingClientRect(),d=b[0].getBoundingClientRect();return!(c.right<d.left||c.left>d.right||c.bottom<d.top||c.top>d.bottom)},d.prototype.isTouch=function(a){return a.type.search("touch")>-1},d.prototype.isPointerEventCompatible=function(){return"MSPointerEvent"in b},d.prototype.applyMSDefaults=function(a){this.$el.css({"-ms-touch-action":"none","touch-action":"none","-ms-scroll-chaining":"none","-ms-scroll-limit":"0 0 0 0"})},d.prototype.isValidMoveEvent=function(a){return!this.isTouch(a)||this.isTouch(a)&&a.originalEvent&&a.originalEvent.touches&&1===a.originalEvent.touches.length; 3},d.prototype.shouldUseCSSTranslation=function(){if(this.options.forceNonCSS3Movement)return!1;if("undefined"!=typeof this.useCSSTranslation)return this.useCSSTranslation;var a=!1;return a=!(!this.options.useCSSTranslation||"undefined"!=typeof Modernizr&&!Modernizr.csstransforms),this.useCSSTranslation=a,a},d.prototype.cssAnimationsSupported=function(){if("undefined"!=typeof this.cssAnimationsSupport)return this.cssAnimationsSupport;if("undefined"!=typeof Modernizr&&Modernizr.cssanimations)return this.cssAnimationsSupport=!0,!0;var a=!1,b=document.createElement("div"),d="animation",e="",f="Webkit Moz O ms Khtml".split(" "),g="";if(b.style.animationName&&(a=!0),a===!1)for(var h=0;h<f.length;h++)if(b.style[f[h]+"AnimationName"]!==c){g=f[h],d=g+"Animation",e="-"+g.toLowerCase()+"-",a=!0;break}return this.cssAnimationsSupport=a,a},d.prototype.hardwareAccelerate=function(){this.$el.css({"-webkit-perspective":1e3,perspective:1e3,"-webkit-backface-visibility":"hidden","backface-visibility":"hidden"})},d.prototype.getMovementValues=function(){return{ev:this.ev,pos:this.pos,velocity:this.velocity()}},d.prototype.buildDebugDiv=function(){var b;0===a("#pep-debug").length&&(b=a("<div></div>"),b.attr("id","pep-debug").append("<div style='font-weight:bold; background: red; color: white;'>DEBUG MODE</div>").append("<div id='pep-debug-event'>no event</div>").append("<div id='pep-debug-ev-coords'>event coords: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-pos-coords'>position coords: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-velocity'>velocity: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").append("<div id='pep-debug-delta'>Δ movement: <span class='pep-x'>-</span>, <span class='pep-y'>-</span></div>").css({position:"fixed",bottom:5,right:5,zIndex:99999,textAlign:"right",fontFamily:"Arial, sans",fontSize:10,border:"1px solid #DDD",padding:"3px",background:"white",color:"#333"}));var c=this;setTimeout(function(){c.debugElements={$event:a("#pep-debug-event"),$velocityX:a("#pep-debug-velocity .pep-x"),$velocityY:a("#pep-debug-velocity .pep-y"),$dX:a("#pep-debug-delta .pep-x"),$dY:a("#pep-debug-delta .pep-y"),$evCoordsX:a("#pep-debug-ev-coords .pep-x"),$evCoordsY:a("#pep-debug-ev-coords .pep-y"),$posCoordsX:a("#pep-debug-pos-coords .pep-x"),$posCoordsY:a("#pep-debug-pos-coords .pep-y")}},0),a("body").append(b)}
3,d.prototype.log=function(a){if(this.options.debug)switch(a.type){case"event":this.debugElements.$event.text(a.event);break;case"pos-coords":this.debugElements.$posCoordsX.text(a.x),this.debugElements.$posCoordsY.text(a.y);break;case"event-coords":this.debugElements.$evCoordsX.text(a.x),this.debugElements.$evCoordsY.text(a.y);break;case"delta":this.debugElements.$dX.text(a.x),this.debugElements.$dY.text(a.y);break;case"velocity":var b=this.velocity();this.debugElements.$velocityX.text(Math.round(b.x)),this.debugElements.$velocityY.text(Math.round(b.y))}},d.prototype.toggle=function(a){"undefined"==typeof a?this.disabled=!this.disabled:this.disabled=!a},a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeOutExpo:function(a,b,c,d,e){return b===e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c}}),a.fn[e]=function(b){return this.each(function(){if(!a.data(this,"plugin_"+e)){var c=new d(this,b);a.data(this,"plugin_"+e,c),a.pep.peps.push(c)}})},a.pep={},a.pep.peps=[],a.pep.toggleAll=function(b){a.each(this.peps,function(a,c){c.toggle(b)})},a.pep.unbind=function(a){var b=a.data("plugin_"+e);"undefined"!=typeof b&&(b.toggle(!1),b.unsubscribe(),a.removeData("plugin_"+e))}}(jQuery,window),function(a,b){"use strict";a.ccm_t=function(a){return b("input[name=ccm-string-"+a+"]").val()},a.ccm_parseJSON=function(b,c){b.error?a.alert(b.message):c()},a.ccm_isBlockError=!1,a.ccm_blockError=!1,a.ccm_addError=function(b){a.ccm_isBlockError||(a.ccm_blockError="",a.ccm_blockError+="<ul>"),a.ccm_isBlockError=!0,a.ccm_blockError+="<li>"+b+"</li>"},a.ccm_resetBlockErrors=function(){a.ccm_isBlockError=!1,a.ccm_blockError=""}}(window,jQuery),function(a,b){"use strict";function c(a){var c=this;a=a||{},a=b.extend({dataType:"json",type:"post",loader:"standard",error:function(a){c.error(a,c)},complete:function(){c.complete(c)},skipResponseValidation:!1},a),c.options=a,c.execute()}c.prototype={execute:function(){var a=this,c=a.options,d=c.success;c.success=function(b){a.success(b,a,d)},a.before(a),b.ajax(c)},before:function(a){a.options.loader&&b.fn.dialog.showLoader()},errorResponseToString:function(a){return c.renderErrorResponse(a,!0)},error:function(a,b){ConcreteEvent.fire("AjaxRequestError",{response:a}),ConcreteAlert.dialog(ccmi18n.error,c.renderErrorResponse(a,!0))},validateResponse:function(a,b){return a.error?(ConcreteEvent.fire("AjaxRequestError",{response:a}),ConcreteAlert.dialog(ccmi18n.error,c.renderJsonError(a),function(){b&&b(!1,a)}),!1):(b&&b(!0,a),!0)},success:function(a,b,c){("json"!=b.options.dataType||b.options.skipResponseValidation||b.validateResponse(a))&&c&&c(a)},complete:function(a){a.options.loader&&b.fn.dialog.hideLoader()}},c.renderJsonError=function(a,c){if(!a)return"";var d=function(c,d){return"number"==typeof d&&b.isArray(a.htmlErrorIndexes)&&b.inArray(d,a.htmlErrorIndexes)>=0?c:b("<div />").text(c).html().replace(/\n/g,"<br />")},e="";if("object"==typeof a.error&&b.isArray(a.error.trace)){e='<p class="text-danger"><strong>'+d(a.error.message)+"</strong></p>",e+='<p class="text-muted">'+ccmi18n.errorDetails+"</p>",e+='<table class="table"><tbody>';for(var f,g=0;g<a.error.trace.length;g++)f=a.error.trace[g],e+="<tr><td>"+f.file+"("+f.line+"): "+f.class+"->"+f.function+"<td></tr>";e+="</tbody></table>"}else b.isArray(a.errors)&&a.errors.length>0&&"string"==typeof a.errors[0]?b.each(a.errors,function(a,b){e+='<p class="text-danger"><strong>'+d(b,a)+"</strong></p>"}):"string"==typeof a.error&&""!==a.error&&(e='<p class="text-danger" style="word-break: break-all"><strong>'+d(a.error)+"</strong></p>");return e},c.renderErrorResponse=function(a,b){return c.renderJsonError(a.responseJSON,b)||a.responseText},c.validateResponse=c.prototype.validateResponse,c.errorResponseToString=c.prototype.errorResponseToString,b.concreteAjax=function(a){new c(a)},a.ConcreteAjaxRequest=c}(this,jQuery),function(a,b){"use strict";function c(a,c){var d=this;return c=c||{},c=b.extend({progressiveOperation:!1,progressiveOperationTitle:"",progressiveOperationElement:"",beforeSubmit:d.before,complete:d.complete,data:{},error:null,skipResponseValidation:!1},c),c.data||(c.data={}),c.data.__ccm_consider_request_as_xhr="1",d.$form=a,c.progressiveOperation&&(c.dataType="html"),ConcreteAjaxRequest.call(d,c),d.$form}c.prototype=Object.create(ConcreteAjaxRequest.prototype),c.prototype.execute=function(){var a=this,b=a.options,c=b.success,d=b.error;a.$form.ajaxForm({type:b.type,data:b.data,url:b.url,dataType:b.dataType,beforeSubmit:function(){b.beforeSubmit(a)},error:function(b){a.error(b,a,d)},success:function(b){a.success(b,a,c)},complete:function(){b.complete(a)}})},c.prototype.handleProgressiveOperation=function(a,c){var d=this,e=d.$form.attr("action")?d.$form.attr("action"):d.options.url,f=d.$form.formToArray(!0);if(b.fn.dialog.hideLoader(),d.options.progressiveOperationElement){var g=b(d.options.progressiveOperationElement);g.html(a);var h=b("#ccm-progressive-operation-progress-bar").attr("data-total-items");ccm_doProgressiveOperation(e,f,h,c,!1,g)}else b('<div id="ccm-dialog-progress-bar" />').appendTo(document.body).html(a).jqdialog({autoOpen:!1,height:200,width:400,modal:!0,title:d.options.progressiveOperationTitle,closeOnEscape:!1,open:function(a,d){b(".ui-dialog-titlebar-close",this.parentNode).hide();var g=b("#ccm-progressive-operation-progress-bar").attr("data-total-items");ccm_doProgressiveOperation(e,f,g,function(a){c(a)})}}),b("#ccm-dialog-progress-bar").jqdialog("open")},c.prototype.error=function(a,b,c){ConcreteAjaxRequest.prototype.error(a,b),c&&c(a)},c.prototype.doFinish=function(a){var c=this;ConcreteEvent.publish("AjaxFormSubmitSuccess",{response:a,form:c.$form.attr("data-dialog-form")}),a.redirectURL?window.location.href=a.redirectURL:(c.$form.attr("data-dialog-form")&&b.fn.dialog.closeTop(),a.message&&ConcreteAlert.notify({message:a.message,title:a.title}))},c.prototype.success=function(a,b,c){(b.options.skipResponseValidation||b.validateResponse(a
3))&&(c?b.options.progressiveOperation?b.handleProgressiveOperation(a,function(a){c(a)}):c(a):b.options.progressiveOperation?b.handleProgressiveOperation(a,function(a){b.doFinish(a)}):b.doFinish(a))},b.fn.concreteAjaxForm=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteAjaxForm=c}(this,jQuery),function(a,b){"use strict";function c(a,c){var d=this;return c=b.extend({iframe:!0,task:!1,dragAreaBlockID:!1,dragArea:null,bID:!1,loader:!0},c),d.options=c,c.dragAreaBlockID&&a.find("input[name=dragAreaBlockID]").val(c.dragAreaBlockID),ConcreteAjaxForm.call(d,a,c),a}c.prototype=Object.create(ConcreteAjaxForm.prototype),c.prototype.before=function(a){b.fn.dialog.showLoader(),ConcreteEvent.fire("EditModeBeforeBlockSubmit",{form:a})},c.prototype.refreshBlock=function(a){var c=this,d=a.cID?a.cID:CCM_CID,e=new Concrete.getEditMode,f=e.getAreaByID(a.aID),g=f.getEnableGridContainer()?1:0,h=CCM_DISPATCHER_FILENAME+"/ccm/system/block/render";b.fn.dialog.closeTop(),b.get(h,{arHandle:f.getHandle(),cID:d,bID:a.bID,arEnableGridContainer:g,placeholder:""},function(a){var d,g=Concrete.getEditMode(),h=f.inEditMode(g);if(ConcreteToolbar.disableDirectExit(),b.fn.dialog.hideLoader(),"add"==c.options.task){var i=h.getElem(),j=b(a);if(!j.hasClass("ccm-block-edit")){var k=j.find(".ccm-block-edit");k.length&&(d=new Concrete.Block(k,g),d.setArea(h))}if(d||(d=new Concrete.Block(j,g),d.setArea(h)),"core_area_layout"===c.options.btHandle)i.children(".ccm-area-block-list").append(j);else{var l=b(c.options.placeholder);l.length?l.replaceWith(j):i.children(".ccm-area-block-list").prepend(j)}ConcreteAlert.notify({message:ccmi18n.addBlockMsg,title:ccmi18n.addBlock}),b.fn.dialog.closeAll(),c.options.btSupportsInlineAdd&&(e.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete",{block:d})),ConcreteEvent.fire("EditModeAddBlockComplete",{block:d})}else{d=h.getBlockByID(c.options.bID);var m=d.replace(a);ConcreteAlert.notify({message:ccmi18n.updateBlockMsg,title:ccmi18n.updateBlock}),c.options.btSupportsInlineEdit&&(e.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete",{block:m})),ConcreteEvent.fire("EditModeUpdateBlockComplete",{block:m})}})},c.prototype.success=function(a,c){var d=c.$form[0];if(a.newbID&&d){var e=d.action,f=e.substring(e.indexOf("&bID=")),g=e.replace(f,"&bID="+a.newbID);b(d).attr("action",g)}c.options.progressiveOperation?c.handleProgressiveOperation(a,function(a){c.refreshBlock(a)}):c.validateResponse(a)&&c.refreshBlock(a)},b.fn.concreteAjaxBlockForm=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteAjaxBlockForm=c}(this,jQuery),jQuery.cookie=function(a,b,c){if("undefined"==typeof b){var d=null;if(document.cookie&&""!=document.cookie)for(var e=document.cookie.split(";"),f=0;f<e.length;f++){var g=jQuery.trim(e[f]);if(g.substring(0,a.length+1)==a+"="){d=decodeURIComponent(g.substring(a.length+1));break}}return d}c=c||{},null===b&&(b="",c=$.extend({},c),c.expires=-1);var h="";if(c.expires&&("number"==typeof c.expires||c.expires.toUTCString)){var i;"number"==typeof c.expires?(i=new Date,i.setTime(i.getTime()+24*c.expires*60*60*1e3)):i=c.expires,h="; expires="+i.toUTCString()}var j=c.path?"; path="+c.path:"",k=c.domain?"; domain="+c.domain:"",l=c.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(b),h,j,k,l].join("")},function(a,b){"use strict";function c(a){this.options=a,this.isOpen=!1,this.detail=!1,this.isPinned=!1,this.pinned=function(){return this.isPinned},this.willBePinned=function(){return this.isOpen&&!this.isPinned},this.isPinable=function(){return this.options.pinable},this.getPositionClass=function(){var b;switch(a.position){case"left":b="ccm-panel-left";break;case"right":b="ccm-panel-right"}
3switch(a.transition){case"slide":b+=" ccm-panel-transition-slide";break;default:b+=" ccm-panel-transition-none"}return b},this.getURL=function(){return this.options.url},this.getCurrentURL=function(){return this.options.currentUrl},this.getIdentifier=function(){return this.options.identifier},this.getDOMID=function(){return"ccm-panel-"+this.options.identifier.replace("/","-")},this.onPanelLoad=function(a){var c=b("a[data-launch-panel="+this.getIdentifier()+"]"),d=c.hasClass("launch-tooltip");this.setupSubPanels(),this.setupPanelDetails(),c.removeClass().addClass("ccm-launch-panel-active"),d&&c.addClass("launch-tooltip"),Concrete.event.publish("PanelLoad",{panel:this,element:a})},this.hide=function(a){a=a||b.noop;var c=this;this.closePanelDetail(function(){var e=this,f=b("a[data-launch-panel="+this.getIdentifier()+"]");f.removeClass(),b("#"+e.getDOMID()).removeClass("ccm-panel-active"),b("#ccm-panel-overlay").queue(function(){b(this).removeClass("ccm-panel-translucent"),b(this).dequeue()}).delay(1e3).hide(0),d.removeClass(e.getPositionClass()),d.removeClass("ccm-panel-open"),e.isOpen=!1,b(this).dequeue(),a.call(c),setTimeout(function(){Concrete.event.publish("PanelClose",{panel:e})},0)})},this.toggle=function(){this.isOpen?this.hide():this.show()},this.setupSubPanels=function(){var a=b("#"+this.getDOMID()),c=this;a.find("[data-launch-sub-panel-url]").unbind(".sub").on("click.sub",function(){var d=b("<div />").addClass("ccm-panel-cover").appendTo(b(this).closest(".ccm-panel"));c.closePanelDetailImmediately();var e=b(this).attr("data-launch-sub-panel-url");return b("<div />",{class:"ccm-panel-content ccm-panel-content-appearing"}).appendTo(a.find(".ccm-panel-content-wrapper")).load(e+"?cID="+CCM_CID,function(){_.delay(function(){d.remove()},250),a.find(".ccm-panel-content-visible").removeClass("ccm-panel-content-visible").addClass("ccm-panel-slide-left"),b(this).removeClass("ccm-panel-content-appearing").addClass("ccm-panel-content-visible"),c.options.currentUrl=e,c.onPanelLoad(this)}),b(this).removeClass("ccm-panel-menu-item-active"),!1}),a.find("[data-panel-navigation=back]").unbind().on("click.navigate",function(){return c.goBack(),!1})},this.goBack=function(){var a=b("#"+this.getDOMID());this.closePanelDetailImmediately(),a.queue(function(){var b=a.find(".ccm-panel-content-visible").prev();a.find(".ccm-panel-content-visible").removeClass("ccm-panel-content-visible").addClass("ccm-panel-slide-right"),b.removeClass("ccm-panel-slide-left").addClass("ccm-panel-content-visible"),a.dequeue()}).delay(500).queue(function(){a.find(".ccm-panel-slide-right").remove(),a.dequeue()})},this.showPanelConfirmationMessage=function(a,c,d){var e='<div id="ccm-panel-confirmation-'+a+'" class="ccm-ui ccm-panel-confirmation-wrapper"><div class="ccm-panel-confirmation">';e+="<p>"+c+'</p><div class="ccm-panel-confirmation-buttons"></div>',e+="</div></div>",b(e).appendTo(document.body);var f=b("#ccm-panel-confirmation-"+a);f.delay(0).queue(function(){b(this).addClass("ccm-panel-confirmation-displayed"),b(this).dequeue()});for(var g=[{class:"btn pull-left btn-sm btn-link",type:"button","data-panel-confirmation-action":"cancel",text:ccmi18n.cancel}],h=0;h<d.length;h++)g.push(d[h]);b.each(g,function(a,c){f.find(".ccm-panel-confirmation-buttons").append(b("<button />",c))}),f.find("button").on("click",function(){f.delay(0).queue(function(){f.removeClass("ccm-panel-confirmation-displayed"),f.addClass("ccm-panel-confirmation-disappearing"),b(this).dequeue()}).delay(350).queue(function(){f.remove()})})},this.closePanelDetail=function(a){a=a||b.noop;var c=this;if(!this.detail)return a.call(c),!1;b("a[data-launch-panel-detail="+this.detail.identifier+"]").removeClass("ccm-panel-menu-item-active");var e=this.detail.transition;return b("div.ccm-panel-detail").queue(function(){b(this).removeClass("ccm-panel-detail-transition-"+e+"-apply"),b(this).dequeue()}).delay(550).queue(function(){b(this).remove(),b(this).dequeue()}),b("div.ccm-page").queue(function(){b(this).removeClass("ccm-panel-detail-transition-"+e+"-apply"),b(this).dequeue()}).delay(550).queue(function(){d.removeClass("ccm-panel-detail-open"),b(this).addClass("ccm-panel-detail-disable-transition"),b(this).dequeue()}).delay(1).queue(function(){b(this).removeClass("ccm-panel-detail-transition-"+e),b(this).dequeue()}).delay(1).queue(function(){b(this).removeClass("ccm-panel-detail-disable-transition"),b(this).dequeue(),a.call(c)}),b("#ccm-panel-detail-form-actions-wrapper .ccm-panel-detail-form-actions").queue(function(){b(this).css("opacity",0),b(this).dequeue(0)}).delay(550).queue(function(){b(this).remove(),b(this).dequeue()}),Concrete.event.publish("PanelCloseDetail",this.detail),this.detail=!1,b(".ccm-panel-detail").length>0?550:void 0},this.closePanelDetailImmediately=function(){return!!this.detail&&(d.removeClass("ccm-panel-detail-open"),b(".ccm-panel-detail").remove(),b(".ccm-panel-detail-form-actions").remove(),b(".ccm-page").removeClass().addClass("ccm-page"),Concrete.event.publish("PanelCloseDetail",this.detail),void(this.detail=!1))},this.openPanelDetail=function(a){var c=this,e=b.extend({transition:"none",url:!1,data:""},a),f=e.identifier;c.detail&&c.closePanelDetailImmediately(),c.detail=e;var g="ccm-panel-detail-"+f,h=b("<div />",{id:g,class:"ccm-panel-detail"}).appendTo(document.body),i=b("<div />",{class:"ccm-ui ccm-panel-detail-content"}).appendTo(h);b("div.ccm-page").queue(function(){h.addClass("ccm-panel-detail-transition-"+e.transition),b(this).addClass("ccm-panel-detail-transition-"+e.transition),b(this).dequeue()}).delay(3).queue(function(){h.addClass("ccm-panel-detail-transition-"+e.transition+"-apply"),b(this).addClass("ccm-panel-detail-transition-"+e.transition+"-apply"),b(this).dequeue()}),d.addClass("ccm-panel-detail-open");var j=function(){Concrete.event.publish("PanelOpenDetail",{panel:e,panelObj:c,container:i})};if(e.url){var k=e.url+"?cID="+CCM_CID,l=null;b.isPlainObject(e.data)?l=e.data:k+=e.data,i.load(k,l,function(){b.fn.dialog.hideLoader(),i.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),i.find("a[data-help-notification-toggle]").concreteHelpLauncher(),c.loadPanelDetailActions(i),_.defer(j)})}else b.fn.dialog.hideLoader(),i.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),i.find("a[data-help-notification-toggle]").concreteHelpLauncher(),c.loadPanelDetailActions(i),_.defer(j)},this.loadPanelDetailActions=function(a){var c=this,d=a.find(".ccm-panel-detail-form-actions");d.length&&(b(document.body).delay(500).queue(function(){var a=b("#ccm-panel-detail-form-actions-wrapper");a.length||(a=b("<div />",{id:"ccm-panel-detail-form-actions-wrapper",class:"ccm-ui"}),a.appendTo(document.body)),a.html("").append(d),b(this).dequeue()}).delay(5).queue(function(){b("#ccm-panel-detail-form-actions-wrapper .ccm-panel-detail-form-actions").css("opacity",1),b(this).dequeue()}),b("button[data-panel-detail-action=cancel]").on("click",function(){c.closePanelDetail()}),a.find("[data-panel-detail-form]").concreteAjaxForm(),b("button[data-panel-detail-action=submit]").on("click",function(){b("[data-panel-detail-form]").submit()}),ConcreteEvent.subscribe("AjaxFormSubmitSuccess",function(a,c){"reload"==b('[data-panel-detail-form="'+c.form
3+'"]').data("action-after-save")&&location.reload()}))},this.setupPanelDetails=function(){var a=b("#"+this.getDOMID()),c=this;a.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),a.find("[data-panel-menu=accordion]").each(function(){var d=b(this),e=b(this).find(">nav>span");e.text(b(this).find("a[data-panel-accordion-tab-selected=true]").text()),e.unbind(".accordion").on("click.accordion",function(){d.toggleClass("ccm-panel-header-accordion-dropdown-visible")}),b(this).find(">nav ul a").unbind(".accordion").on("click.accordion",function(){var f=c.getCurrentURL();f||(f=c.getURL());var g=a.find(".ccm-panel-content");d.removeClass("ccm-panel-header-accordion-dropdown-visible"),e.html(b(this).text()),b.fn.dialog.showLoader(),g.load(f+"?cID="+CCM_CID+"&tab="+b(this).attr("data-panel-accordion-tab"),function(){b.fn.dialog.hideLoader(),c.onPanelLoad(this)})})}),a.find(".dialog-launch").dialog(),a.find("[data-panel-menu=collapsible-list-group]").each(function(){var a,c=b(this),d=c.find(".list-group-item-collapse-wrapper"),e=c.attr("data-panel-menu-id"),f=c.find(".list-group-item-collapse span");c.find(".list-group-item-collapse").unbind(".clg").on("click.clg",function(){c.hasClass("ccm-panel-list-group-item-expanded")?(f.text(ccmi18n.expand),Concrete.event.publish("PanelCollapsibleListGroupCollapse",e),d.height(0)):(a=d.show().height("").outerHeight(),d.height(0),Concrete.event.publish("PanelCollapsibleListGroupExpand",e),f.text(ccmi18n.collapse),d.height(a)),c.toggleClass("ccm-panel-list-group-item-expanded")})}),a.find("[data-launch-panel-detail]").unbind(".detail").on("click.detail",function(){b.fn.dialog.showLoader(),b(".ccm-panel-menu-item-active").removeClass("ccm-panel-menu-item-active"),b(this).addClass("ccm-panel-menu-item-active");var a=b(this).attr("data-launch-panel-detail"),d={identifier:a,target:b(this)};return b(this).attr("data-panel-transition")&&(d.transition=b(this).attr("data-panel-transition")),b(this).attr("data-panel-detail-url")&&(d.url=b(this).data("panel-detail-url")),c.openPanelDetail(d),!1}),c.loadPanelDetailActions(a)},this.show=function(a){a=a||b.noop;var c=b("#"+this.getDOMID()),f=this,g=function(){d.addClass("ccm-panel-open"),c.find(".ccm-panel-content-wrapper").html(""),c.addClass("ccm-panel-active ccm-panel-loading"),b("<div/>").addClass("ccm-panel-content ccm-panel-content-visible").appendTo(c.find(".ccm-panel-content-wrapper")).load(f.getURL()+"?cID="+CCM_CID,function(){var a=this;c.delay(1).queue(function(){b(this).removeClass("ccm-panel-loading").addClass("ccm-panel-loaded"),b(this).dequeue()}),f.onPanelLoad(c),f.isOpen=!0,Concrete.event.publish("PanelOpen",{panel:f,element:a}),f.options.overlay&&e.showOverlay(f.options.translucent)}),d.addClass(f.getPositionClass())};if(this.options.primary){var h=_(e.getPanels()).findWhere({isOpen:!0});h?h.hide(function(){g.call(this)}):g.call(this)}else g.call(this);b(".ccm-toolbar-mobile-menu-button").removeClass("ccm-mobile-close"),b(".ccm-mobile-menu-overlay").slideUp()}}var d=b("html"),e=function(){var a=[];return{getPanels:function(){return a},showOverlay:function(a){b("#ccm-panel-overlay").clearQueue().show(0).delay(100).queue(function(){a?b(this).addClass("ccm-panel-translucent"):b(this).removeClass("ccm-panel-translucent"),b(this).dequeue()})},exitPanelMode:function(c){function d(){e--,0==e&&c.call(null)}c=c||b.noop;for(var e=0,f=0;f<a.length;f++)a[f].isOpen&&(e++,a[f].hide(d))},register:function(d){var e=b.extend({translucent:!0,overlay:!0,position:"left",primary:!0,transition:"slide"},d),f=new c(e);a.push(f);var g=b("#"+f.getDOMID());g.length||(b("<div />",{id:f.getDOMID(),class:"ccm-panel "+f.getPositionClass()}).appendTo(b(document.body)),b("<div />",{class:"ccm-panel-content-wrapper ccm-ui"}).appendTo(b("#"+f.getDOMID())))},getByIdentifier:function(b){for(var c=0;c<a.length;c++)if(a[c].getIdentifier()==b)return a[c]}}}();a.ConcretePanel=c,a.ConcretePanelManager=e}(window,jQuery),function(global,$){"use strict";$.widget("concrete.dialog",$.ui.dialog,{_allowInteraction:function(a){return!!$(a.target).closest(".ccm-interaction-dialog").length||!!$(a.target).closest(".cke_dialog").length||this._super(a)}}),$.widget.bridge("jqdialog",$.concrete.dialog),$.fn.dialog=function(){return arguments.length>0?void $(this).jqdialog(arguments[0],arguments[1],arguments[2]):$(this).is("div")?void $(this).jqdialog():$(this).each(function(){$(this).unbind("click.make-dialog").bind("click.make-dialog",function(a){if
3(a.preventDefault(),!$(this).hasClass("ccm-dialog-launching")){$(this).addClass("ccm-dialog-launching");var b=$(this).attr("href"),c=$(this).attr("dialog-width"),d=$(this).attr("dialog-height"),e=$(this).attr("dialog-title"),f=$(this).attr("dialog-on-open"),g=$(this).attr("dialog-class"),h=$(this).attr("dialog-on-destroy"),i=$(this).attr("dialog-on-close"),j=$(this).attr("dialog-on-direct-close"),k={modal:!0,href:b,width:c,height:d,title:e,onOpen:f,onDestroy:h,dialogClass:g,onClose:i,onDirectClose:j,launcher:$(this)};$.fn.dialog.open(k)}})})},$.fn.dialog.close=function(a){a++,$("#ccm-dialog-content"+a).jqdialog("close")},$.fn.dialog.open=function(options){if("undefined"!=typeof ConcreteMenu){var activeMenu=ConcreteMenuManager.getActiveMenu();activeMenu&&activeMenu.hide()}var w;"string"==typeof options.width?"auto"==options.width?w="auto":options.width.indexOf("%",0)>0?(w=options.width.replace("%",""),w=$(window).width()*(w/100),w+=50):w=parseInt(options.width)+50:w=options.width?parseInt(options.width)+50:550;var h;"string"==typeof options.height?"auto"==options.height?h="auto":options.height.indexOf("%",0)>0?(h=options.height.replace("%",""),h=$(window).height()*(h/100),h+=100):h=parseInt(options.height)+100:h=options.height?parseInt(options.height)+100:400,"auto"!==h&&h>$(window).height()&&(h=$(window).height()),options.width=w,options.height=h;var defaults={modal:!0,escapeClose:!0,width:w,height:h,dialogClass:"ccm-ui",resizable:!0,create:function(){$(this).parent().addClass("animated fadeIn")},open:function(){var $dialog=$(this),nd=$(".ui-dialog").length;1==nd&&($("body").attr("data-last-overflow",$("body").css("overflow")),$("body").css("overflow","hidden"));var overlays=$(".ui-widget-overlay").length;if($(".ui-widget-overlay").each(function(a,b){a+1<overlays&&$(this).removeClass("animated fadeIn").css("opacity",0)}),1==overlays&&$(".ui-widget-overlay").addClass("animated fadeIn"),$.fn.dialog.activateDialogContents($dialog),$dialog.jqdialog("option","resizable")){var $wrapper=$($dialog.parent()),z=parseInt($wrapper.find(".ui-dialog-buttonpane").css("z-index"));$wrapper.find(".ui-resizable-handle").css("z-index",z+1e3)}"undefined"!=typeof options.onOpen&&("function"==typeof options.onOpen?options.onOpen($dialog):eval(options.onOpen)),options.launcher&&options.launcher.removeClass("ccm-dialog-launching")},beforeClose:function(){var a=$(".ui-dialog:visible").length;1==a&&$("body").css("overflow",$("body").attr("data-last-overflow"))},close:function(ev,u){options.element||$(this).jqdialog("destroy").remove(),"undefined"!=typeof options.onClose&&("function"==typeof options.onClose?options.onClose($(this)):eval(options.onClose)),"undefined"==typeof options.onDirectClose||!ev.handleObj||"keydown"!=ev.handleObj.type&&"click"!=ev.handleObj.type||("function"==typeof options.onDirectClose?options.onDirectClose():eval(options.onDirectClose)),"undefined"!=typeof options.onDestroy&&("function"==typeof options.onDestroy?options.onDestroy():eval(options.onDestroy));var overlays=$(".ui-widget-overlay").length;$(".ui-widget-overlay").each(function(a,b){a+1<overlays?$(this).css("opacity",0):$(this).css("opacity",1)})}},finalSettings={autoOpen:!1,data:{}};$.extend(finalSettings,defaults,options),finalSettings.element?($(finalSettings.element).jqdialog(finalSettings).jqdialog(),$(finalSettings.element).jqdialog("open")):($.fn.dialog.showLoader(),$.ajax({type:"GET",url:finalSettings.href,data:finalSettings.data,success:function(a){$.fn.dialog.hideLoader(),$("<div />").jqdialog(finalSettings).html(a).jqdialog("open")},error:function(a,b,c){$.fn.dialog.hideLoader(),ConcreteAlert.dialog(ccmi18n.error,ConcreteAjaxRequest.renderErrorResponse(a,!0))}}))},$.fn.dialog.activateDialogContents=function(a){if(a.find("button[data-dialog-action=cancel]").on("click",function(){$.fn.dialog.closeTop()}),a.find("[data-dialog-form]").each(function(){var a=$(this),b={};"progressive"==a.attr("data-dialog-form-processing")&&(b.progressiveOperation=!0,b.progressiveOperationElement="div[data-dialog-form-element=progress-bar]"),a.concreteAjaxForm(b)}),a.find("button[data-dialog-action=submit]").on("click",function(){a.find("[data-dialog-form]").submit()}),a.find(".dialog-buttons").length>0){var b=a.find(".dialog-buttons").html();b&&(a.jqdialog("option","buttons",[{}]),a.parent().find(".ui-dialog-buttonset").remove(),a.parent().find(".ui-dialog-buttonpane").html(""),a.find(".dialog-buttons").eq(0).removeClass().appendTo(a.parent().find(".ui-dialog-buttonpane").addClass("ccm-ui")))}if(a.find(".dialog-launch").dialog(),a.find(".ccm-dialog-close").on("click",function(){a.dialog("close")}),a.find(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"}),a.find(".dialog-help").length>0){a.find(".dialog-help").hide();var c,d=a.find(".dialog-help").html();c=ccmi18n.helpPopup?ccmi18n.helpPopup:"Help";
3var e=$('<button class="ui-dialog-titlebar-help ccm-menu-help-trigger"><i class="fa fa-info-circle"></i></button>'),f=$("#ccm-tooltip-holder");a.parent().find(".ui-dialog-titlebar").append(e),e.popover({content:function(){return d},placement:"bottom",html:!0,container:f,trigger:"click"}),e.on("shown.bs.popover",function(){var a=function(){e.popover("hide",e),a=$.noop};e.on("hide.bs.popover",function(b){e.unbind(b),a=$.noop}),$("body").mousedown(function(b){$(b.target).closest(f).length||$(b.target).closest(e).length||($(this).unbind(b),a())})})}},$.fn.dialog.getTop=function(){var a=$(".ui-dialog:visible").length;return $($(".ui-dialog:visible")[a-1]).find(".ui-dialog-content")},$.fn.dialog.replaceTop=function(a){var b=$.fn.dialog.getTop();b.html(a),$.fn.dialog.activateDialogContents(b)},$.fn.dialog.showLoader=function(a){NProgress.start()},$.fn.dialog.hideLoader=function(){NProgress.done()},$.fn.dialog.closeTop=function(){var a=$.fn.dialog.getTop();a.jqdialog("close")},$.fn.dialog.closeAll=function(){$($(".ui-dialog-content").get().reverse()).jqdialog("close")},$.ui.dialog.prototype._focusTabbable=$.noop}(window,jQuery),function(a,b){"use strict";PNotify.prototype.options.styling={container:"ccm-notification",notice:"ccm-notification-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"ccm-notification-info",info_icon:"glyphicon glyphicon-info-sign",success:"ccm-notification-success",success_icon:"glyphicon glyphicon-ok-sign",error:"ccm-notification-danger",error_icon:"glyphicon glyphicon-warning-sign",closer:"ccm-notification-closer",pin_up:!1,pin_down:!1},PNotify.prototype.options.width="400px",PNotify.prototype.options.addclass="ccm-ui",PNotify.prototype.options.animate={animate:!0,in_class:"fadeIn",out_class:"bounceOutRight"},PNotify.prototype.options.buttons.closer_hover=!1;var c={dialog:function(a,c,d){var e=b('<div id="ccm-popup-alert" class="ccm-ui"><div id="ccm-popup-alert-message">'+c+"</div></div>");e.dialog({title:a,width:500,maxHeight:500,modal:!0,dialogClass:"ccm-ui",close:function(){e.remove(),d&&d()}})},confirm:function(a,c,d,e){var f=b('<div id="ccm-popup-confirmation" class="ccm-ui"><div id="ccm-popup-confirmation-message">'+a+"</div>");d=d?"btn "+d:"btn btn-primary",e=e?e:ccmi18n.go,f.dialog({title:ccmi18n.confirm,width:500,maxHeight:500,modal:!0,dialogClass:"ccm-ui",close:function(){f.remove()},buttons:[{}],open:function(){b(this).parent().find(".ui-dialog-buttonpane").addClass("ccm-ui").html(""),b(this).parent().find(".ui-dialog-buttonpane").append('<button onclick="jQuery.fn.dialog.closeTop()" class="btn btn-default">'+ccmi18n.cancel+'</button><button data-dialog-action="submit-confirmation-dialog" class="btn '+d+' pull-right">'+e+"</button></div>")}}),f.parent().on("click","button[data-dialog-action=submit-confirmation-dialog]",function(){return c()})},info:function(a){var c=b.extend({type:"info",icon:"question"},a);return this.notify(c)},error:function(a){var c=b.extend({type:"error",icon:"exclamation-circle"},a);return this.notify(c)},notify:function(a){var c=b.extend({type:"success",icon:"check",title:!1,message:!1,appendTo:!1,delay:2e3,callback:function(){}},a),d={text:c.message,icon:"fa fa-"+c.icon,type:c.type, 4delay:c.delay,after_close:c.callback};c.title&&(d.title=c.title),c.hide===!1&&(d.hide=c.hide),new PNotify(d)}};a.ConcreteAlert=c}(this,jQuery),function(a,b){"use strict";function c(a,c){var d=this;return c=c||{},c=b.extend({url:!1,data:{}},c),d.$element=a,d.options=c,d.initializeEditableFields(),d.initializeClearCommands(),d.$element}c.prototype={getAjaxURL:function(a){var b=this,c=b.options.url;return a.attr("data-url")&&(c=a.attr("data-url")),c},setupXeditableField:function(a){var b=this;a.editable({ajaxOptions:{dataType:"json"},emptytext:ccmi18n.none,showbuttons:!0,params:b.options.data,url:b.options.url,success:function(a,b){return ConcreteAjaxRequest.validateResponse(a)?{newValue:b}:""},pk:"_x"})},setupXeditableAttributeField:function(a){var b=this;a.editable({ajaxOptions:{dataType:"json"},mode:a.data("editablemode"),emptytext:ccmi18n.none,showbuttons:!0,savenochange:!0,autotext:"never",url:b.options.url,params:function(a){var c=[];return c.push({name:"name",value:a.name}),c.push({name:"pk",value:a.pk}),_.each(b.options.data,function(a,b){"object"==typeof a?c.push({name:a.name,value:a.value}):c.push({name:b,value:a})}),_.each(a.value,function(a){c.push({name:a.name,value:a.value})}),c},success:function(a,b){return ConcreteAjaxRequest.validateResponse(a
4)?{newValue:a.value}:""},pk:"_x",error:function(a,b){var c="",d=a?a.responseJSON:null;return d&&(""===c&&"string"==typeof d.error&&(c=d.error),""===c&&d.error&&"string"==typeof d.error.message&&(c=d.error.message),""===c&&d.errors&&d.errors.join&&(c=d.errors.join("\n"))),""===c&&(c="string"==typeof a?a:a.responseText||a.statusText||"Unknown error!"),c}}),a.on("hidden",function(){if("undefined"!=typeof CKEDITOR)for(var a in CKEDITOR.instances){var b=CKEDITOR.instances[a];b.destroy(!0)}})},setupImageField:function(a){var c=this,d=a.find(".editable-image-wrapper img");a.find(".editable-image-wrapper input").css("width",d.width()).css("height",d.height()),a.fileupload({url:c.getAjaxURL(a),dataType:"json",formData:c.options.data,start:function(){b.fn.dialog.showLoader()},success:function(b){c.updateImageField(b,a)},error:function(a){ConcreteAlert.dialog(ccmi18n.error,a.responseText)},complete:function(a){b.fn.dialog.hideLoader()}})},updateImageField:function(a,b){var c=this;ConcreteAjaxRequest.validateResponse(a)&&(b.find(".editable-image-display").html(a.imageHTML).find("img").attr("src",function(a,b){return b+"?"+(new Date).getTime()}),c.setupImageField(b),ConcreteAlert.notify({message:a.message}))},initializeEditableFields:function(){var a=this;a.$element.find("[data-editable-field-type]").each(function(){var c=b(this),d="setup"+c.attr("data-editable-field-type").charAt(0).toUpperCase()+c.attr("data-editable-field-type").slice(1)+"Field";a[d](c)})},initializeClearCommands:function(){var a=this;a.$element.on("click","[data-editable-field-command=clear]",function(){var c=b(this),d=c.closest("[data-editable-field-type]"),e="update"+d.attr("data-editable-field-type").charAt(0).toUpperCase()+d.attr("data-editable-field-type").slice(1)+"Field",f=a.options.data;f.task="clear";var g=a.getAjaxURL(d);return new ConcreteAjaxRequest({url:g,data:f,success:function(b){a[e](b,d)}}),!1}),a.$element.on("click","[data-editable-field-command=clear_attribute]",function(){var c=a.options.data,d=a.getAjaxURL(b(this)),e=b(this).attr("data-key-id"),f=[];return _.each(c,function(a,b){"object"==typeof a?f.push({name:a.name,value:a.value}):f.push({name:b,value:a})}),f.push({name:"akID",value:e}),new ConcreteAjaxRequest({url:d,data:f,success:function(a){b("[data-key-id="+e+"][data-editable-field-type=xeditableAttribute]").editable("setValue","")}}),!1})}},b.fn.concreteEditableFieldContainer=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteEditableFieldContainer=c}(this,jQuery),function(a,b){"use strict";a.ccm_doPageReindexing=function(){b.get(CCM_TOOLS_PATH+"/reindex_pending_pages?ccm_token="+CCM_SECURITY_TOKEN)}}(window,jQuery),function(a,b){"use strict";function c(a,c){var d=this;c=c||{},c=b.extend({handle:"this",menu:!1,highlightClassName:"ccm-menu-highlight",highlightOffset:0,menuContainerClass:!1,menuActiveClass:"ccm-menu
4-item-active",menuActiveParentClass:"ccm-parent-menu-item-active",menuLauncherHoverClass:"ccm-menu-item-hover",menuLauncherHoverParentClass:"ccm-parent-menu-item-hover",enabled:!0,enableClickProxy:!0,onHide:!1},c),d.$element=a,d.options=c,"none"==c.handle?d.$launcher=!1:(d.$launcher="this"==c.handle?d.$element:b(c.handle),d.options.enableClickProxy&&d.$launcher.each(function(){var a=b(this);a.on("mousemove.concreteMenu",function(a){d.hoverProxy(a,b(this))})})),d.$menu=b(c.menu),d.setup(),Concrete.event.bind("EditModeBlockDragInitialization",function(){d.hide()})}c.prototype={setup:function(){var a=this,c=a.options,e=d;c.enableClickProxy?(e.$clickProxy||(e.$clickProxy=b("<div />",{id:"ccm-menu-click-proxy"}),e.$clickProxy.on("mouseout.concreteMenuProxy",function(a){var b=e.hoverMenu;b.mouseout(a)}),e.$clickProxy.on("mouseover.concreteMenuProxy",function(a){var b=e.hoverMenu;b.mouseover(a)}),e.$clickProxy.on("click.concreteMenuProxy",function(a){var b=e.hoverMenu;b.show(a)}),b(document.body).append(e.$clickProxy)),e.$highlighter||(e.$highlighter=b("<div />",{id:"ccm-menu-highlighter"}),b(document.body).append(e.$highlighter))):a.$launcher&&(a.$launcher.on("mouseover.concreteMenu",function(b){a.mouseover(b)}),a.$launcher.on("mouseout.concreteMenu",function(b){a.mouseout(b)}),a.$launcher.on("click.concreteMenu",function(b){a.show(b)})),e.$container||(e.$container=b("<div />",{id:"ccm-popover-menu-container",class:"ccm-ui"}),b(document.body).append(e.$container))},destroy:function(){var a=this;a.hide(),a.$launcher.each(function(){b(this).unbind("mousemove.concreteMenu")})},positionAt:function(a,b){if(!b)return!1;var c=this,d=b.offset(),e={top:d.top-c.options.highlightOffset,left:d.left-c.options.highlightOffset,width:b.outerWidth()+2*c.options.highlightOffset,height:b.outerHeight()+2*c.options.highlightOffset,"border-top-left-radius":b.css("border-top-left-radius"),"border-top-right-radius":b.css("border-top-right-radius"),"border-bottom-left-radius":b.css("border-bottom-left-radius"),"border-bottom-right-radius":b.css("border-bottom-right-radius")};a.css(e)},hoverProxy:function(a,b){a.stopPropagation();var c=this,e=d,f=c.options.menuLauncherHoverClass,g=e.$clickProxy;return!(!e.enabled||e.activeMenu)&&(c.positionAt(g,b),g.removeClass().addClass(f),void(d.hoverMenu=c))},mouseover:function(a){var b=this.$launcher,c=this.options;
4b.addClass(c.menuLauncherHoverClass),b.parents("*").slice(0,3).addClass(c.menuLauncherHoverParentClass)},mouseout:function(a){var b=this.$launcher,c=this.options;b.removeClass(c.menuLauncherHoverClass),b.parents("*").slice(0,3).removeClass(c.menuLauncherHoverParentClass)},setupMenuOptions:function(a){a.find(".dialog-launch").dialog()},show:function(a){var c=this,e="touch"===a.type.substr(0,5).toLowerCase(),f=e?a.originalEvent.touches[0]:null,g=d,h=c.options,i=c.$launcher,j=c.$element,k=g.$container,l=g.$highlighter,m=c.$menu.clone(!0,!0),n=(f?f.pageX:a.pageX)+2,o=(f?f.pageY:a.pageY)+2,p=f?f.clientX:a.clientX,q=f?f.clientY:a.clientY;if(g.getActiveMenu()==c)return!1;m.on("contextmenu",function(){return!1}),a.stopPropagation(),h.enableClickProxy&&(l.removeClass(),c.positionAt(l,i),_.defer(function(){l.addClass(h.highlightClassName)})),j.addClass(h.menuActiveClass),j.parents("*").slice(0,3).addClass(h.menuActiveParentClass),c.setupMenuOptions(m),k.html(""),m.appendTo(k),h.menuContainerClass&&k.addClass(h.menuContainerClass),m.css("opacity",0).show();var r=m.width(),s=m.height(),t=b(window).height(),u=b(window).width(),v=r/2-5,w=s/2-5,x=["bottom","top","right","left"],y=x.slice(0);p<r+30&&(x=_(x).without("left")),u<p+r+30&&(x=_(x).without("right")),t<q+s+30&&(x=_(x).without("bottom")),q<s+30&&(x=_(x).without("top")),(u<p+v||p<v)&&(x=_(x).without("top","bottom")),(t<q+w||q<w)&&(x=_(x).without("left","right"));var z=x.shift();switch(m.removeClass(y).addClass(z),n-=2,o-=2,z){case"left":n-=r,o-=s/2;break;case"right":o-=s/2;break;case"top":o-=s,n-=r/2;break;case"bottom":n-=r/2}m.css({top:o,left:n}),_.defer(function(){m.css("opacity",1)}),m.find("a").click(function(a){c.hide(a)}),b(document).unbind(".concreteMenuDisable").on("click.concreteMenuDisable",function(a){c.hide(a)}),ConcreteEvent.subscribe("PanelClose",function(a){c.hide(a)}),c.$menuPointer=m,d.activeMenu=c,ConcreteEvent.publish("ConcreteMenuShow",{menu:c,menuElement:m})},hide:function(a){var b=this,c=d,e={class:"",width:0,height:0,top:0,left:0};a&&a.stopPropagation(),b.$menuPointer&&(b.$menuPointer.css("opacity",0),_.defer(function(){b.$menuPointer.hide()})),_.defer(function(){b.$element.removeClass(b.options.menuActiveClass),b.$element.parents("*").slice(0,3).removeClass(b.options.menuActiveParentClass),b.options.enableClickProxy&&(c.$highlighter.removeClass(),c.$container.removeClass().addClass("ccm-ui").html(""))}),b.options.enableClickProxy&&(c.$clickProxy.css(e),c.$highlighter.css(e)),d.activeMenu=!1,b.options.onHide&&b.options.onHide(b)}};var d={enabled:!0,$clickProxy:!1,$highlighter:!1,$container:!1,hoverMenu:!1,activeMenu:!1,reset:function(){this.$clickProxy.css("width",0).css("height",0),this.$container.html("")},enable:function(){this.enabled=!0,this.reset()},disable:function(){this.enabled=!1,this.reset()},getActiveMenu:function(){return this.activeMenu}};b.fn.concreteMenu=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteMenu=c,a.ConcreteMenuManager=d}(window,jQuery),String.prototype.score=function(a,b){if(b=b||0,0==a.length)return.9;if(a.length>this.length)return 0;for(var c=a.length;c>0;c--){var d=a.substring(0,c),e=this.indexOf(d);if(!(e<0||e+a.length>this.length+b)){var f=this.substring(e+d.length),g=null;g=c>=a.length?"":a.substring(c);var h=f.score(g,b+e);if(h>0){var i=this.length-f.length;if(0!=e){var j=0,k=this.charCodeAt(e-1);if(32==k||9==k)for(var j=e-2;j>=0;j--)k=this.charCodeAt(j),i-=32==k||9==k?1:.15;else i-=e}return i+=h*f.length,i/=this.length}}}return 0},function(a,b){"use strict";var c={getMoreInformation:function(a){b.fn.dialog.showLoader();var c={mpID:a};b.concreteAjax({method:"get",url:CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/connect",data:c,success:function(a){b.fn.dialog.hideLoader(),a.isConnected?window.location.href=a.localURL:window.location.href=CCM_DISPATCHER_FILENAME+"/dashboard/extend/connect"}})},purchaseOrDownload:function(a){var c=a.mpID,d=a.closeTop;a.onComplete||(a.onComplete=function(a,c){b.fn.dialog.closeTop()}),ConcreteEvent.subscribe("MarketplaceRequestComplete",a.onComplete),d&&b.fn.dialog.closeTop(),b.fn.dialog.showLoader();var e={mpID:c};b.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/connect",e,function(a){b.fn.dialog.hideLoader(),a.isConnected?a.purchaseRequired?b.fn.dialog.open({title:ccmi18n.communityCheckout,iframe:!0,href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/marketplace/checkout?mpID="+c,width:"560px",modal:!0,height:"400px"}):b.fn.dialog.open({title:ccmi18n.communityDownload,href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/marketplace/download?mpID="+c,width:500,appendButtons:!0,modal:!0,height:400}):window.location.href=CCM_DISPATCHER_FILENAME+"/dashboard/extend/connect"})}};a.ConcreteMarketplace=c}(window,jQuery),function(a,b){"use strict";b("table tr[data-search-row-url]").each(function(){b(this).hover(function(){b(this).addClass("ccm-search-select-hover")},function(){b(this).removeClass("ccm-search-select-hover")}),b(this).on("click",function(){window.location.href=b(this).attr("data-search-row-url")})})}(window,jQuery),function(a,b){"use strict";function c(a,c){c=c||{},c=b.extend({result:{},onLoad:!1,onUpdateResults:!1,bulkParameterName:"item",selectMode:!1,appendToOuterDialog:!1,searchMethod:"get"},c),this.$element=a,this.$results=a.find("div[data-search-element=results]"),this.$resultsTableBody=this.$results.find("tbody"),this.$resultsTableHead=this.$results.find("thead"),this.$resultsPagination=this.$results.find("div.ccm-search-results-pagination"),this.$menuTemplate=a.find("script[data-template=search-results-menu]"),this.$searchFieldRowTemplate=a.find("script[data-template=search-field-row
4]"),this.$headerSearch=a.find("div[data-header]"),this.$headerSearchInput=a.find("div[data-header] input"),this.$advancedSearchButton=a.find("a[data-launch-dialog=advanced-search]"),this.$resetSearchButton=a.find("a[data-button-action=clear-search]"),this.options=c,a.find("script[data-template=search-form]").length&&(this._templateSearchForm=_.template(a.find("script[data-template=search-form]").html())),a.find("script[data-template=search-results-table-head]").length&&(this._templateSearchResultsTableHead=_.template(a.find("script[data-template=search-results-table-head]").html())),a.find("script[data-template=search-results-table-body]").length&&(this._templateSearchResultsTableBody=_.template(a.find("script[data-template=search-results-table-body]").html())),a.find("script[data-template=search-results-pagination]").length&&(this._templateSearchResultsPagination=_.template(a.find("script[data-template=search-results-pagination]").html())),this.$menuTemplate.length&&(this._templateSearchResultsMenu=_.template(this.$menuTemplate.html())),this.$searchFieldRowTemplate.length&&(this._templateAdvancedSearchFieldRow=_.template(this.$searchFieldRowTemplate.html())),this.setupSearch(),this.setupCheckboxes(),this.setupSort(),this.setupPagination(),this.setupSelectize(),this.setupAdvancedSearch(),this.setupCustomizeColumns(),this.updateResults(c.result),c.onLoad&&c.onLoad(this)}c.prototype.setupResetButton=function(a){var b,c=this;b=a.query||a.folder&&"search_preset"===a.folder.treeNodeTypeHandle?ccmi18n_filemanager.edit:ccmi18n.advanced,c.$advancedSearchButton.html(b),a.query&&a.folder&&"search_preset"!==a.folder.treeNodeTypeHandle&&(c.$headerSearch.find("div.btn-group").hide(),c.$headerSearchInput.prop("disabled",!0),c.$headerSearchInput.attr("placeholder",""),c.$resetSearchButton.show())},c.prototype.ajaxUpdate=function(a,c,d){var e=this;b.concreteAjax({url:a,data:c,method:e.options.searchMethod,success:function(a){e.scrollToTop(),d?d(a):e.updateResults(a)}})},c.prototype.scrollToTop=function(){var a=this,b=a.$element.closest(".ui-dialog-content");b.length?b.scrollTop(0):window.scrollTo(0,0)},c.prototype.getSearchData=function(){var a=this,b=a.$element.find("form[data-search-form]"),c=b.serializeArray();return c},c.prototype.setupSelectize=function(){var a=this.$element.find(".selectize-select");a.length&&a.selectize({plugins:["remove_button"]})},c.prototype.createMenu=function(a){a.concreteMenu({menu:b("[data-search-menu="+a.attr("data-launch-search-menu")+"]")})},c.prototype.setupMenus=function(a){var c=this;c._templateSearchResultsMenu&&(c.$element.find("[data-search-menu]").remove(),b.each(a.items,function(a,b){c.$results.append(c._templateSearchResultsMenu({item:b}))}),c.$element.find("tbody tr").each(function(){c.createMenu(b(this))}))},c.prototype.setupCustomizeColumns=function(){var a=this;a.$element.on("click","a[data-search-toggle=customize]",function(){var c=b(this).attr("data-search-column-customize-url");return b.fn.dialog.open({width:480,height:400,href:c,modal:!0,title:ccmi18n.customizeSearch,onOpen:function(){ConcreteEvent.subscribe("AjaxFormSubmitSuccess",function(b,c){a.updateResults(c.response.result)})}}),!1})},c.prototype.getSelectedResults=function(){var a=this,c=a.$element.find("tbody tr"),d=a.$element.find(".ccm-search-select-selected"),e=[];return d.each(function(){var d=c.index(b(this));d>-1&&e.push(a.getResult().items[d])}),e},c.prototype.showMenu=function(a,b,c){var d=new ConcreteMenu(a,{menu:b,handle:"none"});d.show(c)},c.prototype.handleSelectClick=function(a,b){var c=this;a.preventDefault(),b.removeClass("ccm-search-select-hover");var d=c.$element.find(".ccm-search-select-selected");if(a.shiftKey){var e=c.$element.find("tbody tr").index(b);if(d.length){var f=c.$element.find("tbody tr").index(d.eq(0));f>-1&&(f>e?c.$element.find("tbody tr").slice(e,f+1).removeClass().addClass("ccm-search-select-selected"):c.$element.find("tbody tr").slice(f,e+1).removeClass().addClass("ccm-search-select-selected"))}else c.$element.find("tbody tr").slice(0,e+1).removeClass().addClass("ccm-search-select-selected");ConcreteEvent.publish("SearchSelectItems",{results:c.getSelectedResults()},c.$element)}else 3==a.which?c.handleMenuClick(a,b):(a.metaKey||d.removeClass("ccm-search-select-selected"),b.hasClass("ccm-search-select-selected")?b.removeClass("ccm-search-select-selected"):b.addClass("ccm-search-select-selected")),ConcreteEvent.publish("SearchSelectItems",{results:c.getSelectedResults()},c.$element)},c.prototype.handleMenuClick=function(a,b){b.hasClass("ccm-search-select-selected")||(this.$element.find(".ccm-search-select-selected").removeClass(),b.addClass("ccm-search-select-selected"));var c=this.getSelectedResults(),d=this.getResultMenu(c);d&&this.showMenu(b,d,a)},c.prototype.getResult=function(){return this.result},c.prototype.updateResults=function(a){var c,d=this,e=d.options,f=null;d.result=a,a&&(d.$resultsTableHead.length&&d.$resultsTableHead.html(d._templateSearchResultsTableHead({columns:a.columns})),d.$resultsTableBody.length&&d.$resultsTableBody.html(d._templateSearchResultsTableBody({items:a.items})),d.$resultsPagination.length&&d.$resultsPagination.html(d._templateSearchResultsPagination({paginationTemplate:a.paginationTemplate})),d.$advancedFields&&(d.$advancedFields.html(""),d.$advancedFields.length&&b.each(a.fields,function(a,b){d.$advancedFields.append(d._templateAdvancedSearchFieldRow({field:b}))})),d.setupResetButton(a)),"multiple"==e.selectMode?d.$element.find("tbody tr").on("contextmenu touchstart touchend",function(a){return a.preventDefault(),!1}).on("mouseover.concreteSearchResultItem",function(){d.hoverIsEnabled(b(this))&&b(this).addClass("ccm-search-select-hover")}).on("mouseout.concreteSearchResultItem",function(){d.hoverIsEnabled(b(this))&&b(this).removeClass("ccm-search-select-hover")}).on("mousedown.concreteSearchResultItem",function(a){d.handleSelectClick(a,b(this))}).on("mouseup.concreteSearchResultItem",function(a){a.metaKey||a.ctrlKey||a.shiftKey||d.$element.find(".ccm-search-select-selected").not(b(this)).removeClass()}).on("touchstart.concreteSearchResultItem",function(a){var e=b(this);c=a,f=setTimeout(function(){d.handleSelectClick(a,e),f=null},1e3)}).on("touchend.concreteSearchResultItem",function(a){f&&(clearTimeout(f),f=null,d.handleMenuClick(c,b(this))),c=null}):d.setupMenus(a),d.setupBulkActions(),e.onUpdateResults&&e.onUpdateResults(this)},c.prototype.hoverIsEnabled=function(a){return!0},c.prototype.setupAdvancedSearch=function(){var a=this;a.$advancedFields=a.$element.find("div.ccm-search-fields-advanced"),a.$element.on("click","a[data-search-toggle=advanced]",function(){return a.$advancedFields.append(a._templateAdvancedSearchFieldRow()),!1}),a.$element.on("change","select[data-search-field]",function(){var c=b(this).parent().find(".ccm-search-field-content");c.html("");var d=b(this).find(":selected").attr("data-search-field-url");d&&a.ajaxUpdate(d,!1,function(a){_.each(a.assets.css,function(a){ConcreteAssetLoader.loadCSS(a)}),_.each(a.assets.javascript,function(a){ConcreteAssetLoader.loadJavaScript(a)}),c.html(a.html)})}),a.$element.on("click","a[data-search-remove=search-field]",function(){var a=b(this).parent();return a.remove(),!1}),a.$advancedSearchButton.on("click",function(){b("div[data-dialog=save-search-preset]").remove();var c=b(this).attr("href");return b.fn.dialog.open({width:620,height:500,href:c,modal:!0,title:ccmi18n.search,onOpen:function(){a.setupSearch()}}),!1})},c.prototype.setupSort=function(){var a=this;this.$element.on("click","thead th > a",function(){return a.ajaxUpdate(b(this).attr("href")),!1})},c.prototype.refreshResults=function(){var a=this;a.$element.find("form[data-search-form]").trigger("submit")},c.prototype.setupSearch=function(){var a=this;if(a._templateSearchForm&&a.$element.find("[data-search-element=wrapper]").html(a._templateSearchForm()),a.$element.on("submit","form[data-search-form]",function(){var c=b(this).serializeArray();return c.push({name:"submitSearch",value:"1"}
4),a.ajaxUpdate(b(this).attr("action"),c),!1}),a.$element.find("div[data-header] form").on("submit",function(){var c=b(this).serializeArray();return c.push({name:"submitSearch",value:"1"}),a.ajaxUpdate(b(this).attr("action"),c),a.$advancedSearchButton.hide(),a.$resetSearchButton.addClass("ccm-header-reset-search-right").show(),!1}),a.options.appendToOuterDialog){var c=a.$element.closest("div.ui-dialog");c.length&&a.$element.find("div[data-header]").insertBefore(c.find(".ui-dialog-content"))}b("form[data-form=advanced-search]").concreteAjaxForm({success:function(c){a.updateResults(c),b.fn.dialog.closeTop(),a.$advancedSearchButton.html(ccmi18n_filemanager.edit),a.$resetSearchButton.show(),a.$headerSearch.find("div.btn-group").hide(),a.$headerSearchInput.prop("disabled",!0).val(""),a.$headerSearchInput.attr("placeholder","")}}),a.$resetSearchButton.on("click",function(c){a.$element.find("div[data-header] input").val(""),c.preventDefault(),b.concreteAjax({url:b(this).attr("data-button-action-url"),success:function(b){a.updateResults(b),a.$headerSearch.find("div.btn-group").show(),a.$headerSearchInput.prop("disabled",!1),a.$headerSearchInput.attr("placeholder",ccmi18n.search),a.$advancedSearchButton.html(ccmi18n.advanced).show(),a.$resetSearchButton.removeClass("ccm-header-reset-search-right").hide()}})})},c.prototype.handleSelectedBulkAction=function(a,c,d,e){var f=this,g=[];e instanceof b?b.each(e,function(a,c){g.push({name:f.options.bulkParameterName+"[]",value:b(c).val()})}):b.each(e,function(a,b){g.push({name:f.options.bulkParameterName+"[]",value:b})}),"dialog"==c&&b.fn.dialog.open({width:d.attr("data-bulk-action-dialog-width"),height:d.attr("data-bulk-action-dialog-height"),modal:!0,href:d.attr("data-bulk-action-url")+"?"+b.param(g),title:d.attr("data-bulk-action-title")}),"ajax"==c&&b.concreteAjax({url:d.attr("data-bulk-action-url"),data:g,success:function(a){a.message&&ConcreteAlert.notify({message:a.message,title:a.title})}}),"progressive"==c&&ccm_triggerProgressiveOperation(d.attr("data-bulk-action-url"),g,d.attr("data-bulk-action-title"),function(){f.refreshResults()}),f.publish("SearchBulkActionSelect",{value:a,option:d,items:e})},c.prototype.publish=function(a,b){var c=this;ConcreteEvent.publish(a,b,c)},c.prototype.subscribe=function(a,b){var c=this;ConcreteEvent.subscribe(a,b,c)},c.prototype.setupBulkActions=function(){var a=this;a.$bulkActions=a.$element.find("select[data-bulk-action]"),a.$element.on("change","select[data-bulk-action]",function(){var c=b(this).find("option:selected"),d=c.val(),e=c.attr("data-bulk-action-type");a.handleSelectedBulkAction(d,e,c,a.$element.find("input[data-search-checkbox=indiv
4idual]:checked")),a.$element.find("option").eq(0).prop("selected",!0)})},c.prototype.setupPagination=function(){var a=this;this.$element.on("click","div.ccm-search-results-pagination a:not([disabled])",function(){return a.ajaxUpdate(b(this).attr("href")),!1})},c.prototype.getResultMenu=function(a){var c,d=this;if(a.length>1&&d.options.result.bulkMenus){var e,f=d.options.result.bulkMenus.propertyName;if(c=d.options.result.bulkMenus.menu,b.each(a,function(a,b){var c=b[f];0==a?e=c:e!=c&&(e=null)}),e&&e==d.options.result.bulkMenus.propertyValue)return b(c)}else if(1==a.length)return c=a[0].treeNodeMenu,b(c);return!1},c.prototype.setupCheckboxes=function(){var a=this;a.$element.on("click","input[data-search-checkbox=select-all]",function(){a.$element.find("input[data-search-checkbox=individual]").prop("checked",b(this).is(":checked")).trigger("change")}),a.$element.on("change","input[data-search-checkbox=individual]",function(){a.$element.find("input[data-search-checkbox=individual]:checked").length?a.$bulkActions.prop("disabled",!1):a.$bulkActions.prop("disabled",!0)}),ConcreteEvent.subscribe("SearchSelectItems",function(b,c){var d=a.getResultMenu(c.results);d?a.$element.find("button.btn-menu-launcher").prop("disabled",!1):a.$element.find("button.btn-menu-launcher").prop("disabled",!0)},a.$element)},b.fn.concreteAjaxSearch=function(a){return new c(this,a)},a.ConcreteAjaxSearch=c}(window,jQuery),function(a,b){"use strict";function c(a,c){var d=this;c=c||{},c=b.extend({},c),d.$element=a,d.options=c,b("[data-search-preset-id]").on("click",function(a){a.preventDefault(),!b(a.target).is("button")&&b(this).data("action")&&(b.fn.dialog.closeTop(),d.ajaxUpdate(b(this).data("action")),d.$resetSearchButton.show(),d.$headerSearch.find("div.btn-group").hide(),d.$headerSearchInput.prop("disabled",!0).val(""),d.$headerSearchInput.attr("placeholder",""))}),b(".ccm-search-presets-table tbody tr").on("mouseover",function(){b(this).addClass("ccm-search-select-hover")}).on("mouseout",function(){b(this).removeClass("ccm-search-select-hover")}),b("button[data-button-action=save-search-preset]").on("click.saveSearchPreset",function(){b.fn.dialog.open({element:"div[data-dialog=save-search-preset]:first",modal:!0,width:320,title:"Save Preset",height:"auto"})});var e=b("form[data-form=save-preset]"),f=b("form[data-form=advanced-search]");b("button[data-button-action=save-search-preset-submit]").on("click.saveSearchPresetSubmit",function(){var a=b("form[data-form=save-preset]");a.trigger("submit")}),e.on("submit",function(){var a=f.serializeArray();return a=a.concat(e.serializeArray()),b.concreteAjax({data:a,url:e.attr("action"),success:function(a){b.fn.dialog.closeAll(),ConcreteEvent.publish("SavedSearchCreated",{search:a})}}),!1}),b("button[data-button-action=edit-search-preset], button[data-button-action=delete-search-preset]").on("click",function(a){a.preventDefault();var c=b(this).attr("data-tree-action-url"),d=b(this).attr("dialog-title");b.fn.dialog.open({title:d,href:c,width:550,modal:!0,height:"auto"})}),ConcreteEvent.unsubscribe("SavedSearchDeleted"),ConcreteEvent.subscribe("SavedSearchDeleted",function(){b.fn.dialog.closeAll(),d.ajaxUpdate(d.$resetSearchButton.data("button-action-url"))}),ConcreteEvent.unsubscribe("SavedSearchUpdated"),ConcreteEvent.subscribe("SavedSearchUpdated",function(a,c){b.fn.dialog.closeAll(),c.preset&&c.preset.actionURL&&d.ajaxUpdate(c.preset.actionURL)})}b.fn.concreteAdvancedSearchPresetSelector=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteAdvancedSearchPresetSelector=c}(window,jQuery),function(a,b){"use strict";function c(a,c){var d=this;c=c||{},c=b.extend({},c),d.$element=a,d.options=c;var e=b("div[data-container=search-fields]"),f=_.template(b("script[data-template=search-field-row]").html()),g=b("script[data-template=default-query]").html();g&&(g=JSON.parse(g)),b("button[data-button-action=add-field]").on("click",function(){e.append(f())}),d.result&&d.result.query?b.each(d.result.query.fields,function(a,b){e.append(f({field:b}))}):g&&b.each(g.fields,function(a,b){e.append(f({field:b}))});var h=e.find("select.selectize-select");h.length&&h.selectize({plugins:["remove_button"]}),e.on("change","select.ccm-search-field-selector-choose",function(){var a=b(this).val(),c=b(this).parent().find("div.form-group");a&&b.concreteAjax({url:b(this).attr("data-action"),data:{field:a},success:function(a){_.each(a.assets.css,function(a){ConcreteAssetLoader.loadCSS(a)}),_.each(a.assets.javascript,function(a){ConcreteAssetLoader.loadJavaScript(a)}),c.html(a.element);var b=c.find("select.selectize-select");b.length&&b.selectize({plugins:["remove_button"]})}})}),e.on("click","a[data-search-remove=search-field]",function(a){a.preventDefault();var c=b(this).parent();c.remove()})}b.fn.concreteSearchFieldSelector=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})}
4,a.ConcreteSearchFieldSelector=c}(window,jQuery),function(a,b){"use strict";a.ccm_triggerProgressiveOperation=function(c,d,e,f,g,h){b("#ccm-dialog-progress-bar").remove(),h||NProgress.set(0),b.concreteAjax({loader:!1,url:c,type:"POST",data:d,dataType:"html",success:function(i){var j;if(h)h.html(i),j=b("#ccm-progressive-operation-progress-bar").attr("data-total-items"),a.ccm_doProgressiveOperation(c,d,j,f,g,h);else{try{j=b.parseJSON(i).totalItems}catch(a){}"undefined"==typeof j&&(j=b(i).find("[data-total-items]").attr("data-total-items"));var k=new PNotify({text:'<div data-total-items="'+j+'"><span id="ccm-progressive-operation-status">1</span> of '+j+"</div>",hide:!1,title:e,buttons:{closer:!1},type:"info",icon:"fa fa-refresh fa-spin"});a.ccm_doProgressiveOperation(c,d,j,f,g,k)}}})},a.ccm_doProgressiveOperation=function(c,d,e,f,g,h){d.push({name:"process",value:"1"});var i,j;h instanceof b?j=h:i=h,d.process=!0,b.ajax({url:c,dataType:"json",type:"POST",data:d,error:function(a,b,c){var d;switch(b){case"timeout":d='<div class="alert alert-danger">'+ccmi18n.requestTimeout+"</div>";break;default:d=ConcreteAjaxRequest.errorResponseToString(a)}j||(i.remove(),NProgress.remove()),ConcreteAlert.dialog(ccmi18n.error,d)},success:function(k){if(k.error){var l=k.message;j||(i.remove(),NProgress.remove()),ConcreteAlert.dialog(ccmi18n.error,l),"function"==typeof g&&g(k)}else{var m=k.totalItems,n=(e-m)/e;b("#ccm-progressive-operation-status").html(1),e-m>0&&b("#ccm-progressive-operation-status").html(e-m),j?(n=Math.round(100*n),b("#ccm-progressive-operation-progress-bar div.progress-bar").width(n+"%")):NProgress.set(n),m>0?setTimeout(function(){a.ccm_doProgressiveOperation(c,d,e,f,g,h)},250):setTimeout(function(){j?b("#ccm-progressive-operation-progress-bar div.bar").width("0%"):(NProgress.done(),i.remove()),"function"==typeof f&&f(k)},1e3)}}})}}(window,jQuery),function(a,b){"use strict";var c={tabs:function(a,c){return b(".ccm-styleEditPane").hide(),b("#ccm-styleEditPane-"+c).show(),b(a.parentNode.parentNode).find("li").removeClass("ccm-nav-active"),b(a.parentNode).addClass("ccm-nav-active"),!1},resetAll:function(){return!!window.confirm(ccmi18n.confirmCssReset)&&(b.fn.dialog.showLoader(),b("#ccm-reset-style").val(1),b("#ccmCustomCssForm").get(0).submit(),!0)},showPresetDeleteIcon:function(){b("select[name=cspID]").val()>0?b("#ccm-style-delete-preset").show():b("#ccm-style-delete-preset").hide()},deletePreset:function(){var a=b("select[name=cspID]").val();if(a>0){if(!window.confirm(ccmi18n.confirmCssPresetDelete))return!1;var c=b("#ccm-custom-style-refresh-action").val()+"&deleteCspID="+a+"&subtask=delete_custom_style_preset";b.fn.dialog.showLoader(),b.get(c,function(a){b("#ccm-custom-style-wrapper").html(a),b.fn.dialog.hideLoader()})}},initForm:function(){b("#cspFooterPreset").length>0&&b("#ccmCustomCssFormTabs input, #ccmCustomCssFormTabs select, #ccmCustomCssFormTabs textarea").bind("change click",function(){b("#cspFooterPreset").show(),b("#cspFooterNoPreset").remove(),b("#ccmCustomCssFormTabs input, #ccmCustomCssFormTabs select").unbind("change click")}),b("input[name=cspPresetAction]").click(function(){"create_new_preset"==b(this).val()&&b(this).prop("checked")?b("input[name=cspName]").attr("disabled",!1).focus():b("input[name=cspName]").val("").attr("disabled",!0)}),c.showPresetDeleteIcon(),c.lastPresetID=parseInt(b("select[name=cspID]").val()),b("select[name=cspID]").change(function(){var a=parseInt(b(this).val()),d=parseInt(b("input[name=selectedCsrID]").val());if(c.lastPresetID==a)return!1;c.lastPresetID=a,b.fn.dialog.showLoader();var e;e=a>0?b("#ccm-custom-style-refresh-action").val()+"&cspID="+a:b("#ccm-custom-style-refresh-action").val()+"&csrID="+d,b.get(e,function(a){b("#ccm-custom-style-wrapper").html(a),b.fn.dialog.hideLoader()})}),b("#ccmCustomCssForm").submit(function(){return 1==b("input[name=cspCreateNew]").prop("checked")&&""==b("input[name=cspName]").val()?(b("input[name=cspName]").focus(),window.alert(ccmi18n.errorCustomStylePresetNoName),!1):(b.fn.dialog.showLoader(),!0)}),parseInt(c.lastPresetID)||setTimeout(function(){b("#ccmCustomCssFormTabs input").attr("disabled",!1).get(0).focus()},500)},validIdCheck:function(a,c){var d=b("#"+a.value);d&&d.get(0)&&d.get(0).id!=c?b("#ccm-styles-invalid-id").css("display","block"):b("#ccm-styles-invalid-id").css("display","none"); 5}};a.ccmCustomStyle=c}(window,jQuery),function(a,b){"use strict";a.ccm_activateTabBar=function(a){b("#ccm-tab-content-"+a.find("li[class=active] a").attr("data-tab")).show(),a.find("a").unbind().click(function(){a.find("li").removeClass("active"),b(this).parent().addClass("active"),a.find("a").each(function(){b("#ccm-tab-content-"+b(this).attr("data-tab")).hide()});var c=b(this).attr("data-tab");return b("#ccm-tab-content-"+c).show(),!1})}}(window,jQuery),function(a,b){"use strict";function c(){b(".ccm-notification .dialog-launch").dialog(),b("a[data-help-notification-toggle]").concreteHelpLauncher(),b("a[data-help-launch-dialog=main]").on("click",function(a){a.preventDefault(),(new ConcreteHelpDialog).open()});var a=ConcreteHelpGuideManager.get();if(a.getGuideToLaunchOnRefresh()){var c=ConcreteHelpGuideManager.getGuide(a.getGuideToLaunchOnRefresh());c.start()}}function d(){b(document.body).on("click","a[data-dismiss-alert=page-alert]",function(a){return a.stopPropagation(),b(this).closest(".ccm-notification").queue(function(){b(this).addClass("animated fadeOut"),b(this).dequeue()}).delay(500).queue(function(){b(this).remove(),b(this).dequeue()}),!1}),b("form[data-form=workflow]").ajaxForm({dataType:"json",beforeSubmit:function(){b.fn.dialog.showLoader()},success:function(a){a.redirect&&(window.location.href=a.redirect)}}),b("a[data-workflow-task]").on("click",function(a){var c=b(this).attr("data-workflow-task"),d=b(this).closest("form[data-form=workflow]");d.append('<input type="hidden" name="action_'+c+'" value="'+c+'">'),d.submit()})}function e(){0==b("#ccm-tooltip-holder").length&&b("<div />").attr("id","ccm-tooltip-holder").attr("class","ccm-ui").prependTo(document.body),b(".launch-tooltip").tooltip({container:"#ccm-tooltip-holder"})}function f(){b("<div />",{id:"ccm-panel-overlay"}).appendTo(b(document.body)),b("[data-launch-panel]").each(function(){b(this).prepend('<span class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></span>')}),b("[data-launch-panel]").unbind().on("click",function(a){var c=b(this),d=c.attr("data-launch-panel"),e=ConcretePanelManager.getByIdentifier(d);if(c.attr("data-original-icon-class")||c.attr("data-original-icon-class",c.find("i").attr("class")),a.altKey||c.find("i").hasClass(c.attr("data-original-icon-class"))||c.find("i").removeClass().addClass(c.attr("data-original-icon-class")),e.isPinable()){var f=b(c.parent());a.altKey?e.pinned()||(c.find("i").removeClass().addClass("fa fa-lock"),f.addClass("ccm-toolbar-page-edit-mode-pinned"),e.isPinned=!0,e.isOpen||e.show()):(e.isPinned&&(e.isPinned=!1,f.removeClass("ccm-toolbar-page-edit-mode-pinned")),c.toggleClass("ccm-launch-panel-loading"),e.toggle(
5))}else c.toggleClass("ccm-launch-panel-loading"),e.toggle();return!1}),b("html").addClass("ccm-panel-ready"),ConcreteEvent.subscribe("PanelOpen",function(a,c){var d=c.panel;"page"==d.options.identifier&&b("#"+d.getDOMID()).find("[data-launch-panel-detail='page-composer']").click(),b("a[data-toolbar-action=check-in]").on("click.close-check-in",function(){return ConcretePanelManager.exitPanelMode(),!1})}),ConcreteEvent.subscribe("PanelClose",function(a){b("a[data-toolbar-action=check-in]").unbind("click.close-check-in")})}function g(){n.bind("keydown.ccm-intelligent-search",function(a){if(13==a.keyCode||40==a.keyCode||38==a.keyCode){if(a.preventDefault(),a.stopPropagation(),13==a.keyCode&&b("a.ccm-intelligent-search-result-selected").length>0){var c=b("a.ccm-intelligent-search-result-selected").attr("href");c&&"#"!=c&&"javascript:void(0)"!=c?window.location.href=c:b("a.ccm-intelligent-search-result-selected").click()}var d,e=b("#ccm-intelligent-search-results li:visible");40!=a.keyCode&&38!=a.keyCode||(b.each(e,function(c,f){if(b(f).children("a").hasClass("ccm-intelligent-search-result-selected")){var g;g=38==a.keyCode?e[c-1]:e[c+1],d=b(g).find("a")}}),d&&d.length>0&&(b("a.ccm-intelligent-search-result-selected").removeClass(),b(d).addClass("ccm-intelligent-search-result-selected")))}}),n.liveUpdate("ccm-intelligent-search-results","intelligent-search"),n.bind("keyup.ccm-intelligent-search",function(a){j(b(this).val())}),n.bind("click",function(a){""==this.value&&o.hide()})}function h(){b(".ccm-toolbar-mobile-menu-button").click(function(){b(this).toggleClass("ccm-mobile-close"),b(".ccm-mobile-menu-overlay").slideToggle()});var a=b(".ccm-mobile-menu-entries li.nav-selected").parentsUntil(".ccm-mobile-menu-entries").show();b(a).last().find(".drop-down-toggle:first, .nav-path-selected:not(.nav-selected) > .drop-down-toggle").removeClass("fa-caret-down").addClass("fa-caret-up"),b(".ccm-mobile-menu-entries .drop-down-toggle").on("click",function(){b(this).toggleClass("fa-caret-down fa-caret-up"),b(this).next("ul").slideToggle();var a=b(this).parent("li");b(a).siblings("li").find("ul").slideUp(),b(a).siblings("li").find(".drop-down-toggle").removeClass("fa-caret-up").addClass("fa-caret-down")})}function i(){0==b("#ccm-intelligent-search-results div:visible").length&&b("#ccm-intelligent-search-results").hide(),b("#ccm-intelligent-search-results a").hover(function(){b("a.ccm-intelligent-search-result-selected").removeClass(),b(this).addClass("ccm-intelligent-search-result-selected")},function(){b(this).removeClass("ccm-intelligent-search-result-selected")})}function j(a){if(a=b.trim(a),a&&a.length>2){if(a==k)return;l&&window.clearTimeout(l),k=a,l=window.setTimeout(function(){l=null,b("#ccm-intelligent-search-results-list-marketplace").parent().show(),b("#ccm-intelligent-search-results-list-help").parent().show(),b("#ccm-intelligent-search-results-list-your-site").parent().show(),b("#ccm-intelligent-search-results-list-marketplace").parent().removeClass("ccm-intelligent-search-results-module-loaded"),b("#ccm-intelligent-search-results-list-help").parent().removeClass("ccm-intelligent-search-results-module-loaded"),b("#ccm-intelligent-search-results-list-your-site").parent().removeClass("ccm-intelligent-search-results-module-loaded"),b.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/marketplace/search",{q:k},function(a){b("#ccm-intelligent-search-results-list-marketplace").parent().addClass("ccm-intelligent-search-results-module-loaded"),b("#ccm-intelligent-search-results-list-marketplace").html("");for(var c=0;c<a.length;c++){var d=a[c],e="ConcreteMarketplace.getMoreInformation("+d.mpID+")";b("#ccm-intelligent-search-results-list-marketplace").append('<li><a href="javascript:void(0)" onclick="'+e+'"><img src="'+d.img+'" />'+d.name+"</a></li>")}0==a.length&&b("#ccm-intelligent-search-results-list-marketplace").parent().hide(),0==b(".ccm-intelligent-search-result-selected").length&&(b("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),b("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),i()}).error(function(){b("#ccm-intelligent-search-results-list-marketplace").parent().hide()}),b.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/backend/get_remote_help",{q:k},function(a){b("#ccm-intelligent-search-results-list-help").parent().addClass("ccm-intelligent-search-results-module-loaded"),b("#ccm-intelligent-search-results-list-help").html("");for(var c=0;c<a.length;c++){var d=a[c];b("#ccm-intelligent-search-results-list-help").append('<li><a href="'+d.href+'">'+d.name+"</a></li>")}0==a.length&&b("#ccm-intelligent-search-results-list-help").parent().hide(),0==b(".ccm-intelligent-search-result-selected").length&&(b("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),b("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),i()}).error(function(){b("#ccm-intelligent-search-results-list-help").parent().hide()}),b.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/backend/intelligent_search",{q:k},function(a){b("#ccm-intelligent-search-results-list-your-site").parent().addClass("ccm-intelligent-search-results-module-loaded"),b("#ccm-intelligent-search-results-list-your-site").html("");for(var c=0;c<a.length;c++){var d=a[c];b("#ccm-intelligent-search-results-list-your-site").append('<li><a href="'+d.href+'">'+d.name+"</a></li>")}0==a.length&&b("#ccm-intelligent-search-results-list-your-site").parent().hide(),0==b(".ccm-intelligent-search-result-selected").length&&(b("#ccm-intelligent-search-results").find("li a").removeClass("ccm-intelligent-search-result-selected"),b("#ccm-intelligent-search-results li:visible a:first").addClass("ccm-intelligent-search-result-selected")),i()}).error(function(){b("#ccm-intelligent-search-results-list-your-site").parent().hide()})},500)}}var k,l,m=b("#ccm-toolbar"),n=b("#ccm-nav-intelligent-search"),o=b("#ccm-intelligent-search-results");n.length&&o.css("right",b(window).width()-n.offset().left-o.width()-1),a.ConcreteToolbar={start:function(){m.length>0&&(m.find(".dialog-launch").dialog(),g(),f(),e(),d(),c(),h())},disable:function(){b("#ccm-toolbar-disabled").remove(),b("<div />",{id:"ccm-toolbar-disabled"}).appendTo(document.body),setTimeout(function(){b("#ccm-toolbar-disabled").css("opacity",1)},10)},enable:function(){b("#ccm-toolbar-disabled").remove()},disableDirectExit:function(){var a=b("li.ccm-toolbar-page-edit a");"check-in"!=a.attr("data-launch-panel")&&"check-in"!=a.attr("data-disable-panel")&&a.attr("data-launch-panel","check-in").on("click",function(){b(this).toggleClass("ccm-launch-panel-active");var a=ConcretePanelManager.getByIdentifier("check-in");return a.toggle(),!1})}}}(window,jQuery),function(a,b,c){"use strict";c.expr[":"].icontains=c.expr.createPseudo(function(a){return function(b){return c(b).text().toUpperCase().indexOf(a.toUpperCase())>=0}});var d=function(){var a=function(a){var b=a.data("options"),d=c(b.templateButtonText);return a.data("$buttonText",d),d},b=function(a){var b=a.data("options"),d=c(b.templateButtonIcon);return a.data("$buttonIcon",d),d},d=function(a){var b=a.data("options"),d=c(b.templateButton);return d.addClass(b.classButtonStyle),a.data("$button",d),d},e=function(a){var b=a.data("options"),d=c(b.templateButtonGroup);return d.data("$select",a),d},f=function(a){var b=a.data("options");return c(b.templateMenu)},g=function(a,b){var d=this.data("options"),e=c(d.templateMenuItem),f=c(d.templateMenuItemLink);return f.text(c(b).text()),c(b).prop("disabled")&&(e.addClass("disabled"),f.prop("tabIndex",-1)),e.append(f)},h=function(a){var b=c.proxy(g,a);return a.find("option").map(b).toArray()},i=function(a,b){var d=a.data("options");return b>d.minItemsForSearch?c(d.templateSearchForm):c()},j=function(a,b){var d=a.data("options"),e=a.attr("id"),f=d.labelPrefix+a.attr("id"),g=c('label[for="'+e+'"]');g.attr("for",f),b.attr("id",f)},k=function(a){var b=a.data("$buttonText");b.text(a.find(":selected").text())},l=function(a){var b=a.data("$button");b.prop("disabled",a.prop("disabled"))},m=function(a){var b=a.data("$button");b.focus()},n=function(a){var b=c(a.delegateTarget);k(b),l(b),m(b)},o=function(a){a.preventDefault();var b=c(a.delegateTarget),d=c(a.currentTarget),e=b.data("$select"),f=b.find("li").index(d),g=e.find("option").eq(f);g.prop("disabled")||g.prop("selected",!0).change()},p=function(a){var b=c(this),d=b.find(".dropdown input");if(d.length)d.focus();else{var e=b.data("$select").find(":selected").index();b.find("li:eq("+e+") a").focus()}},q=function(a){var b=c(this).find("li").hide(),d=b.filter(":icontains("+c(a.target).val()+")").show(),e=c(this).find(".help-block");d.length?e.hide():e.show()},r=function(){var g=c(this),m=b(g),r=a(g),s=d(g);s.append(r),s.append(m);var t=e(g),u=h(g),v=i(g,u.length),w=f(g);v.length&&u.unshift(v),w.append(u),t.append(s),t.append(w),j(g,s),t.insertAfter(g),k(g),l(g),g.on("change",n),t.on("click","li",o),t.on("shown.bs.dropdown",p),t.on(".dropdown input",q)};return{transformSelect:r}}();c.fn.bootstrapSelectToButton=function(a){return a=c.extend({},c.fn.bootstrapSelectToButton.defaults,a),this.each(function(){c(this).data("options",a),this.style.display="none",d.transformSelect.call(this)})},c.fn.bootstrapSelectToButton.defaults={templateButton:'<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>',templateButtonIcon:'<span class="caret"></span>',templateButtonText:"<span>{text}</span>",templateButtonGroup:'<div class="btn-group"></div>',templateMenu:'<ul class="dropdown-menu"></ul>',templateMenuItem:"<li></li>",templateMenuItemLink:'<a href="#"></a>',templateSearchForm:'<div class="dropdown"><form><input class="form-control" placeholder="Search"><span class="help-block" style="display:none">No results found</span></form></div>',classButtonStyle:"btn-default",minItemsForSearch:1/0,labelPrefix:"bstb-"}}(this,this.document,this.jQuery),function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.NProgress=b()}(this,function(){function a(a,b,c){return a<b?b:a>c?c:a}function b(a){return 100*(-1+a)}function c(a,c,d){var e;return e="translate3d"===j.positionUsing?{transform:"translate3d("+b(a)+"%,0,0)"}:"translate"===j.positionUsing?{transform:"translate("+b(a)+"%,0)"}:{"margin-left":b(a)+"%"},e.transition="all "+c+"ms "+d,e}function d(a,b){var c="string"==typeof a?a:g(a);return c.indexOf(" "+b+" ")>=0}function e(a,b){var c=g(a),e=c+b;d(c,b)||(a.className=e.substring(1))}function f(a,b){var c,e=g(a);d(a,b)&&(c=e.replace(" "+b+" "," "),a.className=c.substring(1,c.length-1))}
5function g(a){return(" "+(a&&a.className||"")+" ").replace(/\s+/gi," ")}function h(a){a&&a.parentNode&&a.parentNode.removeChild(a)}var i={};i.version="0.2.0";var j=i.settings={minimum:.08,easing:"linear",positionUsing:"",speed:350,trickle:!0,trickleSpeed:250,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};i.configure=function(a){var b,c;for(b in a)c=a[b],void 0!==c&&a.hasOwnProperty(b)&&(j[b]=c);return this},i.status=null,i.set=function(b){var d=i.isStarted();b=a(b,j.minimum,1),i.status=1===b?null:b;var e=i.render(!d),f=e.querySelector(j.barSelector),g=j.speed,h=j.easing;return e.offsetWidth,k(function(a){""===j.positionUsing&&(j.positionUsing=i.getPositioningCSS()),l(f,c(b,g,h)),1===b?(l(e,{transition:"none",opacity:1}),e.offsetWidth,setTimeout(function(){l(e,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){i.remove(),a()},g)},g)):setTimeout(a,g)}),this},i.isStarted=function(){return"number"==typeof i.status},i.start=function(){i.status||i.set(0);var a=function(){setTimeout(function(){i.status&&(i.trickle(),a())},j.trickleSpeed)};return j.trickle&&a(),this},i.done=function(a){return a||i.status?i.inc(.3+.5*Math.random()).set(1):this},i.inc=function(b){var c=i.status;return c?c>1?void 0:("number"!=typeof b&&(b=c>=0&&c<.25?(3*Math.random()+3)/100:c>=.25&&c<.65?3*Math.random()/100:c>=.65&&c<.9?2*Math.random()/100:c>=.9&&c<.99?.005:0),c=a(c+b,0,.994),i.set(c)):i.start()},i.trickle=function(){return i.inc()},function(){var a=0,b=0;i.promise=function(c){return c&&"resolved"!==c.state()?(0===b&&i.start(),a++,b++,c.always(function(){b--,0===b?(a=0,i.done()):i.set((a-b)/a)}),this):this}}(),i.render=function(a){if(i.isRendered())return document.getElementById("nprogress");e(document.documentElement,"nprogress-busy");var c=document.createElement("div");c.id="nprogress",c.innerHTML=j.template;var d,f=c.querySelector(j.barSelector),g=a?"-100":b(i.status||0),k=document.querySelector(j.parent);return l(f,{transition:"all 0 linear",transform:"translate3d("+g+"%,0,0)"}),j.showSpinner||(d=c.querySelector(j.spinnerSelector),d&&h(d)),k!=document.body&&e(k,"nprogress-custom-parent"),k.appendChild(c),c},i.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(j.parent),"nprogress-custom-parent");var a=document.getElementById("nprogress");a&&h(a)},i.isRendered=function(){return!!document.getElementById("nprogress")},i.getPositioningCSS=function(){var a=document.body.style,b="WebkitTransform"in a?"Webkit":"MozTransform"in a?"Moz":"msTransform"in a?"ms":"OTransform"in a?"O":"";return b+"Perspective"in a?"translate3d":b+"Transform"in a?"translate":"margin"};var k=function(){function a(){var c=b.shift();c&&c(a)}var b=[];return function(c){b.push(c),1==b.length&&a()}}(),l=function(){function a(a){return a.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,b){return b.toUpperCase()})}function b(a){var b=document.body.style;if(a in b)return a;for(var c,d=e.length,f=a.charAt(0).toUpperCase()+a.slice(1);d--;)if(c=e[d]+f,c in b)return c;return a}function c(c){return c=a(c),f[c]||(f[c]=b(c))}function d(a,b,d){b=c(b),a.style[b]=d}var e=["Webkit","O","Moz","ms"],f={};return function(a,b){var c,e,f=arguments;if(2==f.length)for(c in b)e=b[c],void 0!==e&&b.hasOwnProperty(c)&&d(a,c,e);else d(a,f[1],f[2])}}();return i}),function(){var a,b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g=function(a,b){return function(){return a.apply(b,arguments)}};window.Tourist=window.Tourist||{},Tourist.Model=function(b){function c(){return a=c.__super__.constructor.apply(this,arguments)}return f(c,b),c.prototype._module="Tourist",c}(Backbone.Model),window.Tourist.Tip=window.Tourist.Tip||{},Tourist.Tip.Base=function(){function a(a){this.options=null!=a?a:{}
5,this.onClickNext=g(this.onClickNext,this),this.onClickClose=g(this.onClickClose,this),this.el=$("<div/>"),this.initialize(a),this._bindClickEvents(),Tourist.Tip.Base._cacheTip(this)}return a.prototype._module="Tourist",_.extend(a.prototype,Backbone.Events),a.prototype.skipButtonTemplate=ccmi18n_tourist.skipButton,a.prototype.nextButtonTemplate=ccmi18n_tourist.nextButton,a.prototype.finalButtonTemplate=ccmi18n_tourist.finalButton,a.prototype.closeButtonTemplate=ccmi18n_tourist.closeButton,a.prototype.okButtonTemplate=ccmi18n_tourist.okButton,a.prototype.actionLabelTemplate=_.template('<h4 class="action-label"><%= label %></h4>'),a.prototype.actionLabels=[ccmi18n_tourist.doThis,ccmi18n_tourist.thenThis,ccmi18n_tourist.nextThis],a.prototype.highlightClass="tour-highlight",a.prototype.template=_.template('<div>\n <div class="tour-container">\n <%= close_button %>\n <%= content %>\n <p class="tour-counter <%= counter_class %>"><%= counter%></p>\n </div>\n <div class="tour-buttons">\n <%= buttons %>\n </div>\n</div>'),a.prototype.destroy=function(){return this.el.remove()},a.prototype.render=function(a){return this.hide(),a&&(this._setTarget(a.target||!1,a),this._setZIndex(""),this._renderContent(a,this._buildContentElement(a)),a.target&&this.show(),a.zIndex&&this._setZIndex(a.zIndex,a)),this},a.prototype.show=function(){},a.prototype.hide=function(){},a.prototype.setTarget=function(a,b){return this._setTarget(a,b)},a.prototype.cleanupCurrentTarget=function(){return this.target&&this.target.removeClass&&this.target.removeClass(this.highlightClass),this.target=null},a.prototype.onClickClose=function(a){return this.trigger("click:close",this,a),!1},a.prototype.onClickNext=function(a){return this.trigger("click:next",this,a),!1},a.prototype._getTipElement=function(){},a.prototype._renderContent=function(a,b){},a.prototype._bindClickEvents=function(){var a;return a=this._getTipElement(),a.delegate(".tour-close","click",this.onClickClose),a.delegate(".tour-next","click",this.onClickNext)},a.prototype._setTarget=function(a,b){return this.cleanupCurrentTarget(),a&&b&&b.highlightTarget&&a.addClass(this.highlightClass),this.target=a},a.prototype._setZIndex=function(a){var b;return b=this._getTipElement(),b.css("z-index",a||"")},a.prototype._buildContentElement=function(a){var b,c;return b=this._buildButtons(a),c=$($.parseHTML(this.template({content:a.content,buttons:b,close_button:this._buildCloseButton(a),counter:a.final?"":ccmi18n_tourist.stepXofY.replace(/%1\$d/g,a.index+1).replace(/%2\$d/g,a.total),counter_class:a.final?"final":""}))),b||c.find(".tour-buttons").addClass("no-buttons"),this._renderActionLabels(c),c},a.prototype._buildButtons=function(a){var b;return b="",a.okButton&&(b+=this.okButtonTemplate),a.skipButton&&(b+=this.skipButtonTemplate),a.nextButton&&(b+=a.final?this.finalButtonTemplate:this.nextButtonTemplate),b},a.prototype._buildCloseButton=function(a){return a.closeButton?this.closeButtonTemplate:""},a.prototype._renderActionLabels=function(a){var b,c,d,e,f,g,h;for(d=a.find(".action"),c=0,h=[],f=0,g=d.length;f<g;f++)b=d[f],e=$($.parseHTML(this.actionLabelTemplate({label:this.actionLabels[c]}))),e.insertBefore(b),h.push(c++);return h},a._cacheTip=function(a){return Tourist.Tip.Base._cachedTips||(Tourist.Tip.Base._cachedTips=[]),Tourist.Tip.Base._cachedTips.push(a)},a.destroy=function(){var a,b,c,d;if(Tourist.Tip.Base._cachedTips){for(d=Tourist.Tip.Base._cachedTips,b=0,c=d.length;b<c;b++)a=d[b],a.destroy();return Tourist.Tip.Base._cachedTips=null}},a}(),Tourist.Tip.Bootstrap=function(a){function c(){return b=c.__super__.constructor.apply(this,arguments)}return f(c,a),c.prototype.initialize=function(a){var b;return b={showEffect:null,hideEffect:null},this.options=_.extend(b,a),this.tip=new Tourist.Tip.BootstrapTip(this.options)},c.prototype.destroy=function(){return this.tip.destroy(),c.__super__.destroy.call(this)},c.prototype.show=function(){var a;return this.options.showEffect?(a=Tourist.Tip.Bootstrap.effects[this.options.showEffect],a.call(this,this.tip,this.tip.el)):this.tip.show()},c.prototype.hide=function(){var a;
5return this.options.hideEffect?(a=Tourist.Tip.Bootstrap.effects[this.options.hideEffect],a.call(this,this.tip,this.tip.el)):this.tip.hide()},c.prototype._getTipElement=function(){return this.tip.el},c.prototype._setTarget=function(a,b){return c.__super__._setTarget.call(this,a,b),this.tip.setTarget(a)},c.prototype._renderContent=function(a,b){var c,d;return d=a.my||"left center",c=a.at||"right center",this.tip.setContainer(a.container||$("#ccm-tooltip-holder")),this.tip.setContent(b),this.tip.setPosition(a.target||!1,d,c)},c}(Tourist.Tip.Base),Tourist.Tip.Bootstrap.effects={slidein:function(a,b){var c,d,e,f,g,h,i,j,k;for(c={top:80,left:80,right:-80,bottom:-80},h=a.my.split(" ")[0],h=h||"top",g=c[h],"bottom"===h&&(h="top"),"right"===h&&(h="left"),i=parseInt(b.css(h)),b.stop(),d={},d[h]=i+g,b.css(d),b.show(),d[h]=i,f=["easeOutCubic","swing","linear"],j=0,k=f.length;j<k&&(e=f[j],!$.easing[e]);j++);return b.animate(d,300,e),null}},Tourist.Tip.BootstrapTip=function(){function a(a){var b;b={offset:10,tipOffset:10},this.options=_.extend(b,a),this.el=$($.parseHTML(this.template)),this.hide()}return a.prototype.template='<div class="popover tourist-popover">\n <div class="arrow"></div>\n <div class="popover-content"></div>\n</div>',a.prototype.FLIP_POSITION={bottom:"top",top:"bottom",left:"right",right:"left"},a.prototype.destroy=function(){return this.el.remove()},a.prototype.show=function(){return this.el.show().addClass("visible")},a.prototype.hide=function(){return this.el.hide().removeClass("visible")},a.prototype.setTarget=function(a){return this.target=a,this._setPosition(this.target,this.my,this.at)},a.prototype.setPosition=function(a,b,c){return this.target=a,this.my=b,this.at=c,this._setPosition(this.target,this.my,this.at)},a.prototype.setContainer=function(a){return a.append(this.el)},a.prototype.setContent=function(a){return this._getContentElement().html(a)},a.prototype._getContentElement=function(){return this.el.find(".popover-content")},a.prototype._getTipElement=function(){return this.el.find(".arrow")},a.prototype._setPosition=function(a,b,c){var d,e,f,g,h,i,j,k,l,m;if(null==b&&(b="left center"),null==c&&(c="right center"),a&&(m=b.split(" "),d=m[0],h=m[1],f=this.el.css("display"),this.el.css({top:0,left:0,margin:0,display:"block"}).removeClass("top").removeClass("bottom").removeClass("left").removeClass("right").addClass(this.FLIP_POSITION[d]),a))return j=this._getTipElement().css({left:"",right:"",top:"",bottom:""}),"center"!==h&&(k={left:j[0].offsetWidth/2,right:0,top:j[0].offsetHeight/2,bottom:0},e={},e[h]=k[h]+this.options.tipOffset,e[this.FLIP_POSITION[h]]="auto",j.css(e)),i=this._caculateTargetPosition(c,a),l=this._caculateTipPosition(b,i),g=this._adjustForArrow(b,l),this.el.css(g),this.el.css({display:f})},a.prototype._caculateTargetPosition=function(a,b){var c,d;return"[object Array]"===Object.prototype.toString.call(b)?{left:b[0],top:b[1]}:(c=this._getTargetBounds(b),d=this._lookupPosition(a,c.width,c.height),{left:c.left+d[0],top:c.top+d[1]})},a.prototype._caculateTipPosition=function(a,b){var c,d,e;return e=this.el[0].offsetWidth,c=this.el[0].offsetHeight,d=this._lookupPosition(a,e,c),{left:b.left-d[0],top:b.top-d[1]}},a.prototype._adjustForArrow=function(a,b){var c,d,e,f,g,h,i;switch(i=a.split(" "),c=i[0],f=i[1],g=this._getTipElement(),h=g[0].offsetWidth,d=g[0].offsetHeight,e={top:b.top,left:b.left},c){case"top":e.top+=d+this.options.offset;break;case"bottom":e.top-=d+this.options.offset;break;case"left":e.left+=h+this.options.offset;break;case"right":e.left-=h+this.options.offset}switch(f){case"left":e.left-=h/2+this.options.tipOffset;break;case"right":e.left+=h/2+this.options.tipOffset;break;case"top":e.top-=d/2+this.options.tipOffset;break;case"bottom":e.top+=d/2+this.options.tipOffset}return e},a.prototype._lookupPosition=function(a,b,c){var d,e,f;return f=b/2,d=c/2,e={"top left":[0,0],"left top":[0,0],"top right":[b,0],"right top":[b,0],"bottom left":[0,c],"left bottom":[0,c],"bottom right":[b,c],"right bottom":[b,c],"top center":[f,0],"left center":[0,d],"right center":[b,d],"bottom center"
5:[f,c]},e[a]},a.prototype._getTargetBounds=function(a){var b,c;return b=a[0],c="function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},$.extend({},c,a.offset())},a}(),Tourist.Tip.QTip=function(a){function b(){return this._renderTipBackground=g(this._renderTipBackground,this),c=b.__super__.constructor.apply(this,arguments)}var d,e,h,i;return f(b,a),i=6,h=14,d=10,e={top:80,left:80,right:-80,bottom:-80},b.prototype.QTIP_DEFAULTS={content:{text:" "},show:{ready:!1,delay:0,effect:function(a){var b,c,d,f,g;return c=$(this),f=a.options.position.my,f&&(f=f[f.precedance]),f=f||"top",d=e[f],"bottom"===f&&(f="top"),"right"===f&&(f="left"),g=parseInt(c.css(f)),b={},b[f]=g+d,c.css(b),c.show(),b[f]=g,c.animate(b,300,"easeOutCubic"),null},autofocus:!1},hide:{event:null,delay:0,effect:!1},position:{adjust:{method:"shift shift",scroll:!1}},style:{classes:"ui-tour-tip",tip:{height:i,width:h}},events:{},zindex:2e3},b.prototype.initialize=function(a){return a=$.extend(!0,{},this.QTIP_DEFAULTS,a),this.el.qtip(a),this.qtip=this.el.qtip("api"),this.qtip.render()},b.prototype.destroy=function(){return this.qtip&&this.qtip.destroy(),b.__super__.destroy.call(this)},b.prototype.show=function(){return this.qtip.show()},b.prototype.hide=function(){return this.qtip.hide()},b.prototype._getTipElement=function(){return $("#qtip-"+this.qtip.id)},b.prototype._setTarget=function(a,c){return b.__super__._setTarget.call(this,a,c),this.qtip.set("position.target",a||!1)},b.prototype._renderContent=function(a,b){var c,d,e=this;return d=a.my||"left center",c=a.at||"right center",this._adjustPlacement(d,c),this.qtip.set("content.text",b),this.qtip.set("position.container",a.container||$("body")),this.qtip.set("position.my",d),this.qtip.set("position.at",c),this.qtip.set("position.viewport",a.viewport||!1),this.qtip.set("position.target",a.target||!1),setTimeout(function(){return e._renderTipBackground(d.split(" ")[0])},10)},b.prototype._adjustPlacement=function(a,b){return 0===a.indexOf("top")?this._adjust(0,d):0===a.indexOf("bottom")?this._adjust(0,-d):0===a.indexOf("right")?this._adjust(-d,0):this._adjust(d,0)},b.prototype._adjust=function(a,b){return this.qtip.set("position.adjust.x",a),this.qtip.set("position.adjust.y",b)},b.prototype._renderTipBackground=function(a){var b,c;return c=$("#qtip-"+this.qtip.id+" .qtip-tip"),b=c.find(".qtip-tip-bg"),b.length||(b=$("<div/>",{class:"icon icon-tip qtip-tip-bg"}),c.append(b)),b.removeClass("top left right bottom"),b.addClass(a)},b}(Tourist.Tip.Base),Tourist.Tip.Simple=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return f(b,a),b.prototype.initialize=function(a){return $("body").append(this.el)},b.prototype.show=function(){return this.el.show()},b.prototype.hide=function(){return this.el.hide()},b.prototype._getTipElement=function(){return this.el},b.prototype._renderContent=function(a,b){return this.el.html(b)},b}(Tourist.Tip.Base),Tourist.Tour=function(){function a(a){var b,c;this.options=null!=a?a:{},this.onChangeCurrentStep=g(this.onChangeCurrentStep,this),this.next=g(this.next,this),b={tipClass:"Bootstrap"},this.options=_.extend(b,this.options),this.model=new Tourist.Model({current_step:null}),c=_.extend({model:this.model},this.options.tipOptions),this.view=new Tourist.Tip[this.options.tipClass](c),this.view.bind("click:close",_.bind(this.stop,this,!0)),this.view.bind("click:next",this.next),this.model.bind("change:current_step",this.onChangeCurrentStep)}return _.extend(a.prototype,Backbone.Events),a.prototype.start=function(){return this.trigger("start",this),this.next()},a.prototype.stop=function(a){return a?this._showCancelFinalStep():this._stop()},a.prototype.showStep=function(a){var b,c;return b=this._teardownCurrentStep(),b&&(c=a),c<this.options.steps.length&&!isNaN(parseInt(c,10))&&c>=0?this._showStep(this.options.steps[c],c):c===this.options.steps.length?this._showSuccessFinalStep():this._stop()},a.prototype.next=function(){var a,b;return a=this._teardownCurrentStep(),b=0,a&&(b=a.index+1),b<this.options.steps.length?this._showStep(this.options.steps[b],b):b===this.options.steps.length?this._showSuccessFinalStep():this._stop()},a.prototype.setStepOptions=function(a){return this.options.stepOptions=a},a.prototype.onChangeCurrentStep=function(a,b){return this.view.render(b)},a.prototype._showCancelFinalStep=function(){return this._showFinalStep(!1)},a.prototype._showSuccessFinalStep=function(){return this._showFinalStep(!0)},a.prototype._teardownCurrentStep=function(){var a;return a=this.model.get("current_step"),this._teardownStep(a),a},a.prototype._stop=function(){return this._teardownCurrentStep(),this.model.set({current_step:null}),this.trigger("stop",this)},a.prototype._showFinalStep=function(a){var b,c;return b=this._teardownCurrentStep(),c=a?this.options.successStep:this.options.cancelStep,_.isFunction(c)&&(c.call(this,this,this.options.stepOptions),c=null),c?b&&b.final?this._stop():(c.final=!0,this._showStep(c,this.options.steps.length)):this._stop()},a.prototype._showStep=function(a,b){if(a)return a=_.clone(a),a.index=b,a.total=this.options.steps.length,a.final||(a.final=this.options.steps.length===b
5+1&&!this.options.successStep),a=_.extend(a,this._setupStep(a)),this.model.set({current_step:a})},a.prototype._setupStep=function(a){var b,c,d,e;if(!a||!a.setup)return{};if(a.bind)for(e=a.bind,c=0,d=e.length;c<d;c++)b=e[c],a[b]=_.bind(a[b],a,this,this.options.stepOptions);return a.setup.call(a,this,this.options.stepOptions)||{}},a.prototype._teardownStep=function(a){return a&&a.teardown&&a.teardown.call(a,this,this.options.stepOptions),this.view.cleanupCurrentTarget()},a}()}.call(this),function(a,b){"use strict";function c(a){var c=this;a=a||{},a=b.extend({width:800,height:450,title:"Help",dialogClass:"ccm-dialog-slim ccm-dialog-help-wrapper"},a),c.options=a}c.prototype={open:function(){var a=this;b("#ccm-dialog-help").length?a.options.element="#ccm-dialog-help":a.options.href=CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/help/introduction",b.fn.dialog.open(a.options)}},a.ConcreteHelpDialog=c}(window,jQuery),function(a,b){"use strict";function c(a,d){var e=this;d=d||{},d=b.extend({},d),e.$element=a,e.options=d;var f=e.options.element?e.options.element:b("div[data-help-notification='"+e.$element.attr("data-help-notification-toggle")+"']"); 6f.find("a[data-launch-guide]").on("click.concreteHelp",function(a){a.preventDefault();var c=ConcreteHelpGuideManager.getGuide(b(this).attr("data-launch-guide"));c.start()}),e.$element.on("click",function(a){a.preventDefault(),b(this).addClass("animated fadeOut"),f.addClass("animated fadeIn").show(),f.on("click","a[data-dismiss=help-single]",function(a){a.preventDefault(),c.close(f)})})}c.close=function(a){if(a||(a=b("div[data-help-notification]")),!a||!a.is(":visible"))return!1;var c=b("[data-help-notification-toggle='"+a.attr("data-help-notification")+"']");a.addClass("animated fadeOut"),c.removeClass("fadeOut").addClass("fadeIn"),a.clearQueue().delay(250).queue(function(){b(this).hide(),b(this).removeClass("animated fadeOut"),b(this).dequeue()})},b.fn.concreteHelpLauncher=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteHelpLauncher=c}(window,jQuery),function(a,b){"use strict";var c={guides:{},register:function(a,b){this.guides[a]=b},getGuide:function(a){return this.guides[a]},enterToolbarGuideMode:function(){ConcreteHelpLauncher.close(),b(".ccm-dialog-help-wrapper").hide(),this.showOverlay(),this.raiseToolbar()},showOverlay:function(){b(".ui-widget-overlay").length<1&&b('<div class="ui-widget-overlay"></div>').hide().appendTo("body"),b(".ui-widget-overlay").addClass("animated fadeIn").show()},raiseToolbar:function(){b("#ccm-toolbar").addClass("ccm-toolbar-tour-guide")},lowerToolbar:function(){b("#ccm-toolbar").removeClass("ccm-toolbar-tour-guide")},hideOverlay:function(){b(".ui-widget-overlay").addClass("animated fadeOut"),b(".ui-widget-overlay").delay(250).queue(function(){b(this).remove(),b(this).dequeue()})},exitToolbarGuideMode:function(){b(".ccm-dialog-help-wrapper").length?b(".ccm-dialog-help-wrapper").show():this.hideOverlay(),this.lowerToolbar()},launchGuideOnRefresh:function(a){b.cookie("ConcreteHelpActiveGuide",a,{path:CCM_REL+"/"})},clearGuideToLaunchOnRefresh:function(a){b.cookie("ConcreteHelpActiveGuide",null,{path:CCM_REL+"/"})},getGuideToLaunchOnRefresh:function(){return b.cookie("ConcreteHelpActiveGuide")},get:function(){return c}};a.ConcreteHelpGuideManager=c}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides.toolbar,d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=edit-page]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=page-settings]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+c[2].title+"</span><br/>"+c[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"top left",at:"bottom center"},{content:'<p><span class="h5">'+c[3].title+"</span><br/>"+c[3].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=intelligent-search]"),my:"top center",at:"bottom center"},{content:'<p><span class="h5">'+c[4].title+"</span><br/>"+c[4].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=sitemap]"),my:"top right",at:"bottom center"},{content:'<p><span class="h5">'+c[5].title+"</span><br/>"+c[5].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=dashboard]"),my:"top right",at:"bottom center"}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode()}),ConcreteHelpGuideManager.register("toolbar",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["change-content"],d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!1,closeButton:!0,nextButton:!1,target:b("[data-guide-toolbar-action=edit-page]"),my:"top left",at:"bottom center"}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode(),ConcreteHelpGuideManager.launchGuideOnRefresh("change-content-edit-mode")}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode()}),ConcreteHelpGuideManager.register("change-content",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["change-content-edit-mode"],d=b("div.ccm-area:not(.ccm-global-area)").eq(0),e=d.find(".ccm-block-edit").eq(0),f=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=check-in]"),my:"top left",at:"bottom center",setup:function(a,b){ConcreteHelpGuideManager.clearGuideToLaunchOnRefresh()}},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!1,nextButton:!1,closeButton:!0,target:e,my:"top left",at:"bottom center",setup:function(a,b){ConcreteEvent.subscribe("ConcreteMenuShow.changeContentEditModeTour",function(b,c){a.next()})},teardown:function(a,b){ConcreteEvent.unsubscribe("ConcreteMenuShow.changeContentEditModeTour")}},{content:'<p><span class="h5">'+c[2].title+"</span><br/>"+c[2].text+"</p>",closeButton:!0,highlightTarget:!1,nextButton:!0,setup:function(a,c){var d=b("div#ccm-popover-menu
6-container div.ccm-edit-mode-block-menu").eq(0);return{target:d}},teardown:function(){var a=ConcreteMenuManager.getActiveMenu();a&&a.hide()},my:"left center",at:"right center"},{content:'<p><span class="h5">'+c[3].title+"</span><br/>"+c[3].text+"</p>",highlightTarget:!0,nextButton:!0,target:b("[data-guide-toolbar-action=check-in]"),my:"top left",at:"bottom center"}],g=new Tourist.Tour({steps:f,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});g.on("start",function(){}),g.on("stop",function(){b(".ccm-dialog-help-wrapper").show()}),ConcreteHelpGuideManager.register("change-content-edit-mode",g)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["add-content"],d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,closeButton:!0,nextButton:!1,target:b("[data-guide-toolbar-action=add-content]"),my:"top left",at:"bottom center"}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode(),ConcreteHelpGuideManager.launchGuideOnRefresh("add-content-edit-mode")}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode()}),ConcreteHelpGuideManager.register("add-content",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["add-content-edit-mode"],d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"top left",at:"bottom center",setup:function(a,b){ConcreteHelpGuideManager.clearGuideToLaunchOnRefresh()}},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"top center",at:"top center",setup:function(a,c){return{target:b("#ccm-panel-add-block .ccm-panel-content-inner")}},teardown:function(a,b){}},{content:'<p><span class="h5">'+c[2].title+"</span><br/>"+c[2].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"left center",at:"right center",setup:function(a,c){return{target:b("#ccm-panel-add-block .ccm-panel-header-accordion")}}},{content:'<p><span class="h5">'+c[3].title+"</span><br/>"+c[3].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"left center",at:"right center",setup:function(a,c){return{target:b("#ccm-panel-add-block input[data-input=search-blocks]")}}},{content:'<p><span class="h5">'+c[4].title+"</span><br/>"+c[4].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,target:b("[data-guide-toolbar-action=add-content]"),my:"left center",at:"right center",setup:function(a,c){return{target:b("#ccm-panel-add-block .ccm-panel-add-block-draggable-block-type").eq(0)}}}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){}),e.on("stop",function(){b(".ccm-dialog-help-wrapper").length?b(".ccm-dialog-help-wrapper").show():(b.fn.dialog.showLoader(),window.location.href=b("[data-toolbar-action=check-in]").attr("href"))}),ConcreteHelpGuideManager.register("add-content-edit-mode",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["add-page"],d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:b("[data-guide-toolbar-action=sitemap]"),my:"top right",at:"bottom center",setup:function(a,c){b("a[data-launch-panel=sitemap]").on("click",function(){a.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concreteAddPageTour",function(b,c){setTimeout(function(){var b=c.panel.getIdentifier();"sitemap"==b&&a.next()},500)})}},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(a,c){return{target:b("ul.ccm-panel-sitemap-list li a").eq(0)}}},{content:'<p><span class="h5">'+c[2].title+"</span><br/>"+c[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(a,c){return{target:b("div#ccm-sitemap-panel-sitemap")}}}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concreteAddPageTour")}),ConcreteHelpGuideManager.register("add-page",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides.personalize,d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:b("[data-guide-toolbar-action=page-settings]"),my:"top left",at:"bottom center",setup:function(a,c){b("a[data-launch-panel=page]").on("click",function(){a.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concretePersonalizeTour",function(b,c){setTimeout(function(){var b=c.panel.getIdentifier();"page"==b&&a.next()},500)})}},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!0,nextButton:!1,my:"left center",closeButton:!0,at:"right center",setup:function(a,c){return b("a[data-launch-panel-detail=page-design]").on("click",function(){a.view.tip.hide()}),ConcreteEvent.subscribe("PanelOpenDetail.concretePersonalizeTour",function(b,c){setTimeout(function(){"page-design"==c.panel.identifier&&a.next()},500)}),{target:b("a[data-launch-panel-detail=page-design]").eq(0)}}},{content:'<p><span class="h5">'+c[2].title+"</span><br/>"+c[2].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,my:"bottom center",at:"top center",setup:function(a,c){return{target:b("span.ccm-page-design-theme-customize")}}}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concretePersonalizeTour"),ConcreteEvent.unsubscribe("PanelOpenDetail.concretePersonalizeTour")}),ConcreteHelpGuideManager.register("personalize",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides.dashboard,d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,nextButton:!1,closeButton:!0,target:b("[data-guide-toolbar-action=dashboard]"),my:"top right",at:"bottom center",setup:function(a,c){b("a[data-launch-panel=dashboard]").on("click",function(){a.view.tip.hide(),ConcreteHelpGuideManager.hideOverlay()}),ConcreteEvent.subscribe("PanelOpen.concreteDashboardTour",function(b,c){setTimeout(function(){var b=c.panel.getIdentifier();"dashboard"==b&&a.next()},500)})}},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!1,nextButton:!0,closeButton:!0,my:"right center",at:"left center",setup:function(a,c){return{target:b("div#ccm-panel-dashboard ul.nav a[href$=sitemap]").eq(0)}}}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});e.on("start",function(){ConcreteHelpGuideManager.enterToolbarGuideMode()}),e.on("stop",function(){ConcreteHelpGuideManager.exitToolbarGuideMode(),ConcreteEvent.unsubscribe("PanelOpen.concreteDashboardTour")}),ConcreteHelpGuideManager.register("dashboard",e)}(window,jQuery),function(a,b){"use strict";var c=ccmi18n_helpGuides["location-panel"],d=[{content:'<p><span class="h5">'+c[0].title+"</span><br/>"+c[0].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,setup:function(a,c){return{target:b("#ccm-panel-detail-page-location button[name=location]")}},my:"left center",at:"right center"},{content:'<p><span class="h5">'+c[1].title+"</span><br/>"+c[1].text+"</p>",highlightTarget:!0,nextButton:!0,closeButton:!0,setup:function(a,c){return{target:b("#ccm-panel-detail-page-location p.lead").eq(1)}},my:"right center",at:"left center"}],e=new Tourist.Tour({steps:d,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"}});ConcreteHelpGuideManager.register("location-panel",e)}(window,jQuery),function(a,b){"use strict";
6var c=b("html"),d=Concrete.EditMode=function(a){this.init.call(this,a)};d.prototype={init:function(d){function e(a,b,c,d,g,i,j){if(f.getDragging())if(g.call()){h=!0;var k=i.call(b),l=k+c,m=_.toArray(arguments),n=a.getDraggerPosition();i.call(b,l),n[j]-=k-i.call(b),a.renderPosition(),_.defer(function(){e.apply(this,m)},d)}else h=!1}var f=this;d=d||{},d=b.extend({notify:!1},d),Concrete.createGetterSetters.call(f,{dragging:!1,active:!0,nextBlockArea:null,areas:[],selectedCache:[],selectedThreshold:5,dragAreaBlacklist:[]}),f.bindEvent("PanelLoad",function(a,b){f.panelOpened(b.panel,b.element)}),f.bindEvent("PanelClose",function(a,b){"add-block"==b.panel.getIdentifier()&&f.setNextBlockArea(null),c.removeClass("ccm-panel-add-block")}),f.bindEvent("EditModeAddBlockComplete EditModeUpdateBlockComplete",function(a){_.defer(function(){f.scanBlocks()})}),f.bindEvent("EditModeBlockSaveInline",function(a,c){b("#ccm-block-form").submit(),ConcreteEvent.fire("EditModeExitInlineSaved"),ConcreteEvent.fire("EditModeExitInline",{action:"save_inline"})}),f.bindEvent("EditModeBlockEditInline",function(a,c){var d,e=c.block,g=e.getArea(),h=c.action?c.action:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/edit",i=g.getEnableGridContainer()?1:0,j=g.getCustomTemplates(),k=[{name:"cID",value:e.getCID()},{name:"arHandle",value:g.getHandle()},{name:"arGridMaximumColumns",value:c.arGridMaximumColumns},{name:"arEnableGridContainer",value:i},{name:"aID",value:g.getId()},{name:"bID",value:e.getId()}],l=e.getElem();if(j)for(var m in j)k[k.length]={name:"arCustomTemplates["+m+"]",value:j[m]};if(e.getAttr("menu")&&e.getAttr("menu").destroy(),c.postData)for(d in c.postData)c.postData.hasOwnProperty(d)&&k.push({name:d,value:c.postData[d]});Concrete.event.unbind("EditModeExitInline.editmode"),f.bindEvent("EditModeExitInline.editmode",function(a,c){Concrete.event.unbind(a),a.stopPropagation();var d=CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",h={cID:e.getCID(),arEnableGridContainer:i,bID:e.getId(),arHandle:g.getHandle()};b.fn.dialog.showLoader(),c&&c.action&&"save_inline"===c.action||b.get(d,h,function(a){var b=f.getBlockByID(e.getId());if(b){var c=b.replace(a);_.defer(function(){ConcreteEvent.fire("EditModeExitInlineComplete",{block:c}),f.destroyInlineEditModeToolbars(),_.defer(function(){f.scanBlocks()})})}})}),ConcreteToolbar.disable(),ConcreteMenuManager.$clickProxy.hide(),b("div.ccm-area").addClass("ccm-area-inline-edit-disabled"),e.getElem().addClass("ccm-block-edit-inline-active"),b.ajax({type:"GET",url:h,data:k,success:function(a){var c=b(a);l.empty().append(c).find(".ccm-block-edit").addClass("ccm-block-edit-inline-active"),f.loadInlineEditModeToolbars(l),b.fn.dialog.hideLoader(),Concrete.event.fire("EditModeInlineEditLoaded",{block:e,element:c})}})}),f.bindEvent("EditModeBlockAddInline",function(a,c){var d,e,g,h=c.area,i=c.selected,j=c.btID,k=c.cID,l=h.getEnableGridContainer()?1:0,m=[{name:"btask",value:"edit"},{name:"cID",value:k},{name:"arGridMaximumColumns",value:c.arGridMaximumColumns},{name:"arEnableGridContainer",value:l},{name:"arHandle",value:h.getHandle()},{name:"btID",value:j}];i?(g=i.getElem(),d=i.getBlock()):(g=h.getBlockContainer().children().last(),d=c.dragAreaBlock);var n=h.getCustomTemplates();if(n)for(var o in n)m[m.length]={name:"arCustomTemplates["+o+"]",value:n[o]};d&&(e=d.getId()),ConcreteMenuManager.disable(),ConcreteToolbar.disable(),b.fn.dialog.closeAll(),ConcreteMenuManager.$clickProxy.hide(),b("div.ccm-area").addClass("ccm-area-inline-edit-disabled"),b.fn.dialog.showLoader(),h.getAttr("menu")&&h.getAttr("menu").destroy();var p=!1;f.bindEvent("EditModeExitInlineSaved",function(a){Concrete.event.unbind(a),p=!0;var b=ConcretePanelManager.getByIdentifier("add-block");b&&b.pinned()&&b.show()}),f.bindEvent("EditModeExitInline",function(a){if(Concrete.event.unsubscribe(a),!p){b("#a"+h.getId()+"-bt"+j).remove(),f.destroyInlineEditModeToolbars(),ConcreteEvent.fire("EditModeExitInlineComplete");var c=ConcretePanelManager.getByIdentifier("add-block");c&&c.pinned()&&c.show()}}),b.ajax({type:"GET",url:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block",data:m,success:function(a){var c=b(a),d=b('<div class="ccm-block-edit-inline-active"></div>');d.attr("id","a"+h.getId()+"-bt"+j).append(c),h.getElem().addClass("ccm-area-edit-inline-active"),g.after(d),b(function(){d.find("#ccm-block-form").concreteAjaxBlockForm({task:"add",btSupportsInlineAdd:!0,dragAreaBlockID:e,dragArea:i,placeholder:"#a"+h.getId()+"-bt"+j})}),f.loadInlineEditModeToolbars(d.find("div[data-container=inline-toolbar]"))},complete:function(){b.fn.dialog.hideLoader()}})}),Concrete.event.bind("EditModeBlockAddToClipboard",function(a,c){var d=c.block,e=d.getArea(),f=c.token;ConcreteToolbar.disableDirectExit(),b.ajax({type:"POST",url:CCM_TOOLS_PATH+"/pile_manager",data:"cID="+d.getCID()+"&bID="+d.getId()+"&arHandle="+encodeURIComponent(e.getHandle())+"&btask=add&scrapbookName=userScrapbook&ccm_token="+encodeURIComponent(f),success:function(a){ConcreteAlert.notify({message:ccmi18n.copyBlockToScrapbookMsg,title:ccmi18n.copyBlockToScrapbook})}})}),f.bindEvent("EditModeBlockDelete",function(a,b){var c=b.block;c.delete(b.message)}),f.bindEvent("EditModeBlockDeleteComplete",function(a,b){var c=b.block;c.finishDelete(),ConcreteEvent.fire("EditModeBlockDeleteAfterComplete",{block:c})});var g=b(a.document),h=!1,i=100;f.bindEvent("EditModeBlockDrag",_.throttle(function(c,d){if(f.getDragging()){var j,k=d.block,l=d.pep,m=f.getAreas();k instanceof Concrete.Layout&&(m=[_(m).find(function(a){return k.getArea()===a})]),j=_.flatten(_(m).map(function(a){var b=a.contendingDragAreas(l,k);return b}),!0),_.defer(function(){Concrete.event.fire("EditModeContenders",j),f.selectContender(l,k,j,d.event)}),h||(e(k,g,2,10,function(){var c=k.getDraggerPosition().y-g.scrollTop();return k.getDragging()&&b(a).height()-c<=i},b.fn.scrollTop,"y"),e(k,g,-2,10,function(){var a=k.getDraggerPosition().y-g.scrollTop();return k.getDragging()&&a<=i},b.fn.scrollTop,"y"),e(k,g,2,10,function(){var c=k.getDraggerPosition().x-g.scrollLeft();return k.getDragging()&&b(a).width()-c<=i},b.fn.scrollLeft,"x"),e(k,g,-2,10,function(){var a=k.getDraggerPosition().x-g.scrollLeft();return k.getDragging()&&a<=i},b.fn.scrollLeft,"x"))}},250,{trailing:!1})),f.bindEvent("EditModeBlockDragStop",function(a,b){Concrete.event.fire("EditModeContenders",[]),Concrete.event.fire("EditModeSelectableContender"),c.removeClass("ccm-block-dragging"),b.block
6instanceof Concrete.BlockType||f.scanBlocks()}),f.bindEvent("EditModeBlockMove",function(c,d){var e=d.block,f=d.targetArea,g=d.sourceArea,h={ccm_token:a.CCM_SECURITY_TOKEN,btask:"ajax_do_arrange",area:f.getId(),sourceArea:g.getId(),block:e.getId(),blocks:[]};f=f.inEditMode(f.getEditMode()),_(f.getBlocks()).each(function(a,b){h.blocks.push(a.getId())}),e.bindMenu();var i=!1,j=setTimeout(function(){i=!0,b.fn.dialog.showLoader()},150);b.concreteAjax({url:CCM_DISPATCHER_FILENAME+"/ccm/system/page/arrange_blocks?cID="+e.getCID(),data:h,success:function(a){ConcreteToolbar.disableDirectExit(),b.fn.dialog.hideLoader(),clearTimeout(j)}})}),f.bindEvent("EditModeBlockDragStart",function(){c.addClass("ccm-block-dragging"),f.setDragging(!0)}),f.scanBlocks(),Concrete.getEditMode=function(){return f},d.notify&&ConcreteAlert.notify({message:ccmi18n.editModeMsg,title:ccmi18n.editMode}),ConcreteEvent.fire("EditModeAfterInit",{editMode:f})},bindEvent:function(a,b){return Concrete.event.bind(a,b)},reset:function(){var a=this;_(a.getAreas()).each(function(a){a.destroy()}),a.setAttr("areas",[])},scanBlocks:function(){var a,c=this;c.reset(),b("div.ccm-area").each(function(){var d=b(this);d.parent().hasClass("ccm-block-stack")||(a=new Concrete.Area(d,c),a.scanBlocks(),c.addArea(a))}),_.invoke(c.getAreas(),"bindMenu")},panelOpened:function(a,d){var e=this,f=e.getNextBlockArea();return"add-block"!==a.getIdentifier()?null:(c.addClass("ccm-panel-add-block"),b(d).find("input[data-input=search-blocks]").liveUpdate("ccm-panel-add-blocktypes-list","blocktypes"),b(d).find("input[data-input=search-blocks]").focus(),b(d).find("a.ccm-panel-add-block-draggable-block-type").each(function(){var a,c=b(this),d=b("<a/>").addClass("ccm-panel-add-block-draggable-block-type-dragger").appendTo(c);a=new Concrete.BlockType(b(this),e,d,f),a.setPeper(d)}),b(d).find("div.ccm-panel-add-block-stack-item").each(function(){var a,c=b(this),d=c.find(".ccm-panel-add-block-stack-item-handle");a=new Concrete.Stack(b(this),e,d,f),a.setPeper(d)}),b(d).find("div.ccm-panel-add-clipboard-block-item").each(function(){var a=b(this);new Concrete.DuplicateBlock(a,e,f)}),b(d).find(".ccm-panel-content").mousewheel(function(a){if(a.deltaY&&a.deltaFactor){var c=-1*a.deltaY*a.deltaFactor,d=b(this),e=c||0,f=d.scrollTop(),g=d.get(0).scrollHeight-(d.scrollTop()+d.height())-d.css("paddingTop").replace("px","");if(e)return!(e<0&&!f||e>0&&!g)&&(d.scrollTop(d.scrollTop()+e),!1)}}),a)},getAreaByID:function(a){var b=this.getAreas();return _.findWhere(b,{id:parseInt(a)})},getBlockByID:function(a){var b=this.getAreas(),c=null;return _(b).every(function(b){return!c&&(_(b.getBlocks()).every(function(b){return b.getId()!=a||(c=b,!1)}),!0)}),c},selectContender:function(a,b,c,d){var e=this;if(c=_(c).filter(function(c){return c.isSelectable(a,b,d)}),c.length<2)return Concrete.event.fire("EditModeSelectableContender",_(c).first());var f=e.getSelectedCache(),g=e.getDragAreaBlacklist();e.getSelectedThreshold()!==f.length||_(f).without(_(f).last()).length||(g.push(_(f).last()),e.setDragAreaBlacklist(g),_.delay(function(a){var b=e.getDragAreaBlacklist();e.setDragAreaBlacklist(_(b).without(a))},5e3,_(f).last())),c=_(c).difference(g);var h=_(c).min(function(a){var b=a.centerDistanceToBlock(this);return b},b);return f.push(h),e.setSelectedCache(_(f).last(e.getSelectedThreshold())),Concrete.event.fire("EditModeSelectableContender",h),h},addArea:function(a){var b=this;b.getAreas().push(a)},getBlocks:function(){var a=[];return _(this.getAreas()).each(function(b){a.push(b.getBlocks())}),_(a).flatten()},destroyInlineEditModeToolbars:function(){ConcreteMenuManager.enable(),b("div.ccm-area-edit-inline-active").removeClass("ccm-area-edit-inline-active"),b("div.ccm-block-edit-inline-active").remove(),ConcreteMenuManager.$clickProxy.show(),b("div.ccm-area").removeClass("ccm-area-inline-edit-disabled"),b("#ccm-toolbar").css("opacity",1),b("#ccm-inline-toolbar-container").remove(),b(a).unbind("scroll.inline-toolbar"),ConcreteToolbar.enable(),b.fn.dialog.hideLoader()},loadInlineEditModeToolbars:function(c,d){b("#ccm-inline-toolbar-container").remove();var e,f=b("<div />",{id:"ccm-inline-toolbar-container"}).appendTo(document.body);d?(f.append(d),e=f.find(".ccm-inline-toolbar")):(e=c.find(".ccm-inline-toolbar"),e.appendTo(f));var g=b(a),h=c.offset(),i=h.left,j=i+parseInt(e.width());if(g.width()>e.width())if(j>g.width()){var k=j-(i+c.width());e.css("left",i-k)}else e.css("left",i);e.css("opacity",1),e.find(".dialog-launch").dialog();var l=h.top-f.outerHeight()-5;f.css("top",l).css("opacity",1),g.scrollTop()>l&&(b("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",0),f.addClass("ccm-inline-toolbar-affixed")),g.on("scroll.inline-toolbar",function(){f.toggleClass("ccm-inline-toolbar-affixed",g.scrollTop()>l),g.scrollTop()>l?b("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",0):b("#ccm-toolbar-disabled,#ccm-toolbar").css("opacity",1)})}}}(window,jQuery),function(a,b){"use strict";var c=Concrete.Block=function(a,b,c){this.init.apply(this,_(arguments).toArray())};c.prototype={init:function(a,c,d){var e=this;a.data("Concrete.block",e),a.children(".ccm-block-cover").length||b("<div/>").addClass("ccm-block-cover").appendTo(a),Concrete.createGetterSetters.call(e,{id:a.data("block-id"),active:!0,handle:a.data("block-type-handle"),areaId:a.data("area-id"),cID:a.data("cid"),wraps:!!a.data("block-type-wraps"),area:null,elem:a,dragger:null,draggerOffset:{x:0,y:0},draggerPosition:{x:0,y:0},dragging:!1,rotationDeg:0,editMode:c,selected:null,stepIndex:0,peper:d||a.children(".ccm-edit-mode-inline-commands, .ccm-custom-style-container").find('a[data-inline-command="move-block"]'),pepSettings:{}}),e.id=e.getId(),_(e.getPepSettings()).extend({deferPlacement:!0,moveTo:function(){e.dragPosition(this)},initiate:function(a,b){e.pepInitiate.call(e,this,a,b)},drag:function(a,b){e.pepDrag.call(e,this,a,b)},start:function(a,b){e.pepStart.call(e,this,a,b)},stop:function(a,b){e.pepStop.call(e,this,a,b)},place:!1}),e.bindEvent("EditModeSelectableContender",function(a,b){e.getDragging()&&b instanceof Concrete.DragArea?e.setSelected(b):e.getDragging()&&e.setSelected(null)}),e.getPeper().click(function(a){return a.preventDefault(),a.stopPropagation(),!1}).pep(e.getPepSettings())},destroy:function(){this.getPeper().unbind(),b.pep.unbind(this.getPeper()),this.setAttr("active",!1)}
6,bindEvent:function(a,b){return Concrete.EditMode.prototype.bindEvent.apply(this,_(arguments).toArray())},getContainer:function(){for(var a=this.getElem();!a.parent().hasClass("ccm-area-block-list")&&!a.parent().is("[data-area-id]")&&a.parent().length;)a=a.parent();return a},addToDragArea:function(a){var c,d,e=this,f=e.getArea(),g=a.getArea();f.removeBlock(e),e.getContainer().remove(),e.getWraps()?(d=b(g.getBlockTemplate()()),a.getElem().after(d),d.children().length?d.find("div.block").replaceWith(e.getElem()):d.append(e.getElem())):a.getElem().after(e.getElem()),c=a.getBlock(),c?a.getArea().addBlock(e,c):a.getArea().addBlockToIndex(e,0),e.getPeper().pep(e.getPepSettings()),e.getEditMode().scanBlocks(),Concrete.event.fire("EditModeBlockMove",{block:e,sourceArea:f,targetArea:g})},handleAddResponse:function(a,c,d,e){var f=this,g=c.getEnableGridContainer()?1:0;if(!a.error)return b.get(CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",{arHandle:a.arHandle,cID:a.cID,bID:a.bID,arEnableGridContainer:g},function(a){d?d.getContainer().after(a):c.getBlockContainer().prepend(a),b.fn.dialog.hideLoader(),_.defer(function(){f.getEditMode().scanBlocks(),f.showSuccessfulAdd(),Concrete.forceRefresh(),e&&e()})}),!0},showSuccessfulAdd:function(){ConcreteAlert.notify({message:ccmi18n.addBlockMsg,title:ccmi18n.addBlock})},delete:function(a){var c=this,d=c.getId(),e=c.getArea(),f=c.getCID(),g=e.getHandle(),h="cID="+f+"&ccm_token="+CCM_SECURITY_TOKEN+"&isAjax=true&btask=remove&bID="+d+"&arHandle="+encodeURIComponent(g);b.fn.dialog.open({width:460,height:"auto",href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/delete",modal:!0,data:h,title:ccmi18n.deleteBlockTitle})},finishDelete:function(){ConcreteToolbar.disableDirectExit();var a=this,b=a.getId(),c=a.getArea(),d=c.getBlockByID(b);c.removeBlock(d)},replace:function(a){var c=b(a);return this.getContainer().replaceWith(c),this.getArea().scanBlocks(),this.getArea().getBlockByID(this.getId())},getMenuElem:function(){return b("div.ccm-edit-mode-block-menu",this.getElem()).first()},bindMenu:function(){var a=this,c=a.getElem(),d=c.attr("data-block-menu-handle"),e=a.getMenuElem();if("none"!==d){var f={highlightClassName:"ccm-block-highlight",menuActiveClass:"ccm-block-highlight",menu:e};a.getArea()&&a.getArea().getElem().hasClass("ccm-global-area")&&(f.menuActiveClass+=" ccm-global-area-block-highlight",f.highlightClassName+=" ccm-global-area-block-highlight"),a.setAttr("menu",new ConcreteMenu(c,f)),e.find("a[data-menu-action=edit_inline]").unbind("click.core").on("click.core",function(b){Concrete.event.fire("EditModeBlockEditInline",{block:a,event:b})}),e.find("a[data-menu-action=block_scrapbook]").unbind("click.core").on("click.core",function(c){Concrete.event.fire("EditModeBlockAddToClipboard",{block:a,event:c,token:b(this).data("token")})}),e.find("a[data-menu-action=delete_block]").unbind("click.core").on("click.core",function(c){Concrete.event.fire("EditModeBlockDelete",{message:b(this).attr("data-menu-delete-message"),block:a,event:c})}),e.find("a[data-menu-action=block_design]").unbind("click.core").on("click.core",function(b){b.preventDefault(),Concrete.event.fire("EditModeBlockEditInline",{block:a,event:b,action:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/design"})})}},setArea:function(a){this.setAttr("area",a);var c=this;c.getElem().find("a[data-menu-action=block_dialog]").each(function(){var d=b(this).data("menu-href");d+=d.indexOf("?")!==-1?"&cID="+c.getCID():"?cID="+c.getCID(),d+="&arHandle="+encodeURIComponent(a.getHandle())+"&bID="+c.getId(),b(this).attr("href",d).dialog()}),c.bindMenu()},getDragger:function(){var a=this;if(!a.getAttr("dragger")){var c=b("<a />").html(a.getElem().data("dragging-avatar")||'<p><img src="/concrete/blocks/content/icon.png"><span>'+ccmi18n.content+"</span></p>").addClass("ccm-block-edit-drag ccm-panel-add-block-draggable-block-type");a.setAttr("dragger",c.css({width:a.getElem().width(),height:a.getElem().height()}))}return a.getAttr("dragger")},transform:function(a,b){var c=this,d=c.getDragger().css({"-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a}).get(0);if(d.filters&&d.filters["DXImageTransform.Microsoft.Matrix"]){var e={elements:_(b).groupBy(function(a,b){return Math.floor(b/3)})};d.filters["DXImageTransform.Microsoft.Matrix"].M11=e.elements[0][0],d.filters["DXImageTransform.Microsoft.Matrix"].M12=e.elements[0][1],d.filters["DXImageTransform.Microsoft.Matrix"].M21=e.elements[1][0],d.filters["DXImageTransform.Microsoft.Matrix"].M22=e.elements[1][1],d.style.left=-(d.offsetWidth/2)+d.clientWidth/2+"px",d.style.top=-(d.offsetHeight/2)+d.clientHeight/2+"px"}return!0},resetTransform:function(){var a="",b=this.getDragger().css({top:0,left:0,"-webkit-transform":a,"-moz-transform":a,"-ms-transform":a,"-o-transform":a,transform:a}).get(0);
6return b.filters&&(b.filters=[]),this.setDraggerPosition({x:0,y:0}),this.renderPosition()},multiplyMatrices:function(a,b){for(var c=[],d=0;d<a.length;d++){c[d]=[];for(var e=0;e<a[0].length;e++){for(var f=0,g=0;g<a[0].length;g++)f+=a[d][g]*b[g][e];c[d][e]=f}}return c},matrixToCss:function(a){var b=4,c=Math.pow(10,b),d=function(a){return Math.round(a*c)/c};a[0]=_(a[0]).map(d),a[1]=_(a[1]).map(d);var e=[a[0][0],a[0][1],a[1][0],a[1][1],a[0][2],a[1][2]];return"matrix("+e.join(",")+")"},endRotation:function(){var a=this,b=a.getRotationDeg();a.getDragger().animate({rotation:0},{duration:1, 7step:function(){}});var c=a.setStepIndex(a.getStepIndex()+1);return a.getDragger().animate({rotation:a.getRotationDeg()},{queue:!1,duration:150,step:function(d){a.getStepIndex()===c&&(a.setRotationDeg(b-d),a.renderPosition())}},"easeOutElastic"),!0},renderPosition:function(){var a,b,c=this,d=c.getDraggerPosition().x,e=c.getDraggerPosition().y,f=c.getRotationDeg()*(Math.PI/180),g=_.bind(Math.cos,Math),h=_.bind(Math.sin,Math),i=[[1,0,d],[0,1,e],[0,0,1]];return f?(a=[[g(f),h(f),0],[-h(f),g(f),0],[0,0,1]],b=c.multiplyMatrices(i,a)):b=i,this.transform(c.matrixToCss(b),b)},dragPosition:function(a){var b=this;b.setRotationDeg(Math.max(-15,Math.min(15,a.velocity().x/15))),b.endRotation();var c=_.last(a.velocityQueue),d=b.getDraggerOffset();c||(c={x:b.getDragger().offset().left,y:b.getDragger().offset().top});var e=c.x-d.x,f=c.y-d.y;return b.setDraggerPosition({x:e,y:f}),b.renderPosition(),!0},pepInitiate:function(b,c,d){var e=this;e.resetTransform(),e.setDragging(!0),e.getDragger().hide().appendTo(a.document.body).css(e.getElem().offset()),e.setDraggerOffset({x:c.clientX-e.getElem().offset().left+a.document.body.scrollLeft,y:c.clientY-e.getElem().offset().top+a.document.body.scrollTop}),e.getDragger().fadeIn(250),_.defer(function(){Concrete.event.fire("EditModeBlockDragInitialization",{block:e,pep:d,event:c})})},pepDrag:function(a,b,c){var d=this;_.defer(function(){Concrete.event.fire("EditModeBlockDrag",{block:d,pep:c,event:b})})},pepStart:function(a,c,d){var e=this;e.resetTransform();var f=e.getElem(),g={x:c.pageX,y:c.pageY},h={x:f.offset().left,y:f.offset().top},i={x:(h.x-g.x)/f.width(),y:(h.y-g.y)/f.height()};e.setDraggerPosition({x:h.x,y:h.y}),e.renderPosition(),e.setDraggerOffset({x:-1*(i.x*f.width()),y:-1*(i.y*f.height())}),e.getDragger().animate({width:90,height:90},{duration:250,step:function(a,c){e.setDraggerOffset({x:-1*(i.x*b(this).width()),y:-1*(i.y*b(this).height())}),e.dragPosition(d)}}),_.defer(function(){Concrete.event.fire("EditModeBlockDragStart",{block:e,pep:d,event:c})})},pepStop:function(a,b,c){var d,e=this;e.getDragger().stop(1),e.getDragger().css({top:0,left:0}),e.dragPosition(c),(d=e.getSelected())&&e.addToDragArea(d),e.animateToElem(),_.defer(function(){Concrete.event.fire("EditModeBlockDragStop",{block:e,pep:c,event:b})})},animateToElem:function(a){var b=this,c=a||b.getElem(),d={x:b.getDraggerPosition().x,y:b.getDragger().offset().top,width:b.getDragger().width(),height:b.getDragger().height()};b.setDragging(!1),b.getDragger().animate({ccm_perc:0},{duration:0,step:function(){}}).animate({ccm_perc:1,opacity:0},{duration:500,step:function(a,e){if("ccm_perc"===e.prop){var f={x:c.offset().left,y:c.offset().top,width:c.width(),height:c.height()},g={x:(f.x-d.x)*a,y:(f.y-d.y)*a,width:(f.width-d.width)*a,height:(f.height-d.height)*a};b.setDraggerPosition({x:d.x+g.x,y:d.y+g.y}),b.renderPosition(),b.getDragger().css({width:d.width+g.width,height:d.height+g.height})}else b.getDragger().css({opacity:a})},complete:function(){b.getDragger().remove(),b.setAttr("dragger",null)}})}}}(window,jQuery),function(a,b){"use strict";var c=Concrete.StackDisplay=function(a,b){this.init.apply(this,_(arguments).toArray())};c.prototype=_.extend(Object.create(Concrete.Block.prototype),{init:function(a,b){var c=this;a.children(".ccm-area").children(".ccm-area-block-list").find(".ccm-edit-mode-inline-commands").remove(),Concrete.Block.prototype.init.apply(c,_(arguments).toArray())}})}(window,jQuery),function(a,b){"use strict";var c=Concrete.Area=function(a,b){this.init.apply(this,_(arguments).toArray())};c.prototype={init:function(a,c){var d=this;a.data("Concrete.area",d),Concrete.createGetterSetters.call(d,{id:a.data("area-id"),active:!0,blockTemplate:_(a.children("script[role=area-block-wrapper]").html()).template(),elem:a,totalBlocks:0,enableGridContainer:a.data("area-enable-grid-container"),customTemplates:a.data("area-custom-templates"),handle:a.data("area-handle"),dragAreas:[],blocks:[],editMode:c,maximumBlocks:parseInt(a.data("maximumBlocks"),
710),blockTypes:a.data("accepts-block-types").toLowerCase().split(" "),blockContainer:a.children(".ccm-area-block-list")}),d.id=d.getId(),d.setTotalBlocks(0),d.bindEvent("EditModeBlockAddInline.area",function(a,b){b.area===d&&d.setTotalBlocks(d.getTotalBlocks()+1)}),d.bindEvent("EditModeAddBlocksToArea.area",function(a,c){if(c.area===d){d.getEditMode().setNextBlockArea(d);var e=b('[data-launch-panel="add-block"]');e.click()}})},inEditMode:function(a){return a.getAreaByID(this.getId())},destroy:function(){var a=this;a.getAttr("menu")&&a.getAttr("menu").destroy(),Concrete.event.unbind(".ccm-area-a"+this.getId()),a.reset()},reset:function(){var a=this;_(a.getDragAreas()).each(function(a){a.destroy()}),_(a.getBlocks()).each(function(a){a.destroy()}),a.setBlocks([]),a.setDragAreas([]),a.setTotalBlocks(0)},bindEvent:function(a,b){return Concrete.EditMode.prototype.bindEvent.call(this,a+".ccm-area-a"+this.getId(),b)},scanBlocks:function(){var a,c,d=this;d.reset(),d.addDragArea(null),b("div.ccm-block-edit[data-area-id="+d.getId()+"]",this.getElem()).each(function(){var e=b(this),f=e.data("block-type-handle");a="core_area_layout"===f?Concrete.Layout:"core_stack_display"===f?Concrete.StackDisplay:Concrete.Block,c=new a(e,d.getEditMode()),c.setArea(d),d.addBlock(c)})},getBlockByID:function(a){var b=this;return _.findWhere(b.getBlocks(),{id:a})},getMenuElem:function(){var a=this;return b("[data-area-menu=area-menu-a"+a.getId()+"]")},bindMenu:function(){var a,c=this,d=c.getElem(),e=c.getTotalBlocks(),f=c.getMenuElem();a=e>0?"#area-menu-footer-"+c.getId():"div[data-area-menu-handle="+c.getId()+"]",c.getAttr("menu")&&c.getAttr("menu").destroy();var g={handle:a,highlightClassName:"ccm-area-highlight",menuActiveClass:"ccm-area-highlight",menu:b("[data-area-menu="+d.attr("data-launch-area-menu")+"]")};c.getElem().hasClass("ccm-global-area")&&(g.menuActiveClass+=" ccm-global-area-highlight",g.highlightClassName+=" ccm-global-area-highlight"),c.setAttr("menu",new ConcreteMenu(d,g)),f.find("a[data-menu-action=add-inline]").off("click.edit-mode").on("click.edit-mode",function(a){var d=!1;return _.each(c.getBlocks(),function(a){d=a}),Concrete.event.fire("EditModeBlockAddInline",{area:c,cID:CCM_CID,btID:b(this).data("block-type-id"),arGridMaximumColumns:b(this).attr("data-area-grid-maximum-columns"),event:a,dragAreaBlock:d,btHandle:b(this).data("block-type-handle")}),!1}),f.find("a[data-menu-action=edit-container-layout]").off("click.edit-mode").on("click.edit-mode",function(a){var c=b(this),d=parseInt(c.attr("data-container-layout-block-id")),e=Concrete.getEditMode(),f=_.findWhere(e.getBlocks(),{id:d});return Concrete.event.fire("EditModeBlockEditInline",{block:f,arGridMaximumColumns:c.attr("data-area-grid-maximum-columns"),event:a}),!1}),f.find("a[data-menu-action=edit-container-layout-style]").off("
7click.edit-mode").on("click.edit-mode",function(a){a.preventDefault();var c=b(this),d=parseInt(c.attr("data-container-layout-block-id")),e=Concrete.getEditMode(),f=_.findWhere(e.getBlocks(),{id:d});Concrete.event.fire("EditModeBlockEditInline",{block:f,event:a,action:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/block/design"})}),f.find("a[data-menu-action=area-add-block]").off("click.edit-mode").on("click.edit-mode",function(a){var b=c.getMaximumBlocks();return b<0||b>c.getTotalBlocks()?Concrete.event.fire("EditModeAddBlocksToArea",{area:c}):ConcreteAlert.error({message:ccmi18n.fullArea}),!1}),c.bindEvent("ConcreteMenuShow",function(a,b){if(b.menu==c.getAttr("menu")){var d=c.getMaximumBlocks(),e=b.menu.$menuPointer.find("a[data-menu-action=area-add-block]").parent();d<0||d>c.getTotalBlocks()?e.show():e.hide()}}),f.find("a[data-menu-action=edit-area-design]").off("click.edit-mode").on("click.edit-mode",function(a){a.preventDefault(),ConcreteToolbar.disable(),c.getElem().addClass("ccm-area-inline-edit-disabled");var d={arHandle:c.getHandle(),cID:CCM_CID};c.bindEvent("EditModeExitInline",function(a){Concrete.event.unsubscribe(a),c.getEditMode().destroyInlineEditModeToolbars()}),b.ajax({type:"GET",url:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/area/design",data:d,success:function(a){var d=c.getElem();c.getEditMode().loadInlineEditModeToolbars(d,a),b.fn.dialog.hideLoader()}})})},acceptsBlockType:function(a){return _(this.getBlockTypes()).contains(a.toLowerCase())},addBlock:function(a,b){var c=this;return b?this.addBlockToIndex(a,_(c.getBlocks()).indexOf(b)+1):this.addBlockToIndex(a,c.getBlocks().length)},setTotalBlocks:function(a){this.setAttr("totalBlocks",a),this.getElem().attr("data-total-blocks",a)},addBlockToIndex:function(a,b){var c=this.getTotalBlocks(),d=this.getBlocks(),e=c-b;if(a.setArea(this),this.setTotalBlocks(c+1),e>0){for(var f=[],g=0;g<d.length;g++)g>=b?f[g+1]=d[g]:f[g]=d[g];f[b]=a,this.setBlocks(f)}else this.getBlocks()[b]=a;return this.addDragArea(a),a.getElem().attr("data-area-id",this.getId()),!0},removeBlock:function(a){var b=this,c=b.getTotalBlocks();b.getElem().removeClass("ccm-parent-menu-item-active"),a.getContainer().remove(),b.setBlocks(_(b.getBlocks()).without(a)),b.setTotalBlocks(c-1);var d=_.first(_(b.getDragAreas()).filter(function(b){return b.getBlock()===a}));return d&&(d.getElem().remove(),b.setDragAreas(_(b.getDragAreas()).without(d))),b.getTotalBlocks()||b.bindMenu(),!0},addDragArea:function(a){var c,d,e=this;if(a)c=b('<div class="ccm-area-drag-area"/>'),d=new Concrete.DragArea(c,e,a),a.getContainer().after(c);else{if(e.getDragAreas().length)throw new Error("No block supplied");c=b('<div class="ccm-area-drag-area"/>'),d=new Concrete.DragArea(c,e,a),e.getBlockContainer().prepend(c)}return e.getElem().parent().is("#ccm-stack-container")||c.text(_(ccmi18n.emptyArea).template({area_handle:e.getElem().data("area-display-name")})),e.getDragAreas().push(d),d},contendingDragAreas:function(a,b){var c=this,d=c.getMaximumBlocks();return b instanceof Concrete.Stack||"core_stack_display"===b.getHandle()?_(c.getDragAreas()).filter(function(c){return c.isContender(a,b)}):d>0&&c.getBlocks().length>=d||!_(c.getBlockTypes()).contains(b.getHandle())?[]:_(c.getDragAreas()).filter(function(c){return c.isContender(a,b)})}}}(window,jQuery),function(a,b){"use strict";var c=Concrete.Layout=function(a,b){this.init.apply(this,_(arguments).toArray())};c.prototype=_.extend(Object.create(Concrete.Block.prototype),{init:function(a,c){var d=this;d.bindEvent("EditModeInlineEditLoaded.editmode",function(a,b){b.block===d&&d.bindDrag()}),Concrete.Block.prototype.init.call(d,a,c,b()),a.children(".ccm-block-cover").remove()},bindDrag:function(){var a=this,c=b('a[data-layout-command="move-block"]').parent();b.pep.unbind(c),c.pep(a.getPepSettings())},addToDragArea:function(){Concrete.Block.prototype.addToDragArea.apply(this,_.toArray(arguments));var a=b("#ccm-inline-toolbar-container");a.css({top:this.getElem().offset().top-a.outerHeight()-5})}})}(window,jQuery),function(a,b){"use strict";var c=Concrete.DragArea=function(a,b,c){this.init.apply(this,_.toArray(arguments))};c.prototype={init:function(a,b,c){var d=this;Concrete.createGetterSetters.call(d,{block:c,active:!0,elem:a,area:b,isContender:!1,isSelectable:!1,animationLength:500}),d.bindEvent("EditModeContenders",function(a,b){d.setIsContender(_.contains(b,d))}),d.bindEvent("EditModeSelectableContender",function(a,b){d.setIsSelectable(b===d)})},destroy:function(){var a=this;a.getElem().remove()}
7,bindEvent:function(a,b){return Concrete.EditMode.prototype.bindEvent.apply(this,_(arguments).toArray())},getActive:function(){return this.getArea().getActive()&&this.getAttr("active")},isSelectable:function(a,b){return a.isOverlapping(b.getDragger(),this.getElem())},setIsSelectable:function(a){var b=this;return a&&!b.getIsSelectable()?(b.getArea().getElem().addClass("ccm-parent-menu-item-active"),b.getElem().addClass("ccm-area-drag-area-selectable")):!a&&b.getIsSelectable()&&(b.getArea().getElem().removeClass("ccm-parent-menu-item-active"),b.getElem().removeClass("ccm-area-drag-area-selectable")),b.setAttr("isSelectable",a),!0},isContender:function(a,b){var c=this;return _.identity(a),c.getBlock()!==b},setIsContender:function(a){var b=this;return a&&!b.getIsContender()?_.defer(function(){b.getElem().addClass("ccm-area-drag-area-contender")}):!a&&b.getIsContender()&&_.defer(function(){b.getElem().removeClass("ccm-area-drag-area-contender")}),b.setAttr("isContender",a),!0},centerDistanceToBlock:function(a){var b=this,c=a.getDragger(),d={x:c.offset().left+c.width()/2,y:c.offset().top+c.height()/2},e=b.getElem(),f={x:e.offset().left+e.width()/2,y:e.offset().top+e.height()/2};return Math.sqrt(Math.pow(Math.abs(d.x-f.x),2)+Math.pow(Math.abs(d.y-f.y),2))}}}(window,jQuery),function(a,b){"use strict";var c=Concrete.BlockType=function(a,b,c,d){this.init.apply(this,_(arguments).toArray())};c.prototype=_.extend(Object.create(Concrete.Block.prototype),{init:function(a,b,c,d){var e=this;Concrete.Block.prototype.init.apply(e,_(arguments).toArray()),e.setAttr("defaultArea",d||null),d&&(d.acceptsBlockType(e.getHandle())?e.handleDefaultArea():e.removeElement())},handleDefaultArea:function(){var a=this;b.pep.unbind(a.getPeper()),a.getPeper().click(function(b){return a.handleClick(),!1}).css({cursor:"pointer"})},removeElement:function(){var a=this.getPeper().closest(".ccm-panel-content-inner");this.getPeper().closest("li").remove(),a.children(".ccm-panel-add-block-set").each(function(){var a=b(this).children("ul");a.children().length||b(this).remove()})},handleClick:function(){var a=this,b=a.getAttr("defaultArea");ConcretePanelManager.exitPanelMode(function(){_.defer(function(){a.addToDragArea(_.last(b.getDragAreas()))})})},pepStart:function(a,b,c){var d,e=this;Concrete.Block.prototype.pepStart.call(this,a,b,c),e.setAttr("closedPanel",_(ConcretePanelManager.getPanels()).find(function(a){return a.isOpen})),(d=e.getAttr("closedPanel"))&&d.hide()},pepStop:function(a,b,c){var d,e,f=this;(d=f.getSelected())?f.addToDragArea(d):(e=f.getAttr("closedPanel"))&&e.show(),_.defer(function(){Concrete.event.fire("EditModeBlockDragStop",{block:f,pep:c,event:b})}),f.getDragger().remove(),f.setAttr("dragger",null)},addToDragArea:function(a){var c,d,e=this,f=e.getElem(),g=f.data("btid"),h=f.data("cid"),i=a.getArea(),j=i.getHandle(),k=i.getEnableGridContainer()?1:0,l=0,m=a.getBlock(),n=!!f.data("supports-inline-add"),o=!!f.data("has-add-template");if(m&&(l=m.getId()),b.fn.dialog.closeAll(),o)if(n)ConcreteEvent.fire("EditModeBlockAddInline",{selected:a,area:a.getArea(),cID:h,arEnableGridContainer:k,btID:g,dragAreaBlockID:l});else{var p="";if(c=i.getCustomTemplates())for(d in c)p+="&arCustomTemplates["+d+"]="+c[d];b.fn.dialog.open({onOpen:function(){b(function(){var c=b('<div style="display:none" />');a.getElem().after(c),b("#ccm-block-form").concreteAjaxBlockForm({task:"add",dragAreaBlockID:l,dragArea:a,placeholder:c})})},onDestroy:function(){var a=ConcretePanelManager.getByIdentifier("add-block");a&&a.pinned()&&a.show()},width:parseInt(f.data("dialog-width"),10),height:parseInt(f.data("dialog-height"),10)+20,title:f.data("dialog-title"),href:CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block?cID="+h+"&btID="+g+"&arHandle="+encodeURIComponent(j)+p})}else{var q={cID:h,arHandle:j,btID:g,mode:"edit",processBlock:1,add:1,ccm_token:CCM_SECURITY_TOKEN,arCustomTemplates:i.getCustomTemplates(),dragAreaBlockID:l};if(c=i.getCustomTemplates())for(d in c)q[q.length]={name:"arCustomTemplates["+d+"]",value:c[d]};b.getJSON(CCM_DISPATCHER_FILENAME+"/ccm/system/dialogs/page/add_block/submit",q,function(a){b.fn.dialog.showLoader(),ConcreteToolbar.disableDirectExit(),b.get(CCM_DISPATCHER_FILENAME+"/ccm/system/block/render",{arHandle:i.getHandle(),cID:h,bID:a.bID,arEnableGridContainer:k},function(a){m?m.getContainer().after(a):i.getBlockContainer().prepend(a),b.fn.dialog.hideLoader(),_.defer(function(){e.getEditMode().scanBlocks()});var c=ConcretePanelManager.getByIdentifier("add-block");c&&c.pinned()&&c.show()})})}}})}(window,jQuery),function(a,b){"use strict";var c=Concrete.Stack=function(a,b,c){this.init.apply(this,_(arguments).toArray())};c.prototype=_.extend(Object.create(Concrete.BlockType.prototype),{removeElement:function(){this.getElem().remove()},addToDragArea:function(a){var c=this,d=c.getElem(),e=a.getArea(),f=e.getHandle(),g=0,h=a.getBlock();h&&(g=h.getId()),b.fn.dialog.closeAll();var i={cID:d.data("cid"),arHandle:f,stID:d.data("sid"),atask:"add_stack",ccm_token:CCM_SECURITY_TOKEN};g&&(i.dragAreaBlockID=g),b.fn.dialog.showLoader(),b.getJSON(CCM_DISPATCHER_FILENAME,i,function(a){c.handleAddResponse(a,e,h)})},showSuccessfulAdd:function(){ConcreteAlert.notify({message:ccmi18n.addBlockStackMsg,title:ccmi18n.addBlockStack})}})}(window,jQuery),function(a,b){"use strict";var c=Concrete.DuplicateBlock=function(a,b,c){this.init.apply(this,_.toArray(arguments))};c.prototype=_.extend(Object.create(Concrete.BlockType.prototype),{init:function(a,b,c){var d=this;Concrete.BlockType.prototype.init.call(d,a,b,a.find(".block-content"),c)},handleDefaultArea:function(){var a=this;b.pep.unbind(a.getPeper()),a.getPeper().click(function(b){return a.handleClick(),!1}).css({cursor:"pointer"}).children(".block-name").css({cursor:"pointer"})},removeElement:function(){this.getElem().remove()},addToDragArea:function(a){var c=this,d=c.getElem(),e=d.data("btid"),f=a.getArea(),g=f.getHandle(),h=0,i=d.data("cid"),j=a.getBlock(),k=d.data("pcid");j&&(h=j.getId()),ConcretePanelManager.exitPanelMode(),b.fn.dialog.closeAll(),b.fn.dialog.showLoader();var l={cID:i,arHandle:g,btID:e,mode:"edit",processBlock:1,add:1,btask:"al
7ias_existing_block",pcID:[k],ccm_token:CCM_SECURITY_TOKEN};h&&(l.dragAreaBlockID=h),b.getJSON(CCM_DISPATCHER_FILENAME,l,function(a){c.handleAddResponse(a,f,j,function(){ConcreteEvent.fire("EditModeAddClipboardComplete",{block:c})})})}})}(window,jQuery),function(a,b){"use strict";var c=Concrete.StackBlock=function(a,b,c,d){this.init.apply(this,_.toArray(arguments))};c.prototype=_.extend(Object.create(Concrete.BlockType.prototype),{init:function(a,b,c,d,e){Concrete.BlockType.prototype.init.call(this,a,c,d,e),this.setAttr("stack",b)},removeElement:function(){b.pep.unbind(this.getPeper())},addToDragArea:function(a){var c=this,d=c.getElem(),e=d.data("btid"),f=a.getArea(),g=f.getHandle(),h=0,i=a.getBlock();i&&(h=i.getId()),ConcretePanelManager.exitPanelMode();var j={cID:CCM_CID,bID:d.data("block-id"),arHandle:g,btID:e,mode:"edit",processBlock:1,add:1,btask:"alias_existing_block",pcID:[d.data("cID")],ccm_token:CCM_SECURITY_TOKEN};h&&(j.dragAreaBlockID=h),b.getJSON(CCM_DISPATCHER_FILENAME,j,function(a){c.handleAddResponse(a,f,i)})}})}(window,jQuery),function(a,b){"use strict";function c(a,c){var d=this;c=b.extend({},c||{}),ConcreteMenu.call(d,a,c)}c.prototype=Object.create(ConcreteMenu.prototype),c.prototype.setupMenuOptions=function(a){var c=this,d=ConcreteMenu.prototype,e=c.$element.closest("tr").data("collection-id");d.setupMenuOptions(a);var f=a.find("a[data-action=rename]");f.attr("href",f.data("href-template").replace("__folderID__",e)),a.find("a[data-action=delete]").on("click",function(){return b("#ccm-dialog-delete-stackfolder").find("input[name=stackfolderID]").val(e).end().dialog({modal:!0,width:320,height:"auto",resizable:!1}),!1})},b.fn.concreteStackMenu=function(a){return b.each(b(this),function(d,e){new c(b(this),a)})},a.ConcreteStackMenu=c}(this,jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.