(()=>{function t(l){return{restrict:"A",require:"ngModel",scope:{allowIpV6:"=?"},link:function(i,t,e,n){var a=l.validation.ip.pattern,r=l.validation.ipV6.pattern;n.$validators.ip=function(t){return!!n.$isEmpty(t)||(i.allowIpV6?a.test(t)||r.test(t):a.test(t))}}}}t.$inject=["c8yConfig"],angular.module("c8y.ui").directive("validateIp",t)})();