(($,o,a,n,l,r,d)=>{'use strict';const e={bodyCl:n.body.classList,headerType:r.headerType,v:l.theme_v,url:l.theme_url+'/',init(){this.darkMode(),this.isFullPageScroll=!o.is_builder_active&&this.bodyCl.contains('full-section-scrolling'),this.is_horizontal_scrolling=!0===this.isFullPageScroll&&this.bodyCl.contains('full-section-scrolling-horizontal'),this.readyView(),o.megaMenu(n.tfId('main-nav')),this.headerRender(),this.headerVideo(),this.fixedHeader(),!0===this.isFullPageScroll&&this.fullpage(),this.wc(),this.clickableOverlay(),this.mobileMenuDropDown(),setTimeout(()=>{this.loadFilterCss()},800),setTimeout(()=>{this.backToTop()},2e3),this.doInfinite(n.tfId('loops-wrapper')),setTimeout(()=>{this.commentAnimation()},3500),this.revealingFooter(),this.singleInfinie(),this.splitMenu()},fixedHeader(){!1===this.is_horizontal_scrolling&&this.bodyCl.contains('fixed-header-enabled')&&'header-bottom'!==this.headerType&&null!==n.tfId('headerwrap')&&(this.hasFixedHeader=!0,o.fixedHeader())},revealingFooter(){this.bodyCl.contains('revealing-footer')&&null!==n.tfId('footerwrap')&&o.loadJs(this.url+'js/modules/revealingFooter',null,this.v)},doInfinite(e){r.infiniteEnable&&o.infinity(e,{scrollToNewOnLoad:r.scrollToNewOnLoad,scrollThreshold:!('auto'!==r.autoInfinite),history:!!r.infiniteURL&&'replace'}),o.on('infiniteloaded',()=>{this.loadFilterCss()})},fullpage(e){if(n.tfClass('themify_builder')[0]===d)this.bodyCl.remove('full-section-scrolling');else if(e&&null!==n.fullscreenElement)o.on('tfsmartresize',this.fullpage.bind(this),!0);else{const t=(e||o).w;r.f_s_d&&t{o.trigger('themify_theme_fullpage_init',[{is_horizontal:this.is_horizontal_scrolling,is_fixedHeader:this.hasFixedHeader,has_footer:this.bodyCl.contains('fullpage-footer')}])}))}},loadFilterCss(){const t=['blur','grayscale','sepia','none'];for(let e=t.length-1;-1{o.trigger('themify_theme_header_video_init',[t])})}},wc(){a.woocommerce_params!==d&&o.loadJs(this.url+'js/modules/wc',null,this.v)},mobileMenuDropDown(){const t=n.tfClass('toggle-sticky-sidebar');for(let e=t.length-1;-1{e.w<=l.menu_point?$('#main-nav #site-logo').prependTo('.header-bar'):$('.header-bar #site-logo').prependTo($('#main-nav .themify-logo-menu-item'))};t({w:o.w}),o.on('tfsmartresize',e=>{e&&t(e)})}},clickableOverlay(){setTimeout(()=>{n.body.tfOn('click',e=>{const t=e.target;if(t&&'A'!==t.tagName&&'BUTTON'!==t.tagName&&t.closest('.post-content')){const s=t.closest('.loops-wrapper');if(null!==s){const i=s.classList;if((i.contains('grid6')||i.contains('grid5')||i.contains('grid4')||i.contains('grid3')||i.contains('grid2'))&&(i.contains('polaroid')||i.contains('overlay')||i.contains('flip'))){const l=t.closest('.post').querySelector('.post-image a, .post-title a');l&&l.href&&l.click()}}}})},1500)},headerRender(){const e=this.headerType;if('header-horizontal'===e||'header-top-bar'===e||'boxed-compact'===e||'header-stripe'===e){const t=n.tfClass('header-widget')[0];if(t!==d){const s=n.tfClass('pull-down')[0];s!==d&&s.tfOn('click',e=>{e.preventDefault(),e.stopPropagation(),n.tfId('header').classList.toggle('pull-down-close'),$(t).slideToggle('fast')})}}if(o.sideMenu(n.tfId('menu-icon'),{close:'#menu-icon-close',side:'header-leftpane'===e||'header-minbar'===e?'left':'right',hasOverlay:!('header-slide-out'===e||'header-rightpane'===e)}),l.m_m_expand&&o.on('sidemenushow',e=>{if('#mobile-menu'===e){const t=n.querySelectorAll('#main-nav>li.has-sub-menu');for(let e=t.length-1;-1{this.bodyCl.contains('mobile_menu_active')?$('.header-widget-full .header-widget').appendTo('#mobile-menu'):$('#mobile-menu .header-widget').prependTo('.header-widget-full')};i(),o.on('tfsmartresize',e=>{e&&i()})}},backToTop(){const t=n.tfClass('back-top'),s=(this.headerType,this.isFullPageScroll),e=s?null:n.querySelector('.back-top-float:not(.footer-tab)');if(e){const i=['scroll'],l=function(){e.classList.toggle('back-top-hide',this.scrollY<10)};o.isTouch&&(i.push('touchstart'),i.push('touchmove')),a.tfOn(i,l,{passive:!0})}if(t[0])for(let e=t.length-1;-1{this.bodyCl.add('ready-view'),this.bodyCl.remove('hidden-view'),$('.section_loader').fadeOut(500),a.tfOn('beforeunload',e=>{const t=e.target.activeElement,s=t.getAttribute('href');'BODY'===t.tagName||'tb_toolbar'===t.getAttribute('id')||t.closest('#tb_toolbar')||s&&!s.indexOf('tel:')&&s.indexOf('mailto:')})},!0,!(this.isFullPageScroll&&!(r.f_s_d&&o.w<=parseInt(r.f_s_d))))},singleInfinie(){n.tfClass('tf_single_scroll_wrap')[0]&&a.tfOn('scroll',()=>{o.loadJs(this.url+'js/modules/single-infinite',null,this.v)},{once:!0,passive:!0})},toggleDarkMode(e=!0){const t=n.querySelector('link[href*="dark-mode"]');e?t?t.setAttribute('media','all'):o.loadCss(r.darkmode.css,'darkmode',this.v,n.body.lastChild):t&&t.setAttribute('media','none'),this.bodyCl.toggle('tf_darkmode')},darkMode(){if(r.darkmode)if(r.darkmode.start){const e=new Date,t=new Date,s=new Date,i=r.darkmode.start.split(':'),l=r.darkmode.end.split(':');t.setHours(i[0],i[1],0),parseInt(l[0]){e.preventDefault();const t=!this.bodyCl.contains('tf_darkmode');this.toggleDarkMode(t),localStorage.setItem('tf_darkmode',t?1:0)});parseInt(localStorage.getItem('tf_darkmode'))&&this.toggleDarkMode()}}};e.init()})(jQuery,Themify,window,document,themify_vars,themifyScript,void 0);