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