11 lines
No EOL
184 KiB
JavaScript
11 lines
No EOL
184 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.8.8
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(p,v,h,b){p.isFunction=p.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},p.site=p.fn.site=function(e){var s,i=(new Date).getTime(),o=[],r=e,d="string"==typeof r,m=[].slice.call(arguments,1),l=p.isPlainObject(e)?p.extend(!0,{},p.site.settings,e):p.extend({},p.site.settings),a=l.namespace,f=l.error,t="module-"+a,n=p(h),g=this,c=n.data(t),u={initialize:function(){u.instantiate()},instantiate:function(){u.verbose("Storing instance of site",u),c=u,n.data(t,u)},normalize:function(){u.fix.console(),u.fix.requestAnimationFrame()},fix:{console:function(){u.debug("Normalizing window.console"),console!==b&&console.log!==b||(u.verbose("Console not available, normalizing events"),u.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(u.verbose("Console group not available, normalizing events"),v.console.group=function(){},v.console.groupEnd=function(){},v.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(u.verbose("Mark timeline not available, normalizing events"),v.console.markTimeline=function(){})},consoleClear:function(){u.debug("Disabling programmatic console clearing"),v.console.clear=function(){}},requestAnimationFrame:function(){u.debug("Normalizing requestAnimationFrame"),v.requestAnimationFrame===b&&(u.debug("RequestAnimationFrame not available, normalizing event"),v.requestAnimationFrame=v.requestAnimationFrame||v.mozRequestAnimationFrame||v.webkitRequestAnimationFrame||v.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return p.fn[e]!==b&&p.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||l.modules,p.each(e,function(e,t){u.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||l.modules,p.each(e,function(e,t){u.moduleExists(t)||n.push(t)}),n}},change:{setting:function(o,a,e,r){e="string"==typeof e?"all"===e?l.modules:[e]:e||l.modules,r=r===b||r,p.each(e,function(e,t){var n,i=!u.moduleExists(t)||(p.fn[t].settings.namespace||!1);u.moduleExists(t)&&(u.verbose("Changing default setting",o,a,t),p.fn[t].settings[o]=a,r&&i&&0<(n=p(":data(module-"+i+")")).length&&(u.verbose("Modifying existing settings",n),n[t]("setting",o,a)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||l.modules,o=o===b||o,p.each(e,function(e,t){var n;u.moduleExists(t)&&(u.verbose("Changing default setting",i,t),p.extend(!0,p.fn[t].settings,i),o&&a&&0<(n=p(":data(module-"+a+")")).length&&(u.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){u.console(!0)},debug:function(e,t){e=e||l.modules,u.debug("Enabling debug for modules",e),u.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||l.modules,u.debug("Enabling verbose debug for modules",e),u.change.setting("verbose",!0,e,t)}},disable:{console:function(){u.console(!1)},debug:function(e,t){e=e||l.modules,u.debug("Disabling debug for modules",e),u.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||l.modules,u.debug("Disabling verbose debug for modules",e),u.change.setting("verbose",!1,e,t)}},console:function(e){e?c.cache.console!==b?(u.debug("Restoring console function"),v.console=c.cache.console):u.error(f.console):(u.debug("Disabling console function"),c.cache.console=v.console,v.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){u.verbose("Destroying previous site for",n),n.removeData(t)},cache:{},setting:function(e,t){if(p.isPlainObject(e))p.extend(!0,l,e);else{if(t===b)return l[e];l[e]=t}},internal:function(e,t){if(p.isPlainObject(e))p.extend(!0,u,e);else{if(t===b)return u[e];u[e]=t}},debug:function(){l.debug&&(l.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,l.name+":"),u.debug.apply(console,arguments)))},verbose:function(){l.verbose&&l.debug&&(l.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),u.verbose.apply(console,arguments)))},error:function(){u.error=Function.prototype.bind.call(console.error,console,l.name+":"),u.error.apply(console,arguments)},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:g,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=l.name+":",n=0;i=!1,clearTimeout(u.performance.timer),p.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):p.each(o,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),o=[]}},invoke:function(i,e,t){var o,a,n,r=c;return e=e||m,t=g||t,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),o=i.length-1,p.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(p.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==b)return a=r[n],!1;{if(!p.isPlainObject(r[t])||e==o)return r[t]!==b?a=r[t]:u.error(f.method,i),!1;r=r[t]}}})),p.isFunction(a)?n=a.apply(t,e):a!==b&&(n=a),Array.isArray(s)?s.push(n):s!==b?s=[s,n]:n!==b&&(s=n),a}};return d?(c===b&&u.initialize(),u.invoke(r)):(c!==b&&u.destroy(),u.initialize()),s!==b?s:this},p.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},p.extend(p.expr[":"],{data:p.expr.createPseudo?p.expr.createPseudo(function(t){return function(e){return!!p.data(e,t)}}):function(e,t,n){return!!p.data(e,n[3])}})}(jQuery,window,document),function(S,e,k,T){"use strict";S.isFunction=S.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),S.fn.dimmer=function(p){var v,h=S(this),b=(new Date).getTime(),y=[],x=p,w="string"==typeof x,C=[].slice.call(arguments,1);return h.each(function(){var o,t,a=S.isPlainObject(p)?S.extend(!0,{},S.fn.dimmer.settings,p):S.extend({},S.fn.dimmer.settings),n=a.selector,u=a.namespace,e=a.className,d=a.error,i="."+u,m="module-"+u,f=h.selector||"",g="ontouchstart"in k.documentElement?"touchstart":"click",r=S(this),s=this,l=r.data(m),c={preinitialize:function(){o=c.is.dimmer()?(t=r.parent(),r):(t=r,c.has.dimmer()?a.dimmerName?t.find(n.dimmer).filter("."+a.dimmerName):t.find(n.dimmer):c.create())},initialize:function(){c.debug("Initializing dimmer",a),c.bind.events(),c.set.dimmable(),c.instantiate()},instantiate:function(){c.verbose("Storing instance of module",c),l=c,r.data(m,l)},destroy:function(){c.verbose("Destroying previous module",o),c.unbind.events(),c.remove.variation(),t.off(i)},bind:{events:function(){"hover"==a.on?t.on("mouseenter"+i,c.show).on("mouseleave"+i,c.hide):"click"==a.on&&t.on(g+i,c.toggle),c.is.page()&&(c.debug("Setting as a page dimmer",t),c.set.pageDimmer()),c.is.closable()&&(c.verbose("Adding dimmer close event",o),t.on(g+i,n.dimmer,c.event.click))}},unbind:{events:function(){r.removeData(m),t.off(i)}},event:{click:function(e){c.verbose("Determining if event occurred on dimmer",e),0!==o.find(e.target).length&&!S(e.target).is(n.content)||(c.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=S(e);c.debug("Add content to dimmer",e),e.parent()[0]!==o[0]&&e.detach().appendTo(o)},create:function(){var e=S(a.template.dimmer(a));return a.dimmerName&&(c.debug("Creating named dimmer",a.dimmerName),e.addClass(a.dimmerName)),e.appendTo(t),e},show:function(e){e=S.isFunction(e)?e:function(){},c.debug("Showing dimmer",o,a),c.set.variation(),c.is.dimmed()&&!c.is.animating()||!c.is.enabled()?c.debug("Dimmer is already shown or disabled"):(c.animate.show(e),a.onShow.call(s),a.onChange.call(s))},hide:function(e){e=S.isFunction(e)?e:function(){},c.is.dimmed()||c.is.animating()?(c.debug("Hiding dimmer",o),c.animate.hide(e),a.onHide.call(s),a.onChange.call(s)):c.debug("Dimmer is not visible")},toggle:function(){c.verbose("Toggling dimmer visibility",o),c.is.dimmed()?c.is.closable()&&c.hide():c.show()},animate:{show:function(e){e=S.isFunction(e)?e:function(){},a.useCSS&&S.fn.transition!==T&&o.transition("is supported")?(a.useFlex?(c.debug("Using flex dimmer"),c.remove.legacy()):(c.debug("Using legacy non-flex dimmer"),c.set.legacy()),"auto"!==a.opacity&&c.set.opacity(),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.showMethod||a.transition)+" in",queue:!1,duration:c.get.duration(),useFailSafe:!0,onStart:function(){c.set.dimmed()},onComplete:function(){c.set.active(),e()}})):(c.verbose("Showing dimmer animation with javascript"),c.set.dimmed(),"auto"==a.opacity&&(a.opacity=.8),o.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(c.get.duration(),a.opacity,function(){o.removeAttr("style"),c.set.active(),e()}))},hide:function(e){e=S.isFunction(e)?e:function(){},a.useCSS&&S.fn.transition!==T&&o.transition("is supported")?(c.verbose("Hiding dimmer with css"),o.transition({displayType:a.useFlex?"flex":"block",animation:(a.transition.hideMethod||a.transition)+" out",queue:!1,duration:c.get.duration(),useFailSafe:!0,onComplete:function(){c.remove.dimmed(),c.remove.variation(),c.remove.active(),e()}})):(c.verbose("Hiding dimmer with javascript"),o.stop().fadeOut(c.get.duration(),function(){c.remove.dimmed(),c.remove.active(),o.removeAttr("style"),e()}))}},get:{dimmer:function(){return o},duration:function(){return c.is.active()?a.transition.hideDuration||a.duration.hide||a.duration:a.transition.showDuration||a.duration.show||a.duration}},has:{dimmer:function(){return a.dimmerName?0<r.find(n.dimmer).filter("."+a.dimmerName).length:0<r.find(n.dimmer).length}},is:{active:function(){return o.hasClass(e.active)},animating:function(){return o.is(":animated")||o.hasClass(e.animating)},closable:function(){return"auto"==a.closable?"hover"!=a.on:a.closable},dimmer:function(){return r.hasClass(e.dimmer)},dimmable:function(){return r.hasClass(e.dimmable)},dimmed:function(){return t.hasClass(e.dimmed)},disabled:function(){return t.hasClass(e.disabled)},enabled:function(){return!c.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return o.hasClass(e.pageDimmer)}},can:{show:function(){return!o.hasClass(e.disabled)}},set:{opacity:function(e){var t=o.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===a.opacity?0:a.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",c.debug("Setting opacity to",e),o.css("background-color",t)},legacy:function(){o.addClass(e.legacy)},active:function(){o.addClass(e.active)},dimmable:function(){t.addClass(e.dimmable)},dimmed:function(){t.addClass(e.dimmed)},pageDimmer:function(){o.addClass(e.pageDimmer)},disabled:function(){o.addClass(e.disabled)},variation:function(e){(e=e||a.variation)&&o.addClass(e)}},remove:{active:function(){o.removeClass(e.active)},legacy:function(){o.removeClass(e.legacy)},dimmed:function(){t.removeClass(e.dimmed)},disabled:function(){o.removeClass(e.disabled)},variation:function(e){(e=e||a.variation)&&o.removeClass(e)}},setting:function(e,t){if(c.debug("Changing setting",e,t),S.isPlainObject(e))S.extend(!0,a,e);else{if(t===T)return a[e];S.isPlainObject(a[e])?S.extend(!0,a[e],t):a[e]=t}},internal:function(e,t){if(S.isPlainObject(e))S.extend(!0,c,e);else{if(t===T)return c[e];c[e]=t}},debug:function(){!a.silent&&a.debug&&(a.performance?c.performance.log(arguments):(c.debug=Function.prototype.bind.call(console.info,console,a.name+":"),c.debug.apply(console,arguments)))},verbose:function(){!a.silent&&a.verbose&&a.debug&&(a.performance?c.performance.log(arguments):(c.verbose=Function.prototype.bind.call(console.info,console,a.name+":"),c.verbose.apply(console,arguments)))},error:function(){a.silent||(c.error=Function.prototype.bind.call(console.error,console,a.name+":"),c.error.apply(console,arguments))},performance:{log:function(e){var t,n;a.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:s,"Execution Time":n})),clearTimeout(c.performance.timer),c.performance.timer=setTimeout(c.performance.display,500)},display:function(){var e=a.name+":",n=0;b=!1,clearTimeout(c.performance.timer),S.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),1<h.length&&(e+=" ("+h.length+")"),(console.group!==T||console.table!==T)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):S.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var o,a,n,r=l;return e=e||C,t=s||t,"string"==typeof i&&r!==T&&(i=i.split(/[\. ]/),o=i.length-1,S.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(S.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==T)return a=r[n],!1;{if(!S.isPlainObject(r[t])||e==o)return r[t]!==T?a=r[t]:c.error(d.method,i),!1;r=r[t]}}})),S.isFunction(a)?n=a.apply(t,e):a!==T&&(n=a),Array.isArray(v)?v.push(n):v!==T?v=[v,n]:n!==T&&(v=n),a}};c.preinitialize(),w?(l===T&&c.initialize(),c.invoke(x)):(l!==T&&l.invoke("destroy"),c.initialize())}),v!==T?v:this},S.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=S("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=S("<div/>").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(te,ne,ie,oe){"use strict";te.isFunction=te.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ne=void 0!==ne&&ne.Math==Math?ne:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),te.fn.dropdown=function(B){var W,Q=te(this),X=te(ie),$=Q.selector||"",K="ontouchstart"in ie.documentElement,J=K?"touchstart":"click",G=(new Date).getTime(),Y=[],Z=B,_="string"==typeof Z,ee=[].slice.call(arguments,1);return Q.each(function(n){var d,e,i,o,a,r,s,c,u,m=te.isPlainObject(B)?te.extend(!0,{},te.fn.dropdown.settings,B):te.extend({},te.fn.dropdown.settings),f=m.className,x=m.message,w=m.fields,C=m.keys,g=m.metadata,S=m.namespace,k=m.regExp,p=m.selector,T=m.error,A=m.templates,t="."+S,E="module-"+S,v=te(this),D=te(m.context),F=v.find(p.text),R=v.find(p.search),O=v.find(p.sizer),l=v.find(p.input),q=v.find(p.icon),I=v.find(p.clearIcon),L=0<v.prev().find(p.text).length?v.prev().find(p.text):v.prev(),h=v.children(p.menu),b=h.find(p.item),M=m.hideDividers?b.parent().children(p.divider):te(),P=!1,V=!1,j=!1,z=!1,H=this,N=!1,U=v.data(E),y={initialize:function(){y.debug("Initializing dropdown",m),y.is.alreadySetup()?y.setup.reference():(m.ignoreDiacritics&&!String.prototype.normalize&&(m.ignoreDiacritics=!1,y.error(T.noNormalize,H)),y.setup.layout(),m.values&&(y.set.initialLoad(),y.change.values(m.values),y.remove.initialLoad()),y.refreshData(),y.save.defaults(),y.restore.selected(),y.create.id(),y.bind.events(),y.observeChanges(),y.instantiate())},instantiate:function(){y.verbose("Storing instance of dropdown",y),U=y,v.data(E,y)},destroy:function(){y.verbose("Destroying previous dropdown",v),y.remove.tabbable(),y.remove.active(),h.transition("stop all"),h.removeClass(f.visible).addClass(f.hidden),v.off(t).removeData(E),h.off(t),X.off(a),y.disconnect.menuObserver(),y.disconnect.selectObserver(),y.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ne&&(s=new MutationObserver(y.event.select.mutation),c=new MutationObserver(y.event.menu.mutation),u=new MutationObserver(y.event.class.mutation),y.debug("Setting up mutation observer",s,c,u),y.observe.select(),y.observe.menu(),y.observe.class())},disconnect:{menuObserver:function(){c&&c.disconnect()},selectObserver:function(){s&&s.disconnect()},classObserver:function(){u&&u.disconnect()}},observe:{select:function(){y.has.input()&&s&&s.observe(v[0],{childList:!0,subtree:!0})},menu:function(){y.has.menu()&&c&&c.observe(h[0],{childList:!0,subtree:!0})},class:function(){y.has.search()&&u&&u.observe(v[0],{attributes:!0})}},create:{id:function(){r=(Math.random().toString(16)+"000000000").substr(2,8),a="."+r,y.verbose("Creating unique id for element",r)},userChoice:function(e){var n,i;return!!(e=e||y.get.userValues())&&(e=Array.isArray(e)?e:[e],te.each(e,function(e,t){!1===y.get.item(t)&&(i=m.templates.addition(y.add.variables(x.addResult,t)),i=te("<div />").html(i).attr("data-"+g.value,t).attr("data-"+g.text,t).addClass(f.addition).addClass(f.item),m.hideAdditions&&i.addClass(f.hidden),n=n===oe?i:n.add(i),y.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=y.get.userValues();t&&(y.debug("Adding user labels",t),te.each(t,function(e,t){y.verbose("Adding custom user value"),y.add.label(t,t)}))},menu:function(){h=te("<div />").addClass(f.menu).appendTo(v)},sizer:function(){O=te("<span />").addClass(f.sizer).insertAfter(R)}},search:function(e){e=e!==oe?e:y.get.query(),y.verbose("Searching for query",e),!1===m.fireOnInit&&y.is.initialLoad()?y.verbose("Skipping callback on initial load",m.onSearch):y.has.minCharacters(e)&&!1!==m.onSearch.call(H,e)?y.filter(e):y.hide(null,!0)},select:{firstUnfiltered:function(){y.verbose("Selecting first non-filtered element"),y.remove.selectedItem(),b.not(p.unselectable).not(p.addition+p.hidden).eq(0).addClass(f.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(p.item).not(p.unselectable).eq(0),e=e.prevAll(p.item).not(p.unselectable).eq(0);0<t.length?(y.verbose("Moving selection to",t),t.addClass(f.selected)):(y.verbose("Moving selection to",e),e.addClass(f.selected))}},setup:{api:function(){var e={debug:m.debug,urlData:{value:y.get.value(),query:y.get.query()},on:!1};y.verbose("First request, initializing API"),v.api(e)},layout:function(){v.is("select")&&(y.setup.select(),y.setup.returnedObject()),y.has.menu()||y.create.menu(),y.is.clearable()&&!y.has.clearItem()&&(y.verbose("Adding clear icon"),I=te("<i />").addClass("remove icon").insertBefore(F)),y.is.search()&&!y.has.search()&&(y.verbose("Adding search input"),R=te("<input />").addClass(f.search).prop("autocomplete",y.is.chrome()?"fomantic-search":"off").insertBefore(F)),y.is.multiple()&&y.is.searchSelection()&&!y.has.sizer()&&y.create.sizer(),m.allowTab&&y.set.tabbable()},select:function(){var e=y.get.selectValues();y.debug("Dropdown initialized on a select",e),0<(l=v.is("select")?v:l).parent(p.dropdown).length?(y.debug("UI dropdown already exists. Creating dropdown menu only"),v=l.closest(p.dropdown),y.has.menu()||y.create.menu(),h=v.children(p.menu),y.setup.menu(e)):(y.debug("Creating entire dropdown from select"),v=te("<div />").attr("class",l.attr("class")).addClass(f.selection).addClass(f.dropdown).html(A.dropdown(e,w,m.preserveHTML,m.className)).insertBefore(l),l.hasClass(f.multiple)&&!1===l.prop("multiple")&&(y.error(T.missingMultiple),l.prop("multiple",!0)),l.is("[multiple]")&&y.set.multiple(),l.prop("disabled")&&(y.debug("Disabling dropdown"),v.addClass(f.disabled)),l.removeAttr("required").removeAttr("class").detach().prependTo(v)),y.refresh()},menu:function(e){h.html(A.menu(e,w,m.preserveHTML,m.className)),b=h.find(p.item),M=m.hideDividers?b.parent().children(p.divider):te()},reference:function(){y.debug("Dropdown behavior was called on select, replacing with closest dropdown"),v=v.parent(p.dropdown),U=v.data(E),H=v.get(0),y.refresh(),y.setup.returnedObject()},returnedObject:function(){var e=Q.slice(0,n),t=Q.slice(n+1);Q=e.add(v).add(t)}},refresh:function(){y.refreshSelectors(),y.refreshData()},refreshItems:function(){b=h.find(p.item),M=m.hideDividers?b.parent().children(p.divider):te()},refreshSelectors:function(){y.verbose("Refreshing selector cache"),F=v.find(p.text),R=v.find(p.search),l=v.find(p.input),q=v.find(p.icon),L=0<v.prev().find(p.text).length?v.prev().find(p.text):v.prev(),h=v.children(p.menu),b=h.find(p.item),M=m.hideDividers?b.parent().children(p.divider):te()},refreshData:function(){y.verbose("Refreshing cached metadata"),b.removeData(g.text).removeData(g.value)},clearData:function(){y.verbose("Clearing metadata"),b.removeData(g.text).removeData(g.value),v.removeData(g.defaultText).removeData(g.defaultValue).removeData(g.placeholderText)},clearItems:function(){h.empty(),y.refreshItems()},toggle:function(){y.verbose("Toggling menu visibility"),y.is.active()?y.hide():y.show()},show:function(e,t){if(e=te.isFunction(e)?e:function(){},(N||z)&&y.is.remote()&&y.is.noApiCache()&&y.clearItems(),!y.can.show()&&y.is.remote()&&(y.debug("No API results retrieved, searching before show"),y.queryRemote(y.get.query(),y.show,[e,t])),y.can.show()&&!y.is.active()){if(y.debug("Showing dropdown"),!y.has.message()||y.has.maxSelections()||y.has.allResultsFiltered()||y.remove.message(),y.is.allFiltered())return!0;!1!==m.onShow.call(H)&&y.animate.show(function(){y.can.click()&&y.bind.intent(),y.has.search()&&!t&&y.focusSearch(),y.set.visible(),e.call(H)})}},hide:function(e,t){e=te.isFunction(e)?e:function(){},y.is.active()&&!y.is.animatingOutward()?(y.debug("Hiding dropdown"),!1!==m.onHide.call(H)&&y.animate.hide(function(){y.remove.visible(),y.is.focusedOnSearch()&&!0!==t&&R.blur(),e.call(H)})):y.can.click()&&y.unbind.intent(),N=z=!1},hideOthers:function(){y.verbose("Finding other dropdowns to hide"),Q.not(v).has(p.menu+"."+f.visible).dropdown("hide")},hideMenu:function(){y.verbose("Hiding menu instantaneously"),y.remove.active(),y.remove.visible(),h.transition("hide")},hideSubMenus:function(){var e=h.children(p.item).find(p.menu);y.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){y.bind.keyboardEvents(),y.bind.inputEvents(),y.bind.mouseEvents()},keyboardEvents:function(){y.verbose("Binding keyboard events"),v.on("keydown"+t,y.event.keydown),y.has.search()&&v.on(y.get.inputEvent()+t,p.search,y.event.input),y.is.multiple()&&X.on("keydown"+a,y.event.document.keydown)},inputEvents:function(){y.verbose("Binding input change events"),v.on("change"+t,p.input,y.event.change)},mouseEvents:function(){y.verbose("Binding mouse events"),y.is.multiple()&&v.on(J+t,p.label,y.event.label.click).on(J+t,p.remove,y.event.remove.click),y.is.searchSelection()?(v.on("mousedown"+t,y.event.mousedown).on("mouseup"+t,y.event.mouseup).on("mousedown"+t,p.menu,y.event.menu.mousedown).on("mouseup"+t,p.menu,y.event.menu.mouseup).on(J+t,p.icon,y.event.icon.click).on(J+t,p.clearIcon,y.event.clearIcon.click).on("focus"+t,p.search,y.event.search.focus).on(J+t,p.search,y.event.search.focus).on("blur"+t,p.search,y.event.search.blur).on(J+t,p.text,y.event.text.focus),y.is.multiple()&&v.on(J+t,y.event.click).on(J+t,y.event.search.focus)):("click"==m.on?v.on(J+t,p.icon,y.event.icon.click).on(J+t,y.event.test.toggle):"hover"==m.on?v.on("mouseenter"+t,y.delay.show).on("mouseleave"+t,y.delay.hide):v.on(m.on+t,y.toggle),v.on("mousedown"+t,y.event.mousedown).on("mouseup"+t,y.event.mouseup).on("focus"+t,y.event.focus).on(J+t,p.clearIcon,y.event.clearIcon.click),y.has.menuSearch()?v.on("blur"+t,p.search,y.event.search.blur):v.on("blur"+t,y.event.blur)),h.on((K?"touchstart":"mouseenter")+t,p.item,y.event.item.mouseenter).on("mouseleave"+t,p.item,y.event.item.mouseleave).on("click"+t,p.item,y.event.item.click)},intent:function(){y.verbose("Binding hide intent event to document"),K&&X.on("touchstart"+a,y.event.test.touch).on("touchmove"+a,y.event.test.touch),X.on(J+a,y.event.test.hide)}},unbind:{intent:function(){y.verbose("Removing hide intent event from document"),K&&X.off("touchstart"+a).off("touchmove"+a),X.off(J+a)}},filter:function(e){function t(){y.is.multiple()&&y.filterActive(),(e||!e&&0==y.get.activeItem().length)&&y.select.firstUnfiltered(),y.has.allResultsFiltered()?m.onNoResults.call(H,n)?m.allowAdditions?m.hideAdditions&&(y.verbose("User addition with no menu, setting empty style"),y.set.empty(),y.hideMenu()):(y.verbose("All items filtered, showing message",n),y.add.message(x.noResults)):(y.verbose("All items filtered, hiding dropdown",n),y.hideMenu()):(y.remove.empty(),y.remove.message()),m.allowAdditions&&y.add.userSuggestion(y.escape.htmlEntities(e)),y.is.searchSelection()&&y.can.show()&&y.is.focusedOnSearch()&&y.show()}var n=e!==oe?e:y.get.query();m.useLabels&&y.has.maxSelections()||(m.apiSettings?y.can.useAPI()?y.queryRemote(n,function(){m.filterRemoteData&&y.filterItems(n);var e=l.val();Array.isArray(e)||(e=e&&""!==e?e.split(m.delimiter):[]),y.is.multiple()&&te.each(e,function(e,t){b.filter('[data-value="'+t+'"]').addClass(f.filtered)}),y.focusSearch(!0),t()}):y.error(T.noAPI):(y.filterItems(n),t()))},queryRemote:function(e,n,i){Array.isArray(i)||(i=[i]);e={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e},onError:function(){y.add.message(x.serverError),N=z=!1,n.apply(null,i)},onFailure:function(){y.add.message(x.serverError),N=z=!1,n.apply(null,i)},onSuccess:function(e){var e=e[w.remoteValues],t=(Array.isArray(e)||(e=[]),y.remove.message(),{});t[w.values]=e,y.setup.menu(t),0!==e.length||m.allowAdditions?""!==(t=y.is.multiple()?y.get.values():y.get.value())&&(y.verbose("Value(s) present after click icon, select value(s) in items"),y.set.selected(t,null,null,!0)):y.add.message(x.noResults),N=z=!1,n.apply(null,i)}};v.api("get request")||y.setup.api(),e=te.extend(!0,{},e,m.apiSettings),v.api("setting",e).api("query")},filterItems:function(e){var n=y.remove.diacritics(e!==oe?e:y.get.query()),i=null,e=y.escape.string(n),t=(m.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+e,t);y.has.query()&&(i=[],y.verbose("Searching for matching values",n),b.each(function(){var e,t=te(this);if(t.hasClass(f.unfilterable))return i.push(this),!0;if("both"===m.match||"text"===m.match){if(-1!==(e=y.remove.diacritics(String(y.get.choiceText(t,!1)))).search(o))return i.push(this),!0;if("exact"===m.fullTextSearch&&y.exactSearch(n,e))return i.push(this),!0;if(!0===m.fullTextSearch&&y.fuzzySearch(n,e))return i.push(this),!0}return("both"===m.match||"value"===m.match)&&(-1!==(t=y.remove.diacritics(String(y.get.choiceValue(t,e)))).search(o)||"exact"===m.fullTextSearch&&y.exactSearch(n,t)||!0===m.fullTextSearch&&y.fuzzySearch(n,t))?(i.push(this),!0):void 0})),y.debug("Showing only matched items",n),y.remove.filteredItem(),i&&b.not(i).addClass(f.filtered),y.has.query()?!0===m.hideDividers?M.addClass(f.hidden):"empty"===m.hideDividers&&M.removeClass(f.hidden).filter(function(){var e=te(this).nextUntil(p.item);return 0===(e.length?e:te(this)).nextUntil(p.divider).filter(p.item+":not(."+f.filtered+")").length}).addClass(f.hidden):M.removeClass(f.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=m.ignoreSearchCase?e.toLowerCase():e,t=m.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;e:for(var o=0,a=0;o<i;o++){for(var r=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=m.ignoreSearchCase?e.toLowerCase():e,-1<(t=m.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){m.useLabels&&b.filter("."+f.active).addClass(f.filtered)},focusSearch:function(e){y.has.search()&&!y.is.focusedOnSearch()&&(e?(v.off("focus"+t,p.search),R.focus(),v.on("focus"+t,p.search,y.event.search.focus)):R.focus())},blurSearch:function(){y.has.search()&&R.blur()},forceSelection:function(){var e=b.not(f.filtered).filter("."+f.selected).eq(0),t=b.not(f.filtered).filter("."+f.active).eq(0),e=0<e.length?e:t,t=0<e.length;m.allowAdditions||t&&!y.is.multiple()?(y.debug("Forcing partial selection to selected item",e),y.event.item.click.call(e,{},!0)):y.remove.searchTerm()},change:{values:function(e){m.allowAdditions||y.clear(),y.debug("Creating dropdown with specified values",e);var t={};t[w.values]=e,y.setup.menu(t),te.each(e,function(e,t){if(1==t.selected&&(y.debug("Setting initial selection to",t[w.value]),y.set.selected(t[w.value]),!y.is.multiple()))return!1}),y.has.selectInput()&&(y.disconnect.selectObserver(),l.html(""),l.append("<option disabled selected value></option>"),te.each(e,function(e,t){var n=m.templates.deQuote(t[w.value]),t=m.templates.escape(t[w.name]||"",m.preserveHTML);l.append('<option value="'+n+'">'+t+"</option>")}),y.observe.select())}},event:{change:function(){j||(y.debug("Input changed, updating selection"),y.set.selected())},focus:function(){m.showOnFocus&&!P&&y.is.hidden()&&!i&&(N=!0,y.show())},blur:function(e){i=ie.activeElement===this,P||i||(y.remove.activeLabel(),y.hide())},mousedown:function(){y.is.searchSelection()?o=!0:P=!0},mouseup:function(){y.is.searchSelection()?o=!1:P=!1},click:function(e){te(e.target).is(v)&&(y.is.focusedOnSearch()?y.show():y.focusSearch())},search:{focus:function(e){P=!0,y.is.multiple()&&y.remove.activeLabel(),N||y.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||(N=!0,y.search())},blur:function(e){i=ie.activeElement===this,y.is.searchSelection()&&!o&&(V||i||(m.forceSelection?y.forceSelection():m.allowAdditions||y.remove.searchTerm(),y.hide())),o=!1}},clearIcon:{click:function(e){y.clear(),y.is.searchSelection()&&y.remove.searchTerm(),y.hide(),e.stopPropagation()}},icon:{click:function(e){z=!0,y.has.search()?y.is.active()?y.blurSearch():m.showOnFocus?y.focusSearch():y.toggle():y.toggle(),e.stopPropagation()}},text:{focus:function(e){P=!0,y.focusSearch()}},input:function(e){(y.is.multiple()||y.is.searchSelection())&&y.set.filtered(),clearTimeout(y.timer),y.timer=setTimeout(y.search,m.delay.search)},label:{click:function(e){var t=te(this),n=v.find(p.label),i=n.filter("."+f.active),o=t.nextAll("."+f.active),a=t.prevAll("."+f.active),o=(0<o.length?t.nextUntil(o):t.prevUntil(a)).add(i).add(t);e.shiftKey?(i.removeClass(f.active),o.addClass(f.active)):e.ctrlKey?t.toggleClass(f.active):(i.removeClass(f.active),t.addClass(f.active)),m.onLabelSelect.apply(this,n.filter("."+f.active)),e.stopPropagation()}},remove:{click:function(e){var t=te(this).parent();t.hasClass(f.active)?y.remove.activeLabels():y.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=y.is.multiple()?y.show:y.toggle;y.is.bubbledLabelClick(e)||y.is.bubbledIconClick(e)||(y.is.multiple()&&(!y.is.multiple()||y.is.active())||(N=!0),y.determine.eventOnElement(e,t)&&e.preventDefault())},touch:function(e){y.determine.eventOnElement(e,function(){"touchstart"==e.type?y.timer=setTimeout(function(){y.hide()},m.delay.touch):"touchmove"==e.type&&clearTimeout(y.timer)}),e.stopPropagation()},hide:function(e){y.determine.eventInModule(e,y.hide)&&H.id&&te(e.target).attr("for")===H.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&y.check.disabled()})}},select:{mutation:function(e){y.debug("<select> modified, recreating menu"),y.is.selectMutation(e)&&(y.disconnect.selectObserver(),y.refresh(),y.setup.select(),y.set.selected(),y.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?te(e.addedNodes[0]):te(!1),e=e.removedNodes?te(e.removedNodes[0]):te(!1),t=t.add(e),e=t.is(p.addition)||0<t.closest(p.addition).length,t=t.is(p.message)||0<t.closest(p.message).length;e||t?(y.debug("Updating item selector cache"),y.refreshItems()):(y.debug("Menu modified, updating selector cache"),y.refresh())},mousedown:function(){V=!0},mouseup:function(){V=!1}},item:{mouseenter:function(e){var t=te(e.target),n=te(this),i=n.children(p.menu),o=n.siblings(p.item).children(p.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(y.itemTimer),y.itemTimer=setTimeout(function(){y.verbose("Showing sub-menu",i),te.each(o,function(){y.animate.hide(!1,te(this))}),y.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=te(this).children(p.menu);0<t.length&&(clearTimeout(y.itemTimer),y.itemTimer=setTimeout(function(){y.verbose("Hiding sub-menu",t),y.animate.hide(!1,t)},m.delay.hide))},click:function(e,t){var n=te(this),e=te(e?e.target:""),i=n.find(p.menu),o=y.get.choiceText(n),a=y.get.choiceValue(n,o),r=0<i.length,i=0<i.find(e).length;"input"!==ie.activeElement.tagName.toLowerCase()&&te(ie.activeElement).blur(),i||r&&!m.allowCategorySelection||(y.is.searchSelection()&&(m.allowAdditions&&y.remove.userAddition(),y.remove.searchTerm(),y.is.focusedOnSearch()||1==t||y.focusSearch(!0)),m.useLabels||(y.remove.filteredItem(),y.set.scrollPosition(n)),y.determine.selectAction.call(this,o,a))}},document:{keydown:function(e){var t,n,i,o,u,a,r,s,l,d,m,c=e.which;y.is.inObject(c,C)&&((n=(t=v.find(p.label)).filter("."+f.active)).data(g.value),a=t.index(n),r=t.length,i=0<n.length,o=1<n.length,u=0===a,a=a+1==r,r=y.is.searchSelection(),s=y.is.focusedOnSearch(),l=y.is.focused(),m=(d=s&&0===y.get.caretPosition(!1))&&0!==y.get.caretPosition(!0),r&&!i&&!s||(c==C.leftArrow?!l&&!d||i?i&&(e.shiftKey?y.verbose("Adding previous label to selection"):(y.verbose("Selecting previous label"),t.removeClass(f.active)),u&&!o?n.addClass(f.active):n.prev(p.siblingLabel).addClass(f.active).end(),e.preventDefault()):(y.verbose("Selecting previous label"),t.last().addClass(f.active)):c==C.rightArrow?(l&&!i&&t.first().addClass(f.active),i&&(e.shiftKey?y.verbose("Adding next label to selection"):(y.verbose("Selecting next label"),t.removeClass(f.active)),a?r?s?t.removeClass(f.active):y.focusSearch():(o?n.next(p.siblingLabel):n).addClass(f.active):n.next(p.siblingLabel).addClass(f.active),e.preventDefault())):c==C.deleteKey||c==C.backspace?i?(y.verbose("Removing active labels"),a&&r&&!s&&y.focusSearch(),n.last().next(p.siblingLabel).addClass(f.active),y.remove.activeLabels(n),e.preventDefault()):!d||m||i||c!=C.backspace||(y.verbose("Removing last label on input backspace"),n=t.last().addClass(f.active),y.remove.activeLabels(n)):n.removeClass(f.active)))}},keydown:function(e){var t=e.which;if(y.is.inObject(t,C)){var n,i=b.not(p.unselectable).filter("."+f.selected).eq(0),o=h.children("."+f.active).eq(0),i=0<i.length?i:o,o=0<i.length?i.siblings(":not(."+f.filtered+")").addBack():h.children(":not(."+f.filtered+")"),a=i.children(p.menu),r=i.closest(p.menu),s=r.hasClass(f.visible)||r.hasClass(f.animating)||0<r.parent(p.menu).length,u=0<a.length,l=0<i.length,d=0<i.not(p.unselectable).length,c=t==C.delimiter&&m.allowAdditions&&y.is.multiple();if(m.allowAdditions&&m.hideAdditions&&(t==C.enter||c)&&d&&(y.verbose("Selecting item from keyboard shortcut",i),y.event.item.click.call(i,e),y.is.searchSelection()&&y.remove.searchTerm(),y.is.multiple()&&e.preventDefault()),y.is.visible()){if(t!=C.enter&&!c||(t==C.enter&&l&&u&&!m.allowCategorySelection?(y.verbose("Pressed enter on unselectable category, opening sub menu"),t=C.rightArrow):d&&(y.verbose("Selecting item from keyboard shortcut",i),y.event.item.click.call(i,e),y.is.searchSelection()&&(y.remove.searchTerm(),y.is.multiple()&&R.focus())),e.preventDefault()),l&&(t==C.leftArrow&&r[0]!==h[0]&&(y.verbose("Left key pressed, closing sub-menu"),y.animate.hide(!1,r),i.removeClass(f.selected),r.closest(p.item).addClass(f.selected),e.preventDefault()),t==C.rightArrow&&u&&(y.verbose("Right key pressed, opening sub-menu"),y.animate.show(!1,a),i.removeClass(f.selected),a.find(p.item).eq(0).addClass(f.selected),e.preventDefault())),t==C.upArrow){if(n=(l&&s?i.prevAll(p.item+":not("+p.unselectable+")"):b).eq(0),o.index(n)<0)return y.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();y.verbose("Up key pressed, changing active item"),i.removeClass(f.selected),n.addClass(f.selected),y.set.scrollPosition(n),m.selectOnKeydown&&y.is.single()&&y.set.selectedItem(n),e.preventDefault()}if(t==C.downArrow){if(0===(n=(l&&s?i.nextAll(p.item+":not("+p.unselectable+")"):b).eq(0)).length)return y.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();y.verbose("Down key pressed, changing active item"),b.removeClass(f.selected),n.addClass(f.selected),y.set.scrollPosition(n),m.selectOnKeydown&&y.is.single()&&y.set.selectedItem(n),e.preventDefault()}t==C.pageUp&&(y.scrollPage("up"),e.preventDefault()),t==C.pageDown&&(y.scrollPage("down"),e.preventDefault()),t==C.escape&&(y.verbose("Escape key pressed, closing dropdown"),y.hide())}else c&&e.preventDefault(),t!=C.downArrow||y.is.visible()||(y.verbose("Down key pressed, showing dropdown"),y.show(),e.preventDefault())}else y.has.search()||y.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=l[0];t&&(e=ie.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){d=!0,y.verbose("Determining action",m.action),te.isFunction(y.action[m.action])?(y.verbose("Triggering preset action",m.action,e,t),y.action[m.action].call(H,e,t,this)):te.isFunction(m.action)?(y.verbose("Triggering user action",m.action,e,t),m.action.call(H,e,t,this)):y.error(T.action,m.action),d=!1},eventInModule:function(e,t){var e=te(e.target),n=0<e.closest(ie.documentElement).length,e=0<e.closest(v).length;return t=te.isFunction(t)?t:function(){},n&&!e?(y.verbose("Triggering event",t),t(),!0):(y.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=te(e.target),i=n.closest(p.siblingLabel),e=ie.body.contains(e.target),i=0===v.find(i).length||!(y.is.multiple()&&m.useLabels),n=0===n.closest(h).length;return t=te.isFunction(t)?t:function(){},e&&i&&n?(y.verbose("Triggering event",t),t(),!0):(y.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==oe?t:e,y.can.activate(te(n))&&(y.set.selected(t,te(n)),y.is.multiple()||y.hideAndClear())},select:function(e,t,n){t=t!==oe?t:e,y.can.activate(te(n))&&(y.set.value(t,e,te(n)),y.is.multiple()||y.hideAndClear())},combo:function(e,t,n){y.set.selected(t=t!==oe?t:e,te(n)),y.hideAndClear()},hide:function(e,t,n){y.set.value(t,e,te(n)),y.hideAndClear()}},get:{id:function(){return r},defaultText:function(){return v.data(g.defaultText)},defaultValue:function(){return v.data(g.defaultValue)},placeholderText:function(){return"auto"!=m.placeholder&&"string"==typeof m.placeholder?m.placeholder:v.data(g.placeholderText)||""},text:function(){return m.preserveHTML?F.html():F.text()},query:function(){return String(R.val()).trim()},searchWidth:function(e){return e=e!==oe?e:R.val(),O.text(e),Math.ceil(O.width()+1)},selectionCount:function(){var e=y.get.values();return y.is.multiple()?Array.isArray(e)?e.length:0:""!==y.get.value()?1:0},transition:function(e){return"auto"===m.transition?y.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=y.get.values();return!!e&&(e=Array.isArray(e)?e:[e],te.grep(e,function(e){return!1===y.get.item(e)}))},uniqueArray:function(n){return te.grep(n,function(e,t){return te.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=R.get(0);return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:ie.selection?(i.focus(),n=(t=ie.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<l.length?l.val():v.data(g.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===oe||t?"":e},values:function(e){var t=y.get.value();return""===t?"":!y.has.selectInput()&&y.is.multiple()?"string"==typeof t?(e?t:y.escape.htmlEntities(t)).split(m.delimiter):"":t},remoteValues:function(){var e=y.get.values(),i=!1;return e&&te.each(e="string"==typeof e?[e]:e,function(e,t){var n=y.read.remoteData(t);y.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=t!==oe?t:m.preserveHTML,e)return 0<e.find(p.menu).length&&(y.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(p.menu).remove(),e.find(p.menuIcon).remove()),e.data(g.text)!==oe?e.data(g.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||y.get.choiceText(e),!!e&&(e.data(g.value)!==oe?String(e.data(g.value)):"string"==typeof t?String(m.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=R[0];return!!e&&(e.oninput!==oe?"input":e.onpropertychange!==oe?"propertychange":"keyup")},selectValues:function(){var a={},r=[],s=[];return v.find("option").each(function(){var e=te(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==oe?e.attr("value"):t,o=e.data(g.text)!==oe?e.data(g.text):t,e=e.parent("optgroup");"auto"===m.placeholder&&""===i?a.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:m.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:o,disabled:n}))}),m.placeholder&&"auto"!==m.placeholder&&(y.debug("Setting placeholder value to",m.placeholder),a.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===m.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):te.isFunction(m.sortSelect)&&s.sort(m.sortSelect),a[w.values]=s,y.debug("Retrieved and sorted values from select",a)):(a[w.values]=s,y.debug("Retrieved values from select",a)),a},activeItem:function(){return b.filter("."+f.active)},selectedItem:function(){var e=b.not(p.unselectable).filter("."+f.selected);return 0<e.length?e:b.eq(0)},itemWithAdditions:function(e){var t=y.get.item(e),e=y.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,o,a=!1;return n=n!==oe?n:y.get.values()!==oe?y.get.values():y.get.text(),e=(o=y.is.multiple()&&Array.isArray(n))?0<n.length:n!==oe&&null!==n,i=""===n||!1===n||!0===n||(i||!1),e&&b.each(function(){var e=te(this),t=y.get.choiceText(e),t=y.get.choiceValue(e,t);if(null!==t&&t!==oe)if(o)-1!==te.inArray(y.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(a=a?a.add(e):e);else if(i){if(y.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return a=e,!0}else if(m.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),y.escape.htmlEntities(String(t))===y.escape.htmlEntities(String(n)))return y.verbose("Found select item by value",t,n),a=e,!0}),a},displayType:function(){return v.hasClass("column")?"flex":m.displayType}},check:{maxSelections:function(e){return!m.maxSelections||((e=e!==oe?e:y.get.selectionCount())>=m.maxSelections?(y.debug("Maximum selection count reached"),m.useLabels&&(b.addClass(f.filtered),y.add.message(x.maxSelections)),!0):(y.verbose("No longer at maximum selection count"),y.remove.message(),y.remove.filteredItem(),y.is.searchSelection()&&y.filterItems(),!1))},disabled:function(){R.attr("tabindex",y.is.disabled()?-1:0)}},restore:{defaults:function(e){y.clear(e),y.restore.defaultText(),y.restore.defaultValue()},defaultText:function(){var e=y.get.defaultText();e===y.get.placeholderText?(y.debug("Restoring default placeholder text",e),y.set.placeholderText(e)):(y.debug("Restoring default text",e),y.set.text(e))},placeholderText:function(){y.set.placeholderText()},defaultValue:function(){var e=y.get.defaultValue();e!==oe&&(y.debug("Restoring default value",e),""!==e?(y.set.value(e),y.set.selected()):(y.remove.activeItem(),y.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(y.error(T.labels),m.useLabels=!0),y.debug("Restoring selected values"),y.create.userLabels()),y.check.maxSelections()},selected:function(){y.restore.values(),y.is.multiple()?(y.debug("Restoring previously selected values and labels"),y.restore.labels()):y.debug("Restoring previously selected values")},values:function(){y.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&y.get.remoteValues()?y.restore.remoteValues():y.set.selected();var e=y.get.value();!e||""===e||Array.isArray(e)&&0===e.length?l.addClass(f.noselection):l.removeClass(f.noselection),y.remove.initialLoad()},remoteValues:function(){var e=y.get.remoteValues();y.debug("Recreating selected from session data",e),e&&(y.is.single()?te.each(e,function(e,t){y.set.text(t)}):te.each(e,function(e,t){y.add.label(e,t)}))}},read:{remoteData:function(e){if(ne.Storage!==oe)return(e=sessionStorage.getItem(e))!==oe&&e;y.error(T.noStorage)}},save:{defaults:function(){y.save.defaultText(),y.save.placeholderText(),y.save.defaultValue()},defaultValue:function(){var e=y.get.value();y.verbose("Saving default value as",e),v.data(g.defaultValue,e)},defaultText:function(){var e=y.get.text();y.verbose("Saving default text as",e),v.data(g.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&F.hasClass(f.placeholder)&&(e=y.get.text(),y.verbose("Saving placeholder text as",e),v.data(g.placeholderText,e))},remoteData:function(e,t){ne.Storage!==oe?(y.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):y.error(T.noStorage)}},clear:function(e){y.is.multiple()&&m.useLabels?y.remove.labels(v.find(p.label),e):(y.remove.activeItem(),y.remove.selectedItem(),y.remove.filteredItem()),y.set.placeholderText(),y.clearValue(e)},clearValue:function(e){y.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||y.get.selectedItem(),n=t.closest(p.menu),i=n.outerHeight(),o=n.scrollTop(),a=b.eq(0).outerHeight(),i=Math.floor(i/a),o=(n.prop("scrollHeight"),"up"==e?o-a*i:o+a*i),a=b.not(p.unselectable),i="up"==e?a.index(t)-i:a.index(t)+i,i=("up"==e?0<=i:i<a.length)?a.eq(i):"up"==e?a.first():a.last();0<i.length&&(y.debug("Scrolling page",e,i),t.removeClass(f.selected),i.addClass(f.selected),m.selectOnKeydown&&y.is.single()&&y.set.selectedItem(i),n.scrollTop(o))},set:{filtered:function(){var e=y.is.multiple(),t=y.is.searchSelection(),n=e&&t,t=t?y.get.query():"",i="string"==typeof t&&0<t.length,o=y.get.searchWidth(),t=""!==t;e&&i&&(y.verbose("Adjusting input width",o,m.glyphWidth),R.css("width",o)),i||n&&t?(y.verbose("Hiding placeholder text"),F.addClass(f.filtered)):e&&(!n||t)||(y.verbose("Showing placeholder text"),F.removeClass(f.filtered))},empty:function(){v.addClass(f.empty)},loading:function(){v.addClass(f.loading)},placeholderText:function(e){e=e||y.get.placeholderText(),y.debug("Setting placeholder text",e),y.set.text(e),F.addClass(f.placeholder)},tabbable:function(){y.is.searchSelection()?(y.debug("Added tabindex to searchable dropdown"),R.val(""),y.check.disabled(),h.attr("tabindex",-1)):(y.debug("Added tabindex to dropdown"),v.attr("tabindex")===oe&&(v.attr("tabindex",0),h.attr("tabindex",-1)))},initialLoad:function(){y.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(p.addition).length?e.addClass(f.filtered):e.addClass(f.active)},partialSearch:function(e){var t=y.get.query().length;R.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,o=(e=e||y.get.selectedItem()).closest(p.menu),a=e&&0<e.length;t=t!==oe&&t,0===y.get.activeItem().length&&(t=!1),e&&0<o.length&&a&&(e.position().top,o.addClass(f.loading),e=(a=o.scrollTop())-o.offset().top+e.offset().top,t||(i=a+o.height()<e+5,n=e-5<a),y.debug("Scrolling to active item",e),(t||n||i)&&o.scrollTop(e),o.removeClass(f.loading))},text:function(e){"combo"===m.action?(y.debug("Changing combo button text",e,L),m.preserveHTML?L.html(e):L.text(e)):"activate"===m.action&&(e!==y.get.placeholderText()&&F.removeClass(f.placeholder),y.debug("Changing text",e,F),F.removeClass(f.filtered),m.preserveHTML?F.html(e):F.text(e))},selectedItem:function(e){var t=y.get.choiceValue(e),n=y.get.choiceText(e,!1),i=y.get.choiceText(e,!0);y.debug("Setting user selection to item",e),y.remove.activeItem(),y.set.partialSearch(n),y.set.activeItem(e),y.set.selected(t,e),y.set.text(i)},selectedLetter:function(e){var t=b.filter("."+f.selected),n=0<t.length&&y.has.firstLetter(t,e),i=!1;n&&(n=t.nextAll(b).eq(0),y.has.firstLetter(n,e)&&(i=n)),i||b.each(function(){if(y.has.firstLetter(te(this),e))return i=te(this),!1}),i&&(y.verbose("Scrolling to next value with letter",e),y.set.scrollPosition(i),t.removeClass(f.selected),i.addClass(f.selected),m.selectOnKeydown&&y.is.single()&&y.set.selectedItem(i))},direction:function(e){"auto"==m.direction?(e?y.is.upward(e)&&y.remove.upward(e):y.remove.upward(),(y.can.openDownward(e)?y.remove:y.set).upward(e),y.is.leftward(e)||y.can.openRightward(e)||y.set.leftward(e)):"upward"==m.direction&&y.set.upward(e)},upward:function(e){(e||v).addClass(f.upward)},leftward:function(e){(e||h).addClass(f.leftward)},value:function(e,t,n,i){e===oe||""===e||Array.isArray(e)&&0===e.length?l.addClass(f.noselection):l.removeClass(f.noselection);var o=y.escape.value(e),a=0<l.length,r=y.get.values(),s=e!==oe?String(e):e;if(a){if(!m.allowReselection&&s==r&&(y.verbose("Skipping value update already same value",e,r),!y.is.initialLoad()))return;y.is.single()&&y.has.selectInput()&&y.can.extendSelect()&&(y.debug("Adding user option",e),y.add.optionValue(e)),y.debug("Updating input value",o,r),j=!0,l.val(o),!1===m.fireOnInit&&y.is.initialLoad()?y.debug("Input native change event ignored on initial load"):!0!==i&&y.trigger.change(),j=!1}else y.verbose("Storing value in metadata",o,l),o!==r&&v.data(g.value,s);!1===m.fireOnInit&&y.is.initialLoad()?y.verbose("No callback on initial load",m.onChange):!0!==i&&m.onChange.call(H,e,t,n)},active:function(){v.addClass(f.active)},multiple:function(){v.addClass(f.multiple)},visible:function(){v.addClass(f.visible)},exactly:function(e,t){y.debug("Setting selected to exact values"),y.clear(),y.set.selected(e,t)},selected:function(e,s,l,c){var u=y.is.multiple();(s=m.allowAdditions?s||y.get.itemWithAdditions(e):s||y.get.item(e))&&(y.debug("Setting selected menu item to",s),y.is.multiple()&&y.remove.searchWidth(),y.is.single()?(y.remove.activeItem(),y.remove.selectedItem()):m.useLabels&&y.remove.selectedItem(),s.each(function(){var e=te(this),t=y.get.choiceText(e),n=y.get.choiceValue(e,t),i=e.hasClass(f.filtered),o=e.hasClass(f.active),a=e.hasClass(f.addition),r=u&&1==s.length;u?!o||a?(m.apiSettings&&m.saveRemoteData&&y.save.remoteData(t,n),m.useLabels?(y.add.label(n,t,r),y.add.value(n,t,e),y.set.activeItem(e),y.filterActive(),y.select.nextAvailable(s)):(y.add.value(n,t,e),y.set.text(y.add.variables(x.count)),y.set.activeItem(e))):i||!m.useLabels&&!d||(y.debug("Selected active value, removing label"),y.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&y.save.remoteData(t,n),c||y.set.text(t),y.set.value(n,t,e,l),e.addClass(f.active).addClass(f.selected))}),c||y.remove.searchTerm())}},add:{label:function(e,t,n){var i,o=y.is.searchSelection()?R:F,a=y.escape.value(e);m.ignoreCase&&(a=a.toLowerCase()),i=te("<a />").addClass(f.label).attr("data-"+g.value,a).html(A.label(a,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,a,t),y.has.label(e)?y.debug("User selection already exists, skipping",a):(m.label.variation&&i.addClass(m.label.variation),!0===n?(y.debug("Animating in label",i),i.addClass(f.hidden).insertBefore(o).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,duration:m.label.duration})):(y.debug("Adding selection label",i),i.insertBefore(o)))},message:function(e){var t=h.children(p.message),e=m.templates.message(y.add.variables(e));0<t.length?t.html(e):te("<div/>").html(e).addClass(f.message).appendTo(h)},optionValue:function(e){var t=y.escape.value(e);0<l.find('option[value="'+y.escape.string(t)+'"]').length||(y.disconnect.selectObserver(),y.is.single()&&(y.verbose("Removing previous user addition"),l.find("option."+f.addition).remove()),te("<option/>").prop("value",t).addClass(f.addition).html(e).appendTo(l),y.verbose("Adding user addition as an <option>",e),y.observe.select())},userSuggestion:function(e){var t=h.children(p.addition),n=y.get.item(e),n=n&&n.not(p.addition).length,i=0<t.length;m.useLabels&&y.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(g.value,e).data(g.text,e).attr("data-"+g.value,e).attr("data-"+g.text,e).removeClass(f.filtered),m.hideAdditions||(n=m.templates.addition(y.add.variables(x.addResult,e)),t.html(n)),y.verbose("Replacing user suggestion with new value",t)):((t=y.create.userChoice(e)).prependTo(h),y.verbose("Adding item choice to menu corresponding with user choice addition",t)),m.hideAdditions&&!y.is.allFiltered()||t.addClass(f.selected).siblings().removeClass(f.selected),y.refreshItems()))},variables:function(e,t){var n,i=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return y.verbose("Adding templated variables to message",e),i&&(n=y.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=y.get.selectionCount(),e=e.replace("{maxCount}",m.maxSelections)),a&&(i=t||y.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,o=y.get.values(!0);y.has.value(e)?y.debug("Value already selected"):""!==e?(i=Array.isArray(o)?(i=o.concat([e]),y.get.uniqueArray(i)):[e],y.has.selectInput()?y.can.extendSelect()&&(y.debug("Adding value to select",e,i,l),y.add.optionValue(e)):(i=i.join(m.delimiter),y.debug("Setting hidden input to delimited value",i,l)),!1===m.fireOnInit&&y.is.initialLoad()?y.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(H,e,t,n),y.set.value(i,t,n),y.check.maxSelections()):y.debug("Cannot select blank values from multiselect")}},remove:{active:function(){v.removeClass(f.active)},activeLabel:function(){v.find(p.label).removeClass(f.active)},empty:function(){v.removeClass(f.empty)},loading:function(){v.removeClass(f.loading)},initialLoad:function(){e=!1},upward:function(e){(e||v).removeClass(f.upward)},leftward:function(e){(e||h).removeClass(f.leftward)},visible:function(){v.removeClass(f.visible)},activeItem:function(){b.removeClass(f.active)},filteredItem:function(){m.useLabels&&y.has.maxSelections()||((m.useLabels&&y.is.multiple()?b.not("."+f.active):b).removeClass(f.filtered),m.hideDividers&&M.removeClass(f.hidden),y.remove.empty())},optionValue:function(e){var e=y.escape.value(e),t=l.find('option[value="'+y.escape.string(e)+'"]');0<t.length&&t.hasClass(f.addition)&&(s&&(s.disconnect(),y.verbose("Temporarily disconnecting mutation observer")),t.remove(),y.verbose("Removing user addition as an <option>",e),s&&s.observe(l[0],{childList:!0,subtree:!0}))},message:function(){h.children(p.message).remove()},searchWidth:function(){R.css("width","")},searchTerm:function(){y.verbose("Cleared search term"),R.val(""),y.set.filtered()},userAddition:function(){b.filter(p.addition).remove()},selected:function(e,t,i){if(!(t=m.allowAdditions?t||y.get.itemWithAdditions(e):t||y.get.item(e)))return!1;t.each(function(){var e=te(this),t=y.get.choiceText(e),n=y.get.choiceValue(e,t);y.is.multiple()?m.useLabels?(y.remove.value(n,t,e,i),y.remove.label(n)):(y.remove.value(n,t,e,i),0===y.get.selectionCount()?y.set.placeholderText():y.set.text(y.add.variables(x.count))):y.remove.value(n,t,e,i),e.removeClass(f.filtered).removeClass(f.active),m.useLabels&&e.removeClass(f.selected)})},selectedItem:function(){b.removeClass(f.selected)},value:function(e,t,n,i){var o,a=y.get.values();e=y.escape.htmlEntities(e),y.has.selectInput()?(y.verbose("Input is <select> removing selected option",e),o=y.remove.arrayValue(e,a),y.remove.optionValue(e)):(y.verbose("Removing from delimited values",e),o=(o=y.remove.arrayValue(e,a)).join(m.delimiter)),!1===m.fireOnInit&&y.is.initialLoad()?y.verbose("No callback on initial load",m.onRemove):m.onRemove.call(H,e,t,n),y.set.value(o,t,n,i),y.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=te.grep(e,function(e){return t!=e}),y.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=y.escape.value(e),e=v.find(p.label).filter("[data-"+g.value+'="'+y.escape.string(m.ignoreCase?e.toLowerCase():e)+'"]');y.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||v.find(p.label).filter("."+f.active),y.verbose("Removing active label selections",e),y.remove.labels(e)},labels:function(e,o){e=e||v.find(p.label),y.verbose("Removing labels",e),e.each(function(){var e=te(this),t=e.data(g.value),n=t!==oe?String(t):t,i=y.is.userValue(n);!1!==m.onLabelRemove.call(e,t)?(y.remove.message(),i?(y.remove.value(n,n,y.get.item(n),o),y.remove.label(n)):y.remove.selected(n,!1,o)):y.debug("Label remove callback cancelled removal")})},tabbable:function(){y.is.searchSelection()?(y.debug("Searchable dropdown initialized"),R.removeAttr("tabindex")):(y.debug("Simple selection dropdown initialized"),v.removeAttr("tabindex")),h.removeAttr("tabindex")},diacritics:function(e){return m.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return y.has.search()&&0<R.closest(h).length},clearItem:function(){return 0<I.length},search:function(){return 0<R.length},sizer:function(){return 0<O.length},selectInput:function(){return l.is("select")},minCharacters:function(e){return m.minCharacters&&!z?(e=e!==oe?String(e):String(y.get.query())).length>=m.minCharacters:!(z=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=y.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<l.length},items:function(){return 0<b.length},menu:function(){return 0<h.length},subMenu:function(e){return 0<(e||h).find(p.menu).length},message:function(){return 0!==h.children(p.message).length},label:function(e){var e=y.escape.value(e),t=v.find(p.label);return m.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+g.value+'="'+y.escape.string(e)+'"]').length},maxSelections:function(){return m.maxSelections&&y.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=b.not(p.addition);return e.filter(p.unselectable).length===e.length},userSuggestion:function(){return 0<h.children(p.addition).length},query:function(){return""!==y.get.query()},value:function(e){return m.ignoreCase?y.has.valueIgnoringCase(e):y.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=y.get.values(!0);return!!(Array.isArray(t)?t&&-1!==te.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=y.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),te.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return v.hasClass(f.active)},animatingInward:function(){return h.transition("is inward")},animatingOutward:function(){return h.transition("is outward")},bubbledLabelClick:function(e){return te(e.target).is("select, input")&&0<v.closest("label").length},bubbledIconClick:function(e){return 0<te(e.target).closest(q).length},chrome:function(){return!(!ne.chrome||!ne.chrome.webstore&&!ne.chrome.runtime)},alreadySetup:function(){return v.is("select")&&v.parent(p.dropdown).data(E)!==oe&&0===v.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):h.transition&&h.transition("is animating")},leftward:function(e){return(e||h).hasClass(f.leftward)},clearable:function(){return v.hasClass(f.clearable)||m.clearable},disabled:function(){return v.hasClass(f.disabled)},focused:function(){return ie.activeElement===v[0]},focusedOnSearch:function(){return ie.activeElement===R[0]},allFiltered:function(){return(y.is.multiple()||y.has.search())&&!(0==m.hideAdditions&&y.has.userSuggestion())&&!y.has.message()&&y.has.allResultsFiltered()},hidden:function(e){return!y.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return te.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return v.hasClass(f.multiple)},remote:function(){return m.apiSettings&&y.can.useAPI()},noApiCache:function(){return m.apiSettings&&!m.apiSettings.cache},single:function(){return!y.is.multiple()},selectMutation:function(e){var n=!1;return te.each(e,function(e,t){if(te(t.target).is("select")||te(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return v.hasClass(f.search)},searchSelection:function(){return y.has.search()&&1===R.parent(p.dropdown).length},selection:function(){return v.hasClass(f.selection)},userValue:function(e){return-1!==te.inArray(e,y.get.userValues())},upward:function(e){return(e||v).hasClass(f.upward)},visible:function(e){return(e||h).hasClass(f.visible)},verticallyScrollableContext:function(){var e=D.get(0)!==ne&&D.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=D.get(0)!==ne&&D.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!m.useLabels||(!y.has.maxSelections()||!(!y.has.maxSelections()||!e.hasClass(f.active)))},openDownward:function(e){var t,e=e||h,n=!0;return e.addClass(f.loading),t={context:{offset:D.get(0)===ne?{top:0,left:0}:D.offset(),scrollTop:D.scrollTop(),height:D.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},y.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),y.has.subMenu(e)&&(t.menu.height+=e.find(p.menu).first().outerHeight()),n=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(y.verbose("Dropdown can fit in context downward",t),!0):t.above?(y.verbose("Dropdown cannot fit below, opening upward",t),!1):(y.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(f.loading),n},openRightward:function(e){var t,e=e||h,n=!0;return e.addClass(f.loading),t={context:{offset:D.get(0)===ne?{top:0,left:0}:D.offset(),scrollLeft:D.scrollLeft(),width:D.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},y.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(y.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(f.loading),n},click:function(){return K||"click"==m.on},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!y.is.disabled()&&(y.has.items()||y.has.message())},useAPI:function(){return te.fn.api!==oe}},animate:{show:function(e,t){var n=t||h,i=t?function(){}:function(){y.hideSubMenus(),y.hideOthers(),y.set.active()};e=te.isFunction(e)?e:function(){},y.verbose("Doing menu show animation",n),y.set.direction(t),t=m.transition.showMethod||y.get.transition(t),y.is.selection()&&y.set.scrollPosition(y.get.selectedItem(),!0),(y.is.hidden(n)||y.is.animating(n))&&("none"===t?(i(),n.transition({displayType:y.get.displayType()}).transition("show"),e.call(H)):te.fn.transition!==oe&&v.transition("is supported")?n.transition({animation:t+" in",debug:m.debug,verbose:m.verbose,duration:m.transition.showDuration||m.duration,queue:!0,onStart:i,displayType:y.get.displayType(),onComplete:function(){e.call(H)}}):y.error(T.noTransition,t))},hide:function(e,t){var n=t||h,i=t?function(){}:function(){y.can.click()&&y.unbind.intent(),y.remove.active()},t=m.transition.hideMethod||y.get.transition(t);e=te.isFunction(e)?e:function(){},(y.is.visible(n)||y.is.animating(n))&&(y.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:y.get.displayType()}).transition("hide"),e.call(H)):te.fn.transition!==oe&&v.transition("is supported")?n.transition({animation:t+" out",duration:m.transition.hideDuration||m.duration,debug:m.debug,verbose:m.verbose,queue:!1,onStart:i,displayType:y.get.displayType(),onComplete:function(){e.call(H)}}):y.error(T.transition))}},hideAndClear:function(){y.remove.searchTerm(),y.has.maxSelections()||(y.has.search()?y.hide(function(){y.remove.filteredItem()}):y.hide())},delay:{show:function(){y.verbose("Delaying show event to ensure user intent"),clearTimeout(y.timer),y.timer=setTimeout(y.show,m.delay.show)},hide:function(){y.verbose("Delaying hide event to ensure user intent"),clearTimeout(y.timer),y.timer=setTimeout(y.hide,m.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(k.quote),o=[];return i||!n?e:(y.debug("Encoding quote values for use in select",e),t?(te.each(e,function(e,t){o.push(t.replace(k.quote,"""))}),o):e.replace(k.quote,"""))},string:function(e){return(e=String(e)).replace(k.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(y.debug("Changing setting",e,t),te.isPlainObject(e))te.extend(!0,m,e);else{if(t===oe)return m[e];te.isPlainObject(m[e])?te.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(te.isPlainObject(e))te.extend(!0,y,e);else{if(t===oe)return y[e];y[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,m.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),y.verbose.apply(console,arguments)))},error:function(){m.silent||(y.error=Function.prototype.bind.call(console.error,console,m.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(G||t),G=t,Y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:H,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=m.name+":",n=0;G=!1,clearTimeout(y.performance.timer),te.each(Y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",$&&(e+=" '"+$+"'"),(console.group!==oe||console.table!==oe)&&0<Y.length&&(console.groupCollapsed(e),console.table?console.table(Y):te.each(Y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),Y=[]}},invoke:function(i,e,t){var o,a,n,r=U;return e=e||ee,t=H||t,"string"==typeof i&&r!==oe&&(i=i.split(/[\. ]/),o=i.length-1,te.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(te.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==oe)return a=r[n],!1;{if(!te.isPlainObject(r[t])||e==o)return r[t]!==oe?a=r[t]:y.error(T.method,i),!1;r=r[t]}}})),te.isFunction(a)?n=a.apply(t,e):a!==oe&&(n=a),Array.isArray(W)?W.push(n):W!==oe?W=[W,n]:n!==oe&&(W=n),a}};_?(U===oe&&y.initialize(),y.invoke(Z)):(U!==oe&&U.invoke("destroy"),y.initialize())}),W!==oe?W:Q},te.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:ne,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return te(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},te.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var o=e.placeholder||!1,a="",r=te.fn.dropdown.settings.templates.escape;return a=(a=(a=(a+='<i class="dropdown icon"></i>')+(o?'<div class="default text">'+r(o,n)+"</div>":'<div class="text"></div>'))+('<div class="'+i.menu+'">'))+te.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,l,c,u){var e=e[l.values]||[],d="",m=te.fn.dropdown.settings.templates.escape,f=te.fn.dropdown.settings.templates.deQuote;return te.each(e,function(e,t){var n,i,o,a,r=t[l.type]||"item",s=-1!==r.indexOf("menu");"item"===r||s?(n=t[l.text]?' data-text="'+f(t[l.text],!0)+'"':"",o=t[l.disabled]?u.disabled+" ":"",a=t[l.descriptionVertical]?u.descriptionVertical+" ":"",i=""!=m(t[l.description]||"",c),d+='<div class="'+o+a+(t[l.class]?f(t[l.class]):u.item)+'" data-value="'+f(t[l.value],!0)+'"'+n+">",s&&(d+='<i class="'+(-1!==r.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[l.image]&&(d+='<img class="'+(t[l.imageClass]?f(t[l.imageClass]):u.image)+'" src="'+f(t[l.image])+'">'),t[l.icon]&&(d+='<i class="'+f(t[l.icon])+" "+(t[l.iconClass]?f(t[l.iconClass]):u.icon)+'"></i>'),i&&(d=(d+='<span class="'+u.description+'">'+m(t[l.description]||"",c)+"</span>")+(s?"":'<span class="'+u.text+'">')),s&&(d+='<span class="'+u.text+'">'),d+=m(t[l.name]||"",c),s?d=(d=d+'</span><div class="'+r+'">')+te.fn.dropdown.settings.templates.menu(t,l,c,u)+"</div>":i&&(d+="</span>"),d+="</div>"):"header"===r&&(o=m(t[l.name]||"",c),a=t[l.icon]?f(t[l.icon]):u.groupIcon,""===o&&""===a||(d+='<div class="'+(t[l.class]?f(t[l.class]):u.header)+'">',""!==a&&(d+='<i class="'+a+" "+(t[l.iconClass]?f(t[l.iconClass]):u.icon)+'"></i>'),d=d+o+"</div>"),t[l.divider]&&(d+='<div class="'+u.divider+'"></div>'))}),d},label:function(e,t,n,i){return(0,te.fn.dropdown.settings.templates.escape)(t,n)+'<i class="'+i.delete+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(z,H,N,U){"use strict";z.isFunction=z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},H=void 0!==H&&H.Math==Math?H:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.modal=function(E){var D,e=z(this),F=z(H),R=z(N),O=z("body"),q=e.selector||"",I=(new Date).getTime(),L=[],M=E,P="string"==typeof M,V=[].slice.call(arguments,1),j=H.requestAnimationFrame||H.mozRequestAnimationFrame||H.webkitRequestAnimationFrame||H.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var a,o,n,i,t,m,f,e,g,p,r=z.isPlainObject(E)?z.extend(!0,{},z.fn.modal.settings,E):z.extend({},z.fn.modal.settings),s=r.selector,l=r.className,v=r.namespace,h=r.fields,b=r.error,y="."+v,x="module-"+v,c=z(this),w=z(r.context),C=c.find(s.close),u=this,S=c.hasClass("modal")?c.data(x):U,k=!1,T="",A="",d={initialize:function(){var a;c.hasClass("modal")||(d.create.modal(),z.isFunction(r.onHidden)||(r.onHidden=function(){d.destroy(),c.remove()})),c.addClass(r.class),""!==r.title&&c.find(s.title).html(d.helpers.escape(r.title,r.preserveHTML)).addClass(r.classTitle),""!==r.content&&c.find(s.content).html(d.helpers.escape(r.content,r.preserveHTML)).addClass(r.classContent),d.has.configActions()&&(0===(a=c.find(s.actions).addClass(r.classActions)).length?a=z("<div/>",{class:l.actions+" "+(r.classActions||"")}).appendTo(c):a.empty(),r.actions.forEach(function(e){var t=e[h.icon]?'<i class="'+d.helpers.deQuote(e[h.icon])+' icon"></i>':"",n=d.helpers.escape(e[h.text]||"",r.preserveHTML),i=d.helpers.deQuote(e[h.class]||""),o=e[h.click]&&z.isFunction(e[h.click])?e[h.click]:function(){};a.append(z("<button/>",{html:t+n,class:l.button+" "+i,click:function(){!1!==o.call(u,c)&&d.hide()}}))})),d.cache={},d.verbose("Initializing dimmer",w),d.create.id(),d.create.dimmer(),r.allowMultiple&&d.create.innerDimmer(),r.centered||c.addClass("top aligned"),d.refreshModals(),d.bind.events(),r.observeChanges&&d.observeChanges(),d.instantiate(),r.autoShow&&d.show()},instantiate:function(){d.verbose("Storing instance of modal"),S=d,c.data(x,S)},create:{modal:function(){c=z("<div/>",{class:l.modal}),r.closeIcon&&(C=z("<i/>",{class:l.close}),c.append(C)),""!==r.title&&z("<div/>",{class:l.title}).appendTo(c),""!==r.content&&z("<div/>",{class:l.content}).appendTo(c),d.has.configActions()&&z("<div/>",{class:l.actions}).appendTo(c),w.append(c)},dimmer:function(){var e={debug:r.debug,dimmerName:"modals"},e=z.extend(!0,e,r.dimmerSettings);z.fn.dimmer!==U?(d.debug("Creating dimmer"),i=w.dimmer(e),r.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",c)):d.set.undetached(),t=i.dimmer("get dimmer")):d.error(b.dimmer)},id:function(){g=(Math.random().toString(16)+"000000000").substr(2,8),e="."+g,d.verbose("Creating unique id for element",g)},innerDimmer:function(){0==c.find(s.dimmer).length&&c.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){p&&p.disconnect(),d.verbose("Destroying previous modal"),c.removeData(x).off(y),F.off(e),t.off(e),C.off(y),w.dimmer("destroy")},observeChanges:function(){"MutationObserver"in H&&((p=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(u,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",p))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){o=c.siblings(s.modal),a=o.add(c)},attachEvents:function(e,t){var n=z(e);t=z.isFunction(d[t])?d[t]:d.toggle,0<n.length?(d.debug("Attaching modal events to element",e,t),n.off(y).on("click"+y,t)):d.error(b.notFound,e)},bind:{events:function(){d.verbose("Attaching events"),c.on("click"+y,s.close,d.event.close).on("click"+y,s.approve,d.event.approve).on("click"+y,s.deny,d.event.deny),F.on("resize"+e,d.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",d.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",d.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return c},settings:function(){return r}},event:{approve:function(){k||!1===r.onApprove.call(u,z(this))?d.verbose("Approve callback returned false cancelling hide"):(k=!0,d.hide(function(){k=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){k||!1===r.onDeny.call(u,z(this))?d.verbose("Deny callback returned false cancelling hide"):(k=!0,d.hide(function(){k=!1}))},close:function(){d.hide()},mousedown:function(e){var t=z(e.target),n=d.is.rtl();(m=0<t.closest(s.modal).length)&&d.verbose("Mouse down event registered inside the modal"),(f=d.is.scrolling()&&(!n&&z(H).outerWidth()-r.scrollbarWidth<=e.clientX||n&&r.scrollbarWidth>=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(r.closable)if(m)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(f)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<z(e.target).closest(s.modal).length,e=z.contains(N.documentElement,e.target);if(!t&&e&&d.is.active()&&c.hasClass(l.front)){if(d.debug("Dimmer clicked, hiding all modals"),r.allowMultiple){if(!d.hideAll())return}else if(!d.hide())return;d.remove.clickaway()}}else d.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(d.timer),d.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(r.closable?(d.debug("Escape key pressed hiding modal"),c.hasClass(l.front)&&d.hide()):d.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(d.is.animating()||d.is.active())&&j(d.refresh)}},toggle:function(){d.is.active()||d.is.animating()?d.hide():d.show()},show:function(e){e=z.isFunction(e)?e:function(){},d.refreshModals(),d.set.dimmerSettings(),d.set.dimmerStyles(),d.showModal(e)},hide:function(e){return e=z.isFunction(e)?e:function(){},d.refreshModals(),d.hideModal(e)},showModal:function(e){e=z.isFunction(e)?e:function(){},d.is.animating()||!d.is.active()?(d.showDimmer(),d.cacheSizes(),d.set.bodyMargin(),d.can.useFlex()?d.remove.legacy():(d.set.legacy(),d.set.modalOffset(),d.debug("Using non-flex legacy modal positioning.")),d.set.screenHeight(),d.set.type(),d.set.clickaway(),!r.allowMultiple&&d.others.active()?d.hideOthers(d.showModal):(k=!1,r.allowMultiple&&(d.others.active()&&o.filter("."+l.active).find(s.dimmer).addClass("active"),r.detachable&&c.detach().appendTo(t)),r.onShow.call(u),r.transition&&z.fn.transition!==U&&c.transition("is supported")?(d.debug("Showing modal with css animations"),c.transition({debug:r.debug,animation:(r.transition.showMethod||r.transition)+" in",queue:r.queue,duration:r.transition.showDuration||r.duration,useFailSafe:!0,onComplete:function(){r.onVisible.apply(u),r.keyboardShortcuts&&d.add.keyboardShortcuts(),d.save.focus(),d.set.active(),r.autofocus&&d.set.autofocus(),e()}})):d.error(b.noTransition))):d.debug("Modal is already visible")},hideModal:function(e,t,n){var i=o.filter("."+l.active).last();if(e=z.isFunction(e)?e:function(){},d.debug("Hiding modal"),!1===r.onHide.call(u,z(this)))return d.verbose("Hide callback returned false cancelling hide"),k=!1;(d.is.animating()||d.is.active())&&(r.transition&&z.fn.transition!==U&&c.transition("is supported")?(d.remove.active(),c.transition({debug:r.debug,animation:(r.transition.hideMethod||r.transition)+" out",queue:r.queue,duration:r.transition.hideDuration||r.duration,useFailSafe:!0,onStart:function(){d.others.active()||d.others.animating()||t||d.hideDimmer(),r.keyboardShortcuts&&!d.others.active()&&d.remove.keyboardShortcuts()},onComplete:function(){d.unbind.scrollLock(),r.allowMultiple&&(i.addClass(l.front),c.removeClass(l.front),(n?a:i).find(s.dimmer).removeClass("active")),z.isFunction(r.onHidden)&&r.onHidden.call(u),d.remove.dimmerStyles(),d.restore.focus(),e()}})):d.error(b.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(d.save.bodyMargin(),d.debug("Showing dimmer"),i.dimmer("show")):d.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(d.unbind.scrollLock(),i.dimmer("hide",function(){d.restore.bodyMargin(),d.remove.clickaway(),d.remove.screenHeight()})):d.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=a.filter("."+l.active+", ."+l.animating);if(n=z.isFunction(n)?n:function(){},0<e.length)return d.debug("Hiding all visible modals"),i=!0,z(e.get().reverse()).each(function(e,t){i=i&&z(t).modal("hide modal",n,!1,!0)}),i&&d.hideDimmer(),i},hideOthers:function(e){var t=o.filter("."+l.active+", ."+l.animating);e=z.isFunction(e)?e:function(){},0<t.length&&(d.debug("Hiding other modals",o),t.modal("hide modal",e,!0))},others:{active:function(){return 0<o.filter("."+l.active).length},animating:function(){return 0<o.filter("."+l.animating).length}},add:{keyboardShortcuts:function(){d.verbose("Adding keyboard shortcuts"),R.on("keyup"+y,d.event.keyboard)}},save:{focus:function(){0<z(N.activeElement).closest(c).length||(n=z(N.activeElement).blur())},bodyMargin:function(){T=O.css("margin-"+(d.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(T.replace(/[^\d.]/g,"")),t=H.innerWidth-N.documentElement.clientWidth;A=e+t}},restore:{focus:function(){n&&0<n.length&&r.restoreFocus&&n.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";O.css("margin-"+n,T),O.find(s.bodyFixed.replace("right",n)).each(function(){var e=z(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){c.removeClass(l.active)},legacy:function(){c.removeClass(l.legacy)},clickaway:function(){r.detachable||c.off("mousedown"+e),t.off("mousedown"+e),t.off("mouseup"+e)},dimmerStyles:function(){t.removeClass(l.inverted),i.removeClass(l.blurring)},bodyStyle:function(){""===O.attr("style")&&(d.verbose("Removing style attribute"),O.removeAttr("style"))},screenHeight:function(){d.debug("Removing page height"),O.css("height","")},keyboardShortcuts:function(){d.verbose("Removing keyboard shortcuts"),R.off("keyup"+y)},scrolling:function(){i.removeClass(l.scrolling),c.removeClass(l.scrolling)}},cacheSizes:function(){c.addClass(l.loading);var e=c.prop("scrollHeight"),t=c.outerWidth(),n=c.outerHeight();d.cache.pageHeight!==U&&0===n||(z.extend(d.cache,{pageHeight:z(N).outerHeight(),width:t,height:n+r.offset,scrollHeight:e+r.offset,contextHeight:("body"==r.context?z(H):i).height()}),d.cache.topOffset=-d.cache.height/2),c.removeClass(l.loading),d.debug("Caching modal and container sizes",d.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return d.cache.leftBodyScrollbar===U&&(d.cache.leftBodyScrollbar=d.is.rtl()&&(d.is.iframe&&!d.is.firefox()||d.is.safari()||d.is.edge()||d.is.ie())),d.cache.leftBodyScrollbar},useFlex:function(){return"auto"===r.useFlex?r.detachable&&!d.is.ie():(r.useFlex&&d.is.ie()?d.debug("useFlex true is not supported in IE"):r.useFlex&&!r.detachable&&d.debug("useFlex true in combination with detachable false is not supported"),r.useFlex)},fit:function(){var e=d.cache.contextHeight,t=d.cache.contextHeight/2,n=d.cache.topOffset,i=d.cache.scrollHeight,o=d.cache.height,a=r.padding;return o<i?t+n+i+a<e:o+2*a<e}},has:{configActions:function(){return Array.isArray(r.actions)&&0<r.actions.length}},is:{active:function(){return c.hasClass(l.active)},ie:function(){var e,t;return d.cache.isIE===U&&(e=!H.ActiveXObject&&"ActiveXObject"in H,t="ActiveXObject"in H,d.cache.isIE=e||t),d.cache.isIE},animating:function(){return c.transition("is supported")?c.transition("is animating"):c.is(":visible")},scrolling:function(){return i.hasClass(l.scrolling)},modernBrowser:function(){return!(H.ActiveXObject||"ActiveXObject"in H)},rtl:function(){return d.cache.isRTL===U&&(d.cache.isRTL="rtl"===O.attr("dir")||"rtl"===O.css("direction")),d.cache.isRTL},safari:function(){return d.cache.isSafari===U&&(d.cache.isSafari=/constructor/i.test(H.HTMLElement)||!!H.ApplePaySession),d.cache.isSafari},edge:function(){return d.cache.isEdge===U&&(d.cache.isEdge=!!H.setImmediate&&!d.is.ie()),d.cache.isEdge},firefox:function(){return d.cache.isFirefox===U&&(d.cache.isFirefox=!!H.InstallTrigger),d.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=c.find("[tabindex], :input").filter(":visible").filter(function(){return 0===z(this).closest(".disabled").length}),t=e.filter("[autofocus]"),t=(0<t.length?t:e).first();0<t.length&&t.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";(r.detachable||d.can.fit())&&O.css("margin-"+n,A+"px"),O.find(s.bodyFixed.replace("right",n)).each(function(){var e=z(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+A+"px)")})},clickaway:function(){r.detachable||c.on("mousedown"+e,d.event.mousedown),t.on("mousedown"+e,d.event.mousedown),t.on("mouseup"+e,d.event.mouseup)},dimmerSettings:function(){var e;z.fn.dimmer!==U?(e={debug:r.debug,dimmerName:"modals",closable:"auto",useFlex:d.can.useFlex(),duration:{show:r.transition.showDuration||r.duration,hide:r.transition.hideDuration||r.duration}},e=z.extend(!0,e,r.dimmerSettings),r.inverted&&(e.variation=e.variation!==U?e.variation+" inverted":"inverted"),w.dimmer("setting",e)):d.error(b.dimmer)},dimmerStyles:function(){r.inverted?t.addClass(l.inverted):t.removeClass(l.inverted),r.blurring?i.addClass(l.blurring):i.removeClass(l.blurring)},modalOffset:function(){var e;r.detachable?c.css({marginTop:!c.hasClass("aligned")&&d.can.fit()?-d.cache.height/2:r.padding/2,marginLeft:-d.cache.width/2}):(e=d.can.fit(),c.css({top:!c.hasClass("aligned")&&e?z(N).scrollTop()+(d.cache.contextHeight-d.cache.height)/2:!e||c.hasClass("top")?z(N).scrollTop()+r.padding:z(N).scrollTop()+(d.cache.contextHeight-d.cache.height-r.padding),marginLeft:-d.cache.width/2})),d.verbose("Setting modal offset for legacy mode")},screenHeight:function(){d.can.fit()?O.css("height",""):c.hasClass("bottom")||(d.debug("Modal is taller than page content, resizing page height"),O.css("height",d.cache.height+2*r.padding))},active:function(){c.addClass(l.active+" "+l.front),o.filter("."+l.active).removeClass(l.front)},scrolling:function(){i.addClass(l.scrolling),c.addClass(l.scrolling),d.unbind.scrollLock()},legacy:function(){c.addClass(l.legacy)},type:function(){d.can.fit()?(d.verbose("Modal fits on screen"),d.others.active()||d.others.animating()||(d.remove.scrolling(),d.bind.scrollLock())):c.hasClass("bottom")?d.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(d.verbose("Modal cannot fit on screen setting to scrolling"),d.set.scrolling())},undetached:function(){i.addClass(l.undetached)}},setting:function(e,t){if(d.debug("Changing setting",e,t),z.isPlainObject(e))z.extend(!0,r,e);else{if(t===U)return r[e];z.isPlainObject(r[e])?z.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,d,e);else{if(t===U)return d[e];d[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,r.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),d.verbose.apply(console,arguments)))},error:function(){r.silent||(d.error=Function.prototype.bind.call(console.error,console,r.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(I||t),I=t,L.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=r.name+":",n=0;I=!1,clearTimeout(d.performance.timer),z.each(L,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",q&&(e+=" '"+q+"'"),(console.group!==U||console.table!==U)&&0<L.length&&(console.groupCollapsed(e),console.table?console.table(L):z.each(L,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),L=[]}},invoke:function(i,e,t){var o,a,n,r=S;return e=e||V,t=u||t,"string"==typeof i&&r!==U&&(i=i.split(/[\. ]/),o=i.length-1,z.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(z.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==U)return a=r[n],!1;{if(!z.isPlainObject(r[t])||e==o)return r[t]!==U&&(a=r[t]),!1;r=r[t]}}})),z.isFunction(a)?n=a.apply(t,e):a!==U&&(n=a),Array.isArray(D)?D.push(n):D!==U?D=[D,n]:n!==U&&(D=n),a}};P?(S===U&&(z.isFunction(r.templates[M])&&(r.autoShow=!0,r.className.modal=r.className.template,r=z.extend(!0,{},r,r.templates[M].apply(d,V)),l=r.className,r.namespace,h=r.fields,b=r.error),d.initialize()),z.isFunction(r.templates[M])||d.invoke(M)):(S!==U&&S.invoke("destroy"),d.initialize(),D=c)}),D!==U?D:this},z.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input"},text:{ok:"Ok",cancel:"Cancel"}},z.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return z.isPlainObject(e[0])?z.extend({handler:function(){},content:"",title:""},e[0]):(z.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var t=this,e=this.get.settings(),n=e.templates.getArguments(arguments);return 0===z(z.parseHTML(n.content)).filter(".ui.input").length&&(n.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(n.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(n.defaultValue||"")+'"></div></p>'),{title:n.title,content:n.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=t.get.settings(),e=t.get.element().find(e.selector.prompt)[0];n.handler(z(e).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){n.handler(null)}}]}}}}(jQuery,window,document),function(k,e,T,A){"use strict";k.isFunction=k.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k.fn.progress=function(v){var h,e=k(this),b=e.selector||"",y=(new Date).getTime(),x=[],w=v,C="string"==typeof w,S=[].slice.call(arguments,1);return e.each(function(){var r=k.isPlainObject(v)?k.extend(!0,{},k.fn.progress.settings,v):k.extend({},k.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,o=r.selector,s=r.error,a="."+e,f="module-"+e,i=k(this),c=k(this).find(o.bar),g=k(this).find(o.progress),p=k(this).find(o.label),l=this,u=i.data(f),d=!1,m={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var n=0,i=1,o=e/t;n<10&&!(1<(o*=i));)i=Math.pow(10,n++);return i},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){m.set.duration(),m.set.transitionEvent(),m.debug(l),m.read.metadata(),m.read.settings(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of progress",m),u=m,i.data(f,m)},destroy:function(){m.verbose("Destroying previous progress for",i),clearInterval(u.interval),m.remove.state(),i.removeData(f),u=A},reset:function(){m.remove.nextValue(),m.update.progress(0)},complete:function(e){(m.percent===A||m.percent<100)&&(m.remove.progressPoll(),!0!==e&&m.set.percent(100))},read:{metadata:function(){var e={percent:m.helper.forceArray(i.data(t.percent)),total:i.data(t.total),value:m.helper.forceArray(i.data(t.value))};e.total!==A&&(m.debug("Total value set from metadata",e.total),m.set.total(e.total)),0<e.value.length&&(m.debug("Current value set from metadata",e.value),m.set.value(e.value),m.set.progress(e.value)),0<e.percent.length&&(m.debug("Current percent value set from metadata",e.percent),m.set.percent(e.percent))},settings:function(){!1!==r.total&&(m.debug("Current total set in settings",r.total),m.set.total(r.total)),!1!==r.value&&(m.debug("Current value set in settings",r.value),m.set.value(r.value),m.set.progress(m.value)),!1!==r.percent&&(m.debug("Current percent set in settings",r.percent),m.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=m.get.transitionEnd();c.one(e+a,function(e){clearTimeout(m.failSafeTimer),t.call(this,e)}),m.failSafeTimer=setTimeout(function(){c.triggerHandler(e)},r.duration+r.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},increment:function(e){var t;e=m.has.total()?(t=m.get.value(),e||1):(t=m.get.percent(),e||m.get.randomValue()),m.debug("Incrementing percentage by",t,t=t+e,e),t=m.get.normalizedValue(t),m.set.progress(t)},decrement:function(e){var t,n;m.get.total()?(n=(t=m.get.value())-(e=e||1),m.debug("Decrementing value by",e,t)):(n=(t=m.get.percent())-(e=e||m.get.randomValue()),m.debug("Decrementing percentage by",e,t)),n=m.get.normalizedValue(n),m.set.progress(n)},has:{progressPoll:function(){return m.progressPoll},total:function(){return!1!==m.get.total()}},get:{text:function(e,t){var t=t||0,n=m.get.value(t),i=m.get.total(),o=d?m.get.displayPercent(t):m.get.percent(t),a=!1!==i?Math.max(0,i-n):100-o;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",a).replace("{percent}",o).replace("{bar}",r.text.bars[t]||""),m.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return m.debug("Value cannot decrement below 0"),0;if(m.has.total()){if(e>m.total)return m.debug("Value cannot increment above total",m.total),m.total}else if(100<e)return m.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return m.debug("Generating random increment percentage"),Math.floor(Math.random()*r.random.max+r.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=T.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==A)return n[e]},displayPercent:function(e){var e=k(c[e]),t=e.width(),n=i.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:m.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return m.percent&&m.percent[e||0]||0},value:function(e){return m.nextValue||m.value&&m.value[e||0]||0},total:function(){return m.total!==A&&m.total}},create:{progressPoll:function(){m.progressPoll=setTimeout(function(){m.update.toNextValue(),m.remove.progressPoll()},m.get.updateInterval())}},is:{complete:function(){return m.is.success()||m.is.warning()||m.is.error()},success:function(){return i.hasClass(n.success)},warning:function(){return i.hasClass(n.warning)},error:function(){return i.hasClass(n.error)},active:function(){return i.hasClass(n.active)},visible:function(){return i.is(":visible")}},remove:{progressPoll:function(){m.verbose("Removing progress poll timer"),m.progressPoll&&(clearTimeout(m.progressPoll),delete m.progressPoll)},nextValue:function(){m.verbose("Removing progress value stored for next update"),delete m.nextValue},state:function(){m.verbose("Removing stored state"),delete m.total,delete m.percent,delete m.value},active:function(){m.verbose("Removing active state"),i.removeClass(n.active)},success:function(){m.verbose("Removing success state"),i.removeClass(n.success)},warning:function(){m.verbose("Removing warning state"),i.removeClass(n.warning)},error:function(){m.verbose("Removing error state"),i.removeClass(n.error)}},set:{barWidth:function(e){m.debug("set bar width with ",e),e=m.helper.forceArray(e);var o=-1,a=-1,r=m.helper.sum(e),s=c.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=k(c[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1==o&&(o=t),a=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){k(c[t]).css({borderTopLeftRadius:t==o?"":0,borderBottomLeftRadius:t==o?"":0,borderTopRightRadius:t==a?"":0,borderBottomRightRadius:t==a?"":0})}),i.attr("data-percent",t)},duration:function(e){e=e||r.duration,m.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),c.css({"transition-duration":e})},percent:function(e){e=m.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,r.limitValues?Math.max(0,Math.min(100,e)):e});var t,n=m.has.total(),i=m.helper.sum(e),o=1<e.length&&n,a=m.helper.sum(m.helper.forceArray(m.value));o&&a>m.total?m.error(s.sumExceedsTotal,a,m.total):!o&&100<i?m.error(s.tooHigh,i):i<0?m.error(s.tooLow,i):(t=0<r.precision?r.precision:o?m.helper.derivePrecision(Math.min.apply(null,m.value),m.total):0,a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),m.percent=a,n&&(m.value=e.map(function(e){return 0<t?Math.round(e/100*m.total*(10*t))/(10*t):Math.round(e/100*m.total*10)/10})),m.set.barWidth(e),m.set.labelInterval()),r.onChange.call(l,e,m.value,m.total)},labelInterval:function(){clearInterval(m.interval),m.bind.transitionEnd(function(){m.verbose("Bar finished animating, removing continuous label updates"),clearInterval(m.interval),d=!1,m.set.labels()}),d=!0,m.interval=setInterval(function(){k.contains(T.documentElement,l)||(clearInterval(m.interval),d=!1),m.set.labels()},r.framerate)},labels:function(){m.verbose("Setting both bar progress and outer label text"),m.set.barLabel(),m.set.state()},label:function(e){(e=e||"")&&(e=m.get.text(e),m.verbose("Setting label to text",e),p.text(e))},state:function(e){100===(e=e!==A?e:m.helper.sum(m.percent))?r.autoSuccess&&1===c.length&&!(m.is.warning()||m.is.error()||m.is.success())?(m.set.success(),m.debug("Automatically triggering success at 100%")):(m.verbose("Reached 100% removing active state"),m.remove.active(),m.remove.progressPoll()):0<e?(m.verbose("Adjusting active progress bar label",e),m.set.active()):(m.remove.active(),m.set.label(r.text.active))},barLabel:function(n){g.map(function(e,t){t=k(t);n!==A?t.text(m.get.text(n,e)):"ratio"==r.label&&m.has.total()?(m.verbose("Adding ratio to bar label"),t.text(m.get.text(r.text.ratio,e))):"percent"==r.label&&(m.verbose("Adding percentage to bar label"),t.text(m.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,m.debug("Setting active state"),r.showActivity&&!m.is.active()&&i.addClass(n.active),m.remove.warning(),m.remove.error(),m.remove.success(),(e=r.onLabelUpdate("active",e,m.value,m.total))&&m.set.label(e),m.bind.transitionEnd(function(){r.onActive.call(l,m.value,m.total)})},success:function(e,t){e=e||r.text.success||r.text.active,m.debug("Setting success state"),i.addClass(n.success),m.remove.active(),m.remove.warning(),m.remove.error(),m.complete(t),e=r.text.success?r.onLabelUpdate("success",e,m.value,m.total):r.onLabelUpdate("active",e,m.value,m.total),m.set.label(e),m.bind.transitionEnd(function(){r.onSuccess.call(l,m.total)})},warning:function(e,t){e=e||r.text.warning,m.debug("Setting warning state"),i.addClass(n.warning),m.remove.active(),m.remove.success(),m.remove.error(),m.complete(t),(e=r.onLabelUpdate("warning",e,m.value,m.total))&&m.set.label(e),m.bind.transitionEnd(function(){r.onWarning.call(l,m.value,m.total)})},error:function(e,t){e=e||r.text.error,m.debug("Setting error state"),i.addClass(n.error),m.remove.active(),m.remove.success(),m.remove.warning(),m.complete(t),(e=r.onLabelUpdate("error",e,m.value,m.total))&&m.set.label(e),m.bind.transitionEnd(function(){r.onError.call(l,m.value,m.total)})},transitionEvent:function(){m.get.transitionEnd()},total:function(e){m.total=e},value:function(e){m.value=m.helper.forceArray(e)},progress:function(e){m.has.progressPoll()?(m.debug("Updated within interval, setting next update to use new value",e),m.set.nextValue(e)):(m.debug("First update in progress update interval, immediately updating",e),m.update.progress(e),m.create.progressPoll())},nextValue:function(e){m.nextValue=e}},update:{toNextValue:function(){var e=m.nextValue;e&&(m.debug("Update interval complete using last updated value",e),m.update.progress(e),m.remove.nextValue())},progress:function(e){var n=m.has.total(),e=(n&&m.set.value(e),m.helper.forceArray(e).map(function(e){var t;return!1===(e=m.get.numericValue(e))&&m.error(s.nonNumeric,e),e=m.get.normalizedValue(e),n?(t=0<m.total?e/m.total*100:100,m.debug("Calculating percent complete from total",t)):(t=e,m.debug("Setting value to exact percentage value",t)),t}));m.set.percent(e)}},setting:function(e,t){if(m.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,r,e);else{if(t===A)return r[e];k.isPlainObject(r[e])?k.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,m,e);else{if(t===A)return m[e];m[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,r.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),m.verbose.apply(console,arguments)))},error:function(){r.silent||(m.error=Function.prototype.bind.call(console.error,console,r.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(m.performance.timer),k.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==A||console.table!==A)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):k.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var o,a,n,r=u;return e=e||S,t=l||t,"string"==typeof i&&r!==A&&(i=i.split(/[\. ]/),o=i.length-1,k.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==A)return a=r[n],!1;{if(!k.isPlainObject(r[t])||e==o)return r[t]!==A?a=r[t]:m.error(s.method,i),!1;r=r[t]}}})),k.isFunction(a)?n=a.apply(t,e):a!==A&&(n=a),Array.isArray(h)?h.push(n):h!==A?h=[h,n]:n!==A&&(h=n),a}};C?(u===A&&m.initialize(),m.invoke(w)):(u!==A&&u.invoke("destroy"),m.initialize())}),h!==A?h:this},k.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multple values exceed total"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(I,L,M,P){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},L=void 0!==L&&L.Math==Math?L:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.sidebar=function(x){var w,e=I(this),C=I(L),S=I(M),k=I("html"),F=I("head"),T=e.selector||"",A=(new Date).getTime(),E=[],R=x,O="string"==typeof R,q=[].slice.call(arguments,1),D=L.requestAnimationFrame||L.mozRequestAnimationFrame||L.webkitRequestAnimationFrame||L.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,i,r,s=I.isPlainObject(x)?I.extend(!0,{},I.fn.sidebar.settings,x):I.extend({},I.fn.sidebar.settings),t=s.selector,l=s.className,f=s.namespace,g=s.regExp,p=s.error,v="."+f,h="module-"+f,c=I(this),n=I(s.context),b=c.children(t.sidebar),u=(n.children(t.fixed),n.children(t.pusher)),d=this,y=c.data(h),m={initialize:function(){m.debug("Initializing sidebar",x),m.create.id(),r=m.get.transitionEvent(),s.delaySetup?D(m.setup.layout):m.setup.layout(),D(function(){m.setup.cache()}),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),y=m,c.data(h,m)},create:{id:function(){e=(Math.random().toString(16)+"000000000").substr(2,8),a="."+e,m.verbose("Creating unique id for element",e)}},destroy:function(){m.verbose("Destroying previous module for",c),c.off(v).removeData(h),m.is.ios()&&m.remove.ios(),n.off(a),C.off(a),S.off(a)},event:{clickaway:function(e){var t;s.closable&&(t=0<u.find(e.target).length||u.is(e.target),e=n.is(e.target),t&&(m.verbose("User clicked on dimmed page"),m.hide()),e&&(m.verbose("User clicked on dimmable context (scaled out page)"),m.hide()))},touch:function(e){},containScroll:function(e){d.scrollTop<=0&&(d.scrollTop=1),d.scrollTop+d.offsetHeight>=d.scrollHeight&&(d.scrollTop=d.scrollHeight-d.offsetHeight-1)},scroll:function(e){0===I(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){m.verbose("Adding clickaway events to context",n),n.on("click"+a,m.event.clickaway).on("touchend"+a,m.event.clickaway)},scrollLock:function(){s.scrollLock&&(m.debug("Disabling page scroll"),C.on("DOMMouseScroll"+a,m.event.scroll)),m.verbose("Adding events to contain sidebar scroll"),S.on("touchmove"+a,m.event.touch),c.on("scroll"+v,m.event.containScroll)}},unbind:{clickaway:function(){m.verbose("Removing clickaway events from context",n),n.off(a)},scrollLock:function(){m.verbose("Removing scroll lock from page"),S.off(a),C.off(a),c.off("scroll"+v)}},add:{inlineCSS:function(){var e=m.cache.width||c.outerWidth(),t=m.cache.height||c.outerHeight(),n=m.is.rtl(),i=m.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(m.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(m.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),m.is.ie()&&("left"===i||"right"===i?(m.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),o=I(n+="</style>").appendTo(F),m.debug("Adding sizing css to head",o)}},refresh:function(){m.verbose("Refreshing selector cache"),n=I(s.context),b=n.children(t.sidebar),u=n.children(t.pusher),n.children(t.fixed),m.clear.cache()},refreshSidebars:function(){m.verbose("Refreshing other sidebars"),b=n.children(t.sidebar)},repaint:function(){m.verbose("Forcing repaint event"),d.style.display="none";d.offsetHeight;d.scrollTop=d.scrollTop,d.style.display=""},setup:{cache:function(){m.cache={width:c.outerWidth(),height:c.outerHeight()}},layout:function(){0===n.children(t.pusher).length&&(m.debug("Adding wrapper element for sidebar"),m.error(p.pusher),u=I('<div class="pusher" />'),n.children().not(t.omitted).not(b).wrapAll(u),m.refresh()),0!==c.nextAll(t.pusher).length&&c.nextAll(t.pusher)[0]===u[0]||(m.debug("Moved sidebar to correct parent element"),m.error(p.movedSidebar,d),c.detach().prependTo(n),m.refresh()),m.clear.cache(),m.set.pushable(),m.set.direction()}},attachEvents:function(e,t){var n=I(e);t=I.isFunction(m[t])?m[t]:m.toggle,0<n.length?(m.debug("Attaching sidebar events to element",e,t),n.on("click"+v,t)):m.error(p.notFound,e)},show:function(e){if(e=I.isFunction(e)?e:function(){},m.is.hidden()){if(m.refreshSidebars(),s.overlay&&(m.error(p.overlay),s.transition="overlay"),m.refresh(),m.othersActive())if(m.debug("Other sidebars currently visible"),s.exclusive){if("overlay"!=s.transition)return void m.hideOthers(m.show);m.hideOthers()}else s.transition="overlay";m.pushPage(function(){e.call(d),s.onShow.call(d)}),s.onChange.call(d),s.onVisible.call(d)}else m.debug("Sidebar is already visible")},hide:function(e){e=I.isFunction(e)?e:function(){},(m.is.visible()||m.is.animating())&&(m.debug("Hiding sidebar",e),m.refreshSidebars(),m.pullPage(function(){e.call(d),s.onHidden.call(d)}),s.onChange.call(d),s.onHide.call(d))},othersAnimating:function(){return 0<b.not(c).filter("."+l.animating).length},othersVisible:function(){return 0<b.not(c).filter("."+l.visible).length},othersActive:function(){return m.othersVisible()||m.othersAnimating()},hideOthers:function(e){var t=b.not(c).filter("."+l.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){m.verbose("Determining toggled direction"),m.is.hidden()?m.show():m.hide()},pushPage:function(t){var e,n,i=m.get.transition(),o="overlay"===i||m.othersActive()?c:u;t=I.isFunction(t)?t:function(){},"scale down"==s.transition&&m.scrollToTop(),m.set.transition(i),m.repaint(),i=function(){m.bind.clickaway(),m.add.inlineCSS(),m.set.animating(),m.set.visible()},e=function(){m.set.dimmed()},n=function(e){e.target==o[0]&&(o.off(r+a,n),m.remove.animating(),m.bind.scrollLock(),t.call(d))},o.off(r+a),o.on(r+a,n),D(i),s.dimPage&&!m.othersVisible()&&D(e)},pullPage:function(t){var e,n,i=m.get.transition(),o="overlay"==i||m.othersActive()?c:u;t=I.isFunction(t)?t:function(){},m.verbose("Removing context push state",m.get.direction()),m.unbind.clickaway(),m.unbind.scrollLock(),e=function(){m.set.transition(i),m.set.animating(),m.remove.visible(),s.dimPage&&!m.othersVisible()&&u.removeClass(l.dimmed)},n=function(e){e.target==o[0]&&(o.off(r+a,n),m.remove.animating(),m.remove.transition(),m.remove.inlineCSS(),("scale down"==i||s.returnScroll&&m.is.mobile())&&m.scrollBack(),t.call(d))},o.off(r+a),o.on(r+a,n),D(e)},scrollToTop:function(){m.verbose("Scrolling to top of page to avoid animation issues"),i=I(L).scrollTop(),c.scrollTop(0),L.scrollTo(0,0)},scrollBack:function(){m.verbose("Scrolling back to original page position"),L.scrollTo(0,i)},clear:{cache:function(){m.verbose("Clearing cached dimensions"),m.cache={}}},set:{ios:function(){k.addClass(l.ios)},pushed:function(){n.addClass(l.pushed)},pushable:function(){n.addClass(l.pushable)},dimmed:function(){u.addClass(l.dimmed)},active:function(){c.addClass(l.active)},animating:function(){c.addClass(l.animating)},transition:function(e){e=e||m.get.transition(),c.addClass(e)},direction:function(e){e=e||m.get.direction(),c.addClass(l[e])},visible:function(){c.addClass(l.visible)},overlay:function(){c.addClass(l.overlay)}},remove:{inlineCSS:function(){m.debug("Removing inline css styles",o),o&&0<o.length&&o.remove()},ios:function(){k.removeClass(l.ios)},pushed:function(){n.removeClass(l.pushed)},pushable:function(){n.removeClass(l.pushable)},active:function(){c.removeClass(l.active)},animating:function(){c.removeClass(l.animating)},transition:function(e){e=e||m.get.transition(),c.removeClass(e)},direction:function(e){e=e||m.get.direction(),c.removeClass(l[e])},visible:function(){c.removeClass(l.visible)},overlay:function(){c.removeClass(l.overlay)}},get:{direction:function(){return c.hasClass(l.top)?l.top:c.hasClass(l.right)?l.right:c.hasClass(l.bottom)?l.bottom:l.left},transition:function(){var e=m.get.direction(),e=m.is.mobile()?"auto"==s.mobileTransition?s.defaultTransition.mobile[e]:s.mobileTransition:"auto"==s.transition?s.defaultTransition.computer[e]:s.transition;return m.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=M.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==P)return n[e]}},is:{ie:function(){var e=!L.ActiveXObject&&"ActiveXObject"in L,t="ActiveXObject"in L;return e||t},ios:function(){var e=navigator.userAgent,t=e.match(g.ios),n=e.match(g.mobileChrome);return!(!t||n)&&(m.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(g.mobile)?(m.verbose("Browser was found to be mobile",e),!0):(m.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!m.is.visible()},visible:function(){return c.hasClass(l.visible)},open:function(){return m.is.visible()},closed:function(){return m.is.hidden()},vertical:function(){return c.hasClass(l.top)},animating:function(){return n.hasClass(l.animating)},rtl:function(){return m.cache.rtl===P&&(m.cache.rtl="rtl"===c.attr("dir")||"rtl"===c.css("direction")),m.cache.rtl}},setting:function(e,t){if(m.debug("Changing setting",e,t),I.isPlainObject(e))I.extend(!0,s,e);else{if(t===P)return s[e];I.isPlainObject(s[e])?I.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,m,e);else{if(t===P)return m[e];m[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,s.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),m.verbose.apply(console,arguments)))},error:function(){s.silent||(m.error=Function.prototype.bind.call(console.error,console,s.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=s.name+":",n=0;A=!1,clearTimeout(m.performance.timer),I.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",T&&(e+=" '"+T+"'"),(console.group!==P||console.table!==P)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):I.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var o,a,n,r=y;return e=e||q,t=d||t,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),o=i.length-1,I.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==P)return a=r[n],!1;{if(!I.isPlainObject(r[t])||e==o)return r[t]!==P?a=r[t]:m.error(p.method,i),!1;r=r[t]}}})),I.isFunction(a)?n=a.apply(t,e):a!==P&&(n=a),Array.isArray(w)?w.push(n):w!==P?w=[w,n]:n!==P&&(w=n),a}};O?(y===P&&m.initialize(),m.invoke(R)):(y!==P&&m.invoke("destroy"),m.initialize())}),w!==P?w:this},I.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(F,e,R){"use strict";F.isFunction=F.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.toast=function(w){var C,e=F(this),S=e.selector||"",k=(new Date).getTime(),T=[],A=w,E="string"==typeof A,D=[].slice.call(arguments,1);return e.each(function(){var n,i,a,o,m,r,f,s=F.isPlainObject(w)?F.extend(!0,{},F.fn.toast.settings,w):F.extend({},F.fn.toast.settings),l=s.className,g=s.selector,p=s.error,e=s.namespace,v=s.fields,t="."+e,h=e+"-module",c=F(this),b=s.context?F(s.context):F("body"),y=c.hasClass("toast")||c.hasClass("message")||c.hasClass("card"),u=this,x=y?c.data(h):R,d={initialize:function(){d.verbose("Initializing element"),d.has.container()||d.create.container(),(y||""!==s.message||""!==s.title||""!==d.get.iconClass()||s.showImage||d.has.configActions())&&("string"==typeof s.showProgress&&-1!==[l.top,l.bottom].indexOf(s.showProgress)||(s.showProgress=!1),d.create.toast(),s.closeOnClick&&(s.closeIcon||0<F(i).find(g.input).length||d.has.configActions())&&(s.closeOnClick=!1),s.closeOnClick||n.addClass(l.unclickable),d.bind.events()),d.instantiate(),n&&d.show()},instantiate:function(){d.verbose("Storing instance of toast"),x=d,c.data(h,x)},destroy:function(){n&&(d.debug("Removing toast",n),d.unbind.events(),n.remove(),r=i=n=R,s.onRemove.call(n,u),f=m=o=R),c.removeData(h)},show:function(e){e=e||function(){},d.debug("Showing toast"),!1!==s.onShow.call(n,u)?d.animate.show(e):d.debug("onShow callback returned false, cancelling toast animation")},close:function(e){e=e||function(){},d.remove.visible(),d.unbind.events(),d.animate.close(e)},create:{container:function(){d.verbose("Creating container"),b.append(F("<div/>",{class:s.position+" "+l.container+" "+(s.horizontal?l.horizontal:"")}))},toast:function(){n=F("<div/>",{class:l.box});var e,t=d.get.iconClass();y?(i=s.cloneModule?c.clone().removeAttr("id"):c,f=i.find("> i"+d.helpers.toClass(l.close)),s.closeIcon=0<f.length,""!==t&&i.find(g.icon).attr("class",t+" "+l.icon),s.showImage&&i.find(g.image).attr("src",s.showImage),""!==s.title&&i.find(g.title).html(d.helpers.escape(s.title,s.preserveHTML)),""!==s.message&&i.find(g.message).html(d.helpers.escape(s.message,s.preserveHTML))):(d.verbose("Creating toast"),i=F("<div/>"),e=F("<div/>",{class:l.content}),""!==t&&i.append(F("<i/>",{class:t+" "+l.icon})),s.showImage&&i.append(F("<img>",{class:l.image+" "+s.classImage,src:s.showImage})),""!==s.title&&e.append(F("<div/>",{class:l.title,text:s.title})),e.append(F("<div/>",{class:l.message,html:d.helpers.escape(s.message,s.preserveHTML)})),i.addClass(s.class+" "+l.toast).append(e),i.css("opacity",s.opacity),s.closeIcon&&((f=F("<i/>",{class:l.close+" "+("string"==typeof s.closeIcon?s.closeIcon:"")})).hasClass(l.left)?i.prepend(f):i.append(f))),i.hasClass(l.compact)&&(s.compact=!0),i.hasClass("card")&&(s.compact=!1),a=i.find(".actions"),d.has.configActions()&&(0===a.length&&(a=F("<div/>",{class:l.actions+" "+(s.classActions||"")}).appendTo(i)),i.hasClass("card")&&!a.hasClass(l.attached)&&(a.addClass(l.extraContent),a.hasClass(l.vertical)&&(a.removeClass(l.vertical),d.error(p.verticalCard))),s.actions.forEach(function(e){var t=e[v.icon]?'<i class="'+d.helpers.deQuote(e[v.icon])+' icon"></i>':"",n=d.helpers.escape(e[v.text]||"",s.preserveHTML),i=d.helpers.deQuote(e[v.class]||""),o=e[v.click]&&F.isFunction(e[v.click])?e[v.click]:function(){};a.append(F("<button/>",{html:t+n,class:l.button+" "+i,click:function(){!1!==o.call(u,c)&&d.close()}}))})),a&&a.hasClass(l.vertical)&&i.addClass(l.vertical),0<a.length&&!a.hasClass(l.attached)&&(!a||a.hasClass(l.basic)&&!a.hasClass(l.left)||i.addClass(l.actions)),"auto"===s.displayTime&&(s.displayTime=Math.max(s.minDisplayTime,i.text().split(" ").length/s.wordsPerMinute*6e4)),n.append(i),0<a.length&&a.hasClass(l.attached)&&(a.addClass(l.buttons),a.detach(),i.addClass(l.attached),a.hasClass(l.vertical)?(i.wrap(F("<div/>",{class:l.vertical+" "+l.attached+" "+(s.compact?l.compact:"")})),a.hasClass(l.left)?i.addClass(l.left).parent().addClass(l.left).prepend(a):i.parent().append(a)):a.hasClass(l.top)?(n.prepend(a),i.addClass(l.bottom)):(n.append(a),i.addClass(l.top))),c!==i&&(u=(c=i)[0]),0<s.displayTime&&(t=l.progressing+" "+(s.pauseOnHover?l.pausable:""),s.showProgress&&(o=F("<div/>",{class:l.progress+" "+(s.classProgress||s.class),"data-percent":""}),s.classProgress||(i.hasClass("toast")&&!i.hasClass(l.inverted)?o.addClass(l.inverted):o.removeClass(l.inverted)),m=F("<div/>",{class:"bar "+(s.progressUp?"up ":"down ")+t}),o.addClass(s.showProgress).append(m),o.hasClass(l.top)?n.prepend(o):n.append(o),m.css("animation-duration",s.displayTime/1e3+"s")),(r=F("<span/>",{class:"wait "+t})).css("animation-duration",s.displayTime/1e3+"s"),r.appendTo(i)),s.compact&&(n.addClass(l.compact),i.addClass(l.compact),o&&o.addClass(l.compact)),s.newestOnTop?n.prependTo(d.get.container()):n.appendTo(d.get.container())}},bind:{events:function(){d.debug("Binding events to toast"),(s.closeOnClick||s.closeIcon)&&(s.closeIcon?f:i).on("click"+t,d.event.click),r&&r.on("animationend"+t,d.close),n.on("click"+t,g.approve,d.event.approve).on("click"+t,g.deny,d.event.deny)}},unbind:{events:function(){d.debug("Unbinding events to toast"),(s.closeOnClick||s.closeIcon)&&(s.closeIcon?f:i).off("click"+t),r&&r.off("animationend"+t),n.off("click"+t)}},animate:{show:function(e){e=F.isFunction(e)?e:function(){},s.transition&&d.can.useElement("transition")&&c.transition("is supported")&&(d.set.visible(),n.transition({animation:s.transition.showMethod+" in",queue:!1,debug:s.debug,verbose:s.verbose,duration:s.transition.showDuration,onComplete:function(){e.call(n,u),s.onVisible.call(n,u)}}))},close:function(e){e=F.isFunction(e)?e:function(){},d.debug("Closing toast"),!1!==s.onHide.call(n,u)?s.transition&&F.fn.transition!==R&&c.transition("is supported")?n.transition({animation:s.transition.hideMethod+" out",queue:!1,duration:s.transition.hideDuration,debug:s.debug,verbose:s.verbose,interval:50,onBeforeHide:function(e){e=F.isFunction(e)?e:function(){},""!==s.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(s.transition.closeDuration,s.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,u),s.onHidden.call(n,u),d.destroy()}}):d.error(p.noTransition):d.debug("onHide callback returned false, cancelling toast animation")},pause:function(){r.css("animationPlayState","paused"),m&&m.css("animationPlayState","paused")},continue:function(){r.css("animationPlayState","running"),m&&m.css("animationPlayState","running")}},has:{container:function(){return d.verbose("Determining if there is already a container"),0<b.find(d.helpers.toClass(s.position)+g.container+(s.horizontal?d.helpers.toClass(l.horizontal):"")).length},toast:function(){return!!d.get.toast()},toasts:function(){return 0<d.get.toasts().length},configActions:function(){return Array.isArray(s.actions)&&0<s.actions.length}},get:{container:function(){return b.find(d.helpers.toClass(s.position)+g.container)[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return F(d.get.container()).find(g.box)},iconClass:function(){return"string"==typeof s.showIcon?s.showIcon:s.showIcon&&s.icons[s.class]?s.icons[s.class]:""},remainingTime:function(){return r?r.css("opacity")*s.displayTime:0}},set:{visible:function(){i.addClass(l.visible)}},remove:{visible:function(){i.removeClass(l.visible)}},event:{click:function(e){0===F(e.target).closest("a").length&&(s.onClick.call(n,u),d.close())},approve:function(){!1!==s.onApprove.call(u,c)?d.close():d.verbose("Approve callback returned false cancelling close")},deny:function(){!1!==s.onDeny.call(u,c)?d.close():d.verbose("Deny callback returned false cancelling close")}},helpers:{toClass:function(e){var e=e.split(" "),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return F.fn[e]!==R||(d.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(d.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,s,e);else{if(t===R)return s[e];F.isPlainObject(s[e])?F.extend(!0,s[e],t):s[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,d,e);else{if(t===R)return d[e];d[e]=t}},debug:function(){!s.silent&&s.debug&&(s.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,s.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!s.silent&&s.verbose&&s.debug&&(s.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),d.verbose.apply(console,arguments)))},error:function(){s.silent||(d.error=Function.prototype.bind.call(console.error,console,s.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;s.performance&&(n=(t=(new Date).getTime())-(k||t),k=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=s.name+":",n=0;k=!1,clearTimeout(d.performance.timer),F.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),(console.group!==R||console.table!==R)&&0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):F.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(i,e,t){var o,a,n,r=x;return e=e||D,t=u||t,"string"==typeof i&&r!==R&&(i=i.split(/[\. ]/),o=i.length-1,F.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==R)return a=r[n],!1;{if(!F.isPlainObject(r[t])||e==o)return r[t]!==R?a=r[t]:d.error(p.method,i),!1;r=r[t]}}})),F.isFunction(a)?n=a.apply(t,e):a!==R&&(n=a),Array.isArray(C)?C.push(n):C!==R?C=[C,n]:n!==R&&(C=n),a}};E?(x===R&&d.initialize(),d.invoke(A)):(x!==R&&x.invoke("destroy"),d.initialize(),C=c)}),C!==R?C:this},F.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},F.extend(F.easing,{easeOutBounce:function(e,t,n,i,o){return(t/=o)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,void document),function(I,L,M,P){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},L=void 0!==L&&L.Math==Math?L:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.form=function(S){var k,T=I(this),A=T.selector||"",E=(new Date).getTime(),D=[],F=S,R=arguments[1],O="string"==typeof F,q=[].slice.call(arguments,1);return T.each(function(){var n,d,t,e,m,l,f,g,p,i,u,o,a,s,h,c=I(this),b=this,y=[],x=!1,r=!1,w=!1,C=["clean","clean"],v={initialize:function(){v.get.settings(),O?(h===P&&v.instantiate(),v.invoke(F)):(h!==P&&(h.invoke("destroy"),v.refresh()),v.verbose("Initializing form validation",c,m),v.bindEvents(),v.set.defaults(),m.autoCheckRequired&&v.set.autoCheck(),v.instantiate())},instantiate:function(){v.verbose("Storing instance of module",v),h=v,c.data(a,v)},destroy:function(){v.verbose("Destroying previous module",h),v.removeEvents(),c.removeData(a)},refresh:function(){v.verbose("Refreshing selector cache"),n=c.find(g.field),d=c.find(g.group),t=c.find(g.message),c.find(g.prompt),e=c.find(g.submit),c.find(g.clear),c.find(g.reset)},submit:function(){v.verbose("Submitting form",c),r=!0,c.submit()},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+s,function(e){v[t](),e.preventDefault()})},bindEvents:function(){v.verbose("Attaching form events"),c.on("submit"+s,v.validate.form).on("blur"+s,g.field,v.event.field.blur).on("click"+s,g.submit,v.submit).on("click"+s,g.reset,v.reset).on("click"+s,g.clear,v.clear),m.keyboardShortcuts&&c.on("keydown"+s,g.field,v.event.field.keydown),n.each(function(e,t){var t=I(t),n=t.prop("type"),n=v.get.changeEvent(n,t);t.on(n+s,v.event.field.change)}),m.preventLeaving&&I(L).on("beforeunload"+s,v.event.beforeUnload),n.on("change click keyup keydown blur",function(e){v.determine.isDirty()}),c.on("dirty"+s,function(e){m.onDirty.call()}),c.on("clean"+s,function(e){m.onClean.call()})},clear:function(){n.each(function(c,e){var e=I(e),t=e.parent(),n=e.closest(d),i=n.find(g.prompt),o=e.closest(g.uiCalendar),a=e.data(f.defaultValue)||"",r=t.is(g.uiCheckbox),s=t.is(g.uiDropdown)&&v.can.useElement("dropdown"),l=0<o.length&&v.can.useElement("calendar");n.hasClass(p.error)&&(v.verbose("Resetting error on field",n),n.removeClass(p.error),i.remove()),s?(v.verbose("Resetting dropdown value",t,a),t.dropdown("clear",!0)):r?e.prop("checked",!1):l?o.calendar("clear"):(v.verbose("Resetting field value",e,a),e.val(""))}),v.remove.states()},reset:function(){n.each(function(u,e){var e=I(e),t=e.parent(),n=e.closest(d),i=e.closest(g.uiCalendar),o=n.find(g.prompt),a=e.data(f.defaultValue),r=t.is(g.uiCheckbox),s=t.is(g.uiDropdown)&&v.can.useElement("dropdown"),l=0<i.length&&v.can.useElement("calendar"),c=n.hasClass(p.error);a!==P&&(c&&(v.verbose("Resetting error on field",n),n.removeClass(p.error),o.remove()),s?(v.verbose("Resetting dropdown value",t,a),t.dropdown("restore defaults",!0)):r?(v.verbose("Resetting checkbox value",t,a),e.prop("checked",a)):l?i.calendar("set date",a):(v.verbose("Resetting field value",e,a),e.val(a)))}),v.remove.states()},determine:{isValid:function(){var n=!0;return I.each(l,function(e,t){v.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;n.each(function(e,t){var t=I(t),n=0<t.filter(g.checkbox).length?v.is.checkboxDirty(t):v.is.fieldDirty(t);t.data(m.metadata.isDirty,n),i|=n}),i?v.set.dirty():v.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(m.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(g.checkbox)?!e.is(":checked"):v.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(v.verbose("Checking if field is valid",e),v.validate.field(l[e],e,!!n)):(v.verbose("Checking if form is valid"),I.each(l,function(e,t){v.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return w},clean:function(){return!w},fieldDirty:function(e){var t=e.data(f.defaultValue),e=(null==t?t="":Array.isArray(t)&&(t=t.toString()),e.val()),n=(null==e?e="":Array.isArray(e)&&(e=e.toString()),/^(true|false)$/i);return n.test(t)&&n.test(e)?!new RegExp("^"+t+"$","i").test(e):e!==t},checkboxDirty:function(e){return e.data(f.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===C[0]},justClean:function(){return"clean"===C[0]}},removeEvents:function(){c.off(s),n.off(s),e.off(s),n.off(s)},event:{field:{keydown:function(e){var t=I(this),n=e.which,i=t.is(g.input),o=t.is(g.checkbox),a=0<t.closest(g.uiDropdown).length,r=13;n==27&&(v.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||a||o||(x||(t.one("keyup"+s,v.event.field.keyup),v.submit(),v.debug("Enter pressed on input submitting form")),x=!0)},keyup:function(){x=!1},blur:function(e){var t=I(this),n=t.closest(d),i=v.get.validation(t);i&&("blur"==m.on||n.hasClass(p.error)&&m.revalidate)&&(v.debug("Revalidating field",t,i),v.validate.field(i),m.inline||v.validate.form(!1,!0))},change:function(e){var t=I(this),n=t.closest(d),i=v.get.validation(t);i&&("change"==m.on||n.hasClass(p.error)&&m.revalidate)&&(clearTimeout(v.timer),v.timer=setTimeout(function(){v.debug("Revalidating field",t,i),v.validate.field(i),m.inline||v.validate.form(!1,!0)},m.delay))}},beforeUnload:function(e){if(v.is.dirty()&&!r)return(e=e||L.event)&&(e.returnValue=m.text.leavingMessage),m.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!v.is.bracketedRule(e))&&(e.value!==P?e.value:e.type.match(m.regExp.bracket)[1]+"")},ruleName:function(e){return v.is.bracketedRule(e)?e.type.replace(e.type.match(m.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":v.get.inputEvent()},inputEvent:function(){return M.createElement("input").oninput!==P?"input":M.createElement("input").onpropertychange!==P?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return I.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},I.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=v.get.ruleName(e),o=v.get.ancillaryValue(e),a=v.get.field(t.identifier),r=a.val(),r=I.isFunction(e.prompt)?e.prompt(r):e.prompt||m.prompt[i]||m.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return o&&0<=o.indexOf("..")&&(n=o.split("..",2),e.prompt||(r+=(""===n[0]?m.prompt.maxValue.replace(/\{ruleValue\}/g,"{max}"):""===n[1]?m.prompt.minValue.replace(/\{ruleValue\}/g,"{min}"):m.prompt.range).replace(/\{name\}/g," "+m.text.and)),r=(r=r.replace(/\{min\}/g,n[0])).replace(/\{max\}/g,n[1])),s&&(r=r.replace(/\{value\}/g,a.val())),l&&(s=1==(n=a.closest(g.group).find("label").eq(0)).length?n.text():a.prop("placeholder")||m.text.unspecifiedField,r=r.replace(/\{name\}/g,s)),r=(r=r.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,o),e.prompt||v.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;I.isPlainObject(S)?0<(e=Object.keys(S)).length&&(S[e[0]].identifier!==P&&S[e[0]].rules!==P)?(m=I.extend(!0,{},I.fn.form.settings,R),l=I.extend({},I.fn.form.settings.defaults,S),v.error(m.error.oldSyntax,b),v.verbose("Extending settings from legacy parameters",l,m)):(S.fields&&(S.fields=v.get.fieldsFromShorthand(S.fields)),m=I.extend(!0,{},I.fn.form.settings,S),l=I.extend({},I.fn.form.settings.defaults,m.fields),v.verbose("Extending settings",l,m)):(m=I.fn.form.settings,l=I.fn.form.settings.defaults,v.verbose("Using default form validation",l,m)),o=m.namespace,f=m.metadata,g=m.selector,p=m.className,i=m.regExp,u=m.error,a="module-"+o,s="."+o,((h=c.data(a))||v).refresh()},field:function(e){var t;return v.verbose("Finding field with identifier",e),e=v.escape.string(e),0<(t=n.filter("#"+e)).length||0<(t=n.filter('[name="'+e+'"]')).length||0<(t=n.filter('[name="'+e+'[]"]')).length||0<(t=n.filter("[data-"+f.validate+'="'+e+'"]')).length?t:I("<input/>")},fields:function(e){var n=I();return I.each(e,function(e,t){n=n.add(v.get.field(t))}),n},validation:function(i){var o,a;return!!l&&(I.each(l,function(e,n){a=n.identifier||e,I.each(v.get.field(a),function(e,t){if(t==i[0])return n.identifier=a,o=n,!1})}),o||!1)},value:function(e){var t=[];return t.push(e),v.get.values.call(b,t)[e]},values:function(e){var e=Array.isArray(e)?v.get.fields(e):n,d={};return e.each(function(u,e){var e=I(e),t=e.closest(g.uiCalendar),n=e.prop("name"),i=e.val(),o=e.is(g.checkbox),a=e.is(g.radio),r=-1!==n.indexOf("[]"),s=0<t.length&&v.can.useElement("calendar"),e=!!o&&e.is(":checked");if(n)if(r)n=n.replace("[]",""),d[n]||(d[n]=[]),o?e?d[n].push(i||!0):d[n].push(!1):d[n].push(i);else if(a)d[n]!==P&&!1!==d[n]||(d[n]=!!e&&(i||!0));else if(o)d[n]=!!e&&(i||!0);else if(s){var l=t.calendar("get date");if(null!==l){if("date"==m.dateHandling)d[n]=l;else if("input"==m.dateHandling)d[n]=t.calendar("get input date");else if("formatter"==m.dateHandling){var c=t.calendar("setting","type");switch(c){case"date":d[n]=m.formatter.date(l);break;case"datetime":d[n]=m.formatter.datetime(l);break;case"time":d[n]=m.formatter.time(l);break;case"month":d[n]=m.formatter.month(l);break;case"year":d[n]=m.formatter.year(l);break;default:v.debug("Wrong calendar mode",t,c),d[n]=""}}}else d[n]=""}else d[n]=i}),d},dirtyFields:function(){return n.filter(function(e,t){return I(t).data(f.isDirty)})}},has:{field:function(e){return v.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=v.escape.string(e))&&v.error(u.identifier,e),0<n.filter("#"+e).length||(0<n.filter('[name="'+e+'"]').length||0<n.filter("[data-"+f.validate+'="'+e+'"]').length)}},can:{useElement:function(e){return I.fn[e]!==P||(v.error(u.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){v.add.field(e,t)},field:function(n,e){l[n]!==P&&l[n].rules!==P||(l[n]={rules:[]});var i={rules:[]};v.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],I.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,I.each(i.rules,function(e,t){0==I.grep(l[n].rules,function(e){return e.type==t.type}).length&&l[n].rules.push(t)}),v.debug("Adding rules",i.rules,l)},fields:function(e){l=I.extend({},l,v.get.fieldsFromShorthand(e))},prompt:function(e,t,n){var i=v.get.field(e).closest(d),o=i.children(g.prompt),a=0!==o.length;t="string"==typeof t?[t]:t,v.verbose("Adding field error state",e),n||i.addClass(p.error),m.inline&&(a||(o=m.templates.prompt(t,p.label)).appendTo(i),o.html(t[0]),a?v.verbose("Inline errors are disabled, no inline error added",e):m.transition&&v.can.useElement("transition")&&c.transition("is supported")?(v.verbose("Displaying error with css transition",m.transition),o.transition(m.transition+" in",m.duration)):(v.verbose("Displaying error with fallback javascript animation"),o.fadeIn(m.duration)))},errors:function(e){v.debug("Adding form error messages",e),v.set.error(),t.html(m.templates.error(e))}},remove:{errors:function(){v.debug("Removing form error messages"),t.empty()},states:function(){c.removeClass(p.error).removeClass(p.success),m.inline||v.remove.errors(),v.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];if(l[n]!==P&&Array.isArray(l[n].rules))return e===P?(v.debug("Removed all rules"),void(l[n].rules=[])):void I.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(v.debug("Removed rule",t.type),l[n].rules.splice(e,1))})},field:function(e){e=Array.isArray(e)?e:[e];I.each(e,function(e,t){v.remove.rule(t)})},rules:function(e,n){Array.isArray(e)?I.each(e,function(e,t){v.remove.rule(t,n)}):v.remove.rule(e,n)},fields:function(e){v.remove.field(e)},prompt:function(e){var t=v.get.field(e).closest(d),n=t.children(g.prompt);t.removeClass(p.error),m.inline&&n.is(":visible")&&(v.verbose("Removing prompt for field",e),m.transition&&v.can.useElement("transition")&&c.transition("is supported")?n.transition(m.transition+" out",m.duration,function(){n.remove()}):n.fadeOut(m.duration,function(){n.remove()}))}},set:{success:function(){c.removeClass(p.error).addClass(p.success)},defaults:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=0<t.filter(g.checkbox).length,o=n.is(g.uiDropdown)&&v.can.useElement("dropdown"),a=t.closest(g.uiCalendar),r=0<a.length&&v.can.useElement("calendar"),i=i?t.is(":checked"):t.val();o?n.dropdown("save defaults"):r&&a.calendar("refresh"),t.data(f.defaultValue,i),t.data(f.isDirty,!1)})},error:function(){c.removeClass(p.success).addClass(p.error)},value:function(e,t){var n={};return n[e]=t,v.set.values.call(b,n)},values:function(e){I.isEmptyObject(e)||I.each(e,function(e,t){var n,i=v.get.field(e),o=i.parent(),e=i.closest(g.uiCalendar),a=Array.isArray(t),r=o.is(g.uiCheckbox)&&v.can.useElement("checkbox"),s=o.is(g.uiDropdown)&&v.can.useElement("dropdown"),l=i.is(g.radio)&&r,c=0<e.length&&v.can.useElement("calendar");0<i.length&&(a&&r?(v.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),I.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(v.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(g.uiCheckbox).checkbox("check")):r?(v.verbose("Setting checkbox value",t,o),!0===t||1===t?o.checkbox("check"):o.checkbox("uncheck")):s?(v.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):c?e.calendar("set date",t):(v.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){v.verbose("Setting state dirty"),w=!0,C[0]=C[1],C[1]="dirty",v.is.justClean()&&c.trigger("dirty")},clean:function(){v.verbose("Setting state clean"),w=!1,C[0]=C[1],C[1]="clean",v.is.justDirty()&&c.trigger("clean")},asClean:function(){v.set.defaults(),v.set.clean()},asDirty:function(){v.set.defaults(),v.set.dirty()},autoCheck:function(){v.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=I(t),t=I(t).closest(d),i=0<n.filter(g.checkbox).length,o=n.prop("required")||t.hasClass(p.required)||t.parent().hasClass(p.required),t=n.is(":disabled")||t.hasClass(p.disabled)||t.parent().hasClass(p.disabled),a=v.get.validation(n),r=!!a&&0!==I.grep(a.rules,function(e){return"empty"==e.type}),a=a.identifier||n.attr("id")||n.attr("name")||n.data(f.validate);!o||t||r||a===P||(i?(v.verbose("Adding 'checked' rule on field",a),v.add.rule(a,"checked")):(v.verbose("Adding 'empty' rule on field",a),v.add.rule(a,"empty")))})},optional:function(n,i){i=!1!==i,I.each(l,function(e,t){n!=e&&n!=t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=v.get.values();if(x)return!1;if(y=[],v.determine.isValid()){if(v.debug("Form has no validation errors, submitting"),v.set.success(),m.inline||v.remove.errors(),!0!==t)return m.onSuccess.call(b,e,i)}else if(v.debug("Form has errors"),r=!1,v.set.error(),m.inline||v.add.errors(y),e&&c.data("moduleApi")!==P&&e.stopImmediatePropagation(),m.errorFocus&&(e=!0,"string"==typeof m.errorFocus?(e=(n=I(m.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+p.error).first().find(g.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return m.onFailure.call(b,y,i)},field:function(i,e,o){o=o===P||o,"string"==typeof i&&(v.verbose("Validating field",i),i=l[e=i]);var a=i.identifier||e,e=v.get.field(a),t=!!i.depends&&v.get.field(i.depends),r=!0,s=[];return i.identifier||(v.debug("Using field name as identifier",a),i.identifier=a),!e.filter(":not(:disabled)").length?v.debug("Field is disabled. Skipping",a):i.optional&&v.is.blank(e)?v.debug("Field is optional and blank. Skipping",a):i.depends&&v.is.empty(t)?v.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==P&&(o&&e.closest(d).removeClass(p.error),I.each(i.rules,function(e,t){var n;!v.has.field(a)||0<(n=v.validate.rule(i,t,!0)||[]).length&&(v.debug("Field is invalid",a,t.type),s.push(v.get.prompt(t,i)),r=!1,o&&I(n).closest(d).addClass(p.error))})),r?(o&&(v.remove.prompt(a,s),m.onValid.call(e)),!0):(o&&(y=y.concat(s),v.add.prompt(a,s,!0),m.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?I(e).filter(":checked"):I(e)).val())===P||""===t||null===t?"":m.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,o,c)}var e=v.get.field(e.identifier),o=v.get.ancillaryValue(n),a=v.get.ruleName(n),r=m.rules[a],s=[],l=e.is(g.checkbox);if(I.isFunction(r))return l?i(e)||(s=e):I.each(e,function(e,t){i(t)||s.push(t)}),t?s:!(0<s.length);v.error(u.noRule,a)}},setting:function(e,t){if(I.isPlainObject(e))I.extend(!0,m,e);else{if(t===P)return m[e];m[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,v,e);else{if(t===P)return v[e];v[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,m.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),v.verbose.apply(console,arguments)))},error:function(){m.silent||(v.error=Function.prototype.bind.call(console.error,console,m.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(E||t),E=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var e=m.name+":",n=0;E=!1,clearTimeout(v.performance.timer),I.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",A&&(e+=" '"+A+"'"),1<T.length&&(e+=" ("+T.length+")"),(console.group!==P||console.table!==P)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):I.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=h;return e=e||q,t=b||t,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),o=i.length-1,I.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==P)return a=r[n],!1;{if(!I.isPlainObject(r[t])||e==o)return r[t]!==P&&(a=r[t]),!1;r=r[t]}}})),I.isFunction(a)?n=a.apply(t,e):a!==P&&(n=a),Array.isArray(k)?k.push(n):k!==P?k=[k,n]:n!==P&&(k=n),a}};v.initialize()}),k!==P?k:this},I.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!1,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]), textarea, select',group:".field",input:'input:not([type="file"])',message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noElement:"This module requires ui {element}"},templates:{error:function(e){var n='<ul class="list">';return I.each(e,function(e,t){n+="<li>"+t+"</li>"}),I(n+="</ul>")},prompt:function(e,t){return I("<div/>").addClass(t).html(e[0])}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===P||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<I(this).filter(":checked").length},email:function(e){return I.fn.form.settings.regExp.email.test(e)},url:function(e){return I.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){if(t instanceof RegExp)return e.match(t);var n,i=t.match(I.fn.form.settings.regExp.flags);return i&&(t=2<=i.length?i[1]:t,n=3<=i.length?i[2]:""),e.match(new RegExp(t,n))},minValue:function(e,t){return I.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return I.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return I.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n){var i,o;return(n="string"==typeof n?I.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=I.fn.form.settings.regExp.integer),t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?n.test(t)&&(i=o=+t):(t=t.split("..",2),n.test(t[0])&&(i=+t[0]),n.test(t[1])&&(o=+t[1]))),n.test(e)&&(i===P||i<=e)&&(o===P||e<=o)},decimal:function(e,t){return I.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return I.fn.form.settings.rules.range(e,t,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return e!==P&&e.length>=t},length:function(e,t){return e!==P&&e.length>=t},exactLength:function(e,t){return e!==P&&e.length==t},maxLength:function(e,t){return e!==P&&e.length<=t},match:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==P&&e.toString()==i.toString()},different:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length||0<(o=n.find("#"+t)).length||0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==P&&e.toString()!==i.toString()},creditCard:function(n,e){var i,o,a={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},r=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s\-]/g,""),e&&(I.each(e,function(e,t){(o=a[t])&&(i={length:-1!==I.inArray(n.length,o.length),pattern:-1!==n.search(o.pattern)}).length&&i.pattern&&(r=!0)}),!r))return!1;if((e={number:-1!==I.inArray(n.length,a.unionPay.length),pattern:-1!==n.search(a.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,s=0,l=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],c=0;t--;)c+=l[s][parseInt(n.charAt(t),10)],s^=1;return c%10==0&&0<c}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document),function(D,F,R){"use strict";D.isWindow=D.isWindow||function(e){return null!=e&&e===e.window},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.api=D.fn.api=function(x){var w,e=D.isFunction(this)?D(F):D(this),C=e.selector||"",S=(new Date).getTime(),k=[],T=x,A="string"==typeof T,E=[].slice.call(arguments,1);return e.each(function(){var a,i,n,e,g,r=D.isPlainObject(x)?D.extend(!0,{},D.fn.api.settings,x):D.extend({},D.fn.api.settings),t=r.namespace,o=r.metadata,p=r.selector,s=r.error,v=r.className,h="."+t,b="module-"+t,l=D(this),y=l.closest(p.form),c=r.stateContext?D(r.stateContext):l,u=this,d=c[0],m=l.data(b),f={initialize:function(){A||f.bind.events(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of module",f),m=f,l.data(b,m)},destroy:function(){f.verbose("Destroying previous module for",u),l.removeData(b).off(h)},bind:{events:function(){var e=f.get.event();e?(f.verbose("Attaching API events to element",e),l.on(e+h,f.event.trigger)):"now"==r.on&&(f.debug("Querying API endpoint immediately"),f.query())}},decode:{json:function(e){if(e!==R&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==R)return t=sessionStorage.getItem(e),f.debug("Using cached response",e,t),f.decode.json(t);f.error(s.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?f.debug("Response empty, not caching",t):F.Storage!==R?(D.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),f.verbose("Storing cached response for url",e,t)):f.error(s.noStorage)}},query:function(){if(f.is.disabled())f.debug("Element is disabled API request aborted");else{if(f.is.loading()){if(!r.interruptRequests)return void f.debug("Cancelling request, previous request is still pending");f.debug("Interrupting previous request"),f.abort()}if(r.defaultData&&D.extend(!0,r.urlData,f.get.defaultData()),r.serializeForm&&(r.data=f.add.formData(r.data)),!1===(i=f.get.settings()))return f.cancelled=!0,void f.error(s.beforeSend);if(f.cancelled=!1,(n=f.get.templatedURL())||f.is.mocked()){if((n=f.add.urlData(n))||f.is.mocked()){if(i.url=r.base+n,a=D.extend(!0,{},r,{type:r.method||r.type,data:e,url:r.base+n,beforeSend:r.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),f.debug("Querying URL",a.url),f.verbose("Using AJAX settings",a),"local"===r.cache&&f.read.cachedResponse(n))return f.debug("Response returned from local cache"),f.request=f.create.request(),void f.request.resolveWith(d,[f.read.cachedResponse(n)]);r.throttle?r.throttleFirstRequest||f.timer?(f.debug("Throttling request",r.throttle),clearTimeout(f.timer),f.timer=setTimeout(function(){f.timer&&delete f.timer,f.debug("Sending throttled request",e,a.method),f.send.request()},r.throttle)):(f.debug("Sending request",e,a.method),f.send.request(),f.timer=setTimeout(function(){},r.throttle)):(f.debug("Sending request",e,a.method),f.send.request())}}else f.error(s.missingURL)}},should:{removeError:function(){return!0===r.hideError||"auto"===r.hideError&&!f.is.form()}},is:{disabled:function(){return 0<l.filter(p.disabled).length},expectingJSON:function(){return"json"===r.dataType||"jsonp"===r.dataType},form:function(){return l.is("form")||c.is("form")},mocked:function(){return r.mockResponse||r.mockResponseAsync||r.response||r.responseAsync},input:function(){return l.is("input")},loading:function(){return!!f.request&&"pending"==f.request.state()},abortedRequest:function(e){return e&&e.readyState!==R&&0===e.readyState?(f.verbose("XHR request determined to be aborted"),!0):(f.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return f.is.expectingJSON()&&D.isFunction(r.successTest)?(f.debug("Checking JSON returned success",r.successTest,e),r.successTest(e)?(f.debug("Response passed success test",e),!0):(f.debug("Response failed success test",e),!1)):(f.verbose("Response is not JSON, skipping validation",r.successTest,e),!0)}},was:{cancelled:function(){return f.cancelled||!1},succesful:function(){return f.verbose('This behavior will be deleted due to typo. Use "was successful" instead.'),f.was.successful()},successful:function(){return f.request&&"resolved"==f.request.state()},failure:function(){return f.request&&"rejected"==f.request.state()},complete:function(){return f.request&&("resolved"==f.request.state()||"rejected"==f.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(r.regExp.required),t=o.match(r.regExp.optional),a=a||r.urlData,e&&(f.debug("Looking for required URL variables",e),D.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.substr(2,t.length-3):t.substr(1,t.length-2),i=D.isPlainObject(a)&&a[n]!==R?a[n]:l.data(n)!==R?l.data(n):c.data(n)!==R?c.data(n):a[n];if(i===R)return f.error(s.requiredParameter,n,o),o=!1;f.verbose("Found required variable",n,i),i=r.encodeParameters?f.get.urlEncodedValue(i):i,o=o.replace(t,i)})),t&&(f.debug("Looking for optional URL variables",e),D.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.substr(3,t.length-4):t.substr(2,t.length-3),i=D.isPlainObject(a)&&a[n]!==R?a[n]:l.data(n)!==R?l.data(n):c.data(n)!==R?c.data(n):a[n];o=i!==R?(f.verbose("Optional variable Found",n,i),o.replace(t,i)):(f.verbose("Optional variable not found",n),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(e){var t=D.fn.serializeObject!==R,n=t?y.serializeObject():y.serialize();return e=e||r.data,e=D.isPlainObject(e)?t?(f.debug("Extending existing data with form data",e,n),D.extend(!0,{},e,n)):(f.error(s.missingSerialize),f.debug("Cant extend data. Replacing data with form data",e,n),n):(f.debug("Adding form data",n),n)}},send:{request:function(){f.set.loading(),f.request=f.create.request(),f.is.mocked()?f.mockedXHR=f.create.mockedXHR():f.xhr=f.create.xhr(),r.onRequest.call(d,f.request,f.xhr)}},event:{trigger:function(e){f.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,o=(new Date).getTime()-g,o=r.loadingDuration-o,a=!!D.isFunction(r.onResponse)&&(f.is.expectingJSON()&&!r.rawResponse?r.onResponse.call(i,D.extend(!0,{},e)):r.onResponse.call(i,e)),o=0<o?o:0;a&&(f.debug("Modified API response in onResponse callback",r.onResponse,a,e),e=a),0<o&&f.debug("Response completed early delaying state change by",o),setTimeout(function(){f.is.validResponse(e)?f.request.resolveWith(i,[e,n]):f.request.rejectWith(i,[n,"invalid"])},o)},fail:function(e,t,n){var i=this,o=(new Date).getTime()-g,o=r.loadingDuration-o;0<(o=0<o?o:0)&&f.debug("Response completed early delaying state change by",o),setTimeout(function(){f.is.abortedRequest(e)?f.request.rejectWith(i,[e,"aborted",n]):f.request.rejectWith(i,[e,"error",t,n])},o)}},request:{done:function(e,t){f.debug("Successful API Response",e),"local"===r.cache&&n&&(f.write.cachedResponse(n,e),f.debug("Saving server response locally",f.cache)),r.onSuccess.call(d,e,l,t)},complete:function(e,t){var n,i;f.was.successful()?(i=e,n=t):i=f.get.responseFromXHR(n=e),f.remove.loading(),r.onComplete.call(d,i,l,n)},fail:function(e,t,n){var i=f.get.responseFromXHR(e),o=f.get.errorFromRequest(i,t,n);if("aborted"==t)return f.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),r.onAbort.call(d,t,l,e),!0;"invalid"==t?f.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==R&&(f.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==R&&""!==n&&f.error(s.statusMessage+n,a.url),r.onError.call(d,o,l,e)),r.errorDuration&&"aborted"!==t&&(f.debug("Adding error state"),f.set.error(),f.should.removeError()&&setTimeout(f.remove.error,r.errorDuration)),f.debug("API Request failed",o,e),r.onFailure.call(d,i,l,e)}}},create:{request:function(){return D.Deferred().always(f.event.request.complete).done(f.event.request.done).fail(f.event.request.fail)},mockedXHR:function(){var e=r.mockResponse||r.response,t=r.mockResponseAsync||r.responseAsync,n=D.Deferred().always(f.event.xhr.complete).done(f.event.xhr.done).fail(f.event.xhr.fail);return e?(e=D.isFunction(e)?(f.debug("Using specified synchronous callback",e),e.call(d,i)):(f.debug("Using settings specified response",e),e),n.resolveWith(d,[e,!1,{responseText:e}])):D.isFunction(t)&&(e=function(e){f.debug("Async callback returned response",e),e?n.resolveWith(d,[e,!1,{responseText:e}]):n.rejectWith(d,[{responseText:e},!1,!1])},f.debug("Using specified async response callback",t),t.call(d,i,e)),n},xhr:function(){var e=D.ajax(a).always(f.event.xhr.always).done(f.event.xhr.done).fail(f.event.xhr.fail);return f.verbose("Created server request",e,a),e}},set:{error:function(){f.verbose("Adding error state to element",c),c.addClass(v.error)},loading:function(){f.verbose("Adding loading state to element",c),c.addClass(v.loading),g=(new Date).getTime()}},remove:{error:function(){f.verbose("Removing error state from element",c),c.removeClass(v.error)},loading:function(){f.verbose("Removing loading state from element",c),c.removeClass(v.loading)}},get:{responseFromXHR:function(e){return!!D.isPlainObject(e)&&(f.is.expectingJSON()?f.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return D.isPlainObject(e)&&e.error!==R?e.error:r.error[t]!==R?r.error[t]:n},request:function(){return f.request||!1},xhr:function(){return f.xhr||!1},settings:function(){var e=r.beforeSend.call(l,r);return e&&(e.success!==R&&(f.debug("Legacy success callback detected",e),f.error(s.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==R&&(f.debug("Legacy failure callback detected",e),f.error(s.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==R&&(f.debug("Legacy complete callback detected",e),f.error(s.legacyParameters,e.complete),e.onComplete=e.complete)),e===R&&f.error(s.noReturnedValue),!1===e?e:e!==R?D.extend(!0,{},e):D.extend(!0,{},r)},urlEncodedValue:function(e){var t=F.decodeURIComponent(e),n=F.encodeURIComponent(e);return t!==e?(f.debug("URL value is already encoded, avoiding double encoding",e),e):(f.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return D.isWindow(u)||(f.is.input()?e.value=l.val():f.is.form()||(e.text=l.text())),e},event:function(){return D.isWindow(u)||"now"==r.on?(f.debug("API called without element, no events attached"),!1):"auto"==r.on?l.is("input")?u.oninput!==R?"input":u.onpropertychange!==R?"propertychange":"keyup":l.is("form")?"submit":"click":r.on},templatedURL:function(e){if(e=e||l.data(o.action)||r.action||!1,n=l.data(o.url)||r.url||!1)return f.debug("Using specified url",n),n;if(e){if(f.debug("Looking up url for action",e,r.api),r.api[e]===R&&!f.is.mocked())return void f.error(s.missingAction,r.action,r.api);n=r.api[e]}else f.is.form()&&(n=l.attr("action")||c.attr("action")||!1,f.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=f.get.xhr();e&&"resolved"!==e.state()&&(f.debug("Cancelling API request"),e.abort())},reset:function(){f.remove.error(),f.remove.loading()},setting:function(e,t){if(f.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,r,e);else{if(t===R)return r[e];D.isPlainObject(r[e])?D.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,f,e);else{if(t===R)return f[e];f[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,r.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),f.verbose.apply(console,arguments)))},error:function(){r.silent||(f.error=Function.prototype.bind.call(console.error,console,r.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(S||t),S=t,k.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=r.name+":",n=0;S=!1,clearTimeout(f.performance.timer),D.each(k,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",C&&(e+=" '"+C+"'"),(console.group!==R||console.table!==R)&&0<k.length&&(console.groupCollapsed(e),console.table?console.table(k):D.each(k,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(i,e,t){var o,a,n,r=m;return e=e||E,t=u||t,"string"==typeof i&&r!==R&&(i=i.split(/[\. ]/),o=i.length-1,D.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(D.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==R)return a=r[n],!1;{if(!D.isPlainObject(r[t])||e==o)return r[t]!==R?a=r[t]:f.error(s.method,i),!1;r=r[t]}}})),D.isFunction(a)?n=a.apply(t,e):a!==R&&(n=a),Array.isArray(w)?w.push(n):w!==R?w=[w,n]:n!==R&&(w=n),a}};A?(m===R&&f.initialize(),f.invoke(T)):(m!==R&&m.invoke("destroy"),f.initialize())}),w!==R?w:this},D.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,void document),function(w,e,C,S){"use strict";w.isFunction=w.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},e=void 0!==e&&e.Math==Math?e:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w.fn.transition=function(){var f,r=w(this),g=r.selector||"",p=(new Date).getTime(),v=[],h=arguments,b=h[0],y=[].slice.call(arguments,1),x="string"==typeof b;return r.each(function(o){var l,s,a,c,t,n,e,i,u=w(this),d=this,m={initialize:function(){l=m.get.settings.apply(d,h),c=l.className,a=l.error,t=l.metadata,i="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||m,n=m.get.animationEndEvent(),!1===(x=x&&m.invoke(b))&&(m.verbose("Converted arguments into settings object",l),l.interval?m.delay(l.animate):m.animate(),m.instantiate())},instantiate:function(){m.verbose("Storing instance of module",m),s=m,u.data(e,s)},destroy:function(){m.verbose("Destroying previous module for",d),u.removeData(e)},refresh:function(){m.verbose("Refreshing display type on next animation"),delete m.displayType},forceRepaint:function(){m.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){m.verbose("Repainting element");d.offsetWidth},delay:function(e){var t=(t=m.get.animationDirection())||(m.can.transition()?m.get.direction():"static");e=e!==S?e:l.interval,e="auto"==l.reverse&&t==c.outward||1==l.reverse?(r.length-o)*l.interval:o*l.interval,m.debug("Delaying animation by",e),setTimeout(m.animate,e)},animate:function(e){if(l=e||l,!m.is.supported())return m.error(a.support),!1;if(m.debug("Preparing animation",l.animation),m.is.animating()){if(l.queue)return!l.allowRepeats&&m.has.direction()&&m.is.occurring()&&!0!==m.queuing?m.debug("Animation is currently occurring, preventing queueing same animation",l.animation):m.queue(l.animation),!1;if(!l.allowRepeats&&m.is.occurring())return m.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;m.debug("New animation started, completing previous early",l.animation),s.complete()}m.can.animate()?m.set.animating(l.animation):m.error(a.noAnimation,l.animation,d)},reset:function(){m.debug("Resetting animation to beginning conditions"),m.remove.animationCallbacks(),m.restore.conditions(),m.remove.animating()},queue:function(e){m.debug("Queueing animation of",e),m.queuing=!0,u.one(n+".queue"+i,function(){m.queuing=!1,m.repaint(),m.animate.apply(this,l)})},complete:function(e){e&&e.target===d&&e.stopPropagation(),m.debug("Animation complete",l.animation),m.remove.completeCallback(),m.remove.failSafe(),m.is.looping()||(m.is.outward()?(m.verbose("Animation is outward, hiding element"),m.restore.conditions(),m.hide()):m.is.inward()?(m.verbose("Animation is outward, showing element"),m.restore.conditions(),m.show()):(m.verbose("Static animation completed"),m.restore.conditions(),l.onComplete.call(d)))},force:{visible:function(){var e=u.attr("style"),e=m.get.userStyle(e),t=m.get.displayType(),e=e+"display: "+t+" !important;",n=u[0].style.display;return!t||"none"===n&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(m.remove.transition(),!1):(m.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),t=u.css("display"),e=e===S||""===e;"none"===t||m.is.hidden()?e&&u.removeAttr("style"):(m.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(e){var n=!1;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),w.each(e,function(e,t){t!==c.inward&&t!==c.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){m.remove.completeCallback(),e=e||l.animation;e=m.get.animationClass(e);m.save.animation(e),m.force.visible()&&(m.remove.hidden(),m.remove.direction(),m.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(m.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||m.get.direction())==c.inward?m.set.inward():m.set.outward()},looping:function(){m.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){m.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){m.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(e){e=e||m.get.animationClass(),m.debug("Starting tween",e),u.addClass(e).one(n+".complete"+i,m.complete),l.useFailSafe&&m.add.failSafe(),m.set.duration(l.duration),l.onStart.call(d)}},save:{animation:function(e){m.cache||(m.cache={}),m.cache.animation=e},displayType:function(e){"none"!==e&&u.data(t.displayType,e)},transitionExists:function(e,t){w.fn.transition.exists[e]=t,m.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=m.get.currentAnimation();e&&(u.removeClass(e),m.verbose("Removing animation class",m.cache)),m.remove.duration()}},add:{failSafe:function(){var e=m.get.duration();m.timer=setTimeout(function(){u.triggerHandler(n)},e+l.failSafeDelay),m.verbose("Adding fail safe timer",m.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){m.remove.queueCallback(),m.remove.completeCallback()},queueCallback:function(){u.off(".queue"+i)},completeCallback:function(){u.off(".complete"+i)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){m.verbose("Removing fail safe timer",m.timer),m.timer&&clearTimeout(m.timer)},hidden:function(){u.removeClass(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){m.debug("Transitions are no longer looping"),m.is.looping()&&(m.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?w.extend(!0,{},w.fn.transition.settings,e):"function"==typeof n?w.extend({},w.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?w.extend({},w.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?w.extend({},w.fn.transition.settings,t,{animation:e}):"function"==typeof t?w.extend({},w.fn.transition.settings,{animation:e,onComplete:t}):w.extend({},w.fn.transition.settings,{animation:e})},animationClass:function(e){var e=e||l.animation,t=m.can.transition()&&!m.has.direction()?m.get.direction()+" ":"";return c.animating+" "+c.transition+" "+t+e},currentAnimation:function(){return!(!m.cache||m.cache.animation===S)&&m.cache.animation},currentDirection:function(){return m.is.inward()?c.inward:c.outward},direction:function(){return m.is.hidden()||!m.is.visible()?c.inward:c.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),w.each(e,function(e,t){t===c.inward?n=c.inward:t===c.outward&&(n=c.outward)})),n||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||l.duration)?u.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return l.displayType||((e=e===S||e)&&u.data(t.displayType)===S&&(""===(e=u.css("display"))||"none"===e?m.can.transition(!0):m.save.displayType(e)),u.data(t.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return w.fn.transition.exists[e]},animationStartEvent:function(){var e,t=C.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(t.style[e]!==S)return n[e];return!1},animationEndEvent:function(){var e,t=C.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(t.style[e]!==S)return n[e];return!1}},can:{transition:function(e){var t,n,i,o,a=l.animation,r=m.get.transitionExists(a),s=m.get.displayType(!1);if(r===S||e){if(m.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=w("<"+t+" />").addClass(e).insertAfter(u)).addClass(a).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),i=t.addClass(c.inward).css("animationName"),s||(s=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),m.verbose("Determining final display state",s),m.save.displayType(s)),t.remove(),n!=i)m.debug("Direction exists for animation",a),o=!0;else{if("none"==n||!n)return void m.debug("No animation defined in css",a);m.debug("Static animation found",a,s),o=!1}m.save.transitionExists(a,o)}return r!==S?r:o},animate:function(){return m.can.transition()!==S}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.looping)},occurring:function(e){return e="."+(e=e||l.animation).replace(" ","."),0<u.filter(e).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==n}},hide:function(){m.verbose("Hiding element"),m.is.animating()&&m.reset(),d.blur(),m.remove.display(),m.remove.visible(),w.isFunction(l.onBeforeHide)?l.onBeforeHide.call(d,function(){m.hideNow()}):m.hideNow()},hideNow:function(){m.set.hidden(),m.force.hidden(),l.onHide.call(d),l.onComplete.call(d)},show:function(e){m.verbose("Showing element",e),m.force.visible()&&(m.remove.hidden(),m.set.visible(),l.onShow.call(d),l.onComplete.call(d))},toggle:function(){m.is.visible()?m.hide():m.show()},stop:function(){m.debug("Stopping current animation"),u.triggerHandler(n)},stopAll:function(){m.debug("Stopping all animation"),m.remove.queueCallback(),u.triggerHandler(n)},clear:{queue:function(){m.debug("Clearing animation queue"),m.remove.queueCallback()}},enable:function(){m.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){m.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(e,t){if(m.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,l,e);else{if(t===S)return l[e];w.isPlainObject(l[e])?w.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,m,e);else{if(t===S)return m[e];m[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,l.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),m.verbose.apply(console,arguments)))},error:function(){l.silent||(m.error=Function.prototype.bind.call(console.error,console,l.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(p||t),p=t,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=l.name+":",n=0;p=!1,clearTimeout(m.performance.timer),w.each(v,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",g&&(e+=" '"+g+"'"),1<r.length&&(e+=" ("+r.length+")"),(console.group!==S||console.table!==S)&&0<v.length&&(console.groupCollapsed(e),console.table?console.table(v):w.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(i,e,t){var o,a,n,r=s;return e=e||y,t=d||t,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),o=i.length-1,w.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(w.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==S)return a=r[n],!1;{if(!w.isPlainObject(r[t])||e==o)return r[t]!==S&&(a=r[t]),!1;r=r[t]}}})),w.isFunction(a)?n=a.apply(t,e):a!==S&&(n=a),Array.isArray(f)?f.push(n):f!==S?f=[f,n]:n!==S&&(f=n),a!==S&&a}};m.initialize()}),f!==S?f:this},w.fn.transition.exists={},w.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document); |