File: /home/epubdjye/www17/wp-content/themes/hestia/vendor/codeinwp/ti-about-page/assets/js/script.js
!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}([function(t,e,i){var n=i(2);t.exports=n},function(t,e,i){"use strict";i.r(e);var n=i(0);new(i.n(n).a)(".ti-about-tablist",{marginTop:32,stickyClass:"stickied",stickyFor:782});window.addEventListener("DOMContentLoaded",(function(){document.body.classList.add("about-loaded"),function(){for(var t=document.querySelectorAll(".ti-about-tablist a.tab"),e=function(e){t[e].addEventListener("click",(function(i){i.preventDefault();var n=document.querySelector(".tab-content.active"),o=i.target.getAttribute("href");if(window.location.hash=o,null!==n){n.classList.remove("active");for(var s=0;s<t.length;s++)t[s].classList.remove("active")}t[e].classList.add("active"),document.querySelector(o).classList.add("active")}))},i=0;i<t.length;i++)e(i)}(),function(){var t=window.location.hash;if(null!==t){var e=document.querySelector('a.tab[href="'+t+'"]');if(null===e)return!1;e.click()}}(),function(){if(tiAboutPageObject.nr_actions_required>0){var t=document.createElement("span"),e=document.querySelector(".tab.recommended_actions");t.classList.add("badge-action-count"),t.innerText=tiAboutPageObject.nr_actions_required,e.appendChild(t)}}(),function(){for(var t=document.querySelectorAll("#about-tabs > div a[href^='#']"),e=0;e<t.length;e++)t[e].addEventListener("click",(function(t){t.preventDefault();var e=t.target.getAttribute("href").substr(1),i=new Event("click");return document.querySelector('li[data-tab-id="'+e+'"] a.tab').dispatchEvent(i),!1}))}()})),jQuery(document).ready((function(){jQuery(".ti-about-page-required-action-button").click((function(){var t=jQuery(this).attr("data-slug"),e=jQuery("."+t);jQuery.ajax({type:"POST",data:{action:"update_recommended_plugins_visibility",slug:t,nonce:tiAboutPageObject.nonce},url:tiAboutPageObject.ajaxurl,beforeSend:function(){jQuery(e).fadeOut()},success:function(t){console.log(t.required_actions),0===t.required_actions&&(jQuery('#about-tabs #recommended_actions, [data-tab-id="recommended_actions"], #adminmenu .wp-submenu li a span.badge-action-count').fadeOut().remove(),jQuery("#about-tabs ul > li:first-child a").click()),jQuery(e).remove(),jQuery("#about-tabs ul li > .recommended_actions span, #adminmenu .wp-submenu li a span.badge-action-count").text(t.required_actions)},error:function(t,i,n){jQuery(e).fadeIn(),console.log(t+" :: "+i+" :: "+n)}})})),jQuery(document).on("DOMNodeInserted",".activate-now",(function(){var t=jQuery(this);if(t.length){var e=jQuery(t).attr("href");void 0!==e&&jQuery.ajax({beforeSend:function(){jQuery(t).replaceWith('<a class="button updating-message">'+tiAboutPageObject.activating_string+"...</a>")},async:!0,type:"GET",url:e,success:function(){location.reload()}})}}))}))},function(t,e,i){
/**
* Sticky.js
* Library for sticky elements written in vanilla javascript. With this library you can easily set sticky elements on your website. It's also responsive.
*
* @version 1.2.0
* @author Rafal Galus <biuro@rafalgalus.pl>
* @website https://rgalus.github.io/sticky-js/
* @repo https://github.com/rgalus/sticky-js
* @license https://github.com/rgalus/sticky-js/blob/master/LICENSE
*/
var n,o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.selector=e,this.elements=[],this.version="1.2.0",this.vp=this.getViewportSize(),this.body=document.querySelector("body"),this.options={wrap:i.wrap||!1,marginTop:i.marginTop||0,stickyFor:i.stickyFor||0,stickyClass:i.stickyClass||null,stickyContainer:i.stickyContainer||"body"},this.updateScrollTopPosition=this.updateScrollTopPosition.bind(this),this.updateScrollTopPosition(),window.addEventListener("load",this.updateScrollTopPosition),window.addEventListener("scroll",this.updateScrollTopPosition),this.run()}return t.prototype.run=function(){var t=this,e=setInterval((function(){if("complete"===document.readyState){clearInterval(e);var i=document.querySelectorAll(t.selector);t.forEach(i,(function(e){return t.renderElement(e)}))}}),10)},t.prototype.renderElement=function(t){var e=this;t.sticky={},t.sticky.active=!1,t.sticky.marginTop=parseInt(t.getAttribute("data-margin-top"))||this.options.marginTop,t.sticky.stickyFor=parseInt(t.getAttribute("data-sticky-for"))||this.options.stickyFor,t.sticky.stickyClass=t.getAttribute("data-sticky-class")||this.options.stickyClass,t.sticky.wrap=!!t.hasAttribute("data-sticky-wrap")||this.options.wrap,t.sticky.stickyContainer=this.options.stickyContainer,t.sticky.container=this.getStickyContainer(t),t.sticky.container.rect=this.getRectangle(t.sticky.container),t.sticky.rect=this.getRectangle(t),"img"===t.tagName.toLowerCase()&&(t.onload=function(){return t.sticky.rect=e.getRectangle(t)}),t.sticky.wrap&&this.wrapElement(t),this.activate(t)},t.prototype.wrapElement=function(t){t.insertAdjacentHTML("beforebegin","<span></span>"),t.previousSibling.appendChild(t)},t.prototype.activate=function(t){t.sticky.rect.top+t.sticky.rect.height<t.sticky.container.rect.top+t.sticky.container.rect.height&&t.sticky.stickyFor<this.vp.width&&!t.sticky.active&&(t.sticky.active=!0),this.elements.indexOf(t)<0&&this.elements.push(t),t.sticky.resizeEvent||(this.initResizeEvents(t),t.sticky.resizeEvent=!0),t.sticky.scrollEvent||(this.initScrollEvents(t),t.sticky.scrollEvent=!0),this.setPosition(t)},t.prototype.initResizeEvents=function(t){var e=this;t.sticky.resizeListener=function(){return e.onResizeEvents(t)},window.addEventListener("resize",t.sticky.resizeListener)},t.prototype.destroyResizeEvents=function(t){window.removeEventListener("resize",t.sticky.resizeListener)},t.prototype.onResizeEvents=function(t){this.vp=this.getViewportSize(),t.sticky.rect=this.getRectangle(t),t.sticky.container.rect=this.getRectangle(t.sticky.container),t.sticky.rect.top+t.sticky.rect.height<t.sticky.container.rect.top+t.sticky.container.rect.height&&t.sticky.stickyFor<this.vp.width&&!t.sticky.active?t.sticky.active=!0:(t.sticky.rect.top+t.sticky.rect.height>=t.sticky.container.rect.top+t.sticky.container.rect.height||t.sticky.stickyFor>=this.vp.width&&t.sticky.active)&&(t.sticky.active=!1),this.setPosition(t)},t.prototype.initScrollEvents=function(t){var e=this;t.sticky.scrollListener=function(){return e.onScrollEvents(t)},window.addEventListener("scroll",t.sticky.scrollListener)},t.prototype.destroyScrollEvents=function(t){window.removeEventListener("scroll",t.sticky.scrollListener)},t.prototype.onScrollEvents=function(t){t.sticky.active&&this.setPosition(t)},t.prototype.setPosition=function(t){this.css(t,{position:"",width:"",top:"",left:""}),this.vp.height<t.sticky.rect.height||!t.sticky.active||(t.sticky.rect.width||(t.sticky.rect=this.getRectangle(t)),t.sticky.wrap&&this.css(t.parentNode,{display:"block",width:t.sticky.rect.width+"px",height:t.sticky.rect.height+"px"}),0===t.sticky.rect.top&&t.sticky.container===this.body?this.css(t,{position:"fixed",top:t.sticky.rect.top+"px",left:t.sticky.rect.left+"px",width:t.sticky.rect.width+"px"}):this.scrollTop>t.sticky.rect.top-t.sticky.marginTop?(this.css(t,{position:"fixed",width:t.sticky.rect.width+"px",left:t.sticky.rect.left+"px"}),this.scrollTop+t.sticky.rect.height+t.sticky.marginTop>t.sticky.container.rect.top+t.sticky.container.offsetHeight?(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.css(t,{top:t.sticky.container.rect.top+t.sticky.container.offsetHeight-(this.scrollTop+t.sticky.rect.height)+"px"})):(t.sticky.stickyClass&&t.classList.add(t.sticky.stickyClass),this.css(t,{top:t.sticky.marginTop+"px"}))):(t.sticky.stickyClass&&t.classList.remove(t.sticky.stickyClass),this.css(t,{position:"",width:"",top:"",left:""}),t.sticky.wrap&&this.css(t.parentNode,{display:"",width:"",height:""})))},t.prototype.update=function(){var t=this;this.forEach(this.elements,(function(e){e.sticky.rect=t.getRectangle(e),e.sticky.container.rect=t.getRectangle(e.sticky.container),t.activate(e),t.setPosition(e)}))},t.prototype.destroy=function(){var t=this;this.forEach(this.elements,(function(e){t.destroyResizeEvents(e),t.destroyScrollEvents(e),delete e.sticky}))},t.prototype.getStickyContainer=function(t){for(var e=t.parentNode;!e.hasAttribute("data-sticky-container")&&!e.parentNode.querySelector(t.sticky.stickyContainer)&&e!==this.body;)e=e.parentNode;return e},t.prototype.getRectangle=function(t){this.css(t,{position:"",width:"",top:"",left:""});var e=Math.max(t.offsetWidth,t.clientWidth,t.scrollWidth),i=Math.max(t.offsetHeight,t.clientHeight,t.scrollHeight),n=0,o=0;do{n+=t.offsetTop||0,o+=t.offsetLeft||0,t=t.offsetParent}while(t);return{top:n,left:o,width:e,height:i}},t.prototype.getViewportSize=function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},t.prototype.updateScrollTopPosition=function(){this.scrollTop=(window.pageYOffset||document.scrollTop)-(document.clientTop||0)||0},t.prototype.forEach=function(t,e){for(var i=0,n=t.length;i<n;i++)e(t[i])},t.prototype.css=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},t}();n=o,t.exports=n}]);