Файловый менеджер - Редактировать - /home/freeclou/optimyar/wp-content/plugins/elementor-extras/assets/lib/hc-sticky/hc-sticky.min.js
Назад
"use strict";!function(t,e){if("object"==typeof module&&"object"==typeof module.exports){if(!t.document)throw new Error("HC-Sticky requires a browser to run.");module.exports=e(t)}else"function"==typeof define&&define.amd?define("hcSticky",[],e(t)):e(t)}("undefined"!=typeof window?window:void 0,function(t){var e={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},o=function(){return function(t,e,o){console.warn("%cHC Sticky:%c "+o+"%c '"+t+"'%c is now deprecated and will be removed. Use%c '"+e+"'%c instead.","color: #fa253b","color: default","color: #5595c6","color: default","color: #5595c6","color: default")}}(),i=t.document,n=function n(s){var r=this,l=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("string"==typeof s&&(s=i.querySelector(s)),!s)return!1;l.queries&&o("queries","responsive","option"),l.queryFlow&&o("queryFlow","mobileFirst","option");var a={},c=n.Helpers,f=s.parentNode;"static"===c.getStyle(f,"position")&&(f.style.position="relative");var p=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c.isEmptyObject(t)&&!c.isEmptyObject(a)||(a=Object.assign({},e,a,t))},d=function(t){a=Object.assign({},e,t||{})},u=function(t){return t?a[t]:Object.assign({},a)},g=function(){return a.disable},m=function(){var e=a.responsive||a.queries;if(e){var o=t.innerWidth;if(d(l),a.mobileFirst)for(var i in e)o>=i&&!c.isEmptyObject(e[i])&&p(e[i]);else{var n=[];for(var s in e){var r={};r[s]=e[s],n.push(r)}for(var f=n.length-1;f>=0;f--){var u=n[f],g=Object.keys(u)[0];o<=g&&!c.isEmptyObject(u[g])&&p(u[g])}}}},v=function(t){var e=c.getCascadedStyle(t),o=c.getStyle(t),i={height:t.offsetHeight+"px",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight};return e.float&&(i.float=e.float||"none"),e.cssFloat&&(i.cssFloat=e.cssFloat||"none"),o.MozBoxSizing&&(i.MozBoxSizing=o.MozBoxSizing),i.width="auto"!==e.width?e.width:"border-box"===i.boxSizing||"border-box"===i.MozBoxSizing?t.offsetWidth+"px":o.width,i},h={css:{},position:null,stick:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c.hasClass(s,a.stickyClass)||(!1===y.isAttached&&y.attach(),h.position="fixed",s.style.position="fixed",s.style.left=y.offsetLeft+"px",s.style.width=y.width,void 0===t.bottom?s.style.bottom="auto":s.style.bottom=t.bottom+"px",void 0===t.top?s.style.top="auto":s.style.top=t.top+"px",s.classList?s.classList.add(a.stickyClass):s.className+=" "+a.stickyClass,a.onStart&&a.onStart.call(s,Object.assign({},a)))},release:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];if(t.stop=t.stop||!1,!0===t.stop||"fixed"===h.position||null===h.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(c.getStyle(s,"top"))||0)===t.top||void 0!==t.bottom&&(parseInt(c.getStyle(s,"bottom"))||0)===t.bottom)){!0===t.stop?!0===y.isAttached&&y.detach():!1===y.isAttached&&y.attach();var e=t.position||h.css.position;h.position=e,s.style.position=e,s.style.left=!0===t.stop?h.css.left:y.positionLeft+"px",s.style.width="absolute"!==e?h.css.width:y.width,void 0===t.bottom?s.style.bottom=!0===t.stop?"":"auto":s.style.bottom=t.bottom+"px",void 0===t.top?s.style.top=!0===t.stop?"":"auto":s.style.top=t.top+"px",s.classList?s.classList.remove(a.stickyClass):s.className=s.className.replace(new RegExp("(^|\\b)"+a.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),a.onStop&&a.onStop.call(s,Object.assign({},a))}}},y={el:i.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){y.el.className="sticky-spacer";for(var t in h.css)y.el.style[t]=h.css[t];y.el.style["z-index"]="-1";var e=c.getStyle(s);y.offsetLeft=c.offset(s).left-(parseInt(e.marginLeft)||0),y.positionLeft=c.position(s).left,y.width=c.getStyle(s,"width")},attach:function(){f.insertBefore(y.el,s),y.isAttached=!0},detach:function(){y.el=f.removeChild(y.el),y.isAttached=!1}},b=void 0,S=void 0,w=void 0,k=void 0,E=void 0,x=void 0,L=void 0,T=void 0,j=void 0,O=void 0,C=void 0,z=void 0,N=void 0,H=void 0,R=void 0,A=void 0,B=void 0,I=void 0,q=function(){h.css=v(s),y.init(),b=!(!a.stickTo||!("document"===a.stickTo||a.stickTo.nodeType&&9===a.stickTo.nodeType||"object"==typeof a.stickTo&&a.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),S=a.stickTo?b?i:"string"==typeof a.stickTo?i.querySelector(a.stickTo):a.stickTo:f,I=function(){var t=s.offsetHeight+(parseInt(h.css.marginTop)||0)+(parseInt(h.css.marginBottom)||0),e=(R||0)-t;return e>=-1&&e<=1?R:t},R=I(),B=function(){return b?Math.max(i.documentElement.clientHeight,i.body.scrollHeight,i.documentElement.scrollHeight,i.body.offsetHeight,i.documentElement.offsetHeight):S.offsetHeight},k=B(),E=b?0:c.offset(S).top,x=a.stickTo?b?0:c.offset(f).top:E,L=t.innerHeight,A=s.offsetTop-(parseInt(h.css.marginTop)||0),w=a.innerSticker?"string"==typeof a.innerSticker?i.querySelector(a.innerSticker):a.innerSticker:null,T=isNaN(a.top)&&a.top.indexOf("%")>-1?parseFloat(a.top)/100*L:a.top,j=isNaN(a.bottom)&&a.bottom.indexOf("%")>-1?parseFloat(a.bottom)/100*L:a.bottom,O=w?w.offsetTop:a.innerTop?a.innerTop:0,C=isNaN(a.bottomEnd)&&a.bottomEnd.indexOf("%")>-1?parseFloat(a.bottomEnd)/100*L:a.bottomEnd,z=E-T+O+A},F=t.pageYOffset||i.documentElement.scrollTop,M=0,D=void 0,P=function(){R=I(),k=B(),N=E+k-T-C,H=R>L;var e=t.pageYOffset||i.documentElement.scrollTop,o=c.offset(s).top,n=o-e,r=void 0;D=e<F?"up":"down",M=e-F,F=e,e>z?N+T+(H?j:0)-(a.followScroll&&H?0:T)<=e+R-O-(R-O>L-(z-O)&&a.followScroll&&(r=R-L-O)>0?r:0)?h.release({position:"absolute",bottom:x+f.offsetHeight-N-T}):H&&a.followScroll?"down"===D?n+R+j<=L+.9?h.stick({bottom:j}):"fixed"===h.position&&h.release({position:"absolute",top:o-T-z-M+O}):Math.ceil(n+O)<0&&"fixed"===h.position?h.release({position:"absolute",top:o-T-z+O-M}):o>=e+T-O&&h.stick({top:T-O}):h.stick({top:T-O}):h.release({stop:!0})},W=!1,V=!1,U=function(){W&&(c.event.unbind(t,"scroll",P),W=!1)},Y=function(){return null===s.offsetParent||"none"===c.getStyle(s,"display")?void U():(q(),R>k?void U():(P(),void(W||(c.event.bind(t,"scroll",P),W=!0))))},$=function(){s.style.position="",s.style.left="",s.style.top="",s.style.bottom="",s.style.width="",s.classList?s.classList.remove(a.stickyClass):s.className=s.className.replace(new RegExp("(^|\\b)"+a.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),h.css={},h.position=null,!0===y.isAttached&&y.detach()},Q=function(){if($(),m(),g())return void U();Y()},X=function(){a.onBeforeResize&&a.onBeforeResize.call(s,Object.assign({},a)),Q(),a.onResize&&a.onResize.call(s,Object.assign({},a))},G=a.resizeDebounce?c.debounce(X,a.resizeDebounce):X,J=function(t){p(t),l=Object.assign({},l,t||{}),Q()},K=function(){V&&(c.event.unbind(t,"resize",G),V=!1),U()},Z=function(){K(),$()},_=function(){if(V||(c.event.bind(t,"resize",G),V=!0),m(),g())return void U();Y()};this.options=u,this.refresh=Q,this.update=J,this.attach=_,this.detach=K,this.destroy=Z,this.triggerMethod=function(t,e){"function"==typeof r[t]&&r[t](e)},this.reinit=function(){o("reinit","refresh","method"),Q()},p(l),_(),c.event.bind(t,"load",Q)};return void 0!==t.jQuery&&function(){var e=t.jQuery;e.fn.extend({hcSticky:function(t,o){return this.length?"options"===t?e.data(this.get(0),"hcSticky").options():this.each(function(){var i=e.data(this,"hcSticky");i?i.triggerMethod(t,o):(i=new n(this,t),e.data(this,"hcSticky",i))}):this}})}(),t.hcSticky=t.hcSticky||n,n}),function(t){var e=t.hcSticky,o=t.document;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,o;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),n=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),o=0;o<n;){var s;o in i&&(s=i[o],t.call(e,s,o,i)),o++}});var i=function(){function e(e){var o=t.event;return o.target=o.target||o.srcElement||e,o}var i=o.documentElement,n=function(){};i.addEventListener?n=function(t,e,o){t.addEventListener(e,o,!1)}:i.attachEvent&&(n=function(t,o,i){t[o+i]=i.handleEvent?function(){var o=e(t);i.handleEvent.call(i,o)}:function(){var o=e(t);i.call(t,o)},t.attachEvent("on"+o,t[o+i])});var s=function(){};return i.removeEventListener?s=function(t,e,o){t.removeEventListener(e,o,!1)}:i.detachEvent&&(s=function(t,e,o){t.detachEvent("on"+e,t[e+o]);try{delete t[e+o]}catch(i){t[e+o]=void 0}}),{bind:n,unbind:s}}(),n=function(t,e,o){var i=void 0;return function(){var n=this,s=arguments,r=function(){i=null,o||t.apply(n,s)},l=o&&!i;clearTimeout(i),i=setTimeout(r,e),l&&t.apply(n,s)}},s=function(e,i){return t.getComputedStyle?i?o.defaultView.getComputedStyle(e,null).getPropertyValue(i):o.defaultView.getComputedStyle(e,null):e.currentStyle?i?e.currentStyle[i.replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]:e.currentStyle:void 0},r=function(t){for(var e in t)return!1;return!0},l=function(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},a=function(e){var i=e.getBoundingClientRect(),n=t.pageYOffset||o.documentElement.scrollTop,s=t.pageXOffset||o.documentElement.scrollLeft;return{top:i.top+n,left:i.left+s}},c=function(t){var e=t.offsetParent,o=a(e),i=a(t),n=s(e),r=s(t);return o.top+=parseInt(n.borderTopWidth)||0,o.left+=parseInt(n.borderLeftWidth)||0,{top:i.top-o.top-(parseInt(r.marginTop)||0),left:i.left-o.left-(parseInt(r.marginLeft)||0)}},f=function(e){var i=e.cloneNode(!0);i.style.display="none",Array.prototype.slice.call(i.querySelectorAll('input[type="radio"]')).forEach(function(t){t.removeAttribute("name")}),e.parentNode.insertBefore(i,e.nextSibling);var n=void 0;i.currentStyle?n=i.currentStyle:t.getComputedStyle&&(n=o.defaultView.getComputedStyle(i,null));var s={};for(var r in n)!isNaN(r)||"string"!=typeof n[r]&&"number"!=typeof n[r]||(s[r]=n[r]);if(Object.keys(s).length<3){s={};for(var r in n)isNaN(r)||(s[n[r].replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]=n.getPropertyValue(n[r]))}if(s.margin||"auto"!==s.marginLeft?s.margin||s.marginLeft!==s.marginRight||s.marginLeft!==s.marginTop||s.marginLeft!==s.marginBottom||(s.margin=s.marginLeft):s.margin="auto",!s.margin&&"0px"===s.marginLeft&&"0px"===s.marginRight){var l=e.offsetLeft-e.parentNode.offsetLeft,a=l-(parseInt(s.left)||0)-(parseInt(s.right)||0),c=e.parentNode.offsetWidth-e.offsetWidth-l-(parseInt(s.right)||0)+(parseInt(s.left)||0),f=c-a;0!==f&&1!==f||(s.margin="auto")}return i.parentNode.removeChild(i),i=null,s};e.Helpers={isEmptyObject:r,debounce:n,hasClass:l,offset:a,position:c,getStyle:s,getCascadedStyle:f,event:i}}(window);
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.04 |
proxy
|
phpinfo
|
Настройка