!function(I,E,S){"use strict";functionO(e){return"function"==typeofe&&"number"!=typeofe.nodeType}E=void0!==E&&E.Math===Math?E:globalThis,I.fn.checkbox=function(s){varu,e=I(this),b=e.selector||"",y=Date.now(),C=[],x=s,w="string"==typeofx,D=[].slice.call(arguments,1);returne.each(function(){vare,h=I.extend(!0,{},I.fn.checkbox.settings,s),n=h.className,i=h.namespace,g=h.selector,r=h.error,t="."+i,o="module-"+i,p=I(this),a=I(this).children(g.label),f=I(this).children(g.input),k=f[0],c=!1,m=!1,d=p.data(o),l=this,v={initialize:function(){v.verbose("Initializing checkbox",h),v.create.label(),v.bind.events(),v.set.tabbable(),v.hide.input(),v.observeChanges(),v.instantiate(),v.setup()},instantiate:function(){v.verbose("Storing instance of module",v),d=v,p.data(o,v)},destroy:function(){v.verbose("Destroying module"),v.unbind.events(),v.show.input(),p.removeData(o)},fix:{reference:function(){p.is(g.input)&&(v.debug("Behavior called on <input> adjusting invoked element"),p=p.closest(g.checkbox),v.refresh())}},setup:function(){v.set.initialLoad(),v.is.indeterminate()?(v.debug("Initial value is indeterminate"),v.indeterminate()):v.is.checked()?(v.debug("Initial value is checked"),v.check()):(v.debug("Initial value is unchecked"),v.uncheck()),v.remove.initialLoad()},refresh:function(){a=p.children(g.label),f=p.children(g.input),k=f[0]},hide:{input:function(){v.verbose("Modifying <input> z-index to be unselectable"),f.addClass(n.hidden)}},show:{input:function(){v.verbose("Modifying <input> z-index to be selectable"),f.removeClass(n.hidden)}},observeChanges:function(){"MutationObserver"inE&&((e=newMutationObserver(function(e){v.debug("DOM tree modified, updating selector cache"),v.refresh()})).observe(l,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",e))},attachEvents:function(e,n){vari=I(e);n=O(v[n])?v[n]:v.toggle,0<i.length?(v.debug("Attaching checkbox events to element",e,n),i.on("click"+t,n)):v.error(r.notFound)},preventDefaultOnInputTarget:function(){void0!==event&&null!==event&&I(event.target).is(g.input)&&(v.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){v.should.ignoreCallbacks()||h.onChange.call(k)},click:function(e){varn=I(e.target);n.is(g.input)?v.verbose("Using default check action on initialized checkbox"):n.is(g.link)?v.debug("Clicking link inside checkbox, skipping toggle"):(v.toggle(),f.trigger("focus"),e.preventDefault())},keydown:function(e){varn=e.which,i=13,t=32,o=27,a=37,c=38,r=39,d=40,l=v.get.radios(),s=l.index(p),u=l.length,b=!1;if(n===a||n===c?b=(0===s?u:s)-1:n!==r&&n!==d||(b=s===u-1?0:s+1),!v.should.ignoreCallbacks()&&!1!==b){if(!1===h.beforeUnchecked.apply(k))returnv.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===h.beforeChecked.apply(I(l[b]).children(g.input)[0]))returnv.verbose("Next option should not allow check, cancelling key navigation"),!1}m=!1,n===o?(v.verbose("Escape key pressed blurring field"),f.trigger("blur"),m=!0,e.stopPropagation()):!e.ctrlKey&&v.can.change()&&(n===t||n===i&&h.enableEnterKey?(v.verbose("Enter/space key pressed, toggling checkbox"),v.toggle(),m=!0):p.is(".toggle, .slider")&&!v.is.radio()&&(n===a&&v.is.checked()?(v.uncheck(),m=!0):n===r&&v.is.unchecked()&&(v.check(),m=!0)))},keyup:function(e){m&&e.preventDefault()}},check:function(){v.should.allowCheck()&&(v.debug("Checking checkbox",f),v.set.checked(),v.should.ignoreCallbacks()||(h.onChecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},uncheck:function(){v.should.allowUncheck()&&(v.debug("Unchecking checkbox"),v.set.unchecked(),v.should.ignoreCallbacks()||(h.onUnchecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},indeterminate:function(){v.should.allowIndeterminate()?v.debug("Checkbox is already indeterminate"):(v.debug("Making checkbox indeterminate"),v.set.indeterminate(),v.should.ignoreCallbacks()||(h.onIndeterminate.call(k),v.trigger.change()))},determinate:function(){v.should.allowDeterminate()?v.debug("Checkbox is already determinate"):(v.debug("Mak