Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/modules/lax.min.js
Назад
((c,p,h,o)=>{"use strict";let m=0,u,x,l;const y={opacity:(t,e)=>{t.opacity=e},translate:(t,e)=>{t.transform+=` translate(${e}px, ${e}px)`},"translate-x":(t,e)=>{t.transform+=` translateX(${e}px)`},"translate-y":(t,e)=>{t.transform+=` translateY(${e}px)`},scale:(t,e)=>{t.transform+=` scale(${e})`},"scale-x":(t,e)=>{t.transform+=` scaleX(${e})`},"scale-y":(t,e)=>{t.transform+=` scaleY(${e})`},skew:(t,e)=>{t.transform+=` skew(${e}deg, ${e}deg)`},"skew-x":(t,e)=>{t.transform+=` skewX(${e}deg)`},"skew-y":(t,e)=>{t.transform+=` skewY(${e}deg)`},rotate:(t,e)=>{t.transform+=` rotate(${e}deg)`},"rotate-x":(t,e)=>{t.transform+=` rotateX(${e}deg)`},"rotate-y":(t,e)=>{t.transform+=` rotateY(${e}deg)`},"hue-rotate":(t,e)=>{t.filter+=` hue-rotate(${e}deg)`},blur:(t,e)=>{t.filter+=` blur(${e}px)`}},b=[],i=(t,e)=>{let a=0;for(;t[a][0]<=e&&void 0!==t[a+1];)a+=1;const l=t[a][0],r=void 0===t[a-1]?l:t[a-1][0],o=t[a][1],s=void 0===t[a-1]?o:t[a-1][1],i=Math.min(Math.max((e-r)/(l-r),0),1);return i*(o-s)+s},g=t=>"("===t[0]?Function("return "+t)():parseFloat(t),w=t=>{const{originalStyle:e,top:a,transforms:l,el:r}=t,o={transform:e.transform,filter:e.filter},s=a?a-m:m;for(let t in l)y[t](o,i(l[t],s));if(0===o.opacity)r.style.opacity=0;else for(let t in o)r.style[t]=o[t]},v=()=>{for(let t=b.length-1;-1<t;--t)w(b[t])};c.on("tf_lax_init",e=>{const s=c.h,i=["scale","rotate","blur","opacity","translate-x","translate-y"],n=i.length-1;let d=p.body.getBoundingClientRect().top,f=null;for(let t=e.length-1;-1<t;--t){let o=e[t];if(o.hasAttribute("data-lax")){o.removeAttribute("data-lax");let l=o.cloneNode(!1),t=getComputedStyle(o),e=l.dataset.boxPosition,a=t.getPropertyValue("z-index");if(l.className="tf_lax_done tf_rel",l.removeAttribute("style"),a&&"auto"!==a&&(l.style.zIndex=a),e&&(l.style.transformOrigin=e,o.removeAttribute("data-box-position")),l.hasAttribute("data-lax-opacity")&&(l.className+=" tf_opacity",o.removeAttribute("data-lax-opacity")),l.hasAttribute("data-lax-rotate")&&(l.style.width=t.getPropertyValue("width"),null===f)&&(f=new ResizeObserver((l,t)=>{for(let a=l.length-1;-1<a;--a){let t=l[a].target.parentNode,e=parseInt(l[a].contentRect.width);parseInt(t.style.width)!==e&&(t.style.width=e+"px")}})).observe(o),l.hasAttribute("data-lax-scale")){let t=o.closest(".entry-content");null!==t&&t.classList.add("themify-no-overflow-x"),!0!==u&&(u=!0,p.body.classList.add("themify-no-overflow-x"),d=p.body.getBoundingClientRect().top,p.tfId("tb_inline_styles").textContent+=".themify-no-overflow-x{overflow-x:hidden}")}let r=o.getBoundingClientRect().top-d;if(130+r<s){r=r<0?s:Math.floor(r),l.dataset.laxAnchorTop=1;for(let t=n;-1<t;--t){let e="data-lax-"+i[t],a=l.getAttribute(e);if(a){let t=(a=a.split(","))[1].split(" ");l.setAttribute(e,t[0]+" "+a[0].split(" ")[1]+","+r+" "+t[1])}}}o.before(l),l.appendChild(o),(l=>{const r=l.getBoundingClientRect(),o={el:l,originalStyle:{transform:l.style.transform,filter:l.style.filter},transforms:{}};if(l.attributes["data-lax-anchor-top"]||(o.top=Math.floor(r.top)+h.scrollY,l.removeAttribute("data-lax-anchor-top")),l.attributes["data-lax-optimize"]){const t=l.getBoundingClientRect();l.setAttribute("data-lax-opacity",`${-t.height-1} 0, ${-t.height} 1, ${c.h} 1, ${c.h+1} 0`)}for(let t=l.attributes.length-1;-1<t;--t){let e=l.attributes[t],a=e.name;if(0===a.indexOf("data-lax")&&(a=a.replace("data-lax-",""),void 0!==y[a])){let t=e.value.replace(/\s+/g," ").replaceAll("vw",c.w).replaceAll("vh",c.h).replaceAll("elh",r.height).replaceAll("elw",r.width);o.transforms[a]=t.split(",").map(t=>t.trim().split(" ").map(g)).sort((t,e)=>t[0]-e[0])}}b.push(o),w(o)})(l)}}if(!0!==l){l=!0;const a=()=>{if(!0!==c.is_builder_active){const t=h.scrollY;m!==t&&(m=t,v()),requestAnimationFrame(a)}},t=()=>{requestAnimationFrame(a)};h.tfOn("scroll",t,{once:!0,passive:!0}),c.on("tfsmartresize",t=>{const e=o.breakpoints.tablet_landscape,a=o.breakpoints.tablet,l=o.breakpoints.mobile;let r="desktop";if(t.w<=l?r="mobile":t.w<=a[1]?r="tablet":t.w<=e[1]&&(r="tablet_landscape"),x!==r){x=r;for(let l=b.length-1;-1<l;--l){let e=getComputedStyle(b[l].el.firstChild),t=e.getPropertyValue("z-index"),a=b[l].el.style;if(a.zIndex!==t&&(a.zIndex=t),b[l].el.hasAttribute("data-lax-rotate")){let t=e.getPropertyValue("width");a.width!==t&&(a.width=t)}}}v(m)})}})})(Themify,document,window,tbLocalScript);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка