05-tilda-export-backup/Tilda_ Последний приказ_files/tilda-scripts-3.0.min.js

2 lines
22 KiB
JavaScript
Raw Normal View History

2025-10-29 16:50:39 +00:00
function t_onReady(t){"loading"!=document.readyState?t():document.addEventListener("DOMContentLoaded",t)}function t_addClass(t,e){document.body.classList?t.classList.add(e):t.className+=(t.className?" ":"")+e}function t_removeClass(t,e){document.body.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\s+)"+e+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")}function t_removeEl(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function t_outerWidth(t){var e=getComputedStyle(t),n=e.width,o=e.marginLeft,i=e.marginRight;return"auto"===n&&(n=0),"auto"===o&&(o=0),"auto"===i&&(i=0),n=parseInt(n)+parseInt(o)+parseInt(i)}var version,version;(window.isSearchBot=!1,/Bot/i.test(navigator.userAgent)&&(window.isSearchBot=!0),window.isMobile=!1,window.$isMobile=!1,/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(window.isMobile=!0,window.$isMobile=!0),window.isTablet=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/i.test(navigator.userAgent),window.isiOS=!1,/iPhone|iPad|iPod/i.test(navigator.userAgent)&&(window.isiOS=!0),window.isiOSChrome=!!navigator.userAgent.match("CriOS"),window.isFirefox=/firefox/i.test(navigator.userAgent),window.isOpera=!!window.opr&&!!window.opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,window.isiOSVersion="",window.isiOS)&&(null!==(version=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&(window.isiOSVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]));(window.isSafari=!1,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&(window.isSafari=!0),window.isIE=!!document.documentMode,window.isSafariVersion="",window.isSafari)&&(null!==(version=navigator.appVersion.match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/))&&(window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]));function t_throttle(t,e,n){var o,i;return e||(e=250),function(){var r=n||this,a=+new Date,l=arguments;o&&a<o+e?(clearTimeout(i),i=setTimeout((function(){o=a,t.apply(r,l)}),e)):(o=a,t.apply(r,l))}}function t_onFuncLoad(t,e,n){var o=15e3,i=t_checkIsEditMode(),r=function t(){return!i||i&&t_checkEditorIsReady()},a=function t(e){return"function"==typeof window[e]||"object"==typeof window[e]};if(a(t)&&r())e();else{var l=Date.now(),d=new Error(t+" is undefined"),s=function t(){throw d};setTimeout((function i(){var d=Date.now();a(t)&&r()?e():("complete"===document.readyState&&d-l>o&&!a(t)&&s(),setTimeout(i,n||100))}))}}function t_checkIsEditMode(){var t=!1,e=document.getElementById("allrecords");if(!e)return!1;var n=e.getAttribute("data-tilda-mode");return!!(t=n&&"edit"===n)}function t_checkEditorIsReady(){var t=!1;if(!t_checkIsEditMode())return!1;var e=document.body.getAttribute("data-ready-status");return!!(t=e&&"ready"===e)}function t_scrollBarWidthCompensator__setObject(){window.scrollBarWidthCompensator={};var t=window.scrollBarWidthCompensator;t.isInited=!1,t.scrollBarWidth=Math.abs(window.innerWidth-document.documentElement.clientWidth),t.delay=0,t.cancelTimeout=null;var e=["t450","t282__container","t282__container__bg_opened","t282__menu__container","t830m","t830__panel","t451m","t204__menu","tn-atom__sbs-anim-wrapper"],n=document.querySelectorAll("*");n=Array.prototype.filter.call(n,(function(t){return!t.closest(".t1093")&&!e.some((function(e){return t.classList.contains(e)}))})),t.fixedElements=[],Array.prototype.forEach.call(n,(function(e){if(!e.classList.contains("t975")){var n=window.getComputedStyle(e),o=n.getPropertyValue("position"),i=n.getPropertyValue("width"),r=n.getPropertyValue("height"),a="100%"===i||i===window.innerWidth+"px"||i===window.innerWidth-t.scrollBarWidth+"px"||"100vw"===i,l="100%"===r||r===window.innerHeight+"px"||r===window.innerHeight-t.scrollBarWidth+"px"||"auto"===r||"100vh"===r;("fixed"===o||"absolute"===o&&a&&!l)&&t.fixedElements.push({el:e,computedStyle:n})}}))}function t_scrollBarWidthCompensator__init(){if(!window.isMobile){window.scrollBarWidthCompensator||t_scro