lhcAppControllers.controller("WebhooksCtrl",["$scope","$http","$location","$rootScope","$log","$window",function(n,i,o,t,e,s){this.conditions=[],this.itemAdd="1",this.conditions_json="";var d=this;this.setConditions=function(){this.conditions=s.conditionsWebhook},this.makeid=function(n){for(var i="",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=0;t<n;t++)i+=o.charAt(Math.floor(Math.random()*o.length));return i},this.addItem=function(n){this.conditions.push({_id:this.makeid(10),type:n,logic:"and"})},this.deleteCondition=function(n){confirm("Are you sure?")&&this.conditions.splice(this.conditions.indexOf(n),1)},this.move=function(n,i,o){index=i.indexOf(n),newIndex=index+o,newIndex>-1&&newIndex<i.length&&(removedElement=i.splice(index,1)[0],i.splice(newIndex,0,removedElement))},this.moveUp=function(n,i){d.move(n,i,-1)},this.moveDown=function(n,i){d.move(n,i,1)},this.updateContinuous=function(){this.conditions_json=JSON.stringify(this.conditions)}}]);
//# sourceMappingURL=eea30c52db2a8b572166178a72e9eb26.js.map
