!function(){"use strict";angular.module("app.tk",[]).service("tk",["pubSub",function(a){function n(a,n){for(var e in a)n[e]=a[e]}var e={Luminosity:1,R:8,G:9,B:10,L:5,Saturation:2},t={1:"Luminosity",8:"R",9:"G",10:"B",5:"L",2:"Saturation"},i={"Lights-1":{tonalRangeCenter:255,tonalRangeRadius:100,curveContrastLevel:0,tonalRangeGain:100,curveFeatheringRadius:30,maskFeatheringRadius:0,autoTonalRange:!1},"Darks-1":{tonalRangeCenter:0,tonalRangeRadius:100,curveContrastLevel:0,tonalRangeGain:100,curveFeatheringRadius:30,maskFeatheringRadius:0,autoTonalRange:!1},Zero:{tonalRangeCenter:0,tonalRangeRadius:0,curveContrastLevel:0,tonalRangeGain:0,curveFeatheringRadius:30,maskFeatheringRadius:0,maskSource:1,autoTonalRange:!1}};this.isInitialized=!1,this.originalLayerID=void 0,this.mergedLayerID=void 0,this.params={tonalRangeCenter:255,tonalRangeRadius:100,curveContrastLevel:0,tonalRangeGain:100,curveFeatheringRadius:30,maskFeatheringRadius:0,maskSource:1,autoTonalRange:!1},this.setChannel=function(a){this.params.maskSource=e[a]},this.applyPreset=function(e){n(i[e],this.params),a.changeParams(this.params)},this.applyPicker=function(n){var e=t[this.params.maskSource.toString()];this.params.tonalRangeCenter=n[e],this.isInitialized||(this.params.tonalRangeRadius=100,this.params.tonalRangeGain=100),a.changeParams(this.params)}}])}();