!function(t){"use strict";t.WS_Form.prototype.form_checkbox_min_max=function(){var a=this;t("[data-checkbox-min]:not([data-checkbox-min-max-init]),[data-checkbox-max]:not([data-checkbox-min-max-init])",this.form_canvas_obj).each(function(){var e=t(this).attr("data-checkbox-min"),i=t(this).attr("data-checkbox-max");if(void 0!==e||void 0!==i){var c=t(this).attr("data-id"),n=a.get_section_repeatable_suffix(t(this)),o=(a.field_data_cache[c].label,t('',a.form_canvas_obj));void 0!==e&&o.attr("min",e),void 0!==i&&o.attr("max",i),i=parseInt(i,10);var s=t('input[type="checkbox"]:not([data-wsf-select-all]):checked',t(this)).length;o.attr("value",s);var r=a.get_invalid_feedback_obj(t(this));r.length?r.before(o):t(this).append(o),t('input[type="checkbox"]:not([data-wsf-select-all])',t(this)).on("change",function(e){var i=a.get_field_wrapper(t(this)),c=a.get_field_id(t(this)),n=a.get_section_repeatable_suffix(t(this)),o=t('input[type="checkbox"]:not([data-wsf-select-all]):checked',i).length,s=t('input[type="number"]',i),r=a.get_number(s.attr("max"),0,!1);r>0&&o>r&&(t(this).prop("checked",!1),o--),t("#"+a.form_id_prefix+"checkbox-min-max-"+c+n,a.form_canvas_obj).val(o).trigger("change")}),t(this).attr("data-checkbox-min-max-init","")}})},t.WS_Form.prototype.form_checkbox_select_all=function(){var a=this;t("[data-wsf-select-all]:not([data-init-select-all])",this.form_canvas_obj).each(function(){t(this).attr("data-init-select-all","");var e=t(this).attr("name");t(this).removeAttr("name").removeAttr("value").attr("data-wsf-select-all",e),t(this).on("click",function(){var e=t(this).is(":checked"),i=t(this).attr("data-wsf-select-all"),c=t(this).closest("[data-id]"),n=t(this).closest("fieldset",c),o=n.length?n:a.form_canvas_obj;t('[name="'+a.esc_selector(i)+'"]:enabled',o).each(function(){t(this).prop("checked",e).trigger("change")})})})}}(jQuery);