"use strict";$(document).ready(function(){console.log("ready!");var a=new CSInterface;event=new CSEvent("com.adobe.PhotoshopPersistent","APPLICATION"),event.extensionId=a.getExtensionID(),a.dispatchEvent(event);parseInt(document.getElementById("numIterations").value);var n=document.getElementById("myRangeSlider"),l=document.getElementById("rotationAngleMinValue"),u=document.getElementById("rotationAngleMaxValue");parseInt(document.getElementById("rotationAngleMinValue").value),parseInt(document.getElementById("rotationAngleMaxValue").value);function e(e,t,n,a,l){l<n?l=n:a<l&&(l=a),document.getElementById(e).value=l,document.getElementById(t).value=l}$("#tileTab").show(),$("#seamlessTab").hide(),themeManager.init(),document.getElementById("numIterations").addEventListener("input",function(){document.getElementById("numIterationsValue").value=this.value}),document.getElementById("numIterationsValue").addEventListener("change",function(){e("numIterationsValue","numIterations",1,10,this.value)}),document.getElementById("patchSize").addEventListener("input",function(){document.getElementById("patchSizeValue").value=this.value}),document.getElementById("patchSizeValue").addEventListener("change",function(){e("patchSizeValue","patchSize",1,50,this.value)}),document.getElementById("rotationAngleMinValue").addEventListener("change",function(){var e=this.value,t=document.getElementById("rotationAngleMaxValue").value;e<1?e=1:t<=e&&(e=t),this.value=e,n.noUiSlider.set([e,null])}),document.getElementById("rotationAngleMaxValue").addEventListener("change",function(){var e=this.value,t=document.getElementById("rotationAngleMinValue").value;e<=t?e=t:90<e&&(e=90),this.value=e,n.noUiSlider.set([null,e])}),n.noUiSlider.on("update",function(e,t){var n=e[t];t?u.value=Math.round(n):l.value=Math.round(n)}),$("#btnExecuteTile").click(function(){a.evalScript("tileMain()")}),$("#btnExecuteRemovePatterns").click(function(){var e=parseInt(document.getElementById("numIterations").value),t=parseInt(document.getElementById("rotationAngleMinValue").value),n=parseInt(document.getElementById("rotationAngleMaxValue").value);a.evalScript('removePatternsMain(" '+e+' ", " '+t+' ", " '+n+' ")')}),$("#btnExecuteSeamless").click(function(){var e=parseInt(document.getElementById("patchSize").value),t=$("input[name='highpass']:checked").val();t&&(t=t),a.evalScript('seamlessMain(" '+e+' ", " '+t+' ")')}),$("#tileTabBtn").click(function(){$("#tileTab").show(),$("#seamlessTab").hide()}),$("#seamlessTabBtn").click(function(){$("#tileTab").hide(),$("#seamlessTab").show()}),$("#btnHelp").click(function(){window.cep.util.openURLInDefaultBrowser("https://c4dsky.com/81972.html")})});