"use strict";var debugit=!1,strongController={grids:{},iframes:{},defaults:{initializeOn:"windowLoad",method:"",universalTimer:500,observerTimer:500,containerId:"page",addedNodeId:"content",event:"",script:"",debug:!1},config:{},setup:function(t){t.universalTimer=parseInt(t.universalTimer),t.observerTimer=parseInt(t.observerTimer),t.debug=!!t.debug,debugit=t.debug,this.config=jQuery.extend({},this.defaults,t)},mutationObserver:window.MutationObserver||window.WebKitMutationObserver,eventListenerSupported:window.addEventListener,checkInit:function(){return jQuery('.strong-view[data-state="idle"]').length},initSliders:function(){var t=jQuery('.strong-view.slider-container[data-state="idle"]');debugit&&console.log("sliders found:",t.length),t.length&&t.each((function(){var t=jQuery(this),e=t.data("count");void 0!==e&&1===e||t.strongSlider()}))},initPagers:function(){var t=jQuery('.strong-pager[data-state="idle"]');debugit&&console.log("pagers found:",t.length),t.length&&t.each((function(){jQuery(this).strongPager()}))},initLayouts:function(){this.grids=jQuery('.strong-view[data-state="idle"] .strong-masonry'),debugit&&console.log("Masonry found:",this.grids.length),this.grids.length&&(this.grids.prepend('
'),this.grids.imagesLoaded((function(){strongController.grids.masonry({columnWidth:".grid-sizer",gutter:".gutter-sizer",itemSelector:".wpmtst-testimonial",percentPosition:!0}),strongController.grids.closest(".strong-view").attr("data-state","init")})))},initForm:function(){var t=jQuery('.strong-form[data-state="idle"]'),e=jQuery(".wpmtst-testimonial-success");debugit&&console.log("forms found:",t.length),debugit&&console.log("messages found:",e.length),(t.length||e.length)&&jQuery(t).each((function(){new strongValidation(this)}))},initIframes:function(){this.iframes=jQuery("iframe")},customEvents:function(){addEventListener("toggleFullContent",(function(t){strongController.grids.length&&strongController.grids.masonry()}))},observer:function(t,e){this.mutationObserver?new this.mutationObserver((function(t){for(var n=0;n checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()}),strongController.config.universalTimer)},newTimeout:function(){strongController.timeoutId=setTimeout((function(){debugit&&console.log("tick > checkInit",strongController.checkInit()),strongController.checkInit()&&strongController.start()}),strongController.config.observerTimer)},init:function(){debugit&&console.log("strongController init");var t={};void 0!==window.strongControllerParms?t=window.strongControllerParms:debugit&&console.log("settings not found"),this.setup(t),debugit&&console.log("config",this.config),"documentReady"===this.config.initializeOn?jQuery(document).ready((function(){debugit&&console.log("document ready"),strongController.start(),strongController.listen()})):jQuery(window).on("load",(function(){debugit&&console.log("window load"),strongController.start(),strongController.listen()})),jQuery(window).on("load",(function(){strongController.listenForIframeReady()})),jQuery("textarea.max-length, input.text.max-length").on("keyup",(function(){var t=jQuery(this).attr("maxlength"),e=jQuery(this).val().length;null!==t&&jQuery(this).parent().find(".max-length-counter").html(e+" characters out of "+t)}))},start:function(){debugit&&console.log("start"),strongController.initSliders(),strongController.initPagers(),strongController.initLayouts(),strongController.initForm(),strongController.initIframes(),strongController.customEvents()},listen:function(){switch(debugit&&console.log("listen"),this.config.method){case"universal":this.newInterval();break;case"observer":this.observer(document.getElementById(this.config.containerId),this.newTimeout);break;case"event":document.addEventListener(this.config.event,this.start);break;case"script":if("barba"===this.config.script)"object"==typeof Barba&&Barba.hasOwnProperty("Dispatcher")&&Barba.Dispatcher.on("transitionCompleted",this.start)}},listenForIframeReady:function(){debugit&&console.log("listenForIframeReady"),strongController.iframes.length&&strongController.grids.length?strongController.iframes.ready((function(){setTimeout((function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 1")}),1e3),setTimeout((function(){strongController.grids.masonry(),debugit&&console.log("listenForIframeReady","timeout 2")}),2e3)})):debugit&&console.log("listenForIframeReady","no iframes or Masonry found")}};strongController.init();