function t396_scaleBlock(e){var t=t396_detectResolution(e),l=document.getElementById("rec"+e);if(l){var a;"function"==typeof window.t396__getCurrentScaleFactor?a=t396__getCurrentScaleFactor(e):(a=window.tn&&window.tn["ab"+e]&&window.tn["ab"+e].scaleFactor)||(a=window.tn_scale_factor);var n=l.querySelector(".t396__artboard"),o=t396_scale__collectScaleData(n,a);if(n){var i=t396_ab__getFieldValue(n,"height"),r=Math.floor(i*a),s,c;if(t396_ab__getFieldValue(n,"height_vh")){var _=t396_ab__getFieldValue(n,"height"),d=t396_ab__getHeight(n),u=_*a;r=u>=d?u:d}if(t396_scale__updateArtboardState(n,r),0!==o.length)if(t396_isOnlyScalableBrowser())t396_scale__scaleIsOnlyScalableBlock(o);else{var m=o.filter((function(e){var t=e.elemType;return["text","button","widget"].includes(t)})),p=o.filter((function(e){var t;return"shape"===e.elemType})),h=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),f;h&&t396_scale__schedule__scaleTextElements(m),t396_scale__schedule__scaleShapeElements(p),o.forEach((function(e){var l=e.element,n=e.elementCore,o=e.elemType,i=["gallery","map"].includes(o),r="video"===o;"yes"===l.getAttribute("data-scale-off")||i||(l.style.zoom=a),i&&(l.style.zoom=null),"text"===o&&t<1200&&n&&!h&&(n.style.webkitTextSizeAdjust="auto"),n&&(n.style.transformOrigin="center")})),Array.from(n.querySelectorAll(":scope > .t396__elem, :scope > .t396__group")).forEach((function(e){var t;("left"!==t396_core__getFieldValue(e,"axisx")||"top"!==t396_core__getFieldValue(e,"axisy"))&&(t396_elem__renderViewOneField(e,"left"),t396_elem__renderViewOneField(e,"top"))}))}}}}function t396_scale__schedule__scaleTextElements(e){window.tn||(window.tn={}),window.tn.scheduledTextElementsForScale||(window.tn.scheduledTextElementsForScale=[]),window.tn.scheduledTextElementsForScale=window.tn.scheduledTextElementsForScale.concat(e),clearTimeout(window.tn.textElementsScaleTimer),window.tn.textElementsScaleTimer=setTimeout((function(){t396_scale__scaleTextElements(window.tn.scheduledTextElementsForScale),window.tn.scheduledTextElementsForScale=[]}),1)}function t396_scale__scaleTextElements(e){var t=t396__initFastDOM(),l=t396_scale__shouldKeepTextSizeAdjustNone();t.write((function(){e.forEach((function(e){e.elementCore.style.fontSize="",e.elementCore.style.webkitTextSizeAdjust="none",e.cachedZoom=e.element.style.zoom,e.scaleFactor<1&&(e.element.style.zoom="")}))})),t.read((function(){e.forEach((function(e){e.fieldFontSize=parseFloat(t396_elem__getFieldValue(e.element,"fontsize")),e.currentFontSize=parseFloat(getComputedStyle(e.elementCore).fontSize)}))})),t.write((function(){e.forEach((function(e){e.scaleFactor<1&&(e.element.style.zoom=e.cachedZoom);var t=!isNaN(e.fieldFontSize),a=Math.abs(e.currentFontSize-Math.round(e.currentFontSize)),n;if(t?e.fieldFontSize-e.currentFontSize>=1:a>.01){var o=t?e.fieldFontSize:e.currentFontSize*e.scaleFactor;e.elementCore.style.fontSize=Math.round(o*e.scaleFactor)+"px"}else e.elementCore.style.webkitTextSizeAdjust=l?"none":""}))}))}function t396_scale__shouldKeepTextSizeAdjustNone(){if("boolean"==typeof window.t396__shouldKeepTextSizeAdjustNone)return window.t396__shouldKeepTextSizeAdjustNone;var e;if(!(!window.t396__isMobile&&window.t396__isIPad)||!1===window.t396__clientRectIncludesZoom)return window.t396__shouldKeepTextSizeAdjustNone=!1,!1;var t=document.createElement("div");t.style.cssText="position:absolute;left:0;top:0;visibility:hidden;pointer-events:none;white-space:nowrap;zoom:2;",t.innerHTML='XX';var l=!1;try{document.body.appendChild(t);var a=t.children[0].getBoundingClientRect().height,n;l=t.children[1].getBoundingClientRect().height>1.01*a}catch(o){l=!1}return t.parentNode&&t.parentNode.removeChild(t),window.t396__shouldKeepTextSizeAdjustNone=l,l}function t396_scale__schedule__scaleShapeElements(e){window.tn||(window.tn={}),window.tn.scheduledShapeElementsForScale||(window.tn.scheduledShapeElementsForScale=[]),window.tn.scheduledShapeElementsForScale=window.tn.scheduledShapeElementsForScale.concat(e),clearTimeout(window.tn.shapeElementsScaleTimer),window.tn.shapeElementsScaleTimer=setTimeout((function(){t396_scale__scaleShapeElements(window.tn.scheduledShapeElementsForScale),window.tn.scheduledShapeElementsForScale=[]}),1)}function t396_scale__scaleShapeElements(e){var t=t396__initFastDOM();t.read((function(){e.forEach((function(e){var t=t396_elem__getFieldValue(e.element,"height");t=t396_elem__getHeight(e.element,t),t=t396_elem__convertPosition__Local__toAbsolute(e.element,"height",t);var l=t396_elem__getFieldValue(e.element,"width");l=t396_elem__getWidth(e.element,l),l=t396_elem__convertPosition__Local__toAbsolute(e.element,"width",l);var a=parseFloat(t396_elem__getFieldValue(e.element,"top"));a=t396_elem__convertPosition__Local__toAbsolute(e.element,"top",a);var n=parseFloat(t396_elem__getFieldValue(e.element,"left"));n=t396_elem__convertPosition__Local__toAbsolute(e.element,"left",n),e.shapeSize={top:a,left:n,width:l,height:t}}))}));var l=e.filter((function(e){return e.shapeSize.width<=2||e.shapeSize.height<=2}));t.read((function(){l.forEach((function(e){var t=window.getComputedStyle(e.elementCore);e.borderWidth=t.borderWidth,e.isImage="none"!==t.backgroundImage,e.isAnimated=e.element.getAttribute("data-animate-sbs-event")}))})),t.write((function(){l.forEach((function(e){if("0px"===e.borderWidth&&!e.isImage&&!e.isAnimated){e.element.style.removeProperty("zoom");var t=e.shapeSize.width*e.scaleFactor,l=e.shapeSize.height*e.scaleFactor,a=e.shapeSize.top*e.scaleFactor,n=e.shapeSize.left*e.scaleFactor;e.element.style.width=parseFloat(t)+"px",e.element.style.height=parseFloat(l)+"px",e.element.style.top=Math.round(a)+"px",e.element.style.left=Math.round(n)+"px",e.element.setAttribute("data-scale-off","yes")}}))}))}function t396_scale__collectScaleData(e,t){var l;return t396_scale__getElementsToScale(e).map((function(e){var l=e.querySelector(".tn-molecule, .tn-atom"),a=t396_scale__getElementType(e),n=t396_elem__getFieldValue(e,"container");if(n||"group"!==a||(n="grid"),l&&"grid"===n)return{element:e,elementCore:l,elemType:a,scaleFactor:t}})).filter(Boolean)}function t396_scale__scaleIsOnlyScalableBlock(e){e.forEach((function(e){var t=e.element,l=e.elementCore,a=e.elemType,n=l.closest(".tn-atom__scale-wrapper"),o=e.scaleFactor;n||(t396_scale__wrapElement(l,o,"tn-atom__scale-wrapper"),n=l.closest(".tn-atom__scale-wrapper")),t.style.zoom="",t396_scale__processBackdropFilter(t,l,n),t396_scale__processBackgroundForShape(t,l,a,o)}))}function t396_scale__getElementsToScale(e){return e?Array.prototype.slice.call(e.children).filter((function(e){return e&&(e.classList.contains("t396__elem")||e.classList.contains("t396__group"))})):[]}function t396_scale__updateArtboardState(e,t){e.classList.add("t396__artboard_scale");var l=e.getAttribute("data-artboard-recid"),a;if(!("hug"===e.getAttribute("data-artboard-heightmode"))){var n='";e.insertAdjacentHTML("beforeend",n)}}function t396_scale__wrapElement(e,t,l){if(e){var a=e.parentNode;if(a){var n=document.createElement("div");n.classList.add(l),n.style.transform="scale("+t+")",n.appendChild(e),a.appendChild(n)}}}function t396_scale__processBackdropFilter(e,t,l){"none"===e.style.backdropFilter&&(e.style.backdropFilter="");var a=getComputedStyle(e).backdropFilter;if(a){e.style.backdropFilter="none",l.style.backdropFilter=a;var n=getComputedStyle(t).borderRadius;"0px"!==n&&(l.style.borderRadius=n)}}function t396_scale__processBackgroundForShape(e,t,l,a){if("shape"===l){var n=t&&getComputedStyle(t),o;if(n)if((n&&n.backgroundImage||t.getAttribute("data-original"))&&"fixed"===n.backgroundAttachment){e.removeChild(t.parentNode),e.appendChild(t);var i=t396_elem__getFieldValue(e,"height");i=t396_elem__getHeight(e,i),i=t396_elem__convertPosition__Local__toAbsolute(e,"height",i);var r=t396_elem__getFieldValue(e,"width");r=t396_elem__getWidth(e,r),r=t396_elem__convertPosition__Local__toAbsolute(e,"width",r);var s=parseFloat(t396_elem__getFieldValue(e,"top")),c=parseFloat(t396_elem__getFieldValue(e,"left"));e.style.top=s*a+"px",e.style.left=c*a+"px",e.style.height=i*a+"px",e.style.width=r*a+"px",e.setAttribute("data-scale-off","yes")}}}function t396_scale__getElementType(e){var t=e.getAttribute("data-elem-type");return!t&&e.classList.contains("tn-group")&&(t="group"),t}window.t396_initialScale||(window.t396_initialScale=function(){});