var TF_Dimension_Control=function(){function n(){this.initEvents()}var t=n.prototype;return t.initEvents=function(){document.addEventListener("click",function(n){this.onToggle(n)}.bind(this)),document.addEventListener("change",function(n){this.onValueChange(n)}.bind(this)),document.addEventListener("input",function(n){this.onValueChange(n)}.bind(this))},t.onToggle=function(n){var t=n.target.closest(".tf-dimension-control-link-button");t&&(t.nextElementSibling.value=t.classList.contains("active")?"0":"1",t.classList.toggle("active"),n.preventDefault())},t.onValueChange=function(n){var t=n.target.closest(".tf-dimension-control-input");if(t){var e=t.value;if(this.isLinked(t))this.getWrapper(t).querySelectorAll('input[type="number"]').forEach(function(n){n.value=e})}},t.getWrapper=function(n){return n.closest(".tf-dimension-control")},t.isLinked=function(n){return"1"==this.getWrapper(n).querySelector(".tf-dimension-control-link-value").value},n}();document.addEventListener("DOMContentLoaded",function(){new TF_Dimension_Control});

