Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/themify-builder/js/modules/toc.min.js
Ðазад
((g,b,C)=>{"use strict";let x=!1;const w=new IntersectionObserver((a,e)=>{for(let s=a.length-1;-1<s;--s){let e=a[s].target.id,t=b.querySelectorAll('.module-toc a[href="#'+CSS.escape(encodeURI(e))+'"]'),l=!0===a[s].isIntersecting;for(let e=t.length-1;-1<e;--e)t[e].parentNode.classList.toggle("tb_toc_active",l)}},{threshold:[0,1]}),l=t=>{if(tbLocalScript){const l=tbLocalScript.breakpoints;let e="desktop";return t<=l.mobile?e="mobile":t<=l.tablet[1]?e="tablet":t<=l.tablet_landscape[1]&&(e="tablet_landscape"),e}},v=e=>{let t=e.dataset.bp;return!(!t||"n"===t)&&(t="tl"===t?"tablet_landscape":"t"===t?"tablet":"mobile",t=tbLocalScript.breakpoints[t],(t=Array.isArray(t)?t[1]:t)>=g.w)},y=e=>{let t=e.target?.closest(".tf_fa,a");if(t)if("A"===t.tagName){const a=t.getAttribute("href").replace("#",""),i=b.querySelector("#"+CSS.escape(decodeURI(a))+".tb_toc_el");i&&(e.preventDefault(),!1===g.is_builder_active)&&requestAnimationFrame(()=>{g.lazyScroll(g.convert(g.selectWithParent("[data-lazy]",i.closest(".module_row"))).reverse(),!0).finally(()=>{const l=i.getBoundingClientRect(),s=window.scrollY;g.scrollTo(l.top+s-10,null,()=>{let e=b.tfId("headerwrap"),t=10;e&&e.classList.contains("fixed-header")&&(t+=e.getBoundingClientRect().bottom),g.scrollTo(l.top+s-t),window.location.hash=a})})})}else if(t=t.closest(".tb_toc_head,.tb_toc_cic_close,.tb_toc_cic")){const l=t.parentNode,s=l.tfTag("ul")[0],o="0px"===getComputedStyle(s).getPropertyValue("max-height"),c=t.classList.contains("tb_toc_head")?"tb_tc_close":"tb_tc_sub_close",n=s.style,r=(n.maxHeight="none",s.clientHeight),d=o?r:0,h=o?0:r;n.maxHeight=h+"px",s.tfOn("transitionend",e=>{l.classList.toggle(c,!o),0<d&&(n.maxHeight=""),n.padding=0<d?"":"0px"},{passive:!0,once:!0}),requestAnimationFrame(()=>{n.maxHeight=d+"px",n.padding=0<d?"":"0px"})}};let s=l(g.w);g.on("builder_load_module_partial tb_toc",(l,e)=>{if(!0!==e||l.classList.contains("module-toc"))for(let e=g.selectWithParent("module-toc",l),t=e.length-1;-1<t;--t)(l=>{let i=l.dataset.tags,o=l.dataset.excl,e=l.dataset.cont||"b",t=l.dataset.sel;if(i){let s;if("cust"===e){if(t){const a=(t=t.trim()).slice(-1);if(t=","!==a&&"."!==a&&"#"!==a?t:t.slice(0,-1))try{s=b.querySelectorAll(t)}catch(e){}}}else{if("b"===e||"b_c"===e){if(s=l.closest(".themify_builder"),"b_c"===e){let e=s;while(1)if(null===(e=e.parentNode.closest(".themify_builder")))break;null===e&&(e=s.parentNode);while(null!==e&&null===e.nextElementSibling&&null===e.previousElementSibling)e=e.parentNode;null!==e&&(s=e)}}else"r"===e||"c"===e?(s=l.closest(".module_column"),"r"===e&&(s=s.closest(".module_row"))):"doc"===e&&(s=b);s=s&&[s]}if(0<s?.length){i=i.replace(/\|/g,",");let a="#comments,.tf_carousel,.loops-wrapper,.module-accordion,.widget-title,.module-tab,.module-toc,.module-gallery,.module-image,.nav,.module-service-menu";l.dataset.ex_m&&(a+=",.module-title");const c=new Set,n=[],r=l.tfClass("tpl_toc_ic")[0],d=l.tfClass("tpl_toc_cic")[0],h=l.tfClass("tpl_toc_cic_close")[0],p=0<l.dataset.min?parseInt(l.dataset.min):2,_=parseInt(l.dataset.maxh)||32,m=parseInt(l.dataset.maxt)||0,f=(i,o)=>{const c=b.createDocumentFragment(),e=b.createElement("ul");e.className="tb_toc_lv_"+o+" tf_w tf_box",1===o&&v(l)&&(e.style.maxHeight="0",l.classList.add("tb_tc_close"));for(let a=0,e=i.length;a<e;++a){let e=b.createElement("li"),t=b.createElement("a"),l=b.createDocumentFragment(),s=i[a];t.href="#"+s.id,t.textContent=s.text,r!==C&&l.appendChild(r.content.cloneNode(!0)),l.appendChild(t),0<s.childs.length&&(++o,d!==C&&l.appendChild(d.content.cloneNode(!0)),h!==C&&l.appendChild(h.content.cloneNode(!0)),l.appendChild(f(s.childs,o))),e.appendChild(l),c.appendChild(e)}return e.appendChild(c),e};if(o){const u=(o=o.trim()).slice(-1);","!==u&&"."!==u&&"#"!==u||(o=o.slice(0,-1))}for(let e=0,t=s.length;e<t;++e){let l=s[e].querySelectorAll(i);for(let e=0,t=l.length;e<t;++e){let s=l[e];if(!(c.has(s)||s.closest(a)||o&&(s.matches(o)||s.closest(o)))&&(c.add(s),0<s.offsetWidth)&&0<s.offsetHeight&&0<s.getClientRects().length){let t=s.textContent.trim();if(t){0<m&&t.length>m&&(t=t.substr(0,m));let e=s.dataset.isSet?null:s.id,l=e||t.toLowerCase();if(l=l.replace(/(\r\n|\n|\r)/gm," ").replace(/[`’~!@#$%^&*()|+\=?;:'",.<>\{\}\[\]\\\/]/gi,"").replace(/\s\s+/gu," "),!e){if(!0===g.is_builder_active&&(s.dataset.isSet=!0),(l=l.replace(/\s/gu,"-")).length>_){if(1<(l=l.split("-")).length)for(let e=l.length-1;-1<e;--e)if(l.splice(e,1),1===e||l.join("-").length<=_)break;(l=l.join("-")).length>_&&(l=l.substring(0,_))}let e=2,t=l=!1===isNaN(l[0])?"tb-"+l:l;while(null!==b.tfId(l))l=t+"-"+e,++e}s.id=l,s.classList.add("tb_toc_el"),n.push({id:encodeURIComponent(l),text:t,h:+s.nodeName.replace("H",""),childs:[]}),!0!==g.is_builder_active&&w.observe(s)}}}}if(c.clear(),n.length>=p){if(l.classList.contains("tb_toc_tree")){let l=n.length;for(let t=1;t<l;++t)if(1!==n[t].h)if(n[t-1].h<n[t].h)n[t-1].childs.push(n[t]),n[t].delete=!0;else for(let e=t-1;-1<e;--e)if(n[e].h<n[t].h){n[e].childs.push(n[t]),n[t].delete=!0;break}for(let e=l-1;-1<e;--e)!0===n[e].delete&&n.splice(e,1)}requestAnimationFrame(()=>{const e=l.tfClass("tb_toc_lv_1")[0],t=!1===x?window.location.hash:"";x=!0,e?.remove(),l.appendChild(f(n,1)),l.tfOn("click",y).classList.remove("tf_hide"),!1===g.is_builder_active&&""!==t&&"#"!==t&&l.querySelector('a[href="#'+t.replace("#","")+'"]')?.click()})}else requestAnimationFrame(()=>{l.classList.add("tf_hide")})}}})(e[t])}).on("infiniteloaded",()=>{g.trigger("tb_toc")}).on("tfsmartresize",t=>{requestAnimationFrame(()=>{const e=l(t.w);if(e!==s){s=e;for(let l=b.tfClass("tb_toc_lv_1"),s=l.length-1;-1<s;--s){let e=l[s].parentNode,t=v(e);l[s].style.maxHeight=t?"0":"",e.classList.toggle("tb_tc_close",t)}}})})})(Themify,document,void 0);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка