core/1/iiko_files/tilda-zero-1.1.min.js

1 line
24 KiB
JavaScript
Raw Normal View History

2023-04-09 19:52:26 +05:00
function t396_init(t){var e,i,n,o,a=document.getElementById("rec"+t),r=a?a.querySelector(".t396"):null,d=a?a.querySelector(".t396__artboard"):null;d&&(t396_initTNobj(t,d),o=t396_detectResolution(t),e=document.getElementById("allrecords"),window.tn_window_width=document.documentElement.clientWidth,window.tn["ab"+t].scaleFactor=parseFloat((window.tn_window_width/o).toFixed(3)),window.tn_scale_factor=parseFloat((window.tn_window_width/o).toFixed(3)),t396_switchResolution(t,o),t396_updateTNobj(t),t396_artboard_build("",t),i="ontouchend"in document,window.addEventListener("resize",function(){tn_console(">>>> t396: Window on Resize event >>>>"),d.classList.add("t396_resizechange"),d&&d.classList.contains("t396_fullscreenchange")?d.classList.remove("t396_fullscreenchange"):t396_waitForFinalEvent(function(){(!window.t396__isMobile&&!i||document.documentElement.clientWidth!==window.tn_window_width)&&(t396_doResize(t),d.classList.remove("t396_resizechange"))},500,"resizeruniqueid"+t)}),window.addEventListener("orientationchange",function(){tn_console(">>>> t396: Orient change event >>>>"),t396_waitForFinalEvent(function(){t396_doResize(t)},600,"orientationuniqueid"+t)}),window.addEventListener("load",function(){t396_allelems__renderView(d);var t=d?window.getComputedStyle(d).getPropertyValue("overflow"):"";"function"==typeof t_lazyload_update&&"auto"===t&&d&&d.addEventListener("scroll",t_throttle(function(){var t=e?e.getAttribute("data-tilda-lazy"):null;"y"!==window.lazy&&"yes"!==t||t_onFuncLoad("t_lazyload_update",function(){t_lazyload_update()})},500)),""!==window.location.hash&&"visible"===t&&(d&&(d.style.overflow="hidden"),setTimeout(function(){d&&(d.style.overflow="visible")},1))}),d&&d.addEventListener("fullscreenchange",function(){d.classList.add("t396_fullscreenchange")}),document.querySelector(".t830")&&window.addEventListener("load",function(){["t830__allrecords_padd","t830__allrecords_padd-small"].some(function(t){return e.classList.contains(t)})?t396_doResize(t):e.addEventListener("allRecPaddingInit",function(){t396_doResize(t)})}),a&&r&&d&&"yes"===a.getAttribute("data-connect-with-tab")&&r.addEventListener("displayChanged",function(){t396_allelems__renderView(d),t396_doResize(t)}),setTimeout(function(){a&&a.closest("#allrecordstable")&&r&&d&&r.addEventListener("displayChanged",function(){t396_allelems__renderView(d),t396_doResize(t)})},1e3),o=!!document.querySelector(".t635__textholder"),a&&o&&r&&d&&r.addEventListener("animationInited",function(){t396_allelems__renderView(d),t396_doResize(t)}),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&r&&r.classList.add("t396_safari"),o="window"===t396_ab__getFieldValue(d,"upscale"),n=e?"edit"===e.getAttribute("data-tilda-mode"):null,o&&!n&&t_onFuncLoad("t396_scaleBlock",function(){t396_scaleBlock(t)}),n||"y"!==t396_ab__getFieldValue(d,"fixed")||t396_ab__updatePosOnScroll(d,a),n&&r&&d&&(o=d.getAttribute("data-artboard-ovrflw"),r.style.position="relative",r.style.zIndex="auto"===o||"visible"===o?"2":"1"))}function t396_isOnlyScalableBrowser(){var t=-1!==navigator.userAgent.search("Firefox"),e=!!window.opr&&!!window.opr.addons||!!window.opera||-1!==navigator.userAgent.indexOf(" OPR/");return t||e}function t396_doResize(t){var e=t396_isOnlyScalableBrowser(),i=document.getElementById("rec"+t),n=document.getElementById("allrecords"),o=t396_detectResolution(t),e=(t396_removeElementFromDOM(i?i.querySelector(".t396__scale-style"):null),e?(e=i?i.querySelectorAll(".tn-atom"):[],Array.prototype.forEach.call(e,function(t){var e=t.closest(".tn-atom__scale-wrapper"),i=e?e.parentNode:null;i&&i.removeChild(e),i&&i.appendChild(t)})):(e=i?i.querySelectorAll(".t396__elem"):[],Array.prototype.forEach.call(e,function(t){t.style.zoom="";t=t.querySelector(".tn-atom");t&&(t.style.transformOrigin="")})),i?i.querySelector(".t396__artboard"):null),i="ab"+t,a=e?e.clientWidth:0,i=(window.tn_window_width=document.documentElement.clientWidth,window.tn[i].scaleFactor=parseFloat((window.tn_window_width/o).toFixed(3)),window.tn_scale_factor=parseFloat((window.tn_window_width/o).toFixed(3)),window.tn_