"use strict";function addBackToTop(){function o(){t()>=z?R&&(D.className="",R=!1):R||(D.className="hidden",R=!0)}function t(){return E.scrollTop||A&&document.documentElement.scrollTop||0}function e(o){E.scrollTop=o,A&&(document.documentElement.scrollTop=o)}var n,i,d,r,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=c.backgroundColor,s=void 0===a?"#000":a,l=c.cornerOffset,u=void 0===l?20:l,m=c.diameter,p=void 0===m?56:m,h=c.ease,b=void 0===h?function(o){return.5*(1-Math.cos(Math.PI*o))}:h,v=c.id,f=void 0===v?"back-to-top":v,x=c.innerHTML,g=void 0===x?'':x,w=c.onClickScrollTo,y=void 0===w?0:w,k=c.scrollContainer,E=void 0===k?document.body:k,T=c.scrollDuration,C=void 0===T?100:T,M=c.showWhenScrollTopIs,z=void 0===M?1:M,L=c.size,B=void 0===L?p:L,H=c.textColor,I=void 0===H?"#fff":H,N=c.zIndex,S=void 0===N?1:N,q=E===document.body,A=q&&document.documentElement;n=Math.round(.35*B),i=Math.round(.2*B),d="#"+f+"{background:"+s+";-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;bottom:"+u+"px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);-moz-box-shadow:0 2px 5px 0 rgba(0,0,0,.26);box-shadow:0 2px 5px 0 rgba(0,0,0,.26);color:"+I+";cursor:pointer;display:block;height:"+B+"px;opacity:1;outline:0;position:fixed;right:"+u+"px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-transition:bottom .2s,opacity .2s;-o-transition:bottom .2s,opacity .2s;-moz-transition:bottom .2s,opacity .2s;transition:bottom .2s,opacity .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:"+B+"px;z-index:"+S+"}#"+f+" svg{display:block;fill:currentColor;height:"+n+"px;margin:"+i+"px auto 0;width:"+n+"px}#"+f+".hidden{bottom:-"+B+"px;opacity:0}",(r=document.createElement("style")).appendChild(document.createTextNode(d)),document.head.insertAdjacentElement("afterbegin",r);var D=function(){var o=document.createElement("div");return o.id=f,o.className="hidden",o.innerHTML=g,o.addEventListener("click",function(o){o.preventDefault(),function(){var o="function"==typeof y?y():y,n=window,i=n.performance,d=n.requestAnimationFrame;if(C<=0||void 0===i||void 0===d)return e(o);var r=i.now(),c=t(),a=c-o;d(function o(t){var n=Math.min((t-r)/C,1);e(c-Math.round(b(n)*a)),n<1&&d(o)})}()}),document.body.appendChild(o),o}(),R=!0;(q?window:E).addEventListener("scroll",o),o()}window.addEventListener("load",function(){var o=document.getElementById("back-to-top"),t=document.querySelector(".sticky-bottom"),e=document.querySelector(".fixed-bottom");o&&window.addEventListener("scroll",function(){if(t){var n=t.getBoundingClientRect();window.scrollY+window.innerHeight>document.body.scrollHeight-n.height?(o.style.position="fixed",o.style.bottom=n.height+15+"px"):(o.style.position="fixed",o.style.bottom="15px")}if(e){var i=e.getBoundingClientRect();o.style.position="fixed",o.style.bottom=i.height+15+"px"}})});