"use strict";$(document).ready(function(){console.log("ready!");var e=new CSInterface;event=new CSEvent("com.adobe.PhotoshopPersistent","APPLICATION"),event.extensionId=e.getExtensionID(),e.dispatchEvent(event);var t,n,a,d,u,l=!1;function o(){!0===l&&(t=$("#shadowAngleSlider").roundSlider("getValue"),n=parseInt(document.getElementById("shadowScaleValue").value),a=parseInt(document.getElementById("shadowBlurValue").value),d=parseInt(document.getElementById("shadowOpacityValue").value),u=$(".shadow-color").spectrum("get"),!0===document.getElementById("sunPositionValue").checked?e.evalScript('main(" '+t+' ", " '+n+' ", " '+a+' ", " '+d+' ", '+JSON.stringify(u)+", true)"):e.evalScript('main(" '+t+' ", " '+n+' ", " '+a+' ", " '+d+' ", '+JSON.stringify(u)+", false)"))}function c(e,t,n,a,d){d<n?d=n:a<d&&(d=a),document.getElementById(e).value=d,document.getElementById(t).value=d}themeManager.init(),document.getElementById("shadowScale").addEventListener("input",function(){document.getElementById("shadowScaleValue").value=this.value}),document.getElementById("shadowScaleValue").addEventListener("change",function(){c("shadowScaleValue","shadowScale",1,100,this.value),o()}),document.getElementById("shadowBlur").addEventListener("input",function(){document.getElementById("shadowBlurValue").value=this.value}),document.getElementById("shadowBlurValue").addEventListener("change",function(){c("shadowBlurValue","shadowBlur",1,100,this.value),o()}),document.getElementById("shadowOpacity").addEventListener("input",function(){document.getElementById("shadowOpacityValue").value=this.value}),document.getElementById("shadowOpacityValue").addEventListener("change",function(){c("shadowOpacityValue","shadowOpacity",1,100,this.value),o()}),document.getElementById("autoUpdate").addEventListener("change",function(){l=this.checked}),document.getElementById("shadowScale").addEventListener("change",function(){o()}),document.getElementById("shadowBlur").addEventListener("change",function(){o()}),document.getElementById("shadowOpacity").addEventListener("change",function(){o()}),$("#shadowAngleSlider").change(function(){o()}),$(".shadow-color").spectrum({change:function(){o()}}),$("#btnExecute").click(function(){t=$("#shadowAngleSlider").roundSlider("getValue"),n=parseInt(document.getElementById("shadowScaleValue").value),a=parseInt(document.getElementById("shadowBlurValue").value),d=parseInt(document.getElementById("shadowOpacityValue").value),u=$(".shadow-color").spectrum("get"),!0===document.getElementById("sunPositionValue").checked?e.evalScript('main(" '+t+' ", " '+n+' ", " '+a+' ", " '+d+' ", '+JSON.stringify(u)+", true)"):e.evalScript('main(" '+t+' ", " '+n+' ", " '+a+' ", " '+d+' ", '+JSON.stringify(u)+", false)")})});