Skip to Content

JavaScript File

URL: https://thegambler.com.ua/wp-content/plugins/luckywp-table-of-contents/front/assets/main.min.js?ver=2.1.4
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Tue, 12 Dec 2023 13:42:57 GMT
Download Time: Less than a second
Cookies: None
Size: 4 KB
HTTP Headers:  5 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1!function(){var o,l,n,e,g,m=function(t,e){var i,n={}

2;for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n}

3,t=function(t){return t}

4,c=(o={duration:300,action:"close",startTime:null,startHeight:null,endHeight:null,easing:t}

5,l=function(e,i){cancelAnimationFrame(e.getAttribute("data-lwptoc-animation-request-id")),e.setAttribute("data-lwptoc-animation-request-id",window.requestAnimationFrame(function(t){n(e,i,t)}

6))}

7,n=function(t,e,i){e.startTime||(e.startTime=i);var n,o=i-e.startTime;o<e.duration?(t.style.height=((e.endHeight-e.startingHeight)*e.easing(o/e.duration)+e.startingHeight).toFixed(2)+"px",l(t,e)):("close"===e.action&&(t.style.display="none"),"open"===e.action&&(t.style.display="block"),(n=t).style.height=null,n.style.overflow=null)}

8,function(t,e){if(window.requestAnimationFrame){var i=m(o,{}

9);i.action=e,t.style.height?i.startingHeight=parseFloat(t.style.height):i.startingHeight="close"===e?t.scrollHeight:0,(n=t).style.display="block",n.style.overflow="hidden",i.endHeight="close"===e?0:(t.style.height="0px",t.scrollHeight),l(t,i)}

10else t.style.display="close"===e?"none":"block";var n}

11),a=function(t){for(var e,i=document.querySelectorAll('[id="'+t+'"]'),n=0;n<i.length;n++)if((e=i[n]).offsetWidth||e.offsetHeight||e.getClientRects().length)return i[n];return null}

12,i=(e={offset:0,duration:500,easing:t,onComplete:function(t,e){}

13}

14,g=function(t,e){var i=t.getBoundingClientRect().top+window.pageYOffset-e;return i<0?0:i}

15,function(o,t){var l,a=m(e,t);if(window.requestAnimationFrame&&"smooth"!==window.getComputedStyle(document.getElementsByTagName("HTML")[0]).scrollBehavior){var r,s,c=window.pageYOffset,d=null,u=function(t){l=g(o,a.offset),r=l-c;var e=window.pageYOffset;if(!s||!(0<r&&e<s||r<0&&s<e)){s=e,d||(d=t-1);var i=t-d,n=((l-c)*a.easing(i/a.duration)+c).toFixed();window.scroll(0,n),i<a.duration?window.requestAnimationFrame(u):(window.scroll(0,l),a.onComplete(0,l))}

16}

17;window.requestAnimationFrame(u)}

18else l=g(o,a.offset),window.scroll(0,l),a.onComplete(0,l)}

19),u={scrollTo:function(t,e){i(t,e)}

20,registerScrollTrigger:function(t,i){for(var e=0;e<t.length;e++)t[e].addEventListener("click",function(t){t.preventDefault();var e=this.getAttribute("href"),c=e.substring(1),d=a(c);d&&(e!==document.location.hash&&(i.onComplete=function(t,e){var i,n,o,l,a,r,s;d.setAttribute("id",""),i=c,n=t,o=e,(s=document.createElement("a")).setAttribute("id",i),s.setAttribute("style","position:absolute;visibility:hidden;left:"+n+"px;top:"+o+"px;"),l=document.body,a=s,l.prepend?l.prepend(a):l.insertBefore(a,l.firstChild),document.location.hash=i,(r=s).remove?r.remove():r.parentNode.removeChild(r),d.setAttribute("id",c)}

21),u.scrollTo(d,i))}

22)}

23,init:function(t){if("1"!==t.getAttribute("data-lwptoc-initialized")){t.setAttribute("data-lwptoc-initialized","1");var a,r=t.getElementsByClassName("lwptoc_toggle_label")[0],s=t.getElementsByClassName("lwptoc_items")[0];if(r)r.addEventListener("click",function(t){var e,i,n,o,l;t.preventDefault(),a=r.getAttribute("data-label"),r.setAttribute("data-label",r.innerHTML),r.innerHTML=a,l="lwptoc_items-visible",-1<(" "+s.className+" ").indexOf(" "+l+" ")?(o="lwptoc_items-visible",(n=s).className=(" "+n.className+" ").replace(" "+o+" ","").trim(),c(s,"close")):(i="lwptoc_items-visible",(e=s).className=e.className.trim()+" "+i,c(s,"open"))}

24);"1"===t.getAttribute("data-smooth-scroll")&&u.registerScrollTrigger(s.getElementsByTagName("A"),{offset:t.getAttribute("data-smooth-scroll-offset")}

25)}

26}

27,globalInit:function(){for(var t=document.getElementsByClassName("lwptoc"),e=0;e<t.length;e++)u.init(t[e])}

28}

29;window.lwptoc=u,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",u.globalInit):u.globalInit()}

30();