{"size": 4411, "ext": "js", "max_stars_repo_path": "vendor/kartik-v/bootstrap-checkbox-x/js/checkbox-x.min.js", "max_stars_repo_name": "denden23/Eulims", "max_stars_repo_stars_event_min_datetime": "2015-01-16T16:04:01.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-08T01:51:17.000Z", "max_issues_repo_path": "vendor/kartik-v/bootstrap-checkbox-x/js/checkbox-x.min.js", "max_issues_repo_name": "denden23/Eulims", "max_issues_repo_issues_event_min_datetime": "2015-01-02T14:17:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-14T07:05:20.000Z", "max_forks_repo_path": "vendor/kartik-v/bootstrap-checkbox-x/js/checkbox-x.min.js", "max_forks_repo_name": "denden23/Eulims", "max_forks_repo_forks_event_min_datetime": "2015-01-12T10:22:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-17T11:51:39.000Z"}
{"max_stars_count": 133, "max_issues_count": 448, "max_forks_count": 141, "avg_line_length": 490.1111111111, "max_line_length": 4093, "alphanum_fraction": 0.7125368397}
/*!
 * @copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2015
 * @version 1.5.4
 *
 * An extended checkbox plugin for bootstrap with three states and additional styles.
 *
 * For more JQuery/Bootstrap plugins and demos visit http://plugins.krajee.com
 * For more Yii related demos visit http://demos.krajee.com
 */!function(e){"use strict";var t=function(t,n){var c=this;c.$element=e(t),c.disabled=c.$element.attr("disabled")||c.$element.attr("readonly"),c.initialValue=c.$element.val(),c.init(n)};t.prototype={constructor:t,init:function(t){var n=this,c=n.$element,a=c.is(":checkbox"),i=c.is("select"),o=!a&&!i,r=parseInt(c.val()),l=i&&!t.enclosedLabel,d=t.inline?"cbx-container":"cbx-container cbx-block";return t.theme&&(d+=" cbx-"+t.theme),n.options=t,n.clearEvents(),a&&r!==t.valueUnchecked&&r!==t.valueChecked&&c.attr("checked",!1).prop("indeterminate",t.threeState),a&&t.useNative?(c.on("change.checkbox",function(){n.change()}).removeClass("cbx-loading"),void(t.threeState&&(c.attr("checked")||c.val()===t.valueChecked||c.val()===t.valueUnchecked?c.prop("indeterminate",!1):c.prop("indeterminate",!0)))):(void 0===n.$container?(n.$container=e(document.createElement("div")).addClass(d).html(n.render()),n.$container.insertBefore(c).append(c),c.hide()):n.$container.before(c).addClass(d).html(n.render()).append(c),c.removeClass("cbx-loading"),n.$cbx=n.$container.find(".cbx"),c.closest("form").on("reset.checkbox",function(){n.reset()}),n.$cbx.off("click.checkbox").on("click.checkbox",function(){return!a||t.enclosedLabel||t.useNative||n.disabled?void((o&&!t.enclosedLabel||l)&&n.change()):void c.trigger("change")}).on("keyup.checkbox",function(e){32===e.which&&(n.change(),e.preventDefault())}),void(a&&!t.useNative?c.on("change.checkbox",function(){n.change()}):(o||i)&&c.on("click.checkbox",function(){n.change()})))},change:function(){var e,t=this,n=t.$element;t.disabled||(e=t.getValue(),n.val(e),t.validateCheckbox(e),t.options.useNative||t.$cbx.html(t.getIndicator()))},getValue:function(){var e=this,t=parseInt(e.$element.val()),n=e.options;switch(t){case n.valueUnchecked:return e.options.threeState?n.valueNull:n.valueChecked;case n.valueChecked:return n.valueUnchecked;default:return n.valueChecked}},setCheckboxProp:function(e){var t=this,n=t.$element,c=t.options;switch(c.threeState&&n.prop("indeterminate",!1),n.prop("checked",!1),e){case c.valueChecked:n.prop("checked",!0);break;case c.valueUnchecked:break;default:c.threeState&&n.prop("indeterminate",!0)}},validateCheckbox:function(e){var t=this,n=t.$element,c=n.is(":checkbox");return c?void t.setCheckboxProp(e):void n.trigger("change")},clearEvents:function(){var e=this,t=e.$element,n=e.$container?e.$container.find(".cbx"):null;t.off(".checkbox"),n&&n.off(".checkbox")},destroy:function(){var e=this,t=e.$element;e.clearEvents(),e.$container.before(t).remove(),t.removeData().show()},reset:function(){var e=this,t=e.$element;t.val(e.initialValue),e.refresh(),t.trigger("resetinput.checkbox")},refresh:function(t){var n=this;t?n.init(e.extend(n.options,t)):(n.disabled=n.$element.attr("disabled")||n.$element.attr("readonly"),n.init(n.options)),n.initialValue=n.$element.val()},getIndicator:function(){var e=this,t=e.options,n=t.iconUnchecked,c=parseInt(e.$element.val());return c===t.valueChecked?n=t.iconChecked:c!==t.valueUnchecked&&e.options.threeState&&(n=t.iconNull),'<span class="cbx-icon">'+n+"</span>"},render:function(){var e=this,t=e.getIndicator(),n=e.options.size,c=e.disabled||!e.options.tabindex?"":' tabindex="'+e.options.tabindex+'"',a="cbx cbx-"+n+(e.disabled?" cbx-disabled":" cbx-active");return'<div class="'+a+'"'+c+">"+t+"</div>"}},e.fn.checkboxX=function(n){var c=Array.apply(null,arguments);return c.shift(),this.each(function(){var a,i=e(this),o=i.data("checkboxX"),r="object"==typeof n&&n;o||(a=e.extend({},e.fn.checkboxX.defaults),o=new t(this,e.extend(a,r,i.data())),i.data("checkboxX",o)),"string"==typeof n&&o[n].apply(o,c)})},e.fn.checkboxX.defaults={theme:"",threeState:!0,inline:!0,iconChecked:'<i class="glyphicon glyphicon-ok"></i>',iconUnchecked:" ",iconNull:'<div class="cbx-icon-null"></div>',valueChecked:1,valueUnchecked:0,valueNull:null,size:"md",enclosedLabel:!1,useNative:!1,tabindex:"1000"},e.fn.checkboxX.Constructor=t,e('input[data-toggle="checkbox-x"]').addClass("cbx-loading"),e(document).ready(function(){e('input[data-toggle="checkbox-x"]').checkboxX()})}(window.jQuery);