OwlCyberSecurity - MANAGER
Edit File: jquery-labelauty-1-24-3.min.js
!function(h){function p(e){var a=e,e=(a=e.clone().attr("style","position: absolute !important; top: -1000 !important; ").appendTo("body")).width(!0);return a.remove(),e}function b(e,a){e&&window.console&&window.console.log&&window.console.log("jQuery-LABELAUTY: "+a)}h.fn.labelauty=function(e){var u=h.extend({development:!1,class:"labelauty",label:!0,separator:"|",checked_label:"Checked",unchecked_label:"Unchecked",force_random_id:!1,minimum_width:!1,same_width:!0},e);return this.each(function(){var e,a=jQuery.migrateDeduplicateWarnings||!1,l=(u.development&&(jQuery.migrateDeduplicateWarnings=!1),h(this)),t=l.is(":checked"),n=l.attr("type"),c=!0,i=l.attr("aria-label");if(l.attr("aria-hidden",!0),!1===l.is(":checkbox")&&!1===l.is(":radio"))return this;if(l.addClass(u.class),d=l.attr("data-labelauty"),!0===(c=u.label)&&(null==d||0===d.length?((e=new Array)[0]=u.unchecked_label,e[1]=u.checked_label):2<(e=d.split(u.separator)).length?(c=!1,b(u.development,"There's more than two labels. LABELAUTY will not use labels.")):1===e.length&&b(u.development,"There's just one label. LABELAUTY will use this one for both cases.")),l.css({display:"none"}),l.removeAttr("data-labelauty"),s=l.attr("id"),u.force_random_id||null==s||""===s.trim()){for(var r=1+Math.floor(1024e3*Math.random()),s="labelauty-"+r;0!==h(s).length;)s="labelauty-"+ ++r,b(u.development,"Holy crap, between 1024 thousand numbers, one raised a conflict. Trying again.");l.attr("id",s)}var d,o=jQuery(function(e,a,l,t,n,c){var i,r,s="";null==n?i=r="":(i=n[0],r=null==n[1]?i:n[1]);s=null==a?"":'tabindex="0" role="'+t+'" aria-checked="'+l+'" aria-label="'+a+'"';n=1==c?'<label for="'+e+'" '+s+'><span class="labelauty-unchecked-image"></span><span class="labelauty-unchecked">'+i+'</span><span class="labelauty-checked-image"></span><span class="labelauty-checked">'+r+"</span></label>":'<label for="'+e+'" '+s+'><span class="labelauty-unchecked-image"></span><span class="labelauty-checked-image"></span></label>';return n}(s,i,t,n,e,c));o.on("click",function(){l.is(":checked")?h(o).attr("aria-checked",!1):h(o).attr("aria-checked",!0)}),o.on("keypress",function(e){e.preventDefault(),32!==e.keyCode&&13!==e.keyCode||(l.is(":checked")?(l.prop("checked",!1),h(o).attr("aria-checked",!1)):(l.prop("checked",!0),h(o).attr("aria-checked",!0)))}),l.after(o),!1!==u.minimum_width&&l.next("label[for="+s+"]").css({"min-width":u.minimum_width}),0!=u.same_width&&1==u.label&&(i=p((d=l.next("label[for="+s+"]")).find("span.labelauty-unchecked")),(t=p(d.find("span.labelauty-checked")))<i?d.find("span.labelauty-checked").width(i):d.find("span.labelauty-unchecked").width(t)),u.development&&(jQuery.migrateDeduplicateWarnings=a)})}}(jQuery);