File: /home4/bqfpihmy/www/townsrealty/wp-content/cache/wpo-minify/tmp/js-8e35265e.js.transient
{"request":{"hurl":"https:\/\/www.townsrealty.com\/wp-content\/themes\/Total\/assets\/js\/frontend\/loadmore.min.js","inline":"","enable_minification":false,"type":"js","handle":"wpex-loadmore","version":"6.4.2"},"log":{"url":"\/wp-content\/themes\/Total\/assets\/js\/frontend\/loadmore.min.js","success":true},"code":"!function(e,o){\"use strict\";\"function\"!=typeof window.wpexLoadMore&&(window.wpexLoadMore=function(){var n=e(\".wpex-load-more\");n.length&&n.each((function(){const n=e(this),t=n.parent(\".wpex-load-more-wrap\"),i=n.find(\".theme-button-inner\"),a=t.find(\".wpex-load-more-spinner\"),d=n.data(\"loadmore\");let r=document.querySelector(d.grid);if(r||(r=t.get(0).previousElementSibling),!r)return;const s=e(r),l=d.infinite_scroll||!1,p=parseInt(d.maxPages)||1;let c=parseInt(d.page||0)+1,w=!1,u=null,f=null,x=parseInt(d.count)||1;l||t.css(\"min-height\",t.outerHeight());const m=function(){if(\"object\"==typeof wpex&&void 0!==wpex.equalHeights&&wpex.equalHeights(),u&&u.appended(f),s.trigger(\"wpexLoadMoreAddedHidden\",[f]),f.css(\"opacity\",1),s.trigger(\"wpexLoadMoreAddedVisible\",[f]),\"object\"==typeof wpex&&\"function\"==typeof wpex.hoverStyles&&wpex.hoverStyles(),\"function\"==typeof window.wpexSliderPro&&wpexSliderPro(f),void 0!==e.fn.mediaelementplayer&&f.find(\"audio, video\").mediaelementplayer(),window.dispatchEvent(new CustomEvent(\"totaltheme_loadmore_posts\")),l&&t.addClass(\"wpex-invisible\"),t.removeClass(\"wpex-loading\"),n.removeClass(\"wpex-hidden\"),a.addClass(\"wpex-hidden\"),a.removeClass(\"wpex-inline-block\"),i.text(o.i18n.text),!l){var d=f.first().find(\"a\");d.length&&d.eq(0).focus()}c-1===p&&t.hide(),w=!1};n.on(\"click\",(function(){if(\"undefined\"!=typeof Isotope&&(u=Isotope.data(r)),!w){w=!0,l&&t.removeClass(\"wpex-invisible\"),t.addClass(\"wpex-loading\"),n.addClass(\"wpex-hidden\"),a.removeClass(\"wpex-hidden\"),a.addClass(\"wpex-inline-block\"),i.text(o.i18n.loadingText);var p={action:\"wpex_ajax_load_more\",nonce:o.nonce,loadMore:JSON.stringify(d),loopCount:x,page:c};e.post(o.ajax_url,p,(function(n){if(n.success){if(!n.data.html)return console.log(\"wpex_load_more no posts to load\"),void t.hide();c+=1,x=n.data.loopCount,f=e(n.data.html),f.css(\"opacity\",0),f.each((function(){var o=e(this);o.hasClass(\"sticky\")&&o.addClass(\"wpex-duplicate\"),s.hasClass(\"wpex-masonry-grid\")&&o.addClass(\"wpex-masonry-col\")})),s.append(f),\"function\"==typeof imagesLoaded?imagesLoaded(r,(function(){m()})):m()}else i.text(o.i18n.failedText),n.data&&n.data.message&&console.error(n.data.message)})).fail((function(e,o,n){console.error(\"AJAX request failed with status: \"+o),console.error(\"Error thrown: \"+n),console.error(\"Response text: \"+e.responseText)}))}return!1}))}))}),\"function\"!=typeof window.wpexLoadMoreInfiniteScroll&&(window.wpexLoadMoreInfiniteScroll=function(){const o=document.querySelectorAll(\".wpex-load-more--infinite-scroll\");let n=0;if(!o)return;const t=((e,o=10)=>{let n=null;return(...t)=>{window.clearTimeout(n),n=window.setTimeout((()=>{e.apply(null,t)}),o)}})((t=>{let i=window.scrollY;i>n&&o.forEach((o=>{(o=>{const n=e(o).offset().top,t=n+e(o).outerHeight(),i=e(window).scrollTop(),a=i+e(window).height();return t>i&&n<a})(o)&&o.click()})),n=i}),10);window.addEventListener(\"scroll\",t)}),e(document).ready((function(){wpexLoadMoreInfiniteScroll(),wpexLoadMore()}))}(jQuery,wpex_loadmore_params);\n","status":true}