angular.module("c8y.ui").directive("c8yColorPicker",["$timeout",function(a){var u={theme:"cumulocity",position:"top left",defaultValue:"",animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",hide:null,hideSpeed:100,inline:!1,letterCase:"lowercase",opacity:!1,show:null,showSpeed:100};return{require:"?ngModel",restrict:"A",priority:1,link:function(i,n,e,o){var l=!1;function t(){var e=o.$viewValue||"";try{n.minicolors("value",e)}catch(e){}}function r(){i.$apply(function(){var e=n.minicolors("value");o.$setViewValue(e)})}o.$render=function(){return a(t,0,!1)},o&&((e=_.defaults(i.$eval(e.c8yColorPicker),u)).change=function(e){i.$apply(function(){o.$setViewValue(e)})},n.hasClass("minicolors-input")&&(n.minicolors("destroy"),n.off("blur",r)),n.minicolors(e),n.on("blur",r),l||(a(t,0),l=!0))}}}]);