function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}(()=>{function e(e,t,r,n){var a=this,n=n();function c(t){return{getText:function(){return r.getString("Must have at least {{length}} characters",{length:t})},check:function(e){return e.length>=t}}}function o(e){var t=a.password||"",t=e.check(t);_.assign(e,{icon:t?"check-circle":"radio-button-unchecked",contextualColor:t?"text-success":"text-muted",textColor:t?"":"text-muted"})}function i(){var t=a.password||"",e=(a.basicCheckList.forEach(function(e){o(e)}),a.enhancedStrengthCheckList.forEach(function(e){o(e)}),a.combinedChecklist=[].concat(_toConsumableArray(a.basicCheckList),_toConsumableArray(a.enhancedStrengthCheckList)),a.strengthEnforced?a.combinedChecklist:a.basicCheckList);a.requirementsFulfilled({value:e.every(function(e){return e.check(t)})})}a.basicCheckList=[c(n.getDefaultMinGreenLength())],a.enhancedStrengthCheckList=[{getText:function(){return t("Include lowercase characters (for example, abcdef)")},check:n.hasLowerCase},{getText:function(){return t("Include uppercase characters (for example, ABCDEF)")},check:n.hasUpperCase},{getText:function(){return t("Include numbers (for example, 123456)")},check:n.hasNumbers},{getText:function(){return t("Include symbols (for example, !@#$%^)")},check:n.hasSpecialChars}],a.combinedChecklist=[],n.getMinGreenLength().then(function(e){_.isUndefined(e)||(a.basicCheckList[a.basicCheckList.length-1]=c(e),i())}),e.$watch("vm.password",i)}e.$inject=["$scope","gettext","gettextCatalog","passwordStrengthCheckerFactory"],angular.module("c8y.ui").component("c8yPasswordStrengthChecklist",{bindings:{password:"<",strengthEnforced:"<",requirementsFulfilled:"&"},controller:e,controllerAs:"vm",templateUrl:":::PLUGIN_PATH:::/ui/components/passwordStrengthChecklist.html"})})();