Hueman Addons - Version 2.2.7

Version Description

Fixes LinkedIn sharre icon not displayed because of a javascript error.

=

Download this release

Release Info

Developer nikeo
Plugin Icon 128x128 Hueman Addons
Version 2.2.7
Comparing to
See all releases

Code changes from version 2.2.6 to 2.2.7

addons/assets/front/js/jQuerySharrre.js CHANGED
@@ -45,7 +45,8 @@ var SharrrePlatform = SharrrePlatform || (function () {
45
  return {
46
  settings: defaultSettings,
47
  url: function (test) {
48
- return "https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?";
 
49
  },
50
  trackingAction: {site: 'linkedin', action: 'share'},
51
  load: function (self) {
45
  return {
46
  settings: defaultSettings,
47
  url: function (test) {
48
+ return '';
49
+ //return "https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?";
50
  },
51
  trackingAction: {site: 'linkedin', action: 'share'},
52
  load: function (self) {
addons/assets/front/js/jQuerySharrre.min.js CHANGED
@@ -1 +1 @@
1
- var SharrrePlatform=SharrrePlatform||function(){var t={};return{register:function(e,n){t[e]=n},get:function(e,n){return t[e]?new t[e](n):(console.error("Sharrre - No platform found for "+e),!1)}}}();!function(t,e){void 0!==t&&(e.register("linkedin",function(e){return defaultSettings={url:"",urlCount:!1,counter:"",count:!0,popup:{width:550,height:550}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://www.linkedin.com/countserv/count/share?format=jsonp&url={url}&callback=?"},trackingAction:{site:"linkedin",action:"share"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button linkedin"><script type="IN/share" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-counter="'+n.counter+'"><\/script></div>');var i=0;void 0===window.IN&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.linkedin.com/in.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):void 0!==window.IN&&window.IN.parse&&IN.parse(document)},tracking:function(){},popup:function(t){window.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&token=&isFramed=true","linkedin","toolbar=no, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("facebook",function(e){return defaultSettings={url:"",urlCount:!1,action:"like",layout:"button_count",count:!0,width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US",share:"",appId:"",popup:{width:900,height:500}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://graph.facebook.com/?id={url}&callback=?"},trackingAction:{site:"facebook",action:"like"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(""!==n.url?n.url:e.options.url)+'" data-send="'+n.send+'" data-layout="'+n.layout+'" data-width="'+n.width+'" data-show-faces="'+n.faces+'" data-action="'+n.action+'" data-colorscheme="'+n.colorscheme+'" data-font="'+n.font+'" data-via="'+n.via+'" data-share="'+n.share+'"></div></div>');var i,o,s,r,a=0;"undefined"==typeof FB&&0===a?(a=1,i=document,o="facebook-jssdk",r=i.getElementsByTagName("script")[0],i.getElementById(o)||((s=i.createElement("script")).id=o,s.src="https://connect.facebook.net/"+n.lang+"/all.js#xfbml=1",n.appId&&(s.src+="&appId="+n.appId),r.parentNode.insertBefore(s,r))):FB.XFBML.parse()},tracking:function(){fb=window.setInterval(function(){"undefined"!=typeof FB&&"undefined"!=typeof _gaq&&(FB.Event.subscribe("edge.create",function(t){_gaq.push(["_trackSocial","facebook","like",t])}),FB.Event.subscribe("edge.remove",function(t){_gaq.push(["_trackSocial","facebook","unlike",t])}),FB.Event.subscribe("message.send",function(t){_gaq.push(["_trackSocial","facebook","send",t])}),clearInterval(fb))},1e3)},popup:function(t){window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&t="+t.text,"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("pinterest",function(e){return defaultSettings={url:"",media:"",description:"",layout:"horizontal",popup:{width:700,height:300}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},trackingAction:{site:"pinterest",action:"pin"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button pinterest"><a href="https://www.pinterest.com/pin/create/button/?url='+(""!==n.url?n.url:e.options.url)+"&media="+n.media+"&description="+n.description+'" data-pin-do="buttonBookmark" count-layout="'+n.layout+'">Pin It</a></div>'),function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://assets.pinterest.com/js/pinit.js",t.setAttribute("data-pin-build","parsePinBtns");var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(),window.parsePinBtns&&window.parsePinBtns(),t(e.element).find(".pinterest").on("click",function(){e.openPopup("pinterest")})},tracking:function(){},popup:function(t){window.open("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&media="+encodeURIComponent(this.settings.media)+"&description="+this.settings.description,"pinterest","toolbar=no,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitter",function(e){return defaultSettings={url:"",urlCount:!1,count:!1,hashtags:"",via:"",related:"",lang:"en",popup:{width:650,height:360}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"tweet"},url:function(t){return"http://opensharecount.com/count.json?url={url}"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-count="'+n.count+'" data-text="'+e.options.text+'" data-via="'+n.via+'" data-hashtags="'+n.hashtags+'" data-related="'+n.related+'" data-lang="'+n.lang+'">Tweet</a></div>');var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){tw=window.setInterval(function(){"undefined"!=typeof twttr&&(twttr.events.bind("tweet",function(t){t&&"undefined"!=typeof _gaq&&_gaq.push(["_trackSocial","twitter","tweet"])}),clearInterval(tw))},1e3)},popup:function(t){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(t.text)+"&url="+encodeURIComponent(""!==this.settings.url?this.setting.url:t.url)+(""!==this.settings.via?"&via="+this.settings.via:""),"","toolbar=0, status=0,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitterFollow",function(e){return defaultSettings={url:"",urlCount:!1,count:!0,display:"horizontal",lang:"en",popup:{width:650,height:360},user:"",size:"default",showCount:"false"},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"follow"},url:function(t){return""},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitterFollow"><a href="https://twitter.com/'+n.user+'" class="twitter-follow-button"" data-size="'+n.size+'" data-show-count="'+n.showCount+'" data-lang="'+n.lang+'">Follow @'+n.user+"</a></div>");var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){},popup:function(t){window.open("https://twitter.com/intent/follow?screen_name="+encodeURIComponent(this.settings.user),"","toolbar=0, status=0, ,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}))}(window.jQuery,SharrrePlatform),function(t,e,n,i){var o="sharrre",s={className:"sharrre",share:{},shareTotal:0,template:"",title:"",url:n.location.href,text:n.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:!0,enableHover:!0,enableCounter:!0,enableTracking:!1,defaultUrl:"javascript:void(0);",popup:{width:900,height:500},hover:function(){},hide:function(){},click:function(){},render:function(){}};function r(e,n){this.element=e,this.options=t.extend(!0,{},s,n),this.options.share=n.share,this._defaults=s,this._name=o,this.platforms={},this.init()}r.prototype.init=function(){var e=this;t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t]=SharrrePlatform.get(t,e.options.buttons[t]))}),t(this.element).addClass(this.options.className),void 0!==t(this.element).data("title")&&(this.options.title=t(this.element).attr("data-title")),void 0!==t(this.element).data("url")&&(this.options.url=t(this.element).data("url")),void 0!==t(this.element).data("text")&&(this.options.text=t(this.element).data("text")),t.each(this.options.share,function(t,n){!0===n&&e.options.shareTotal++}),!0===e.options.enableCounter?t.each(this.options.share,function(t,n){if(!0===n)try{e.getSocialJson(t)}catch(t){}}):""!==e.options.template&&(e.renderer(),e.options.count[name]=0,e.rendererPerso()),""!==e.options.template?this.options.render(this,this.options):this.loadButtons(),t(this.element).on("mouseenter",function(){0===t(this).find(".buttons").length&&!0===e.options.enableHover&&e.loadButtons(),e.options.hover(e,e.options)}).on("mouseleave",function(){e.options.hide(e,e.options)}),t(this.element).click(function(t){return t.preventDefault(),e.options.click(e,e.options),!1})},r.prototype.loadButtons=function(){var e=this;t(this.element).append('<div class="buttons"></div>'),t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t].load(e),!0===e.options.enableTracking&&e.platforms[t].tracking())})},r.prototype.getSocialJson=function(e){var n=this,i=0,o=n.platforms[e].settings,s=n.platforms[e].url(this.options.urlCurl),r=encodeURIComponent(this.options.url);o.url.length&&(s=o.url),!0===o.urlCount&&""!==s&&(r=s),!1===o.count&&(s=""),url=s.replace("{url}",r),"twitter"==e&&(s=n.platforms[e].url()),""!==url?t.getJSON(url,function(t){if(void 0!==t.count){var o=t.count+"";o=o.replace(" ",""),i+=parseInt(o,10)}else void 0!==t.share&&void 0!==t.share.share_count?i+=parseInt(t.share.share_count,10):void 0!==t[0]?i+=parseInt(t[0].total_posts,10):t[0];n.options.count[e]=i,n.options.total+=i,n.renderer(),n.rendererPerso()}).error(function(){n.options.count[e]=0,n.rendererPerso()}):(n.renderer(),n.options.count[e]=0,n.rendererPerso())},r.prototype.rendererPerso=function(){var t=0;for(var e in this.options.count)t++;t===this.options.shareTotal&&this.options.render(this,this.options)},r.prototype.renderer=function(){var e=this.options.total,n=this.options.template;!0===this.options.shorterTotal&&(e=this.shorterTotal(e)),""!==n?(n=n.replace("{total}",e),t(this.element).html(n)):t(this.element).html('<div class="box"><a class="count" href="'+this.options.defaultUrl+'">'+e+"</a>"+(""!==this.options.title?'<a class="share" href="'+this.options.defaultUrl+'">'+this.options.title+"</a>":"")+"</div>")},r.prototype.shorterTotal=function(t){return t>=1e6?t=(t/1e6).toFixed(2)+"M":t>=1e3&&(t=(t/1e3).toFixed(1)+"k"),t},r.prototype.openPopup=function(t){this.platforms[t].popup(this.options),!0===this.options.enableTracking&&"undefined"!=typeof _gaq&&(infos=this.platforms[t].trackingAction,_gaq.push(["_trackSocial",infos.site,infos.action]))},r.prototype.simulateClick=function(){var e=t(this.element).html();t(this.element).html(e.replace(this.options.total,this.options.total+1))},r.prototype.update=function(t,e){""!==t&&(this.options.url=t),""!==e&&(this.options.text=e)},t.fn[o]=function(e){var n=arguments;return void 0===e||"object"==typeof e?this.each(function(){t(this).data("plugin_"+o)||t(this).data("plugin_"+o,new r(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?this.each(function(){var i=t(this).data("plugin_"+o);i instanceof r&&"function"==typeof i[e]&&i[e].apply(i,Array.prototype.slice.call(n,1))}):void 0}}(window.jQuery||window.Zepto,window,document);
1
+ var SharrrePlatform=SharrrePlatform||function(){var t={};return{register:function(e,n){t[e]=n},get:function(e,n){return t[e]?new t[e](n):(console.error("Sharrre - No platform found for "+e),!1)}}}();!function(t,e){void 0!==t&&(e.register("linkedin",function(e){return defaultSettings={url:"",urlCount:!1,counter:"",count:!0,popup:{width:550,height:550}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return""},trackingAction:{site:"linkedin",action:"share"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button linkedin"><script type="IN/share" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-counter="'+n.counter+'"><\/script></div>');var i=0;void 0===window.IN&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.linkedin.com/in.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):void 0!==window.IN&&window.IN.parse&&IN.parse(document)},tracking:function(){},popup:function(t){window.open("https://www.linkedin.com/cws/share?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&token=&isFramed=true","linkedin","toolbar=no, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("facebook",function(e){return defaultSettings={url:"",urlCount:!1,action:"like",layout:"button_count",count:!0,width:"",send:"false",faces:"false",colorscheme:"",font:"",lang:"en_US",share:"",appId:"",popup:{width:900,height:500}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://graph.facebook.com/?id={url}&callback=?"},trackingAction:{site:"facebook",action:"like"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button facebook"><div id="fb-root"></div><div class="fb-like" data-href="'+(""!==n.url?n.url:e.options.url)+'" data-send="'+n.send+'" data-layout="'+n.layout+'" data-width="'+n.width+'" data-show-faces="'+n.faces+'" data-action="'+n.action+'" data-colorscheme="'+n.colorscheme+'" data-font="'+n.font+'" data-via="'+n.via+'" data-share="'+n.share+'"></div></div>');var i,o,s,r,a=0;"undefined"==typeof FB&&0===a?(a=1,i=document,o="facebook-jssdk",r=i.getElementsByTagName("script")[0],i.getElementById(o)||((s=i.createElement("script")).id=o,s.src="https://connect.facebook.net/"+n.lang+"/all.js#xfbml=1",n.appId&&(s.src+="&appId="+n.appId),r.parentNode.insertBefore(s,r))):FB.XFBML.parse()},tracking:function(){fb=window.setInterval(function(){"undefined"!=typeof FB&&"undefined"!=typeof _gaq&&(FB.Event.subscribe("edge.create",function(t){_gaq.push(["_trackSocial","facebook","like",t])}),FB.Event.subscribe("edge.remove",function(t){_gaq.push(["_trackSocial","facebook","unlike",t])}),FB.Event.subscribe("message.send",function(t){_gaq.push(["_trackSocial","facebook","send",t])}),clearInterval(fb))},1e3)},popup:function(t){window.open("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&t="+t.text,"","toolbar=0, status=0, width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("pinterest",function(e){return defaultSettings={url:"",media:"",description:"",layout:"horizontal",popup:{width:700,height:300}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,url:function(t){return"https://api.pinterest.com/v1/urls/count.json?url={url}&callback=?"},trackingAction:{site:"pinterest",action:"pin"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button pinterest"><a href="https://www.pinterest.com/pin/create/button/?url='+(""!==n.url?n.url:e.options.url)+"&media="+n.media+"&description="+n.description+'" data-pin-do="buttonBookmark" count-layout="'+n.layout+'">Pin It</a></div>'),function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://assets.pinterest.com/js/pinit.js",t.setAttribute("data-pin-build","parsePinBtns");var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}(),window.parsePinBtns&&window.parsePinBtns(),t(e.element).find(".pinterest").on("click",function(){e.openPopup("pinterest")})},tracking:function(){},popup:function(t){window.open("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(""!==this.settings.url?this.settings.url:t.url)+"&media="+encodeURIComponent(this.settings.media)+"&description="+this.settings.description,"pinterest","toolbar=no,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitter",function(e){return defaultSettings={url:"",urlCount:!1,count:!1,hashtags:"",via:"",related:"",lang:"en",popup:{width:650,height:360}},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"tweet"},url:function(t){return"http://opensharecount.com/count.json?url={url}"},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="'+(""!==n.url?n.url:e.options.url)+'" data-count="'+n.count+'" data-text="'+e.options.text+'" data-via="'+n.via+'" data-hashtags="'+n.hashtags+'" data-related="'+n.related+'" data-lang="'+n.lang+'">Tweet</a></div>');var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){tw=window.setInterval(function(){"undefined"!=typeof twttr&&(twttr.events.bind("tweet",function(t){t&&"undefined"!=typeof _gaq&&_gaq.push(["_trackSocial","twitter","tweet"])}),clearInterval(tw))},1e3)},popup:function(t){window.open("https://twitter.com/intent/tweet?text="+encodeURIComponent(t.text)+"&url="+encodeURIComponent(""!==this.settings.url?this.setting.url:t.url)+(""!==this.settings.via?"&via="+this.settings.via:""),"","toolbar=0, status=0,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}),e.register("twitterFollow",function(e){return defaultSettings={url:"",urlCount:!1,count:!0,display:"horizontal",lang:"en",popup:{width:650,height:360},user:"",size:"default",showCount:"false"},defaultSettings=t.extend(!0,{},defaultSettings,e),{settings:defaultSettings,trackingAction:{site:"twitter",action:"follow"},url:function(t){return""},load:function(e){var n=this.settings;t(e.element).find(".buttons").append('<div class="button twitterFollow"><a href="https://twitter.com/'+n.user+'" class="twitter-follow-button"" data-size="'+n.size+'" data-show-count="'+n.showCount+'" data-lang="'+n.lang+'">Follow @'+n.user+"</a></div>");var i=0;"undefined"==typeof twttr&&0===i?(i=1,function(){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src="https://platform.twitter.com/widgets.js";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()):t.ajax({url:"https://platform.twitter.com/widgets.js",dataType:"script",cache:!0})},tracking:function(){},popup:function(t){window.open("https://twitter.com/intent/follow?screen_name="+encodeURIComponent(this.settings.user),"","toolbar=0, status=0, ,width="+this.settings.popup.width+", height="+this.settings.popup.height)}}}))}(window.jQuery,SharrrePlatform),function(t,e,n,i){var o="sharrre",s={className:"sharrre",share:{},shareTotal:0,template:"",title:"",url:n.location.href,text:n.title,urlCurl:"sharrre.php",count:{},total:0,shorterTotal:!0,enableHover:!0,enableCounter:!0,enableTracking:!1,defaultUrl:"javascript:void(0);",popup:{width:900,height:500},hover:function(){},hide:function(){},click:function(){},render:function(){}};function r(e,n){this.element=e,this.options=t.extend(!0,{},s,n),this.options.share=n.share,this._defaults=s,this._name=o,this.platforms={},this.init()}r.prototype.init=function(){var e=this;t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t]=SharrrePlatform.get(t,e.options.buttons[t]))}),t(this.element).addClass(this.options.className),void 0!==t(this.element).data("title")&&(this.options.title=t(this.element).attr("data-title")),void 0!==t(this.element).data("url")&&(this.options.url=t(this.element).data("url")),void 0!==t(this.element).data("text")&&(this.options.text=t(this.element).data("text")),t.each(this.options.share,function(t,n){!0===n&&e.options.shareTotal++}),!0===e.options.enableCounter?t.each(this.options.share,function(t,n){if(!0===n)try{e.getSocialJson(t)}catch(t){}}):""!==e.options.template&&(e.renderer(),e.options.count[name]=0,e.rendererPerso()),""!==e.options.template?this.options.render(this,this.options):this.loadButtons(),t(this.element).on("mouseenter",function(){0===t(this).find(".buttons").length&&!0===e.options.enableHover&&e.loadButtons(),e.options.hover(e,e.options)}).on("mouseleave",function(){e.options.hide(e,e.options)}),t(this.element).click(function(t){return t.preventDefault(),e.options.click(e,e.options),!1})},r.prototype.loadButtons=function(){var e=this;t(this.element).append('<div class="buttons"></div>'),t.each(e.options.share,function(t,n){!0===n&&(e.platforms[t].load(e),!0===e.options.enableTracking&&e.platforms[t].tracking())})},r.prototype.getSocialJson=function(e){var n=this,i=0,o=n.platforms[e].settings,s=n.platforms[e].url(this.options.urlCurl),r=encodeURIComponent(this.options.url);o.url.length&&(s=o.url),!0===o.urlCount&&""!==s&&(r=s),!1===o.count&&(s=""),url=s.replace("{url}",r),"twitter"==e&&(s=n.platforms[e].url()),""!==url?t.getJSON(url,function(t){if(void 0!==t.count){var o=t.count+"";o=o.replace(" ",""),i+=parseInt(o,10)}else void 0!==t.share&&void 0!==t.share.share_count?i+=parseInt(t.share.share_count,10):void 0!==t[0]?i+=parseInt(t[0].total_posts,10):t[0];n.options.count[e]=i,n.options.total+=i,n.renderer(),n.rendererPerso()}).error(function(){n.options.count[e]=0,n.rendererPerso()}):(n.renderer(),n.options.count[e]=0,n.rendererPerso())},r.prototype.rendererPerso=function(){var t=0;for(var e in this.options.count)t++;t===this.options.shareTotal&&this.options.render(this,this.options)},r.prototype.renderer=function(){var e=this.options.total,n=this.options.template;!0===this.options.shorterTotal&&(e=this.shorterTotal(e)),""!==n?(n=n.replace("{total}",e),t(this.element).html(n)):t(this.element).html('<div class="box"><a class="count" href="'+this.options.defaultUrl+'">'+e+"</a>"+(""!==this.options.title?'<a class="share" href="'+this.options.defaultUrl+'">'+this.options.title+"</a>":"")+"</div>")},r.prototype.shorterTotal=function(t){return t>=1e6?t=(t/1e6).toFixed(2)+"M":t>=1e3&&(t=(t/1e3).toFixed(1)+"k"),t},r.prototype.openPopup=function(t){this.platforms[t].popup(this.options),!0===this.options.enableTracking&&"undefined"!=typeof _gaq&&(infos=this.platforms[t].trackingAction,_gaq.push(["_trackSocial",infos.site,infos.action]))},r.prototype.simulateClick=function(){var e=t(this.element).html();t(this.element).html(e.replace(this.options.total,this.options.total+1))},r.prototype.update=function(t,e){""!==t&&(this.options.url=t),""!==e&&(this.options.text=e)},t.fn[o]=function(e){var n=arguments;return void 0===e||"object"==typeof e?this.each(function(){t(this).data("plugin_"+o)||t(this).data("plugin_"+o,new r(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?this.each(function(){var i=t(this).data("plugin_"+o);i instanceof r&&"function"==typeof i[e]&&i[e].apply(i,Array.prototype.slice.call(n,1))}):void 0}}(window.jQuery||window.Zepto,window,document);
addons/sharrre/ha-sharrre.php CHANGED
@@ -72,7 +72,7 @@ class HA_Sharrre {
72
  if ( is_singular() ) {
73
  wp_enqueue_script(
74
  'sharrre',
75
- sprintf( '%1$saddons/assets/front/js/jQuerySharrre%2$s', HU_AD() -> ha_get_base_url(), (defined('CZR_DEV') && true === CZR_DEV) ? '.js' : '.min.js' ),
76
  array( 'jquery' ),
77
  '',
78
  true
72
  if ( is_singular() ) {
73
  wp_enqueue_script(
74
  'sharrre',
75
+ sprintf( '%1$saddons/assets/front/js/jQuerySharrre%2$s', HU_AD() -> ha_get_base_url(), (defined('CZR_DEV') && true === CZR_DEV) ? '.js?' . time() : '.min.js' ),
76
  array( 'jquery' ),
77
  '',
78
  true
ha-fire.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Hueman Addons
4
  * Plugin URI: https://presscustomizr.com
5
  * Description: Hueman Theme Addons
6
- * Version: 2.2.6
7
  * Text Domain: hueman-addons
8
  * Author: Press Customizr
9
  * Author URI: https://presscustomizr.com
3
  * Plugin Name: Hueman Addons
4
  * Plugin URI: https://presscustomizr.com
5
  * Description: Hueman Theme Addons
6
+ * Version: 2.2.7
7
  * Text Domain: hueman-addons
8
  * Author: Press Customizr
9
  * Author URI: https://presscustomizr.com
inc/czr-base-fmk/assets/css/czr-ccat-control-base.css CHANGED
@@ -370,6 +370,7 @@ input:-ms-input-placeholder {
370
 
371
  .customize-control select {
372
  cursor: pointer;
 
373
  }
374
 
375
 
@@ -975,7 +976,7 @@ li.customize-control[data-module] .czr-notice {
975
  display: block;
976
  float: left;
977
  margin: 2% 2% 0%;
978
- width: 99%;
979
  padding: 2%;
980
  background: #fff;
981
  /* color: #fff;*/
@@ -1023,7 +1024,7 @@ li.customize-control[data-module] .czr-notice {
1023
  /* Display a thin outline around opened item, for multi-items modules */
1024
  #customize-theme-controls .czr-single-item.open {
1025
  /*border: 1px solid #dedede;*/
1026
- outline: 1px solid #ccc;
1027
  }
1028
  /* Keep the normal border for single module, mono items controls */
1029
  #customize-theme-controls .mono-item-mod .czr-single-item {
370
 
371
  .customize-control select {
372
  cursor: pointer;
373
+ width: 99%;
374
  }
375
 
376
 
976
  display: block;
977
  float: left;
978
  margin: 2% 2% 0%;
979
+ width: 98%;
980
  padding: 2%;
981
  background: #fff;
982
  /* color: #fff;*/
1024
  /* Display a thin outline around opened item, for multi-items modules */
1025
  #customize-theme-controls .czr-single-item.open {
1026
  /*border: 1px solid #dedede;*/
1027
+ outline: 1px solid #22a0d2;
1028
  }
1029
  /* Keep the normal border for single module, mono items controls */
1030
  #customize-theme-controls .mono-item-mod .czr-single-item {
inc/czr-base-fmk/assets/css/czr-ccat-control-base.min.css CHANGED
@@ -1 +1 @@
1
- .wp-customizer a{color:#000}.wp-customizer a:focus,.wp-customizer a:hover{color:#0073aa}.wp-customizer .wp-full-overlay.expanded{margin-left:440px}.wp-customizer .wp-full-overlay-sidebar{width:440px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-440px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-440px}.accordion-sub-container.control-panel-content{left:440px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:440px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:440px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-440px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-440px}.rtl .accordion-sub-container.control-panel-content{right:440px}.customize-section-description-container+#customize-control-custom_css:last-child{margin:0;width:100%}li#customize-control-custom_css textarea{font-size:13px;background:#394143;color:#95ff0c;min-height:300px}@media screen and (max-width:1400px){.wp-customizer .wp-full-overlay.expanded{margin-left:380px}.wp-customizer .wp-full-overlay-sidebar{width:380px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-380px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-380px}.accordion-sub-container.control-panel-content{left:380px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:380px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:380px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-380px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-380px}.rtl .accordion-sub-container.control-panel-content{right:380px}}@media screen and (max-width:979px){.wp-customizer .wp-full-overlay.expanded{margin-left:300px}.wp-customizer .wp-full-overlay-sidebar{width:300px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-300px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-300px}.accordion-sub-container.control-panel-content{left:300px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:300px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:300px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-300px}.rtl .accordion-sub-container.control-panel-content{right:300px}}@media screen and (max-width:640px){.wp-customizer .customize-controls-preview-toggle{height:46px;border-bottom:1px solid #ddd;left:87px}.wp-customizer .wp-full-overlay.expanded{margin-left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-100%}.accordion-sub-container.control-panel-content{left:100%}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title,.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}.rtl .accordion-sub-container.control-panel-content{right:100%}}.wp-customizer .control-section.control-panel .accordion-section-title .panel-title{font-size:24px;font-weight:inherit;line-height:30px}.wp-core-ui h3{color:#555}.accordion-section-content{padding:10px 10px 15px 20px}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action{color:#00a0d2}.control-section.control-panel>.accordion-section-title:after{color:#00a0d2}.customize-control-title{line-height:19px;font-family:Roboto;font-weight:400}.customize-control span.customize-control-title:first-child{position:relative;padding:10px 0 5px}.wp-customizer #customize-theme-controls .accordion-section-content{background:#fff}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus,.wp-customizer #customize-controls .customize-info .customize-help-toggle:hover,.wp-customizer #customize-controls .customize-info.open .customize-help-toggle{color:#00a0d2}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus:before,.wp-customizer .customize-screen-options-toggle:focus:before{-webkit-box-shadow:0 0 0 1px #00a0d2;box-shadow:0 0 0 1px #00a0d2;-webkit-border-radius:100%;border-radius:100%}.wp-customizer #available-menu-items .menu-item-handle:hover .item-add,.wp-customizer .menu-item-handle:hover,.wp-customizer .menu-item-handle:hover .item-edit,.wp-customizer .menu-item-handle:hover .item-type{color:#00a0d2}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#00a0d2!important}.customize-control input[type=text]{line-height:23px}#customize-outer-theme-controls li[id*=customize-control-]{width:100%}#customize-outer-theme-controls input[type=checkbox],#customize-outer-theme-controls input[type=radio]{float:none;min-height:inherit}.control-section .accordion-section-content{overflow-y:auto}.wp-customizer .control-section h3.accordion-section-title{padding:10px 25px 11px 14px}.wp-customizer #customize-controls h3{font-size:15px;font-weight:400}.control-section .accordion-section-title:after{top:7px}.control-section.control-panel .accordion-section-title:after{top:11px;-webkit-transition:right .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:right .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:right .3s ease-in-out,opacity .3s ease-in-out;-o-transition:right .3s ease-in-out,opacity .3s ease-in-out;transition:right .3s ease-in-out,opacity .3s ease-in-out;right:10px;opacity:.7}.rtl .control-section.control-panel .accordion-section-title:after{-webkit-transition:left .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:left .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:left .3s ease-in-out,opacity .3s ease-in-out;-o-transition:left .3s ease-in-out,opacity .3s ease-in-out;transition:left .3s ease-in-out,opacity .3s ease-in-out;left:10px;right:initial}#customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{right:8px;opacity:1;color:#666!important}.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{left:6px;right:initial}#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:hover:after,.control-section.control-panel>.accordion-section-title:after{background:0 0!important;border:none!important}#customize-theme-controls h3.accordion-section-title{-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:16px;margin-left:0}input::-webkit-input-placeholder{color:#9a9a9a;font-style:italic}input:-moz-placeholder{color:#9a9a9a;font-style:italic}input::-moz-placeholder{color:#9a9a9a;font-style:italic}input:-ms-input-placeholder{color:#9a9a9a;font-style:italic}.customize-control select{cursor:pointer}.czr-customizr-title{text-transform:uppercase;margin:1em 0 5px 0;font-size:15px!important;border-bottom:1px dotted #555;padding-bottom:5px;text-align:center}h3.czr-customizr-title::before{content:'\00b7';padding-right:3px}h3.czr-customizr-title::after{content:'\00b7';padding-left:3px}.czr-after-button{border-color:#fff;margin-top:15px}.czr-emphasize{line-height:1.2em;color:#2e2e2e}i.czr-notice{display:block;clear:both}span.czr-notice{color:#313131;font-size:12px;font-style:italic;clear:both;display:block;line-height:18px}.czr-html-after hr,.czr-html-before hr{border-top:1px solid #c5c5c5;border-bottom:1px solid #fafafa;margin:25px 0}.czr-customizer-separator-invisible{border:none;margin-top:15px}.czr-skin-gen-label{float:left}.czr-skin-gen-color-picker{float:right}.czr-number-label{float:left}.czr-number-input{float:right}.czr-check-label{float:left;max-width:85%}.rtl .czr-check-label{float:right}input[type=checkbox],input[type=radio]{float:right;min-height:18px}.czr-font-select{float:left}li#customize-control-tc_theme_options-tc_custom_css textarea{font-size:14px;background:#394143;color:#e2e728;min-height:300px}.customize-control .czr-navigate-to-post-list{color:#00a0d2;font-weight:700;float:left;clear:both;width:100%;margin-bottom:8px}.czr-sub-control{padding-left:13%;max-width:87%;position:relative}.czr-sub-control:before{content:'';height:116%;background:#00a0d2;width:2%;position:absolute;left:7%}.customize-control-tc_cropped_image .upload-button{float:right}.customize-control-tc_cropped_image .remove-button{float:left;margin-right:3px}.customize-control-tc_cropped_image .actions{margin-bottom:32px}.customize-control-tc_cropped_image .current{margin-bottom:8px}.customize-control-tc_cropped_image .remove-button,.customize-control-tc_cropped_image .upload-button{white-space:normal;width:48%;height:auto}.customize-control-tc_cropped_image .current .container{min-height:40px;overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image .inner{line-height:20px;top:10px}.rtl .customize-control-tc_cropped_image .upload-button{float:left}.rtl .customize-control-tc_cropped_image .remove-button{float:right;margin-left:3px}.czr-layout-img{height:22px;margin-top:2px;outline:1px solid #fff}.czr-layout-title{padding:0 0 18px 12px;display:inline-block;line-height:0;vertical-align:middle}.customize-control-czr_multi_input{width:96%;border:1px solid #ccc;padding:2%}.czr-multi-input-wrapper{width:95%;padding:0 0 0 5%}.czr-multi-input-wrapper [data-input-type=color] .czr-input{float:left;clear:both}#customize-theme-controls #accordion-panel-czr-footer-panel{border-bottom:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{margin-top:10px}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-hu-header-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{border-top:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-general-panel,#customize-theme-controls #accordion-panel-tc-global-panel{margin-bottom:10px}#customize-theme-controls #accordion-section-frontpage_sec,#customize-theme-controls #accordion-section-static_front_page{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_fpu{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_font_customizer_settings{margin-bottom:10px}#customize-theme-controls #accordion-panel-__sektions__{margin-bottom:10px}#customize-header-actions .customize-controls-close{left:45px}.customize-controls-close,.customize-controls-home-or-add{top:-1px}.customize-controls-home-or-add{display:block;position:absolute;left:0;width:45px;height:41px;padding:0 2px 0 0;background:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;border-bottom:1px solid #ddd;color:#444;text-align:left;cursor:pointer;text-decoration:none;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .1s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-controls-home-or-add>.material-icons{line-height:39px;text-align:center;display:block}.customize-controls-home-or-add:before{font-size:17px;line-height:45px;position:relative;top:-4px;left:15px}.customize-controls-home-or-add:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.rtl.wp-customizer #customize-header-actions .customize-controls-close{right:45px;left:auto}.rtl.wp-customizer .customize-controls-home-or-add{left:auto;right:0;border-right:0;border-left:1px solid #ddd}.control-panel-content .hu-menu-notice{margin-left:3%}span.czr-panel-subtitle{display:block;font-size:12px;font-style:italic}.pro-title-block{border:1px solid #eea236;padding:0 6px;font-size:.7em;display:inline-block;margin-right:3px;bottom:2px;position:relative;color:#f0ad4e;webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:focus,#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:hover{background-color:#fff}#customize-theme-controls .control-section-czr-customize-section-pro .accordion-section-title:after{content:none}#accordion-section-go_pro_sec .accordion-section-title{margin:0 0 15px}.control-section-czr-customize-section-pro .accordion-section-title .button{font-size:15px;line-height:24px;height:30px;padding:1px 20px;display:inline-block;color:#f59000;background:#fff;border:1px solid #eea236;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border-radius:3px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:-4px;font-weight:400;margin-left:8px}.control-section-czr-customize-section-pro .accordion-section-title .button:hover{color:#fff;background:#ed9c28;border-color:#d58512}.rtl .control-section-czr-customize-section-pro .accordion-section-title .button{margin-left:0;margin-right:8px}@-webkit-keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.czr-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .czr-css-loader{display:block}.czr-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.czr-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.czr-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.czr-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.czr-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-450px;height:0}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-450px}@media screen and (max-width:1400px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-380px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-380px}}@media screen and (max-width:979px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-300px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-300px}}@media screen and (max-width:640px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-100%}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}}@media screen and (min-width:980px){.wp-customizer .expanded #customize-footer-actions{width:380px}}@media screen and (min-width:1401px){.wp-customizer .expanded #customize-footer-actions{width:440px}}li.customize-control[data-module] li{margin-bottom:0;font-size:.85em}li.customize-control[data-module] [class*=czr-]{font-size:.9rem}li.customize-control[data-module] [class*=czr-] .hidden{display:none}li.customize-control[data-module] .czr-notice{font-size:12px!important}.czr-open-pre-add-new{display:block;float:left;margin:2% 2% 0;width:99%;padding:2%;background:#fff;color:inherit;opacity:1;font-size:16px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}.czr-open-pre-add-new.active{background:#646464;color:#000;opacity:.8;border-radius:3px 3px 0 0}.czr-single-item{padding:0;margin:1% 0 0 2%;float:left;width:98%;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}#customize-theme-controls .czr-single-item.open{outline:1px solid #ccc}#customize-theme-controls .mono-item-mod .czr-single-item{outline:0}.czr-single-item .czr-item-content,.czr-single-item .czr-item-header{padding:1%;background:0 0}.czr-items-wrapper .czr-single-item .czr-builtin-model{background:#e1dfdf;color:#555}.czr-items-wrapper .inactive{opacity:.6}.czr-item-sort-handle{cursor:move}.czr-single-item .czr-item-header{position:relative;background:#ededed;color:#fff;float:left;width:98%;-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.czr_widget_areas_module .czr-single-item .czr-custom-model{background:#3b8dbd}. .czr-single-item .czr-custom-model:hover{background:#aaa}.czr-single-item .czr-item-header:hover{background:#ccc}.czr-items-wrapper .czr-single-item .czr-builtin-model:hover{background:#ccc}.czr-move-icon{position:absolute;top:-2px;left:3px;font-size:10px;color:#999}.czr-item-title{float:left;font-size:17px;color:#000;padding:4px;width:67%}.czr-inactive-alert{font-size:12px;font-style:italic}.czr_widget_areas_module .czr-item-title{color:#fff}.czr-builtin-model .czr-item-title{color:#23282d}.czr-item-title h4{margin:0}.czr-item-title .fab::before,.czr-item-title .far::before,.czr-item-title .fas::before{padding-right:2px}.czr-item-btns{float:right}.czr-item-btns a{font-size:17px;padding:7px 5px;color:#9e9e9e;-webkit-transition:color .25s ease-in-out;-moz-transition:color .25s ease-in-out;-ms-transition:color .25s ease-in-out;-o-transition:color .25s ease-in-out;transition:color .25s ease-in-ou}.czr-item-btns a:active,.czr-item-btns a:focus{outline:0;outline:0;-webkit-box-shadow:none;box-shadow:none}.czr-item-btns a.active,.czr-item-btns a:hover{color:#23282d}.czr_widget_areas_module .czr-item-btns a{color:#fff}.czr-builtin-model .czr-item-btns a{color:#555}.czr-builtin-model .czr-item-btns .czr-edit-view.active,.czr-builtin-model .czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-edit-view.active,.czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr_widget_areas_module .czr-edit-view:hover,.czr_widget_areas_module .czr-item-btns .czr-edit-view.active{color:#000}.czr_widget_areas_module .czr-builtin-model .czr-edit-view.active,.czr_widget_areas_module .czr-builtin-model .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-display-alert.active,.czr-item-btns .czr-display-alert:hover{color:#23282d}.czr-single-item .czr-item-content{float:left;display:none;clear:both;width:96%;padding:2%}.czr-single-item .czr-item-content input{margin-bottom:0}.czr-sub-set{margin-bottom:0;display:block;float:left;width:100%;padding:1% 0;position:relative}.czr-sub-set .czr-input{float:right;width:60%}.czr-sub-set .customize-control-title.width-100,.width-100,.width-100 .czr-input{width:100%}.czr-sub-set .customize-control-title{float:left;width:40%;padding:1px 0;font-size:13px}.customize-control-title.width-80{width:80%!important}.czr-input.width-20{width:20%!important}.rtl.wp-customizer .czr-sub-set .customize-control-title{float:right}.disabled .customize-control-title,.disabled .czr-input{opacity:.6;filter:blur(1px);-webkit-filter:blur(1px)}.czr-item-title .fab,.czr-item-title .far,.czr-item-title .fas{font-size:18px}.czr-remove-alert-wrapper{display:none;clear:both;float:left;padding:2%;width:95%;margin:10px 0;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#eee;color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.czr-remove-alert-wrapper p{padding:5px;margin:0}.czr-pre-add-wrapper{position:relative;float:left;width:100%}.czr-adding-new .czr-items-wrapper{opacity:.6}.czr-pre-add-view-content{display:none;padding:3%;border:1px solid #ccc;background:#fff;border-top:none;margin:0 0 0 2%;float:left;width:92%;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:relative;opacity:1;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.czr-model-added .czr-pre-add-view-content{opacity:.2}.czr-pre-add-wrapper .czr-add-new{background:#3b8dbd;color:#fff;-webkit-transition:background .5s linear;-moz-transition:background .5s linear;-ms-transition:background .5s linear;-o-transition:background .5s linear;transition:background .5s linear;float:right;border:none}.czr-add-success{width:100%;margin:0 0 0 2%;position:absolute;top:0;left:0;font-size:25px;text-align:center;opacity:0;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-ms-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear}.czr-model-added .czr-add-success{opacity:1}.czr-add-success p{vertical-align:middle;display:inline-block;line-height:35px;margin:0;font-size:25px;color:#82b965;padding:0 3%}.control-section-widget_zones_management{margin:10px 0;z-index:1}.czr-zone-infos{width:96%;padding:0 2%;font-size:12px;float:left;font-style:italic}.czr-unavailable-location{opacity:.7}.czr-location-alert{float:left;width:100%;padding:1% 0;margin:1% 0;text-align:center;border:1px solid orange;background:#fee5b6;color:#000;font-size:11px;font-style:italic}.czr-toggle-modopt{color:#495050;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;right:0;padding-left:3px;font-size:25px;line-height:24px}.rtl.wp-customizer .czr-toggle-modopt{left:0;right:auto;padding-left:0;padding-right:3px}.czr-modopt-visible .czr-toggle-modopt,.czr-toggle-modopt:hover{color:#3b8dbd}body.czr-editing-modopt #customize-preview{opacity:.7}body #customize-controls{-webkit-transition:opacity .4s ease-in-out;-moz-transition:opacity .4s ease-in-out;-ms-transition:opacity .4s ease-in-out;-o-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}body.czr-editing-modopt #customize-controls{opacity:.4}.czr-mod-opt-wrapper{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:999999;width:60%;min-width:300px;padding:1% 2%;color:#fff;background:rgba(0,0,0,.8);-webkit-transition:all .18s ease-in-out;-moz-transition:all .18s ease-in-out;-ms-transition:all .18s ease-in-out;-o-transition:all .18s ease-in-out;transition:all .18s ease-in-out;border-right:1px solid #4c4c4c}body.czr-editing-modopt .czr-mod-opt-wrapper{left:0;visibility:visible;opacity:1}.czr-close-modopt{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-mod-opt-wrapper .czr-sub-set{background:rgba(238,238,238,.13);padding:3% 2%;width:96%;margin:5px 0}.czr-mod-opt-wrapper .czr-notice{color:#fff}.czr-mod-opt-wrapper .mod-opt-title{color:#fff;border-bottom:1px solid #fff;padding:5% 0;text-align:center}.tabs{position:relative;display:none;overflow:hidden;margin:0 auto;width:100%;font-weight:300;font-size:1.25em}.tabs nav{text-align:center}.tabs nav ul{position:relative;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;margin:0 auto;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.tabs nav ul li{font-size:14px;position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.tabs nav ul li.cols-4{width:25%}.tabs nav ul li.cols-3{width:33%}.tabs nav ul li.cols-2{width:50%}.tabs nav ul li.cols-1{width:100%}.tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.tabs nav a span{vertical-align:middle;font-size:.75em}.tabs nav li.tab-current a{color:#74777b}.tabs nav a:focus{outline:0}li.tab-current::after,li.tab-current::before{content:'';height:100%;position:absolute;-webkit-box-shadow:4px 0 15px 0 rgba(37,37,37,.63);box-shadow:4px 0 15px 0 rgba(37,37,37,.63);top:0;width:0;right:0;z-index:4;width:100%}li.tab-current::before{left:0;-webkit-box-shadow:0 0 15px 4px rgba(37,37,37,.63);box-shadow:0 0 15px 4px rgba(37,37,37,.63)}li.tab-inactive::after{content:'';width:100%;position:absolute;height:2px;bottom:-7px;left:0;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(0,0,0,.86)}.content-wrap{position:relative}.content-wrap section{display:none;margin:0 auto;max-width:1200px}section .czr-sub-set:first-child{margin:0}.content-wrap section.content-current{display:block}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}.tabs-style-topline{max-width:1200px}.tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.czr-items-wrapper .tabs-style-topline nav li{border:none}.tabs-style-topline nav li:not(:last-child){border-right:none}.tabs-style-topline nav li.tab-current{border-top-color:#fff;border-bottom:none;background:rgba(238,238,238,.13)}.tabs-style-topline nav a{padding:.65em .5em;background:rgba(40,44,42,.05);color:#fff;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.czr-items-wrapper .tabs-style-topline nav a{background:rgba(40,44,42,.45)}.tabs-style-topline nav a:focus,.tabs-style-topline nav a:hover{text-decoration:underline}.tabs-style-topline nav li.tab-current a{background:0 0;box-shadow:inset 0 3px 0 #fff;color:#fff;text-decoration:underline}.czr-items-wrapper .tabs-style-topline nav li.tab-current a{color:#000}.tabs-style-topline .icon::before{display:block;margin:0}.tabs-style-topline nav a span{text-transform:uppercase;font-weight:700}@media screen and (max-width:58em){.tabs nav a.icon span{display:none}.tabs nav a:before{margin-right:0}}.czr_slide_module .czr-item-title{padding:0 7px;height:32px}.czr_slide_module .slide-thumb,.czr_slide_module .slide-title{display:block;height:32px;line-height:32px;float:left}.czr_slide_module .slide-title{padding-left:5px}.slide-mod-skope-notice{padding:3%;background:#fff;border-left:4px solid #00a0d2;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);float:left;font-size:12px;line-height:1.5em}.slide-mod-skope-notice .czr-skope-switch{cursor:pointer;text-decoration:underline}.modopts-top-buttons{width:100%;float:left;margin-bottom:4%;text-align:center}.item-bottom-buttons{width:100%;float:left;padding:1% 0}.item-bottom-btn,.modopt-top-btn{opacity:1;color:#fff;font-size:14px;cursor:pointer;border-width:1px;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;opacity:1}.item-bottom-btn{background:#868686;width:47%;margin-right:2%;padding:1% 0}.modopt-top-btn{background:rgba(171,171,171,.5);width:170px;padding:2px 0}.item-bottom-btn:hover{background:#5d5d5d}.modopt-top-btn:hover{background:rgba(41,41,41,.53)}.item-bottom-btn[disabled],.item-bottom-btn[disabled]:hover,.modopt-top-btn[disabled],.modopt-top-btn[disabled]:hover{opacity:.4;cursor:default;-webkit-box-shadow:none!important;box-shadow:none!important;background:inherit}.czr-notice{font-size:12px;font-weight:400}.selecter-element{position:absolute;opacity:0}.selecter{display:block;float:right;margin:2px 0;position:relative;width:100%;z-index:100}.selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat right center;border:1px solid #ccc;border-radius:3px;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:4px 4%;position:relative;text-overflow:clip;z-index:49;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:auto;line-height:18px;width:90%}.selecter .selecter-options{border:1px solid #ccc;border-width:0 1px 1px;background-color:#fefefe;border-radius:0 0 3px 3px;box-shadow:0 1px 4px rgba(0,0,0,.15);display:none;left:0;margin:0;max-height:260px;overflow:auto;overflow-x:hidden;padding:0;position:relative;top:100%;width:99%;z-index:50}.selecter .selecter-group{background:#f9f9f9;border-bottom:1px solid #e3e3e3;color:#999;display:block;font-size:11px;padding:5px 6px 4px;text-transform:uppercase}.selecter .selecter-item{background:#fff;border-bottom:1px solid #e3e3e3;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:8px 10px;text-overflow:ellipsis;width:86%;height:auto;line-height:14px;padding:8px 24px 8px 10px}.selecter .selecter-item.selected{background:#f9f9f9}.selecter .selecter-item.disabled{color:#999;cursor:default}.selecter .selecter-item:first-child{border-radius:0}.selecter .selecter-item:last-child{border-radius:0 0 2px 2px;border-bottom:0}.rtl .selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat 4% center}@media screen and (min-width:980px){.selecter .selecter-item.selected:hover,.selecter .selecter-item:hover{background-color:#f3f3f3}.selecter .selecter-item.disabled:hover{background-color:#fff}.selecter:hover .selecter-selected{background-color:#fff}.selecter.disabled .selecter-item:hover{background:#fff}}.selecter.open{z-index:101}.selecter.open .selecter-selected{border-radius:3px 3px 0 0;z-index:51}.selecter.focus .selecter-selected,.selecter.open .selecter-selected{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.1)}.selecter.cover .selecter-options{border-radius:3px;border-width:1px;top:0}.selecter.cover .selecter-options .selecter-item.first{border-radius:3px 3px 0 0}.selecter.cover.open .selecter-selected{border-radius:3px 3px 0 0;z-index:49}.selecter.bottom .selecter-options{border-width:1px 1px 0;bottom:100%;top:auto}.selecter.bottom .selecter-item:last-child{border:none}.selecter.bottom.open .selecter-selected{border-radius:0 0 3px 3px}.selecter.bottom.open .selecter-options{border-radius:3px 3px 0 0}.selecter.bottom.cover .selecter-options{bottom:0;top:auto}.selecter.bottom.cover.open .selecter-selected{border-radius:3px}.selecter.bottom.cover.open .selecter-options{border-radius:3px}.selecter.multiple .selecter-options{border-radius:3px;border-width:1px;box-shadow:none;display:block;position:static;width:100%}.selecter.disabled .selecter-selected{background:#fff;border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-options{background:#fff;border-color:#eee}.selecter.disabled .selecter-group,.selecter.disabled .selecter-item{border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-item.selected{background:#fafafa}.selecter .selecter-options.scroller{overflow:hidden}.selecter .selecter-options.scroller .scroller-content{max-height:260px;padding:0}@media screen and (max-width:740px){.selecter{max-width:100%}}@media screen and (max-width:500px){.selecter{max-width:100%}}.stepper{border-radius:3px;margin:0 0 10px 0;overflow:hidden;position:relative;width:35%;float:left;clear:both}.stepper .stepper-input{background:#f9f9f9;border:1px solid #ccc;border-radius:3px;color:#333;font-size:13px;line-height:1.2;margin:0;overflow:hidden;padding:5px 10px 5px!important;width:100%!important;z-index:49;-moz-appearance:textfield;max-width:none!important}.stepper .stepper-input::-webkit-inner-spin-button,.stepper .stepper-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.stepper .stepper-input:focus{background-color:#fff}.stepper .stepper-arrow{background:#eee url(img/jquery.fs.stepper-arrows.png) no-repeat;border:1px solid #ccc;cursor:pointer;display:block;height:46%;position:absolute;right:0;text-indent:-99999px;width:20px;z-index:50}.stepper .stepper-arrow.up{background-position:center top;border-bottom:none;top:0}.stepper .stepper-arrow.down{background-position:center bottom;bottom:0}.rtl .stepper .stepper-input{text-align:left}@media screen and (min-width:740px){.stepper:hover .stepper-input{background-color:#fff}.stepper .stepper-step:hover{background-color:#f9f9f9}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}}.stepper.disabled .stepper-input{background:#fff;border-color:#eee;color:#ccc}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}.icheckbox_flat-green,.iradio_flat-green{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/green.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.rtl [class*=icheckbox_flat-]{float:left}.icheckbox_flat-green{background-position:0 0}.icheckbox_flat-green.checked{background-position:-22px 0}.icheckbox_flat-green.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-green.checked.disabled{background-position:-66px 0}.iradio_flat-green{background-position:-88px 0}.iradio_flat-green.checked{background-position:-110px 0}.iradio_flat-green.disabled{background-position:-132px 0;cursor:default}.iradio_flat-green.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-green,.iradio_flat-green{background-image:url(img/green@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.icheckbox_flat-grey,.iradio_flat-grey{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/grey.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.icheckbox_flat-grey{background-position:0 0}.icheckbox_flat-grey.checked{background-position:-22px 0}.icheckbox_flat-grey.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-grey.checked.disabled{background-position:-66px 0}.iradio_flat-grey{background-position:-88px 0}.iradio_flat-grey.checked{background-position:-110px 0}.iradio_flat-grey.disabled{background-position:-132px 0;cursor:default}.iradio_flat-grey.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-grey,.iradio_flat-grey{background-image:url(img/grey@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.czr-sub-set .icheckbox_flat-green,.iradio_flat-green{float:left}body .czrSelect2-container{z-index:1000000;width:100%!important}.customize-control-czr_layouts .czrSelect2-selection--single{height:33px}.customize-control-czr_layouts .czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__arrow{height:30px}.customize-control-czr_layouts .czrSelect2-selection--single:focus,.czrSelect2-selection__rendered:focus{outline:0}body .czrSelect2-drop{z-index:1000000}body .czrSelect2-container,span.czrSelect2-results{font-size:14px}.czrSelect2-container--default .czrSelect2-selection--multiple{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:99%;min-height:36px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.czrSelect2-container--default.czrSelect2-container--focus .czrSelect2-selection--multiple{border-color:#00a0d2!important;-webkit-box-shadow:0 0 2px rgba(26,188,156,.8)!important;box-shadow:0 0 2px rgba(26,188,156,.8)!important}.czrSelect2-results__options li{margin-bottom:0}.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice{padding:2px;font-size:13px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:0}.czrSelect2-container--default .czrSelect2-results__option--highlighted[aria-selected]{background-color:#00a0d2}.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove{font-size:17px;position:relative;top:2px;color:#23282d}.customize-control-czr_socials .czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__rendered{padding:5px;line-height:16px}#czr-customize-content_editor-pane{border-top:solid 1px #ddd;position:absolute;height:300px;bottom:-301px;right:0;left:0;z-index:20;background:#f1f1f1;display:block;-webkit-transition:all .2s;transition:all .2s;visibility:hidden}.czr-close-editor{position:absolute;cursor:pointer;right:20px;top:-33px;color:#444;background:#eee;font-size:13px;line-height:19px;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5;border-bottom:none}body.czr-customize-content_editor-pane-resize #customize-preview,body.czr-customize-content_editor-pane-resize #czr-customize-content_editor-pane{-webkit-transition:none;transition:none}body.mce-fullscreen.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{top:0}body.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{bottom:40px;visibility:inherit}#czr-customize-content_editor-pane .wp-editor-tools{padding-top:5px;padding-right:10px}#czr-customize-content_editor-pane .wp-media-buttons{padding-left:5px}#customize-preview{height:auto}body.czr-customize-content_editor-pane-open #customize-preview{bottom:300px}body.mce-fullscreen #customize-preview{bottom:0}body.mce-fullscreen.czr-customize-content_editor-pane-open div.mce-fullscreen{position:relative;left:0}#wp-czr-customize-content_editor-container{border-left:0}#czr-customize-content_editor-dragbar{top:0;cursor:row-resize;display:block;height:4px;position:absolute;width:100%;z-index:21;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}body.czr-customize-content_editor-pane-resize #customize-preview:before{top:0;right:0;bottom:0;left:0;position:absolute;height:100%;width:100%;z-index:999999}.wp-customizer .ui-autocomplete.wplink-autocomplete{z-index:500110}.wp-customizer #wp-link-wrap{z-index:500105}.wp-customizer #wp_editbtns,.wp-customizer #wp_gallerybtns{z-index:500020}.wp-customizer #TB_overlay,.wp-customizer #TB_window{z-index:500050}.wp-customizer .mce-panel,.wp-customizer .mce-tooltip{z-index:500100!important}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .collapse-sidebar{bottom:308px}.czr-customize-content_editor-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.czr-customize-content_editor-pane-resize .wp-full-overlay.collapsed .collapse-sidebar{-webkit-transition:none;transition:none}.czr-customize-content_editor-pane-open.mce-fullscreen .wp-full-overlay.collapsed .collapse-sidebar{bottom:8px!important}.czr-resize-handle{color:#33b3db;font-size:12px;position:relative;bottom:2px}.czr-sub-set[data-input-type=content_picker] .customize-control-title{width:100%}.czr-sub-set[data-input-type=content_picker] .czr-input{width:100%}.content-picker-item{height:2em}.content-picker-item .czr-picker-item-type{float:right;display:inline-block}.content-item-bar{line-height:1.2em;font-size:.9em}.content-item-bar .czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:13px;line-height:1.3em}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:2em;color:#000}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-type{display:inline-block;padding:0;padding-right:10px;float:right;line-height:2em}.czr-sub-set[data-input-type=range_slider]{padding:20px 0}.rangeslider,.rangeslider__fill{display:block;-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.rangeslider{background:#e6e6e6;position:relative}.rangeslider--horizontal{height:12px;width:100%}.rangeslider--vertical{width:12px;min-height:150px;max-height:100%}.rangeslider--disabled{opacity:.4}.rangeslider__fill{background:#3b8dbd;position:absolute}.rangeslider--horizontal .rangeslider__fill{top:0;height:100%}.rangeslider--vertical .rangeslider__fill{bottom:0;width:100%}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;display:inline-block;width:34px;height:34px;position:absolute;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(0,0,0,.1)));background-image:-moz-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-webkit-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));-moz-box-shadow:0 0 8px rgba(0,0,0,.3);-webkit-box-shadow:0 0 8px rgba(0,0,0,.3);box-shadow:0 0 8px rgba(0,0,0,.3);-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;line-height:35px;text-align:center;color:#000;font-size:13px}.rangeslider__handle:after{content:"";display:block;width:18px;height:18px;margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.13)),color-stop(100%,rgba(255,255,255,0)));background-image:-moz-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-webkit-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.rangeslider--active .rangeslider__handle,.rangeslider__handle:active{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,rgba(0,0,0,.12)));background-image:-moz-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-webkit-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12))}.rangeslider--horizontal .rangeslider__handle{top:-13px;touch-action:pan-y;-ms-touch-action:pan-y}.rangeslider--vertical .rangeslider__handle{left:-13px;touch-action:pan-x;-ms-touch-action:pan-x}input[type=range]:focus+.rangeslider .rangeslider__handle{-moz-box-shadow:0 0 8px rgba(255,0,255,.9);-webkit-box-shadow:0 0 8px rgba(255,0,255,.9);box-shadow:0 0 8px rgba(255,0,255,.9)}.attachment-media-view button{color:#000;padding:5px 7px;line-height:1.5em}.czr-sub-set[data-input-type=nimblecheck]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.czr-sub-set[data-input-type=nimblecheck] .czr-html-before,.czr-sub-set[data-input-type=nimblecheck] .czr-notice{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-negative:0;flex-shrink:0;flex:0 0 100%}.czr-control-nimblecheck{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.nimblecheck-wrap{position:relative;display:inline-block;float:right}.nimblecheck-wrap .nimblecheck-input{display:none}.nimblecheck-wrap .nimblecheck-label{display:block;width:35px;height:20px;text-indent:-150%;clip:rect(0 0 0 0);color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nimblecheck-wrap .nimblecheck-label:after,.nimblecheck-wrap .nimblecheck-label:before{content:"";display:block;position:absolute;cursor:pointer}.nimblecheck-wrap .nimblecheck-label:before{width:100%;height:100%;background-color:#999;border-radius:9999em;-webkit-transition:background-color .35s ease;-o-transition:background-color .35s ease;transition:background-color .35s ease}.nimblecheck-wrap .nimblecheck-label:after{top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:#fff;-webkit-box-shadow:0 0 2px rgba(0,0,0,.45);box-shadow:0 0 2px rgba(0,0,0,.45);-webkit-transition:left .15s ease;-o-transition:left .15s ease;transition:left .15s ease}.nimblecheck-wrap .nimblecheck-input:checked+.nimblecheck-label:before{background-color:#33b3db}.nimblecheck-wrap .nimblecheck-input:checked+.nimblecheck-label:after{left:16px}
1
+ .wp-customizer a{color:#000}.wp-customizer a:focus,.wp-customizer a:hover{color:#0073aa}.wp-customizer .wp-full-overlay.expanded{margin-left:440px}.wp-customizer .wp-full-overlay-sidebar{width:440px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-440px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-440px}.accordion-sub-container.control-panel-content{left:440px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:440px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:440px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-440px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-440px}.rtl .accordion-sub-container.control-panel-content{right:440px}.customize-section-description-container+#customize-control-custom_css:last-child{margin:0;width:100%}li#customize-control-custom_css textarea{font-size:13px;background:#394143;color:#95ff0c;min-height:300px}@media screen and (max-width:1400px){.wp-customizer .wp-full-overlay.expanded{margin-left:380px}.wp-customizer .wp-full-overlay-sidebar{width:380px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-380px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-380px}.accordion-sub-container.control-panel-content{left:380px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:380px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:380px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-380px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-380px}.rtl .accordion-sub-container.control-panel-content{right:380px}}@media screen and (max-width:979px){.wp-customizer .wp-full-overlay.expanded{margin-left:300px}.wp-customizer .wp-full-overlay-sidebar{width:300px}.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-left:-300px}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-300px}.accordion-sub-container.control-panel-content{left:300px}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:300px;margin-left:0}.rtl.wp-customizer .wp-full-overlay-sidebar{width:300px}.rtl.wp-customizer .wp-full-overlay.collapsed .wp-full-overlay-sidebar{margin-right:-300px;margin-left:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title{right:-300px}.rtl .accordion-sub-container.control-panel-content{right:300px}}@media screen and (max-width:640px){.wp-customizer .customize-controls-preview-toggle{height:46px;border-bottom:1px solid #ddd;left:87px}.wp-customizer .wp-full-overlay.expanded{margin-left:0}#customize-theme-controls .control-section.current-panel>h3.accordion-section-title{left:-100%}.accordion-sub-container.control-panel-content{left:100%}.rtl.wp-customizer .wp-full-overlay.expanded{margin-right:0}.rtl #customize-theme-controls .control-section.current-panel>h3.accordion-section-title,.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}.rtl .accordion-sub-container.control-panel-content{right:100%}}.wp-customizer .control-section.control-panel .accordion-section-title .panel-title{font-size:24px;font-weight:inherit;line-height:30px}.wp-core-ui h3{color:#555}.accordion-section-content{padding:10px 10px 15px 20px}.accordion-section-title:after,.handlediv,.item-edit,.sidebar-name-arrow,.widget-action{color:#00a0d2}.control-section.control-panel>.accordion-section-title:after{color:#00a0d2}.customize-control-title{line-height:19px;font-family:Roboto;font-weight:400}.customize-control span.customize-control-title:first-child{position:relative;padding:10px 0 5px}.wp-customizer #customize-theme-controls .accordion-section-content{background:#fff}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus,.wp-customizer #customize-controls .customize-info .customize-help-toggle:hover,.wp-customizer #customize-controls .customize-info.open .customize-help-toggle{color:#00a0d2}.wp-customizer #customize-controls .customize-info .customize-help-toggle:focus:before,.wp-customizer .customize-screen-options-toggle:focus:before{-webkit-box-shadow:0 0 0 1px #00a0d2;box-shadow:0 0 0 1px #00a0d2;-webkit-border-radius:100%;border-radius:100%}.wp-customizer #available-menu-items .menu-item-handle:hover .item-add,.wp-customizer .menu-item-handle:hover,.wp-customizer .menu-item-handle:hover .item-edit,.wp-customizer .menu-item-handle:hover .item-type{color:#00a0d2}#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:active,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:focus,#customize-controls .customize-info.open.active-menu-screen-options .customize-help-toggle:hover,.active-menu-screen-options .customize-screen-options-toggle,.customize-screen-options-toggle:active,.customize-screen-options-toggle:focus,.customize-screen-options-toggle:hover{color:#00a0d2!important}.customize-control input[type=text]{line-height:23px}#customize-outer-theme-controls li[id*=customize-control-]{width:100%}#customize-outer-theme-controls input[type=checkbox],#customize-outer-theme-controls input[type=radio]{float:none;min-height:inherit}.control-section .accordion-section-content{overflow-y:auto}.wp-customizer .control-section h3.accordion-section-title{padding:10px 25px 11px 14px}.wp-customizer #customize-controls h3{font-size:15px;font-weight:400}.control-section .accordion-section-title:after{top:7px}.control-section.control-panel .accordion-section-title:after{top:11px;-webkit-transition:right .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:right .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:right .3s ease-in-out,opacity .3s ease-in-out;-o-transition:right .3s ease-in-out,opacity .3s ease-in-out;transition:right .3s ease-in-out,opacity .3s ease-in-out;right:10px;opacity:.7}.rtl .control-section.control-panel .accordion-section-title:after{-webkit-transition:left .3s ease-in-out,opacity .3s ease-in-out;-moz-transition:left .3s ease-in-out,opacity .3s ease-in-out;-ms-transition:left .3s ease-in-out,opacity .3s ease-in-out;-o-transition:left .3s ease-in-out,opacity .3s ease-in-out;transition:left .3s ease-in-out,opacity .3s ease-in-out;left:10px;right:initial}#customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{right:8px;opacity:1;color:#666!important}.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:focus:after,.rtl #customize-theme-controls .control-section.control-panel h3.accordion-section-title:hover:after{left:6px;right:initial}#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:focus:after,#customize-theme-controls .control-section.control-panel>h3.accordion-section-title:hover:after,.control-section.control-panel>.accordion-section-title:after{background:0 0!important;border:none!important}#customize-theme-controls h3.accordion-section-title{-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.customize-control-checkbox label,.customize-control-nav_menu_auto_add label,.customize-control-radio label{line-height:16px;margin-left:0}input::-webkit-input-placeholder{color:#9a9a9a;font-style:italic}input:-moz-placeholder{color:#9a9a9a;font-style:italic}input::-moz-placeholder{color:#9a9a9a;font-style:italic}input:-ms-input-placeholder{color:#9a9a9a;font-style:italic}.customize-control select{cursor:pointer;width:99%}.czr-customizr-title{text-transform:uppercase;margin:1em 0 5px 0;font-size:15px!important;border-bottom:1px dotted #555;padding-bottom:5px;text-align:center}h3.czr-customizr-title::before{content:'\00b7';padding-right:3px}h3.czr-customizr-title::after{content:'\00b7';padding-left:3px}.czr-after-button{border-color:#fff;margin-top:15px}.czr-emphasize{line-height:1.2em;color:#2e2e2e}i.czr-notice{display:block;clear:both}span.czr-notice{color:#313131;font-size:12px;font-style:italic;clear:both;display:block;line-height:18px}.czr-html-after hr,.czr-html-before hr{border-top:1px solid #c5c5c5;border-bottom:1px solid #fafafa;margin:25px 0}.czr-customizer-separator-invisible{border:none;margin-top:15px}.czr-skin-gen-label{float:left}.czr-skin-gen-color-picker{float:right}.czr-number-label{float:left}.czr-number-input{float:right}.czr-check-label{float:left;max-width:85%}.rtl .czr-check-label{float:right}input[type=checkbox],input[type=radio]{float:right;min-height:18px}.czr-font-select{float:left}li#customize-control-tc_theme_options-tc_custom_css textarea{font-size:14px;background:#394143;color:#e2e728;min-height:300px}.customize-control .czr-navigate-to-post-list{color:#00a0d2;font-weight:700;float:left;clear:both;width:100%;margin-bottom:8px}.czr-sub-control{padding-left:13%;max-width:87%;position:relative}.czr-sub-control:before{content:'';height:116%;background:#00a0d2;width:2%;position:absolute;left:7%}.customize-control-tc_cropped_image .upload-button{float:right}.customize-control-tc_cropped_image .remove-button{float:left;margin-right:3px}.customize-control-tc_cropped_image .actions{margin-bottom:32px}.customize-control-tc_cropped_image .current{margin-bottom:8px}.customize-control-tc_cropped_image .remove-button,.customize-control-tc_cropped_image .upload-button{white-space:normal;width:48%;height:auto}.customize-control-tc_cropped_image .current .container{min-height:40px;overflow:hidden;border:1px solid #eee;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image img{width:100%;-webkit-border-radius:2px;border-radius:2px}.customize-control-tc_cropped_image .inner{line-height:20px;top:10px}.rtl .customize-control-tc_cropped_image .upload-button{float:left}.rtl .customize-control-tc_cropped_image .remove-button{float:right;margin-left:3px}.czr-layout-img{height:22px;margin-top:2px;outline:1px solid #fff}.czr-layout-title{padding:0 0 18px 12px;display:inline-block;line-height:0;vertical-align:middle}.customize-control-czr_multi_input{width:96%;border:1px solid #ccc;padding:2%}.czr-multi-input-wrapper{width:95%;padding:0 0 0 5%}.czr-multi-input-wrapper [data-input-type=color] .czr-input{float:left;clear:both}#customize-theme-controls #accordion-panel-czr-footer-panel{border-bottom:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{margin-top:10px}#customize-theme-controls #accordion-panel-hu-advanced-panel,#customize-theme-controls #accordion-panel-hu-header-panel,#customize-theme-controls #accordion-panel-nav_menus,#customize-theme-controls .control-panel-widgets{border-top:1px solid #ddd}#customize-theme-controls #accordion-panel-hu-general-panel,#customize-theme-controls #accordion-panel-tc-global-panel{margin-bottom:10px}#customize-theme-controls #accordion-section-frontpage_sec,#customize-theme-controls #accordion-section-static_front_page{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_fpu{margin-bottom:10px}#customize-theme-controls #accordion-section-tc_font_customizer_settings{margin-bottom:10px}#customize-theme-controls #accordion-panel-__sektions__{margin-bottom:10px}#customize-header-actions .customize-controls-close{left:45px}.customize-controls-close,.customize-controls-home-or-add{top:-1px}.customize-controls-home-or-add{display:block;position:absolute;left:0;width:45px;height:41px;padding:0 2px 0 0;background:#eee;border:none;border-top:4px solid #eee;border-right:1px solid #ddd;border-bottom:1px solid #ddd;color:#444;text-align:left;cursor:pointer;text-decoration:none;-webkit-transition:color .15s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;transition:color .1s ease-in-out,border-color .15s ease-in-out,background .15s ease-in-out;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.customize-controls-home-or-add>.material-icons{line-height:39px;text-align:center;display:block}.customize-controls-home-or-add:before{font-size:17px;line-height:45px;position:relative;top:-4px;left:15px}.customize-controls-home-or-add:hover{background:#fff;color:#0073aa;border-top-color:#0073aa;outline:0;-webkit-box-shadow:none;box-shadow:none}.rtl.wp-customizer #customize-header-actions .customize-controls-close{right:45px;left:auto}.rtl.wp-customizer .customize-controls-home-or-add{left:auto;right:0;border-right:0;border-left:1px solid #ddd}.control-panel-content .hu-menu-notice{margin-left:3%}span.czr-panel-subtitle{display:block;font-size:12px;font-style:italic}.pro-title-block{border:1px solid #eea236;padding:0 6px;font-size:.7em;display:inline-block;margin-right:3px;bottom:2px;position:relative;color:#f0ad4e;webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);border-radius:3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:focus,#customize-controls .control-section-czr-customize-section-pro .accordion-section-title:hover{background-color:#fff}#customize-theme-controls .control-section-czr-customize-section-pro .accordion-section-title:after{content:none}#accordion-section-go_pro_sec .accordion-section-title{margin:0 0 15px}.control-section-czr-customize-section-pro .accordion-section-title .button{font-size:15px;line-height:24px;height:30px;padding:1px 20px;display:inline-block;color:#f59000;background:#fff;border:1px solid #eea236;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);box-shadow:inset 0 -1px 0 rgba(0,0,0,.1);text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border-radius:3px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-top:-4px;font-weight:400;margin-left:8px}.control-section-czr-customize-section-pro .accordion-section-title .button:hover{color:#fff;background:#ed9c28;border-color:#d58512}.rtl .control-section-czr-customize-section-pro .accordion-section-title .button{margin-left:0;margin-right:8px}@-webkit-keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}@keyframes czr-mr-loader{0%{-webkit-transform:scale(.1);transform:scale(.1);opacity:1}70%{-webkit-transform:scale(1);transform:scale(1);opacity:.7}100%{opacity:0}}.czr-css-loader{display:none;width:50px;height:50px;position:absolute;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);top:50%;left:50%}.csstransforms3d .czr-css-loader{display:block}.czr-mr-loader>div:nth-child(0){-webkit-animation-delay:-.8s;animation-delay:-.8s}.czr-mr-loader>div:nth-child(1){-webkit-animation-delay:-.6s;animation-delay:-.6s}.czr-mr-loader>div:nth-child(2){-webkit-animation-delay:-.4s;animation-delay:-.4s}.czr-mr-loader>div:nth-child(3){-webkit-animation-delay:-.2s;animation-delay:-.2s}.czr-mr-loader>div{-webkit-animation-fill-mode:both;animation-fill-mode:both;position:absolute;top:0;left:0;width:100%;height:100%;border-radius:100%;border:2px solid #777;-webkit-animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8);animation:czr-mr-loader 1.25s 0s infinite cubic-bezier(.21,.53,.56,.8)}.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-450px;height:0}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-450px}@media screen and (max-width:1400px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-380px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-380px}}@media screen and (max-width:979px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-300px}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-300px}}@media screen and (max-width:640px){.in-sub-panel #czr-donate-customizer,.in-sub-panel .czr-cta-wrap{left:-100%}.rtl .in-sub-panel #czr-donate-customizer,.rtl .in-sub-panel .czr-cta-wrap{right:-100%;left:auto}}@media screen and (min-width:980px){.wp-customizer .expanded #customize-footer-actions{width:380px}}@media screen and (min-width:1401px){.wp-customizer .expanded #customize-footer-actions{width:440px}}li.customize-control[data-module] li{margin-bottom:0;font-size:.85em}li.customize-control[data-module] [class*=czr-]{font-size:.9rem}li.customize-control[data-module] [class*=czr-] .hidden{display:none}li.customize-control[data-module] .czr-notice{font-size:12px!important}.czr-open-pre-add-new{display:block;float:left;margin:2% 2% 0;width:98%;padding:2%;background:#fff;color:inherit;opacity:1;font-size:16px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}.czr-open-pre-add-new.active{background:#646464;color:#000;opacity:.8;border-radius:3px 3px 0 0}.czr-single-item{padding:0;margin:1% 0 0 2%;float:left;width:98%;-webkit-border-radius:3px;border-radius:3px;-webkit-transition:opacity 1s ease-in-out;-moz-transition:opacity 1s ease-in-out;-ms-transition:opacity 1s ease-in-out;-o-transition:opacity 1s ease-in-out;transition:opacity 1s ease-in-out}#customize-theme-controls .czr-single-item.open{outline:1px solid #22a0d2}#customize-theme-controls .mono-item-mod .czr-single-item{outline:0}.czr-single-item .czr-item-content,.czr-single-item .czr-item-header{padding:1%;background:0 0}.czr-items-wrapper .czr-single-item .czr-builtin-model{background:#e1dfdf;color:#555}.czr-items-wrapper .inactive{opacity:.6}.czr-item-sort-handle{cursor:move}.czr-single-item .czr-item-header{position:relative;background:#ededed;color:#fff;float:left;width:98%;-webkit-transition:background .1s ease-in-out;-moz-transition:background .1s ease-in-out;-ms-transition:background .1s ease-in-out;-o-transition:background .1s ease-in-out;transition:background .1s ease-in-out}.czr_widget_areas_module .czr-single-item .czr-custom-model{background:#3b8dbd}. .czr-single-item .czr-custom-model:hover{background:#aaa}.czr-single-item .czr-item-header:hover{background:#ccc}.czr-items-wrapper .czr-single-item .czr-builtin-model:hover{background:#ccc}.czr-move-icon{position:absolute;top:-2px;left:3px;font-size:10px;color:#999}.czr-item-title{float:left;font-size:17px;color:#000;padding:4px;width:67%}.czr-inactive-alert{font-size:12px;font-style:italic}.czr_widget_areas_module .czr-item-title{color:#fff}.czr-builtin-model .czr-item-title{color:#23282d}.czr-item-title h4{margin:0}.czr-item-title .fab::before,.czr-item-title .far::before,.czr-item-title .fas::before{padding-right:2px}.czr-item-btns{float:right}.czr-item-btns a{font-size:17px;padding:7px 5px;color:#9e9e9e;-webkit-transition:color .25s ease-in-out;-moz-transition:color .25s ease-in-out;-ms-transition:color .25s ease-in-out;-o-transition:color .25s ease-in-out;transition:color .25s ease-in-ou}.czr-item-btns a:active,.czr-item-btns a:focus{outline:0;outline:0;-webkit-box-shadow:none;box-shadow:none}.czr-item-btns a.active,.czr-item-btns a:hover{color:#23282d}.czr_widget_areas_module .czr-item-btns a{color:#fff}.czr-builtin-model .czr-item-btns a{color:#555}.czr-builtin-model .czr-item-btns .czr-edit-view.active,.czr-builtin-model .czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-edit-view.active,.czr-item-btns .czr-edit-view:hover{color:#00a0d2}.czr_widget_areas_module .czr-edit-view:hover,.czr_widget_areas_module .czr-item-btns .czr-edit-view.active{color:#000}.czr_widget_areas_module .czr-builtin-model .czr-edit-view.active,.czr_widget_areas_module .czr-builtin-model .czr-edit-view:hover{color:#00a0d2}.czr-item-btns .czr-display-alert.active,.czr-item-btns .czr-display-alert:hover{color:#23282d}.czr-single-item .czr-item-content{float:left;display:none;clear:both;width:96%;padding:2%}.czr-single-item .czr-item-content input{margin-bottom:0}.czr-sub-set{margin-bottom:0;display:block;float:left;width:100%;padding:1% 0;position:relative}.czr-sub-set .czr-input{float:right;width:60%}.czr-sub-set .customize-control-title.width-100,.width-100,.width-100 .czr-input{width:100%}.czr-sub-set .customize-control-title{float:left;width:40%;padding:1px 0;font-size:13px}.customize-control-title.width-80{width:80%!important}.czr-input.width-20{width:20%!important}.rtl.wp-customizer .czr-sub-set .customize-control-title{float:right}.disabled .customize-control-title,.disabled .czr-input{opacity:.6;filter:blur(1px);-webkit-filter:blur(1px)}.czr-item-title .fab,.czr-item-title .far,.czr-item-title .fas{font-size:18px}.czr-remove-alert-wrapper{display:none;clear:both;float:left;padding:2%;width:95%;margin:10px 0;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#eee;color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.czr-remove-alert-wrapper p{padding:5px;margin:0}.czr-pre-add-wrapper{position:relative;float:left;width:100%}.czr-adding-new .czr-items-wrapper{opacity:.6}.czr-pre-add-view-content{display:none;padding:3%;border:1px solid #ccc;background:#fff;border-top:none;margin:0 0 0 2%;float:left;width:92%;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;position:relative;opacity:1;-webkit-transition:opacity .2s linear;-moz-transition:opacity .2s linear;-ms-transition:opacity .2s linear;-o-transition:opacity .2s linear;transition:opacity .2s linear}.czr-model-added .czr-pre-add-view-content{opacity:.2}.czr-pre-add-wrapper .czr-add-new{background:#3b8dbd;color:#fff;-webkit-transition:background .5s linear;-moz-transition:background .5s linear;-ms-transition:background .5s linear;-o-transition:background .5s linear;transition:background .5s linear;float:right;border:none}.czr-add-success{width:100%;margin:0 0 0 2%;position:absolute;top:0;left:0;font-size:25px;text-align:center;opacity:0;-webkit-transition:opacity .1s linear;-moz-transition:opacity .1s linear;-ms-transition:opacity .1s linear;-o-transition:opacity .1s linear;transition:opacity .1s linear}.czr-model-added .czr-add-success{opacity:1}.czr-add-success p{vertical-align:middle;display:inline-block;line-height:35px;margin:0;font-size:25px;color:#82b965;padding:0 3%}.control-section-widget_zones_management{margin:10px 0;z-index:1}.czr-zone-infos{width:96%;padding:0 2%;font-size:12px;float:left;font-style:italic}.czr-unavailable-location{opacity:.7}.czr-location-alert{float:left;width:100%;padding:1% 0;margin:1% 0;text-align:center;border:1px solid orange;background:#fee5b6;color:#000;font-size:11px;font-style:italic}.czr-toggle-modopt{color:#495050;text-shadow:1px 1px 0 #fff;-webkit-transition:color .4s;transition:color .4s;position:absolute;right:0;padding-left:3px;font-size:25px;line-height:24px}.rtl.wp-customizer .czr-toggle-modopt{left:0;right:auto;padding-left:0;padding-right:3px}.czr-modopt-visible .czr-toggle-modopt,.czr-toggle-modopt:hover{color:#3b8dbd}body.czr-editing-modopt #customize-preview{opacity:.7}body #customize-controls{-webkit-transition:opacity .4s ease-in-out;-moz-transition:opacity .4s ease-in-out;-ms-transition:opacity .4s ease-in-out;-o-transition:opacity .4s ease-in-out;transition:opacity .4s ease-in-out}body.czr-editing-modopt #customize-controls{opacity:.4}.czr-mod-opt-wrapper{position:absolute;top:0;bottom:0;left:-301px;opacity:0;overflow-x:hidden;overflow-y:auto;margin:0;z-index:999999;width:60%;min-width:300px;padding:1% 2%;color:#fff;background:rgba(0,0,0,.8);-webkit-transition:all .18s ease-in-out;-moz-transition:all .18s ease-in-out;-ms-transition:all .18s ease-in-out;-o-transition:all .18s ease-in-out;transition:all .18s ease-in-out;border-right:1px solid #4c4c4c}body.czr-editing-modopt .czr-mod-opt-wrapper{left:0;visibility:visible;opacity:1}.czr-close-modopt{position:absolute;top:10px;right:25px;font-size:31px;cursor:pointer}.czr-mod-opt-wrapper .czr-sub-set{background:rgba(238,238,238,.13);padding:3% 2%;width:96%;margin:5px 0}.czr-mod-opt-wrapper .czr-notice{color:#fff}.czr-mod-opt-wrapper .mod-opt-title{color:#fff;border-bottom:1px solid #fff;padding:5% 0;text-align:center}.tabs{position:relative;display:none;overflow:hidden;margin:0 auto;width:100%;font-weight:300;font-size:1.25em}.tabs nav{text-align:center}.tabs nav ul{position:relative;overflow:hidden;display:-ms-flexbox;display:-webkit-flex;display:-moz-flex;display:-ms-flex;display:flex;margin:0 auto;padding:0;max-width:1200px;list-style:none;-ms-box-orient:horizontal;-ms-box-pack:center;-webkit-flex-flow:row wrap;-moz-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-justify-content:center;-moz-justify-content:center;-ms-justify-content:center;justify-content:center}.tabs nav ul li{font-size:14px;position:relative;z-index:1;display:block;margin:0;text-align:center;-webkit-flex:1;-moz-flex:1;-ms-flex:1;flex:1}.tabs nav ul li.cols-4{width:25%}.tabs nav ul li.cols-3{width:33%}.tabs nav ul li.cols-2{width:50%}.tabs nav ul li.cols-1{width:100%}.tabs nav a{position:relative;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:2.5}.tabs nav a span{vertical-align:middle;font-size:.75em}.tabs nav li.tab-current a{color:#74777b}.tabs nav a:focus{outline:0}li.tab-current::after,li.tab-current::before{content:'';height:100%;position:absolute;-webkit-box-shadow:4px 0 15px 0 rgba(37,37,37,.63);box-shadow:4px 0 15px 0 rgba(37,37,37,.63);top:0;width:0;right:0;z-index:4;width:100%}li.tab-current::before{left:0;-webkit-box-shadow:0 0 15px 4px rgba(37,37,37,.63);box-shadow:0 0 15px 4px rgba(37,37,37,.63)}li.tab-inactive::after{content:'';width:100%;position:absolute;height:2px;bottom:-7px;left:0;-webkit-box-shadow:4px 0 15px 0 rgba(119,119,119,.58);box-shadow:4px 0 15px 0 rgba(0,0,0,.86)}.content-wrap{position:relative}.content-wrap section{display:none;margin:0 auto;max-width:1200px}section .czr-sub-set:first-child{margin:0}.content-wrap section.content-current{display:block}.no-flexbox nav ul{display:block}.no-flexbox nav ul li{min-width:15%;display:inline-block}.tabs-style-topline{max-width:1200px}.tabs-style-topline nav li{border:1px solid rgba(40,44,42,.1)}.czr-items-wrapper .tabs-style-topline nav li{border:none}.tabs-style-topline nav li:not(:last-child){border-right:none}.tabs-style-topline nav li.tab-current{border-top-color:#fff;border-bottom:none;background:rgba(238,238,238,.13)}.tabs-style-topline nav a{padding:.65em .5em;background:rgba(40,44,42,.05);color:#fff;line-height:1;-webkit-transition:color .2s;transition:color .2s;text-decoration:none}.czr-items-wrapper .tabs-style-topline nav a{background:rgba(40,44,42,.45)}.tabs-style-topline nav a:focus,.tabs-style-topline nav a:hover{text-decoration:underline}.tabs-style-topline nav li.tab-current a{background:0 0;box-shadow:inset 0 3px 0 #fff;color:#fff;text-decoration:underline}.czr-items-wrapper .tabs-style-topline nav li.tab-current a{color:#000}.tabs-style-topline .icon::before{display:block;margin:0}.tabs-style-topline nav a span{text-transform:uppercase;font-weight:700}@media screen and (max-width:58em){.tabs nav a.icon span{display:none}.tabs nav a:before{margin-right:0}}.czr_slide_module .czr-item-title{padding:0 7px;height:32px}.czr_slide_module .slide-thumb,.czr_slide_module .slide-title{display:block;height:32px;line-height:32px;float:left}.czr_slide_module .slide-title{padding-left:5px}.slide-mod-skope-notice{padding:3%;background:#fff;border-left:4px solid #00a0d2;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);float:left;font-size:12px;line-height:1.5em}.slide-mod-skope-notice .czr-skope-switch{cursor:pointer;text-decoration:underline}.modopts-top-buttons{width:100%;float:left;margin-bottom:4%;text-align:center}.item-bottom-buttons{width:100%;float:left;padding:1% 0}.item-bottom-btn,.modopt-top-btn{opacity:1;color:#fff;font-size:14px;cursor:pointer;border-width:1px;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;opacity:1}.item-bottom-btn{background:#868686;width:47%;margin-right:2%;padding:1% 0}.modopt-top-btn{background:rgba(171,171,171,.5);width:170px;padding:2px 0}.item-bottom-btn:hover{background:#5d5d5d}.modopt-top-btn:hover{background:rgba(41,41,41,.53)}.item-bottom-btn[disabled],.item-bottom-btn[disabled]:hover,.modopt-top-btn[disabled],.modopt-top-btn[disabled]:hover{opacity:.4;cursor:default;-webkit-box-shadow:none!important;box-shadow:none!important;background:inherit}.czr-notice{font-size:12px;font-weight:400}.selecter-element{position:absolute;opacity:0}.selecter{display:block;float:right;margin:2px 0;position:relative;width:100%;z-index:100}.selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat right center;border:1px solid #ccc;border-radius:3px;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:4px 4%;position:relative;text-overflow:clip;z-index:49;box-shadow:inset 0 1px 2px rgba(0,0,0,.07);height:auto;line-height:18px;width:90%}.selecter .selecter-options{border:1px solid #ccc;border-width:0 1px 1px;background-color:#fefefe;border-radius:0 0 3px 3px;box-shadow:0 1px 4px rgba(0,0,0,.15);display:none;left:0;margin:0;max-height:260px;overflow:auto;overflow-x:hidden;padding:0;position:relative;top:100%;width:99%;z-index:50}.selecter .selecter-group{background:#f9f9f9;border-bottom:1px solid #e3e3e3;color:#999;display:block;font-size:11px;padding:5px 6px 4px;text-transform:uppercase}.selecter .selecter-item{background:#fff;border-bottom:1px solid #e3e3e3;color:#333;cursor:pointer;display:block;font-size:13px;margin:0;overflow:hidden;padding:8px 10px;text-overflow:ellipsis;width:86%;height:auto;line-height:14px;padding:8px 24px 8px 10px}.selecter .selecter-item.selected{background:#f9f9f9}.selecter .selecter-item.disabled{color:#999;cursor:default}.selecter .selecter-item:first-child{border-radius:0}.selecter .selecter-item:last-child{border-radius:0 0 2px 2px;border-bottom:0}.rtl .selecter .selecter-selected{background:#f9f9f9 url(img/jquery.fs.selecter-arrow.png) no-repeat 4% center}@media screen and (min-width:980px){.selecter .selecter-item.selected:hover,.selecter .selecter-item:hover{background-color:#f3f3f3}.selecter .selecter-item.disabled:hover{background-color:#fff}.selecter:hover .selecter-selected{background-color:#fff}.selecter.disabled .selecter-item:hover{background:#fff}}.selecter.open{z-index:101}.selecter.open .selecter-selected{border-radius:3px 3px 0 0;z-index:51}.selecter.focus .selecter-selected,.selecter.open .selecter-selected{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.1)}.selecter.cover .selecter-options{border-radius:3px;border-width:1px;top:0}.selecter.cover .selecter-options .selecter-item.first{border-radius:3px 3px 0 0}.selecter.cover.open .selecter-selected{border-radius:3px 3px 0 0;z-index:49}.selecter.bottom .selecter-options{border-width:1px 1px 0;bottom:100%;top:auto}.selecter.bottom .selecter-item:last-child{border:none}.selecter.bottom.open .selecter-selected{border-radius:0 0 3px 3px}.selecter.bottom.open .selecter-options{border-radius:3px 3px 0 0}.selecter.bottom.cover .selecter-options{bottom:0;top:auto}.selecter.bottom.cover.open .selecter-selected{border-radius:3px}.selecter.bottom.cover.open .selecter-options{border-radius:3px}.selecter.multiple .selecter-options{border-radius:3px;border-width:1px;box-shadow:none;display:block;position:static;width:100%}.selecter.disabled .selecter-selected{background:#fff;border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-options{background:#fff;border-color:#eee}.selecter.disabled .selecter-group,.selecter.disabled .selecter-item{border-color:#eee;color:#ccc;cursor:default}.selecter.disabled .selecter-item.selected{background:#fafafa}.selecter .selecter-options.scroller{overflow:hidden}.selecter .selecter-options.scroller .scroller-content{max-height:260px;padding:0}@media screen and (max-width:740px){.selecter{max-width:100%}}@media screen and (max-width:500px){.selecter{max-width:100%}}.stepper{border-radius:3px;margin:0 0 10px 0;overflow:hidden;position:relative;width:35%;float:left;clear:both}.stepper .stepper-input{background:#f9f9f9;border:1px solid #ccc;border-radius:3px;color:#333;font-size:13px;line-height:1.2;margin:0;overflow:hidden;padding:5px 10px 5px!important;width:100%!important;z-index:49;-moz-appearance:textfield;max-width:none!important}.stepper .stepper-input::-webkit-inner-spin-button,.stepper .stepper-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.stepper .stepper-input:focus{background-color:#fff}.stepper .stepper-arrow{background:#eee url(img/jquery.fs.stepper-arrows.png) no-repeat;border:1px solid #ccc;cursor:pointer;display:block;height:46%;position:absolute;right:0;text-indent:-99999px;width:20px;z-index:50}.stepper .stepper-arrow.up{background-position:center top;border-bottom:none;top:0}.stepper .stepper-arrow.down{background-position:center bottom;bottom:0}.rtl .stepper .stepper-input{text-align:left}@media screen and (min-width:740px){.stepper:hover .stepper-input{background-color:#fff}.stepper .stepper-step:hover{background-color:#f9f9f9}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}}.stepper.disabled .stepper-input{background:#fff;border-color:#eee;color:#ccc}.stepper.disabled .stepper-arrow{background:#fff;border-color:#eee;cursor:default}.icheckbox_flat-green,.iradio_flat-green{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/green.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.rtl [class*=icheckbox_flat-]{float:left}.icheckbox_flat-green{background-position:0 0}.icheckbox_flat-green.checked{background-position:-22px 0}.icheckbox_flat-green.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-green.checked.disabled{background-position:-66px 0}.iradio_flat-green{background-position:-88px 0}.iradio_flat-green.checked{background-position:-110px 0}.iradio_flat-green.disabled{background-position:-132px 0;cursor:default}.iradio_flat-green.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-green,.iradio_flat-green{background-image:url(img/green@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.icheckbox_flat-grey,.iradio_flat-grey{display:inline-block;vertical-align:middle;margin:0;padding:0;width:20px;height:20px;background:url(img/grey.png) no-repeat;border:none;cursor:pointer;top:4px;float:right}.icheckbox_flat-grey{background-position:0 0}.icheckbox_flat-grey.checked{background-position:-22px 0}.icheckbox_flat-grey.disabled{background-position:-44px 0;cursor:default}.icheckbox_flat-grey.checked.disabled{background-position:-66px 0}.iradio_flat-grey{background-position:-88px 0}.iradio_flat-grey.checked{background-position:-110px 0}.iradio_flat-grey.disabled{background-position:-132px 0;cursor:default}.iradio_flat-grey.checked.disabled{background-position:-154px 0}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (-moz-min-device-pixel-ratio:1.5),only screen and (-o-min-device-pixel-ratio:3/2),only screen and (min-device-pixel-ratio:1.5){.icheckbox_flat-grey,.iradio_flat-grey{background-image:url(img/grey@2x.png);-webkit-background-size:176px 22px;background-size:176px 22px}}.czr-sub-set .icheckbox_flat-green,.iradio_flat-green{float:left}body .czrSelect2-container{z-index:1000000;width:100%!important}.customize-control-czr_layouts .czrSelect2-selection--single{height:33px}.customize-control-czr_layouts .czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__arrow{height:30px}.customize-control-czr_layouts .czrSelect2-selection--single:focus,.czrSelect2-selection__rendered:focus{outline:0}body .czrSelect2-drop{z-index:1000000}body .czrSelect2-container,span.czrSelect2-results{font-size:14px}.czrSelect2-container--default .czrSelect2-selection--multiple{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;width:99%;min-height:36px;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.07);box-shadow:inset 0 1px 2px rgba(0,0,0,.07)}.czrSelect2-container--default.czrSelect2-container--focus .czrSelect2-selection--multiple{border-color:#00a0d2!important;-webkit-box-shadow:0 0 2px rgba(26,188,156,.8)!important;box-shadow:0 0 2px rgba(26,188,156,.8)!important}.czrSelect2-results__options li{margin-bottom:0}.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice{padding:2px;font-size:13px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;margin-bottom:0}.czrSelect2-container--default .czrSelect2-results__option--highlighted[aria-selected]{background-color:#00a0d2}.czrSelect2-container--default .czrSelect2-selection--multiple .czrSelect2-selection__choice__remove{font-size:17px;position:relative;top:2px;color:#23282d}.customize-control-czr_socials .czrSelect2-container--default .czrSelect2-selection--single .czrSelect2-selection__rendered{padding:5px;line-height:16px}#czr-customize-content_editor-pane{border-top:solid 1px #ddd;position:absolute;height:300px;bottom:-301px;right:0;left:0;z-index:20;background:#f1f1f1;display:block;-webkit-transition:all .2s;transition:all .2s;visibility:hidden}.czr-close-editor{position:absolute;cursor:pointer;right:20px;top:-33px;color:#444;background:#eee;font-size:13px;line-height:19px;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5;border-bottom:none}body.czr-customize-content_editor-pane-resize #customize-preview,body.czr-customize-content_editor-pane-resize #czr-customize-content_editor-pane{-webkit-transition:none;transition:none}body.mce-fullscreen.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{top:0}body.czr-customize-content_editor-pane-open #czr-customize-content_editor-pane{bottom:40px;visibility:inherit}#czr-customize-content_editor-pane .wp-editor-tools{padding-top:5px;padding-right:10px}#czr-customize-content_editor-pane .wp-media-buttons{padding-left:5px}#customize-preview{height:auto}body.czr-customize-content_editor-pane-open #customize-preview{bottom:300px}body.mce-fullscreen #customize-preview{bottom:0}body.mce-fullscreen.czr-customize-content_editor-pane-open div.mce-fullscreen{position:relative;left:0}#wp-czr-customize-content_editor-container{border-left:0}#czr-customize-content_editor-dragbar{top:0;cursor:row-resize;display:block;height:4px;position:absolute;width:100%;z-index:21;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}body.czr-customize-content_editor-pane-resize #customize-preview:before{top:0;right:0;bottom:0;left:0;position:absolute;height:100%;width:100%;z-index:999999}.wp-customizer .ui-autocomplete.wplink-autocomplete{z-index:500110}.wp-customizer #wp-link-wrap{z-index:500105}.wp-customizer #wp_editbtns,.wp-customizer #wp_gallerybtns{z-index:500020}.wp-customizer #TB_overlay,.wp-customizer #TB_window{z-index:500050}.wp-customizer .mce-panel,.wp-customizer .mce-tooltip{z-index:500100!important}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .wp-full-overlay-sidebar{z-index:30}.czr-customize-content_editor-pane-open .wp-full-overlay.collapsed .collapse-sidebar{bottom:308px}.czr-customize-content_editor-pane-open .wp-full-overlay.expanded .collapse-sidebar{bottom:0!important}.czr-customize-content_editor-pane-resize .wp-full-overlay.collapsed .collapse-sidebar{-webkit-transition:none;transition:none}.czr-customize-content_editor-pane-open.mce-fullscreen .wp-full-overlay.collapsed .collapse-sidebar{bottom:8px!important}.czr-resize-handle{color:#33b3db;font-size:12px;position:relative;bottom:2px}.czr-sub-set[data-input-type=content_picker] .customize-control-title{width:100%}.czr-sub-set[data-input-type=content_picker] .czr-input{width:100%}.content-picker-item{height:2em}.content-picker-item .czr-picker-item-type{float:right;display:inline-block}.content-item-bar{line-height:1.2em;font-size:.9em}.content-item-bar .czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:13px;line-height:1.3em}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-title{display:block;float:left;max-width:80%;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:2em;color:#000}.czr-sub-set[data-input-type=content_picker] span.czr-picker-item-type{display:inline-block;padding:0;padding-right:10px;float:right;line-height:2em}.czr-sub-set[data-input-type=range_slider]{padding:20px 0}.rangeslider,.rangeslider__fill{display:block;-moz-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.3);box-shadow:inset 0 1px 3px rgba(0,0,0,.3);-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}.rangeslider{background:#e6e6e6;position:relative}.rangeslider--horizontal{height:12px;width:100%}.rangeslider--vertical{width:12px;min-height:150px;max-height:100%}.rangeslider--disabled{opacity:.4}.rangeslider__fill{background:#3b8dbd;position:absolute}.rangeslider--horizontal .rangeslider__fill{top:0;height:100%}.rangeslider--vertical .rangeslider__fill{bottom:0;width:100%}.rangeslider__handle{background:#fff;border:1px solid #ccc;cursor:pointer;display:inline-block;width:34px;height:34px;position:absolute;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(255,255,255,0)),color-stop(100%,rgba(0,0,0,.1)));background-image:-moz-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:-webkit-linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));background-image:linear-gradient(rgba(255,255,255,0),rgba(0,0,0,.1));-moz-box-shadow:0 0 8px rgba(0,0,0,.3);-webkit-box-shadow:0 0 8px rgba(0,0,0,.3);box-shadow:0 0 8px rgba(0,0,0,.3);-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%;line-height:35px;text-align:center;color:#000;font-size:13px}.rangeslider__handle:after{content:"";display:block;width:18px;height:18px;margin:auto;position:absolute;top:0;right:0;bottom:0;left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.13)),color-stop(100%,rgba(255,255,255,0)));background-image:-moz-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:-webkit-linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));background-image:linear-gradient(rgba(0,0,0,.13),rgba(255,255,255,0));-moz-border-radius:50%;-webkit-border-radius:50%;border-radius:50%}.rangeslider--active .rangeslider__handle,.rangeslider__handle:active{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==);background-size:100%;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,.1)),color-stop(100%,rgba(0,0,0,.12)));background-image:-moz-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:-webkit-linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12));background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.12))}.rangeslider--horizontal .rangeslider__handle{top:-13px;touch-action:pan-y;-ms-touch-action:pan-y}.rangeslider--vertical .rangeslider__handle{left:-13px;touch-action:pan-x;-ms-touch-action:pan-x}input[type=range]:focus+.rangeslider .rangeslider__handle{-moz-box-shadow:0 0 8px rgba(255,0,255,.9);-webkit-box-shadow:0 0 8px rgba(255,0,255,.9);box-shadow:0 0 8px rgba(255,0,255,.9)}.attachment-media-view button{color:#000;padding:5px 7px;line-height:1.5em}.czr-sub-set[data-input-type=nimblecheck]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.czr-sub-set[data-input-type=nimblecheck] .czr-html-before,.czr-sub-set[data-input-type=nimblecheck] .czr-notice{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-negative:0;flex-shrink:0;flex:0 0 100%}.czr-control-nimblecheck{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.nimblecheck-wrap{position:relative;display:inline-block;float:right}.nimblecheck-wrap .nimblecheck-input{display:none}.nimblecheck-wrap .nimblecheck-label{display:block;width:35px;height:20px;text-indent:-150%;clip:rect(0 0 0 0);color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nimblecheck-wrap .nimblecheck-label:after,.nimblecheck-wrap .nimblecheck-label:before{content:"";display:block;position:absolute;cursor:pointer}.nimblecheck-wrap .nimblecheck-label:before{width:100%;height:100%;background-color:#999;border-radius:9999em;-webkit-transition:background-color .35s ease;-o-transition:background-color .35s ease;transition:background-color .35s ease}.nimblecheck-wrap .nimblecheck-label:after{top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:#fff;-webkit-box-shadow:0 0 2px rgba(0,0,0,.45);box-shadow:0 0 2px rgba(0,0,0,.45);-webkit-transition:left .15s ease;-o-transition:left .15s ease;transition:left .15s ease}.nimblecheck-wrap .nimblecheck-input:checked+.nimblecheck-label:before{background-color:#33b3db}.nimblecheck-wrap .nimblecheck-input:checked+.nimblecheck-label:after{left:16px}
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.js CHANGED
@@ -1632,11 +1632,16 @@ $.extend( CZRInputMths , {
1632
  }
1633
  ];
1634
 
1635
-
1636
- // Try to find a match with the provided constructor type
 
1637
  // => fire the relevant callback with the provided input_options
1638
  // input.type_map is declared in extend_api_base
1639
- if ( api.czrInputMap && _.has( api.czrInputMap, input.type ) ) {
 
 
 
 
1640
  var _meth = api.czrInputMap[ input.type ];
1641
  if ( _.isFunction( input[_meth]) ) {
1642
  try { input[_meth]( options.input_options || null ); } catch( er ) {
@@ -2171,19 +2176,27 @@ $.extend( CZRInputMths , {
2171
  canUpload : true
2172
  };
2173
 
2174
- api.CZR_Helpers.getModuleTmpl( {
2175
- tmpl : 'img-uploader',
2176
- module_type: 'all_modules',
2177
- module_id : input.module.id
2178
- } ).done( function( _serverTmpl_ ) {
2179
- //console.log( 'renderModuleParts => success response =>', input.module.id, _serverTmpl_);
2180
- $_view_el.html( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( _template_params ) );
2181
  input.tmplRendered.resolve();
2182
  input.container.trigger( input.id + ':content_rendered' );
2183
- }).fail( function( _r_ ) {
2184
- //console.log( 'renderModuleParts => fail response =>', _r_);
2185
- input.tmplRendered.reject( 'renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : '+ input.module.id );
2186
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
2187
  return true;
2188
  },
2189
 
@@ -2558,11 +2571,7 @@ $.extend( CZRItemMths , {
2558
  trigger : 'click keydown',
2559
  selector : [ '.' + item.module.control.css_attr.display_alert_btn, '.' + item.module.control.css_attr.cancel_alert_btn ].join(','),
2560
  name : 'toggle_remove_alert',
2561
- actions : function() {
2562
- var _isVisible = this.removeDialogVisible();
2563
- this.module.closeRemoveDialogs();
2564
- this.removeDialogVisible( ! _isVisible );
2565
- }
2566
  },
2567
  //removes item and destroys its view
2568
  {
@@ -2740,11 +2749,20 @@ $.extend( CZRItemMths , {
2740
  });
2741
  },
2742
 
 
 
 
 
 
 
 
 
2743
  //fired on click dom event
2744
  //for dynamic multi input modules
2745
  //@return void()
2746
  //@param params : { dom_el : {}, dom_event : {}, event : {}, model {} }
2747
  removeItem : function( params ) {
 
2748
  var item = this,
2749
  module = this.module,
2750
  _new_collection = _.clone( module.itemCollection() );
@@ -2877,7 +2895,7 @@ $.extend( CZRItemMths , {
2877
  if ( 1 > $( '#tmpl-' + _template_selector ).length ) {
2878
  dfd.reject( 'Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + _template_selector );
2879
  }
2880
- appendAndResolve( wp.template( _template_selector )( item_model_for_template_injection ) );
2881
  } else {
2882
 
2883
  // allow plugin to alter the ajax params before fetching
@@ -2902,7 +2920,7 @@ $.extend( CZRItemMths , {
2902
  } else {
2903
  api.CZR_Helpers.getModuleTmpl( requestParams ).done( function( _serverTmpl_ ) {
2904
  //console.log( 'renderItemWrapper => success response =>', module.id, _serverTmpl_);
2905
- appendAndResolve( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( { is_sortable : module.sortable } ) );
2906
  }).fail( function( _r_ ) {
2907
  //console.log( 'renderItemWrapper => fail response =>', _r_);
2908
  dfd.reject( 'renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : '+ module.id );
@@ -3147,7 +3165,7 @@ $.extend( CZRItemMths , {
3147
  if ( 1 > $( '#tmpl-' + tmplSelectorSuffix ).length ) {
3148
  dfd.reject( 'renderItemContent => No itemInputList content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + tmplSelectorSuffix );
3149
  } else {
3150
- appendAndResolve( wp.template( tmplSelectorSuffix )( item_model_for_template_injection ) );
3151
  }
3152
 
3153
  } else {
@@ -3602,13 +3620,14 @@ $.extend( CZRModuleMths, {
3602
  $.extend( module, constructorOptions || {} );
3603
 
3604
  //extend the module with new template Selectors
 
3605
  $.extend( module, {
3606
- crudModulePart : '', //'czr-crud-module-part',//create, read, update, delete
3607
- rudItemPart : '',// 'czr-rud-item-part',//read, update, delete
3608
- ruItemPart : '',// 'czr-ru-item-part',//read, update <= ONLY USED IN THE WIDGET MODULE
3609
- alertPart : '',// 'czr-rud-item-alert-part',//used both for items and modules removal
3610
- itemInputList : '',//is specific for each crud module
3611
- modOptInputList : ''//is specific for each module
3612
  } );
3613
 
3614
  //embed : define a container, store the embed state, fire the render method
@@ -3725,6 +3744,9 @@ $.extend( CZRModuleMths, {
3725
  if ( false !== module.sortable ) {
3726
  module._makeItemsSortable();
3727
  }
 
 
 
3728
  });
3729
 
3730
  //populate and instantiate the items now when a module is embedded in a regular control
@@ -4714,6 +4736,11 @@ $.extend( CZRModuleMths, {
4714
  if ( module.czr_Item.has(_item.id) && 'expanded' == module.czr_Item(_item.id)._getViewState(_item.id) )
4715
  module.czr_Item( _item.id ).viewState.set( 'closed' ); // => will fire the cb toggleItemExpansion
4716
  } );
 
 
 
 
 
4717
  return this;
4718
  },
4719
 
@@ -5044,6 +5071,14 @@ $.extend( CZRDynModuleMths, {
5044
  module.trigger( 'pre-item-input-collection-ready' );
5045
  },
5046
 
 
 
 
 
 
 
 
 
5047
 
5048
  // overridable method introduced with the flat skope
5049
  // problem to solve in skope => an item, can't always be instantiated in a given context.
@@ -5061,7 +5096,7 @@ $.extend( CZRDynModuleMths, {
5061
  return dfd.reject().promise();
5062
  }
5063
  var module = this,
5064
- item_candidate = module.preItem(),
5065
  collapsePreItem = function() {
5066
  module.preItemExpanded.set( false );
5067
  //module.toggleSuccessMessage('off');
1632
  }
1633
  ];
1634
 
1635
+ // 1) Check the input instance to see if the default callback has been overriden in an extended Constructor
1636
+ // ( @see column width module in Nimble Builder to see how the overrides works )
1637
+ // 2) if not, try to find a match with the provided constructor type
1638
  // => fire the relevant callback with the provided input_options
1639
  // input.type_map is declared in extend_api_base
1640
+ if ( input[input.type] && _.isFunction( input[input.type]) ) {
1641
+ try { input[input.type]( options.input_options || null ); } catch( er ) {
1642
+ api.errare( 'Error in overriden callback method in input init => for input id :' + input.id + ' in module type : ' + input.module.module_type, er );
1643
+ }
1644
+ } else if ( api.czrInputMap && _.has( api.czrInputMap, input.type ) ) {
1645
  var _meth = api.czrInputMap[ input.type ];
1646
  if ( _.isFunction( input[_meth]) ) {
1647
  try { input[_meth]( options.input_options || null ); } catch( er ) {
2176
  canUpload : true
2177
  };
2178
 
2179
+ if ( $('#tmpl-czr-img-uploader').length > 0 ) {
2180
+ $_view_el.html( wp.template( 'czr-img-uploader' )( _template_params ) );
 
 
 
 
 
2181
  input.tmplRendered.resolve();
2182
  input.container.trigger( input.id + ':content_rendered' );
2183
+ } else {
2184
+ api.CZR_Helpers.getModuleTmpl( {
2185
+ tmpl : 'img-uploader',
2186
+ module_type: 'all_modules',
2187
+ module_id : input.module.id
2188
+ } ).done( function( _serverTmpl_ ) {
2189
+ //console.log( 'renderModuleParts => success response =>', input.module.id, _serverTmpl_);
2190
+ $_view_el.html( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( _template_params ) );
2191
+ input.tmplRendered.resolve();
2192
+ input.container.trigger( input.id + ':content_rendered' );
2193
+ }).fail( function( _r_ ) {
2194
+ //console.log( 'renderModuleParts => fail response =>', _r_);
2195
+ input.tmplRendered.reject( 'renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : '+ input.module.id );
2196
+ });
2197
+ }
2198
+
2199
+
2200
  return true;
2201
  },
2202
 
2571
  trigger : 'click keydown',
2572
  selector : [ '.' + item.module.control.css_attr.display_alert_btn, '.' + item.module.control.css_attr.cancel_alert_btn ].join(','),
2573
  name : 'toggle_remove_alert',
2574
+ actions : ['toggleRemoveAlert']
 
 
 
 
2575
  },
2576
  //removes item and destroys its view
2577
  {
2749
  });
2750
  },
2751
 
2752
+ // fired on click event
2753
+ // @see initialize()
2754
+ toggleRemoveAlert : function() {
2755
+ var _isVisible = this.removeDialogVisible();
2756
+ this.module.closeRemoveDialogs();
2757
+ this.removeDialogVisible( ! _isVisible );
2758
+ },
2759
+
2760
  //fired on click dom event
2761
  //for dynamic multi input modules
2762
  //@return void()
2763
  //@param params : { dom_el : {}, dom_event : {}, event : {}, model {} }
2764
  removeItem : function( params ) {
2765
+ params = params || {};
2766
  var item = this,
2767
  module = this.module,
2768
  _new_collection = _.clone( module.itemCollection() );
2895
  if ( 1 > $( '#tmpl-' + _template_selector ).length ) {
2896
  dfd.reject( 'Missing template for item ' + item.id + '. The provided template script has no been found : #tmpl-' + _template_selector );
2897
  }
2898
+ appendAndResolve( wp.template( _template_selector )( $.extend( item_model_for_template_injection, { is_sortable : module.sortable } ) ) );
2899
  } else {
2900
 
2901
  // allow plugin to alter the ajax params before fetching
2920
  } else {
2921
  api.CZR_Helpers.getModuleTmpl( requestParams ).done( function( _serverTmpl_ ) {
2922
  //console.log( 'renderItemWrapper => success response =>', module.id, _serverTmpl_);
2923
+ appendAndResolve( api.CZR_Helpers.parseTemplate( _serverTmpl_ )( $.extend( item_model_for_template_injection, { is_sortable : module.sortable } ) ) );
2924
  }).fail( function( _r_ ) {
2925
  //console.log( 'renderItemWrapper => fail response =>', _r_);
2926
  dfd.reject( 'renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : '+ module.id );
3165
  if ( 1 > $( '#tmpl-' + tmplSelectorSuffix ).length ) {
3166
  dfd.reject( 'renderItemContent => No itemInputList content template defined for module ' + module.id + '. The template script id should be : #tmpl-' + tmplSelectorSuffix );
3167
  } else {
3168
+ appendAndResolve( wp.template( tmplSelectorSuffix )( $.extend( item_model_for_template_injection, { control_id : module.control.id } ) ) );
3169
  }
3170
 
3171
  } else {
3620
  $.extend( module, constructorOptions || {} );
3621
 
3622
  //extend the module with new template Selectors
3623
+ //can have been overriden at this stage from a module constructor
3624
  $.extend( module, {
3625
+ crudModulePart : module.crudModulePart || '', //'czr-crud-module-part',//create, read, update, delete
3626
+ rudItemPart : module.rudItemPart || '',// 'czr-rud-item-part',//read, update, delete
3627
+ ruItemPart : module.ruItemPart || '',// 'czr-ru-item-part',//read, update <= ONLY USED IN THE WIDGET MODULE
3628
+ alertPart : module.alertPart || '',// 'czr-rud-item-alert-part',//used both for items and modules removal
3629
+ itemInputList : module.itemInputList || '',//is specific for each crud module
3630
+ modOptInputList : module.modOptInputList || ''//is specific for each module
3631
  } );
3632
 
3633
  //embed : define a container, store the embed state, fire the render method
3744
  if ( false !== module.sortable ) {
3745
  module._makeItemsSortable();
3746
  }
3747
+
3748
+ // this event is listened to by Nimble Builder to expand the module once all the items collection is populated
3749
+ module.control.container.trigger('items-collection-populated');
3750
  });
3751
 
3752
  //populate and instantiate the items now when a module is embedded in a regular control
4736
  if ( module.czr_Item.has(_item.id) && 'expanded' == module.czr_Item(_item.id)._getViewState(_item.id) )
4737
  module.czr_Item( _item.id ).viewState.set( 'closed' ); // => will fire the cb toggleItemExpansion
4738
  } );
4739
+
4740
+ // 'czr-all-items-closed' has been introduced when coding the Simple Nimble slider module. @see https://github.com/presscustomizr/nimble-builder/issues/82
4741
+ // When using the text editor in the items of in a multi-item module
4742
+ // We need to clear the editor instances each time all items are closed, before opening a new one
4743
+ api.trigger('czr-all-items-closed', { module_id : module.id } );
4744
  return this;
4745
  },
4746
 
5071
  module.trigger( 'pre-item-input-collection-ready' );
5072
  },
5073
 
5074
+ // Intended to be overriden in a module
5075
+ // introduced in July 2019 to allow a multi-item module to set a default pre-item
5076
+ // typically, in the slider image, this is a way to have a default image when adding an item
5077
+ // @see https://github.com/presscustomizr/nimble-builder/issues/479
5078
+ getPreItem : function() {
5079
+ return this.preItem();
5080
+ },
5081
+
5082
 
5083
  // overridable method introduced with the flat skope
5084
  // problem to solve in skope => an item, can't always be instantiated in a given context.
5096
  return dfd.reject().promise();
5097
  }
5098
  var module = this,
5099
+ item_candidate = module.getPreItem(),
5100
  collapsePreItem = function() {
5101
  module.preItemExpanded.set( false );
5102
  //module.toggleSuccessMessage('off');
inc/czr-base-fmk/assets/js/_0_ccat_czr-base-fmk.min.js CHANGED
@@ -1 +1 @@
1
- "function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],r=/er/.test(n)?$:/bl/.test(n)?x:I,o=n==E?{checked:i[I],disabled:i[x],indeterminate:"true"==e.attr($)||"false"==e.attr(S)}:i[r];if(/^(ch|di|in)/.test(n)&&!o)y(e,r);else if(/^(un|en|de)/.test(n)&&o)b(e,r);else if(n==E)for(r in o)o[r]?y(e,r,!0):b(e,r,!0);else t&&"toggle"!=n||(t||e[k]("ifClicked"),o?i[A]!==z&&b(e,r):y(e,r))}function y(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));if(!0!==i[t]){if(!n&&t==I&&i[A]==z&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(w)&&b(v(this),t)})}s?(i[t]=!0,i[I]&&b(e,I,"force")):(n||(i[t]=!0),o&&i[$]&&b(e,$,!1)),f(e,o,t,n)}i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"default"),r[R](d||h(e,t)||""),a?r.attr("aria-disabled","true"):r.attr("aria-checked",s?"mixed":"true"),r[O](c||h(e,l)||"")}function b(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,o,l,n)),!i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"pointer"),r[O](d||h(e,t)||""),a?r.attr("aria-disabled","false"):r.attr("aria-checked","false"),r[R](c||h(e,l)||"")}function C(e,t){e.data(w)&&(e.parent().html(e.attr("style",e.data(w).s||"")),t&&e[k](t),e.off(".i").unwrap(),v(P+'[for="'+e[0].id+'"]').add(e.closest(P)).off(".i"))}function h(e,t,n){return e.data(w)?e.data(w).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[k]("ifToggled"),e[k]("ifChanged")[k]("if"+m(n)))}var w="iCheck",M=w+"-helper",z="radio",I="checked",g="un"+I,x="disabled",S="determinate",$="in"+S,E="update",A="type",R="addClass",O="removeClass",k="trigger",P="label",D="cursor",j=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[w]=function(t,n){var i='input[type="checkbox"], input[type="'+z+'"]',r=v(),e=function(e){e.each(function(){var e=v(this);r=e.is(i)?r.add(e):r.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),r.each(function(){var e=v(this);"destroy"==t?C(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var d=v.extend({checkedClass:I,disabledClass:x,indeterminateClass:$,labelHover:!0,aria:!1},t),o=d.handle,u=d.hoverClass||"hover",p=d.focusClass||"focus",h=d.activeClass||"active",m=!!d.labelHover,f=d.labelHoverClass||"hover",g=0|(""+d.increaseArea).replace("%","");return("checkbox"==o||o==z)&&(i='input[type="'+o+'"]'),g<-50&&(g=-50),e(this),r.each(function(){var i=v(this);C(i);var r=this,e=r.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=j?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},o="checkbox"==r[A]?d.checkboxClass||"icheckbox":d.radioClass||"i"+z,s=v(P+'[for="'+e+'"]').add(i.closest(P)),a=!!d.aria,l=w+"-"+Math.random().toString(36).substr(2,6),c='<div class="'+o+'" '+(a?'role="'+r[A]+'" ':"");a&&s.each(function(){c+='aria-labelledby="',this.id?c+=this.id:(this.id=l,c+=l),c+='"'}),c=i.wrap(c+"/>")[k]("ifCreated").parent().append(d.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(c),i.data(w,{o:d,s:i.attr("style")}).css(n),d.inheritClass&&c[R](r.className||""),d.inheritID&&e&&c.attr("id",w+"-"+e),"static"==c.css("position")&&c.css("position","relative"),_(i,!0,E),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[A],n=v(this);if(!r[x]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(c[O](u),n[O](f)):(c[R](u),n[R](f)));if(!j)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[A];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(r[A]==z&&r[I]||(r[I]?b(i,I):y(i,I)),!1):void("keyup"==t&&r[A]==z?!r[I]&&y(i,I):/us|ur/.test(t)&&c["blur"==t?O:R](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[A],n=/wn|up/.test(t)?h:u;if(!r[x]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?c[R](n):c[O](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?O:R](f)),!j)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(d,r){"use strict";function o(e,t){if(!e.hasClass("selecter-element")){(t=d.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),r=i.filter(":selected"),o=""!==t.label?-1:i.index(r),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;C?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=d("<span></span").text(y(""!==t.label?t.label:r.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),c=d.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(c),_(o,c),void 0!==d.fn.scroller&&c.$itemsWrapper.scroller(),c.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",c,p).on("click.selecter",".selecter-item",c,m).on("close.selecter",c,h).data("selecter",c),c.$select.on("change.selecter",c,f),C||(c.$selecter.on("focus.selecter",c,g).on("blur.selecter",c,v),c.$select.on("focus.selecter",c,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,r=e.$allOptions.length;i<r;i++){var o=e.$allOptions.eq(i);if("OPTGROUP"===o[0].tagName)t+='<span class="selecter-group',o.is(":disabled")&&(t+=" disabled"),t+='">'+o.attr("label")+"</span>";else{var s=o.val();o.attr("value")||o.attr("value",s),t+="<"+n+' class="selecter-item',o.is(":selected")&&""===e.label&&(t+=" selected"),o.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+d("<span></span>").text(y(o.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(d(".selecter").not(t.$selecter).trigger("close.selecter",[t]),C){var n=t.$select[0];if(r.document.createEvent){var i=r.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=c.outerHeight(),r=t.$itemsWrapper.outerHeight(!0),o=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+r>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),c.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==d.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+o.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+o.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===d(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),c.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=d(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=d(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),d(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),d(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<d.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var r,o=String.fromCharCode(e.keyCode).toUpperCase();for(r=t.index+1;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}if(i<0)for(r=0;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var r=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(r).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?r.open(n):r.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<r.navigator.userAgent.toLowerCase().indexOf("firefox"),C=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(r.navigator.userAgent||r.navigator.vendor||r.opera),c=null,w={callback:d.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return w=d.extend(w,e||{}),d(this)},disable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==d.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};d.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},w,e||{}),null===c&&(c=d("body"));for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(c){"use strict";function r(e,t){if(!e.hasClass("stepper-input")){t=c.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),r=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var o=e.parent(".stepper"),s=c.extend({$stepper:o,$input:e,$arrow:o.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof r||isNaN(r)?1:r,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&o.addClass("disabled"),o.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,d).data("stepper",s)}var a,l}function d(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,r=e.data;if(!r.$input.is(":disabled")&&!r.$stepper.hasClass("disabled")){var o=c(e.target).hasClass("up")?r.step:-r.step;r.timer=(t=r.timer,n=125,i=function(){a(r,o)},l(t),setInterval(i,n)),a(r,o),c("body").on("touchend.stepper mouseup.stepper",r,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),c("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var r,o,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(r=i,o=e.digits,s=Math.pow(10,o),i=Math.round(r*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var o={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return o=c.extend(o,e||{}),c(this)},destroy:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};c.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},o,e||{});for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.czrSelect2&&n.fn.czrSelect2.amd)var e=n.fn.czrSelect2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,r,o,s,a,l,c,d,u,p,h=t&&t.split("/"),m=C.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,C.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;0<d&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(d=(n=e.split("/")).length;0<d;d-=1){if(i=n.slice(0,d).join("/"),h)for(u=h.length;0<u;u-=1)if((r=m[h.slice(0,u).join("/")])&&(r=r[i])){o=r,a=d;break}if(o)break;!l&&f&&f[i]&&(l=f[i],c=d)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],w[e]=!0,o.apply(p,t)}if(!h(y,e)&&!h(w,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var o,l,v,_,y={},b={},C={},w={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,r=a(e),o=r[0];return e=r[1],o&&(n=g(o=s(o,t))),o?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(o=(r=a(e=s(e,t)))[0],e=r[1],o&&(n=g(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return C&&C.config&&C.config[t]||{}})};var t}},o=function(e,t,n,i){var r,o,s,a,l,c,d=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=v(t[l],i)).f))d[l]=_.require(e);else if("exports"===o)d[l]=_.exports(e),c=!0;else if("module"===o)r=d[l]=_.module(e);else if(h(y,o)||h(b,o)||h(w,o))d[l]=g(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,m(i,!0),f(o),{}),d[l]=y[o]}s=n?n.apply(y[e],d):void 0,e&&(r&&r.exports!==p&&r.exports!==y[e]?y[e]=r.exports:s===p&&c||(y[e]=s))}else e&&(y[e]=n)},t=r=l=function(e,t,n,i,r){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((C=e).deps&&l(C.deps,C.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(p,e,t,n):setTimeout(function(){o(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(c=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=c),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("CzrSelect2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before CzrSelect2 on your web page."),e}),e.define("czrSelect2/utils",["jquery"],function(o){function d(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,r){function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}var e=d(r),t=d(i);r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("czrSelect2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="czrSelect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="czrSelect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" czrSelect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".czrSelect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".czrSelect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".czrSelect2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".czrSelect2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="czrSelect2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var o=p(t),s=document.createElement("strong");s.className="czrSelect2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var c=e.children[l],d=this.option(c);a.push(d)}var u=p("<ul></ul>",{class:"czrSelect2-results__options czrSelect2-results__options--nested"});u.append(a),o.append(s),o.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("czrSelect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("czrSelect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".czrSelect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.define("czrSelect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("czrSelect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="czrSelect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.czrSelect2."+e.id,function(e){var t=n(e.target).closest(".czrSelect2");n(".czrSelect2.czrSelect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").czrSelect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.czrSelect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("czrSelect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--single"),e.html('<span class="czrSelect2-selection__rendered"></span><span class="czrSelect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".czrSelect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".czrSelect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("czrSelect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--multiple"),e.html('<ul class="czrSelect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".czrSelect2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="czrSelect2-selection__choice"><span class="czrSelect2-selection__choice__remove" role="presentation">&times;</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var s=this.$selection.find(".czrSelect2-selection__rendered");a.appendMany(s,t)}},r}),e.define("czrSelect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("czrSelect2-selection__placeholder").removeClass("czrSelect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".czrSelect2-selection__rendered").append(i)},t}),e.define("czrSelect2/selection/allowClear",["jquery","../keys"],function(i,r){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("CzrSelect2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".czrSelect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".czrSelect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var o={data:i[r]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==r.DELETE||t.which==r.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".czrSelect2-selection__placeholder").length||0===t.length)){var n=i('<span class="czrSelect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".czrSelect2-selection__rendered").prepend(n)}},e}),e.define("czrSelect2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="czrSelect2-search czrSelect2-search--inline"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".czrSelect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".czrSelect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".czrSelect2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".czrSelect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,o=r&&r<=11;this.$selection.on("input.searchcheck",".czrSelect2-search--inline",function(e){return o?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".czrSelect2-search--inline",function(e){if(o&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".czrSelect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".czrSelect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("czrSelect2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("czrSelect2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("czrSelect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("czrSelect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("czrSelect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("czrSelect2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple"))return r.selected=!1,a(r.element).is("option")?(r.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=a(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("czrSelect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),r=i.map(function(){return n.item(f(this)).id}).get(),o=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,r)){var l=i.filter(t(a)),c=this.item(l),d=f.extend(!0,{},a,c),u=this.option(d);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}o.push(p)}}return o},i}),e.define("czrSelect2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("CzrSelect2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||r.trigger("results:message",{message:"errorLoading"})});r._request=e}var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("czrSelect2/data/tags",["jquery"],function(d){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),d.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,d){var u=this;return this._removeOldTags(),null==c.term||null!=c.page?void e.call(this,c,d):void e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if(o.text===c.term||s)return!n&&(t.data=i,void d(t))}if(n)return!0;var a=u.createTag(c);if(null!=a){var l=u.option(a);l.attr("data-czrSelect2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,d(t)})},e.prototype.createTag=function(e,t){var n=d.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-czrSelect2-tag]")).each(function(){this.selected||d(this).remove()})},e}),e.define("czrSelect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".czrSelect2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=r.option(n);i.attr("data-czrSelect2-tag",!0),r._removeOldTags(),r.addOptions([i])}t=n,r.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==u.inArray(l,r)){var c=o.substr(0,s),d=a(u.extend({},t,{term:c}));null!=d?(i(d),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("czrSelect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;return 0<o.maximumSelectionLength&&t>=o.maximumSelectionLength?void o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):void n.call(o,i,r)})},e}),e.define("czrSelect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="czrSelect2-dropdown"><span class="czrSelect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("czrSelect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('<span class="czrSelect2-search czrSelect2-search--dropdown"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("czrSelect2-search--hide"):i.$searchContainer.addClass("czrSelect2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("czrSelect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("czrSelect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="czrSelect2-results__option czrSelect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("czrSelect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("czrSelect2"),t.addClass("czrSelect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.czrSelect2."+t.id,r="resize.czrSelect2."+t.id,o="orientationchange.czrSelect2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("czrSelect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("czrSelect2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.czrSelect2."+t.id,i="resize.czrSelect2."+t.id,r="orientationchange.czrSelect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("czrSelect2-dropdown--above"),n=this.$dropdown.hasClass("czrSelect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,d=l>r.bottom+s,u={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),d||!c||t?!c&&d&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("czrSelect2-dropdown--below czrSelect2-dropdown--above").addClass("czrSelect2-dropdown--"+i),this.$container.removeClass("czrSelect2-container--below czrSelect2-container--above").addClass("czrSelect2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("czrSelect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("czrSelect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalCzrSelect2Event){var n=t.originalCzrSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("czrSelect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalCzrSelect2Event:t})},e}),e.define("czrSelect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("czrSelect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,C,w,M,z,t,I,x,S,$,E,A,R,O,k,P,D,j,T,Z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=S:null!=t.data?t.dataAdapter=x:t.dataAdapter=I,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,O)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,$)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,E)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,j)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=k;else{var i=M.Decorate(k,P);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,T)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,C)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var o=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,o)}t.selectionAdapter=M.Decorate(t.selectionAdapter,w)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new z;t.language.push("en");for(var l=t.language,c=0;c<l.length;c++){var d=l[c],u={};try{u=z.loadPath(d)}catch(e){try{d=this.defaults.amdLanguageBase+d,u=z.loadPath(d)}catch(e){t.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The language file for "'+d+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=z.loadPath(this.defaults.amdLanguageBase+"en"),h=new z(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("czrSelect2/options",["require","jquery","./defaults","./utils"],function(i,o,r,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["czrSelect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("czrSelect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The `data-czrSelect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of CzrSelect2.'),e.data("data",e.data("czrSelect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("CzrSelect2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of CzrSelect2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=o.fn.jquery&&"1."==o.fn.jquery.substr(0,2)&&e[0].dataset?o.extend(!0,{},e[0].dataset,e.data()):e.data();var i=o.extend(!0,{},n);for(var r in i=s._convertData(i))-1<o.inArray(r,t)||(o.isPlainObject(this.options[r])?o.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("czrSelect2/core",["jquery","./options","./utils","./keys"],function(r,c,n,i){var d=function(e,t){null!=e.data("czrSelect2")&&e.data("czrSelect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("czrSelect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("czrSelect2",this)};return n.Extend(d,n.Observable),d.prototype._generateId=function(e){return"czrSelect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null}return t},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.czrSelect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.czrSelect2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._syncA),r.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("czrSelect2-container--open")}),this.on("close",function(){n.$container.removeClass("czrSelect2-container--open")}),this.on("enable",function(){n.$container.removeClass("czrSelect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("czrSelect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("czrSelect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.trigger("query",{})},d.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},d.prototype.isOpen=function(){return this.$container.hasClass("czrSelect2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("czrSelect2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("czrSelect2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("enable")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('CzrSelect2: Data can no longer be set using `czrSelect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("val")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".czrSelect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("czrSelect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("czrSelect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=r('<span class="czrSelect2 czrSelect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("czrSelect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.czrSelect2",["jquery","jquery-mousewheel","./czrSelect2/core","./czrSelect2/defaults"],function(r,e,o,t){if(null==r.fn.czrSelect2){var s=["open","close","destroy"];r.fn.czrSelect2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("czrSelect2");null==e&&window.console&&console.error&&console.error("The czrSelect2('"+t+"') method was called on an element that is not using CzrSelect2."),n=e[t].apply(e,i)}),-1<r.inArray(t,s)?this:n}throw new Error("Invalid arguments for CzrSelect2: "+t)}}return null==r.fn.czrSelect2.defaults&&(r.fn.czrSelect2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.czrSelect2");return n.fn.czrSelect2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(o){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),r=i.length,o=[],s=e[t];if(r){for(var a=0;a<r;a++)o[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<r;l++)i[l].style.cssText=o[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=o(window),this.$document=o(document),this.$element=o(e),this.options=o.extend({},d,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&c)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=o('<div class="'+this.options.fillClass+'" />'),this.$handle=o('<div class="'+this.options.handleClass+'" />'),this.$range=o('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=o.proxy(this.handleDown,this),this.handleMove=o.proxy(this.handleMove,this),this.handleEnd=o.proxy(this.handleEnd,this),this.init();var n,i,r=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){r.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==r.identifier){var n=e.target.value,i=r.getPositionFromValue(n);r.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,c=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),d={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+r(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+r(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,r="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(r),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=r(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},o.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(l){if(!l.wp.wpColorPicker.prototype._hasAlpha){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",t='<div class="wp-picker-holder" />',i='<div class="wp-picker-container" />',r='<input type="button" class="button button-small" />',o=void 0!==wpColorPickerL10n.current;if(o)var s='<a tabindex="0" class="wp-color-result" />';else{s='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var a="<label></label>",d='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);return this.error?"":(e.length<6&&(e=("00000"+e).substr(-6)),"#"+e)},l.widget("wp.wpColorPicker",l.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(l.support.iris){var n=this,e=n.element;if(l.extend(n.options,e.data()),"hue"===n.options.type)return n._createHueOnly();n.close=l.proxy(n.close,n),n.initialValue=e.val(),e.addClass("wp-color-picker"),o?(e.hide().wrap(i),n.wrap=e.parent(),n.toggler=l(s).insertBefore(e).css({backgroundColor:n.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),n.pickerContainer=l(t).insertAfter(e),n.button=l(r).addClass("hidden")):(e.parent("label").length||(e.wrap(a),n.wrappingLabelText=l(d).insertBefore(e).text(wpColorPickerL10n.defaultLabel)),n.wrappingLabel=e.parent(),n.wrappingLabel.wrap(i),n.wrap=n.wrappingLabel.parent(),n.toggler=l(s).insertBefore(n.wrappingLabel).css({backgroundColor:n.initialValue}),n.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),n.pickerContainer=l(t).insertAfter(n.wrappingLabel),n.button=l(r)),n.options.defaultColor?(n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),o||n.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),o||n.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),o?e.wrap('<span class="wp-picker-input-wrap" />').after(n.button):(n.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(n.button),n.inputWrapper=e.closest(".wp-picker-input-wrap")),e.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(e,t){n.options.alpha?(n.toggler.css({"background-image":"url("+c+")"}),o?n.toggler.html('<span class="color-alpha" />'):(n.toggler.css({position:"relative"}),0==n.toggler.find("span.color-alpha").length&&n.toggler.append('<span class="color-alpha" />')),n.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:t.color.toString()})):n.toggler.css({backgroundColor:t.color.toString()}),l.isFunction(n.options.change)&&n.options.change.call(this,e,t)}}),e.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click(),e.on("czr-colorpicker-close",function(){n.toggler.hasClass("wp-picker-open")&&n.close()})}},_addListeners:function(){var t=this;t.wrap.on("click.wpcolorpicker",function(e){e.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),t.element.on("change",function(e){(""===l(this).val()||t.element.hasClass("iris-error"))&&(t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e))}),t.button.on("click",function(e){l(this).hasClass("wp-picker-clear")?(t.element.val(""),t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e)):l(this).hasClass("wp-picker-default")&&t.element.val(t.options.defaultColor).change()})},open:function(){l("body").find(".wp-color-picker").not(this.element).each(function(){l(this).trigger("czr-colorpicker-close")}),this.element.iris("toggle"),this.inputWrapper.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open").attr("aria-expanded","true")},close:function(){try{this.element.iris("toggle")}catch(e){console.log("color-picker => error on ::close()",e)}this.inputWrapper.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open").attr("aria-expanded","false")}}),l.widget("a8c.iris",l.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var n=this,e=n.element,t=l('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(n.picker.find(".iris-picker-inner")),i=t.find(".iris-slider-offset-alpha"),r={aContainer:t,aSlider:i};void 0!==e.data("custom-width")?n.options.customWidth=parseInt(e.data("custom-width"))||0:n.options.customWidth=100,n.options.defaultWidth=e.width(),(n._color._alpha<1||-1!=n._color.toString().indexOf("rgb"))&&e.width(parseInt(n.options.defaultWidth+n.options.customWidth)),l.each(r,function(e,t){n.controls[e]=t}),n.controls.square.css({"margin-right":"0"});var o=n.picker.width()-n.controls.square.width()-20,s=o/6,a=o/2-s;l.each(["aContainer","strip"],function(e,t){n.controls[t].width(a).css({"margin-left":s+"px"})}),n._initControls(),n._change()}},_initControls:function(){if(this._super(),this.options.alpha){var n=this;n.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*n._color._alpha),slide:function(e,t){n._color._alpha=parseFloat(t.value/100),n._change.apply(n,arguments)}})}},_change:function(){this._super();var e=this,t=e.element;if(this.options.alpha){var n=e.controls,i=parseInt(100*e._color._alpha),r=e._color.toRgb(),o=["rgb("+r.r+","+r.g+","+r.b+") 0%","rgba("+r.r+","+r.g+","+r.b+", 0) 100%"],s=e.options.defaultWidth,a=e.options.customWidth,l=e.picker.closest(".wp-picker-container").find(".wp-color-result");n.aContainer.css({background:"linear-gradient(to bottom, "+o.join(", ")+"), url("+c+")"}),l.hasClass("wp-picker-open")&&(n.aSlider.slider("value",i),e._color._alpha<1?(n.strip.attr("style",n.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),t.width(parseInt(s+a))):t.width(s))}(t.data("reset-alpha")||!1)&&e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color._alpha=1,e.active="external",e._change()})},_addInputListeners:function(i){var r=this,e=function(e){var t=new Color(i.val()),n=i.val();i.removeClass("iris-error"),t.error?""!==n&&i.addClass("iris-error"):t.toString()!==r._color.toString()&&("keyup"===e.type&&n.match(/^[0-9a-fA-F]{3}$/)||r._setOption("color",t.toString()))};i.on("change",e).on("keyup",r._debounce(e,100)),r.options.hide&&i.on("focus",function(){r.show()})}})}}(jQuery),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){var r=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,r({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,r({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(r,e,o){r.czr_activeSectionId=r.czr_activeSectionId||new r.Value(""),r.czr_activePanelId=r.czr_activePanelId||new r.Value(""),r.bind("ready",function(){if("function"!=typeof r.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){r.czr_activeSectionId(e?t:"")};r.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),r.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){r.czr_activePanelId(e?t:""),o.isEmpty(r.czr_activePanelId())&&r.czr_activeSectionId("")};r.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),r.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(a,e,l){a.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;l.isObject(serverControlParams.paramsForDynamicRegistration)||a.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),l.each(serverControlParams.paramsForDynamicRegistration,function(e,t){if(e.module_registration_params&&!0===e.module_registration_params.dynamic_registration)if(serverControlParams.isDevMode)n(e);else try{n(e)}catch(e){a.errorLog(e)}})});var n=function(e){if(e=l.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),l.isEmpty(e.setting_id)||l.isEmpty(e.module_type))throw a.errare("registerDynamicModuleSettingControl => args",e),new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!l.isArray(e.option_value)&&!l.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;a.CZR_Helpers.register({what:"setting",id:t,dirty:!l.isEmpty(e.option_value),value:e.option_value,transport:n.transport||"refresh",type:n.type||"option",track:!1});var i=e.section;if(!l.isEmpty(i)){if(!l.has(i,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);a.CZR_Helpers.register({what:"section",id:i.id,title:i.title||i.id,panel:l.isEmpty(i.panel)?"":i.panel,priority:i.priority||10,track:!1})}var r,o=t,s=e.control;if(r=l.isEmpty(e.section)?s.section:e.section.id,l.isEmpty(r))throw a.errare("registerDynamicModuleSettingControl => missing section id for the control",e),new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);return a.CZR_Helpers.register({what:"control",id:o,label:s.label||o,type:"czr_module",module_type:e.module_type,section:r,priority:s.priority||10,settings:{default:t},track:!1}),a.section.has(r)&&a.section(r).expanded()&&a.control(o).trigger("set-module-ready"),t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),r=this,o=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(r,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(r,[t,i,n]).promise():this._deferreds?(l.each(r._deferreds,function(e){o.push(e.apply(null,[t,i,n]))}),a.when.apply(null,o).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){r.callbacks.fireWith(r,[t,i,n]),e.resolveWith(r,[t,i,n])}),e.promise(r)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(r,[t,i,n]).promise(r)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,r=this,o=a.Deferred();return i=r.transport,l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?o.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(r.previewer.send("pre_setting",{set_id:r.id,data:n,value:e}),r.previewer.send("setting",[r.id,r()]),o.resolve(arguments)):"refresh"===i&&(r.previewer.refresh(),o.resolve(arguments)),o.promise()):o.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,r,o){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),r(window).on("resize.customizer-section",o.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(d,u,p){d.CZR_Helpers=d.CZR_Helpers||{},d.CZR_Helpers=u.extend(d.CZR_Helpers,{setupInputCollectionFromDOM:function(){var o=this;if(!p.isFunction(o))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=o.module,a=p.has(o(),"is_mod_opt");if(p.isEmpty(o.inputCollection())){o.czr_Input=o.czr_Input||new d.Values,o.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?o.defaultModOptModel:o.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+o.id+".");var l=u.extend(!0,{},o());l=p.isObject(l)?u.extend(e,l):e;var c={};return u("."+s.control.css_attr.sub_set_wrapper,o.container).length<1&&d.errare("setupInputCollectionFromDOM => no input elements found in the DOM"),u("."+s.control.css_attr.sub_set_wrapper,o.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))d.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+o.id+". The input can not be instantiated.");var i=u(this).data("input-type"),r={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:o,is_mod_opt:a,module:s};d.trigger("input-args-before-instantiation",r),o.czr_Input.add(t,new o.inputConstructor(t,r)),o.czr_Input(t).ready(),c[t]=n}}),o.inputCollection(c),o}}})}(wp.customize,jQuery,_),function(i,e,r){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=e.extend(i.CZR_Helpers,{getModuleTmpl:function(t){var n=e.Deferred();if(t=r.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:i.settings.nonce.save},t),(r.isEmpty(t.tmpl)||r.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),i.CZR_Helpers.czr_cachedTmpl=i.CZR_Helpers.czr_cachedTmpl||{},i.CZR_Helpers.czr_cachedTmpl[t.module_type]=i.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!r.isEmpty(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&r.isString(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(r.isObject(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){i.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e),r.isObject(e)&&("invalid_nonce"!==e.code&&"Bad Request"!==e.statusText||window.sektionsLocalizedData&&sektionsLocalizedData.i18n&&i.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:sektionsLocalizedData.i18n["Something went wrong, please refresh this page."]}))})}return n.promise()}})}(wp.customize,jQuery,_),function(p,h,m){p.CZR_Helpers=p.CZR_Helpers||{},p.CZR_Helpers=h.extend(p.CZR_Helpers,{register:function(e){if(m.has(e,"id")){var t,n={};switch(e.what){case"setting":if(p.has(e.id))break;t=h.extend(!0,{},p.Setting.prototype.defaults);var i=m.extend(t,{dirty:!m.isUndefined(e.dirty)&&e.dirty,value:m.isUndefined(e.value)?null:e.value,transport:e.transport||"refresh",type:e.type||"option"}),r=p.settingConstructor[i.type]||p.Setting;m.isObject(e.options)&&(i=m.extend(i,e.options));try{p.add(new r(e.id,i.value,i))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a setting to the api",e)}break;case"panel":if(!m.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(p.panel.has(e.id))break;t=h.extend(!0,{},p.Panel.prototype.defaults);var o=m.extend(t,{id:e.id,title:e.title||e.id,priority:m.has(e,"priority")?e.priority:0}),s=m.isObject(e.constructWith)?e.constructWith:p.Panel;m.isObject(e.options)&&(o=m.extend(o,e.options)),o=m.extend({params:o},o);try{n=p.panel.add(new s(e.id,o))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a panel to the api",e)}break;case"section":if(!m.has(e,"id"))throw new Error("registerSection => missing section id ");if(p.section.has(e.id))break;t=h.extend(!0,{},p.Section.prototype.defaults);var a=m.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:serverControlParams.i18n.Customizing}),l=p.Section;m.isUndefined(e.constructWith)?!m.isEmpty(e.type)&&p.sectionConstructor[e.type]&&(l=p.sectionConstructor[e.type]):l=e.constructWith,m.isObject(e.options)&&(a=m.extend(a,e.options)),a=m.extend({params:a},a);try{n=p.section.add(new l(e.id,a))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a section to the api",e)}break;case"control":if(p.control.has(e.id))break;t=h.extend(!0,{},p.Control.prototype.defaults);var c,d=m.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=p.controlConstructor[d.type]||p.Control;m.isObject(e.options)&&(d=m.extend(d,e.options)),c=m.extend({params:d},d);try{n=p.control.add(new u(e.id,c))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a control to the api",e)}break;default:p.errorLog('invalid "what" when invoking the register() method')}return n=m.isEmpty(n)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:n,!1!==e.track&&p.trigger("czr-new-registered",e),"setting"==e.what?e:n.deferred.embedded}p.errare("register => missing id ",e)}})}(wp.customize,jQuery,_),function(i,r,o){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=r.extend(i.CZR_Helpers,{css_loader_html:'<div class="czr-css-loader czr-mr-loader" style="display:none"><div></div><div></div><div></div></div>',getControlSettingId:function(e,t){return t="default",i.control.has(e)?!o.has(i.control(e),"settings")||o.isEmpty(i.control(e).settings)?e:o.has(i.control(e).settings,t)?o.isUndefined(i.control(e).settings[t].id)?(i.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):i.control(e).settings[t].id:(i.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=o.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return o.isUndefined(window.themeServerControlParams)||!o.isArray(themeServerControlParams.wpBuiltinSettings)?e:o.contains(themeServerControlParams.wpBuiltinSettings,e)?e:o.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(o.isEmpty(window.themeServerControlParams)||o.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(o.has(i,"czr_partials"))return o.contains(o.map(i.czr_partials(),function(e,t){return o.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||i.czr_activeSectionId(),i.section.has(e)?o.map(i.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||i.czr_activeSectionId(),i.section.has(e)){var n=[],t=this.getSectionControlIds(e);return o.each(t,function(e){o.each(i.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return o.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!o.isString(e))return"";t=t||20;var i=e.length>t,r=i?e.substr(0,t-1):e;return r=n&&i?r.substr(0,r.lastIndexOf(" ")):r,i?r+"...":r},isMultiItemModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||i.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].has_mod_opt||!1}},removeInputCollection:function(){var t=this;if(!o.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");o.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=i.controlConstructor.czr_module,n=(i.control(e).params.type,i.settings.controls[e]);r.when(i.control(e).container.remove()).done(function(){i.control.remove(e),i.control.add(e,new t(e,{params:n,previewer:i.previewer}))})},isChecked:function(e){return o.isBoolean(e)?e:o.isNumber(e)?0<e:!!o.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return i.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:o.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||o.template(t,i))(e)}})})}(wp.customize,jQuery,_),function(a,l,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=c.clone(n[e]),n[e]=c.union(new_event_map,c.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,r,o){var s=this;o=o||s,c.isArray(e)?c.isObject(r)?(r=c.extend({model:{},dom_el:{}},r)).dom_el instanceof jQuery&&!(r.dom_el.length<1)?c.map(e,function(i){if(c.isString(i.selector)&&!c.isEmpty(i.selector))if(c.isString(i.selector)&&!c.isEmpty(i.selector)){var e=i.name&&!c.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=r.dom_el.data("czr-listener-collection");if(t&&c.isArray(t)){if(t=c.isArray(t)?t:[],c.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];r.dom_el.data("czr-listener-collection",t),r.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},r);if(c.has(n,"model")&&c.has(n.model,"id")&&(c.has(o,"get")?n.model=o():n.model=o.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),c.has(n,"event")&&c.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,o);else try{s.executeEventActionChain(n,o)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",r):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",r)},executeEventActionChain:function(i,r){var o=this;if("function"==typeof i.event.actions)return i.event.actions.call(r,i);c.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;c.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof r[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=r[e]}var n=c.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:o.container;"string"==typeof e&&n.trigger("before_"+e,c.omit(i,"event")),!1===t.call(r,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,c.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(i,e,r){i.czr_wpQueryDataReady=i.czr_wpQueryDataReady||e.Deferred(),i.czr_wpQueryInfos=i.czr_wpQueryInfos||new i.Value,i.bind("ready",function(){i.previewer.bind("czr-query-data-ready",function(e){i.czr_wpQueryInfos(e),"pending"==i.czr_wpQueryDataReady.state()&&i.czr_wpQueryDataReady.resolve(e)}),i.previewer.bind("czr-partial-refresh-data",function(e){i.czr_partials=i.czr_partials||new i.Value,i.czr_partials.set(e)}),i.previewer.bind("czr-partial-refresh-done",function(e){if(r.has(e,"set_id")){var t=i.CZR_Helpers.build_setId(e.set_id);if(i.has(t)){var n=i.CZR_Helpers.getControlSettingId(t);i.control.has(n)&&i.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(r,o,a){o.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");r.Value.prototype.initialize.call(this,null,t);var n=this;o.extend(n,t||{}),n.constructorOptions=o.extend(!0,{},t),n.isReady=o.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:o.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],r.czrInputMap&&a.has(r.czrInputMap,n.type)){var i=r.czrInputMap[n.type];if(a.isFunction(n[i]))try{n[i](t.input_options||null)}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}else if(a.isFunction(r.czrInputMap[n.type]))try{r.czrInputMap[n.type].apply(n,[t.input_options||null])}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}}else r.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new r.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new r.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),o.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]"),i=(e.container.find("[data-czrtype]").is("textarea"),new r.Element(n));t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,r=i.input_parent(),o=a.clone(r),s=i.is_preItemInput;i.enabled()&&((o=!a.isObject(o)||a.isEmpty(o)?{}:o)[i.id]=e,i.input_parent.set(o,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){o("select",this.container).not(".no-selecter-js").each(function(){o(this).selecter({})})},setupIcheck:function(e){o("input[type=checkbox]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(this).val(!1===o(this).is(":checked")?0:1),o(e.currentTarget).trigger("change")})})},setupNimbleCheck:function(e){this.container.find("input[type=checkbox]"),o(".czr-toggle-check",this.container)},setupRadio:function(e){o("input[type=radio]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(e.currentTarget).trigger("change")})})},setupStepper:function(e){o('input[type="number"]',this.container).each(function(e){o(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,r=function(e,t){var n=i.container.find("input").data("unit");e.textContent=t+(a.isEmpty(i.container.find("input").data("unit"))?"":n)};o(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=o(".rangeslider__handle",this.$range),o(".rangeslider__handle",this.$range),r(n[0],this.value)},onSlide:function(e,t){r(n[0],t)}})},setupHAlignement:function(e){var t=this,n=o(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),o.when(o(this).addClass("selected")).done(function(){t(o(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(r,i,o){i.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=o.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=i.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){r.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(o.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):o.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),o.isObject(n)&&o.has(n,"attributes")&&o.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):o.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){r.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;o.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=i.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=o.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return r.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(r.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return o.each(t,function(e,t){if(o.isEmpty(e))return r.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var r=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),r.wpObjectTypes=e,r.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),r.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).czrSelect2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),r.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],r.isReady.done(function(){r.setupContentSelecter()})},setupContentSelecter:function(){var o=this;if(!l.isEmpty(o())){var e={value:o().id||"",title:o().title||"",selected:"selected"};o.container.find("select").append(a("<option>",e))}o.currentAjaxAction=o.currentAjaxAction||new s.Value,o.currentAjaxAction.bind(function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").on("czrSelect2:select czrSelect2:unselect czrSelect2:close czrSelect2:open",function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").czrSelect2({placeholder:{id:"-1",title:"Select"},data:o.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,o.currentAjaxAction(e.term?"search-available-content-items-customizer":"load-available-content-items-customizer"),{action:o.currentAjaxAction(),search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(o.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:{id:"",title:"",type_label:"",object_type:"",url:""}};if(o.input_parent&&o.input_parent.module?o.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,r=[];return i=l.isArray(i)?i:[],o.defaultValueHasBeenPushed=o.defaultValueHasBeenPushed||!1,"load-available-content-items-customizer"!==o.currentAjaxAction()||l.isEmpty(n.defaultOption)||n.defaultOption.id&&!o.defaultValueHasBeenPushed&&(r.push(n.defaultOption),o.defaultValueHasBeenPushed=!0),l.each(i,function(e){r.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:r,pagination:{more:1<=i.length}}}},templateSelection:o.czrFormatContentSelected,templateResult:o.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(r,o,s){o.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;r.Value.prototype.initialize.call(n,null,t),n.isReady=o.Deferred(),n.embedded=o.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new r.Values,n.inputCollection=new r.Value({}),n.viewState=new r.Value("closed"),n.removeDialogVisible=new r.Value(!1),o.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=o.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new r.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)}},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=o(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){r.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&r.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,r=i.module;n=n||{},r.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,r=[];l.each(e,function(e,t){e!=n[t]&&r.push(t)}),l.each(r,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},removeItem:function(e){var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var r=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",r),n.control.trigger("item-removed",r);else{var o=function(){s.previewer.unbind("ready",o),n.trigger("item-removed",r)};s.previewer.bind("ready",o),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(c,d,u){d.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||d.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n,i=this,r=i.module,o=d.Deferred(),s=d.extend(!0,{},e||i()),a=function(e){r.isMultiItem()&&(u.isEmpty(e)&&o.reject("renderItemWrapper => Missing html template for module : "+r.id),t.append(e)),t.append(d("<div/>",{class:r.control.css_attr.item_content})),o.resolve(t)};if(i.trigger("item-model-before-item-wrapper-template-injection",s),t=d("<li>",{class:r.control.css_attr.single_item,"data-id":s.id,id:s.id}),r.itemsWrapper.append(t),r.isMultiItem())if(u.isEmpty(r.rudItemPart)){var l={tmpl:"rud-item-part",module_type:"all_modules",module_id:r.id,control_id:r.control.id};i.trigger("item-wrapper-tmpl-params-before-fetching",l),u.isEmpty(r[l.tmpl])?c.CZR_Helpers.getModuleTmpl(l).done(function(e){a(c.CZR_Helpers.parseTemplate(e)({is_sortable:r.sortable}))}).fail(function(e){o.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+r.id)}):(n=r.getTemplateSelectorPart(l.tmpl,s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s)))}else n=r.getTemplateSelectorPart("rudItemPart",s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s));else a();return o.promise()},itemWrapperViewSetup:function(e){var r=this,i=this.module;item_model=r()||r.initial_item_model,r.writeItemViewTitle();var o=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+r.module.id+", the item content has not been rendered for "+r.id);r.contentContainer=e,r.trigger("contentRendered",{item_content:e}),r.toggleItemExpansion(t,r.module.isMultiItem()?150:0),r.cleanLoader()};r.module.isMultiItem()?r.viewState.callbacks.add(function(t,e){var n=-1!==t.indexOf("expanded");i.hasModOpt()&&n&&c.czr_ModOptVisible(!1,{module:i,focus:!1}),n?u.isObject(r.contentContainer)&&!1!==r.contentContainer.length?r.toggleItemExpansion(t):(r.printLoader(),r.renderItemContent(r()||r.initial_item_model).done(function(e){o(e,t)}).fail(function(e){c.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)})):r.toggleItemExpansion(t).done(function(){u.isObject(r.contentContainer)&&!1!==r.contentContainer.length&&(r.trigger("beforeContenRemoved"),d("."+i.control.css_attr.item_content,r.container).children().each(function(){d(this).remove()}),d("."+i.control.css_attr.item_content,r.container).html(""),r.contentContainer=null,r.trigger("contentRemoved"))})}):(r.viewState.callbacks.add(function(e,t){r.toggleItemExpansion.apply(r,[e,0])}),r.printLoader(),r.renderItemContent(item_model).done(function(e){o(e,!0)}).fail(function(e){c.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),c.CZR_Helpers.setupDOMListeners(r.userEventMap(),{model:item_model,dom_el:r.container},r),r.removeDialogVisible.bind(function(e){var t=r.module,n=d("."+t.control.css_attr.remove_alert_wrapper,r.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&c.czr_ModOptVisible(!1,{module:t,focus:!1}),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),d("."+t.control.css_attr.remove_alert_wrapper,r.container).not(n).each(function(){d(this).hasClass("open")&&d(this).slideToggle({duration:200,done:function(){d(this).toggleClass("open",!1),d(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))c.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(c.CZR_Helpers.parseTemplate(e)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}).fail(function(e){c.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(d("#tmpl-"+t.alertPart).length<1||u.isEmpty(r.container))return void c.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),r.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(r.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,r=d.Deferred(),t=d.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var o=function(e){u.isEmpty(e)&&r.reject("renderItemContent => Missing html template for module : "+i.id);var t=d("."+i.control.css_attr.item_content,n.container);d(e).appendTo(t),r.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);d("#tmpl-"+s).length<1?r.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s):o(wp.template(s)(t))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),c.CZR_Helpers.getModuleTmpl(a).done(function(e){o(c.CZR_Helpers.parseTemplate(e)(d.extend(t,{control_id:i.control.id})))}).fail(function(e){r.reject(e)})}return r.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),r=u.has(i,"title")&&!u.isEmpty(i.title)?c.CZR_Helpers.capitalize(i.title):i.id;r=c.CZR_Helpers.truncate(r,20),d("."+n.control.css_attr.item_title,t.container).text(r),c.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e){var t="closed"!=n,i=this,r=this.module,o=d("."+r.control.css_attr.item_content,i.container).first(),s=d.Deferred(),a=function(e){i.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=o.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(i.container),s.resolve()};return e=u.isUndefined(e)?150:e,t?o.stop(!0,!0).slideDown(e,function(){a(t)}):o.stop(!0,!0).slideUp(0,function(){a(t)}),s.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){d(this).remove()}})},printLoader:function(){var e=this;e.container.css({position:"relative"}).append(c.CZR_Helpers.css_loader_html).find(".czr-css-loader").fadeIn("fast"),clearTimeout(d.data(this,"_czr_loader_active_timer_")),d.data(this,"_czr_loader_active_timer_",setTimeout(function(){e.cleanLoader()},5e3))},cleanLoader:function(){this.container.css({"min-height":""}).find(".czr-css-loader").remove()}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,o,s){o.extend(CZRModOptMths,{initialize:function(e){if(s.isUndefined(e.module)||s.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var t=this;r.Value.prototype.initialize.call(t,null,e),t.isReady=o.Deferred(),t.container=null,t.inputCollection=new r.Value({}),o.extend(t,e||{}),t.defaultModOptModel=s.clone(e.defaultModOptModel)||{is_mod_opt:!0};var n=o.extend(t.defaultModOptModel,e.initial_modOpt_model),i=t.module.control;t.set(n),t.isReady.done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).length||o.when(i.container.find(".customize-control-title").first().append(o("<span/>",{class:[i.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible(),{module:t.module,focus:!1})}}],{dom_el:i.container},t)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(o,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,r=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,o.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){o.czr_ModOptVisible(!1,{module:i,focus:!1})}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=s(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}],{dom_el:t},n),r.resolve(e)}).fail(function(e){o.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),r.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var r=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){o.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))o.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){r(o.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),r(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{initialize:function(e,t){if(a.isUndefined(t.control)||a.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;o.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:"",rudItemPart:"",ruItemPart:"",alertPart:"",itemInputList:"",modOptInputList:""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=n.modOptConstructor||o.CZRModOpt,n.itemCollection=new o.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=o.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||o.CZRItem,n.czr_Item=new o.Values,n.inputConstructor=n.inputConstructor||o.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=n.inputModOptConstructor||o.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new o.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){o.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),!1!==n.sortable&&n._makeItemsSortable()}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===o.czrModuleMap[n.module_type].ready_on_section_expanded&&(a.has(o,"czr_activeSectionId")&&n.control.section()==o.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),o.section(n.control.section(),function(e){e.expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}));var i=o.czrModuleMap[n.module_type].ready_on_control_event;a.isUndefined(i)||o.control(n.control.id,function(e){e.container.on(i,function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}),this.maybeAwakeAndBindSharedModOpt()},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&a.isEmpty(e.items)){var n=a.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),r=s.extend(!0,{},i);r.items=e,this.isDirty.set(!0),this.set(r,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;a.size(t.items)==a.size(e.items)&&a.isEmpty(a.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return o.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return o.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return o.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var o=this,e=o.prepareModOptForAPI(o().modOpt||{});o.czr_ModOpt=new o.modOptConstructor(e),o.czr_ModOpt.ready(),o.czr_ModOpt.callbacks.add(function(e,t,n){var i=o(),r=s.extend(!0,{},i);r.modOpt=e,o.isDirty(!0),o(r,n)})},prepareModOptForAPI:function(n){var i=this,r={};return n=a.isObject(n)?n:{},a.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":a.each(i.getDefaultModOptModel(),function(e,t){a.has(n,t)||(n[t]=e)}),r[t]=n;break;case"defaultModOptModel":r[t]=a.clone(i.defaultModOptModel);break;case"control":r[t]=i.control;break;case"module":r[t]=i}}),r},getDefaultModOptModel:function(e){return s.extend(a.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=a.extend({input_id:"",input_parent_id:"",to:null,from:null},e),a.isEqual(e.to,e.from)||(o.previewer.send("czr_input",{set_id:o.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var r=this,t=function(){var n=this,e=s.extend(!0,{},n());e=a.omit(e,"id"),a.each(e,function(e,t){r.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};r.czr_Item.each(function(e){t.call(e)}),r.hasModOpt()&&t.call(r.czr_ModOpt)},maybeAwakeAndBindSharedModOpt:function(){a.isUndefined(o.czr_ModOptVisible)&&(o.czr_ModOptVisible=new o.Value(!1),o.czr_ModOptVisible.bind(function(t,e,n){if(n=n||{},a.isFunction(n.module)&&a.isFunction(n.module.czr_ModOpt)){var i=n.module.czr_ModOpt,r=n.module;t?(r.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(i()).done(function(e){i.container=e;try{o.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){o.consoleLog(e)}r&&n.focus&&a.delay(function(){!a.isNull(i.container)&&i.container.find('[data-tab-id="'+n.focus+'"] a').length&&i.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){i.container&&0<i.container.length?s.when(i.container.remove()).done(function(){o.CZR_Helpers.removeInputCollection.call(i)}):o.CZR_Helpers.removeInputCollection.call(i),i.container=null})}else o.errare("moduleCtor::maybeAwakeAndBindSharedModOpt => api.czr_ModOptVisible.bind() => incorrect arguments",n)}))}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,i=this;a.isArray(e||i().items)?(t=s.extend(!0,[],e||i().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),i.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(t,e){var n=function(){var e=i.instantiateItem(t);a.isFunction(e)?e.ready():r.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,t)};if(serverControlParams.isDevMode)n();else try{n()}catch(e){r.errare("populateSavedItemCollection => "+e)}}),a.each(t,function(e){if(a.isObject(e)&&a.isUndefined(a.findWhere(i.itemCollection(),e.id)))throw new Error("populateSavedItemCollection => The saved items have not been properly populated in module : "+i.id)}),i.trigger("items-collection-populated")):r.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+i.id)},instantiateItem:function(e,t){var n=this;if(e=a.isObject(e)?e:{},(e=n.validateItemBeforeAddition(e,t))&&!a.isNull(e))if(e=n.prepareItemForAPI(e),a.isObject(e)){if(e&&!a.isNull(e)){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateItem() => an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => the following item id "+e.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(e.id,new n.itemConstructor(e.id,e)),!n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => instantiation failed for item id "+e.id+" for module "+this.id);return n.czr_Item(e.id)}r.errare("CZRModule::instantiateItem() => item_candidate invalid in module "+n.id)}else r.errare("CZRModule::instantiateItem() => an item should be described by an object in module type : "+n.module_type,"module id : "+n.id);else r.errare("CZRModule::instantiateItem() => item_candidate did not pass validation in module "+n.id)},validateItemBeforeAddition:function(e,t){return e},prepareItemForAPI:function(i){var r=this,o={};return i=a.isObject(i)?i:{},a.each(r.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateItemId(r.module_type):r.isItemRegistered(n)?r.generateItemId(n):o[t]=n;break;case"initial_item_model":a.each(r.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),o[t]=i;break;case"defaultItemModel":o[t]=a.clone(r.defaultItemModel);break;case"control":o[t]=r.control;break;case"module":o[t]=r;break;case"is_added_by_user":o[t]=!!a.isBoolean(n)&&n}}),a.has(o,"id")||(o.id=r.generateItemId(r.module_type)),o.initial_item_model.id=o.id,r.validateItemBeforeInstantiation(o)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(r)?(t++,n++,i.generateItemId(e,t,n)):r},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),r=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var o=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(o,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:o.id})?a.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o),t.itemCollection.set(i,e.params),r.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new r.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,o,s){o.extend(CZRModuleMths,{getDefaultItemModel:function(e){return o.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,r={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),r=e&&!s.isEmpty(e)?o.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(r,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(r,t)||(r[t]=e)}),r):i._initNewItem(r,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),r=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&r.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),r.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?o.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.errare("renderModuleParts => fail response =>",e),r.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&r.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),r.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),r=i.scrollTop(),o=t||90;setTimeout(function(){e.offset().top+e.height()+o>s(window.top).height()&&0<(n=e.offset().top+e.height()+o-s(window.top).height())&&i.animate({scrollTop:r+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){o.previewer.refresh()};"postMessage"!=o(n.control.id).transport||o.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).show()})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage;var i=function(e){n.addItem(e).done(function(e){n.czr_Item(e,function(e){e.embedded.then(function(){e.viewState("expanded")})})}).fail(function(e){s.errare("module.addItem failed on add_item",e)})};n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t={addTheItem:!0};this.trigger("is-item-addition-possible",t),t.addTheItem&&this.hasPreItem?this.preItemExpanded.set(!this.preItemExpanded()):i(e)}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e),i(e)}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},itemCanBeInstantiated:function(){return!0},addItem:function(n){var t=a.Deferred();if(!this.itemCanBeInstantiated())return t.reject().promise();var i=this,r=i.preItem(),o=function(){i.preItemExpanded.set(!1)};if(l.isEmpty(r)||!l.isObject(r))return s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),t.reject().promise();o=l.debounce(o,200);var e=function(){var e=i.instantiateItem(r,!0);return l.isFunction(e)?e.ready():s.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,r),e};if(serverControlParams.isDevMode)e();else try{e()}catch(e){return s.errare("populateSavedItemCollection : "+e),t.reject().promise()}return i.czr_Item.has(r.id)?(a.Deferred(function(){var t=this;i.czr_Item(r.id).isReady.then(function(){o(),i.trigger("item-added",r);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)?t.resolve():(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){t.resolve(r.id)}),t.promise()):t.reject("populateSavedItemCollection : the item "+r.id+" has not been instantiated in module "+i.id).promise()}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(r,o,s){o.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=o.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=o("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(o("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?r.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(o("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return o("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;o("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=o("."+n.control.css_attr.open_pre_add_btn,n.container);o(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),o(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(o(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=o("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=o("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,r){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=r.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){r.has(n,"czr_moduleCollection")&&r.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,c,d){c.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=c.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section(n.section(),function(e){e.expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),d.has(e,"preItem")&&e.preItemExpanded(!1)})})})},ready:function(){var n=this,i={};try{n.getSavedModules()}catch(e){return l.errare("api.CZRBaseControl::ready() => error on control.getSavedModules()",e),void n.moduleCollectionReady.reject()}d.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("api.CZRBaseControl::Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var n=this,e=[],i=n.params.module_type,r=[],o=[],s={};l.CZR_Helpers.isMultiItemModule(i)||d.isEmpty(l(n.id)())||d.isObject(l(n.id)())||l.errare("api.CZRBaseControl::getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var t=l.CZR_Helpers.getControlSettingId(n.id),a=l(t)();return r=d.isEmpty(a)?[]:d.isArray(a)?a:[a],d.each(r,function(e,t){d.isObject(e)?(d.isEmpty(e)||d.each(e,function(e,t){d.isString(t)||l.errare("api.CZRBaseControl::::getSavedModules => item not well formed in control : "+n.id+" => module type => "+n.params.module_type,r)}),l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(d.has(e,"id")?l.errare("api.CZRBaseControl::getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):s=e),d.has(e,"is_mod_opt")||o.push(e)):l.errare("api.CZRBaseControl::::getSavedModules => an item must be an object in control "+n.id+" => module type => "+n.params.module_type,r)}),e.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:c.extend(!0,{},s),items:c.extend(!0,[],o)}),e},isModuleRegistered:function(e){return!d.isUndefined(d.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var r=this,o={};return a.each(r.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateModuleId(i.module_type):o[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");o[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");o[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");o[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');o[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');o[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');o[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].multi_item,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');o[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud),a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].multi_item);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');o[t]=n||!1;break;case"control":o[t]=r;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");o[t]=n;break;case"dirty":o[t]=n||!1}}),o},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(r)?(t++,n++,i.generateModuleId(e,t,n)):r},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var r=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:r.id})?l.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r);var o={};l.has(e,"data")&&(o=a.extend(!0,{},e.data),a.extend(o,{module:r})),t.czr_moduleCollection.set(i,o)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),r=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,r){var o=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});o=o[0],this.czr_Module.remove(o.id)}if(l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),!i)if(serverControlParams.isDevMode)s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n);else try{s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)}catch(e){s.errare("api.CZRBaseControl::moduleCollectionReact => error when firing control.filterModuleCollectionBeforeAjax( to )",e)}},filterModuleCollectionBeforeAjax:function(e){var t,i=this,n=a.extend(!0,[],e),r=[];if(l.each(n,function(e,t){var n=a.extend(!0,{},e);r[t]=i.prepareModuleForDB(n)}),1<l.size(n))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(n)||l.isEmpty(n)||!l.has(n[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var o=n[0].id;if(!i.czr_Module.has(o))throw new Error("The single module control ("+i.id+") has no module registered with the id "+o);var s=i.czr_Module(o);if(!l.isArray(s().items))throw new Error("The module "+o+" should be an array in control : "+i.id);return t=s.isMultiItem()?s().items:s().items[0]||[],t=s.filterItemsBeforeCoreApiSettingValue(t),s.hasModOpt()?l.union([s().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return l.each(e.items,function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module item must be an object")}),t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",checkbox:"setupIcheck",nimblecheck:"",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(t,e){jQuery(function(n){var i,e=t.customize||e;i=n("<span/>",{class:"customize-controls-home-or-add fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),n.when(n("#customize-header-actions").append(i)).done(function(){i.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home-or-add",function(){e.section.has(e.czr_activeSectionId())?e.section(e.czr_activeSectionId()).expanded(!1):e.section.each(function(e){e.expanded(!1)}),e.panel.each(function(e){e.expanded(!1)})}),_.delay(function(){if(!i.hasClass("button-see-me")){var e=0,t=function(){n.Deferred(function(){var e=this;i.addClass("button-see-me"),_.delay(function(){i.removeClass("button-see-me"),e.resolve()},800)}).done(function(){0<=--e&&_.delay(function(){t()},50)})};t()}},2e3)})})}(wp);
1
+ "function"!=typeof jQuery.fn.iCheck&&function(v){function _(e,t,n){var i=e[0],r=/er/.test(n)?$:/bl/.test(n)?x:I,o=n==E?{checked:i[I],disabled:i[x],indeterminate:"true"==e.attr($)||"false"==e.attr(S)}:i[r];if(/^(ch|di|in)/.test(n)&&!o)y(e,r);else if(/^(un|en|de)/.test(n)&&o)b(e,r);else if(n==E)for(r in o)o[r]?y(e,r,!0):b(e,r,!0);else t&&"toggle"!=n||(t||e[k]("ifClicked"),o?i[A]!==z&&b(e,r):y(e,r))}function y(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));if(!0!==i[t]){if(!n&&t==I&&i[A]==z&&i.name){var u=e.closest("form"),p='input[name="'+i.name+'"]';(p=u.length?u.find(p):v(p)).each(function(){this!==i&&v(this).data(w)&&b(v(this),t)})}s?(i[t]=!0,i[I]&&b(e,I,"force")):(n||(i[t]=!0),o&&i[$]&&b(e,$,!1)),f(e,o,t,n)}i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"default"),r[R](d||h(e,t)||""),a?r.attr("aria-disabled","true"):r.attr("aria-checked",s?"mixed":"true"),r[O](c||h(e,l)||"")}function b(e,t,n){var i=e[0],r=e.parent(),o=t==I,s=t==$,a=t==x,l=s?S:o?g:"enabled",c=h(e,l+m(i[A])),d=h(e,t+m(i[A]));!1!==i[t]&&((s||!n||"force"==n)&&(i[t]=!1),f(e,o,l,n)),!i[x]&&h(e,D,!0)&&r.find("."+M).css(D,"pointer"),r[O](d||h(e,t)||""),a?r.attr("aria-disabled","false"):r.attr("aria-checked","false"),r[R](c||h(e,l)||"")}function C(e,t){e.data(w)&&(e.parent().html(e.attr("style",e.data(w).s||"")),t&&e[k](t),e.off(".i").unwrap(),v(P+'[for="'+e[0].id+'"]').add(e.closest(P)).off(".i"))}function h(e,t,n){return e.data(w)?e.data(w).o[t+(n?"":"Class")]:void 0}function m(e){return e.charAt(0).toUpperCase()+e.slice(1)}function f(e,t,n,i){i||(t&&e[k]("ifToggled"),e[k]("ifChanged")[k]("if"+m(n)))}var w="iCheck",M=w+"-helper",z="radio",I="checked",g="un"+I,x="disabled",S="determinate",$="in"+S,E="update",A="type",R="addClass",O="removeClass",k="trigger",P="label",D="cursor",j=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);v.fn[w]=function(t,n){var i='input[type="checkbox"], input[type="'+z+'"]',r=v(),e=function(e){e.each(function(){var e=v(this);r=e.is(i)?r.add(e):r.add(e.find(i))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(t))return t=t.toLowerCase(),e(this),r.each(function(){var e=v(this);"destroy"==t?C(e,"ifDestroyed"):_(e,!0,t),v.isFunction(n)&&n()});if("object"!=typeof t&&t)return this;var d=v.extend({checkedClass:I,disabledClass:x,indeterminateClass:$,labelHover:!0,aria:!1},t),o=d.handle,u=d.hoverClass||"hover",p=d.focusClass||"focus",h=d.activeClass||"active",m=!!d.labelHover,f=d.labelHoverClass||"hover",g=0|(""+d.increaseArea).replace("%","");return("checkbox"==o||o==z)&&(i='input[type="'+o+'"]'),g<-50&&(g=-50),e(this),r.each(function(){var i=v(this);C(i);var r=this,e=r.id,t={position:"absolute",top:n=-g+"%",left:n,display:"block",width:t=100+2*g+"%",height:t,margin:0,padding:0,background:"#fff",border:0,opacity:0},n=j?{position:"absolute",visibility:"hidden"}:g?t:{position:"absolute",opacity:0},o="checkbox"==r[A]?d.checkboxClass||"icheckbox":d.radioClass||"i"+z,s=v(P+'[for="'+e+'"]').add(i.closest(P)),a=!!d.aria,l=w+"-"+Math.random().toString(36).substr(2,6),c='<div class="'+o+'" '+(a?'role="'+r[A]+'" ':"");a&&s.each(function(){c+='aria-labelledby="',this.id?c+=this.id:(this.id=l,c+=l),c+='"'}),c=i.wrap(c+"/>")[k]("ifCreated").parent().append(d.insert),t=v('<ins class="'+M+'"/>').css(t).appendTo(c),i.data(w,{o:d,s:i.attr("style")}).css(n),d.inheritClass&&c[R](r.className||""),d.inheritID&&e&&c.attr("id",w+"-"+e),"static"==c.css("position")&&c.css("position","relative"),_(i,!0,E),s.length&&s.on("click.i mouseover.i mouseout.i touchbegin.i touchend.i",function(e){var t=e[A],n=v(this);if(!r[x]){if("click"==t){if(v(e.target).is("a"))return;_(i,!1,!0)}else m&&(/ut|nd/.test(t)?(c[O](u),n[O](f)):(c[R](u),n[R](f)));if(!j)return!1;e.stopPropagation()}}),i.on("click.i focus.i blur.i keyup.i keydown.i keypress.i",function(e){var t=e[A];return e=e.keyCode,"click"!=t&&("keydown"==t&&32==e?(r[A]==z&&r[I]||(r[I]?b(i,I):y(i,I)),!1):void("keyup"==t&&r[A]==z?!r[I]&&y(i,I):/us|ur/.test(t)&&c["blur"==t?O:R](p)))}),t.on("click mousedown mouseup mouseover mouseout touchbegin.i touchend.i",function(e){var t=e[A],n=/wn|up/.test(t)?h:u;if(!r[x]){if("click"==t?_(i,!1,!0):(/wn|er|in/.test(t)?c[R](n):c[O](n+" "+h),s.length&&m&&n==u&&s[/ut|nd/.test(t)?O:R](f)),!j)return!1;e.stopPropagation()}})})}}(window.jQuery||window.Zepto),"function"!=typeof jQuery.fn.selecter&&function(d,r){"use strict";function o(e,t){if(!e.hasClass("selecter-element")){(t=d.extend({},t,e.data("selecter-options"))).external&&(t.links=!0);var n=e.find("option, optgroup"),i=n.filter("option"),r=i.filter(":selected"),o=""!==t.label?-1:i.index(r),s=t.links?"nav":"div";t.tabIndex=e[0].tabIndex,e[0].tabIndex=-1,t.multiple=e.prop("multiple"),t.disabled=e.is(":disabled");var a="<"+s+' class="selecter '+t.customClass;C?a+=" mobile":t.cover&&(a+=" cover"),a+=t.multiple?" multiple":" closed",t.disabled&&(a+=" disabled"),a+='" tabindex="'+t.tabIndex+'">',t.multiple||(a+='<span class="selecter-selected'+(""!==t.label?" placeholder":"")+'">',a+=d("<span></span").text(y(""!==t.label?t.label:r.text(),t.trim)).html(),a+="</span>"),a+='<div class="selecter-options">',a+="</div>",a+="</"+s+">",e.addClass("selecter-element").after(a);var l=e.next(".selecter"),c=d.extend({$select:e,$allOptions:n,$options:i,$selecter:l,$selected:l.find(".selecter-selected"),$itemsWrapper:l.find(".selecter-options"),index:-1,guid:b++},t);u(c),_(o,c),void 0!==d.fn.scroller&&c.$itemsWrapper.scroller(),c.$selecter.on("touchstart.selecter click.selecter",".selecter-selected",c,p).on("click.selecter",".selecter-item",c,m).on("close.selecter",c,h).data("selecter",c),c.$select.on("change.selecter",c,f),C||(c.$selecter.on("focus.selecter",c,g).on("blur.selecter",c,v),c.$select.on("focus.selecter",c,function(e){e.data.$selecter.trigger("focus")}))}}function u(e){for(var t="",n=e.links?"a":"span",i=0,r=e.$allOptions.length;i<r;i++){var o=e.$allOptions.eq(i);if("OPTGROUP"===o[0].tagName)t+='<span class="selecter-group',o.is(":disabled")&&(t+=" disabled"),t+='">'+o.attr("label")+"</span>";else{var s=o.val();o.attr("value")||o.attr("value",s),t+="<"+n+' class="selecter-item',o.is(":selected")&&""===e.label&&(t+=" selected"),o.is(":disabled")&&(t+=" disabled"),t+='" ',t+=e.links?'href="'+s+'"':'data-value="'+s+'"',t+=">"+d("<span></span>").text(y(o.text(),e.trim)).html()+"</"+n+">",0}}e.$itemsWrapper.html(t),e.$items=e.$selecter.find(".selecter-item")}function p(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$select.is(":disabled"))if(d(".selecter").not(t.$selecter).trigger("close.selecter",[t]),C){var n=t.$select[0];if(r.document.createEvent){var i=r.document.createEvent("MouseEvents");i.initMouseEvent("mousedown",!1,!0,r,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}else n.fireEvent&&n.fireEvent("onmousedown")}else t.$selecter.hasClass("closed")?function(e){e.preventDefault(),e.stopPropagation();var t=e.data;if(!t.$selecter.hasClass("open")){var n=t.$selecter.offset(),i=c.outerHeight(),r=t.$itemsWrapper.outerHeight(!0),o=0<=t.index?t.$items.eq(t.index).position():{left:0,top:0};n.top+r>i&&t.$selecter.addClass("bottom"),t.$itemsWrapper.show(),t.$selecter.removeClass("closed").addClass("open"),c.on("click.selecter-"+t.guid,":not(.selecter-options)",t,s),void 0!==d.fn.scroller?t.$itemsWrapper.scroller("scroll",t.$itemsWrapper.find(".scroller-content").scrollTop()+o.top,0).scroller("reset"):t.$itemsWrapper.scrollTop(t.$itemsWrapper.scrollTop()+o.top)}}(e):t.$selecter.hasClass("open")&&h(e)}function s(e){e.preventDefault(),e.stopPropagation(),0===d(e.currentTarget).parents(".selecter").length&&h(e)}function h(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.hasClass("open")&&(t.$itemsWrapper.hide(),t.$selecter.removeClass("open bottom").addClass("closed"),c.off(".selecter-"+t.guid))}function m(e){e.preventDefault(),e.stopPropagation();var t=d(this),n=e.data;if(!n.$select.is(":disabled")){if(n.$itemsWrapper.is(":visible"))_(n.$items.index(t),n),a(n);n.multiple||h(e)}}function f(e,t){var n=d(this),i=e.data;t||i.multiple||(_(i.$options.index(i.$options.filter("[value='"+n.val().replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1")+"']")),i),a(i))}function g(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$select.is(":disabled")||t.multiple||(t.$selecter.addClass("focus").on("keydown.selecter"+t.guid,t,n),d(".selecter").not(t.$selecter).trigger("close.selecter",[t]))}function v(e){e.preventDefault(),e.stopPropagation();var t=e.data;t.$selecter.removeClass("focus").off("keydown.selecter"+t.guid+" keyup.selecter"+t.guid),d(".selecter").not(t.$selecter).trigger("close.selecter",[t])}function n(e){var t=e.data;if(13===e.keyCode)t.$selecter.hasClass("open")&&(h(e),_(t.index,t)),a(t);else if(!(9===e.keyCode||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)){e.preventDefault(),e.stopPropagation();var n=t.$items.length-1,i=t.index<0?0:t.index;if(-1<d.inArray(e.keyCode,l?[38,40,37,39]:[38,40]))(i+=38===e.keyCode||l&&37===e.keyCode?-1:1)<0&&(i=0),n<i&&(i=n);else{var r,o=String.fromCharCode(e.keyCode).toUpperCase();for(r=t.index+1;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}if(i<0)for(r=0;r<=n;r++)if(t.$options.eq(r).text().charAt(0).toUpperCase()===o){i=r;break}}0<=i&&_(i,t)}}function _(e,t){var n=t.$items.eq(e),i=n.hasClass("selected");if(!n.hasClass("disabled")){if(-1===e&&""!==t.label)t.$selected.html(t.label);else if(i)t.multiple&&(t.$options.eq(e).prop("selected",null),n.removeClass("selected"));else{var r=n.html();n.data("value"),t.multiple?t.$options.eq(e).prop("selected",!0):(t.$selected.html(r).removeClass("placeholder"),t.$items.filter(".selected").removeClass("selected"),t.$select[0].selectedIndex=e),n.addClass("selected")}(!i||t.multiple)&&(t.index=e)}}function a(e){var t,n;e.links?(n=(t=e).$select.val(),t.external?r.open(n):r.location.href=n):(e.callback.call(e.$selecter,e.$select.val(),e.index),e.$select.trigger("change",[!0]))}function y(e,t){return 0===t?e:e.length>t?e.substring(0,t)+"...":e}var b=0,l=-1<r.navigator.userAgent.toLowerCase().indexOf("firefox"),C=/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(r.navigator.userAgent||r.navigator.vendor||r.opera),c=null,w={callback:d.noop,cover:!1,customClass:"",label:"",external:!1,links:!1,trim:0},t={defaults:function(e){return w=d.extend(w,e||{}),d(this)},disable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).addClass("disabled"),n.$options.eq(i).prop("disabled",!0)}else n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),n.$selecter.addClass("disabled"),n.$select.prop("disabled",!0)})},enable:function(r){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n)if(void 0!==r){var i=n.$items.index(n.$items.filter("[data-value="+r+"]"));n.$items.eq(i).removeClass("disabled"),n.$options.eq(i).prop("disabled",!1)}else n.$selecter.removeClass("disabled"),n.$select.prop("disabled",!1)})},destroy:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");n&&(n.$selecter.hasClass("open")&&n.$selecter.find(".selecter-selected").trigger("click.selecter"),void 0!==d.fn.scroller&&n.$selecter.find(".selecter-options").scroller("destroy"),n.$select[0].tabIndex=n.tabIndex,n.$select.off(".selecter").removeClass("selecter-element").show(),n.$selecter.off(".selecter").remove())})},refresh:function(){return d(this).each(function(e,t){var n=d(t).next(".selecter").data("selecter");if(n){var i=n.index;n.$allOptions=n.$select.find("option, optgroup"),n.$options=n.$allOptions.filter("option"),n.index=-1,i=n.$options.index(n.$options.filter(":selected")),u(n),_(i,n)}})}};d.fn.selecter=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=d.extend({},w,e||{}),null===c&&(c=d("body"));for(var t=d(this),n=0,i=t.length;n<i;n++)o(t.eq(n),e);return t}.apply(this,arguments)},d.selecter=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery,window),"function"!=typeof jQuery.fn.stepper&&function(c){"use strict";function r(e,t){if(!e.hasClass("stepper-input")){t=c.extend({},t,e.data("stepper-options"));var n=parseFloat(e.attr("min")),i=parseFloat(e.attr("max")),r=parseFloat(e.attr("step"))||1;e.addClass("stepper-input").wrap('<div class="stepper '+t.customClass+'" />').after('<span class="stepper-arrow up">'+t.labels.up+'</span><span class="stepper-arrow down">'+t.labels.down+"</span>");var o=e.parent(".stepper"),s=c.extend({$stepper:o,$input:e,$arrow:o.find(".stepper-arrow"),min:void 0!==typeof n&&!isNaN(n)&&n,max:void 0!==typeof i&&!isNaN(i)&&i,step:void 0===typeof r||isNaN(r)?1:r,timer:null},t);s.digits=(a=s.step,-1<(l=String(a)).indexOf(".")?l.length-l.indexOf(".")-1:0),e.is(":disabled")&&o.addClass("disabled"),o.on("touchstart.stepper mousedown.stepper",".stepper-arrow",s,d).data("stepper",s)}var a,l}function d(e){e.preventDefault(),e.stopPropagation(),s(e);var t,n,i,r=e.data;if(!r.$input.is(":disabled")&&!r.$stepper.hasClass("disabled")){var o=c(e.target).hasClass("up")?r.step:-r.step;r.timer=(t=r.timer,n=125,i=function(){a(r,o)},l(t),setInterval(i,n)),a(r,o),c("body").on("touchend.stepper mouseup.stepper",r,s)}}function s(e){e.preventDefault(),e.stopPropagation(),l(e.data.timer),c("body").off(".stepper")}function a(e,t){var n=parseFloat(e.$input.val()),i=t;void 0===typeof n||isNaN(n)?i=!1!==e.min?e.min:0:!1!==e.min&&n<e.min?i=e.min:i+=n;var r,o,s,a=(i-e.min)%e.step;0!==a&&(i-=a),!1!==e.min&&i<e.min&&(i=e.min),!1!==e.max&&i>e.max&&(i-=e.step),i!==n&&(r=i,o=e.digits,s=Math.pow(10,o),i=Math.round(r*s)/s,e.$input.val(i).trigger("change"))}function l(e){e&&(clearInterval(e),e=null)}var o={customClass:"",labels:{up:"Up",down:"Down"}},t={defaults:function(e){return o=c.extend(o,e||{}),c(this)},destroy:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$stepper.off(".stepper").find(".stepper-arrow").remove(),e.$input.unwrap().removeClass("stepper-input"))})},disable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled","disabled"),e.$stepper.addClass("disabled"))})},enable:function(){return c(this).each(function(){var e=c(this).data("stepper");e&&(e.$input.attr("disabled",null),e.$stepper.removeClass("disabled"))})}};c.fn.stepper=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?this:function(e){e=c.extend({},o,e||{});for(var t=c(this),n=0,i=t.length;n<i;n++)r(t.eq(n),e);return t}.apply(this,arguments)},c.stepper=function(e){"defaults"===e&&t.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(n){var e=function(){if(n&&n.fn&&n.fn.czrSelect2&&n.fn.czrSelect2.amd)var e=n.fn.czrSelect2.amd;var t,r,c;return e&&e.requirejs||(e?r=e:e={},function(p){function h(e,t){return n.call(e,t)}function s(e,t){var n,i,r,o,s,a,l,c,d,u,p,h=t&&t.split("/"),m=C.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,C.nodeIdCompat&&M.test(e[s])&&(e[s]=e[s].replace(M,"")),e=h.slice(0,h.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(p=e[d]))e.splice(d,1),d-=1;else if(".."===p){if(1===d&&(".."===e[2]||".."===e[0]))break;0<d&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(d=(n=e.split("/")).length;0<d;d-=1){if(i=n.slice(0,d).join("/"),h)for(u=h.length;0<u;u-=1)if((r=m[h.slice(0,u).join("/")])&&(r=r[i])){o=r,a=d;break}if(o)break;!l&&f&&f[i]&&(l=f[i],c=d)}!o&&l&&(o=l,a=c),o&&(n.splice(0,a,o),e=n.join("/"))}return e}function m(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),l.apply(p,e.concat([t,n]))}}function f(t){return function(e){y[t]=e}}function g(e){if(h(b,e)){var t=b[e];delete b[e],w[e]=!0,o.apply(p,t)}if(!h(y,e)&&!h(w,e))throw new Error("No "+e);return y[e]}function a(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var o,l,v,_,y={},b={},C={},w={},n=Object.prototype.hasOwnProperty,i=[].slice,M=/\.js$/;v=function(e,t){var n,i,r=a(e),o=r[0];return e=r[1],o&&(n=g(o=s(o,t))),o?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return s(e,i)})):s(e,t):(o=(r=a(e=s(e,t)))[0],e=r[1],o&&(n=g(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},_={require:function(e){return m(e)},exports:function(e){var t=y[e];return void 0!==t?t:y[e]={}},module:function(e){return{id:e,uri:"",exports:y[e],config:(t=e,function(){return C&&C.config&&C.config[t]||{}})};var t}},o=function(e,t,n,i){var r,o,s,a,l,c,d=[],u=typeof n;if(i=i||e,"undefined"===u||"function"===u){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(o=(a=v(t[l],i)).f))d[l]=_.require(e);else if("exports"===o)d[l]=_.exports(e),c=!0;else if("module"===o)r=d[l]=_.module(e);else if(h(y,o)||h(b,o)||h(w,o))d[l]=g(o);else{if(!a.p)throw new Error(e+" missing "+o);a.p.load(a.n,m(i,!0),f(o),{}),d[l]=y[o]}s=n?n.apply(y[e],d):void 0,e&&(r&&r.exports!==p&&r.exports!==y[e]?y[e]=r.exports:s===p&&c||(y[e]=s))}else e&&(y[e]=n)},t=r=l=function(e,t,n,i,r){if("string"==typeof e)return _[e]?_[e](t):g(v(e,t).f);if(!e.splice){if((C=e).deps&&l(C.deps,C.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?o(p,e,t,n):setTimeout(function(){o(p,e,t,n)},4),l},l.config=function(e){return l(e)},t._defined=y,(c=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),h(y,e)||h(b,e)||(b[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=c),e.define("almond",function(){}),e.define("jquery",[],function(){var e=n||$;return null==e&&console&&console.error&&console.error("CzrSelect2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before CzrSelect2 on your web page."),e}),e.define("czrSelect2/utils",["jquery"],function(o){function d(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&"constructor"!==i&&n.push(i)}return n}var e={Extend:function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var r in t)i.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},Decorate:function(i,r){function o(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}var e=d(r),t=d(i);r.displayName=i.displayName,o.prototype=new function(){this.constructor=o};for(var n=0;n<t.length;n++){var s=t[n];o.prototype[s]=i.prototype[s]}for(var a=function(e){var t=function(){};e in o.prototype&&(t=o.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}},l=0;l<e.length;l++){var c=e[l];o.prototype[c]=a(c)}return o}},t=function(){this.listeners={}};return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var o=n[r];(o=o.substring(0,1).toLowerCase()+o.substring(1))in i||(i[o]={}),r==n.length-1&&(i[o]=e[t]),i=i[o]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=o(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("czrSelect2/results",["jquery","./utils"],function(p,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=p('<ul class="czrSelect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=p('<li role="treeitem" aria-live="assertive" class="czrSelect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" czrSelect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".czrSelect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],r=this.option(i);t.push(r)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".czrSelect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.highlightFirstItem=function(){var e=this.$results.find(".czrSelect2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");0<t.length?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},i.prototype.setClasses=function(){var t=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()});t.$results.find(".czrSelect2-results__option[aria-selected]").each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="czrSelect2-results__option";var n={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var o=p(t),s=document.createElement("strong");s.className="czrSelect2-results__group",p(s),this.template(e,s);for(var a=[],l=0;l<e.children.length;l++){var c=e.children[l],d=this.option(c);a.push(d)}var u=p("<ul></ul>",{class:"czrSelect2-results__options czrSelect2-results__options--nested"});u.append(a),o.append(s),o.append(u)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var o=l.$results.offset().top,s=r.offset().top,a=l.$results.scrollTop()+(s-o);0===i?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),o=i.offset().top+i.outerHeight(!1),s=l.$results.scrollTop()+o-r;0===n?l.$results.scrollTop(0):r<o&&l.$results.scrollTop(s)}}),t.on("results:focus",function(e){e.element.addClass("czrSelect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");return"true"===t.attr("aria-selected")?void(l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})):void l.trigger("select",{originalEvent:e,data:n})}),this.$results.on("mouseenter",".czrSelect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("czrSelect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".czrSelect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),o=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.define("czrSelect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("czrSelect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="czrSelect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.czrSelect2."+e.id,function(e){var t=n(e.target).closest(".czrSelect2");n(".czrSelect2.czrSelect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").czrSelect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.czrSelect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),e.define("czrSelect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--single"),e.html('<span class="czrSelect2-selection__rendered"></span><span class="czrSelect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments);var i=t.id+"-container";this.$selection.find(".czrSelect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".czrSelect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.define("czrSelect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("czrSelect2-selection--multiple"),e.html('<ul class="czrSelect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".czrSelect2-selection__choice__remove",function(e){if(!n.options.get("disabled")){var t=i(this).parent().data("data");n.trigger("unselect",{originalEvent:e,data:t})}})},r.prototype.clear=function(){this.$selection.find(".czrSelect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="czrSelect2-selection__choice"><span class="czrSelect2-selection__choice__remove" role="presentation">&times;</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),o=this.display(i,r);r.append(o),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var s=this.$selection.find(".czrSelect2-selection__rendered");a.appendMany(s,t)}},r}),e.define("czrSelect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("czrSelect2-selection__placeholder").removeClass("czrSelect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".czrSelect2-selection__rendered").append(i)},t}),e.define("czrSelect2/selection/allowClear",["jquery","../keys"],function(i,r){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("CzrSelect2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".czrSelect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".czrSelect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var o={data:i[r]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||(t.which==r.DELETE||t.which==r.BACKSPACE)&&this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".czrSelect2-selection__placeholder").length||0===t.length)){var n=i('<span class="czrSelect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".czrSelect2-selection__rendered").prepend(n)}},e}),e.define("czrSelect2/selection/search",["jquery","../utils","../keys"],function(i,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<li class="czrSelect2-search czrSelect2-search--inline"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".czrSelect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".czrSelect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".czrSelect2-search--inline",function(e){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===s.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".czrSelect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,o=r&&r<=11;this.$selection.on("input.searchcheck",".czrSelect2-search--inline",function(e){return o?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".czrSelect2-search--inline",function(e){if(o&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)}})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".czrSelect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".czrSelect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.define("czrSelect2/selection/eventRelay",["jquery"],function(s){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){if(-1!==s.inArray(e,r)){t=t||{};var n=s.Event("czrSelect2:"+e,{params:t});i.$element.trigger(n),-1!==s.inArray(e,o)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.define("czrSelect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.define("czrSelect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("czrSelect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return(n+=i.generateChars(4))+(null!=t.id?"-"+t.id.toString():"-"+i.generateChars(4))},n}),e.define("czrSelect2/data/select",["./base","../utils","jquery"],function(e,t,a){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var o=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")});else{var e=r.id;this.$element.val(e),this.$element.trigger("change")}},n.prototype.unselect=function(r){var o=this;if(this.$element.prop("multiple"))return r.selected=!1,a(r.element).is("option")?(r.element.selected=!1,void this.$element.trigger("change")):void this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===a.inArray(i,t)&&t.push(i)}o.$element.val(t),o.$element.trigger("change")})},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],o=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=o.item(e),n=o.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var o=a(n[r]),s=this.item(o);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("czrSelect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){function t(e){return function(){return f(this).val()==e.id}}for(var n=this,i=this.$element.find("option"),r=i.map(function(){return n.item(f(this)).id}).get(),o=[],s=0;s<e.length;s++){var a=this._normalizeItem(e[s]);if(0<=f.inArray(a.id,r)){var l=i.filter(t(a)),c=this.item(l),d=f.extend(!0,{},a,c),u=this.option(d);l.replaceWith(u)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}o.push(p)}}return o},i}),e.define("czrSelect2/data/ajax",["./array","../utils","jquery"],function(e,t,o){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return o.extend({},e,{q:e.term})},transport:function(e,t,n){var i=o.ajax(e);return i.then(t),i.fail(n),i}};return o.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&o.isArray(t.results)||console.error("CzrSelect2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){e.status&&"0"===e.status||r.trigger("results:message",{message:"errorLoading"})});r._request=e}var r=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=o.extend({type:"GET"},this.ajaxOptions);"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&null!=n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("czrSelect2/data/tags",["jquery"],function(d){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var o=n.get("insertTag");if(void 0!==o&&(this.insertTag=o),e.call(this,t,n),d.isArray(i))for(var s=0;s<i.length;s++){var a=i[s],l=this._normalizeItem(a),c=this.option(l);this.$element.append(c)}}return e.prototype.query=function(e,c,d){var u=this;return this._removeOldTags(),null==c.term||null!=c.page?void e.call(this,c,d):void e.call(this,c,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var o=i[r],s=null!=o.children&&!e({results:o.children},!0);if(o.text===c.term||s)return!n&&(t.data=i,void d(t))}if(n)return!0;var a=u.createTag(c);if(null!=a){var l=u.option(a);l.attr("data-czrSelect2-tag",!0),u.addOptions([l]),u.insertTag(i,a)}t.results=i,d(t)})},e.prototype.createTag=function(e,t){var n=d.trim(t.term);return""===n?null:{id:n,text:n}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){(this._lastTag,this.$element.find("option[data-czrSelect2-tag]")).each(function(){this.selected||d(this).remove()})},e}),e.define("czrSelect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".czrSelect2-search__field")},e.prototype.query=function(e,t,n){var r=this;t.term=t.term||"";var i=this.tokenizer(t,this.options,function(e){var t,n=r._normalizeItem(e);if(!r.$element.find("option").filter(function(){return u(this).val()===n.id}).length){var i=r.option(n);i.attr("data-czrSelect2-tag",!0),r._removeOldTags(),r.addOptions([i])}t=n,r.trigger("select",{data:t})});i.term!==t.term&&(this.$search.length&&(this.$search.val(i.term),this.$search.focus()),t.term=i.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],o=t.term,s=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};s<o.length;){var l=o[s];if(-1!==u.inArray(l,r)){var c=o.substr(0,s),d=a(u.extend({},t,{term:c}));null!=d?(i(d),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},e}),e.define("czrSelect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){return t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),e.define("czrSelect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(n,i,r){var o=this;this.current(function(e){var t=null!=e?e.length:0;return 0<o.maximumSelectionLength&&t>=o.maximumSelectionLength?void o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):void n.call(o,i,r)})},e}),e.define("czrSelect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="czrSelect2-dropdown"><span class="czrSelect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("czrSelect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=r('<span class="czrSelect2-search czrSelect2-search--dropdown"><input class="czrSelect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("focus",function(){t.isOpen()&&i.$search.focus()}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("czrSelect2-search--hide"):i.$searchContainer.addClass("czrSelect2-search--hide"))})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("czrSelect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),e.define("czrSelect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+50&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="czrSelect2-results__option czrSelect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("czrSelect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("czrSelect2"),t.addClass("czrSelect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=m("<span></span>"),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.czrSelect2."+t.id,r="resize.czrSelect2."+t.id,o="orientationchange.czrSelect2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){m(this).data("czrSelect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),s.on(i,function(e){var t=m(this).data("czrSelect2-scroll-position");m(this).scrollTop(t.y)}),m(window).on(i+" "+r+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.czrSelect2."+t.id,i="resize.czrSelect2."+t.id,r="orientationchange.czrSelect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(window),t=this.$dropdown.hasClass("czrSelect2-dropdown--above"),n=this.$dropdown.hasClass("czrSelect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=r.top,o.bottom=r.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=a<r.top-s,d=l>r.bottom+s,u={left:r.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();u.top-=h.top,u.left-=h.left,t||n||(i="below"),d||!c||t?!c&&d&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(u.top=o.top-h.top-s),null!=i&&(this.$dropdown.removeClass("czrSelect2-dropdown--below czrSelect2-dropdown--above").addClass("czrSelect2-dropdown--"+i),this.$container.removeClass("czrSelect2-container--below czrSelect2-container--above").addClass("czrSelect2-container--"+i)),this.$dropdownContainer.css(u)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("czrSelect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),e.define("czrSelect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalCzrSelect2Event){var n=t.originalCzrSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var r=i.data("data");null!=r.element&&r.element.selected||null==r.element&&r.selected||this.trigger("select",{data:r})}},e}),e.define("czrSelect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalCzrSelect2Event:t})},e}),e.define("czrSelect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),e.define("czrSelect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(m,f,g,v,_,y,b,C,w,M,z,t,I,x,S,$,E,A,R,O,k,P,D,j,T,Z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=S:null!=t.data?t.dataAdapter=x:t.dataAdapter=I,0<t.minimumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,A)),0<t.maximumInputLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,R)),0<t.maximumSelectionLength&&(t.dataAdapter=M.Decorate(t.dataAdapter,O)),t.tags&&(t.dataAdapter=M.Decorate(t.dataAdapter,$)),(null!=t.tokenSeparators||null!=t.tokenizer)&&(t.dataAdapter=M.Decorate(t.dataAdapter,E)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=M.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=M.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,j)),null!=t.placeholder&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=M.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=k;else{var i=M.Decorate(k,P);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,Z)),t.closeOnSelect&&(t.dropdownAdapter=M.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=M.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=M.Decorate(t.dropdownAdapter,T)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=_:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,y)),t.allowClear&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=M.Decorate(t.selectionAdapter,C)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var o=f(t.amdBase+"compat/containerCss");t.selectionAdapter=M.Decorate(t.selectionAdapter,o)}t.selectionAdapter=M.Decorate(t.selectionAdapter,w)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var s=t.language.split("-")[0];t.language=[t.language,s]}else t.language=[t.language];if(m.isArray(t.language)){var a=new z;t.language.push("en");for(var l=t.language,c=0;c<l.length;c++){var d=l[c],u={};try{u=z.loadPath(d)}catch(e){try{d=this.defaults.amdLanguageBase+d,u=z.loadPath(d)}catch(e){t.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The language file for "'+d+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(u)}t.translations=a}else{var p=z.loadPath(this.defaults.amdLanguageBase+"en"),h=new z(t.language);h.extend(p),t.translations=h}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:M.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var o=a(n.text).toUpperCase(),s=a(t.term).toUpperCase();return-1<o.indexOf(s)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[m.camelCase(e)]=t;var i=M._convertData(n);m.extend(this.defaults,i)},new n}),e.define("czrSelect2/options",["require","jquery","./defaults","./utils"],function(i,o,r,s){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,n)}}return e.prototype.fromElement=function(e){var t=["czrSelect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("czrSelect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('CzrSelect2: The `data-czrSelect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of CzrSelect2.'),e.data("data",e.data("czrSelect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("CzrSelect2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of CzrSelect2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n;n=o.fn.jquery&&"1."==o.fn.jquery.substr(0,2)&&e[0].dataset?o.extend(!0,{},e[0].dataset,e.data()):e.data();var i=o.extend(!0,{},n);for(var r in i=s._convertData(i))-1<o.inArray(r,t)||(o.isPlainObject(this.options[r])?o.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("czrSelect2/core",["jquery","./options","./utils","./keys"],function(r,c,n,i){var d=function(e,t){null!=e.data("czrSelect2")&&e.data("czrSelect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new c(t,e),d.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var o=this.options.get("selectionAdapter");this.selection=new o(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var s=this.options.get("dropdownAdapter");this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("czrSelect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("czrSelect2",this)};return n.Extend(d,n.Observable),d.prototype._generateId=function(e){return"czrSelect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},d.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},d.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"==t){var o=e.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,"").match(n);if(null!==c&&1<=c.length)return c[1]}return null}return t},d.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},d.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.czrSelect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.czrSelect2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._syncA),r.each(e,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},d.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},d.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},d.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("czrSelect2-container--open")}),this.on("close",function(){n.$container.removeClass("czrSelect2-container--open")}),this.on("enable",function(){n.$container.removeClass("czrSelect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("czrSelect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("czrSelect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},d.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},d.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&0<t.addedNodes.length)for(var r=0;r<t.addedNodes.length;r++){t.addedNodes[r].selected&&(n=!0)}else t.removedNodes&&0<t.removedNodes.length&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},d.prototype.trigger=function(e,t){var n=d.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],o={prevented:!1,name:e,args:t};if(n.call(this,r,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},d.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},d.prototype.open=function(){this.isOpen()||this.trigger("query",{})},d.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},d.prototype.isOpen=function(){return this.$container.hasClass("czrSelect2-container--open")},d.prototype.hasFocus=function(){return this.$container.hasClass("czrSelect2-container--focus")},d.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("czrSelect2-container--focus"),this.trigger("focus",{}))},d.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("enable")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.prop("disabled") instead.'),(null==e||0===e.length)&&(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},d.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('CzrSelect2: Data can no longer be set using `czrSelect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},d.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('CzrSelect2: The `czrSelect2("val")` method has been deprecated and will be removed in later CzrSelect2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},d.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".czrSelect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("czrSelect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("czrSelect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},d.prototype.render=function(){var e=r('<span class="czrSelect2 czrSelect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("czrSelect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.czrSelect2",["jquery","jquery-mousewheel","./czrSelect2/core","./czrSelect2/defaults"],function(r,e,o,t){if(null==r.fn.czrSelect2){var s=["open","close","destroy"];r.fn.czrSelect2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=r.extend(!0,{},t);new o(r(this),e)}),this;if("string"==typeof t){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=r(this).data("czrSelect2");null==e&&window.console&&console.error&&console.error("The czrSelect2('"+t+"') method was called on an element that is not using CzrSelect2."),n=e[t].apply(e,i)}),-1<r.inArray(t,s)?this:n}throw new Error("Invalid arguments for CzrSelect2: "+t)}}return null==r.fn.czrSelect2.defaults&&(r.fn.czrSelect2.defaults=t),o}),{define:e.define,require:e.require}}(),t=e.require("jquery.czrSelect2");return n.fn.czrSelect2.amd=e,t}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(o){"use strict";function n(e,t){function n(e){void 0!==e.open&&(e.open=!e.open)}var i=function(e){for(var t=[],n=e.parentNode;(i=n)&&(0===i.offsetWidth||0===i.offsetHeight||!1===i.open);)t.push(n),n=n.parentNode;var i;return t}(e),r=i.length,o=[],s=e[t];if(r){for(var a=0;a<r;a++)o[a]=i[a].style.cssText,i[a].style.setProperty?i[a].style.setProperty("display","block","important"):i[a].style.cssText+=";display: block !important",i[a].style.height="0",i[a].style.overflow="hidden",i[a].style.visibility="hidden",n(i[a]);s=e[t];for(var l=0;l<r;l++)i[l].style.cssText=o[l],n(i[l])}return s}function i(e,t){var n=parseFloat(e);return Number.isNaN(n)?t:n}function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}function s(e,t){if(this.$window=o(window),this.$document=o(document),this.$element=o(e),this.options=o.extend({},d,t),this.polyfill=this.options.polyfill,this.orientation=this.$element[0].getAttribute("data-orientation")||this.options.orientation,this.onInit=this.options.onInit,this.onSlide=this.options.onSlide,this.onSlideEnd=this.options.onSlideEnd,this.DIMENSION=u.orientation[this.orientation].dimension,this.DIRECTION=u.orientation[this.orientation].direction,this.DIRECTION_STYLE=u.orientation[this.orientation].directionStyle,this.COORDINATE=u.orientation[this.orientation].coordinate,this.polyfill&&c)return!1;this.identifier="js-"+a+"-"+l++,this.startEvent=this.options.startEvent.join("."+this.identifier+" ")+"."+this.identifier,this.moveEvent=this.options.moveEvent.join("."+this.identifier+" ")+"."+this.identifier,this.endEvent=this.options.endEvent.join("."+this.identifier+" ")+"."+this.identifier,this.toFixed=(this.step+"").replace(".","").length-1,this.$fill=o('<div class="'+this.options.fillClass+'" />'),this.$handle=o('<div class="'+this.options.handleClass+'" />'),this.$range=o('<div class="'+this.options.rangeClass+" "+this.options[this.orientation+"Class"]+'" id="'+this.identifier+'" />').insertAfter(this.$element).prepend(this.$fill,this.$handle),this.$element.css({position:"absolute",width:"1px",height:"1px",overflow:"hidden",opacity:"0"}),this.handleDown=o.proxy(this.handleDown,this),this.handleMove=o.proxy(this.handleMove,this),this.handleEnd=o.proxy(this.handleEnd,this),this.init();var n,i,r=this;this.$window.on("resize."+this.identifier,(n=function(){!function(e,t){var n=Array.prototype.slice.call(arguments,2);setTimeout(function(){return e.apply(null,n)},t)}(function(){r.update(!1,!1)},300)},i=(i=20)||100,function(){if(!n.debouncing){var e=Array.prototype.slice.apply(arguments);n.lastReturnVal=n.apply(window,e),n.debouncing=!0}return clearTimeout(n.debounceTimeout),n.debounceTimeout=setTimeout(function(){n.debouncing=!1},i),n.lastReturnVal})),this.$document.on(this.startEvent,"#"+this.identifier+":not(."+this.options.disabledClass+")",this.handleDown),this.$element.on("change."+this.identifier,function(e,t){if(!t||t.origin!==r.identifier){var n=e.target.value,i=r.getPositionFromValue(n);r.setPosition(i)}})}Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e};var e,a="rangeslider",l=0,c=((e=document.createElement("input")).setAttribute("type","range"),"text"!==e.type),d={polyfill:!0,orientation:"horizontal",rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",activeClass:"rangeslider--active",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",startEvent:["mousedown","touchstart","pointerdown"],moveEvent:["mousemove","touchmove","pointermove"],endEvent:["mouseup","touchend","pointerup"]},u={orientation:{horizontal:{dimension:"width",direction:"left",directionStyle:"left",coordinate:"x"},vertical:{dimension:"height",direction:"top",directionStyle:"bottom",coordinate:"y"}}};return s.prototype.init=function(){this.update(!0,!1),this.onInit&&"function"==typeof this.onInit&&this.onInit()},s.prototype.update=function(e,t){(e=e||!1)&&(this.min=i(this.$element[0].getAttribute("min"),0),this.max=i(this.$element[0].getAttribute("max"),100),this.value=i(this.$element[0].value,Math.round(this.min+(this.max-this.min)/2)),this.step=i(this.$element[0].getAttribute("step"),1)),this.handleDimension=n(this.$handle[0],"offset"+r(this.DIMENSION)),this.rangeDimension=n(this.$range[0],"offset"+r(this.DIMENSION)),this.maxHandlePos=this.rangeDimension-this.handleDimension,this.grabPos=this.handleDimension/2,this.position=this.getPositionFromValue(this.value),this.$element[0].disabled?this.$range.addClass(this.options.disabledClass):this.$range.removeClass(this.options.disabledClass),this.setPosition(this.position,t)},s.prototype.handleDown=function(e){if(e.preventDefault(),!(e.button&&0!==e.button||(this.$document.on(this.moveEvent,this.handleMove),this.$document.on(this.endEvent,this.handleEnd),this.$range.addClass(this.options.activeClass),-1<(" "+e.target.className+" ").replace(/[\n\t]/g," ").indexOf(this.options.handleClass)))){var t=this.getRelativePosition(e),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=this.getPositionFromNode(this.$handle[0])-n,r="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(r),i<=t&&t<i+this.handleDimension&&(this.grabPos=t-i)}},s.prototype.handleMove=function(e){e.preventDefault();var t=this.getRelativePosition(e),n="vertical"===this.orientation?this.maxHandlePos-(t-this.grabPos):t-this.grabPos;this.setPosition(n)},s.prototype.handleEnd=function(e){e.preventDefault(),this.$document.off(this.moveEvent,this.handleMove),this.$document.off(this.endEvent,this.handleEnd),this.$range.removeClass(this.options.activeClass),this.$element.trigger("change",{origin:this.identifier}),this.onSlideEnd&&"function"==typeof this.onSlideEnd&&this.onSlideEnd(this.position,this.value)},s.prototype.cap=function(e,t,n){return e<t?t:n<e?n:e},s.prototype.setPosition=function(e,t){var n,i;void 0===t&&(t=!0),n=this.getValueFromPosition(this.cap(e,0,this.maxHandlePos)),i=this.getPositionFromValue(n),this.$fill[0].style[this.DIMENSION]=i+this.grabPos+"px",this.$handle[0].style[this.DIRECTION_STYLE]=i+"px",this.setValue(n),this.position=i,this.value=n,t&&this.onSlide&&"function"==typeof this.onSlide&&this.onSlide(i,n)},s.prototype.getPositionFromNode=function(e){for(var t=0;null!==e;)t+=e.offsetLeft,e=e.offsetParent;return t},s.prototype.getRelativePosition=function(e){var t=r(this.COORDINATE),n=this.$range[0].getBoundingClientRect()[this.DIRECTION],i=0;return void 0!==e.originalEvent["client"+t]?i=e.originalEvent["client"+t]:e.originalEvent.touches&&e.originalEvent.touches[0]&&void 0!==e.originalEvent.touches[0]["client"+t]?i=e.originalEvent.touches[0]["client"+t]:e.currentPoint&&void 0!==e.currentPoint[this.COORDINATE]&&(i=e.currentPoint[this.COORDINATE]),i-n},s.prototype.getPositionFromValue=function(e){var t;return t=(e-this.min)/(this.max-this.min),Number.isNaN(t)?0:t*this.maxHandlePos},s.prototype.getValueFromPosition=function(e){var t,n;return t=e/(this.maxHandlePos||1),n=this.step*Math.round(t*(this.max-this.min)/this.step)+this.min,Number(n.toFixed(this.toFixed))},s.prototype.setValue=function(e){e===this.value&&""!==this.$element[0].value||this.$element.val(e).trigger("input",{origin:this.identifier})},s.prototype.destroy=function(){this.$document.off("."+this.identifier),this.$window.off("."+this.identifier),this.$element.off("."+this.identifier).removeAttr("style").removeData("plugin_"+a),this.$range&&this.$range.length&&this.$range[0].parentNode.removeChild(this.$range[0])},o.fn[a]=function(n){var i=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=o(this),t=e.data("plugin_"+a);t||e.data("plugin_"+a,t=new s(this,n)),"string"==typeof n&&t[n].apply(t,i)})},"rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);"}),function(l){if(!l.wp.wpColorPicker.prototype._hasAlpha){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",t='<div class="wp-picker-holder" />',i='<div class="wp-picker-container" />',r='<input type="button" class="button button-small" />',o=void 0!==wpColorPickerL10n.current;if(o)var s='<a tabindex="0" class="wp-color-result" />';else{s='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var a="<label></label>",d='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);return this.error?"":(e.length<6&&(e=("00000"+e).substr(-6)),"#"+e)},l.widget("wp.wpColorPicker",l.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(l.support.iris){var n=this,e=n.element;if(l.extend(n.options,e.data()),"hue"===n.options.type)return n._createHueOnly();n.close=l.proxy(n.close,n),n.initialValue=e.val(),e.addClass("wp-color-picker"),o?(e.hide().wrap(i),n.wrap=e.parent(),n.toggler=l(s).insertBefore(e).css({backgroundColor:n.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),n.pickerContainer=l(t).insertAfter(e),n.button=l(r).addClass("hidden")):(e.parent("label").length||(e.wrap(a),n.wrappingLabelText=l(d).insertBefore(e).text(wpColorPickerL10n.defaultLabel)),n.wrappingLabel=e.parent(),n.wrappingLabel.wrap(i),n.wrap=n.wrappingLabel.parent(),n.toggler=l(s).insertBefore(n.wrappingLabel).css({backgroundColor:n.initialValue}),n.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),n.pickerContainer=l(t).insertAfter(n.wrappingLabel),n.button=l(r)),n.options.defaultColor?(n.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),o||n.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(n.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),o||n.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),o?e.wrap('<span class="wp-picker-input-wrap" />').after(n.button):(n.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(n.button),n.inputWrapper=e.closest(".wp-picker-input-wrap")),e.iris({target:n.pickerContainer,hide:n.options.hide,width:n.options.width,mode:n.options.mode,palettes:n.options.palettes,change:function(e,t){n.options.alpha?(n.toggler.css({"background-image":"url("+c+")"}),o?n.toggler.html('<span class="color-alpha" />'):(n.toggler.css({position:"relative"}),0==n.toggler.find("span.color-alpha").length&&n.toggler.append('<span class="color-alpha" />')),n.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:t.color.toString()})):n.toggler.css({backgroundColor:t.color.toString()}),l.isFunction(n.options.change)&&n.options.change.call(this,e,t)}}),e.val(n.initialValue),n._addListeners(),n.options.hide||n.toggler.click(),e.on("czr-colorpicker-close",function(){n.toggler.hasClass("wp-picker-open")&&n.close()})}},_addListeners:function(){var t=this;t.wrap.on("click.wpcolorpicker",function(e){e.stopPropagation()}),t.toggler.click(function(){t.toggler.hasClass("wp-picker-open")?t.close():t.open()}),t.element.on("change",function(e){(""===l(this).val()||t.element.hasClass("iris-error"))&&(t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e))}),t.button.on("click",function(e){l(this).hasClass("wp-picker-clear")?(t.element.val(""),t.options.alpha?(o&&t.toggler.removeAttr("style"),t.toggler.find("span.color-alpha").css("backgroundColor","")):t.toggler.css("backgroundColor",""),l.isFunction(t.options.clear)&&t.options.clear.call(this,e)):l(this).hasClass("wp-picker-default")&&t.element.val(t.options.defaultColor).change()})},open:function(){l("body").find(".wp-color-picker").not(this.element).each(function(){l(this).trigger("czr-colorpicker-close")}),this.element.iris("toggle"),this.inputWrapper.removeClass("hidden"),this.wrap.addClass("wp-picker-active"),this.toggler.addClass("wp-picker-open").attr("aria-expanded","true")},close:function(){try{this.element.iris("toggle")}catch(e){console.log("color-picker => error on ::close()",e)}this.inputWrapper.addClass("hidden"),this.wrap.removeClass("wp-picker-active"),this.toggler.removeClass("wp-picker-open").attr("aria-expanded","false")}}),l.widget("a8c.iris",l.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var n=this,e=n.element,t=l('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(n.picker.find(".iris-picker-inner")),i=t.find(".iris-slider-offset-alpha"),r={aContainer:t,aSlider:i};void 0!==e.data("custom-width")?n.options.customWidth=parseInt(e.data("custom-width"))||0:n.options.customWidth=100,n.options.defaultWidth=e.width(),(n._color._alpha<1||-1!=n._color.toString().indexOf("rgb"))&&e.width(parseInt(n.options.defaultWidth+n.options.customWidth)),l.each(r,function(e,t){n.controls[e]=t}),n.controls.square.css({"margin-right":"0"});var o=n.picker.width()-n.controls.square.width()-20,s=o/6,a=o/2-s;l.each(["aContainer","strip"],function(e,t){n.controls[t].width(a).css({"margin-left":s+"px"})}),n._initControls(),n._change()}},_initControls:function(){if(this._super(),this.options.alpha){var n=this;n.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*n._color._alpha),slide:function(e,t){n._color._alpha=parseFloat(t.value/100),n._change.apply(n,arguments)}})}},_change:function(){this._super();var e=this,t=e.element;if(this.options.alpha){var n=e.controls,i=parseInt(100*e._color._alpha),r=e._color.toRgb(),o=["rgb("+r.r+","+r.g+","+r.b+") 0%","rgba("+r.r+","+r.g+","+r.b+", 0) 100%"],s=e.options.defaultWidth,a=e.options.customWidth,l=e.picker.closest(".wp-picker-container").find(".wp-color-result");n.aContainer.css({background:"linear-gradient(to bottom, "+o.join(", ")+"), url("+c+")"}),l.hasClass("wp-picker-open")&&(n.aSlider.slider("value",i),e._color._alpha<1?(n.strip.attr("style",n.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),t.width(parseInt(s+a))):t.width(s))}(t.data("reset-alpha")||!1)&&e.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){e._color._alpha=1,e.active="external",e._change()})},_addInputListeners:function(i){var r=this,e=function(e){var t=new Color(i.val()),n=i.val();i.removeClass("iris-error"),t.error?""!==n&&i.addClass("iris-error"):t.toString()!==r._color.toString()&&("keyup"===e.type&&n.match(/^[0-9a-fA-F]{3}$/)||r._setOption("color",t.toString()))};i.on("change",e).on("keyup",r._debounce(e,100)),r.options.hide&&i.on("focus",function(){r.show()})}})}}(jQuery),function(t,e,n){t.bind("ready",function(){t.previewedDevice&&t.previewedDevice.bind(function(e){t.previewer.send("previewed-device",e)})})}(wp.customize,jQuery,_),function(e,t,i){var r=function(e){e=i.extend({bgCol:"#5ed1f5",textCol:"#000",consoleArguments:[]},e);var t,n=Array.from(e.consoleArguments);return n=i.isEmpty(i.filter(n,function(e){return!i.isString(e)}))?n.join(" "):JSON.stringify(n.join(" ")),["%c "+(t=n,i.isString(t)?300<t.length?t.substr(0,299)+"...":t:""),["background:"+e.bgCol,"color:"+e.textCol,"display: block;"].join(";")]},n=function(e,t,n){i.isUndefined(console)&&"function"!=typeof window.console.log||(serverControlParams.isDevMode?i.isUndefined(t)?console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})):(console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["<"+e+">"]})),console.log(t),console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:["</"+e+">"]}))):console.log.apply(console,r({bgCol:n,textCol:"#000",consoleArguments:[e]})))};e.consoleLog=function(){serverControlParams.isDevMode&&(i.isUndefined(console)&&"function"!=typeof window.console.log||(console.log.apply(console,r({consoleArguments:arguments})),console.log("Unstyled console message : ",arguments)))},e.errorLog=function(){i.isUndefined(console)&&"function"!=typeof window.console.log||console.log.apply(console,r({bgCol:"#ffd5a0",textCol:"#000",consoleArguments:arguments}))},e.errare=function(e,t){n(e,t,"#ffd5a0")},e.infoLog=function(e,t){n(e,t,"#5ed1f5")},e.czr_isChangeSetOn=function(){return serverControlParams.isChangeSetOn&&!0}}(wp.customize,jQuery,_),function(e,n,i){e.bind("ready",function(){var t=function(){i.isUndefined(window.themeServerControlParams)||i.isUndefined(themeServerControlParams.isThemeSwitchOn)||themeServerControlParams.isThemeSwitchOn||(e.panel("themes").active.callbacks=n.Callbacks(),e.panel("themes").active(themeServerControlParams.isThemeSwitchOn))};e.panel.has("themes")?t():e.panel.when("themes",function(e){t()})})}(wp.customize,jQuery,_),function(r,e,o){r.czr_activeSectionId=r.czr_activeSectionId||new r.Value(""),r.czr_activePanelId=r.czr_activePanelId||new r.Value(""),r.bind("ready",function(){if("function"!=typeof r.Section)throw new Error("Your current version of WordPress does not support the customizer sections needed for this theme. Please upgrade WordPress to the latest version.");var n=function(e,t){r.czr_activeSectionId(e?t:"")};r.section.each(function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})}),r.section.bind("add",function(t){"publish_settings"!=t.id&&t.expanded.bind(function(e){n(e,t.id)})});var i=function(e,t){r.czr_activePanelId(e?t:""),o.isEmpty(r.czr_activePanelId())&&r.czr_activeSectionId("")};r.panel.each(function(t){t.expanded.bind(function(e){i(e,t.id)})}),r.panel.bind("add",function(t){t.expanded.bind(function(e){i(e,t.id)})})})}(wp.customize,jQuery,_),function(a,e,l){a.bind("ready",function(){serverControlParams.paramsForDynamicRegistration;l.isObject(serverControlParams.paramsForDynamicRegistration)||a.errorLog("serverControlParams.paramsForDynamicRegistration should be an array"),l.each(serverControlParams.paramsForDynamicRegistration,function(e,t){if(e.module_registration_params&&!0===e.module_registration_params.dynamic_registration)if(serverControlParams.isDevMode)n(e);else try{n(e)}catch(e){a.errorLog(e)}})});var n=function(e){if(e=l.extend({setting_id:"",module_type:"",option_value:[],setting:{},section:{id:"",title:""},control:{}},e),l.isEmpty(e.setting_id)||l.isEmpty(e.module_type))throw a.errare("registerDynamicModuleSettingControl => args",e),new Error("registerDynamicModuleSettingControl => missing params when registrating a setting");if(!l.isArray(e.option_value)&&!l.isObject(e.option_value))throw new Error("registerDynamicModuleSettingControl => the module values must be an array or an object");var t=e.setting_id,n=e.setting;a.CZR_Helpers.register({what:"setting",id:t,dirty:!l.isEmpty(e.option_value),value:e.option_value,transport:n.transport||"refresh",type:n.type||"option",track:!1});var i=e.section;if(!l.isEmpty(i)){if(!l.has(i,"id"))throw new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);a.CZR_Helpers.register({what:"section",id:i.id,title:i.title||i.id,panel:l.isEmpty(i.panel)?"":i.panel,priority:i.priority||10,track:!1})}var r,o=t,s=e.control;if(r=l.isEmpty(e.section)?s.section:e.section.id,l.isEmpty(r))throw a.errare("registerDynamicModuleSettingControl => missing section id for the control",e),new Error("registerDynamicModuleSettingControl => missing section id for the section of setting : "+t);return a.CZR_Helpers.register({what:"control",id:o,label:s.label||o,type:"czr_module",module_type:e.module_type,section:r,priority:s.priority||10,settings:{default:t},track:!1}),a.section.has(r)&&a.section(r).expanded()&&a.control(o).trigger("set-module-ready"),t}}(wp.customize,jQuery,_),function(s,a,l){s.Value.prototype.set=function(t,n){var i=this._value,e=a.Deferred(),r=this,o=[];return t=this._setter.apply(this,arguments),t=this.validate(t),args=l.extend({silent:!1},l.isObject(n)?n:{}),null===t||l.isEqual(i,t)?e.resolveWith(r,[t,i,n]).promise():(this._value=t,(this._dirty=!0)===args.silent?e.resolveWith(r,[t,i,n]).promise():this._deferreds?(l.each(r._deferreds,function(e){o.push(e.apply(null,[t,i,n]))}),a.when.apply(null,o).fail(function(){s.errorLog("A deferred callback failed in api.Value::set()")}).then(function(){r.callbacks.fireWith(r,[t,i,n]),e.resolveWith(r,[t,i,n])}),e.promise(r)):(this.callbacks.fireWith(this,[t,i,n]),e.resolveWith(r,[t,i,n]).promise(r)))},s.Value.prototype.bind=function(){var t=this,n=!1,i=[];return a.each(arguments,function(e,t){n||(n=l.isObject(t)&&t.deferred),l.isFunction(t)&&i.push(t)}),n?(t._deferreds=t._deferreds||[],l.each(i,function(e){l.contains(e,t._deferreds)||t._deferreds.push(e)})):t.callbacks.add.apply(t.callbacks,arguments),this},s.Setting.prototype.silent_set=function(e,t){var n=this._value,i=s.state("saved")();return e=this._setter.apply(this,arguments),null===(e=this.validate(e))||l.isEqual(n,e)||(this._value=e,this._dirty=l.isUndefined(t)||!l.isBoolean(t)?this._dirty:t,this.callbacks.fireWith(this,[e,n,{silent:!0}]),s.state("saved")(i)),this}}(wp.customize,jQuery,_),function(s,a,l){s.Setting.prototype.preview=function(e,t,n){var i,r=this,o=a.Deferred();return i=r.transport,l.isUndefined(t)||l.isEmpty(t)||l.isNull(t)||!l.isObject(n)||!0!==n.not_preview_sent?l.has(n,"silent")&&!1!==n.silent?o.resolve(arguments).promise():("postMessage"!==i||s.state("previewerAlive").get()||(i="refresh"),"postMessage"===i?(r.previewer.send("pre_setting",{set_id:r.id,data:n,value:e}),r.previewer.send("setting",[r.id,r()]),o.resolve(arguments)):"refresh"===i&&(r.previewer.refresh(),o.resolve(arguments)),o.promise()):o.resolve(arguments).promise()}}(wp.customize,jQuery,_),function(e,r,o){if("function"==typeof e.Section){var n=e.Section.prototype.initialize;e.Section.prototype.initialize=function(e,t){n.apply(this,[e,t]);var i=this;this.expanded.callbacks.add(function(e){if(e){var t=i.container.closest(".wp-full-overlay-sidebar-content"),n=i.container.find(".accordion-section-content");_resizeContentHeight=function(){n.css("height",t.innerHeight())},_resizeContentHeight(),r(window).on("resize.customizer-section",o.debounce(_resizeContentHeight,110))}})}}}(wp.customize,jQuery,_),function(d,u,p){d.CZR_Helpers=d.CZR_Helpers||{},d.CZR_Helpers=u.extend(d.CZR_Helpers,{setupInputCollectionFromDOM:function(){var o=this;if(!p.isFunction(o))throw new Error("setupInputCollectionFromDOM => inputParentInst is not valid.");var s=o.module,a=p.has(o(),"is_mod_opt");if(p.isEmpty(o.inputCollection())){o.czr_Input=o.czr_Input||new d.Values,o.inputConstructor=a?s.inputModOptConstructor:s.inputConstructor;var e=a?o.defaultModOptModel:o.defaultItemModel;if(p.isEmpty(e)||p.isUndefined(e))throw new Error("setupInputCollectionFromDOM => No default model found in item or mod opt "+o.id+".");var l=u.extend(!0,{},o());l=p.isObject(l)?u.extend(e,l):e;var c={};return u("."+s.control.css_attr.sub_set_wrapper,o.container).length<1&&d.errare("setupInputCollectionFromDOM => no input elements found in the DOM"),u("."+s.control.css_attr.sub_set_wrapper,o.container).each(function(e){var t=u(this).find("[data-czrtype]").attr("data-czrtype"),n=p.has(l,t)?l[t]:"";if(p.isUndefined(t)||p.isEmpty(t))d.errare("setupInputCollectionFromDOM => missing data-czrtype id for input type "+u(this).data("input-type")+" in module "+s.id+". Check that the server input template is properly declared.");else{if(!p.has(l,t))throw new Error("setupInputCollectionFromDOM => The item or mod opt property : "+t+" has been found in the DOM but not in the item or mod opt model : "+o.id+". The input can not be instantiated.");var i=u(this).data("input-type"),r={id:t,type:i,transport:u(this).data("transport")||"inherit",input_value:n,input_options:p.has(s.inputOptions,i)?s.inputOptions[i]:{},container:u(this),input_parent:o,is_mod_opt:a,module:s};d.trigger("input-args-before-instantiation",r),o.czr_Input.add(t,new o.inputConstructor(t,r)),o.czr_Input(t).ready(),c[t]=n}}),o.inputCollection(c),o}}})}(wp.customize,jQuery,_),function(i,e,r){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=e.extend(i.CZR_Helpers,{getModuleTmpl:function(t){var n=e.Deferred();if(t=r.extend({tmpl:"",module_type:"",module_id:"",cache:!0,nonce:i.settings.nonce.save},t),(r.isEmpty(t.tmpl)||r.isEmpty(t.module_type))&&n.reject("api.CZR_Helpers.getModuleTmpl => missing tmpl or module_type param"),i.CZR_Helpers.czr_cachedTmpl=i.CZR_Helpers.czr_cachedTmpl||{},i.CZR_Helpers.czr_cachedTmpl[t.module_type]=i.CZR_Helpers.czr_cachedTmpl[t.module_type]||{},!0===t.cache&&!r.isEmpty(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&r.isString(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]))n.resolve(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]);else{if(r.isObject(i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl])&&"pending"==i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl].state())return i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl];i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=wp.ajax.post("ac_get_template",t).done(function(e){n.resolve(e),i.CZR_Helpers.czr_cachedTmpl[t.module_type][t.tmpl]=e}).fail(function(e){i.errare("api.CZR_Helpers.getModuleTmpl => Problem when fetching the "+t.tmpl+" tmpl from server for module : "+t.module_id+" "+t.module_type,e),n.reject(e),r.isObject(e)&&("invalid_nonce"!==e.code&&"Bad Request"!==e.statusText||window.sektionsLocalizedData&&sektionsLocalizedData.i18n&&i.previewer.trigger("sek-notify",{type:"error",duration:3e4,message:sektionsLocalizedData.i18n["Something went wrong, please refresh this page."]}))})}return n.promise()}})}(wp.customize,jQuery,_),function(p,h,m){p.CZR_Helpers=p.CZR_Helpers||{},p.CZR_Helpers=h.extend(p.CZR_Helpers,{register:function(e){if(m.has(e,"id")){var t,n={};switch(e.what){case"setting":if(p.has(e.id))break;t=h.extend(!0,{},p.Setting.prototype.defaults);var i=m.extend(t,{dirty:!m.isUndefined(e.dirty)&&e.dirty,value:m.isUndefined(e.value)?null:e.value,transport:e.transport||"refresh",type:e.type||"option"}),r=p.settingConstructor[i.type]||p.Setting;m.isObject(e.options)&&(i=m.extend(i,e.options));try{p.add(new r(e.id,i.value,i))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a setting to the api",e)}break;case"panel":if(!m.has(e,"id"))throw new Error("registerPanel => missing panel id ");if(p.panel.has(e.id))break;t=h.extend(!0,{},p.Panel.prototype.defaults);var o=m.extend(t,{id:e.id,title:e.title||e.id,priority:m.has(e,"priority")?e.priority:0}),s=m.isObject(e.constructWith)?e.constructWith:p.Panel;m.isObject(e.options)&&(o=m.extend(o,e.options)),o=m.extend({params:o},o);try{n=p.panel.add(new s(e.id,o))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a panel to the api",e)}break;case"section":if(!m.has(e,"id"))throw new Error("registerSection => missing section id ");if(p.section.has(e.id))break;t=h.extend(!0,{},p.Section.prototype.defaults);var a=m.extend(t,{content:"",id:e.id,title:e.title,panel:e.panel,priority:e.priority,description_hidden:!1,customizeAction:serverControlParams.i18n.Customizing}),l=p.Section;m.isUndefined(e.constructWith)?!m.isEmpty(e.type)&&p.sectionConstructor[e.type]&&(l=p.sectionConstructor[e.type]):l=e.constructWith,m.isObject(e.options)&&(a=m.extend(a,e.options)),a=m.extend({params:a},a);try{n=p.section.add(new l(e.id,a))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a section to the api",e)}break;case"control":if(p.control.has(e.id))break;t=h.extend(!0,{},p.Control.prototype.defaults);var c,d=m.extend(t,{content:"",label:e.label||e.id,priority:e.priority,section:e.section,settings:e.settings,type:e.type,module_type:e.module_type,input_attrs:e.input_attrs,sek_registration_params:e}),u=p.controlConstructor[d.type]||p.Control;m.isObject(e.options)&&(d=m.extend(d,e.options)),c=m.extend({params:d},d);try{n=p.control.add(new u(e.id,c))}catch(e){p.errare("api.CZR_Helpers::register => problem when adding a control to the api",e)}break;default:p.errorLog('invalid "what" when invoking the register() method')}return n=m.isEmpty(n)?{deferred:{embedded:h.Deferred(function(){this.resolve()})}}:n,!1!==e.track&&p.trigger("czr-new-registered",e),"setting"==e.what?e:n.deferred.embedded}p.errare("register => missing id ",e)}})}(wp.customize,jQuery,_),function(i,r,o){i.CZR_Helpers=i.CZR_Helpers||{},i.CZR_Helpers=r.extend(i.CZR_Helpers,{css_loader_html:'<div class="czr-css-loader czr-mr-loader" style="display:none"><div></div><div></div><div></div></div>',getControlSettingId:function(e,t){return t="default",i.control.has(e)?!o.has(i.control(e),"settings")||o.isEmpty(i.control(e).settings)?e:o.has(i.control(e).settings,t)?o.isUndefined(i.control(e).settings[t].id)?(i.consoleLog("getControlSettingId : The requested control_id has no setting id assigned : "+e),e):i.control(e).settings[t].id:(i.consoleLog("getControlSettingId : The requested control_id does not have the requested setting type : "+e+" , "+t),e):e},getDocSearchLink:function(e){var t=(e=o.isString(e)?e:"").replace(/ /g,"+");return['<a href="'+[serverControlParams.docURL,"search?query=",t].join("")+'" title="'+serverControlParams.i18n.readDocumentation+'" target="_blank">'," ",'<span class="far fa-question-circle-o"></span>'].join("")},build_setId:function(e){return o.isUndefined(window.themeServerControlParams)||!o.isArray(themeServerControlParams.wpBuiltinSettings)?e:o.contains(themeServerControlParams.wpBuiltinSettings,e)?e:o.contains(themeServerControlParams.themeSettingList,e)&&-1==e.indexOf(themeServerControlParams.themeOptions)?[themeServerControlParams.themeOptions+"[",e,"]"].join(""):e},getOptionName:function(e){if(o.isEmpty(window.themeServerControlParams)||o.isEmpty(themeServerControlParams.themeOptions))return e;return-1==e.indexOf(themeServerControlParams.themeOptions)?e:e.replace(/\[|\]/g,"").replace(themeServerControlParams.themeOptions,"")},hasPartRefresh:function(n){if(o.has(i,"czr_partials"))return o.contains(o.map(i.czr_partials(),function(e,t){return o.contains(e.settings,n)}),!0)},getSectionControlIds:function(e){return e=e||i.czr_activeSectionId(),i.section.has(e)?o.map(i.section(e).controls(),function(e){return e.id}):[]},getSectionSettingIds:function(e){if(e=e||i.czr_activeSectionId(),i.section.has(e)){var n=[],t=this.getSectionControlIds(e);return o.each(t,function(e){o.each(i.control(e).settings,function(e,t){n.push(e.id)})}),n}},capitalize:function(e){return o.isString(e)?e.charAt(0).toUpperCase()+e.slice(1):e},truncate:function(e,t,n){if(!o.isString(e))return"";t=t||20;var i=e.length>t,r=i?e.substr(0,t-1):e;return r=n&&i?r.substr(0,r.lastIndexOf(" ")):r,i?r+"...":r},isMultiItemModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||i.czrModuleMap[e].multi_item||!1}},isCrudModule:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].crud||!1}},hasModuleModOpt:function(e,t){if(!o.isUndefined(e)||o.isObject(t)){if(o.isObject(t)&&o.has(t,"module_type"))e=t.module_type;else if(o.isUndefined(e)||o.isNull(e))return;if(o.has(i.czrModuleMap,e))return i.czrModuleMap[e].has_mod_opt||!1}},removeInputCollection:function(){var t=this;if(!o.isFunction(t))throw new Error("removeInputCollection : inputParentInst is not valid.");o.has(t,"czr_Input")&&(t.czr_Input.each(function(e){t.czr_Input.remove(e.id)}),t.inputCollection({}))},refreshModuleControl:function(e){var t=i.controlConstructor.czr_module,n=(i.control(e).params.type,i.settings.controls[e]);r.when(i.control(e).container.remove()).done(function(){i.control.remove(e),i.control.add(e,new t(e,{params:n,previewer:i.previewer}))})},isChecked:function(e){return o.isBoolean(e)?e:o.isNumber(e)?0<e:!!o.isString(e)&&("0"!==e&&""!==e&&"off"!==e)},hexToRgb:function(t){try{t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,i){return t+t+n+n+i+i})}catch(e){return i.errorLog("Error in Helpers::hexToRgb : "+e),t}var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return"rgb("+(e=e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:[]).join(",")+")"},rgbToHex:function(e,t,n){var i=function(e){var t=e.toString(16);return 1==t.length?"0"+t:t};return"#"+i(e)+i(t)+i(n)},parseTemplate:o.memoize(function(t){var n,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(e){return(n=n||o.template(t,i))(e)}})})}(wp.customize,jQuery,_),function(a,l,c){a.CZR_Helpers=a.CZR_Helpers||{},a.CZR_Helpers=l.extend(a.CZR_Helpers,{addActions:function(e,t,n){(n=n||this)[e]=n[e]||[],new_event_map=c.clone(n[e]),n[e]=c.union(new_event_map,c.isArray(t)?t:[t])},doActions:function(e,t,n){t.trigger(e,n)},setupDOMListeners:function(e,r,o){var s=this;o=o||s,c.isArray(e)?c.isObject(r)?(r=c.extend({model:{},dom_el:{}},r)).dom_el instanceof jQuery&&!(r.dom_el.length<1)?c.map(e,function(i){if(c.isString(i.selector)&&!c.isEmpty(i.selector))if(c.isString(i.selector)&&!c.isEmpty(i.selector)){var e=i.name&&!c.isEmpty(i.name)?i.name:[i.trigger,i.selector].join(""),t=r.dom_el.data("czr-listener-collection");if(t&&c.isArray(t)){if(t=c.isArray(t)?t:[],c.contains(t,e))return void a.errare("setupDOMListeners : aborting because listener already created for event : "+e);t.push(e)}else t=[e];r.dom_el.data("czr-listener-collection",t),r.dom_el.on(i.trigger,i.selector,function(e,t){if(e.stopPropagation(),!a.utils.isKeydownButNotEnterEvent(e)){e.preventDefault();var n=l.extend(!0,{},r);if(c.has(n,"model")&&c.has(n.model,"id")&&(c.has(o,"get")?n.model=o():n.model=o.getModel(n.model.id)),l.extend(n,{event:i,dom_event:e}),l.extend(n,t),c.has(n,"event")&&c.has(n.event,"actions"))if(serverControlParams.isDevMode)s.executeEventActionChain(n,o);else try{s.executeEventActionChain(n,o)}catch(e){a.errare("In setupDOMListeners : problem when trying to fire actions : "+n.event.actions,e)}else a.errare("executeEventActionChain : missing obj.event or obj.event.actions")}})}else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","));else a.errare("setupDOMListeners : selector must be a string not empty. Aborting setup of action(s) : "+i.actions.join(","))}):a.errare("setupDomListeners : dom element should be an existing dom element",r):a.errare("setupDomListeners : args should be an object",e):a.errare("setupDomListeners : event_map should be an array",r)},executeEventActionChain:function(i,r){var o=this;if("function"==typeof i.event.actions)return i.event.actions.call(r,i);c.isArray(i.event.actions)||(i.event.actions=[i.event.actions]);var s=!1;c.map(i.event.actions,function(e){if(!s){var t=function(){};if("function"==typeof e)t=e;else{if("function"!=typeof r[e])throw new Error("executeEventActionChain : the action : "+e+" has not been found when firing event : "+i.event.selector);t=r[e]}var n=c.has(i,"dom_el")&&-1!=i.dom_el.length?i.dom_el:o.container;"string"==typeof e&&n.trigger("before_"+e,c.omit(i,"event")),!1===t.call(r,i)&&(s=!0),"string"==typeof e&&n.trigger("after_"+e,c.omit(i,"event"))}})}})}(wp.customize,jQuery,_),function(i,e,r){i.czr_wpQueryDataReady=i.czr_wpQueryDataReady||e.Deferred(),i.czr_wpQueryInfos=i.czr_wpQueryInfos||new i.Value,i.bind("ready",function(){i.previewer.bind("czr-query-data-ready",function(e){i.czr_wpQueryInfos(e),"pending"==i.czr_wpQueryDataReady.state()&&i.czr_wpQueryDataReady.resolve(e)}),i.previewer.bind("czr-partial-refresh-data",function(e){i.czr_partials=i.czr_partials||new i.Value,i.czr_partials.set(e)}),i.previewer.bind("czr-partial-refresh-done",function(e){if(r.has(e,"set_id")){var t=i.CZR_Helpers.build_setId(e.set_id);if(i.has(t)){var n=i.CZR_Helpers.getControlSettingId(t);i.control.has(n)&&i.control(n).trigger("czr-partial-refresh-done")}}})})}(wp.customize,jQuery,_);var CZRInputMths=CZRInputMths||{};!function(r,o,a){o.extend(CZRInputMths,{initialize:function(e,t){if(a.isUndefined(t.input_parent)||a.isEmpty(t.input_parent))throw new Error("No input_parent assigned to input "+t.id+". Aborting");if(a.isUndefined(t.module))throw new Error("No module assigned to input "+t.id+". Aborting");r.Value.prototype.initialize.call(this,null,t);var n=this;o.extend(n,t||{}),n.constructorOptions=o.extend(!0,{},t),n.isReady=o.Deferred(),a.isUndefined(t.input_value)||n.set(t.input_value);if(n.input_event_map=[{trigger:o.trim(["change",{text:"keyup",textarea:"keyup",password:"keyup",color:"colorpickerchange",range:"input propertychange"}[n.type]||""].join(" ")),selector:"input[data-czrtype], select[data-czrtype], textarea[data-czrtype]",name:"set_input_value",actions:function(e){if(!a.has(n.input_parent,"syncElements")||!a.has(n.input_parent.syncElements,n.id))throw new Error("WARNING : THE INPUT "+n.id+" HAS NO SYNCED ELEMENT.")}}],n[n.type]&&a.isFunction(n[n.type]))try{n[n.type](t.input_options||null)}catch(e){r.errare("Error in overriden callback method in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}else if(r.czrInputMap&&a.has(r.czrInputMap,n.type)){var i=r.czrInputMap[n.type];if(a.isFunction(n[i]))try{n[i](t.input_options||null)}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}else if(a.isFunction(r.czrInputMap[n.type]))try{r.czrInputMap[n.type].apply(n,[t.input_options||null])}catch(e){r.errare("Error in input init => for input id :"+n.id+" in module type : "+n.module.module_type,e)}}else r.errare("Warning the input : "+n.id+" with type "+n.type+" has no corresponding method defined in api.czrInputMap.");n.visible=new r.Value(!0),n.isReady.done(function(){n.visible.bind(function(e){e?n.container.stop(!0,!0).slideDown(200):n.container.stop(!0,!0).slideUp(200)})}),n.enabled=new r.Value(!0),n.isReady.done(function(){n.enabled.bind(function(e){n.container.toggleClass("disabled",!e)})})},ready:function(){var e=this;e.setupDOMListeners(e.input_event_map,{dom_el:e.container},e),e.callbacks.add(function(){return e.inputReact.apply(e,arguments)}),o.when(e.setupSynchronizer()).done(function(){e.isReady.resolve(e)})},setupSynchronizer:function(){var e=this,t=e.input_parent,n=e.container.find("[data-czrtype]"),i=(e.container.find("[data-czrtype]").is("textarea"),new r.Element(n));t.syncElements=t.syncElements||{},(t.syncElements[e.id]=i).sync(e),i.set(e())},inputReact:function(e,t,n){var i=this,r=i.input_parent(),o=a.clone(r),s=i.is_preItemInput;i.enabled()&&((o=!a.isObject(o)||a.isEmpty(o)?{}:o)[i.id]=e,i.input_parent.set(o,{input_changed:i.id,input_value:i(),input_transport:i.transport,not_preview_sent:"postMessage"===i.transport,inputRegistrationParams:i.constructorOptions}),s||(i.input_parent.trigger(i.id+":changed",e),a.isEmpty(t)&&(a.isUndefined(t)||"postMessage"!==i.transport)||i.module.sendInputToPreview({input_id:i.id,input_parent_id:i.input_parent.id,to:e,from:t})))},setupColorPicker:function(){this.container.find("input").iris({palettes:!0,hide:!1,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")}})},setupColorPickerAlpha:function(){var n=this;n.container.find("input").wpColorPicker({palettes:!0,width:1440<=window.innerWidth?271:251,change:function(e,t){o(this).val(t.color.toString()).trigger("colorpickerchange").trigger("change")},clear:function(e,t){n("")}})},setupSelect:function(){o("select",this.container).not(".no-selecter-js").each(function(){o(this).selecter({})})},setupIcheck:function(e){o("input[type=checkbox]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(this).val(!1===o(this).is(":checked")?0:1),o(e.currentTarget).trigger("change")})})},setupNimbleCheck:function(e){this.container.find("input[type=checkbox]"),o(".czr-toggle-check",this.container)},setupRadio:function(e){o("input[type=radio]",this.container).each(function(e){0===o(this).closest('div[class^="icheckbox"]').length&&o(this).iCheck({checkboxClass:"icheckbox_flat-grey",checkedClass:"checked",radioClass:"iradio_flat-grey"}).on("ifChanged",function(e){o(e.currentTarget).trigger("change")})})},setupStepper:function(e){o('input[type="number"]',this.container).each(function(e){o(this).stepper()})},setupSimpleRange:function(){},setupRangeSlider:function(e){var n,i=this,r=function(e,t){var n=i.container.find("input").data("unit");e.textContent=t+(a.isEmpty(i.container.find("input").data("unit"))?"":n)};o(i.container).find("input").rangeslider({polyfill:!1,rangeClass:"rangeslider",disabledClass:"rangeslider--disabled",horizontalClass:"rangeslider--horizontal",verticalClass:"rangeslider--vertical",fillClass:"rangeslider__fill",handleClass:"rangeslider__handle",onInit:function(){n=o(".rangeslider__handle",this.$range),o(".rangeslider__handle",this.$range),r(n[0],this.value)},onSlide:function(e,t){r(n[0],t)}})},setupHAlignement:function(e){var t=this,n=o(".sek-h-align-wrapper",t.container);n.find('div[data-sek-align="'+t()+'"]').addClass("selected"),n.on("click","[data-sek-align]",function(e){e.preventDefault(),n.find(".selected").removeClass("selected"),o.when(o(this).addClass("selected")).done(function(){t(o(this).data("sek-align"))})})}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(r,o,s){o.extend(CZRInputMths,{setupImageUploaderSaveAsId:function(){this.setupImageUploader()},setupImageUploaderSaveAsUrl:function(){this.setupImageUploader({save_as_url:!0})},setupImageUploader:function(e){var t=this,n=t();if(e=s.extend({save_as_url:!1},e||{}),t.save_as_url=e.save_as_url,t.attachment={},!t.container)return this;t.tmplRendered=o.Deferred(),t.setupContentRendering(n,{}),t.tmplRendered.done(function(){t.czrImgUploaderBinding()}).fail(function(){r.errorLog("setupImageUploader => failed to fetch the template.")})},setupContentRendering:function(e,t){var n,i=this;i.attachment.id!=e&&t!==e?(s.isEmpty(e)?(i.attachment={},i.renderImageUploaderTemplate()):s.isNumber(e)||i.renderImageUploaderTemplate({fromUrl:!0,url:e}),n=wp.media.attachment(e),s.isObject(n)&&s.has(n,"attributes")&&s.has(n.attributes,"sizes")?(i.attachment=n.attributes,i.renderImageUploaderTemplate()):s.isNumber(e)&&wp.media.attachment(e).fetch().done(function(){i.attachment=this.attributes,i.renderImageUploaderTemplate()}).fail(function(){r.errorLog("renderImageUploaderTemplate => failed attempt to fetch an img with id : "+e)})):i.attachment.id&&i.attachment.id!==e||i.renderImageUploaderTemplate()},czrImgUploaderBinding:function(){var n=this;s.bindAll(n,"czrImgUploadRemoveFile","czrImgUploadOpenFrame","czrImgUploadSelect"),n.container.on("click keydown",".upload-button",n.czrImgUploadOpenFrame),n.container.on("click keydown",".thumbnail-image img",n.czrImgUploadOpenFrame),n.container.on("click keydown",".remove-button",n.czrImgUploadRemoveFile),n.bind(n.id+":changed",function(e,t){n.tmplRendered=o.Deferred(),n.setupContentRendering(e,t)})},czrImgUploadOpenFrame:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.czrImgUploadInitFrame(),this.frame.open())},czrImgUploadInitFrame:function(){var e=this.getUploaderLabels();this.frame=wp.media({button:{text:e.frame_button},states:[new wp.media.controller.Library({title:e.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1})]}),this.frame.on("select",this.czrImgUploadSelect)},czrImgUploadRemoveFile:function(e){r.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.attachment={},this.set(""))},czrImgUploadSelect:function(){var e=this.frame.state().get("selection").first().toJSON();window._wpmejsSettings;this.attachment=e,this.set(this.save_as_url?e.url:e.id)},renderImageUploaderTemplate:function(e){var t=this;e=s.extend({fromUrl:!1,url:""},e||{});var n=t.container.find("."+t.module.control.css_attr.img_upload_container);if(n.length&&!(t.container.length<1)){var i={button_labels:t.getUploaderLabels(),settings:t.id,attachment:t.attachment,fromUrl:e.url,canUpload:!0};return 0<o("#tmpl-czr-img-uploader").length?(n.html(wp.template("czr-img-uploader")(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")):r.CZR_Helpers.getModuleTmpl({tmpl:"img-uploader",module_type:"all_modules",module_id:t.module.id}).done(function(e){n.html(r.CZR_Helpers.parseTemplate(e)(i)),t.tmplRendered.resolve(),t.container.trigger(t.id+":content_rendered")}).fail(function(e){t.tmplRendered.reject("renderImageUploaderTemplate => Problem when fetching the tmpl from server for module : "+t.module.id)}),!0}},getUploaderLabels:function(){var e=serverControlParams.i18n,n=this,t={select:e.select_image,change:e.change_image,remove:e.remove_image,default:e.default_image,placeholder:e.placeholder_image,frame_title:e.frame_title_image,frame_button:e.frame_button_image},i={};return s.each(t,function(e,t){if(s.isEmpty(e))return r.errorLog("A translated string is missing ( "+t+" ) for the image uploader input in module : "+n.module.id),void(i[t]=t);i[t]=e}),i}})}(wp.customize,jQuery,_);CZRInputMths=CZRInputMths||{};!function(s,a,l){a.extend(CZRInputMths,{setupContentPicker:function(e){var r=this;a.extend(l.isObject(e)?e:{},{post:"",taxonomy:""}),r.wpObjectTypes=e,r.container.find(".czr-input").append('<select data-select-type="content-picker-select" class="js-example-basic-simple"></select>'),r.input_event_map=[{trigger:"change",selector:"select[data-select-type]",name:"set_input_value",actions:function(e){var t=a(e.dom_event.currentTarget,e.dom_el),n=a(t,e.dom_el).czrSelect2("data"),i={};n=l.isArray(n)?n[0]:n,l.isObject(n)&&!l.isEmpty(n)?(l.each({id:"",type_label:"",title:"",object_type:"",url:""},function(e,t){"_custom_"===n.id||l.has(n,t)&&!l.isEmpty(n[t])?i[t]=n[t]:s.errare("content_picker : missing input param : "+t)}),r.set(i)):s.errare("Content Picker Input : the picked value should be an object not empty.")}}],r.isReady.done(function(){r.setupContentSelecter()})},setupContentSelecter:function(){var o=this;if(!l.isEmpty(o())){var e={value:o().id||"",title:o().title||"",selected:"selected"};o.container.find("select").append(a("<option>",e))}o.currentAjaxAction=o.currentAjaxAction||new s.Value,o.currentAjaxAction.bind(function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").on("czrSelect2:select czrSelect2:unselect czrSelect2:close czrSelect2:open",function(e){o.defaultValueHasBeenPushed=!1}),o.container.find("select").czrSelect2({placeholder:{id:"-1",title:"Select"},data:o.setupSelectedContents(),ajax:{url:wp.ajax.settings.url,type:"POST",dataType:"json",delay:250,debug:!0,data:function(e){var t=e.page?e.page:0;return t=e.term?e.page:t,o.currentAjaxAction(e.term?"search-available-content-items-customizer":"load-available-content-items-customizer"),{action:o.currentAjaxAction(),search:e.term,wp_customize:"on",page:t,wp_object_types:JSON.stringify(o.wpObjectTypes),nonce:s.settings.nonce.save}},processResults:function(e,t){var n={defaultOption:{id:"",title:"",type_label:"",object_type:"",url:""}};if(o.input_parent&&o.input_parent.module?o.input_parent.module.trigger("set_default_content_picker_options",{defaultContentPickerOption:n}):s.infoLog(' content_picker input => ::processResults => event "set_default_content_picker_option" not triggered when in pre-item'),!e.success)return s.errare("request failure in setupContentPicker => processResults",e),{results:n.defaultOption};var i=e.data.items,r=[];return i=l.isArray(i)?i:[],o.defaultValueHasBeenPushed=o.defaultValueHasBeenPushed||!1,"load-available-content-items-customizer"!==o.currentAjaxAction()||l.isEmpty(n.defaultOption)||n.defaultOption.id&&!o.defaultValueHasBeenPushed&&(r.push(n.defaultOption),o.defaultValueHasBeenPushed=!0),l.each(i,function(e){r.push({id:e.id,title:e.title,type_label:e.type_label,object_type:e.object,url:e.url})}),{results:r,pagination:{more:1<=i.length}}}},templateSelection:o.czrFormatContentSelected,templateResult:o.czrFormatContentSelected,escapeMarkup:function(e){return e}})},czrFormatContentSelected:function(e){if(e.loading)return e.text;var t="<div class='content-picker-item clearfix'><div class='content-item-bar'><span class='czr-picker-item-title'>"+e.title+"</span>";return e.type_label&&(t+="<span class='czr-picker-item-type'>"+e.type_label+"</span>"),t+="</div></div>"},setupSelectedContents:function(){return this()}})}(wp.customize,jQuery,_);var CZRItemMths=CZRItemMths||{};!function(r,o,s){o.extend(CZRItemMths,{initialize:function(e,t){if(s.isUndefined(t.module)||s.isEmpty(t.module))throw new Error("No module assigned to item "+e+". Aborting");var n=this;r.Value.prototype.initialize.call(n,null,t),n.isReady=o.Deferred(),n.embedded=o.Deferred(),n.container=null,n.contentContainer=null,n.czr_Input=new r.Values,n.inputCollection=new r.Value({}),n.viewState=new r.Value("closed"),n.removeDialogVisible=new r.Value(!1),o.extend(n,t||{}),n.defaultItemModel=s.clone(t.defaultItemModel)||{id:"",title:""};var i=o.extend(n.defaultItemModel,t.initial_item_model);i=n.validateItemModelOnInitialize(i),n.set(i),n.userEventMap=new r.Value([{trigger:"click keydown",selector:["."+n.module.control.css_attr.display_alert_btn,"."+n.module.control.css_attr.cancel_alert_btn].join(","),name:"toggle_remove_alert",actions:["toggleRemoveAlert"]},{trigger:"click keydown",selector:"."+n.module.control.css_attr.remove_view_btn,name:"remove_item",actions:["removeItem"]},{trigger:"click keydown",selector:["."+n.module.control.css_attr.edit_view_btn,"."+n.module.control.css_attr.item_title].join(","),name:"edit_view",actions:["setViewVisibility"]},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=o(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}]),n.isReady.done(function(){n.module.updateItemsCollection({item:n()}),n.callbacks.add(function(){return n.itemReact.apply(n,arguments)}),n.bind("contentRendered",function(){if(s.isEmpty(n.inputCollection()))if(serverControlParams.isDevMode)r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n);else try{r.CZR_Helpers.setupInputCollectionFromDOM.call(n),n.module.setupTabNav.call(n)}catch(e){r.errorLog("In item.isReady.done : "+e)}}),n.bind("contentRemoved",function(){s.has(n,"czr_Input")&&r.CZR_Helpers.removeInputCollection.call(n)}),n.canBeRendered()&&n.mayBeRenderItemWrapper(),n.embedded.done(function(){n.itemWrapperViewSetup(i)})})},ready:function(){this.isReady.resolve()},canBeRendered:function(){return!0},validateItemModelOnInitialize:function(e){return e},itemReact:function(e,t,n){var i=this,r=i.module;n=n||{},r.updateItemsCollection({item:e,params:n}).done(function(){i.writeItemViewTitle(e,n)})}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(s,a,l){a.extend(CZRItemMths,{_sendItem:function(n,e){var t=this,i=t.module,r=[];l.each(e,function(e,t){e!=n[t]&&r.push(t)}),l.each(r,function(e){s.previewer.send("sub_setting",{set_id:i.control.id,id:n.id,changed_prop:e,value:n[e]}),i.trigger("item_sent",{item:n,dom_el:t.container,changed_prop:e})})},toggleRemoveAlert:function(){var e=this.removeDialogVisible();this.module.closeRemoveDialogs(),this.removeDialogVisible(!e)},removeItem:function(e){e=e||{};var t=this,n=this.module,i=l.clone(n.itemCollection());n.trigger("pre_item_dom_remove",t()),t._destroyView(),i=l.without(i,l.findWhere(i,{id:t.id})),n.itemCollection.set(i),n.trigger("pre_item_api_remove",t());var r=a.extend(!0,{},t());if(n.czr_Item.remove(t.id),"postMessage"!=s(n.control.id).transport||!l.has(e,"dom_event")||l.has(e.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(n.control.id))n.trigger("item-removed",r),n.control.trigger("item-removed",r);else{var o=function(){s.previewer.unbind("ready",o),n.trigger("item-removed",r)};s.previewer.bind("ready",o),s.previewer.refresh()}},getModel:function(e){return this()}})}(wp.customize,jQuery,_);CZRItemMths=CZRItemMths||{};!function(c,d,u){d.extend(CZRItemMths,{mayBeRenderItemWrapper:function(){var t=this;"pending"==t.embedded.state()&&(!u.isEmpty(t.container)&&0<t.container.length||d.when(t.renderItemWrapper()).done(function(e){if(t.container=e,u.isUndefined(t.container)||!t.container.length)throw new Error("In mayBeRenderItemWrapper the Item view has not been rendered : "+t.id);t.embedded.resolve()}))},renderItemWrapper:function(e){var t,n,i=this,r=i.module,o=d.Deferred(),s=d.extend(!0,{},e||i()),a=function(e){r.isMultiItem()&&(u.isEmpty(e)&&o.reject("renderItemWrapper => Missing html template for module : "+r.id),t.append(e)),t.append(d("<div/>",{class:r.control.css_attr.item_content})),o.resolve(t)};if(i.trigger("item-model-before-item-wrapper-template-injection",s),t=d("<li>",{class:r.control.css_attr.single_item,"data-id":s.id,id:s.id}),r.itemsWrapper.append(t),r.isMultiItem())if(u.isEmpty(r.rudItemPart)){var l={tmpl:"rud-item-part",module_type:"all_modules",module_id:r.id,control_id:r.control.id};i.trigger("item-wrapper-tmpl-params-before-fetching",l),u.isEmpty(r[l.tmpl])?c.CZR_Helpers.getModuleTmpl(l).done(function(e){a(c.CZR_Helpers.parseTemplate(e)(d.extend(s,{is_sortable:r.sortable})))}).fail(function(e){o.reject("renderItemWrapper => Problem when fetching the rud-item-part tmpl from server for module : "+r.id)}):(n=r.getTemplateSelectorPart(l.tmpl,s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(s)))}else n=r.getTemplateSelectorPart("rudItemPart",s),d("#tmpl-"+n).length<1&&o.reject("Missing template for item "+i.id+". The provided template script has no been found : #tmpl-"+n),a(wp.template(n)(d.extend(s,{is_sortable:r.sortable})));else a();return o.promise()},itemWrapperViewSetup:function(e){var r=this,i=this.module;item_model=r()||r.initial_item_model,r.writeItemViewTitle();var o=function(e,t,n){if(u.isUndefined(e)||!1===e.length)throw new Error("Module : "+r.module.id+", the item content has not been rendered for "+r.id);r.contentContainer=e,r.trigger("contentRendered",{item_content:e}),r.toggleItemExpansion(t,r.module.isMultiItem()?150:0),r.cleanLoader()};r.module.isMultiItem()?r.viewState.callbacks.add(function(t,e){var n=-1!==t.indexOf("expanded");i.hasModOpt()&&n&&c.czr_ModOptVisible(!1,{module:i,focus:!1}),n?u.isObject(r.contentContainer)&&!1!==r.contentContainer.length?r.toggleItemExpansion(t):(r.printLoader(),r.renderItemContent(r()||r.initial_item_model).done(function(e){o(e,t)}).fail(function(e){c.errorLog("multi-item module => failed item.renderItemContent for module : "+i.id,e)})):r.toggleItemExpansion(t).done(function(){u.isObject(r.contentContainer)&&!1!==r.contentContainer.length&&(r.trigger("beforeContenRemoved"),d("."+i.control.css_attr.item_content,r.container).children().each(function(){d(this).remove()}),d("."+i.control.css_attr.item_content,r.container).html(""),r.contentContainer=null,r.trigger("contentRemoved"))})}):(r.viewState.callbacks.add(function(e,t){r.toggleItemExpansion.apply(r,[e,0])}),r.printLoader(),r.renderItemContent(item_model).done(function(e){o(e,!0)}).fail(function(e){c.errare("mono-item module => failed item.renderItemContent for module : "+i.id,e)})),c.CZR_Helpers.setupDOMListeners(r.userEventMap(),{model:item_model,dom_el:r.container},r),r.removeDialogVisible.bind(function(e){var t=r.module,n=d("."+t.control.css_attr.remove_alert_wrapper,r.container).first();if(e&&t.closeAllItems(),e&&t.hasModOpt()&&c.czr_ModOptVisible(!1,{module:t,focus:!1}),e&&u.has(t,"preItem")&&t.preItemExpanded(!1),d("."+t.control.css_attr.remove_alert_wrapper,r.container).not(n).each(function(){d(this).hasClass("open")&&d(this).slideToggle({duration:200,done:function(){d(this).toggleClass("open",!1),d(this).siblings().find("."+t.control.css_attr.display_alert_btn).toggleClass("active",!1)}})}),e)if(u.isEmpty(t.alertPart))c.CZR_Helpers.getModuleTmpl({tmpl:"rud-item-alert-part",module_type:"all_modules",module_id:t.id,control_id:t.control.id}).done(function(e){n.html(c.CZR_Helpers.parseTemplate(e)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}).fail(function(e){c.errare("item.removeDialogVisible => Problem when fetching the tmpl from server for module : "+t.id,e)});else{if(d("#tmpl-"+t.alertPart).length<1||u.isEmpty(r.container))return void c.errare("No removal alert template available for items in module :"+t.id);n.html(wp.template(t.alertPart)({title:r().title||r.id})),r.trigger("remove-dialog-rendered")}var i=function(e){n.toggleClass("open",e),r.container.find("."+t.control.css_attr.display_alert_btn).toggleClass("active",e),e&&t._adjustScrollExpandedBlock(r.container)};e?n.stop(!0,!0).slideDown(200,function(){i(e)}):n.stop(!0,!0).slideUp(200,function(){i(e)})})},renderItemContent:function(e){var n=this,i=this.module,r=d.Deferred(),t=d.extend(!0,{},e||n());n.trigger("item-model-before-item-content-template-injection",t);var o=function(e){u.isEmpty(e)&&r.reject("renderItemContent => Missing html template for module : "+i.id);var t=d("."+i.control.css_attr.item_content,n.container);d(e).appendTo(t),r.resolve(t)};if(!u.isEmpty(i.itemInputList)||u.isFunction(i.itemInputList)){var s=i.getTemplateSelectorPart("itemInputList",t);d("#tmpl-"+s).length<1?r.reject("renderItemContent => No itemInputList content template defined for module "+i.id+". The template script id should be : #tmpl-"+s):o(wp.template(s)(d.extend(t,{control_id:i.control.id})))}else{var a={tmpl:"item-inputs",module_type:i.module_type,module_id:i.id,control_id:i.control.id,item_model:t};i.trigger("filter-request-params-before-fetching-for-item-content-tmpl",a),c.CZR_Helpers.getModuleTmpl(a).done(function(e){o(c.CZR_Helpers.parseTemplate(e)(d.extend(t,{control_id:i.control.id})))}).fail(function(e){r.reject(e)})}return r.promise()},writeItemViewTitle:function(e){var t=this,n=t.module,i=e||t(),r=u.has(i,"title")&&!u.isEmpty(i.title)?c.CZR_Helpers.capitalize(i.title):i.id;r=c.CZR_Helpers.truncate(r,20),d("."+n.control.css_attr.item_title,t.container).text(r),c.CZR_Helpers.doActions("after_writeViewTitle",t.container,i,t)},setViewVisibility:function(e,t){var n=this.module;t?this.viewState.set("expanded_noscroll"):(n.closeAllItems(this.id),u.has(n,"preItem")&&n.preItemExpanded.set(!1),this.viewState.set("expanded"==this._getViewState()?"closed":"expanded"))},_getViewState:function(){return-1==this.viewState().indexOf("expanded")?"closed":"expanded"},toggleItemExpansion:function(n,e){var t="closed"!=n,i=this,r=this.module,o=d("."+r.control.css_attr.item_content,i.container).first(),s=d.Deferred(),a=function(e){i.container.toggleClass("open",e),e&&r.closeRemoveDialogs();var t=o.siblings().find("."+r.control.css_attr.edit_view_btn);t.toggleClass("active",e),e?t.removeClass("fa-pencil-alt").addClass("fa-minus-square").attr("title",serverControlParams.i18n.close):t.removeClass("fa-minus-square").addClass("fa-pencil-alt").attr("title",serverControlParams.i18n.edit),"expanded"==n&&r._adjustScrollExpandedBlock(i.container),s.resolve()};return e=u.isUndefined(e)?150:e,t?o.stop(!0,!0).slideDown(e,function(){a(t)}):o.stop(!0,!0).slideUp(0,function(){a(t)}),s.promise()},_destroyView:function(e){this.container.fadeOut({duration:e||400,done:function(){d(this).remove()}})},printLoader:function(){var e=this;e.container.css({position:"relative"}).append(c.CZR_Helpers.css_loader_html).find(".czr-css-loader").fadeIn("fast"),clearTimeout(d.data(this,"_czr_loader_active_timer_")),d.data(this,"_czr_loader_active_timer_",setTimeout(function(){e.cleanLoader()},5e3))},cleanLoader:function(){this.container.css({"min-height":""}).find(".czr-css-loader").remove()}})}(wp.customize,jQuery,_);var CZRModOptMths=CZRModOptMths||{};!function(r,o,s){o.extend(CZRModOptMths,{initialize:function(e){if(s.isUndefined(e.module)||s.isEmpty(e.module))throw new Error("No module assigned to modOpt.");var t=this;r.Value.prototype.initialize.call(t,null,e),t.isReady=o.Deferred(),t.container=null,t.inputCollection=new r.Value({}),o.extend(t,e||{}),t.defaultModOptModel=s.clone(e.defaultModOptModel)||{is_mod_opt:!0};var n=o.extend(t.defaultModOptModel,e.initial_modOpt_model),i=t.module.control;t.set(n),t.isReady.done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).length||o.when(i.container.find(".customize-control-title").first().append(o("<span/>",{class:[i.css_attr.edit_modopt_icon,"fas fa-cog"].join(" "),title:serverControlParams.i18n.Settings}))).done(function(){o("."+i.css_attr.edit_modopt_icon,i.container).fadeIn(400)}),r.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.css_attr.edit_modopt_icon,name:"toggle_mod_option",actions:function(){r.czr_ModOptVisible(!r.czr_ModOptVisible(),{module:t.module,focus:!1})}}],{dom_el:i.container},t)})},ready:function(){this.isReady.resolve()}})}(wp.customize,jQuery,_);CZRModOptMths=CZRModOptMths||{};!function(o,s,a){s.extend(CZRModOptMths,{modOptWrapperViewSetup:function(e){var n=this,i=this.module,r=s.Deferred();return e=n()||n.initial_modOpt_model,n.renderModOptContent(e).done(function(e){if(a.isEmpty(e)||!(0<e.length))throw new Error("Module : "+n.module.id+", the modOpt content has not been rendered");var t;t=e,o.CZR_Helpers.setupDOMListeners([{trigger:"click keydown",selector:"."+i.control.css_attr.close_modopt_icon,name:"close_mod_option",actions:function(){o.czr_ModOptVisible(!1,{module:i,focus:!1})}},{trigger:"click keydown",selector:".tabs nav li",name:"tab_nav",actions:function(e){var t=s(e.dom_event.currentTarget,e.dom_el).data("tab-id");this.module.toggleTabVisibility.call(this,t),this.trigger("tab-switch",{id:t})}}],{dom_el:t},n),r.resolve(e)}).fail(function(e){o.errorLog("failed modOpt.renderModOptContent for module : "+i.id,e)}).then(function(){n.module.setupTabNav.call(n)}),r.promise()},renderModOptContent:function(t){var n=this.module,i=s.Deferred();t=t||this();var r=function(e){a.isEmpty(e)&&i.reject("renderModOptContent => Missing html template for module : "+n.id);var t="";try{t=[serverControlParams.i18n["Options for"],n.control.params.label].join(" ")}catch(e){o.errorLog("renderItemContent => Problem with ctrl label => "+e),t=serverControlParams.i18n.Settings}s("#widgets-left").after(s("<div/>",{class:n.control.css_attr.mod_opt_wrapper,html:[['<h2 class="mod-opt-title">',t,"</h2>"].join(""),'<span class="fas fa-times '+n.control.css_attr.close_modopt_icon+'" title="close"></span>'].join("")})),s("."+n.control.css_attr.mod_opt_wrapper).append(e),i.resolve(s("."+n.control.css_attr.mod_opt_wrapper))};if(a.isEmpty(n.itemPreAddEl))o.CZR_Helpers.getModuleTmpl({tmpl:"mod-opt",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){r(o.CZR_Helpers.parseTemplate(e)(t))}).fail(function(e){i.reject("renderPreItemView => Problem when fetching the mod-opt tmpl from server for module : "+n.id)});else{var e=n.getTemplateSelectorPart("modOptInputList",t);s("#tmpl-"+e).length<1&&i.reject("renderModOptContent => No modOpt content template defined for module "+n.id+". The template script id should be : #tmpl-"+e),r(wp.template(e)(t))}return i.promise()},toggleModPanelView:function(e){var t=this.module,n=(t.control,s.Deferred());return t.control.container.toggleClass("czr-modopt-visible",e),s("body").toggleClass("czr-editing-modopt",e),a.delay(function(){n.resolve()},200),n.promise()}})}(wp.customize,jQuery,_);var CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{initialize:function(e,t){if(a.isUndefined(t.control)||a.isEmpty(t.control))throw new Error("No control assigned to module "+e);var n=this;o.Value.prototype.initialize.call(this,null,t),n.isReady=s.Deferred(),s.extend(n,t||{}),s.extend(n,{crudModulePart:n.crudModulePart||"",rudItemPart:n.rudItemPart||"",ruItemPart:n.ruItemPart||"",alertPart:n.alertPart||"",itemInputList:n.itemInputList||"",modOptInputList:n.modOptInputList||""}),n.embedded=s.Deferred(),n.itemsWrapper="",n.container=s(n.control.selector),n.renderModuleParts().done(function(e){if(!1===e.length)throw new Error("The items wrapper has not been rendered for module : "+n.id);n.itemsWrapper=e,n.embedded.resolve()}).fail(function(e){throw new Error(["initialize module => failed module.renderModuleParts() for module : ",n.id,e].join(" "))}),n.defaultAPImodOptModel={initial_modOpt_model:{},defaultModOptModel:{},control:{},module:{}},n.defaultModOptModel={},n.modOptConstructor=n.modOptConstructor||o.CZRModOpt,n.itemCollection=new o.Value([]),n.defaultAPIitemModel={id:"",initial_item_model:{},defaultItemModel:{},control:{},module:{},is_added_by_user:!1},n.defaultItemModel=o.czrModuleMap[n.module_type].defaultItemModel||{id:"",title:""},n.itemConstructor=n.itemConstructor||o.CZRItem,n.czr_Item=new o.Values,n.inputConstructor=n.inputConstructor||o.CZRInput,n.hasModOpt()&&(n.inputModOptConstructor=n.inputModOptConstructor||o.CZRInput),n.inputOptions={},n.isReady.done(function(){n.isDirty=new o.Value(t.dirty||!1),n.initializeModuleModel(t).done(function(e){n.set(e)}).fail(function(e){o.errare("Module : "+n.id+" initialize module model failed : ",e)}).always(function(e){n.callbacks.add(function(){return n.moduleReact.apply(n,arguments)}),n.control.isModuleRegistered(n.id)||n.control.updateModulesCollection({module:t,is_registered:!1}),n.bind("items-collection-populated",function(e){n.itemCollection.callbacks.add(function(){return n.itemCollectionReact.apply(n,arguments)}),!1!==n.sortable&&n._makeItemsSortable(),n.control.container.trigger("items-collection-populated")}),n.populateSavedItemCollection(),n.hasModOpt()&&n.instantiateModOpt()})}),!0===o.czrModuleMap[n.module_type].ready_on_section_expanded&&(a.has(o,"czr_activeSectionId")&&n.control.section()==o.czr_activeSectionId()&&"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()}),o.section(n.control.section(),function(e){e.expanded.bind(function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}));var i=o.czrModuleMap[n.module_type].ready_on_control_event;a.isUndefined(i)||o.control(n.control.id,function(e){e.container.on(i,function(e){"resolved"!=n.isReady.state()&&n.embedded.then(function(){n.ready()})})}),this.maybeAwakeAndBindSharedModOpt()},ready:function(){this.isReady.resolve()},initializeModuleModel:function(e){var t=s.Deferred();if(!this.isMultiItem()&&!this.isCrud()&&a.isEmpty(e.items)){var n=a.clone(this.defaultItemModel);e.items=[s.extend(n,{id:this.id})]}return t.resolve(e).promise()},itemCollectionReact:function(e,t,n){var i=this(),r=s.extend(!0,{},i);r.items=e,this.isDirty.set(!0),this.set(r,n||{})},filterItemsBeforeCoreApiSettingValue:function(e){return e},moduleReact:function(e,t,n){var i=this.control;a.size(t.items)==a.size(e.items)&&a.isEmpty(a.difference(e.items,t.items)),e.column_id,t.column_id;i.updateModulesCollection({module:s.extend(!0,{},e),data:n})},getModuleSection:function(){return this.section},isMultiItem:function(){return o.CZR_Helpers.isMultiItemModule(null,this)},isCrud:function(){return o.CZR_Helpers.isCrudModule(null,this)},hasModOpt:function(){return o.CZR_Helpers.hasModuleModOpt(null,this)},instantiateModOpt:function(){var o=this,e=o.prepareModOptForAPI(o().modOpt||{});o.czr_ModOpt=new o.modOptConstructor(e),o.czr_ModOpt.ready(),o.czr_ModOpt.callbacks.add(function(e,t,n){var i=o(),r=s.extend(!0,{},i);r.modOpt=e,o.isDirty(!0),o(r,n)})},prepareModOptForAPI:function(n){var i=this,r={};return n=a.isObject(n)?n:{},a.each(i.defaultAPImodOptModel,function(e,t){n[t];switch(t){case"initial_modOpt_model":a.each(i.getDefaultModOptModel(),function(e,t){a.has(n,t)||(n[t]=e)}),r[t]=n;break;case"defaultModOptModel":r[t]=a.clone(i.defaultModOptModel);break;case"control":r[t]=i.control;break;case"module":r[t]=i}}),r},getDefaultModOptModel:function(e){return s.extend(a.clone(this.defaultModOptModel),{is_mod_opt:!0})},sendInputToPreview:function(e){var t=this;e=a.extend({input_id:"",input_parent_id:"",to:null,from:null},e),a.isEqual(e.to,e.from)||(o.previewer.send("czr_input",{set_id:o.CZR_Helpers.getControlSettingId(t.control.id),module_id:t.id,module:{items:s.extend(!0,{},t().items),modOpt:t.hasModOpt()?s.extend(!0,{},t().modOpt):{}},input_parent_id:e.input_parent_id,input_id:e.input_id,value:e.to,isPartialRefresh:e.isPartialRefresh}),t.trigger("input_sent",{input:e.to,dom_el:t.container}))},sendModuleInputsToPreview:function(i){var r=this,t=function(){var n=this,e=s.extend(!0,{},n());e=a.omit(e,"id"),a.each(e,function(e,t){r.sendInputToPreview({input_id:t,input_parent_id:n.id,to:e,from:null,isPartialRefresh:i.isPartialRefresh})})};r.czr_Item.each(function(e){t.call(e)}),r.hasModOpt()&&t.call(r.czr_ModOpt)},maybeAwakeAndBindSharedModOpt:function(){a.isUndefined(o.czr_ModOptVisible)&&(o.czr_ModOptVisible=new o.Value(!1),o.czr_ModOptVisible.bind(function(t,e,n){if(n=n||{},a.isFunction(n.module)&&a.isFunction(n.module.czr_ModOpt)){var i=n.module.czr_ModOpt,r=n.module;t?(r.closeRemoveDialogs().closeAllItems(),i.modOptWrapperViewSetup(i()).done(function(e){i.container=e;try{o.CZR_Helpers.setupInputCollectionFromDOM.call(i).toggleModPanelView(t)}catch(e){o.consoleLog(e)}r&&n.focus&&a.delay(function(){!a.isNull(i.container)&&i.container.find('[data-tab-id="'+n.focus+'"] a').length&&i.container.find('[data-tab-id="'+n.focus+'"] a').trigger("click")},200)})):i.toggleModPanelView(t).done(function(){i.container&&0<i.container.length?s.when(i.container.remove()).done(function(){o.CZR_Helpers.removeInputCollection.call(i)}):o.CZR_Helpers.removeInputCollection.call(i),i.container=null})}else o.errare("moduleCtor::maybeAwakeAndBindSharedModOpt => api.czr_ModOptVisible.bind() => incorrect arguments",n)}))}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(r,s,a){s.extend(CZRModuleMths,{populateSavedItemCollection:function(e){var t,i=this;a.isArray(e||i().items)?(t=s.extend(!0,[],e||i().items),a.each(t,function(e,t){if(a.has(e,"is_mod_opt"))throw new Error("populateSavedItemCollection => there should be no mod opt to instantiate here.")}),i.trigger("filterItemCandidatesBeforeInstantiation",t),a.each(t,function(t,e){var n=function(){var e=i.instantiateItem(t);a.isFunction(e)?e.ready():r.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,t)};if(serverControlParams.isDevMode)n();else try{n()}catch(e){r.errare("populateSavedItemCollection => "+e)}}),a.each(t,function(e){if(a.isObject(e)&&a.isUndefined(a.findWhere(i.itemCollection(),e.id)))throw new Error("populateSavedItemCollection => The saved items have not been properly populated in module : "+i.id)}),i.trigger("items-collection-populated")):r.errorLog("populateSavedItemCollection : The saved items collection must be an array in module :"+i.id)},instantiateItem:function(e,t){var n=this;if(e=a.isObject(e)?e:{},(e=n.validateItemBeforeAddition(e,t))&&!a.isNull(e))if(e=n.prepareItemForAPI(e),a.isObject(e)){if(e&&!a.isNull(e)){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateItem() => an item has no id and could not be added in the collection of : "+this.id);if(n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => the following item id "+e.id+" already exists in module.czr_Item() for module "+this.id);if(n.czr_Item.add(e.id,new n.itemConstructor(e.id,e)),!n.czr_Item.has(e.id))throw new Error("CZRModule::instantiateItem() => instantiation failed for item id "+e.id+" for module "+this.id);return n.czr_Item(e.id)}r.errare("CZRModule::instantiateItem() => item_candidate invalid in module "+n.id)}else r.errare("CZRModule::instantiateItem() => an item should be described by an object in module type : "+n.module_type,"module id : "+n.id);else r.errare("CZRModule::instantiateItem() => item_candidate did not pass validation in module "+n.id)},validateItemBeforeAddition:function(e,t){return e},prepareItemForAPI:function(i){var r=this,o={};return i=a.isObject(i)?i:{},a.each(r.defaultAPIitemModel,function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateItemId(r.module_type):r.isItemRegistered(n)?r.generateItemId(n):o[t]=n;break;case"initial_item_model":a.each(r.getDefaultItemModel(),function(e,t){a.has(i,t)||(i[t]=e)}),o[t]=i;break;case"defaultItemModel":o[t]=a.clone(r.defaultItemModel);break;case"control":o[t]=r.control;break;case"module":o[t]=r;break;case"is_added_by_user":o[t]=!!a.isBoolean(n)&&n}}),a.has(o,"id")||(o.id=r.generateItemId(r.module_type)),o.initial_item_model.id=o.id,r.validateItemBeforeInstantiation(o)},validateItemBeforeInstantiation:function(e){return e},generateItemId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextItemKeyInCollection());if(!a.has(i,"itemCollection")||!a.isArray(i.itemCollection()))throw new Error("The item collection does not exist or is not properly set in module : "+i.id);return i.isItemRegistered(r)?(t++,n++,i.generateItemId(e,t,n)):r},_getNextItemKeyInCollection:function(){var e=this,t={},n=0;return a.isEmpty(e.itemCollection())||(t=a.isArray(e.itemCollection())&&1===a.size(e.itemCollection())?e.itemCollection()[0]:a.max(e.itemCollection(),function(e){return a.isNumber(e.id.replace(/[^\/\d]/g,""))?parseInt(e.id.replace(/[^\/\d]/g,""),10):0}),!a.isUndefined(t)&&a.isNumber(t.id.replace(/[^\/\d]/g,""))&&(n=parseInt(t.id.replace(/[^\/\d]/g,""),10)+1)),n},isItemRegistered:function(e){return!a.isUndefined(a.findWhere(this.itemCollection(),{id:e}))},updateItemsCollection:function(e){var t=this,n=t.itemCollection(),i=a.clone(n),r=s.Deferred();if(!a.has(e,"collection")){if(!a.has(e,"item"))throw new Error("updateItemsCollection, no item provided "+t.control.id+". Aborting");e=a.extend({params:{}},e);var o=a.clone(e.item);return a.each(t.defaultItemModel,function(e,t){if(!a.has(o,t))throw new Error('CZRModuleMths => updateItemsCollection : Missing property "'+t+'" for item candidate')}),a.findWhere(i,{id:o.id})?a.each(n,function(e,t){e.id==o.id&&(i[t]=o)}):i.push(o),t.itemCollection.set(i,e.params),r.resolve({collection:i,params:e.params}).promise()}t.itemCollection.set(e.collection)},_getSortedDOMItemCollection:function(){var n=a.clone(this.itemCollection()),i=[],e=s.Deferred();if(s("."+this.control.css_attr.single_item,this.container).each(function(e){var t=a.findWhere(n,{id:s(this).attr("data-id")});t&&(i[e]=t)}),n.length!=i.length)throw new Error("There was a problem when re-building the item collection from the DOM in module : "+this.id);return e.resolve(i).promise()},refreshItemCollection:function(){var t=this;t.czr_Item.each(function(e){t.czr_Item(e.id).container&&0<t.czr_Item(e.id).container.length&&s.when(t.czr_Item(e.id).container.remove()).done(function(){t.czr_Item.remove(e.id)})}),t.itemCollection=new r.Value([]),t.populateSavedItemCollection()}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(e,o,s){o.extend(CZRModuleMths,{getDefaultItemModel:function(e){return o.extend(s.clone(this.defaultItemModel),{id:e||""})},_initNewItem:function(e,t){var n,i=this,r={id:""};return t=void 0!==t?t:s.size(i.itemCollection()),s.isNumber(t)?n=i.module_type+"_"+t:(n=t,t=0),r=e&&!s.isEmpty(e)?o.extend(e,{id:n}):this.getDefaultItemModel(n),s.has(r,"id")&&i._isItemIdPossible(n)?(s.map(i.getDefaultItemModel(),function(e,t){s.has(r,t)||(r[t]=e)}),r):i._initNewItem(r,t+1)}})}(wp.customize,jQuery,_);CZRModuleMths=CZRModuleMths||{};!function(o,s,a){s.extend(CZRModuleMths,{renderModuleParts:function(){var n=this,i=s(n.container),r=s.Deferred(),t=function(e){n.isCrud()&&(a.isEmpty(e)&&r.reject("renderModuleParts => Missing html template for module : "+n.id),i.append(e));var t=s("<ul/>",{class:[n.control.css_attr.items_wrapper,n.module_type,n.isMultiItem()?"multi-item-mod":"mono-item-mod",n.isCrud()?"crud-mod":"not-crud-mod"].join(" ")});i.append(t),r.resolve(s(t,i))};return n.isCrud()?a.isEmpty(n.crudModulePart)?o.CZR_Helpers.getModuleTmpl({tmpl:"crud-module-part",module_type:"all_modules",module_id:n.id,control_id:n.control.id}).done(function(e){t(o.CZR_Helpers.parseTemplate(e)({}))}).fail(function(e){o.errare("renderModuleParts => fail response =>",e),r.reject("renderModuleParts => Problem when fetching the crud-module-part tmpl from server for module : "+n.id)}):(s("#tmpl-"+n.crudModulePart).length<1&&r.reject("renderModuleParts => no crud Module Part template for module "+n.id+". The template script id should be : #tmpl-"+n.crudModulePart),t(wp.template(n.crudModulePart)({}))):t(),r.promise()},getTemplateSelectorPart:function(e,t){var n,i=this;switch(e){case"rudItemPart":n=i.rudItemPart;break;case"ruItemPart":n=i.ruItemPart;break;case"modOptInputList":n=i.modOptInputList;break;case"itemInputList":n=a.isFunction(i.itemInputList)?i.itemInputList(t):i.itemInputList}if(a.isEmpty(n))throw new Error("No valid template has been found in getTemplateSelectorPart() "+i.id+". Aborting");return n},getViewEl:function(e){return s('[data-id = "'+e+'"]',this.container)},closeAllItems:function(t){var n=this,e=a.clone(n.itemCollection()),i=a.filter(e,function(e){return e.id!=t});return a.each(i,function(e){n.czr_Item.has(e.id)&&"expanded"==n.czr_Item(e.id)._getViewState(e.id)&&n.czr_Item(e.id).viewState.set("closed")}),o.trigger("czr-all-items-closed",{module_id:n.id}),this},_adjustScrollExpandedBlock:function(e,t){if(e.length&&!a.isUndefined(this.getModuleSection())){var n,i=s(".accordion-section-content",this.section.container),r=i.scrollTop(),o=t||90;setTimeout(function(){e.offset().top+e.height()+o>s(window.top).height()&&0<(n=e.offset().top+e.height()+o-s(window.top).height())&&i.animate({scrollTop:r+n},500)},50)}},closeRemoveDialogs:function(){if(a.isArray(this.itemCollection()))return this.czr_Item.each(function(e){e.removeDialogVisible(!1)}),this},_makeItemsSortable:function(e){if(!wp.media.isTouchDevice&&s.fn.sortable){var n=this;s("."+n.control.css_attr.items_wrapper,n.container).sortable({handle:"."+n.control.css_attr.item_sort_handle,start:function(){},update:function(e,t){n._getSortedDOMItemCollection().done(function(e){n.itemCollection.set(e)}).then(function(){!function(){a.has(n,"preItem")&&n.preItemExpanded.set(!1),n.closeAllItems().closeRemoveDialogs();var e=function(){o.previewer.refresh()};"postMessage"!=o(n.control.id).transport||o.CZR_Helpers.hasPartRefresh(n.control.id)||(e=a.debounce(e,500))(),n.trigger("item-collection-sorted")}()})}})}},toggleTabVisibility:function(e){var t=this;s(t.container).find("li"),s(t.container).find("section");s(".tabs nav li",t.container).each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),s(t.container).find('li[data-tab-id="'+e+'"]').addClass("tab-current").removeClass("tab-inactive"),s("section",t.container).each(function(){s(this).removeClass("content-current")}),s(t.container).find('section[id="'+e+'"]').addClass("content-current")},setupTabNav:function(){var i=this;setTimeout(function(){(function(){var e=s.Deferred(),t=s(".tabs nav li",i.container);t.each(function(){s(this).removeClass("tab-current").addClass("tab-inactive")}),t.first().addClass("tab-current").removeClass("tab-inactive"),s("section",i.container).first().addClass("content-current");var n=t.length;return t.each(function(){s(this).addClass(0<n?"cols-"+n:"")}),e.resolve().promise()})().done(function(){s(".tabs",i.container).show()})},20)}})}(wp.customize,jQuery,_);var CZRDynModuleMths=CZRDynModuleMths||{};!function(s,a,l){a.extend(CZRDynModuleMths,{initialize:function(e,t){var n=this;s.CZRModule.prototype.initialize.call(n,e,t),a.extend(n,{itemPreAddEl:""}),n.preItemsWrapper="",n.preItemExpanded=new s.Value(!1),n.itemAddedMessage=serverControlParams.i18n.successMessage;var i=function(e){n.addItem(e).done(function(e){n.czr_Item(e,function(e){e.embedded.then(function(){e.viewState("expanded")})})}).fail(function(e){s.errare("module.addItem failed on add_item",e)})};n.userEventMap=new s.Value([{trigger:"click keydown",selector:["."+n.control.css_attr.open_pre_add_btn,"."+n.control.css_attr.cancel_pre_add_btn].join(","),name:"pre_add_item",actions:["closeAllItems","closeRemoveDialogs",function(e){var t={addTheItem:!0};this.trigger("is-item-addition-possible",t),t.addTheItem&&this.hasPreItem?this.preItemExpanded.set(!this.preItemExpanded()):i(e)}]},{trigger:"click keydown",selector:"."+n.control.css_attr.add_new_btn,name:"add_item",actions:function(e){n.closeRemoveDialogs(e).closeAllItems(e),i(e)}}])},ready:function(){var t=this;t.setupDOMListeners(t.userEventMap(),{dom_el:t.container}),t.preItem=new s.Value(t.getDefaultItemModel()),t.preItemExpanded.callbacks.add(function(e){e?t.renderPreItemView().done(function(e){t.preItemsWrapper=e,t.preItem(t.getDefaultItemModel()),t.trigger("before-pre-item-input-collection-setup"),t.setupPreItemInputCollection()}).fail(function(e){s.errorLog("Pre-Item : "+e)}):a.when(t.preItemsWrapper.remove()).done(function(){t.preItem.czr_Input={},t.preItemsWrapper=null,t.trigger("pre-item-input-collection-destroyed")}),t._togglePreItemViewExpansion(e)}),s.CZRModule.prototype.ready.call(t)},setupPreItemInputCollection:function(){var n=this;n.preItem.czr_Input=new s.Values,a("."+n.control.css_attr.pre_add_wrapper,n.container).find("."+n.control.css_attr.sub_set_wrapper).each(function(e){var t=a(this).find("[data-czrtype]").attr("data-czrtype")||"sub_set_"+e;n.preItem.czr_Input.add(t,new n.inputConstructor(t,{id:t,type:a(this).attr("data-input-type"),container:a(this),input_parent:n.preItem,module:n,is_preItemInput:!0})),n.preItem.czr_Input(t).ready()}),n.trigger("pre-item-input-collection-ready")},getPreItem:function(){return this.preItem()},itemCanBeInstantiated:function(){return!0},addItem:function(n){var t=a.Deferred();if(!this.itemCanBeInstantiated())return t.reject().promise();var i=this,r=i.getPreItem(),o=function(){i.preItemExpanded.set(!1)};if(l.isEmpty(r)||!l.isObject(r))return s.errorLog("addItem : an item_candidate should be an object and not empty. In : "+i.id+". Aborted."),t.reject().promise();o=l.debounce(o,200);var e=function(){var e=i.instantiateItem(r,!0);return l.isFunction(e)?e.ready():s.errare("populateSavedItemCollection => Could not instantiate item in module "+i.id,r),e};if(serverControlParams.isDevMode)e();else try{e()}catch(e){return s.errare("populateSavedItemCollection : "+e),t.reject().promise()}return i.czr_Item.has(r.id)?(a.Deferred(function(){var t=this;i.czr_Item(r.id).isReady.then(function(){o(),i.trigger("item-added",r);var e=function(){s.previewer.unbind("ready",e),t.resolve()};i.refresh_on_add_item?"postMessage"!=s(i.control.id).transport||!l.has(n,"dom_event")||l.has(n.dom_event,"isTrigger")||s.CZR_Helpers.hasPartRefresh(i.control.id)?t.resolve():(s.previewer.bind("ready",e),s.previewer.refresh()):t.resolve()})}).always(function(){t.resolve(r.id)}),t.promise()):t.reject("populateSavedItemCollection : the item "+r.id+" has not been instantiated in module "+i.id).promise()}})}(wp.customize,jQuery,_);CZRDynModuleMths=CZRDynModuleMths||{};!function(r,o,s){o.extend(CZRDynModuleMths,{renderPreItemView:function(e){var n=this,i=o.Deferred();if(s.isObject(n.preItemsWrapper)&&0<n.preItemsWrapper.length)return i.resolve(n.preItemsWrapper).promise();var t=function(e){!s.isEmpty(e)&&n.container||i.reject("renderPreItemView => Missing html template for module : "+n.id);var t=o("."+n.control.css_attr.pre_add_item_content,n.container);t.prepend(o("<div>",{class:"pre-item-wrapper"})),t.find(".pre-item-wrapper").append(e),i.resolve(t.find(".pre-item-wrapper")).promise()};return s.isEmpty(n.itemPreAddEl)?r.CZR_Helpers.getModuleTmpl({tmpl:"pre-item",module_type:n.module_type,module_id:n.id,control_id:n.control.id}).done(function(e){t(r.CZR_Helpers.parseTemplate(e)())}).fail(function(e){i.reject(["renderPreItemView for module : ",n.id,e].join(" "))}):(o("#tmpl-"+n.itemPreAddEl).length<1&&i.reject("renderPreItemView => Missing itemPreAddEl or template in module "+n.id),t(wp.template(n.itemPreAddEl)())),i.promise()},_getPreItemView:function(){return o("."+this.control.css_attr.pre_add_item_content,this.container)},_togglePreItemViewExpansion:function(t){var n=this;o("."+n.control.css_attr.pre_add_item_content,n.container).slideToggle({duration:200,done:function(){var e=o("."+n.control.css_attr.open_pre_add_btn,n.container);o(this).toggleClass("open",t),t?e.find(".fas").removeClass("fa-plus-square").addClass("fa-minus-square"):e.find(".fas").removeClass("fa-minus-square").addClass("fa-plus-square"),e.toggleClass("active",t),o(n.container).toggleClass(n.control.css_attr.adding_new,t),n._adjustScrollExpandedBlock(o(this),120)}})},toggleSuccessMessage:function(e){var t=this,n=t.itemAddedMessage,i=o("."+t.control.css_attr.pre_add_wrapper,t.container);return $_success_wrapper=o("."+t.control.css_attr.pre_add_success,t.container),"on"==e?($_success_wrapper.find("p").text(n),$_success_wrapper.css("z-index",1000001).css("height",i.height()+"px").css("line-height",i.height()+"px")):$_success_wrapper.attr("style",""),t.container.toggleClass("czr-model-added","on"==e),this}})}(wp.customize,jQuery,_);var CZRBaseControlMths=CZRBaseControlMths||{};!function(i,e,r){e.extend(CZRBaseControlMths,{initialize:function(e,t){var n=this;n.css_attr=r.has(serverControlParams,"css_attr")?serverControlParams.css_attr:{},i.Control.prototype.initialize.call(n,e,t),n.bind("czr-partial-refresh-done",function(){r.has(n,"czr_moduleCollection")&&r.each(n.czr_moduleCollection(),function(e){n.czr_Module(e.id)&&n.czr_Module(e.id).sendModuleInputsToPreview({isPartialRefresh:!0})})})},refreshPreview:function(e){this.previewer.refresh()}})}(wp.customize,jQuery,_);var CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(l,c,d){c.extend(CZRBaseModuleControlMths,{initialize:function(e,t){var n=this;if(!l.has(e))throw new Error("Missing a registered setting for control : "+e);n.czr_Module=new l.Values,n.czr_moduleCollection=new l.Value,n.czr_moduleCollection.set([]),n.moduleCollectionReady=c.Deferred(),n.moduleCollectionReady.done(function(e){n.czr_moduleCollection.callbacks.add(function(){return n.moduleCollectionReact.apply(n,arguments)})}),l.CZRBaseControl.prototype.initialize.call(n,e,t),l.section(n.section(),function(e){e.expanded.bind(function(e){n.czr_Module.each(function(e){e.closeAllItems().closeRemoveDialogs(),d.has(e,"preItem")&&e.preItemExpanded(!1)})})})},ready:function(){var n=this,i={};try{n.getSavedModules()}catch(e){return l.errare("api.CZRBaseControl::ready() => error on control.getSavedModules()",e),void n.moduleCollectionReady.reject()}d.each(n.getSavedModules(),function(t,e){if(i=t,serverControlParams.isDevMode)n.instantiateModule(t,{});else try{n.instantiateModule(t,{})}catch(e){return void l.errare("api.CZRBaseControl::Failed to instantiate module "+t.id,e)}n.container.attr("data-module",t.id)}),n.moduleCollectionReady.resolve(i)},getDefaultModuleApiModel:function(){return{id:"",module_type:"",modOpt:{},items:[],crud:!1,hasPreItem:!0,refresh_on_add_item:!0,multi_item:!1,sortable:!1,control:{},section:""}},getSavedModules:function(){var n=this,e=[],i=n.params.module_type,r=[],o=[],s={};l.CZR_Helpers.isMultiItemModule(i)||d.isEmpty(l(n.id)())||d.isObject(l(n.id)())||l.errare("api.CZRBaseControl::getSavedModules => module Control Init for "+n.id+" : a mono item module control value should be an object if not empty.");var t=l.CZR_Helpers.getControlSettingId(n.id),a=l(t)();return r=d.isEmpty(a)?[]:d.isArray(a)?a:[a],d.each(r,function(e,t){d.isObject(e)?(d.isEmpty(e)||d.each(e,function(e,t){d.isString(t)||l.errare("api.CZRBaseControl::::getSavedModules => item not well formed in control : "+n.id+" => module type => "+n.params.module_type,r)}),l.CZR_Helpers.hasModuleModOpt(i)&&0===t&&(d.has(e,"id")?l.errare("api.CZRBaseControl::getSavedModules : the module "+i+" in control "+n.id+" has no mod_opt defined while it should."):s=e),d.has(e,"is_mod_opt")||o.push(e)):l.errare("api.CZRBaseControl::::getSavedModules => an item must be an object in control "+n.id+" => module type => "+n.params.module_type,r)}),e.push({id:l.CZR_Helpers.getOptionName(n.id)+"_"+n.params.type,module_type:n.params.module_type,section:n.section(),modOpt:c.extend(!0,{},s),items:c.extend(!0,[],o)}),e},isModuleRegistered:function(e){return!d.isUndefined(d.findWhere(this.czr_moduleCollection(),{id:e}))}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,e,a){e.extend(CZRBaseModuleControlMths,{instantiateModule:function(e,t){if(!a.has(e,"id"))throw new Error("CZRModule::instantiateModule() : a module has no id and could not be added in the collection of : "+this.id+". Aborted.");var n=this;if((a.isUndefined(t)||a.isEmpty(t))&&(t=n.getModuleConstructor(e)),!a.isEmpty(e.id)&&n.czr_Module.has(e.id))throw new Error("The module id already exists in the collection in control : "+n.id);var i=n.prepareModuleForAPI(e);if(n.czr_Module.add(i.id,new t(i.id,i)),!n.czr_Module.has(i.id))throw new Error("instantiateModule() : instantiation failed for module id "+i.id+" in control "+n.id);return n.czr_Module(i.id)},getModuleConstructor:function(e){var t;if(!a.has(e,"module_type"))throw new Error("CZRModule::getModuleConstructor : no module type found for module "+e.id);if(!a.has(s.czrModuleMap,e.module_type))throw new Error("Module type "+e.module_type+" is not listed in the module map api.czrModuleMap.");var n=s.czrModuleMap[e.module_type].mthds;if(t=(s.czrModuleMap[e.module_type].crud?s.CZRDynModule:s.CZRModule).extend(n),a.isUndefined(t)||a.isEmpty(t)||!t)throw new Error("CZRModule::getModuleConstructor : no constructor found for module type : "+e.module_type+".");return t},prepareModuleForAPI:function(i){if(!a.isObject(i))throw new Error("prepareModuleForAPI : a module must be an object to be instantiated.");var r=this,o={};return a.each(r.getDefaultModuleApiModel(),function(e,t){var n=i[t];switch(t){case"id":a.isEmpty(n)?o[t]=r.generateModuleId(i.module_type):o[t]=n;break;case"module_type":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module type must a string not empty");o[t]=n;break;case"items":if(!a.isArray(n))throw new Error("prepareModuleForAPI : a module item list must be an array");o[t]=n;break;case"modOpt":if(!a.isObject(n))throw new Error("prepareModuleForAPI : a module modOpt property must be an object");o[t]=n;break;case"crud":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].crud,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "crud" must be a boolean');o[t]=n||!1;break;case"hasPreItem":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].hasPreItem,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "hasPreItem" must be a boolean');o[t]=n||!1;break;case"refresh_on_add_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].refresh_on_add_item,a.isUndefined(n)&&(n=e);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "refresh_on_add_item" must be a boolean');o[t]=n||!1;break;case"multi_item":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].multi_item,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "multi_item" must be a boolean');o[t]=n||!1;break;case"sortable":if(a.has(s.czrModuleMap,i.module_type))n=s.czrModuleMap[i.module_type].sortable,a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].crud),a.isUndefined(n)&&(n=s.czrModuleMap[i.module_type].multi_item);else if(!a.isUndefined(n)&&!a.isBoolean(n))throw new Error('prepareModuleForAPI : the module param "sortable" must be a boolean');o[t]=n||!1;break;case"control":o[t]=r;break;case"section":if(!a.isString(n)||a.isEmpty(n))throw new Error("prepareModuleForAPI : a module section must be a string not empty");o[t]=n;break;case"dirty":o[t]=n||!1}}),o},generateModuleId:function(e,t,n){if(100<(n=n||1))throw new Error("Infinite loop when generating of a module id.");var i=this,r=e+"_"+(t=t||i._getNextModuleKeyInCollection());if(!a.has(i,"czr_moduleCollection")||!a.isArray(i.czr_moduleCollection()))throw new Error("The module collection does not exist or is not properly set in control : "+i.id);return i.isModuleRegistered(r)?(t++,n++,i.generateModuleId(e,t,n)):r},_getNextModuleKeyInCollection:function(){var e={},t=0;return a.isEmpty(this.czr_moduleCollection())||(e=a.max(this.czr_moduleCollection(),function(e){return parseInt(e.id.replace(/[^\/\d]/g,""),10)}),t=parseInt(e.id.replace(/[^\/\d]/g,""),10)+1),t}})}(wp.customize,jQuery,_);CZRBaseModuleControlMths=CZRBaseModuleControlMths||{};!function(s,a,l){a.extend(CZRBaseModuleControlMths,{updateModulesCollection:function(e){var t=this,n=t.czr_moduleCollection(),i=a.extend(!0,[],n);if(l.has(e,"collection"))t.czr_moduleCollection.set(e.collection,e.data||{});else{if(!l.has(e,"module"))throw new Error("updateModulesCollection, no module provided "+t.id+". Aborting");var r=t.prepareModuleForAPI(l.clone(e.module));l.findWhere(i,{id:r.id})?l.each(n,function(e,t){e.id==r.id&&(i[t]=r)}):i.push(r);var o={};l.has(e,"data")&&(o=a.extend(!0,{},e.data),a.extend(o,{module:r})),t.czr_moduleCollection.set(i,o)}},moduleCollectionReact:function(t,e,n){var i=l.size(t)>l.size(e),r=l.size(e)>l.size(t);l.size(e),l.size(t);if(is_collection_sorted=!1,r){var o=l.filter(e,function(e){return l.isUndefined(l.findWhere(t,{id:e.id}))});o=o[0],this.czr_Module.remove(o.id)}if(l.isObject(n)&&l.has(n,"module")&&(n.module_id=n.module.id,n.moduleRegistrationParams=n.module,n.module=this.prepareModuleForDB(a.extend(!0,{},n.module))),!i)if(serverControlParams.isDevMode)s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n);else try{s(this.id).set(this.filterModuleCollectionBeforeAjax(t),n)}catch(e){s.errare("api.CZRBaseControl::moduleCollectionReact => error when firing control.filterModuleCollectionBeforeAjax( to )",e)}},filterModuleCollectionBeforeAjax:function(e){var t,i=this,n=a.extend(!0,[],e),r=[];if(l.each(n,function(e,t){var n=a.extend(!0,{},e);r[t]=i.prepareModuleForDB(n)}),1<l.size(n))throw new Error("There should not be several modules in the collection of control : "+i.id);if(!l.isArray(n)||l.isEmpty(n)||!l.has(n[0],"items"))throw new Error("The setting value could not be populated in control : "+i.id);var o=n[0].id;if(!i.czr_Module.has(o))throw new Error("The single module control ("+i.id+") has no module registered with the id "+o);var s=i.czr_Module(o);if(!l.isArray(s().items))throw new Error("The module "+o+" should be an array in control : "+i.id);return t=s.isMultiItem()?s().items:s().items[0]||[],t=s.filterItemsBeforeCoreApiSettingValue(t),s.hasModOpt()?l.union([s().modOpt],t):t},prepareModuleForDB:function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module must be an object.");var t={};if(!l.isArray(e.items))throw new Error("::prepareModuleForDB : a module item list must be an array");return l.each(e.items,function(e){if(!l.isObject(e))throw new Error("::prepareModuleForDB : a module item must be an object")}),t.items=e.items,t}})}(wp.customize,jQuery,_),function(e,t,n){t.extend(CZRBaseControlMths,e.Events),t.extend(e.Control.prototype,e.Events),t.extend(CZRModuleMths,e.Events),t.extend(CZRItemMths,e.Events),t.extend(CZRModOptMths,e.Events),t.extend(CZRBaseControlMths,e.CZR_Helpers),t.extend(CZRInputMths,e.CZR_Helpers),t.extend(CZRModuleMths,e.CZR_Helpers),e.CZRInput=e.Value.extend(CZRInputMths),e.czrInputMap=e.czrInputMap||{},t.extend(e.czrInputMap,{text:"",textarea:"",check:"setupIcheck",checkbox:"setupIcheck",nimblecheck:"",select:"setupSelect",radio:"setupRadio",number:"setupStepper",upload:"setupImageUploaderSaveAsId",upload_url:"setupImageUploaderSaveAsUrl",color:"setupColorPicker",wp_color_alpha:"setupColorPickerAlpha",wp_color:"setupWPColorPicker",content_picker:"setupContentPicker",password:"",range:"setupSimpleRange",range_slider:"setupRangeSlider",hidden:"",h_alignment:"setupHAlignement",h_text_alignment:"setupHAlignement"}),e.CZRItem=e.Value.extend(CZRItemMths),e.CZRModOpt=e.Value.extend(CZRModOptMths),e.CZRModule=e.Value.extend(CZRModuleMths),e.CZRDynModule=e.CZRModule.extend(CZRDynModuleMths),e.CZRBaseControl=e.Control.extend(CZRBaseControlMths),e.CZRBaseModuleControl=e.CZRBaseControl.extend(CZRBaseModuleControlMths),t.extend(e.controlConstructor,{czr_module:e.CZRBaseModuleControl})}(wp.customize,jQuery,_),function(t,e){jQuery(function(n){var i,e=t.customize||e;i=n("<span/>",{class:"customize-controls-home-or-add fas fa-home",html:'<span class="screen-reader-text">Home</span>'}),n.when(n("#customize-header-actions").append(i)).done(function(){i.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}).on("click.customize-controls-home-or-add",function(){e.section.has(e.czr_activeSectionId())?e.section(e.czr_activeSectionId()).expanded(!1):e.section.each(function(e){e.expanded(!1)}),e.panel.each(function(e){e.expanded(!1)})}),_.delay(function(){if(!i.hasClass("button-see-me")){var e=0,t=function(){n.Deferred(function(){var e=this;i.addClass("button-see-me"),_.delay(function(){i.removeClass("button-see-me"),e.resolve()},800)}).done(function(){0<=--e&&_.delay(function(){t()},50)})};t()}},2e3)})})}(wp);
inc/czr-base-fmk/czr-base-fmk.php CHANGED
@@ -186,6 +186,8 @@ if ( ! class_exists( 'CZR_Fmk_Base_Load_Resources' ) ) :
186
 
187
  // adds specific js templates for the czr_module control
188
  add_action( 'customize_controls_print_footer_scripts', array( $this, 'ac_print_module_control_templates' ) , 1 );
 
 
189
  }
190
 
191
 
@@ -353,6 +355,62 @@ if ( ! class_exists( 'CZR_Fmk_Base_Load_Resources' ) ) :
353
  </script>
354
  <?php
355
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  }//class
357
  endif;
358
 
@@ -404,7 +462,38 @@ if ( ! class_exists( 'CZR_Fmk_Base_Ajax_Filter' ) ) :
404
  }
405
  $tmpl = $_POST['tmpl'];
406
  $module_type = $_POST['module_type'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
407
  $html = apply_filters( "ac_set_ajax_czr_tmpl___{$module_type}", '', $tmpl, $_POST );
 
408
 
409
  if ( empty( $html ) ) {
410
  wp_send_json_error( 'ac_set_ajax_czr_tmpl => module ' . $module_type . ' => template empty for requested tmpl : ' . $tmpl );
@@ -591,8 +680,7 @@ if ( ! class_exists( 'CZR_Fmk_Base_Tmpl_Builder' ) ) :
591
  'editor_params' => array(),
592
 
593
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/431
594
- 'section_collection' => array(),
595
- 'section_type' => 'content'
596
  );
597
  foreach( $tmpl_map as $input_id => $input_data ) {
598
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
186
 
187
  // adds specific js templates for the czr_module control
188
  add_action( 'customize_controls_print_footer_scripts', array( $this, 'ac_print_module_control_templates' ) , 1 );
189
+
190
+ add_action( 'customize_controls_print_footer_scripts', array( $this, 'ac_print_img_uploader_template' ) , 1 );
191
  }
192
 
193
 
355
  </script>
356
  <?php
357
  }
358
+
359
+
360
+ // this template is used in setupImageUploaderSaveAsId and setupImageUploaderSaveAsUrl
361
+ // @see js CZRInputMths
362
+ function ac_print_img_uploader_template() {
363
+ ?>
364
+ <script type="text/html" id="tmpl-czr-img-uploader">
365
+ <?php // case when a regular attachement object is provided, fetched from an id with wp.media.attachment( id ) ?>
366
+ <# if ( ( data.attachment && data.attachment.id ) ) { #>
367
+ <div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
368
+ <div class="thumbnail thumbnail-{{ data.attachment.type }}">
369
+ <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
370
+ <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
371
+ <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
372
+ <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
373
+ <# } #>
374
+ </div>
375
+ <div class="actions">
376
+ <# if ( data.canUpload ) { #>
377
+ <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
378
+ <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
379
+ <div style="clear:both"></div>
380
+ <# } #>
381
+ </div>
382
+ </div>
383
+ <?php // case when an url is provided ?>
384
+ <# } else if ( ! _.isEmpty( data.fromUrl ) ) { #>
385
+ <div class="attachment-media-view">
386
+ <div class="thumbnail thumbnail-thumb">
387
+ <img class="attachment-thumb" src="{{ data.fromUrl }}" draggable="false" alt="" />
388
+ </div>
389
+ <div class="actions">
390
+ <# if ( data.canUpload ) { #>
391
+ <button type="button" class="button remove-button">{{ data.button_labels.remove }}</button>
392
+ <button type="button" class="button upload-button control-focus" id="{{ data.settings['default'] }}-button">{{ data.button_labels.change }}</button>
393
+ <div style="clear:both"></div>
394
+ <# } #>
395
+ </div>
396
+ </div>
397
+ <?php // case when neither attachement or url are provided => placeholder ?>
398
+ <# } else { #>
399
+ <div class="attachment-media-view">
400
+ <div class="placeholder">
401
+ {{ data.button_labels.placeholder }}
402
+ </div>
403
+ <div class="actions">
404
+ <# if ( data.canUpload ) { #>
405
+ <button type="button" class="button upload-button" id="{{ data.settings['default'] }}-button">{{ data.button_labels.select }}</button>
406
+ <# } #>
407
+ <div style="clear:both"></div>
408
+ </div>
409
+ </div>
410
+ <# } #>
411
+ </script>
412
+ <?php
413
+ }
414
  }//class
415
  endif;
416
 
462
  }
463
  $tmpl = $_POST['tmpl'];
464
  $module_type = $_POST['module_type'];
465
+
466
+ ///////////////////////////////////////////////////////////////////////
467
+ // @param $tmpl = 'item-inputs'
468
+ //
469
+ // @param $_POST = {
470
+ // [tmpl] => item-inputs
471
+ // [module_type] => czr_heading_child
472
+ // [module_id] => __nimble__51b2f35191b3__main_settings_czr_module
473
+ // [cache] => true
474
+ // [nonce] => b4b0aea848
475
+ // [control_id] => __nimble__51b2f35191b3__main_settings
476
+ // [item_model] => Array
477
+ // (
478
+ // [id] => czr_heading_child_0
479
+ // [title] =>
480
+ // [heading_text] => This is a heading.
481
+ // [heading_tag] => h1
482
+ // [h_alignment_css] => Array
483
+ // (
484
+ // [desktop] => center
485
+ // )
486
+
487
+ // [heading_title] =>
488
+ // [link-to] =>
489
+ // [link-custom-url] =>
490
+ // [link-target] =>
491
+ // )
492
+
493
+ // [action] => ac_get_template
494
+ // }
495
  $html = apply_filters( "ac_set_ajax_czr_tmpl___{$module_type}", '', $tmpl, $_POST );
496
+ ///////////////////////////////////////////////////////////////////////////
497
 
498
  if ( empty( $html ) ) {
499
  wp_send_json_error( 'ac_set_ajax_czr_tmpl => module ' . $module_type . ' => template empty for requested tmpl : ' . $tmpl );
680
  'editor_params' => array(),
681
 
682
  // introduced for https://github.com/presscustomizr/nimble-builder/issues/431
683
+ 'section_collection' => array()
 
684
  );
685
  foreach( $tmpl_map as $input_id => $input_data ) {
686
  if ( ! is_string( $input_id ) || empty( $input_id ) ) {
inc/czr-skope/assets/czr/js/czr-skope-base.js CHANGED
@@ -1,19 +1,41 @@
1
-
2
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
3
  (function ( api, $, _ ) {
4
  $.extend( CZRSkopeBaseMths, {
5
 
6
  initialize: function() {
7
  var self = this;
 
 
 
8
  api.czr_initialSkopeCollectionPopulated = $.Deferred();
 
 
 
 
9
  api.czr_skopeCollection = new api.Value([]);//all available skope, including the current skopes
 
10
  api.czr_currentSkopesCollection = new api.Value([]);
 
 
11
  api.czr_activeSkopes = new api.Value( { local : '', group : ''} );
 
 
 
 
 
 
 
 
 
 
12
  api.bind( 'ready' , function() {
13
  api.previewer.bind( 'czr-new-skopes-synced', function( skope_server_data ) {
14
  if ( serverControlParams.isDevMode ) {
15
  api.infoLog( 'API SKOPE SYNCED', skope_server_data );
16
  }
 
 
17
  if ( ! _.has( skope_server_data, 'czr_stylesheet') ) {
18
  api.errorLog( "On 'czr-new-skopes-synced' : missing stylesheet in the server data" );
19
  return;
@@ -21,18 +43,29 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
21
 
22
  api.czr_skopeBase.stylesheet = api.czr_skopeBase.stylesheet || new api.Value( api.settings.theme.stylesheet );
23
  api.czr_skopeBase.stylesheet( skope_server_data.czr_stylesheet );
 
 
24
  var preview = this,
25
  previousSkopeCollection = api.czr_currentSkopesCollection();
 
 
26
  if ( ! _.has( skope_server_data, 'czr_new_skopes') ) {
27
  api.errorLog( "On 'czr-new-skopes-synced' : missing skopes in the server data" );
28
  return;
29
  }
 
 
 
30
  if ( _.isEmpty( _.findWhere( skope_server_data.czr_new_skopes, { skope : 'group' } ) ) ){
31
  var _local_ = _.findWhere( skope_server_data.czr_new_skopes, { skope : 'local' } );
32
  if ( ! _.isEmpty( _local_ ) && ! _.contains( FlatSkopeLocalizedData.noGroupSkopeList, _local_.level ) ) {
33
  api.errorLog( 'No group level skope sent while there should be one' );
34
  }
35
  }
 
 
 
 
36
  if ( serverControlParams.isDevMode ) {
37
  api.czr_skopeBase.updateSkopeCollection( skope_server_data.czr_new_skopes , preview.channel() );
38
  } else {
@@ -42,21 +75,56 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
42
  return;
43
  }
44
  }
 
 
 
 
 
 
 
 
 
 
 
45
  api.czr_initialSkopeCollectionPopulated.then( function() {
 
46
  if ( ! _.has( skope_server_data, 'czr_new_skopes' ) || _.isEmpty( skope_server_data.czr_new_skopes ) ) {
47
  api.errorLog( 'Missing skope data after refresh', skope_server_data );
48
  }
 
 
49
  api.czr_activeSkopes( {
50
  'local' : self.getSkopeProperty( 'skope_id', 'local' ),
51
  'group' : self.getSkopeProperty( 'skope_id', 'group' )
52
  });
53
 
 
 
 
 
 
 
 
 
 
 
54
  });
55
  });//api.previewer.bind
56
  });//api.bind( 'ready'
 
 
 
 
 
 
 
57
  api.czr_currentSkopesCollection.bind( function( to, from ) {
58
  return self.currentSkopesCollectionReact( to, from );
59
  }, { deferred : true });
 
 
 
 
60
  api.trigger( 'czr_skopeBase_initialized' );
61
  }//initialize
62
  });//$.extend()
@@ -64,11 +132,16 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
64
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
65
  ( function ( api, $, _ ) {
66
  $.extend( CZRSkopeBaseMths, {
 
 
 
 
67
  getSkopeProperty : function( what, skope_level ) {
68
  what = what || 'skope_id';
69
  skope_level = skope_level || 'local';
70
  var _skope_data = _.findWhere( api.czr_currentSkopesCollection(), { skope : skope_level });
71
  if ( _.isEmpty( _skope_data ) ){
 
72
  if ( 'local' == skope_level ) {
73
  api.errorLog( "getSkopeProperty => local skope missing, returning not_set" );
74
  }
@@ -80,23 +153,75 @@ $.extend( CZRSkopeBaseMths, {
80
  return _skope_data[ what ];
81
  }
82
  },
 
 
 
83
  firstToUpperCase : function( str ) {
84
  return ! _.isString( str ) ? '' : str.substr(0, 1).toUpperCase() + str.substr(1);
85
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  });//$.extend
87
  })( wp.customize , jQuery, _ );//@global serverControlParams
88
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
89
  (function ( api, $, _ ) {
90
  $.extend( CZRSkopeBaseMths, {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  updateSkopeCollection : function( sent_collection ) {
92
  var self = this,
93
  _api_ready_collection = [];
 
 
94
  _.each( sent_collection, function( _skope ) {
95
  var skope_candidate = $.extend( true, {}, _skope );//deep clone to avoid any shared references
96
  _api_ready_collection.push( self.prepareSkopeForAPI( skope_candidate ) );
97
  });
 
 
 
98
  api.czr_currentSkopesCollection( _api_ready_collection );
 
 
 
99
  },
 
 
 
 
 
 
 
 
 
 
 
100
  prepareSkopeForAPI : function( skope_candidate ) {
101
  if ( ! _.isObject( skope_candidate ) ) {
102
  throw new Error('prepareSkopeForAPI : a skope must be an object to be API ready');
@@ -143,6 +268,9 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
143
  api_ready_skope[_key] = _candidate_val;
144
  break;
145
  case 'values' :
 
 
 
146
  api_ready_skope[_key] = _candidate_val;
147
  break;
148
  default :
@@ -150,6 +278,8 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
150
  break;
151
  }//switch
152
  });
 
 
153
  api_ready_skope.id = api_ready_skope.skope + '_' + api_ready_skope.skope_id;
154
  if ( ! _.isString( api_ready_skope.id ) || _.isEmpty( api_ready_skope.id ) ) {
155
  throw new Error('prepareSkopeForAPI : a skope id must a string not empty');
@@ -160,8 +290,16 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
160
  }
161
  return api_ready_skope;
162
  },
 
 
 
 
163
  currentSkopesCollectionReact : function( to, from ) {
164
  var dfd = $.Deferred();
 
 
 
 
165
  if ( _.isEmpty( from ) && ! _.isEmpty( to ) ) {
166
  api.czr_initialSkopeCollectionPopulated.resolve();
167
  }
@@ -172,7 +310,13 @@ var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
172
  })( wp.customize , jQuery, _);//@global serverControlParams
173
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
174
  (function ( api, $ ) {
 
175
  $.extend( CZRSkopeBaseMths, api.Events );
176
  var CZR_SkopeBase = api.Class.extend( CZRSkopeBaseMths );
 
 
 
 
 
177
  api.czr_skopeBase = new CZR_SkopeBase();
178
  })( wp.customize, jQuery );
1
+ //@global serverControlParams
2
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
3
  (function ( api, $, _ ) {
4
  $.extend( CZRSkopeBaseMths, {
5
 
6
  initialize: function() {
7
  var self = this;
8
+ ///////////////////// DEFINITIONS /////////////////////
9
+
10
+ //Store the state of the first skope collection state
11
  api.czr_initialSkopeCollectionPopulated = $.Deferred();
12
+
13
+ //the czr_skopeCollection stores all skopes instantiated by the user
14
+ //this collection is not updated directly
15
+ //=> it's updated on skope() instance change
16
  api.czr_skopeCollection = new api.Value([]);//all available skope, including the current skopes
17
+ //the current skopes collection get updated each time the 'czr-new-skopes-synced' event is triggered on the api by the preview
18
  api.czr_currentSkopesCollection = new api.Value([]);
19
+
20
+ //the currently active skopes
21
  api.czr_activeSkopes = new api.Value( { local : '', group : ''} );
22
+
23
+
24
+
25
+ ///////////////////// SKOPE COLLECTIONS SYNCHRONISATION AND LISTENERS /////////////////////
26
+ //LISTEN TO SKOPE SYNC => UPDATE SKOPE COLLECTION ON START AND ON EACH REFRESH
27
+ //the sent data look like :
28
+ //{
29
+ // czr_new_skopes : _wpCustomizeSettings.czr_new_skopes || [],
30
+ // isChangesetDirty : boolean
31
+ // }
32
  api.bind( 'ready' , function() {
33
  api.previewer.bind( 'czr-new-skopes-synced', function( skope_server_data ) {
34
  if ( serverControlParams.isDevMode ) {
35
  api.infoLog( 'API SKOPE SYNCED', skope_server_data );
36
  }
37
+
38
+ // set the currently active stylesheet
39
  if ( ! _.has( skope_server_data, 'czr_stylesheet') ) {
40
  api.errorLog( "On 'czr-new-skopes-synced' : missing stylesheet in the server data" );
41
  return;
43
 
44
  api.czr_skopeBase.stylesheet = api.czr_skopeBase.stylesheet || new api.Value( api.settings.theme.stylesheet );
45
  api.czr_skopeBase.stylesheet( skope_server_data.czr_stylesheet );
46
+
47
+ //api.consoleLog('czr-skopes-ready DATA', skope_server_data );
48
  var preview = this,
49
  previousSkopeCollection = api.czr_currentSkopesCollection();
50
+ //initialize skopes with the server sent skope_server_data
51
+ //if skope has not been initialized yet and the server sent wrong skope_server_data, then reject the skope ready promise()
52
  if ( ! _.has( skope_server_data, 'czr_new_skopes') ) {
53
  api.errorLog( "On 'czr-new-skopes-synced' : missing skopes in the server data" );
54
  return;
55
  }
56
+
57
+ // If no "group" skope has been sent, check if we should have one
58
+ // array( 'home', 'search', '404', 'date' ) <= have no group
59
  if ( _.isEmpty( _.findWhere( skope_server_data.czr_new_skopes, { skope : 'group' } ) ) ){
60
  var _local_ = _.findWhere( skope_server_data.czr_new_skopes, { skope : 'local' } );
61
  if ( ! _.isEmpty( _local_ ) && ! _.contains( FlatSkopeLocalizedData.noGroupSkopeList, _local_.level ) ) {
62
  api.errorLog( 'No group level skope sent while there should be one' );
63
  }
64
  }
65
+
66
+ //1) Updated the collection with normalized skopes => prepareSkopeForAPI + api.czr_currentSkopesCollection( collection )
67
+ //2) When the api.czr_currentSkopesCollection() Value is set => instantiates the missing skope
68
+ //3) Set the skope layout view when the skope embedded promise is resolved
69
  if ( serverControlParams.isDevMode ) {
70
  api.czr_skopeBase.updateSkopeCollection( skope_server_data.czr_new_skopes , preview.channel() );
71
  } else {
75
  return;
76
  }
77
  }
78
+
79
+ //@return void()
80
+ // => refresh skope notice below the skope switcher title
81
+ // => refresh bottom skope infos in the preview
82
+ // var _refreshSkopeInfosNotices = function() {
83
+ // console.log('REFRESH SKOPE TITLE IF NEEDED ?');
84
+ // //WRITE THE CURRENT SKOPE TITLE
85
+ // //self._writeCurrentSkopeTitle();
86
+ // };
87
+
88
+ //Always wait for the initial collection to be populated
89
  api.czr_initialSkopeCollectionPopulated.then( function() {
90
+ //console.log('INITIAL SKOPE COLLECTION POPULATED');
91
  if ( ! _.has( skope_server_data, 'czr_new_skopes' ) || _.isEmpty( skope_server_data.czr_new_skopes ) ) {
92
  api.errorLog( 'Missing skope data after refresh', skope_server_data );
93
  }
94
+
95
+ // set the local and group skope id
96
  api.czr_activeSkopes( {
97
  'local' : self.getSkopeProperty( 'skope_id', 'local' ),
98
  'group' : self.getSkopeProperty( 'skope_id', 'group' )
99
  });
100
 
101
+ // if ( ! _.isEmpty( previousSkopeCollection ) ) { //Rewrite the title when the local skope has changed
102
+ // var _prevLoc = _.findWhere( previousSkopeCollection , { skope : 'local' } ).opt_name,
103
+ // _newLoc =_.findWhere( skope_server_data.czr_new_skopes, { skope : 'local' } ).opt_name;
104
+
105
+ // if ( _newLoc !== _prevLoc ) {
106
+ // //REFRESH SKOPE INFOS IN TITLE AND PREVIEW FRAME
107
+ // _refreshSkopeInfosNotices();
108
+ // }
109
+ // }
110
+
111
  });
112
  });//api.previewer.bind
113
  });//api.bind( 'ready'
114
+
115
+
116
+ //CURRENT SKOPE COLLECTION LISTENER
117
+ //The skope collection is set on 'czr-new-skopes-synced' triggered by the preview
118
+ //setup the callbacks of the skope collection update
119
+ //on init and on preview change : the collection of skopes is populated with new skopes
120
+ //=> instanciate the relevant skope object + render them
121
  api.czr_currentSkopesCollection.bind( function( to, from ) {
122
  return self.currentSkopesCollectionReact( to, from );
123
  }, { deferred : true });
124
+
125
+ ///////////////////// VARIOUS /////////////////////
126
+ //DECLARE THE LIST OF CONTROL TYPES FOR WHICH THE VIEW IS REFRESHED ON CHANGE
127
+ //self.refreshedControls = [ 'czr_cropped_image'];// [ 'czr_cropped_image', 'czr_multi_module', 'czr_module' ];
128
  api.trigger( 'czr_skopeBase_initialized' );
129
  }//initialize
130
  });//$.extend()
132
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
133
  ( function ( api, $, _ ) {
134
  $.extend( CZRSkopeBaseMths, {
135
+
136
+ //////////////////////////////////////////////////////////
137
+ /// <SKOPE HELPERSS>
138
+ // @return string
139
  getSkopeProperty : function( what, skope_level ) {
140
  what = what || 'skope_id';
141
  skope_level = skope_level || 'local';
142
  var _skope_data = _.findWhere( api.czr_currentSkopesCollection(), { skope : skope_level });
143
  if ( _.isEmpty( _skope_data ) ){
144
+ // display an error message if local skope not found. Should always be defined.
145
  if ( 'local' == skope_level ) {
146
  api.errorLog( "getSkopeProperty => local skope missing, returning not_set" );
147
  }
153
  return _skope_data[ what ];
154
  }
155
  },
156
+
157
+
158
+ //@return string
159
  firstToUpperCase : function( str ) {
160
  return ! _.isString( str ) ? '' : str.substr(0, 1).toUpperCase() + str.substr(1);
161
  }
162
+
163
+
164
+
165
+ // //@return string
166
+ // buildSkopeLink : function( skope_id ) {
167
+ // if ( ! api.czr_skope.has( skope_id ) ) {
168
+ // api.errorLog( 'buildSkopeLink : the requested skope id is not registered : ' + skope_id );
169
+ // return '';
170
+ // }
171
+ // var _link_title = [ serverControlParams.i18n.skope['Switch to scope'], api.czr_skope( skope_id )().title ].join(' : ');
172
+ // return [
173
+ // '<span class="czr-skope-switch" title=" ' + _link_title + '" data-skope-id="' + skope_id + '">',
174
+ // api.czr_skope( skope_id )().title,
175
+ // '</span>'
176
+ // ].join( '' );
177
+ // },
178
  });//$.extend
179
  })( wp.customize , jQuery, _ );//@global serverControlParams
180
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
181
  (function ( api, $, _ ) {
182
  $.extend( CZRSkopeBaseMths, {
183
+ //Fired on 'czr-new-skopes-synced' triggered by the preview, each time the preview is refreshed.
184
+ //On a Save Action, api.czr_savedDirties has been populated =>
185
+ // 1) check if the server sends the same saved values
186
+ // 2) update the skope db properties with the latests saved ones
187
+ //
188
+ //A skope candidate is structured this way :
189
+ //{
190
+ // id:""
191
+ // long_title:"Site wide options"
192
+ // obj_id:""
193
+ // skope:"global"
194
+ // title:"Site wide options"
195
+ //}
196
+ //@see api_overrides
197
  updateSkopeCollection : function( sent_collection ) {
198
  var self = this,
199
  _api_ready_collection = [];
200
+
201
+ //normalize each sent skopes
202
  _.each( sent_collection, function( _skope ) {
203
  var skope_candidate = $.extend( true, {}, _skope );//deep clone to avoid any shared references
204
  _api_ready_collection.push( self.prepareSkopeForAPI( skope_candidate ) );
205
  });
206
+
207
+ //set the new collection of current skopes
208
+ //=> this will instantiate the not instantiated skopes
209
  api.czr_currentSkopesCollection( _api_ready_collection );
210
+
211
+ // set the group skope id
212
+ //console.log( "SKOPE COLLECTION UPDATED", api.czr_currentSkopesCollection() );
213
  },
214
+
215
+
216
+ //@param skope_candidate
217
+ ////A skope candidate is structured this way :
218
+ //{
219
+ // id:""
220
+ // long_title:"Site wide options"
221
+ // obj_id:""
222
+ // skope:"global"
223
+ // title:"Site wide options"
224
+ //}
225
  prepareSkopeForAPI : function( skope_candidate ) {
226
  if ( ! _.isObject( skope_candidate ) ) {
227
  throw new Error('prepareSkopeForAPI : a skope must be an object to be API ready');
268
  api_ready_skope[_key] = _candidate_val;
269
  break;
270
  case 'values' :
271
+ // if ( ! _.isString( _candidate_val ) ) {
272
+ // throw new Error('prepareSkopeForAPI : invalid "values" for skope ' + _candidate_val.skope );
273
+ // }
274
  api_ready_skope[_key] = _candidate_val;
275
  break;
276
  default :
278
  break;
279
  }//switch
280
  });
281
+
282
+ //Finally, generate the id and the title
283
  api_ready_skope.id = api_ready_skope.skope + '_' + api_ready_skope.skope_id;
284
  if ( ! _.isString( api_ready_skope.id ) || _.isEmpty( api_ready_skope.id ) ) {
285
  throw new Error('prepareSkopeForAPI : a skope id must a string not empty');
290
  }
291
  return api_ready_skope;
292
  },
293
+
294
+
295
+ //cb of api.czr_currentSkopesCollection.callbacks
296
+ //fired in initialize
297
  currentSkopesCollectionReact : function( to, from ) {
298
  var dfd = $.Deferred();
299
+
300
+ //ON INITIAL COLLECTION POPULATE, RESOLVE THE DEFERRED STATE
301
+ //=> this way we can defer earlier actions.
302
+ //For example when autofocus is requested, the section might be expanded before the initial skope collection is sent from the preview.
303
  if ( _.isEmpty( from ) && ! _.isEmpty( to ) ) {
304
  api.czr_initialSkopeCollectionPopulated.resolve();
305
  }
310
  })( wp.customize , jQuery, _);//@global serverControlParams
311
  var CZRSkopeBaseMths = CZRSkopeBaseMths || {};
312
  (function ( api, $ ) {
313
+ // Skope
314
  $.extend( CZRSkopeBaseMths, api.Events );
315
  var CZR_SkopeBase = api.Class.extend( CZRSkopeBaseMths );
316
+
317
+ // Schedule skope instantiation on api ready
318
+ // api.bind( 'ready' , function() {
319
+ // api.czr_skopeBase = new api.CZR_SkopeBase();
320
+ // });
321
  api.czr_skopeBase = new CZR_SkopeBase();
322
  })( wp.customize, jQuery );
inc/czr-skope/index.php CHANGED
@@ -6,13 +6,21 @@ if ( did_action('nimble_skope_loaded') ) {
6
  }
7
  return;
8
  }
 
 
9
  global $czr_skope_namespace;
10
  $czr_skope_namespace = __NAMESPACE__ . '\\';
11
 
12
  do_action( 'nimble_skope_loaded' );
 
 
13
  function Flat_Skop_Base( $params = array() ) {
14
  return Flat_Skop_Base::skp_get_instance( $params );
15
  }
 
 
 
 
16
  function skp_get_default_skope_model() {
17
  return array(
18
  'title' => '',
@@ -20,15 +28,26 @@ function skp_get_default_skope_model() {
20
  'ctx_title' => '',
21
  'id' => '',
22
  'skope' => '',
 
23
  'obj_id' => '',
24
  'skope_id' => '',
25
  'values' => ''
26
  );
27
  }
 
 
 
28
  function skp_get_no_group_skope_list() {
29
  return array( 'home', 'search', '404', 'date' );
30
  }
31
 
 
 
 
 
 
 
 
32
  function skp_trim_text( $text, $text_length, $more ) {
33
  if ( ! $text )
34
  return '';
@@ -47,6 +66,15 @@ function skp_trim_text( $text, $text_length, $more ) {
47
  }
48
  return ( ( $end_substr < $text_length ) && $more ) ? $text : $text . ' ' .$more ;
49
  }
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Return the current skope
52
  * Front / Back agnostic.
@@ -63,8 +91,19 @@ function skp_trim_text( $text, $text_length, $more ) {
63
  * @return a string of all concatenated ctx parts (default) 0R an array of the ctx parts
64
  */
65
  function skp_get_skope( $_requesting_wot = null, $_return_string = true, $requested_parts = array() ) {
 
 
 
 
 
 
 
66
  $parts = ( is_array( $requested_parts ) && ! empty( $requested_parts ) ) ? $requested_parts : skp_get_query_skope();
67
 
 
 
 
 
68
  $_return = array();
69
  $meta_type = $type = $obj_id = false;
70
 
@@ -94,16 +133,23 @@ function skp_get_skope( $_requesting_wot = null, $_return_string = true, $reques
94
  break;
95
 
96
  default:
 
 
 
97
  if ( false !== $meta_type && false !== $obj_id ) {
98
  $_return = array( "meta_type" => "{$meta_type}" , "type" => "{$type}", "id" => "{$obj_id}" );
99
  }
 
100
  else if ( false !== $meta_type && ! $obj_id ) {
101
  $_return = array( "meta_type" => "{$meta_type}", "type" => "{$type}" );
102
  }
 
103
  else if ( false !== $obj_id ) {
104
  $_return = array( "id" => "{$obj_id}" );
105
  }
106
  else {
 
 
107
  if ( defined( 'NIMBLE_DEV' ) && NIMBLE_DEV ) {
108
  error_log( __FUNCTION__ . ' error when building the local skope, no object_id provided.');
109
  error_log( print_r( $parts, true) );
@@ -111,15 +157,24 @@ function skp_get_skope( $_requesting_wot = null, $_return_string = true, $reques
111
  }
112
  break;
113
  }
 
 
114
  if ( ! $_return_string ) {
115
  return $_return;
116
  }
 
 
117
  if ( ! is_array( $_return ) || ( is_array( $_return ) && empty( $_return ) ) ) {
118
  return '';
119
  }
 
 
 
120
  if ( ! is_null( $_requesting_wot ) ) {
121
  return isset( $_return[ $_requesting_wot ] ) ? $_return[ $_requesting_wot ] : '';
122
  }
 
 
123
  $_concat = "";
124
  foreach ( $_return as $_key => $_part ) {
125
  if ( empty( $_concat) ) {
@@ -139,32 +194,52 @@ function skp_get_skope( $_requesting_wot = null, $_return_string = true, $reques
139
  * @return array of ctx parts
140
  */
141
  function skp_get_query_skope() {
 
142
  global $wp_the_query;
143
  if ( ! isset( $wp_the_query ) || empty( $wp_the_query ) )
144
  return array();
 
145
  if ( ! empty( Flat_Skop_Base()->query_skope ) )
146
  return Flat_Skop_Base()->query_skope;
147
 
148
  $queried_object = get_queried_object();
149
 
 
 
 
 
150
  $meta_type = $type = $obj_id = false;
 
 
 
 
 
 
151
  if ( ! is_null( $queried_object ) && is_object( $queried_object ) ) {
 
152
  if ( isset($queried_object -> post_type) ) {
153
  $meta_type = 'post';
154
  $type = $queried_object -> post_type;
155
  $obj_id = $queried_object -> ID;
156
  }
 
 
157
  if ( isset($queried_object -> taxonomy) && isset($queried_object -> term_id) ) {
158
  $meta_type = 'tax';
159
  $type = $queried_object -> taxonomy;
160
  $obj_id = $queried_object -> term_id;
161
  }
162
  }
 
 
163
  if ( is_author() ) {
164
  $meta_type = 'user';
165
  $type = 'author';
166
  $obj_id = $wp_the_query ->get( 'author' );
167
  }
 
 
 
168
  if ( is_post_type_archive() ) {
169
  $obj_id = 'post_type_archive' . '_'. $wp_the_query ->get( 'post_type' );
170
  }
@@ -180,6 +255,25 @@ function skp_get_query_skope() {
180
 
181
  if ( skp_is_real_home() ) {
182
  $obj_id = 'home';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  if ( ! is_home() && 'page' === get_option( 'show_on_front' ) ) {
184
  $home_page_id = get_option( 'page_on_front' );
185
  if ( 0 < $home_page_id ) {
@@ -187,13 +281,21 @@ function skp_get_query_skope() {
187
  }
188
  }
189
  }
 
 
190
  if ( did_action( 'wp' ) ) {
191
  Flat_Skop_Base()->query_skope = apply_filters( 'skp_get_query_skope' , array( 'meta_type' => $meta_type , 'type' => $type , 'obj_id' => $obj_id ) , $queried_object );
192
  }
193
 
194
  return Flat_Skop_Base()->query_skope;
195
  }
 
 
 
196
  function skp_get_skope_id( $level = 'local' ) {
 
 
 
197
  $new_skope_ids = array( 'local' => '_skope_not_set_', 'group' => '_skope_not_set_' );
198
  if ( did_action( 'wp' ) ) {
199
  if ( empty( Flat_Skop_Base()->current_skope_ids ) ) {
@@ -203,6 +305,9 @@ function skp_get_skope_id( $level = 'local' ) {
203
  Flat_Skop_Base()->current_skope_ids = $new_skope_ids;
204
 
205
  $skope_id_to_return = $new_skope_ids[ $level ];
 
 
 
206
  } else {
207
  $new_skope_ids = Flat_Skop_Base()->current_skope_ids;
208
  $skope_id_to_return = $new_skope_ids[ $level ];
@@ -210,18 +315,33 @@ function skp_get_skope_id( $level = 'local' ) {
210
  } else {
211
  $skope_id_to_return = array_key_exists( $level, $new_skope_ids ) ? $new_skope_ids[ $level ] : '_skope_not_set_';
212
  }
 
 
213
  return apply_filters( 'skp_get_skope_id', $skope_id_to_return, $level );
214
  }
 
 
 
 
 
 
 
215
  function skp_build_skope_id( $args = array() ) {
216
  $skope_id = '_skope_not_set_';
 
 
217
  $args = is_array( $args ) ? $args : array();
218
  $args = wp_parse_args(
219
  $args,
220
  array( 'skope_string' => '', 'skope_type' => '', 'skope_level' => '' )
221
  );
 
 
222
  $args['skope_level'] = empty( $args['skope_level'] ) ? 'local' : $args['skope_level'];
223
  $args['skope_string'] = ( 'local' == $args['skope_level'] && empty( $args['skope_string'] ) ) ? skp_get_skope() : $args['skope_string'];
224
  $args['skope_type'] = ( 'group' == $args['skope_level'] && empty( $args['skope_type'] ) ) ? skp_get_skope( 'type' ) : $args['skope_type'];
 
 
225
  switch( $args[ 'skope_level'] ) {
226
  case 'local' :
227
  $skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . $args[ 'skope_string' ] );
@@ -324,19 +444,31 @@ function skp_get_skope_title( $args = array() ) {
324
  $title = ucfirst( $title );
325
  return skp_trim_text( $title, $long ? 45 : 28, '...');
326
  }
 
 
 
327
  function skp_skope_has_no_group( $meta_type ) {
328
  return in_array(
329
  $meta_type,
330
  skp_get_no_group_skope_list()
331
  ) || is_post_type_archive();
332
  }
 
 
 
333
  function skp_skope_has_a_group( $meta_type ) {
334
  return in_array(
335
  $meta_type,
336
  array('post', 'tax', 'user')
337
  );
338
  }
 
 
 
 
339
  function skp_is_real_home() {
 
 
340
  return ( is_home() && ( 'posts' == get_option( 'show_on_front' ) || '__nothing__' == get_option( 'show_on_front' ) ) )
341
  || ( is_home() && 0 == get_option( 'page_on_front' ) && 'page' == get_option( 'show_on_front' ) )//<= this is the case when the user want to display a page on home but did not pick a page yet
342
  || is_front_page();
@@ -347,10 +479,14 @@ function skp_is_real_home() {
347
  * Returns a boolean
348
  */
349
  function skp_is_customizing() {
 
350
  global $pagenow;
351
  $_is_ajaxing_from_customizer = isset( $_POST['customized'] ) || isset( $_POST['wp_customize'] );
352
 
353
  $is_customizing = false;
 
 
 
354
  $is_customize_php_page = ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) );
355
  $is_customize_admin_page_one = (
356
  $is_customize_php_page
@@ -363,8 +499,12 @@ function skp_is_customizing() {
363
 
364
  if ( $is_customize_admin_page_one || $is_customize_admin_page_two ) {
365
  $is_customizing = true;
 
 
 
366
  } else if ( is_customize_preview() || ( ! is_admin() && isset($_REQUEST['customize_messenger_channel']) ) ) {
367
  $is_customizing = true;
 
368
  } else if ( $_is_ajaxing_from_customizer && ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
369
  $is_customizing = true;
370
  }
@@ -386,6 +526,9 @@ function skp_is_previewing_live_changeset() {
386
  return ! isset( $_POST['customize_messenger_channel']) && is_customize_preview();
387
  }
388
  ?><?php
 
 
 
389
  if ( ! class_exists( 'Flat_Skop_Base' ) ) :
390
  class Flat_Skop_Base {
391
  static $instance;
@@ -412,8 +555,11 @@ if ( ! class_exists( 'Flat_Skop_Base' ) ) :
412
  }
413
  endif;
414
  ?><?php
 
 
415
  if ( ! class_exists( 'Flat_Skop_Register_And_Load_Control_Assets' ) ) :
416
  class Flat_Skop_Register_And_Load_Control_Assets extends Flat_Skop_Base {
 
417
  public function skp_register_and_load_control_assets() {
418
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'skp_enqueue_controls_js_css' ), 20 );
419
  }
@@ -421,6 +567,7 @@ if ( ! class_exists( 'Flat_Skop_Register_And_Load_Control_Assets' ) ) :
421
  public function skp_enqueue_controls_js_css() {
422
  $_use_unminified = defined('CZR_DEV')
423
  && true === CZR_DEV
 
424
  && file_exists( sprintf( '%s/assets/czr/js/czr-skope-base.js' , dirname( __FILE__ ) ) );
425
 
426
  $_prod_script_path = sprintf(
@@ -431,6 +578,7 @@ if ( ! class_exists( 'Flat_Skop_Register_And_Load_Control_Assets' ) ) :
431
 
432
  wp_enqueue_script(
433
  'czr-skope-base',
 
434
  $_prod_script_path,
435
  array('customize-controls' , 'jquery', 'underscore'),
436
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : wp_get_theme() -> version,
@@ -456,15 +604,21 @@ endif;
456
  /* ------------------------------------------------------------------------- */
457
  if ( ! class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
458
  class Flat_Export_Skope_Data_And_Send_To_Panel extends Flat_Skop_Register_And_Load_Control_Assets {
 
459
  public function skp_export_skope_data_and_schedule_sending_to_panel() {
460
  add_action( 'wp_footer', array( $this, 'skp_print_server_skope_data') , 30 );
461
  }
 
 
 
462
  public function skp_print_server_skope_data() {
463
  if ( ! skp_is_customize_preview_frame() )
464
  return;
465
 
466
  global $wp_query, $wp_customize;
467
  $_meta_type = skp_get_skope( 'meta_type', true );
 
 
468
  $_czr_skopes = $this->_skp_get_json_export_ready_skopes();
469
  ?>
470
  <script type="text/javascript" id="czr-print-skop">
@@ -492,10 +646,30 @@ if ( ! class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
492
  /* ------------------------------------------------------------------------- *
493
  * CUSTOMIZE PREVIEW : BUILD SKOPES JSON
494
  /* ------------------------------------------------------------------------- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  private function _skp_get_json_export_ready_skopes() {
496
  $skopes = array();
497
  $_meta_type = skp_get_skope( 'meta_type', true );
 
 
498
  $defaults = skp_get_default_skope_model();
 
499
  $skopes[] = wp_parse_args(
500
  array(
501
  'title' => skp_get_skope_title( array( 'level' => 'global' ) ),
@@ -506,6 +680,14 @@ if ( ! class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
506
  ),
507
  $defaults
508
  );
 
 
 
 
 
 
 
 
509
  if ( skp_get_skope('meta_type') ) {
510
  $skopes[] = wp_parse_args(
511
  array(
@@ -519,6 +701,9 @@ if ( ! class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
519
  $defaults
520
  );
521
  }
 
 
 
522
  $skopes[] = wp_parse_args(
523
  array(
524
  'title' => skp_get_skope_title( array( 'level' => 'local', 'meta_type' => $_meta_type ) ),
@@ -540,56 +725,101 @@ endif;
540
 
541
  if ( ! class_exists( 'Flat_Skope_Clean_Final' ) ) :
542
  final class Flat_Skope_Clean_Final extends Flat_Export_Skope_Data_And_Send_To_Panel {
 
543
  public function skp_schedule_cleaning_on_object_delete() {
544
  add_action( 'delete_post', array( $this, 'skp_clean_skopified_posts' ) );
545
  add_action( 'delete_term_taxonomy', array( $this, 'skp_clean_skopified_taxonomies' ) );
546
  add_action( 'delete_user', array( $this, 'skp_clean_skopified_users' ) );
547
  }
 
 
 
 
 
 
548
  public function skp_clean_skopified_posts( $postid ) {
549
  $deletion_candidate = get_post( $postid );
550
  if ( ! $deletion_candidate || ! is_object( $deletion_candidate ) )
551
  return;
 
 
 
 
 
552
  if ( ! is_post_type_viewable( $deletion_candidate -> post_type ) )
553
  return;
 
 
554
  $skope_string = skp_get_skope( null, true, array(
555
  'meta_type' => 'post',
556
  'type' => $deletion_candidate -> post_type,
557
  'obj_id' => $postid
558
  ) );
 
 
559
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
 
 
560
  $skope_post_id_candidate = get_theme_mod( $skope_id );
561
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
 
562
  wp_delete_post( $skope_post_id_candidate );
 
563
  remove_theme_mod( $skope_id );
564
  }
565
  }
 
 
 
566
  public function skp_clean_skopified_taxonomies( $term_id ) {
567
  $deletion_candidate = get_term( $term_id );
568
  if ( ! $deletion_candidate || ! is_object( $deletion_candidate ) )
569
  return;
 
 
 
 
570
  $skope_string = skp_get_skope( null, true, array(
571
  'meta_type' => 'tax',
572
  'type' => $deletion_candidate -> taxonomy,
573
  'obj_id' => $term_id
574
  ) );
 
 
575
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
 
 
576
  $skope_post_id_candidate = get_theme_mod( $skope_id );
577
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
 
578
  wp_delete_post( $skope_post_id_candidate );
 
579
  remove_theme_mod( $skope_id );
 
580
  }
581
  }
 
 
 
582
  public function skp_clean_skopified_users( $user_id ) {
 
583
  $skope_string = skp_get_skope( null, true, array(
584
  'meta_type' => 'user',
585
  'type' => 'author',
586
  'obj_id' => $user_id
587
  ) );
 
 
588
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
 
 
589
  $skope_post_id_candidate = get_theme_mod( $skope_id );
590
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
 
591
  wp_delete_post( $skope_post_id_candidate );
 
592
  remove_theme_mod( $skope_id );
 
593
  }
594
  }
595
  }//class
6
  }
7
  return;
8
  }
9
+
10
+ // Set the namsepace as a global so we can use it when fired from another theme/plugin using the fmk
11
  global $czr_skope_namespace;
12
  $czr_skope_namespace = __NAMESPACE__ . '\\';
13
 
14
  do_action( 'nimble_skope_loaded' );
15
+
16
+ //Creates a new instance
17
  function Flat_Skop_Base( $params = array() ) {
18
  return Flat_Skop_Base::skp_get_instance( $params );
19
  }
20
+
21
+ /////////////////////////////////////////////////////////////////
22
+ // <DEFINITIONS>
23
+ // THE SKOPE MODEL
24
  function skp_get_default_skope_model() {
25
  return array(
26
  'title' => '',
28
  'ctx_title' => '',
29
  'id' => '',
30
  'skope' => '',
31
+ //'level' => '',
32
  'obj_id' => '',
33
  'skope_id' => '',
34
  'values' => ''
35
  );
36
  }
37
+
38
+
39
+ // those contexts have no group
40
  function skp_get_no_group_skope_list() {
41
  return array( 'home', 'search', '404', 'date' );
42
  }
43
 
44
+ /////////////////////////////////////////////////////////////////
45
+ // </DEFINITIONS>
46
+
47
+
48
+ /////////////////////////////////////////////////////////////////
49
+ // HELPERS
50
+
51
  function skp_trim_text( $text, $text_length, $more ) {
52
  if ( ! $text )
53
  return '';
66
  }
67
  return ( ( $end_substr < $text_length ) && $more ) ? $text : $text . ' ' .$more ;
68
  }
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+ /////////////////////////////////////////////////////////////////
77
+ // SKOPE HELPERS
78
  /**
79
  * Return the current skope
80
  * Front / Back agnostic.
91
  * @return a string of all concatenated ctx parts (default) 0R an array of the ctx parts
92
  */
93
  function skp_get_skope( $_requesting_wot = null, $_return_string = true, $requested_parts = array() ) {
94
+ //skope builder from the wp $query
95
+ //=> returns :
96
+ // the meta_type : post, tax, user
97
+ // the type : post_type, taxonomy name, author
98
+ // the id : post id, term id, user id
99
+
100
+ // if $parts are provided, use them.
101
  $parts = ( is_array( $requested_parts ) && ! empty( $requested_parts ) ) ? $requested_parts : skp_get_query_skope();
102
 
103
+ // error_log( '<SKOPE PARTS>' );
104
+ // error_log( print_r( $parts, true ) );
105
+ // error_log( '</SKOPE PARTS>' );
106
+
107
  $_return = array();
108
  $meta_type = $type = $obj_id = false;
109
 
133
  break;
134
 
135
  default:
136
+ //LOCAL
137
+ //here we don't check if there's a type this is the case where there must be one when a meta type (post, tax, user) is defined.
138
+ //typically the skope will look like post_page_25
139
  if ( false !== $meta_type && false !== $obj_id ) {
140
  $_return = array( "meta_type" => "{$meta_type}" , "type" => "{$type}", "id" => "{$obj_id}" );
141
  }
142
+ //GROUP
143
  else if ( false !== $meta_type && ! $obj_id ) {
144
  $_return = array( "meta_type" => "{$meta_type}", "type" => "{$type}" );
145
  }
146
+ //LOCAL WITH NO GROUP : home ( when home displays "Your latests posts" ) , 404, search, date, post type archive
147
  else if ( false !== $obj_id ) {
148
  $_return = array( "id" => "{$obj_id}" );
149
  }
150
  else {
151
+ // don't print the skope error log if not in dev mode
152
+ // fixes : https://github.com/presscustomizr/czr-skope/issues/1
153
  if ( defined( 'NIMBLE_DEV' ) && NIMBLE_DEV ) {
154
  error_log( __FUNCTION__ . ' error when building the local skope, no object_id provided.');
155
  error_log( print_r( $parts, true) );
157
  }
158
  break;
159
  }
160
+
161
+ //return the parts array if not a string requested
162
  if ( ! $_return_string ) {
163
  return $_return;
164
  }
165
+
166
+ //don't go further if not an array or empty
167
  if ( ! is_array( $_return ) || ( is_array( $_return ) && empty( $_return ) ) ) {
168
  return '';
169
  }
170
+
171
+ //if a specific part of the ctx is requested, don't concatenate
172
+ //return the part if exists
173
  if ( ! is_null( $_requesting_wot ) ) {
174
  return isset( $_return[ $_requesting_wot ] ) ? $_return[ $_requesting_wot ] : '';
175
  }
176
+
177
+ //generate the ctx string from the array of ctx_parts
178
  $_concat = "";
179
  foreach ( $_return as $_key => $_part ) {
180
  if ( empty( $_concat) ) {
194
  * @return array of ctx parts
195
  */
196
  function skp_get_query_skope() {
197
+ //don't call get_queried_object if the $query is not defined yet
198
  global $wp_the_query;
199
  if ( ! isset( $wp_the_query ) || empty( $wp_the_query ) )
200
  return array();
201
+ // is it cached already ?
202
  if ( ! empty( Flat_Skop_Base()->query_skope ) )
203
  return Flat_Skop_Base()->query_skope;
204
 
205
  $queried_object = get_queried_object();
206
 
207
+ // error_log( '<GET QUERIED OBJECT>' . gettype( $queried_object ) );
208
+ // error_log( print_r( $wp_the_query , true ) );
209
+ // error_log( '</GET QUERIED OBJECT>' );
210
+
211
  $meta_type = $type = $obj_id = false;
212
+
213
+ // The queried object is NULL on
214
+ // - home when displaying the latest posts
215
+ // - date archives
216
+ // - 404 page
217
+ // - search page
218
  if ( ! is_null( $queried_object ) && is_object( $queried_object ) ) {
219
+ //post, custom post types, page
220
  if ( isset($queried_object -> post_type) ) {
221
  $meta_type = 'post';
222
  $type = $queried_object -> post_type;
223
  $obj_id = $queried_object -> ID;
224
  }
225
+
226
+ //taxinomies : tags, categories, custom tax type
227
  if ( isset($queried_object -> taxonomy) && isset($queried_object -> term_id) ) {
228
  $meta_type = 'tax';
229
  $type = $queried_object -> taxonomy;
230
  $obj_id = $queried_object -> term_id;
231
  }
232
  }
233
+
234
+ //author archive page
235
  if ( is_author() ) {
236
  $meta_type = 'user';
237
  $type = 'author';
238
  $obj_id = $wp_the_query ->get( 'author' );
239
  }
240
+
241
+ //SKOPES WITH NO GROUPS
242
+ //post type archive object
243
  if ( is_post_type_archive() ) {
244
  $obj_id = 'post_type_archive' . '_'. $wp_the_query ->get( 'post_type' );
245
  }
255
 
256
  if ( skp_is_real_home() ) {
257
  $obj_id = 'home';
258
+ // December 2018
259
+ // when the home page is a page, the skope now includes the page id, instead of being generic as it was since then : skp__post_page_home
260
+ // This has been introduced to facilitate the compatibility of the Nimble Builder with multilanguage plugins like polylang
261
+ // => Allows user to create a different home page for each languages
262
+ //
263
+ // To summarize,
264
+ // Before dec 2018 :
265
+ // - home page is blog page => skope_id = skp___home
266
+ // - home page is page => skope_id = skp__post_page_home
267
+ //
268
+ // After Dec 2018
269
+ // - hope page is blog page => skope_id is unchanged = skp__home
270
+ // - home page is a page => skope_id is changed to = skp__post_page_{$static_home_page_id}
271
+ //
272
+ // This means that if Nimble sections, or any other contextualizations had been made on home when 'page' === get_option( 'show_on_front' ),
273
+ // for which the corresponding skope_id was skp__post_page_home,
274
+ // those settings have to be copied in the skp__post_page_{$static_home_page_id} skope settings
275
+
276
+ // If we are on the real home page, but displaying a static page then set the static page id as obj_id
277
  if ( ! is_home() && 'page' === get_option( 'show_on_front' ) ) {
278
  $home_page_id = get_option( 'page_on_front' );
279
  if ( 0 < $home_page_id ) {
281
  }
282
  }
283
  }
284
+
285
+ // cache now
286
  if ( did_action( 'wp' ) ) {
287
  Flat_Skop_Base()->query_skope = apply_filters( 'skp_get_query_skope' , array( 'meta_type' => $meta_type , 'type' => $type , 'obj_id' => $obj_id ) , $queried_object );
288
  }
289
 
290
  return Flat_Skop_Base()->query_skope;
291
  }
292
+
293
+
294
+ //@return the skope prefix used both when customizing and on front
295
  function skp_get_skope_id( $level = 'local' ) {
296
+ // CACHE THE SKOPE WHEN 'wp' DONE
297
+ // the skope id is used when filtering the options, called hundreds of times.
298
+ // We'll get hight performances with a cached value instead of using the skp_get_skope_id() function on each call.
299
  $new_skope_ids = array( 'local' => '_skope_not_set_', 'group' => '_skope_not_set_' );
300
  if ( did_action( 'wp' ) ) {
301
  if ( empty( Flat_Skop_Base()->current_skope_ids ) ) {
305
  Flat_Skop_Base()->current_skope_ids = $new_skope_ids;
306
 
307
  $skope_id_to_return = $new_skope_ids[ $level ];
308
+ // error_log('<SKOPE ID cached in skp_get_skope_id>');
309
+ // error_log( print_r( $new_skope_ids, true ) );
310
+ // error_log('</SKOPE ID cached in skp_get_skope_id>');
311
  } else {
312
  $new_skope_ids = Flat_Skop_Base()->current_skope_ids;
313
  $skope_id_to_return = $new_skope_ids[ $level ];
315
  } else {
316
  $skope_id_to_return = array_key_exists( $level, $new_skope_ids ) ? $new_skope_ids[ $level ] : '_skope_not_set_';
317
  }
318
+ // error_log('$skope_id_to_return => ' . $level . ' ' . $skope_id_to_return );
319
+ // error_log( print_r( Flat_Skop_Base() -> current_skope_ids , true ) );
320
  return apply_filters( 'skp_get_skope_id', $skope_id_to_return, $level );
321
  }
322
+
323
+ //@param args = array(
324
+ // 'skope_string' => skp_get_skope(),
325
+ // 'skope_type' => $skp_type,
326
+ // 'skope_level' => 'local'
327
+ //)
328
+ //@return string
329
  function skp_build_skope_id( $args = array() ) {
330
  $skope_id = '_skope_not_set_';
331
+
332
+ // normalizes
333
  $args = is_array( $args ) ? $args : array();
334
  $args = wp_parse_args(
335
  $args,
336
  array( 'skope_string' => '', 'skope_type' => '', 'skope_level' => '' )
337
  );
338
+
339
+ // set params if not provided
340
  $args['skope_level'] = empty( $args['skope_level'] ) ? 'local' : $args['skope_level'];
341
  $args['skope_string'] = ( 'local' == $args['skope_level'] && empty( $args['skope_string'] ) ) ? skp_get_skope() : $args['skope_string'];
342
  $args['skope_type'] = ( 'group' == $args['skope_level'] && empty( $args['skope_type'] ) ) ? skp_get_skope( 'type' ) : $args['skope_type'];
343
+
344
+ // generate skope_id for two cases : local or group
345
  switch( $args[ 'skope_level'] ) {
346
  case 'local' :
347
  $skope_id = strtolower( NIMBLE_SKOPE_ID_PREFIX . $args[ 'skope_string' ] );
444
  $title = ucfirst( $title );
445
  return skp_trim_text( $title, $long ? 45 : 28, '...');
446
  }
447
+
448
+ //@return bool
449
+ //=> tells if the current skope is part of the ones without group
450
  function skp_skope_has_no_group( $meta_type ) {
451
  return in_array(
452
  $meta_type,
453
  skp_get_no_group_skope_list()
454
  ) || is_post_type_archive();
455
  }
456
+
457
+ //@return bool
458
+ //Tells if the current skope has a group level
459
  function skp_skope_has_a_group( $meta_type ) {
460
  return in_array(
461
  $meta_type,
462
  array('post', 'tax', 'user')
463
  );
464
  }
465
+
466
+
467
+
468
+ //@return bool
469
  function skp_is_real_home() {
470
+ // Warning : when show_on_front is a page, but no page_on_front has been picked yet, is_home() is true
471
+ // beware of https://github.com/presscustomizr/nimble-builder/issues/349
472
  return ( is_home() && ( 'posts' == get_option( 'show_on_front' ) || '__nothing__' == get_option( 'show_on_front' ) ) )
473
  || ( is_home() && 0 == get_option( 'page_on_front' ) && 'page' == get_option( 'show_on_front' ) )//<= this is the case when the user want to display a page on home but did not pick a page yet
474
  || is_front_page();
479
  * Returns a boolean
480
  */
481
  function skp_is_customizing() {
482
+ //checks if is customizing : two contexts, admin and front (preview frame)
483
  global $pagenow;
484
  $_is_ajaxing_from_customizer = isset( $_POST['customized'] ) || isset( $_POST['wp_customize'] );
485
 
486
  $is_customizing = false;
487
+ // the check on $pagenow does NOT work on multisite install @see https://github.com/presscustomizr/nimble-builder/issues/240
488
+ // That's why we also check with other global vars
489
+ // @see wp-includes/theme.php, _wp_customize_include()
490
  $is_customize_php_page = ( is_admin() && 'customize.php' == basename( $_SERVER['PHP_SELF'] ) );
491
  $is_customize_admin_page_one = (
492
  $is_customize_php_page
499
 
500
  if ( $is_customize_admin_page_one || $is_customize_admin_page_two ) {
501
  $is_customizing = true;
502
+ //hu_is_customize_preview_frame() ?
503
+ // Note : is_customize_preview() is not able to differentiate when previewing in the customizer and when previewing a changeset draft.
504
+ // @todo => change this
505
  } else if ( is_customize_preview() || ( ! is_admin() && isset($_REQUEST['customize_messenger_channel']) ) ) {
506
  $is_customizing = true;
507
+ // hu_doing_customizer_ajax()
508
  } else if ( $_is_ajaxing_from_customizer && ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
509
  $is_customizing = true;
510
  }
526
  return ! isset( $_POST['customize_messenger_channel']) && is_customize_preview();
527
  }
528
  ?><?php
529
+
530
+ ////////////////////////////////////////////////////////////////
531
+ // FLAT SKOPE BASE
532
  if ( ! class_exists( 'Flat_Skop_Base' ) ) :
533
  class Flat_Skop_Base {
534
  static $instance;
555
  }
556
  endif;
557
  ?><?php
558
+ /////////////////////////////////////////////////////////////////
559
+ // PRINT CUSTOMIZER JAVASCRIPT + LOCALIZED DATA
560
  if ( ! class_exists( 'Flat_Skop_Register_And_Load_Control_Assets' ) ) :
561
  class Flat_Skop_Register_And_Load_Control_Assets extends Flat_Skop_Base {
562
+ // Fired in Flat_Skop_Base::__construct()
563
  public function skp_register_and_load_control_assets() {
564
  add_action( 'customize_controls_enqueue_scripts', array( $this, 'skp_enqueue_controls_js_css' ), 20 );
565
  }
567
  public function skp_enqueue_controls_js_css() {
568
  $_use_unminified = defined('CZR_DEV')
569
  && true === CZR_DEV
570
+ // && false === strpos( dirname( dirname( dirname (__FILE__) ) ) , 'inc/wfc' )
571
  && file_exists( sprintf( '%s/assets/czr/js/czr-skope-base.js' , dirname( __FILE__ ) ) );
572
 
573
  $_prod_script_path = sprintf(
578
 
579
  wp_enqueue_script(
580
  'czr-skope-base',
581
+ //dev / debug mode mode?
582
  $_prod_script_path,
583
  array('customize-controls' , 'jquery', 'underscore'),
584
  ( defined('WP_DEBUG') && true === WP_DEBUG ) ? time() : wp_get_theme() -> version,
604
  /* ------------------------------------------------------------------------- */
605
  if ( ! class_exists( 'Flat_Export_Skope_Data_And_Send_To_Panel' ) ) :
606
  class Flat_Export_Skope_Data_And_Send_To_Panel extends Flat_Skop_Register_And_Load_Control_Assets {
607
+ // Fired in Flat_Skop_Base::__construct()
608
  public function skp_export_skope_data_and_schedule_sending_to_panel() {
609
  add_action( 'wp_footer', array( $this, 'skp_print_server_skope_data') , 30 );
610
  }
611
+
612
+
613
+ //hook : 'wp_footer'
614
  public function skp_print_server_skope_data() {
615
  if ( ! skp_is_customize_preview_frame() )
616
  return;
617
 
618
  global $wp_query, $wp_customize;
619
  $_meta_type = skp_get_skope( 'meta_type', true );
620
+
621
+ // $_czr_scopes = array( );
622
  $_czr_skopes = $this->_skp_get_json_export_ready_skopes();
623
  ?>
624
  <script type="text/javascript" id="czr-print-skop">
646
  /* ------------------------------------------------------------------------- *
647
  * CUSTOMIZE PREVIEW : BUILD SKOPES JSON
648
  /* ------------------------------------------------------------------------- */
649
+ //generates the array of available scopes for a given context
650
+ //ex for a single post tagged #tag1 and #tag2 and categroized #cat1 :
651
+ //global
652
+ //all posts
653
+ //local
654
+ //posts tagged #tag1
655
+ //posts tagged #tag2
656
+ //posts categorized #cat1
657
+ //@return array()
658
+ //
659
+ //skp_get_skope_title() takes the following default args
660
+ //array(
661
+ // 'level' => '',
662
+ // 'meta_type' => null,
663
+ // 'long' => false,
664
+ // 'is_prefixed' => true
665
+ //)
666
  private function _skp_get_json_export_ready_skopes() {
667
  $skopes = array();
668
  $_meta_type = skp_get_skope( 'meta_type', true );
669
+
670
+ //default properties of the scope object
671
  $defaults = skp_get_default_skope_model();
672
+ //global and local and always sent
673
  $skopes[] = wp_parse_args(
674
  array(
675
  'title' => skp_get_skope_title( array( 'level' => 'global' ) ),
680
  ),
681
  $defaults
682
  );
683
+
684
+
685
+ //SPECIAL GROUPS
686
+ //@todo
687
+
688
+
689
+ //GROUP
690
+ //Do we have a group ? => if yes, then there must be a meta type
691
  if ( skp_get_skope('meta_type') ) {
692
  $skopes[] = wp_parse_args(
693
  array(
701
  $defaults
702
  );
703
  }
704
+
705
+
706
+ //LOCAL
707
  $skopes[] = wp_parse_args(
708
  array(
709
  'title' => skp_get_skope_title( array( 'level' => 'local', 'meta_type' => $_meta_type ) ),
725
 
726
  if ( ! class_exists( 'Flat_Skope_Clean_Final' ) ) :
727
  final class Flat_Skope_Clean_Final extends Flat_Export_Skope_Data_And_Send_To_Panel {
728
+ // Fired in Flat_Skop_Base::__construct()
729
  public function skp_schedule_cleaning_on_object_delete() {
730
  add_action( 'delete_post', array( $this, 'skp_clean_skopified_posts' ) );
731
  add_action( 'delete_term_taxonomy', array( $this, 'skp_clean_skopified_taxonomies' ) );
732
  add_action( 'delete_user', array( $this, 'skp_clean_skopified_users' ) );
733
  }
734
+
735
+
736
+ // Clean any associated skope post for all public post types : post, page, public cpt
737
+ // 'delete_post' Fires immediately before a post is deleted from the database.
738
+ // @see wp-includes/post.php
739
+ // don't have to return anything
740
  public function skp_clean_skopified_posts( $postid ) {
741
  $deletion_candidate = get_post( $postid );
742
  if ( ! $deletion_candidate || ! is_object( $deletion_candidate ) )
743
  return;
744
+
745
+ // Stop here if the post type is not considered "viewable".
746
+ // For built-in post types such as posts and pages, the 'public' value will be evaluated.
747
+ // For all others, the 'publicly_queryable' value will be used.
748
+ // For example, the 'revision' post type, which is purely internal and not skopable, won't pass this test.
749
  if ( ! is_post_type_viewable( $deletion_candidate -> post_type ) )
750
  return;
751
+
752
+ // Force the skope parts normally retrieved with skp_get_query_skope()
753
  $skope_string = skp_get_skope( null, true, array(
754
  'meta_type' => 'post',
755
  'type' => $deletion_candidate -> post_type,
756
  'obj_id' => $postid
757
  ) );
758
+
759
+ // build a skope_id with the normalized function
760
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
761
+
762
+ // fetch the skope post id which, if exists, is set as a theme mod
763
  $skope_post_id_candidate = get_theme_mod( $skope_id );
764
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
765
+ // permanently delete the skope post from db
766
  wp_delete_post( $skope_post_id_candidate );
767
+ // remove the theme_mod
768
  remove_theme_mod( $skope_id );
769
  }
770
  }
771
+
772
+
773
+ // 'delete_term_taxonomy' Fires immediately before a term taxonomy ID is deleted.
774
  public function skp_clean_skopified_taxonomies( $term_id ) {
775
  $deletion_candidate = get_term( $term_id );
776
  if ( ! $deletion_candidate || ! is_object( $deletion_candidate ) )
777
  return;
778
+
779
+ //error_log( print_r( $deletion_candidate, true ) );
780
+
781
+ // Force the skope parts normally retrieved with skp_get_query_skope()
782
  $skope_string = skp_get_skope( null, true, array(
783
  'meta_type' => 'tax',
784
  'type' => $deletion_candidate -> taxonomy,
785
  'obj_id' => $term_id
786
  ) );
787
+
788
+ // build a skope_id with the normalized function
789
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
790
+
791
+ // fetch the skope post id which, if exists, is set as a theme mod
792
  $skope_post_id_candidate = get_theme_mod( $skope_id );
793
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
794
+ // permanently delete the skope post from db
795
  wp_delete_post( $skope_post_id_candidate );
796
+ // remove the theme_mod
797
  remove_theme_mod( $skope_id );
798
+ //error_log( 'SUCCESSFULLY REMOVED SKOPE POST ID ' . $skope_post_id_candidate . ' AND THEME MOD ' . $skope_id );
799
  }
800
  }
801
+
802
+
803
+ // 'delete_user' Fires immediately before a user is deleted from the database.
804
  public function skp_clean_skopified_users( $user_id ) {
805
+ // Force the skope parts normally retrieved with skp_get_query_skope()
806
  $skope_string = skp_get_skope( null, true, array(
807
  'meta_type' => 'user',
808
  'type' => 'author',
809
  'obj_id' => $user_id
810
  ) );
811
+
812
+ // build a skope_id with the normalized function
813
  $skope_id = skp_build_skope_id( array( 'skope_string' => $skope_string, 'skope_level' => 'local' ) );
814
+
815
+ // fetch the skope post id which, if exists, is set as a theme mod
816
  $skope_post_id_candidate = get_theme_mod( $skope_id );
817
  if ( $skope_post_id_candidate > 0 && get_post( $skope_post_id_candidate ) ) {
818
+ // permanently delete the skope post from db
819
  wp_delete_post( $skope_post_id_candidate );
820
+ // remove the theme_mod
821
  remove_theme_mod( $skope_id );
822
+ //error_log( 'SUCCESSFULLY REMOVED SKOPE POST ID ' . $skope_post_id_candidate . ' AND THEME MOD ' . $skope_id );
823
  }
824
  }
825
  }//class
lang/en_US.po CHANGED
@@ -1,6 +1,6 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Hueman Addons v2.2.6\n"
4
  "POT-Creation-Date: 2016-12-19 18:13+0100\n"
5
  "PO-Revision-Date: 2016-12-19 18:14+0100\n"
6
  "Last-Translator: \n"
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Hueman Addons v2.2.7\n"
4
  "POT-Creation-Date: 2016-12-19 18:13+0100\n"
5
  "PO-Revision-Date: 2016-12-19 18:14+0100\n"
6
  "Last-Translator: \n"
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: hueman theme, hueman, customizer, contextualizer
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.2
9
- Stable tag: 2.2.6
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -37,10 +37,13 @@ The plugin has been designed specifically for the Hueman WordPress theme. Lightw
37
  [Documentation here](http://docs.presscustomizr.com/article/242-hueman-addons-how-to-set-the-share-bar-options)
38
 
39
  == Upgrade Notice ==
40
- = 2.2.6 =
41
- Replaced broken sharre count by "+" sign. Removed Google Plus share button.
42
 
43
  == Changelog ==
 
 
 
44
  = 2.2.6 May 8th, 2019 =
45
  * replaced broken sharre count by "+" sign
46
  * removed deprecated Google Plus
6
  Requires at least: 4.7
7
  Requires PHP: 5.4
8
  Tested up to: 5.2
9
+ Stable tag: 2.2.7
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
37
  [Documentation here](http://docs.presscustomizr.com/article/242-hueman-addons-how-to-set-the-share-bar-options)
38
 
39
  == Upgrade Notice ==
40
+ = 2.2.7 =
41
+ Fixes LinkedIn sharre icon not displayed because of a javascript error.
42
 
43
  == Changelog ==
44
+ = 2.2.7 July 18th, 2019 =
45
+ * fixed : LinkedIn sharre icon was not displayed because of a javascript error
46
+
47
  = 2.2.6 May 8th, 2019 =
48
  * replaced broken sharre count by "+" sign
49
  * removed deprecated Google Plus