angular.module("c8y.modbusWidgets").factory("modbusWidgetSvc",function(){return{isDiscreteIOSelectedInConfig:function(e,i){var n=_.includes(i.coils,e.id);return n=(n=n||_.includes(i.coils,[e.input,e.number].join(",")))||_.includes(i.coils,e.number)},isRegisterSelectedInConfig:function(i,e){var n=_.includes(e.registers,i.id);return n=(n=(n=n||_.includes(e.registers,[i.input,i.number,i.startBit].join(",")))||_.includes(e.registers,i.number))||!!_.find(e.registers,function(e){return e.number===i.number&&e.startBit===i.startBit})}}});