11 lines
No EOL
263 KiB
JavaScript
11 lines
No EOL
263 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.9.0-beta.315+0963809
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),a=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),o=r.namespace,c=r.error,u="module-"+o,d=g(v),f=this,p=d.data(u),m={initialize:function(){m.instantiate()},instantiate:function(){m.verbose("Storing instance of site",m),p=m,d.data(u,m)},normalize:function(){m.fix.console(),m.fix.requestAnimationFrame()},fix:{console:function(){m.debug("Normalizing window.console"),console!==b&&console.log!==b||(m.verbose("Console not available, normalizing events"),m.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(m.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(m.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){m.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){m.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(m.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){m.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){m.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,a,e,o){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n=!m.moduleExists(t)||(g.fn[t].settings.namespace||!1);m.moduleExists(t)&&(m.verbose("Changing default setting",i,a,t),g.fn[t].settings[i]=a,o&&n&&0<(n=g(":data(module-"+n+")")).length&&(m.verbose("Modifying existing settings",n),n[t]("setting",i,a)))})},settings:function(i,e,a){e="string"==typeof e?[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n;m.moduleExists(t)&&(m.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),a&&o&&0<(n=g(":data(module-"+o+")")).length&&(m.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){m.console(!0)},debug:function(e,t){e=e||r.modules,m.debug("Enabling debug for modules",e),m.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,m.debug("Enabling verbose debug for modules",e),m.change.setting("verbose",!0,e,t)}},disable:{console:function(){m.console(!1)},debug:function(e,t){e=e||r.modules,m.debug("Disabling debug for modules",e),m.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,m.debug("Disabling verbose debug for modules",e),m.change.setting("verbose",!1,e,t)}},console:function(e){e?p.cache.console===b?m.error(c.console):(m.debug("Restoring console function"),h.console=p.cache.console):(m.debug("Disabling console function"),p.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){m.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,m,e);else{if(t===b)return m[e];m[e]=t}},debug:function(){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.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(){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())-(i||t),i=t,a.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(m.performance.timer),g.each(a,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0<a.length&&(console.groupCollapsed(e),console.table?console.table(a):g.each(a,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),a=[]}},invoke:function(i,e,t){var a,o,n,r=p;return e=e||l,t=t||f,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),a=i.length-1,g.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(g.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==b)return o=r[n],!1;{if(!g.isPlainObject(r[t])||e==a)return r[t]!==b?o=r[t]:m.error(c.method,i),!1;r=r[t]}}})),g.isFunction(o)?n=o.apply(t,e):o!==b&&(n=o),Array.isArray(s)?s.push(n):s!==b?s=[s,n]:n!==b&&(s=n),o}};return n?(p===b&&m.initialize(),m.invoke(t)):(p!==b&&m.destroy(),m.initialize()),s!==b?s:this},g.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:{}}},g.extend(g.expr[":"],{data:g.expr.createPseudo?g.expr.createPseudo(function(t){return function(e){return!!g.data(e,t)}}):function(e,t,n){return!!g.data(e,n[3])}})}(jQuery,window,document),function(ae,D,S,oe){"use strict";ae.isFunction=ae.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},D=void 0!==D&&D.Math==Math?D:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ae.fn.calendar=function(h){var v,e=ae(this),b=e.selector||"",y=(new Date).getTime(),x=[],w=h,C="string"==typeof w,k=[].slice.call(arguments,1),T={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},ie=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var d,e,G=ae.isPlainObject(h)?ae.extend(!0,{},ae.fn.calendar.settings,h):ae.extend({},ae.fn.calendar.settings),X=G.className,t=G.namespace,n=G.selector,J=G.formatter,i=G.parser,_=G.metadata,Z=T[G.minTimeGap],s=G.error,a="."+t,o="module-"+t,r=ae(this),l=r.find(n.input),ee=r.find(n.popup),c=r.find(n.activator),u=this,f=r.data(o),p=!1,te=r.hasClass(X.inverted),m=!1,g=!1,ne={initialize:function(){ne.debug("Initializing calendar for",u,r),d=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),f=ne,r.data(o,f)},destroy:function(){ne.verbose("Destroying previous calendar for",u),r.removeData(o),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(r.data(_.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(r.data(_.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",G.on||"click")},popup:function(){var e,t;G.inline||(c.length||(c=r.children().first()).length)&&(ae.fn.popup===oe?ne.error(s.popup):(ee.length||(e=0!==(t=c.parent()).closest(n.append).length?"appendTo":"prependTo",ee=ae("<div/>").addClass(X.popup)[e](t)),ee.addClass(X.calendar),te&&ee.addClass(X.inverted),e=function(){return ne.refreshTooltips(),G.onVisible.apply(ee,arguments)},l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),G.onVisible.apply(ee,arguments)}),t=ne.setting("on"),t=ae.extend({},G.popupOptions,{popup:ee,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(G.startMode)),G.onShow.apply(ee,arguments)},onVisible:e,onHide:G.onHide,onHidden:function(){return ne.blur(),G.onHidden.apply(ee,arguments)}}),ne.popup(t)))},inline:function(){c.length&&!G.inline||(G.inline=!0,ee=ae("<div/>").addClass(X.calendar).appendTo(r),l.length||ee.attr("tabindex","0"))},input:function(){G.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;G.initialDate?e=i.date(G.initialDate,G):r.data(_.date)!==oe?e=i.date(r.data(_.date),G):l.length&&(e=i.date(l.val(),G)),ne.set.date(e,G.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=S.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,q,n=ne.get.mode(),i=new Date,j=ne.get.date(),a=ne.get.focusDate(),o=ne.helper.dateInRange(a||j||G.initialDate||i),r=(a||ne.set.focusDate(a=o,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,H="time"===G.type,N=Math.max(G.multiMonth,1),V=l?ne.get.monthOffset():0,d=o.getMinutes(),f=o.getHours(),p=o.getDate(),z=o.getMonth()+V,m=o.getFullYear(),g=l?G.showWeekNumbers?8:7:c?4:Z.column,U=l||c?6:Z.row,h=l?N:1,v=(b=ee).hasClass("left")?"right center":"left center";for(b.empty(),1<h&&(q=ae("<div/>").addClass(X.grid).appendTo(b)),t=0;t<h;t++){1<h&&(b=ae("<div/>").addClass(X.column).appendTo(q));var b,y=z+t,W=(new Date(m,y,1).getDay()-G.firstDayOfWeek%7+7)%7,x=(!G.constantHeight&&l&&(x=new Date(m,y+1,0).getDate()+W,U=Math.ceil(x/7)),r?10:s?1:0),w=l?1:0,C=c||u?1:0,k=c||u?p:1,T=new Date(m-x,y-w,k-C,f),w=new Date(m+x,y+w,k+C,f),k=r?new Date(10*Math.ceil(m/10)-9,0,0):s?new Date(m,0,0):l?new Date(m,y,0):new Date(m,y,p,-1),C=r?new Date(10*Math.ceil(m/10)+1,0,1):s?new Date(m+1,0,1):l?new Date(m,y+1,1):new Date(m,y,p+1),D=n,D=(l&&G.showWeekNumbers&&(D+=" andweek"),ae("<table/>").addClass(X.table).addClass(D).addClass(ie[g]+" column").appendTo(b)),Y=(te&&D.addClass(X.inverted),g);if(!H){var B=ae("<thead/>").appendTo(D),S=ae("<tr/>").appendTo(B),A=ae("<th/>").attr("colspan",""+g).appendTo(S),E=r||s?new Date(m,0,1):l?new Date(m,y,1):new Date(m,y,p,f,d),F=ae("<span/>").addClass(X.link).appendTo(A),E=(F.text(ne.helper.dateFormat(J[n+"Header"],E)),s?G.disableYear?"day":"year":l?G.disableMonth?"year":"month":"day");if(F.data(_.mode,E),0===t&&((F=ae("<span/>").addClass(X.prev).appendTo(A)).data(_.focusDate,T),F.toggleClass(X.disabledCell,!ne.helper.isDateInRange(k,n)),ae("<i/>").addClass(X.prevIcon).appendTo(F)),t===h-1&&((E=ae("<span/>").addClass(X.next).appendTo(A)).data(_.focusDate,w),E.toggleClass(X.disabledCell,!ne.helper.isDateInRange(C,n)),ae("<i/>").addClass(X.nextIcon).appendTo(E)),l)for(S=ae("<tr/>").appendTo(B),G.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(G.text.weekNo),A.addClass(X.weekCell),Y--),M=0;M<Y;M++)(A=ae("<th/>").appendTo(S)).text(J.dayColumnHeader((M+G.firstDayOfWeek)%7,G))}for(var $=ae("<tbody/>").appendTo(D),M=r?10*Math.ceil(m/10)-9:l?1-W:0,K=0;K<U;K++)for(S=ae("<tr/>").appendTo($),l&&G.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(ne.get.weekOfYear(m,y,M+1-G.firstDayOfWeek)),A.addClass(X.weekCell)),e=0;e<Y;e++,M++){var O,P=r?new Date(M,y,1,f,d):s?new Date(m,M,1,f,d):l?new Date(m,y,M,f,d):c?new Date(m,y,p,M):new Date(m,y,p,f,M*G.minTimeGap),I=r?M:s?G.text.monthsShort[M]:l?P.getDate():ne.helper.dateFormat(J.cellTime,P),I=((A=ae("<td/>").addClass(X.cell).appendTo(S)).text(I),A.data(_.date,P),l&&P.getMonth()!==(y+12)%12),R=!G.selectAdjacentDays&&I||!ne.helper.isDateInRange(P,n)||G.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),L=(R?(null!==(L=ne.helper.findDayAsObject(P,n,G.disabledDates))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation]&&A.attr("data-variation",L[_.variation])),"hour"===n&&null!==(L=ne.helper.findHourAsObject(P,n,G.disabledHours))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation]&&A.attr("data-variation",L[_.variation]))):null!==(O=ne.helper.findDayAsObject(P,n,G.eventDates))&&(A.addClass(O[_.class]||G.eventClass),O[_.message]&&(A.attr("data-tooltip",O[_.message]),A.attr("data-position",O[_.position]||v),(O[_.inverted]||te&&O[_.inverted]===oe)&&A.attr("data-inverted",""),O[_.variation]&&A.attr("data-variation",O[_.variation]))),ne.helper.dateEqual(P,j,n)),Q=ne.helper.dateEqual(P,i,n),I=(A.toggleClass(X.adjacentCell,I&&!O),A.toggleClass(X.disabledCell,R),A.toggleClass(X.activeCell,L&&!(I&&R)),c||u||A.toggleClass(X.todayCell,!I&&Q),{mode:n,adjacent:I,disabled:R,active:L,today:Q});J.cell(A,P,I),ne.helper.dateEqual(P,a,n)&&ne.set.focusDate(P,!1,!1)}G.today&&(T=ae("<tr/>").appendTo($),(k=ae("<td/>").attr("colspan",""+g).addClass(X.today).appendTo(T)).text(J.today(G)),k.data(_.date,i)),ne.update.focus(!1,D),G.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,a=ae(this),o=a.data(_.date);o&&(e=a.hasClass(X.disabledCell),t=a.hasClass(X.activeCell),n=a.hasClass(X.adjacentCell),i=ne.helper.dateEqual(o,s,r),o=!!u&&(!!l&&ne.helper.isDateInRange(o,r,l,u)||!!c&&ne.helper.isDateInRange(o,r,u,c)),a.toggleClass(X.focusCell,i&&(!d||p)&&(!n||G.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(a)||a.toggleClass(X.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=ae(D).width();ee.find("td[data-position]").each(function(){var e=ae(this),t=D.getComputedStyle(e[0],"::after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),ee.on("mousedown"+a,ne.event.mousedown),ee.on("touchstart"+a,ne.event.mousedown),ee.on("mouseup"+a,ne.event.mouseup),ee.on("touchend"+a,ne.event.mouseup),ee.on("mouseover"+a,ne.event.mouseover),(l.length?(l.on("input"+a,ne.event.inputChange),l.on("focus"+a,ne.event.inputFocus),l.on("blur"+a,ne.event.inputBlur),l):ee).on("keydown"+a,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(a),l.length&&l.off(a)}},event:{mouseover:function(e){var t=ae(e.target).data(_.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),p=0<=e.type.indexOf("touch");e=ae(e.target).data(_.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),p=!1;var t,n,i,e=ae(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(_.date)||t.data(_.focusDate)||t.data(_.mode)?t:e).data(_.date),n=e.data(_.focusDate),i=e.data(_.mode),t&&!1!==G.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(X.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,a,o,r,s,l=e.which;9===l&&ne.popup("hide"),ne.popup("is visible")&&(t=ne.get.mode(),37===l||38===l||39===l||40===l?(o="day"===t?7:"hour"===t?4:"minute"===t?Z.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===t?G.minTimeGap:1,r=(n=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===t?o:0),s=n.getMonth()+("month"===t?o:0),i=n.getDate()+("day"===t?o:0),a=n.getHours()+("hour"===t?o:0),o=n.getMinutes()+("minute"===t?o:0),r=new Date(r,s,i,a,o),"time"===G.type&&(r=ne.helper.mergeDateTime(n,r)),ne.helper.isDateInRange(r,t)&&ne.set.focusDate(r)):13===l?((s=ne.get.focusDate())&&!G.isDisabled(s,t)&&!ne.helper.isDisabled(s,t)&&ne.helper.isEnabled(s,t)&&!1!==G.onSelect.call(u,s,ne.get.mode())&&ne.selectDate(s),e.preventDefault(),e.stopPropagation()):27===l&&(ne.popup("hide"),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=i.date(e,G);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(X.active)},inputBlur:function(){var e;ee.removeClass(X.active),G.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(J[G.type],e),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(X.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||J[G.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(r.data(_.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(_.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(G.startCalendar);return(e?e.get.date():r.data(_.startDate))||null},endDate:function(){var e=ne.get.calendarModule(G.endCalendar);return(e?e.get.date():r.data(_.endDate))||null},minDate:function(){return r.data(_.minDate)||null},maxDate:function(){return r.data(_.maxDate)||null},monthOffset:function(){return r.data(_.monthOffset)||G.monthOffset||0},mode:function(){var e=r.data(_.mode)||G.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=ae.inArray(e,t)?e:"time"===G.type?"hour":"month"===G.type?"month":"year"===G.type?"year":"day"},type:function(){return r.data(_.type)||G.type},validModes:function(){var e=[];return"time"!==G.type&&(G.disableYear&&"year"!==G.type||e.push("year"),(G.disableMonth||"year"===G.type)&&"month"!==G.type||e.push("month"),0<=G.type.indexOf("date")&&e.push("day")),0<=G.type.indexOf("time")&&(e.push("hour"),G.disableMinute||e.push("minute")),e},isTouch:function(){try{return S.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof ae?e:ae(S).find(e).first()).data(o):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i,a=ne.get.mode(),o=ne.helper.dateFormat(J[G.type],e);return(!n||!1!==G.onBeforeChange.call(u,e,o,a))&&(ne.set.focusDate(e),!G.isDisabled(e,a)&&((i=ne.get.endDate())&&e&&i<e&&ne.set.endDate(oe),ne.set.dataKeyValue(_.date,e),t&&l.length&&l.val(o),void(n&&G.onChange.call(u,e,o,a))))},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(G.startCalendar);n&&n.set.date(e),ne.set.dataKeyValue(_.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(G.endCalendar);n&&n.set.date(e),ne.set.dataKeyValue(_.endDate,e,t)},focusDate:function(e,t,n,i){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var a="day"===ne.get.mode(),o=ne.get.focusDate(),a=(a&&e&&o&&((a=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-a,ne.set.monthOffset(o,!1))),ne.set.dataKeyValue(_.focusDate,e,!!e&&t));n=!1!==n&&a&&!1===t||m!=i,m=i,n&&ne.update.focus(i)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==G.maxDate&&G.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,G.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(_.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==G.minDate&&G.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,G.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(_.maxDate,e))},monthOffset:function(e,t){var n=Math.max(G.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(_.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(_.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||G.disableMinute&&"hour"===n||"date"===G.type&&"day"===n||"month"===G.type&&"month"===n||"year"===G.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,G.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(G.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===n?G.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(oe)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{dateFormat:function(e,t){var n,i,a,o,r,s,l,c,u,d;return t instanceof Date?"function"==typeof e?e.call(ne,t,G):(n=t.getDate(),i=t.getMonth(),a=t.getFullYear(),o=t.getDay(),r=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(a,i,n+1-G.firstDayOfWeek),c=r%12||12,u=(r<12?G.text.am:G.text.pm).toLowerCase(),d={D:n,DD:("0"+n).slice(-2),M:i+1,MM:("0"+(i+1)).slice(-2),MMM:G.text.monthsShort[i],MMMM:G.text.months[i],Y:a,YY:String(a).slice(2),YYYY:a,d:o,dd:G.text.dayNamesShort[o].slice(0,2),ddd:G.text.dayNamesShort[o],dddd:G.text.dayNames[o],h:c,hh:("0"+c).slice(-2),H:r,HH:("0"+r).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<n%10?0:(n%100-n%10!=10)*n%10],w:l,ww:("0"+l).slice(-2)},e.replace(G.regExp.token,function(e){return e in d?d[e]:e.slice(1,e.length-1)})):""},isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i||"hour"===i)&&("day"===i&&-1!==G.disabledDaysOfWeek.indexOf(n.getDay())||G.disabledDates.some(function(e){var t;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[_.year]?"number"==typeof e[_.year]?n.getFullYear()==e[_.year]:Array.isArray(e[_.year])?-1<e[_.year].indexOf(n.getFullYear()):void 0:e[_.month]?"number"==typeof e[_.month]?n.getMonth()==e[_.month]:Array.isArray(e[_.month])?-1<e[_.month].indexOf(n.getMonth()):e[_.month]instanceof Date?(t=ne.helper.sanitiseDate(e[_.month]),n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):void 0:e[_.date]&&"day"===i?e[_.date]instanceof Date?ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[_.date]),i):Array.isArray(e[_.date])?e[_.date].some(function(e){return ne.helper.dateEqual(n,e,i)}):void 0:void 0:void 0})||"hour"===i&&G.disabledHours.some(function(e){if((e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date)return ne.helper.dateEqual(n,e,i);if("number"==typeof e)return n.getHours()===e;if(null!==e&&"object"==typeof e){var t=!0;if(e[_.date])if(e[_.date]instanceof Date)t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[_.date]));else if(Array.isArray(e[_.date]))return e[_.date].some(function(e){t=ne.helper.dateEqual(n,e,i)});if(e[_.days]&&("number"==typeof e[_.days]?t=n.getDay()==e[_.days]:Array.isArray(e[_.days])&&(t=-1<e[_.days].indexOf(n.getDay()))),e[_.hours])return"number"==typeof e[_.hours]?t&&n.getHours()==e[_.hours]:Array.isArray(e[_.hours])?t&&-1<e[_.hours].indexOf(n.getHours()):void 0}}))},isEnabled:function(t,n){return"day"!==n||(0===G.enabledDates.length||G.enabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(t,e,n):null!==e&&"object"==typeof e&&e[_.date]?ne.helper.dateEqual(t,ne.helper.sanitiseDate(e[_.date]),n):void 0}))},findDayAsObject:function(t,n,e){if("day"===n||"month"===n||"year"===n)for(var i,a=0;a<e.length;a++){if((i="string"==typeof(i=e[a])?ne.helper.sanitiseDate(i):i)instanceof Date&&ne.helper.dateEqual(t,i,n))return(o={})[_.date]=i,o;if(null!==i&&"object"==typeof i)if(i[_.year]){if("number"==typeof i[_.year]&&t.getFullYear()==i[_.year])return i;if(Array.isArray(i[_.year])&&-1<i[_.year].indexOf(t.getFullYear()))return i}else if(i[_.month]){if("number"==typeof i[_.month]&&t.getMonth()==i[_.month])return i;if(Array.isArray(i[_.month])){if(-1<i[_.month].indexOf(t.getMonth()))return i}else if(i[_.month]instanceof Date){var o=ne.helper.sanitiseDate(i[_.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return i}}else if(i[_.date]&&"day"===n){if(i[_.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[_.date]),n))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}}return null},findHourAsObject:function(t,n,e){if("hour"===n)for(var i,a=function(e,t){return t[_.hours]&&("number"==typeof t[_.hours]&&e.getHours()==t[_.hours]||Array.isArray(t[_.hours])&&-1<t[_.hours].indexOf(e.getHours()))?t:void 0},o=0;o<e.length;o++){if("number"==typeof(i=e[o])&&t.getHours()==i)return null;if(null!==i&&"object"==typeof i)if(i[_.days]&&a(t,i)){if("number"==typeof i[_.days]&&t.getDay()==i[_.days])return i;if(Array.isArray(i[_.days])&&-1<i[_.days].indexOf(t.getDay()))return i}else if(i[_.date]&&a(t,i)){if(i[_.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[_.date])))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}else if(a(t,i))return i}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:i.date(""+e,G))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===G.type,a="year"===(n=n||"day"),o=a||"month"===n,r="minute"===n,n=r||"hour"===n;return e=new Date(i?2e3:e.getFullYear(),i||a?0:e.getMonth(),i||o?1:e.getDate(),n?e.getHours():0,r?G.minTimeGap*Math.floor(e.getMinutes()/G.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||a?0:t.getMonth(),i||o?1:t.getDate(),n?t.getHours():0,r?G.minTimeGap*Math.floor(t.getMinutes()/G.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var a;return n||i||(n=(a=ne.get.startDate())&&G.minDate?new Date(Math.max(a,G.minDate)):a||G.minDate,i=G.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),G.minTimeGap*Math.ceil(n.getMinutes()/G.minTimeGap)),!(!e||n&&0<ne.helper.dateDiff(e,n,t)||i&&0<ne.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ne.get.startDate())&&G.minDate?new Date(Math.max(i,G.minDate)):i||G.minDate,n=G.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),G.minTimeGap*Math.ceil(t.getMinutes()/G.minTimeGap));var i="time"===G.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?i?ne.helper.mergeDateTime(e,t):t:n&&0<ne.helper.dateDiff(n,e,"minute")?i?ne.helper.mergeDateTime(e,n):n:e)},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t},isTodayButton:function(e){return e.text()===G.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),ae.isPlainObject(e))ae.extend(!0,G,e);else{if(t===oe)return G[e];ae.isPlainObject(G[e])?ae.extend(!0,G[e],t):G[e]=t}},internal:function(e,t){if(ae.isPlainObject(e))ae.extend(!0,ne,e);else{if(t===oe)return ne[e];ne[e]=t}},debug:function(){!G.silent&&G.debug&&(G.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,G.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!G.silent&&G.verbose&&G.debug&&(G.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,G.name+":"),ne.verbose.apply(console,arguments)))},error:function(){G.silent||(ne.error=Function.prototype.bind.call(console.error,console,G.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,n;G.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=G.name+":",n=0;y=!1,clearTimeout(ne.performance.timer),ae.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==oe||console.table!==oe)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):ae.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var a,o,n,r=f;return e=e||k,t=t||u,"string"==typeof i&&r!==oe&&(i=i.split(/[\. ]/),a=i.length-1,ae.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ae.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==oe)return o=r[n],!1;{if(!ae.isPlainObject(r[t])||e==a)return r[t]!==oe?o=r[t]:ne.error(s.method,i),!1;r=r[t]}}})),ae.isFunction(o)?n=o.apply(t,e):o!==oe&&(n=o),Array.isArray(v)?v.push(n):v!==oe?v=[v,n]:n!==oe&&(v=n),o}};C?(f===oe&&ne.initialize(),ne.invoke(w)):(f!==oe&&f.invoke("destroy"),ne.initialize())}),v!==oe?v:this},ae.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,type:"datetime",firstDayOfWeek:0,constantHeight:!0,today:!1,closable:!0,monthFirst:!0,touchReadonly:!0,inline:!1,on:null,initialDate:null,startMode:!1,minDate:null,maxDate:null,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,n){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim().replace(/([.:\/\-])\s+/g,"$1").replace(/\s+([.:\/-])/g,"$1").replace(/\s+/g," ")).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var n,i,a,o=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var r,s,l,c=-1,u=-1,d=-1,f=-1,p=-1,o=oe,m="time"===t.type,g=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!g)for(o=0<=ae.inArray(t.text.am.toLowerCase(),h)||!(0<=ae.inArray(t.text.pm.toLowerCase(),h))&&oe,n=0;n<v.length;n++)if(0<=(s=v[n]).indexOf(":")){if(u<0||c<0)for(l=s.split(":"),a=0;a<Math.min(2,l.length);a++)i=parseInt(l[a]),isNaN(i)&&(i=0),0===a?u=i%24:c=i%60;v.splice(n,1)}if(!m){for(n=0;n<h.length;n++)if(!((r=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].substring(0,r.length).toLowerCase()===r){f=i+1;break}if(0<=f)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),p=i,v.splice(n,1);break}if(f<0)for(n=0;n<v.length;n++)if(a=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[a]),!isNaN(i)&&1<=i&&i<=12){f=i,v.splice(a,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&1<=i&&i<=31){d=i,v.splice(n,1);break}if(p<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n]),!isNaN(i)){i<=99&&(i+=t.currentCentury),p=i,v.splice(n,1);break}}if(!g){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(c<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=59){c=i,v.splice(n,1);break}}if(c<0&&u<0&&d<0&&f<0&&p<0)return null;c<0&&(c=0),u<0&&(u=0),d<0&&(d=1),f<0&&(f=1),p<0&&(p=(new Date).getFullYear()),o!==oe&&(o?12===u&&(u=0):u<12&&(u+=12));e=new Date(p,f-1,d,u,c);return e.getMonth()===f-1&&e.getFullYear()===p||(e=new Date(p,f,0,u,c)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,n){return!0},onChange:function(e,t,n){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},onSelect:function(e,t){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input",append:".inline.field,.inline.fields"},regExp:{dateWords:/[^A-Za-z\u00C0-\u024F]+/g,dateNumbers:/[^\d:]+/g,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[SAaY]|"[^"]*"|'[^']*'/g},error:{popup:"UI Popup, a required component is not included in this page",method:"The method you called is not defined."},className:{calendar:"calendar",active:"active",popup:"ui popup",grid:"ui equal width grid",column:"column",table:"ui celled center aligned unstackable table",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document),function(D,S,A,E){"use strict";D.isFunction=D.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},S=void 0!==S&&S.Math==Math?S:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.fn.checkbox=function(u){var d,e=D(this),f=e.selector||"",x=(new Date).getTime(),w=[],C=u,k="string"==typeof C,T=[].slice.call(arguments,1);return e.each(function(){var e,p=D.extend(!0,{},D.fn.checkbox.settings,u),t=p.className,n=p.namespace,m=p.selector,s=p.error,i="."+n,a="module-"+n,g=D(this),o=D(this).children(m.label),h=D(this).children(m.input),v=h[0],r=!1,b=!1,l=g.data(a),c=this,y={initialize:function(){y.verbose("Initializing checkbox",p),y.create.label(),y.bind.events(),y.set.tabbable(),y.hide.input(),y.observeChanges(),y.instantiate(),y.setup()},instantiate:function(){y.verbose("Storing instance of module",y),l=y,g.data(a,y)},destroy:function(){y.verbose("Destroying module"),y.unbind.events(),y.show.input(),g.removeData(a)},fix:{reference:function(){g.is(m.input)&&(y.debug("Behavior called on <input> adjusting invoked element"),g=g.closest(m.checkbox),y.refresh())}},setup:function(){y.set.initialLoad(),y.is.indeterminate()?(y.debug("Initial value is indeterminate"),y.indeterminate()):y.is.checked()?(y.debug("Initial value is checked"),y.check()):(y.debug("Initial value is unchecked"),y.uncheck()),y.remove.initialLoad()},refresh:function(){o=g.children(m.label),h=g.children(m.input),v=h[0]},hide:{input:function(){y.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying <input> z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in S&&((e=new MutationObserver(function(e){y.debug("DOM tree modified, updating selector cache"),y.refresh()})).observe(c,{childList:!0,subtree:!0}),y.debug("Setting up mutation observer",e))},attachEvents:function(e,t){var n=D(e);t=D.isFunction(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):y.error(s.notFound)},preventDefaultOnInputTarget:function(){"undefined"!=typeof event&&null!==event&&D(event.target).is(m.input)&&(y.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){y.should.ignoreCallbacks()||p.onChange.call(v)},click:function(e){var t=D(e.target);t.is(m.input)?y.verbose("Using default check action on initialized checkbox"):t.is(m.link)?y.debug("Clicking link inside checkbox, skipping toggle"):(y.toggle(),h.focus(),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,a=27,o=37,r=38,s=39,l=40,c=y.get.radios(),u=c.index(g),d=c.length,f=!1;if(t==o||t==r?f=(0===u?d:u)-1:t!=s&&t!=l||(f=u===d-1?0:u+1),!y.should.ignoreCallbacks()&&!1!==f){if(!1===p.beforeUnchecked.apply(v))return y.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===p.beforeChecked.apply(D(c[f]).children(m.input)[0]))return y.verbose("Next option should not allow check, cancelling key navigation"),!1}b=!1,t==a?(y.verbose("Escape key pressed blurring field"),h.blur(),b=!0,e.stopPropagation()):!e.ctrlKey&&y.can.change()&&(t==i||t==n&&p.enableEnterKey?(y.verbose("Enter/space key pressed, toggling checkbox"),y.toggle(),b=!0):g.is(".toggle, .slider")&&!y.is.radio()&&(t==o&&y.is.checked()?(y.uncheck(),b=!0):t==s&&y.is.unchecked()&&(y.check(),b=!0)))},keyup:function(e){b&&e.preventDefault()}},check:function(){y.should.allowCheck()&&(y.debug("Checking checkbox",h),y.set.checked(),y.should.ignoreCallbacks()||(p.onChecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},uncheck:function(){y.should.allowUncheck()&&(y.debug("Unchecking checkbox"),y.set.unchecked(),y.should.ignoreCallbacks()||(p.onUnchecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},indeterminate:function(){y.should.allowIndeterminate()?y.debug("Checkbox is already indeterminate"):(y.debug("Making checkbox indeterminate"),y.set.indeterminate(),y.should.ignoreCallbacks()||(p.onIndeterminate.call(v),y.trigger.change()))},determinate:function(){y.should.allowDeterminate()?y.debug("Checkbox is already determinate"):(y.debug("Making checkbox determinate"),y.set.determinate(),y.should.ignoreCallbacks()||(p.onDeterminate.call(v),y.trigger.change()))},enable:function(){y.is.enabled()?y.debug("Checkbox is already enabled"):(y.debug("Enabling checkbox"),y.set.enabled(),y.should.ignoreCallbacks()||(p.onEnable.call(v),p.onEnabled.call(v)))},disable:function(){y.is.disabled()?y.debug("Checkbox is already disabled"):(y.debug("Disabling checkbox"),y.set.disabled(),y.should.ignoreCallbacks()||(p.onDisable.call(v),p.onDisabled.call(v)))},get:{radios:function(){var e=y.get.name();return D('input[name="'+e+'"]').closest(m.checkbox)},otherRadios:function(){return y.get.radios().not(g)},name:function(){return h.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return h.hasClass(t.radio)||"radio"==h.attr("type")},indeterminate:function(){return h.prop("indeterminate")!==E&&h.prop("indeterminate")},checked:function(){return h.prop("checked")!==E&&h.prop("checked")},disabled:function(){return h.prop("disabled")!==E&&h.prop("disabled")},enabled:function(){return!y.is.disabled()},determinate:function(){return!y.is.indeterminate()},unchecked:function(){return!y.is.checked()}},should:{allowCheck:function(){return y.is.determinate()&&y.is.checked()&&!y.is.initialLoad()?(y.debug("Should not allow check, checkbox is already checked"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeChecked.apply(v))||(y.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return y.is.determinate()&&y.is.unchecked()&&!y.is.initialLoad()?(y.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeUnchecked.apply(v))||(y.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return y.is.indeterminate()&&!y.is.initialLoad()?(y.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeIndeterminate.apply(v))||(y.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return y.is.determinate()&&!y.is.initialLoad()?(y.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!y.should.ignoreCallbacks()&&!1===p.beforeDeterminate.apply(v))||(y.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return r&&!p.fireOnInit}},can:{change:function(){return!(g.hasClass(t.disabled)||g.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof p.uncheckable?p.uncheckable:!y.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){y.verbose("Setting class to checked"),g.removeClass(t.indeterminate).addClass(t.checked),y.is.radio()&&y.uncheckOthers(),!y.is.indeterminate()&&y.is.checked()?y.debug("Input is already checked, skipping input property change"):(y.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){y.verbose("Removing checked class"),g.removeClass(t.indeterminate).removeClass(t.checked),!y.is.indeterminate()&&y.is.unchecked()?y.debug("Input is already unchecked"):(y.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){y.verbose("Setting class to indeterminate"),g.addClass(t.indeterminate),y.is.indeterminate()?y.debug("Input is already indeterminate, skipping input property change"):(y.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){y.verbose("Removing indeterminate class"),g.removeClass(t.indeterminate),y.is.determinate()?y.debug("Input is already determinate, skipping input property change"):(y.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){y.verbose("Setting class to disabled"),g.addClass(t.disabled),y.is.disabled()?y.debug("Input is already disabled, skipping input property change"):(y.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){y.verbose("Removing disabled class"),g.removeClass(t.disabled),y.is.enabled()?y.debug("Input is already enabled, skipping input property change"):(y.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){y.verbose("Adding tabindex to checkbox"),h.attr("tabindex")===E&&h.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e,t=h[0];t&&(e=A.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(m.label).length?(h.prev(m.label).detach().insertAfter(h),y.debug("Moving existing label",o)):y.has.label()||(o=D("<label>").insertAfter(h),y.debug("Creating label",o))}},has:{label:function(){return 0<o.length}},bind:{events:function(){y.verbose("Attaching checkbox events"),g.on("click"+i,y.event.click).on("change"+i,y.event.change).on("keydown"+i,m.input,y.event.keydown).on("keyup"+i,m.input,y.event.keyup)}},unbind:{events:function(){y.debug("Removing events"),g.off(i)}},uncheckOthers:function(){var e=y.get.otherRadios();y.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){y.can.change()?y.is.indeterminate()||y.is.unchecked()?(y.debug("Currently unchecked"),y.check()):y.is.checked()&&y.can.uncheck()&&(y.debug("Currently checked"),y.uncheck()):y.is.radio()||y.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(y.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,p,e);else{if(t===E)return p[e];D.isPlainObject(p[e])?D.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,y,e);else{if(t===E)return y[e];y[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,p.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),y.verbose.apply(console,arguments)))},error:function(){p.silent||(y.error=Function.prototype.bind.call(console.error,console,p.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(x||t),x=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=p.name+":",n=0;x=!1,clearTimeout(y.performance.timer),D.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==E||console.table!==E)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):D.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var a,o,n,r=l;return e=e||T,t=t||c,"string"==typeof i&&r!==E&&(i=i.split(/[\. ]/),a=i.length-1,D.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(D.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==E)return o=r[n],!1;{if(!D.isPlainObject(r[t])||e==a)return r[t]!==E?o=r[t]:y.error(s.method,i),!1;r=r[t]}}})),D.isFunction(o)?n=o.apply(t,e):o!==E&&(n=o),Array.isArray(d)?d.push(n):d!==E?d=[d,n]:n!==E&&(d=n),o}};k?(l===E&&y.initialize(),y.invoke(C)):(l!==E&&l.invoke("destroy"),y.initialize())}),d!==E?d:this},D.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!1,performance:!0,uncheckable:"auto",fireOnInit:!1,enableEnterKey:!0,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(k,e,T,D){"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.dimmer=function(g){var h,v=k(this),b=(new Date).getTime(),y=[],x=g,w="string"==typeof x,C=[].slice.call(arguments,1);return v.each(function(){var a,t,o=k.isPlainObject(g)?k.extend(!0,{},k.fn.dimmer.settings,g):k.extend({},k.fn.dimmer.settings),n=o.selector,e=o.namespace,i=o.className,s=o.error,r="."+e,l="module-"+e,c=v.selector||"",u="ontouchstart"in T.documentElement?"touchstart":"click",d=k(this),f=this,p=d.data(l),m={preinitialize:function(){a=m.is.dimmer()?(t=d.parent(),d):(t=d,m.has.dimmer()?o.dimmerName?t.find(n.dimmer).filter("."+o.dimmerName):t.find(n.dimmer):m.create())},initialize:function(){m.debug("Initializing dimmer",o),m.bind.events(),m.set.dimmable(),m.instantiate()},instantiate:function(){m.verbose("Storing instance of module",m),p=m,d.data(l,p)},destroy:function(){m.verbose("Destroying previous module",a),m.unbind.events(),m.remove.variation(),t.off(r)},bind:{events:function(){"hover"==o.on?t.on("mouseenter"+r,m.show).on("mouseleave"+r,m.hide):"click"==o.on&&t.on(u+r,m.toggle),m.is.page()&&(m.debug("Setting as a page dimmer",t),m.set.pageDimmer()),m.is.closable()&&(m.verbose("Adding dimmer close event",a),t.on(u+r,n.dimmer,m.event.click))}},unbind:{events:function(){d.removeData(l),t.off(r)}},event:{click:function(e){m.verbose("Determining if event occurred on dimmer",e),0!==a.find(e.target).length&&!k(e.target).is(n.content)||(m.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);m.debug("Add content to dimmer",e),e.parent()[0]!==a[0]&&e.detach().appendTo(a)},create:function(){var e=k(o.template.dimmer(o));return o.dimmerName&&(m.debug("Creating named dimmer",o.dimmerName),e.addClass(o.dimmerName)),e.appendTo(t),e},show:function(e){e=k.isFunction(e)?e:function(){},m.is.dimmed()&&!m.is.animating()||!m.is.enabled()?m.debug("Dimmer is already shown or disabled"):!1===o.onShow.call(f)?m.verbose("Show callback returned false cancelling dimmer show"):(m.debug("Showing dimmer",a,o),m.set.variation(),m.animate.show(e),o.onChange.call(f))},hide:function(e){e=k.isFunction(e)?e:function(){},m.is.dimmed()||m.is.animating()?!1===o.onHide.call(f)?m.verbose("Hide callback returned false cancelling dimmer hide"):(m.debug("Hiding dimmer",a),m.animate.hide(e),o.onChange.call(f)):m.debug("Dimmer is not visible")},toggle:function(){m.verbose("Toggling dimmer visibility",a),m.is.dimmed()?m.is.closable()&&m.hide():m.show()},animate:{show:function(e){e=k.isFunction(e)?e:function(){},o.useCSS&&k.fn.transition!==D&&a.transition("is supported")?((o.useFlex?(m.debug("Using flex dimmer"),m.remove):(m.debug("Using legacy non-flex dimmer"),m.set)).legacy(),"auto"!==o.opacity&&m.set.opacity(),a.transition({debug:o.debug,verbose:o.verbose,silent:o.silent,displayType:o.useFlex?"flex":"block",animation:(o.transition.showMethod||o.transition)+" in",queue:!1,duration:m.get.duration(),useFailSafe:!0,onStart:function(){m.set.dimmed()},onComplete:function(){m.set.active(),o.onVisible.call(a),e()}})):(m.verbose("Showing dimmer animation with javascript"),m.set.dimmed(),"auto"==o.opacity&&(o.opacity=.8),a.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(m.get.duration(),o.opacity,function(){a.removeAttr("style"),m.set.active(),o.onVisible.call(a),e()}))},hide:function(e){e=k.isFunction(e)?e:function(){},o.useCSS&&k.fn.transition!==D&&a.transition("is supported")?(m.verbose("Hiding dimmer with css"),a.transition({debug:o.debug,verbose:o.verbose,silent:o.silent,displayType:o.useFlex?"flex":"block",animation:(o.transition.hideMethod||o.transition)+" out",queue:!1,duration:m.get.duration(),useFailSafe:!0,onComplete:function(){m.remove.dimmed(),m.remove.variation(),m.remove.active(),o.onHidden.call(a),e()}})):(m.verbose("Hiding dimmer with javascript"),a.stop().fadeOut(m.get.duration(),function(){m.remove.dimmed(),m.remove.active(),a.removeAttr("style"),o.onHidden.call(a),e()}))}},get:{dimmer:function(){return a},duration:function(){return m.is.active()?o.transition.hideDuration||o.duration.hide||o.duration:o.transition.showDuration||o.duration.show||o.duration}},has:{dimmer:function(){return o.dimmerName?0<d.find(n.dimmer).filter("."+o.dimmerName).length:0<d.find(n.dimmer).length}},is:{active:function(){return a.hasClass(i.active)},animating:function(){return a.is(":animated")||a.hasClass(i.animating)},closable:function(){return"auto"==o.closable?"hover"!=o.on:o.closable},dimmer:function(){return d.hasClass(i.dimmer)},dimmable:function(){return d.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!m.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return a.hasClass(i.pageDimmer)}},can:{show:function(){return!a.hasClass(i.disabled)}},set:{opacity:function(e){var t=a.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===o.opacity?0:o.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",m.debug("Setting opacity to",e),a.css("background-color",t)},legacy:function(){a.addClass(i.legacy)},active:function(){a.addClass(i.active)},dimmable:function(){t.addClass(i.dimmable)},dimmed:function(){t.addClass(i.dimmed)},pageDimmer:function(){a.addClass(i.pageDimmer)},disabled:function(){a.addClass(i.disabled)},variation:function(e){(e=e||o.variation)&&a.addClass(e)}},remove:{active:function(){a.removeClass(i.active)},legacy:function(){a.removeClass(i.legacy)},dimmed:function(){t.removeClass(i.dimmed)},disabled:function(){a.removeClass(i.disabled)},variation:function(e){(e=e||o.variation)&&a.removeClass(e)}},setting:function(e,t){if(m.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,o,e);else{if(t===D)return o[e];k.isPlainObject(o[e])?k.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,m,e);else{if(t===D)return m[e];m[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?m.performance.log(arguments):(m.debug=Function.prototype.bind.call(console.info,console,o.name+":"),m.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?m.performance.log(arguments):(m.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),m.verbose.apply(console,arguments)))},error:function(){o.silent||(m.error=Function.prototype.bind.call(console.error,console,o.name+":"),m.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(m.performance.timer),m.performance.timer=setTimeout(m.performance.display,500)},display:function(){var e=o.name+":",n=0;b=!1,clearTimeout(m.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==D||console.table!==D)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var a,o,n,r=p;return e=e||C,t=t||f,"string"==typeof i&&r!==D&&(i=i.split(/[\. ]/),a=i.length-1,k.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==D)return o=r[n],!1;{if(!k.isPlainObject(r[t])||e==a)return r[t]!==D?o=r[t]:m.error(s.method,i),!1;r=r[t]}}})),k.isFunction(o)?n=o.apply(t,e):o!==D&&(n=o),Array.isArray(h)?h.push(n):h!==D?h=[h,n]:n!==D&&(h=n),o}};m.preinitialize(),w?(p===D&&m.initialize(),m.invoke(x)):(p!==D&&p.invoke("destroy"),m.initialize())}),h!==D?h:this},k.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(){},onVisible:function(){},onHidden: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=k("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=k("<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(Z,ee,te,ne){"use strict";Z.isFunction=Z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ee=void 0!==ee&&ee.Math==Math?ee:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Z.fn.dropdown=function(W){var Y,B=Z(this),$=Z(te),K=B.selector||"",Q=(new Date).getTime(),G=[],X=W,J="string"==typeof X,_=[].slice.call(arguments,1);return B.each(function(q){var f,e,t,n,i,a,o,r,s,p=Z.isPlainObject(W)?Z.extend(!0,{},Z.fn.dropdown.settings,W):Z.extend({},Z.fn.dropdown.settings),m=p.className,g=p.message,l=p.fields,h=p.keys,v=p.metadata,j=p.namespace,c=p.regExp,b=p.selector,u=p.error,H=p.templates,d="."+j,y="module-"+j,x=Z(this),w=[ee,te].indexOf(p.context)<0?$.find(p.context):Z(p.context),C=x.find(b.text),k=x.find(b.search),T=x.find(b.sizer),D=x.find(b.input),N=x.find(b.icon),V=x.find(b.clearIcon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),F=p.hideDividers?E.parent().children(b.divider):Z(),M=!1,z=!1,U=!1,O=!1,P=this,I=!1,R=x.data(y),L={initialize:function(){L.debug("Initializing dropdown",p),L.is.alreadySetup()?L.setup.reference():(p.ignoreDiacritics&&!String.prototype.normalize&&(p.ignoreDiacritics=!1,L.error(u.noNormalize,P)),L.create.id(),L.setup.layout(),p.values&&(L.set.initialLoad(),L.change.values(p.values),L.remove.initialLoad()),L.refreshData(),L.save.defaults(),L.restore.selected(),L.bind.events(),L.observeChanges(),L.instantiate())},instantiate:function(){L.verbose("Storing instance of dropdown",L),R=L,x.data(y,L)},destroy:function(){L.verbose("Destroying previous dropdown",x),L.remove.tabbable(),L.remove.active(),A.transition("stop all"),A.removeClass(m.visible).addClass(m.hidden),x.off(d).removeData(y),A.off(d),$.off(i),L.disconnect.menuObserver(),L.disconnect.selectObserver(),L.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ee&&(o=new MutationObserver(L.event.select.mutation),r=new MutationObserver(L.event.menu.mutation),s=new MutationObserver(L.event.class.mutation),L.debug("Setting up mutation observer",o,r,s),L.observe.select(),L.observe.menu(),L.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){o&&o.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){L.has.input()&&o&&o.observe(x[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){L.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){L.has.search()&&s&&s.observe(x[0],{attributes:!0})}},create:{id:function(){a=(Math.random().toString(16)+"000000000").slice(2,10),i="."+a,L.verbose("Creating unique id for element",a)},userChoice:function(e){var n,i;return!!(e=e||L.get.userValues())&&(e=Array.isArray(e)?e:[e],Z.each(e,function(e,t){!1===L.get.item(t)&&(i=p.templates.addition(L.add.variables(g.addResult,t)),i=Z("<div />").html(i).attr("data-"+v.value,t).attr("data-"+v.text,t).addClass(m.addition).addClass(m.item),p.hideAdditions&&i.addClass(m.hidden),n=n===ne?i:n.add(i),L.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=L.get.userValues();t&&(L.debug("Adding user labels",t),Z.each(t,function(e,t){L.verbose("Adding custom user value"),L.add.label(t,t)}))},menu:function(){A=Z("<div />").addClass(m.menu).appendTo(x)},sizer:function(){T=Z("<span />").addClass(m.sizer).insertAfter(k)}},search:function(e){e=e!==ne?e:L.get.query(),L.verbose("Searching for query",e),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",p.onSearch):L.has.minCharacters(e)&&!1!==p.onSearch.call(P,e)?L.filter(e):L.hide(null,!0)},select:{firstUnfiltered:function(){L.verbose("Selecting first non-filtered element"),L.remove.selectedItem(),E.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(m.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);(0<t.length?(L.verbose("Moving selection to",t),t):(L.verbose("Moving selection to",e),e)).addClass(m.selected)}},setup:{api:function(){var e={debug:p.debug,urlData:{value:L.get.value(),query:L.get.query()},on:!1};L.verbose("First request, initializing API"),x.api(e)},layout:function(){var e;x.is("select")&&(L.setup.select(),L.setup.returnedObject()),L.has.menu()||L.create.menu(),L.is.clearable()&&!L.has.clearItem()&&(L.verbose("Adding clear icon"),V=Z("<i />").addClass("remove icon").insertBefore(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),e=x.prev("label"),k=Z("<input />").addClass(m.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off"),e.length&&(e.attr("id")||e.attr("id",L.get.id()+"_formLabel"),k.attr("aria-labelledby",e.attr("id"))),k.insertBefore(C)),L.is.multiple()&&L.is.searchSelection()&&!L.has.sizer()&&L.create.sizer(),p.allowTab&&L.set.tabbable()},select:function(){var e=L.get.selectValues();L.debug("Dropdown initialized on a select",e),0<(D=x.is("select")?x:D).parent(b.dropdown).length?(L.debug("UI dropdown already exists. Creating dropdown menu only"),x=D.closest(b.dropdown),L.has.menu()||L.create.menu(),A=x.children(b.menu),L.setup.menu(e)):(L.debug("Creating entire dropdown from select"),x=Z("<div />").attr("class",D.attr("class")).addClass(m.selection).addClass(m.dropdown).html(H.dropdown(e,l,p.preserveHTML,p.className)).insertBefore(D),D.hasClass(m.multiple)&&!1===D.prop("multiple")&&(L.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&L.set.multiple(),D.prop("disabled")&&(L.debug("Disabling dropdown"),x.addClass(m.disabled)),D.is("[required]")&&(p.forceSelection=!0),D.removeAttr("required").removeAttr("class").detach().prependTo(x)),L.refresh()},menu:function(e){A.html(H.menu(e,l,p.preserveHTML,p.className)),E=A.find(b.item),F=p.hideDividers?E.parent().children(b.divider):Z()},reference:function(){L.debug("Dropdown behavior was called on select, replacing with closest dropdown"),x=x.parent(b.dropdown),R=x.data(y),P=x[0],L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=B.slice(0,q),t=B.slice(q+1);B=e.add(x).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(b.item),F=p.hideDividers?E.parent().children(b.divider):Z()},refreshSelectors:function(){L.verbose("Refreshing selector cache"),C=x.find(b.text),k=x.find(b.search),D=x.find(b.input),N=x.find(b.icon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),F=p.hideDividers?E.parent().children(b.divider):Z()},refreshData:function(){L.verbose("Refreshing cached metadata"),E.removeData(v.text).removeData(v.value)},clearData:function(){L.verbose("Clearing metadata"),E.removeData(v.text).removeData(v.value),x.removeData(v.defaultText).removeData(v.defaultValue).removeData(v.placeholderText)},clearItems:function(){A.empty(),L.refreshItems()},toggle:function(){L.verbose("Toggling menu visibility"),L.is.active()?L.hide():L.show()},show:function(e,t){if(e=Z.isFunction(e)?e:function(){},(I||O)&&L.is.remote()&&L.is.noApiCache()&&L.clearItems(),!L.can.show()&&L.is.remote()&&(L.debug("No API results retrieved, searching before show"),L.queryRemote(L.get.query(),L.show,[e,t])),L.can.show()&&!L.is.active()){if(L.debug("Showing dropdown"),!L.has.message()||L.has.maxSelections()||L.has.allResultsFiltered()||L.remove.message(),L.is.allFiltered())return!0;!1!==p.onShow.call(P)&&L.animate.show(function(){L.bind.intent(),L.has.search()&&!t&&L.focusSearch(),L.set.visible(),e.call(P)})}},hide:function(e,t){var n;e=Z.isFunction(e)?e:function(){},L.is.active()&&!L.is.animatingOutward()?(L.debug("Hiding dropdown"),!1!==p.onHide.call(P)&&(L.animate.hide(function(){L.remove.visible(),L.is.focusedOnSearch()&&!0!==t&&k.blur(),e.call(P)}),0<(n=x.find(b.menu)).length&&(L.verbose("Hiding sub-menu",n),n.each(function(){L.animate.hide(!1,Z(this))})))):L.unbind.intent(),I=O=!1},hideOthers:function(){L.verbose("Finding other dropdowns to hide"),B.not(x).has(b.menu+"."+m.visible).dropdown("hide")},hideMenu:function(){L.verbose("Hiding menu instantaneously"),L.remove.active(),L.remove.visible(),A.transition("hide")},hideSubMenus:function(){var e=A.children(b.item).find(b.menu);L.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){L.bind.keyboardEvents(),L.bind.inputEvents(),L.bind.mouseEvents()},keyboardEvents:function(){L.verbose("Binding keyboard events"),x.on("keydown"+d,L.event.keydown),L.has.search()&&x.on(L.get.inputEvent()+d,b.search,L.event.input),L.is.multiple()&&$.on("keydown"+i,L.event.document.keydown)},inputEvents:function(){L.verbose("Binding input change events"),x.on("change"+d,b.input,L.event.change),L.is.multiple()&&L.is.searchSelection()&&x.on("paste"+d,b.search,L.event.paste)},mouseEvents:function(){L.verbose("Binding mouse events"),L.is.multiple()&&x.on("click"+d,b.label,L.event.label.click).on("click"+d,b.remove,L.event.remove.click),L.is.searchSelection()?(x.on("mousedown"+d,L.event.mousedown).on("mouseup"+d,L.event.mouseup).on("mousedown"+d,b.menu,L.event.menu.mousedown).on("mouseup"+d,b.menu,L.event.menu.mouseup).on("click"+d,b.icon,L.event.icon.click).on("click"+d,b.clearIcon,L.event.clearIcon.click).on("focus"+d,b.search,L.event.search.focus).on("click"+d,b.search,L.event.search.focus).on("blur"+d,b.search,L.event.search.blur).on("click"+d,b.text,L.event.text.focus),L.is.multiple()&&x.on("click"+d,L.event.click).on("click"+d,L.event.search.focus)):("click"==p.on?x.on("click"+d,b.icon,L.event.icon.click).on("click"+d,L.event.test.toggle):"hover"==p.on?x.on("mouseenter"+d,L.delay.show).on("mouseleave"+d,L.delay.hide).on("touchstart"+d,L.event.test.toggle).on("touchstart"+d,b.icon,L.event.icon.click):x.on(p.on+d,L.toggle),x.on("mousedown"+d,L.event.mousedown).on("mouseup"+d,L.event.mouseup).on("focus"+d,L.event.focus).on("click"+d,b.clearIcon,L.event.clearIcon.click),L.has.menuSearch()?x.on("blur"+d,b.search,L.event.search.blur):x.on("blur"+d,L.event.blur)),A.on("mouseenter"+d,b.item,L.event.item.mouseenter).on("touchstart"+d,b.item,L.event.item.mouseenter).on("mouseleave"+d,b.item,L.event.item.mouseleave).on("click"+d,b.item,L.event.item.click)},intent:function(){L.verbose("Binding hide intent event to document"),$.on("click"+i,L.event.test.hide)}},unbind:{intent:function(){L.verbose("Removing hide intent event from document"),$.off("click"+i)}},filter:function(e){function t(){L.is.multiple()&&L.filterActive(),(e||!e&&0==L.get.activeItem().length)&&L.select.firstUnfiltered(),L.has.allResultsFiltered()?p.onNoResults.call(P,n)?p.allowAdditions?p.hideAdditions&&(L.verbose("User addition with no menu, setting empty style"),L.set.empty(),L.hideMenu()):(L.verbose("All items filtered, showing message",n),L.add.message(g.noResults)):(L.verbose("All items filtered, hiding dropdown",n),L.hideMenu()):(L.remove.empty(),L.remove.message()),p.allowAdditions&&L.add.userSuggestion(L.escape.htmlEntities(e)),L.is.searchSelection()&&L.can.show()&&L.is.focusedOnSearch()&&L.show()}var n=e!==ne?e:L.get.query();p.useLabels&&L.has.maxSelections()||(p.apiSettings?L.can.useAPI()?L.queryRemote(n,function(){p.filterRemoteData&&L.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(p.delimiter):[]),L.is.multiple()&&Z.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(m.filtered)}),L.focusSearch(!0),t()}):L.error(u.noAPI):(L.filterItems(n),t()))},queryRemote:function(e,o,r){Array.isArray(r)||(r=[r]);var e={errorDuration:!1,cache:"local",throttle:p.throttle,urlData:{query:e}},t={onError:function(e,t,n){L.add.message(g.serverError),I=O=!1,o.apply(null,r),"function"==typeof p.apiSettings.onError&&p.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){L.add.message(g.serverError),I=O=!1,o.apply(null,r),"function"==typeof p.apiSettings.onFailure&&p.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){var i=e[l.remoteValues],a=(Array.isArray(i)||(i=[]),L.remove.message(),{});a[l.values]=i,L.setup.menu(a),0!==i.length||p.allowAdditions?""!==(a=L.is.multiple()?L.get.values():L.get.value())&&(L.verbose("Value(s) present after click icon, select value(s) in items"),L.set.selected(a,null,!0,!0)):L.add.message(g.noResults),I=O=!1,o.apply(null,r),"function"==typeof p.apiSettings.onSuccess&&p.apiSettings.onSuccess.call(this,e,t,n)}};x.api("get request")||L.setup.api(),e=Z.extend(!0,{},e,p.apiSettings,t),x.api("setting",e).api("query")},filterItems:function(e){var n=L.remove.diacritics(e!==ne?e:L.get.query()),i=null,e=L.escape.string(n),t=(p.ignoreSearchCase?"i":"")+"gm",a=new RegExp("^"+e,t);L.has.query()&&(i=[],L.verbose("Searching for matching values",n),E.each(function(){var e,t=Z(this);return!t.hasClass(m.unfilterable)&&("both"!==p.match&&"text"!==p.match||!(-1!==(e=L.remove.diacritics(String(L.get.choiceText(t,!1)))).search(a)||"exact"===p.fullTextSearch&&L.exactSearch(n,e)||!0===p.fullTextSearch&&L.fuzzySearch(n,e)))&&("both"!==p.match&&"value"!==p.match||!(-1!==(t=L.remove.diacritics(String(L.get.choiceValue(t,e)))).search(a)||"exact"===p.fullTextSearch&&L.exactSearch(n,t)||!0===p.fullTextSearch&&L.fuzzySearch(n,t)))?void 0:(i.push(this),!0)})),L.debug("Showing only matched items",n),L.remove.filteredItem(),i&&E.not(i).addClass(m.filtered),L.has.query()?!0===p.hideDividers?F.addClass(m.hidden):"empty"===p.hideDividers&&F.removeClass(m.hidden).filter(function(){var e=Z(this).nextUntil(b.item);return 0===(e.length?e:Z(this)).nextUntil(b.divider).filter(b.item+":not(."+m.filtered+")").length}).addClass(m.hidden):F.removeClass(m.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=p.ignoreSearchCase?e.toLowerCase():e,t=p.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var r=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=p.ignoreSearchCase?e.toLowerCase():e,-1<(t=p.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){p.useLabels&&E.filter("."+m.active).addClass(m.filtered)},focusSearch:function(e){L.has.search()&&!L.is.focusedOnSearch()&&(e?(x.off("focus"+d,b.search),k.focus(),x.on("focus"+d,b.search,L.event.search.focus)):k.focus())},blurSearch:function(){L.has.search()&&k.blur()},forceSelection:function(){var e=E.not(m.filtered).filter("."+m.selected).eq(0),t=E.not(m.filtered).filter("."+m.active).eq(0),e=0<e.length?e:t,t=0<e.length;p.allowAdditions||t&&!L.is.multiple()?(L.debug("Forcing partial selection to selected item",e),L.event.item.click.call(e,{},!0)):L.remove.searchTerm()},change:{values:function(e){p.allowAdditions||L.clear(),L.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,L.setup.menu(t),Z.each(e,function(e,t){if(!0===t.selected&&(L.debug("Setting initial selection to",t[l.value]),L.set.selected(t[l.value]),!L.is.multiple()))return!1}),L.has.selectInput()&&(L.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),Z.each(e,function(e,t){var n=p.templates.deQuote(t[l.value]),i=p.templates.escape(t[l.name]||"",p.preserveHTML);D.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),L.observe.select())}},event:{paste:function(e){(e.originalEvent.clipboardData||ee.clipboardData).getData("text").split(p.delimiter).forEach(function(e){L.set.selected(L.escape.htmlEntities(e.trim()),null,!0,!0)}),e.preventDefault()},change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){p.showOnFocus&&!M&&L.is.hidden()&&!t&&(I=!0,L.show())},blur:function(e){t=te.activeElement===this,M||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection()?n=!0:M=!0},mouseup:function(){L.is.searchSelection()?n=!1:M=!1},click:function(e){Z(e.target).is(x)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){M=!0,L.is.multiple()&&L.remove.activeLabel(),I||L.is.active()||!(p.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(I=!0,L.search())},blur:function(e){t=te.activeElement===this,!L.is.searchSelection()||n||z||t||(p.forceSelection?L.forceSelection():p.allowAdditions||L.remove.searchTerm(),L.hide()),n=!1}},clearIcon:{click:function(e){L.clear(),L.is.searchSelection()&&L.remove.searchTerm(),L.hide(),e.stopPropagation()}},icon:{click:function(e){O=!0,L.has.search()?L.is.active()?L.blurSearch():p.showOnFocus?L.focusSearch():L.toggle():L.toggle(),e.stopPropagation()}},text:{focus:function(e){M=!0,L.focusSearch()}},input:function(e){(L.is.multiple()||L.is.searchSelection())&&L.set.filtered(),clearTimeout(L.timer),L.timer=setTimeout(L.search,p.delay.search)},label:{click:function(e){var t=Z(this),n=x.find(b.label),i=n.filter("."+m.active),a=t.nextAll("."+m.active),o=t.prevAll("."+m.active),a=(0<a.length?t.nextUntil(a):t.prevUntil(o)).add(i).add(t);e.shiftKey?(i.removeClass(m.active),a.addClass(m.active)):e.ctrlKey?t.toggleClass(m.active):(i.removeClass(m.active),t.addClass(m.active)),p.onLabelSelect.apply(this,n.filter("."+m.active)),e.stopPropagation()}},remove:{click:function(e){var t=Z(this).parent();t.hasClass(m.active)?L.remove.activeLabels():L.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=L.is.multiple()?L.show:L.toggle;L.is.bubbledLabelClick(e)||L.is.bubbledIconClick(e)||(L.is.multiple()&&(!L.is.multiple()||L.is.active())||(I=!0),L.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){L.determine.eventInModule(e,L.hide)&&P.id&&Z(e.target).attr("for")===P.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&L.check.disabled()})}},select:{mutation:function(e){L.is.selectMutation(e)&&(L.debug("<select> modified, recreating menu"),L.disconnect.selectObserver(),L.refresh(),L.setup.select(),L.set.selected(),L.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?Z(e.addedNodes[0]):Z(!1),e=e.removedNodes?Z(e.removedNodes[0]):Z(!1),t=t.add(e),e=t.is(b.addition)||0<t.closest(b.addition).length,t=t.is(b.message)||0<t.closest(b.message).length;e||t?(L.debug("Updating item selector cache"),L.refreshItems()):(L.debug("Menu modified, updating selector cache"),L.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=Z(e.target),n=Z(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Showing sub-menu",i),Z.each(a,function(){L.animate.hide(!1,Z(this))}),L.animate.show(!1,i)},p.delay.show),e.preventDefault())},mouseleave:function(e){var t=Z(this).find(b.menu);0<t.length&&(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Hiding sub-menu",t),t.each(function(){L.animate.hide(!1,Z(this))})},p.delay.hide))},click:function(e,t){var n=Z(this),e=Z(e?e.target:""),i=n.find(b.menu),a=L.get.choiceText(n),o=L.get.choiceValue(n,a),r=0<i.length,i=0<i.find(e).length;"input"!==te.activeElement.tagName.toLowerCase()&&Z(te.activeElement).blur(),i||r&&!p.allowCategorySelection||(L.is.searchSelection()&&(p.allowAdditions&&L.remove.userAddition(),L.remove.searchTerm(),L.is.focusedOnSearch()||!0===t||L.focusSearch(!0)),p.useLabels||(L.remove.filteredItem(),L.set.scrollPosition(n)),L.determine.selectAction.call(this,a,o))}},document:{keydown:function(e){var t,n,i,a,o,r,s,l,c,u,d,f=e.which;L.is.inObject(f,h)&&((n=(t=x.find(b.label)).filter("."+m.active)).data(v.value),r=t.index(n),s=t.length,i=0<n.length,a=1<n.length,o=0===r,r=r+1==s,s=L.is.searchSelection(),l=L.is.focusedOnSearch(),c=L.is.focused(),d=(u=l&&0===L.get.caretPosition(!1))&&0!==L.get.caretPosition(!0),s&&!i&&!l||(f==h.leftArrow?!c&&!u||i?i&&(e.shiftKey?L.verbose("Adding previous label to selection"):(L.verbose("Selecting previous label"),t.removeClass(m.active)),o&&!a?n.addClass(m.active):n.prev(b.siblingLabel).addClass(m.active).end(),e.preventDefault()):(L.verbose("Selecting previous label"),t.last().addClass(m.active)):f==h.rightArrow?(c&&!i&&t.first().addClass(m.active),i&&(e.shiftKey?L.verbose("Adding next label to selection"):(L.verbose("Selecting next label"),t.removeClass(m.active)),r?s?l?t.removeClass(m.active):L.focusSearch():(a?n.next(b.siblingLabel):n).addClass(m.active):n.next(b.siblingLabel).addClass(m.active),e.preventDefault())):f==h.deleteKey||f==h.backspace?i?(L.verbose("Removing active labels"),r&&s&&!l&&L.focusSearch(),n.last().next(b.siblingLabel).addClass(m.active),L.remove.activeLabels(n),e.preventDefault()):!u||d||i||f!=h.backspace||(L.verbose("Removing last label on input backspace"),n=t.last().addClass(m.active),L.remove.activeLabels(n)):n.removeClass(m.active)))}},keydown:function(e){var t=e.which;if(L.is.inObject(t,h)||e.key===p.delimiter){var n,i=E.not(b.unselectable).filter("."+m.selected).eq(0),a=A.children("."+m.active).eq(0),i=0<i.length?i:a,a=0<i.length?i.siblings(":not(."+m.filtered+")").addBack():A.children(":not(."+m.filtered+")"),o=i.children(b.menu),r=i.closest(b.menu),s=r.hasClass(m.visible)||r.hasClass(m.animating)||0<r.parent(b.menu).length,l=0<o.length,c=0<i.length,u=0<i.not(b.unselectable).length,d=e.key===p.delimiter&&L.is.multiple();if(p.allowAdditions&&p.hideAdditions&&(t==h.enter||d)&&u&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection()&&L.remove.searchTerm(),L.is.multiple()&&e.preventDefault()),L.is.visible()){if(t!=h.enter&&!d||(t==h.enter&&c&&l&&!p.allowCategorySelection?(L.verbose("Pressed enter on unselectable category, opening sub menu"),t=h.rightArrow):u&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection()&&(L.remove.searchTerm(),L.is.multiple()&&k.focus())),e.preventDefault()),c&&(t==h.leftArrow&&r[0]!==A[0]&&(L.verbose("Left key pressed, closing sub-menu"),L.animate.hide(!1,r),i.removeClass(m.selected),r.closest(b.item).addClass(m.selected),e.preventDefault()),t==h.rightArrow&&l&&(L.verbose("Right key pressed, opening sub-menu"),L.animate.show(!1,o),i.removeClass(m.selected),o.find(b.item).eq(0).addClass(m.selected),e.preventDefault())),t==h.upArrow){if(n=(c&&s?i.prevAll(b.item+":not("+b.unselectable+")"):E).eq(0),a.index(n)<0)return L.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();L.verbose("Up key pressed, changing active item"),i.removeClass(m.selected),n.addClass(m.selected),L.set.scrollPosition(n),p.selectOnKeydown&&L.is.single()&&!n.hasClass(m.actionable)&&L.set.selectedItem(n),e.preventDefault()}if(t==h.downArrow){if(0===(n=(c&&s?i.nextAll(b.item+":not("+b.unselectable+")"):E).eq(0)).length)return L.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();L.verbose("Down key pressed, changing active item"),E.removeClass(m.selected),n.addClass(m.selected),L.set.scrollPosition(n),p.selectOnKeydown&&L.is.single()&&!n.hasClass(m.actionable)&&L.set.selectedItem(n),e.preventDefault()}t==h.pageUp&&(L.scrollPage("up"),e.preventDefault()),t==h.pageDown&&(L.scrollPage("down"),e.preventDefault()),t==h.escape&&(L.verbose("Escape key pressed, closing dropdown"),L.hide(),e.stopPropagation())}else d&&e.preventDefault(),t!=h.downArrow||L.is.visible()||(L.verbose("Down key pressed, showing dropdown"),L.show(),e.preventDefault())}else L.has.search()||L.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=D[0];t&&(e=te.createEvent("HTMLEvents"),L.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){f=!0,L.verbose("Determining action",p.action),Z.isFunction(L.action[p.action])?(L.verbose("Triggering preset action",p.action,e,t),L.action[p.action].call(P,e,t,this)):Z.isFunction(p.action)?(L.verbose("Triggering user action",p.action,e,t),p.action.call(P,e,t,this)):L.error(u.action,p.action),f=!1},eventInModule:function(e,t){var e=Z(e.target),n=0<e.closest(te.documentElement).length,e=0<e.closest(x).length;return t=Z.isFunction(t)?t:function(){},n&&!e?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=Z(e.target),i=n.closest(b.siblingLabel),e=te.body.contains(e.target),i=0===x.find(i).length||!(L.is.multiple()&&p.useLabels),n=0===n.closest(A).length;return t=Z.isFunction(t)?t:function(){},e&&i&&n?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==ne?t:e,L.can.activate(Z(n))&&(L.set.selected(t,Z(n)),L.is.multiple()||!p.collapseOnActionable&&Z(n).hasClass(m.actionable)||L.hideAndClear())},select:function(e,t,n){t=t!==ne?t:e,L.can.activate(Z(n))&&(L.set.value(t,e,Z(n)),L.is.multiple()||!p.collapseOnActionable&&Z(n).hasClass(m.actionable)||L.hideAndClear())},combo:function(e,t,n){L.set.selected(t=t!==ne?t:e,Z(n)),L.hideAndClear()},hide:function(e,t,n){L.set.value(t,e,Z(n)),L.hideAndClear()}},get:{id:function(){return a},defaultText:function(){return x.data(v.defaultText)},defaultValue:function(){return x.data(v.defaultValue)},placeholderText:function(){return"auto"!=p.placeholder&&"string"==typeof p.placeholder?p.placeholder:x.data(v.placeholderText)||""},text:function(){return p.preserveHTML?C.html():C.text()},query:function(){return String(k.val()).trim()},searchWidth:function(e){return e=e!==ne?e:k.val(),T.text(e),Math.ceil(T.width()+(L.is.edge()?3:1))},selectionCount:function(){var e=L.get.values();return L.is.multiple()?Array.isArray(e)?e.length:0:""!==L.get.value()?1:0},transition:function(e){return"auto"===p.transition?L.is.upward(e)?"slide up":"slide down":p.transition},userValues:function(){var e=L.get.values();return!!e&&(e=Array.isArray(e)?e:[e],Z.grep(e,function(e){return!1===L.get.item(e)}))},uniqueArray:function(n){return Z.grep(n,function(e,t){return Z.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=k[0];return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:te.selection?(i.focus(),n=(t=te.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<D.length?D.val():x.data(v.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===ne||t?"":e},values:function(e){var t=L.get.value();return""===t?"":!L.has.selectInput()&&L.is.multiple()?"string"==typeof t?(e?t:L.escape.htmlEntities(t)).split(p.delimiter):"":t},remoteValues:function(){var e=L.get.values(),i=!1;return e&&Z.each(e="string"==typeof e?[e]:e,function(e,t){var n=L.read.remoteData(t);L.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=t!==ne?t:p.preserveHTML,e)return 0<e.find(b.menu).length&&(L.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),e.data(v.text)!==ne?e.data(v.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||L.get.choiceText(e),!!e&&(e.data(v.value)!==ne?String(e.data(v.value)):"string"==typeof t?String(p.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=k[0];return!!e&&(e.oninput!==ne?"input":e.onpropertychange!==ne?"propertychange":"keyup")},selectValues:function(){var o={},r=[],s=[];return x.find("option").each(function(){var e=Z(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==ne?e.attr("value"):t,a=e.data(v.text)!==ne?e.data(v.text):t,e=e.parent("optgroup");"auto"===p.placeholder&&""===i?o.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:p.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:a,disabled:n}))}),p.placeholder&&"auto"!==p.placeholder&&(L.debug("Setting placeholder value to",p.placeholder),o.placeholder=p.placeholder),p.sortSelect?(!0===p.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===p.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):Z.isFunction(p.sortSelect)&&s.sort(p.sortSelect),o[l.values]=s,L.debug("Retrieved and sorted values from select",o)):(o[l.values]=s,L.debug("Retrieved values from select",o)),o},activeItem:function(){return E.filter("."+m.active)},selectedItem:function(){var e=E.not(b.unselectable).filter("."+m.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=L.get.item(e),e=L.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,a,o=!1;return n=n!==ne?n:L.get.values()!==ne?L.get.values():L.get.text(),e=(a=L.is.multiple()&&Array.isArray(n))?0<n.length:n!==ne&&null!==n,i=""===n||!1===n||!0===n||(i||!1),e&&E.each(function(){var e=Z(this),t=L.get.choiceText(e),t=L.get.choiceValue(e,t);if(null!==t&&t!==ne)if(a)-1!==Z.inArray(L.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(o=o?o.add(e):e);else if(i){if(L.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return o=e,!0}else if(p.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),L.escape.htmlEntities(String(t))===L.escape.htmlEntities(String(n)))return L.verbose("Found select item by value",t,n),o=e,!0}),o},displayType:function(){return x.hasClass("column")?"flex":p.displayType}},check:{maxSelections:function(e){return!p.maxSelections||((e=e!==ne?e:L.get.selectionCount())>=p.maxSelections?(L.debug("Maximum selection count reached"),p.useLabels&&(E.addClass(m.filtered),L.add.message(g.maxSelections)),!0):(L.verbose("No longer at maximum selection count"),L.remove.message(),L.remove.filteredItem(),L.is.searchSelection()&&L.filterItems(),!1))},disabled:function(){k.attr("tabindex",L.is.disabled()?-1:0)}},restore:{defaults:function(e){L.clear(e),L.restore.defaultText(),L.restore.defaultValue()},defaultText:function(){var e=L.get.defaultText();e===L.get.placeholderText?(L.debug("Restoring default placeholder text",e),L.set.placeholderText(e)):(L.debug("Restoring default text",e),L.set.text(e))},placeholderText:function(){L.set.placeholderText()},defaultValue:function(){var e=L.get.defaultValue();e!==ne&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){p.allowAdditions&&(p.useLabels||(L.error(u.labels),p.useLabels=!0),L.debug("Restoring selected values"),L.create.userLabels()),L.check.maxSelections()},selected:function(){L.restore.values(),L.is.multiple()?(L.debug("Restoring previously selected values and labels"),L.restore.labels()):L.debug("Restoring previously selected values")},values:function(){L.set.initialLoad(),p.apiSettings&&p.saveRemoteData&&L.get.remoteValues()?L.restore.remoteValues():L.set.selected();var e=L.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection),L.remove.initialLoad()},remoteValues:function(){var e=L.get.remoteValues();L.debug("Recreating selected from session data",e),e&&(L.is.single()?Z.each(e,function(e,t){L.set.text(t)}):Z.each(e,function(e,t){L.add.label(e,t)}))}},read:{remoteData:function(e){if(ee.Storage!==ne)return(e=sessionStorage.getItem(e+i))!==ne&&e;L.error(u.noStorage)}},save:{defaults:function(){L.save.defaultText(),L.save.placeholderText(),L.save.defaultValue()},defaultValue:function(){var e=L.get.value();L.verbose("Saving default value as",e),x.data(v.defaultValue,e)},defaultText:function(){var e=L.get.text();L.verbose("Saving default text as",e),x.data(v.defaultText,e)},placeholderText:function(){var e;!1!==p.placeholder&&C.hasClass(m.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),x.data(v.placeholderText,e))},remoteData:function(e,t){ee.Storage===ne?L.error(u.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){L.is.multiple()&&p.useLabels?L.remove.labels(x.find(b.label),e):(L.remove.activeItem(),L.remove.selectedItem(),L.remove.filteredItem()),L.set.placeholderText(),L.clearValue(e)},clearValue:function(e){L.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||L.get.selectedItem(),n=t.closest(b.menu),i=n.outerHeight(),a=n.scrollTop(),o=E.eq(0).outerHeight(),i=Math.floor(i/o),a="up"==e?a-o*i:a+o*i,o=E.not(b.unselectable),i="up"==e?o.index(t)-i:o.index(t)+i,i=("up"==e?0<=i:i<o.length)?o.eq(i):"up"==e?o.first():o.last();0<i.length&&(L.debug("Scrolling page",e,i),t.removeClass(m.selected),i.addClass(m.selected),p.selectOnKeydown&&L.is.single()&&!$nextItem.hasClass(m.actionable)&&L.set.selectedItem(i),n.scrollTop(a))},set:{filtered:function(){var e=L.is.multiple(),t=L.is.searchSelection(),n=e&&t,t=t?L.get.query():"",i="string"==typeof t&&0<t.length,a=L.get.searchWidth(),t=""!==t;e&&i&&(L.verbose("Adjusting input width",a,p.glyphWidth),k.css("width",a)),i||n&&t?(L.verbose("Hiding placeholder text"),C.addClass(m.filtered)):e&&(!n||t)||(L.verbose("Showing placeholder text"),C.removeClass(m.filtered))},empty:function(){x.addClass(m.empty)},loading:function(){x.addClass(m.loading)},placeholderText:function(e){e=e||L.get.placeholderText(),L.debug("Setting placeholder text",e),L.set.text(e),C.addClass(m.placeholder)},tabbable:function(){L.is.searchSelection()?(L.debug("Added tabindex to searchable dropdown"),k.val(""),L.check.disabled(),A.attr("tabindex",-1)):(L.debug("Added tabindex to dropdown"),x.attr("tabindex")===ne&&(x.attr("tabindex",0),A.attr("tabindex",-1)))},initialLoad:function(){L.verbose("Setting initial load"),e=!0},activeItem:function(e){p.allowAdditions&&0<e.filter(b.addition).length?e.addClass(m.filtered):e.addClass(m.active)},partialSearch:function(e){var t=L.get.query().length;k.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i,a=(e=e||L.get.selectedItem()).closest(b.menu),o=e&&0<e.length;t=t!==ne&&t,0===L.get.activeItem().length&&(t=!1),e&&0<a.length&&o&&(e.position().top,a.addClass(m.loading),e=(o=a.scrollTop())-a.offset().top+e.offset().top,t||(i=o+a.height()<e+5,n=e-5<o),L.debug("Scrolling to active item",e),(t||n||i)&&a.scrollTop(e),a.removeClass(m.loading))},text:function(e){"combo"===p.action?(L.debug("Changing combo button text",e,S),p.preserveHTML?S.html(e):S.text(e)):"activate"===p.action&&(e!==L.get.placeholderText()&&C.removeClass(m.placeholder),L.debug("Changing text",e,C),C.removeClass(m.filtered),p.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=L.get.choiceValue(e),n=L.get.choiceText(e,!1),i=L.get.choiceText(e,!0);L.debug("Setting user selection to item",e),L.remove.activeItem(),L.set.partialSearch(n),L.set.activeItem(e),L.set.selected(t,e),L.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+m.selected),i=0<n.length&&L.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(E).eq(0),L.has.firstLetter(t,e)&&(a=t)),a||E.each(function(){if(L.has.firstLetter(Z(this),e))return a=Z(this),!1}),a&&(L.verbose("Scrolling to next value with letter",e),L.set.scrollPosition(a),n.removeClass(m.selected),a.addClass(m.selected),p.selectOnKeydown&&L.is.single()&&!t.hasClass(m.actionable)&&L.set.selectedItem(a))},direction:function(e){"auto"===p.direction?(e?L.is.upward(e)&&L.remove.upward(e):L.remove.upward(),(L.can.openDownward(e)?L.remove:L.set).upward(e),L.is.leftward(e)||L.can.openRightward(e)||L.set.leftward(e)):"upward"===p.direction&&L.set.upward(e)},upward:function(e){(e||x).addClass(m.upward)},leftward:function(e){(e||A).addClass(m.leftward)},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=ne),e===ne||""===e||Array.isArray(e)&&0===e.length?D.addClass(m.noselection):D.removeClass(m.noselection);var a=L.escape.value(e),o=0<D.length,r=L.get.values(),s=e!==ne?String(e):e;if(o){if(!p.allowReselection&&s==r&&(L.verbose("Skipping value update already same value",e,r),!L.is.initialLoad()))return;L.is.single()&&L.has.selectInput()&&L.can.extendSelect()&&(L.debug("Adding user option",e),L.add.optionValue(e)),L.debug("Updating input value",a,r),U=!0,D.val(a),!1===p.fireOnInit&&L.is.initialLoad()?L.debug("Input native change event ignored on initial load"):!0!==i&&L.trigger.change(),U=!1}else L.verbose("Storing value in metadata",a,D),a!==r&&x.data(v.value,s);!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",p.onChange):!0!==i&&p.onChange.call(P,e,t,n)},active:function(){x.addClass(m.active)},multiple:function(){x.addClass(m.multiple)},visible:function(){x.addClass(m.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=ne),L.debug("Setting selected to exact values"),L.clear(),L.set.selected(e,t,n)},selected:function(e,l,c,u){"boolean"==typeof l&&(u=c,c=l,l=ne);var d=L.is.multiple();(l=p.allowAdditions?l||L.get.itemWithAdditions(e):l||L.get.item(e))&&(L.debug("Setting selected menu item to",l),L.is.multiple()&&L.remove.searchWidth(),L.is.single()?(L.remove.activeItem(),L.remove.selectedItem()):p.useLabels&&L.remove.selectedItem(),l.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t),i=e.hasClass(m.filtered),a=e.hasClass(m.active),o=e.hasClass(m.actionable),r=e.hasClass(m.addition),s=d&&l&&1===l.length;o?(d&&a&&!r||!p.apiSettings||!p.saveRemoteData||L.save.remoteData(t,n),p.onActionable.call(P,n,t,e)):d?!a||r?(p.apiSettings&&p.saveRemoteData&&L.save.remoteData(t,n),p.useLabels?(L.add.value(n,t,e,c),L.add.label(n,t,s),L.set.activeItem(e),L.filterActive(),L.select.nextAvailable(l)):(L.add.value(n,t,e,c),L.set.text(L.add.variables(g.count)),L.set.activeItem(e))):i||!p.useLabels&&!f||(L.debug("Selected active value, removing label"),L.remove.selected(n)):(p.apiSettings&&p.saveRemoteData&&L.save.remoteData(t,n),u||e.hasClass(m.actionable)||L.set.text(t),L.set.value(n,t,e,c),e.addClass(m.active).addClass(m.selected))}),u||L.remove.searchTerm())}},add:{label:function(e,t,n){var i,a=L.is.searchSelection()?k:C,o=L.escape.value(e);p.ignoreCase&&(o=o.toLowerCase()),i=Z("<a />").addClass(m.label).attr("data-"+v.value,o).html(H.label(o,t,p.preserveHTML,p.className)),i=p.onLabelCreate.call(i,o,t),L.has.label(e)?L.debug("User selection already exists, skipping",o):(p.label.variation&&i.addClass(p.label.variation),!0===n?(L.debug("Animating in label",i),i.addClass(m.hidden).insertBefore(a).transition({animation:p.label.transition,debug:p.debug,verbose:p.verbose,silent:p.silent,duration:p.label.duration})):(L.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=A.children(b.message),e=p.templates.message(L.add.variables(e));0<t.length?t.html(e):Z("<div/>").html(e).addClass(m.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0<D.find('option[value="'+L.escape.string(t)+'"]').length||(L.disconnect.selectObserver(),L.is.single()&&(L.verbose("Removing previous user addition"),D.find("option."+m.addition).remove()),Z("<option/>").prop("value",t).addClass(m.addition).text(e).appendTo(D),L.verbose("Adding user addition as an <option>",e),L.observe.select())},userSuggestion:function(e){var t=A.children(b.addition),n=L.get.item(e),n=n&&n.not(b.addition).length,i=0<t.length;p.useLabels&&L.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(v.value,e).data(v.text,e).attr("data-"+v.value,e).attr("data-"+v.text,e).removeClass(m.filtered),p.hideAdditions||(n=p.templates.addition(L.add.variables(g.addResult,e)),t.html(n)),L.verbose("Replacing user suggestion with new value",t)):((t=L.create.userChoice(e)).prependTo(A),L.verbose("Adding item choice to menu corresponding with user choice addition",t)),p.hideAdditions&&!L.is.allFiltered()||t.addClass(m.selected).siblings().removeClass(m.selected),L.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return L.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",L.get.selectionCount())),i&&(e=e.replace("{maxCount}",p.maxSelections)),a&&(n=t||L.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=ne);var a,o=L.get.values(!0);L.has.value(e)?L.debug("Value already selected"):""===e?L.debug("Cannot select blank values from multiselect"):(a=Array.isArray(o)?(a=n&&n.hasClass(m.actionable)?o:o.concat([e]),L.get.uniqueArray(a)):[e],L.has.selectInput()?L.can.extendSelect()&&(L.debug("Adding value to select",e,a,D),L.add.optionValue(e)):(a=a.join(p.delimiter),L.debug("Setting hidden input to delimited value",a,D)),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping onadd callback on initial load",p.onAdd):p.onAdd.call(P,e,t,n),L.set.value(a,t,n,i),L.check.maxSelections())}},remove:{active:function(){x.removeClass(m.active)},activeLabel:function(){x.find(b.label).removeClass(m.active)},empty:function(){x.removeClass(m.empty)},loading:function(){x.removeClass(m.loading)},initialLoad:function(){e=!1},upward:function(e){(e||x).removeClass(m.upward)},leftward:function(e){(e||A).removeClass(m.leftward)},visible:function(){x.removeClass(m.visible)},activeItem:function(){E.removeClass(m.active)},filteredItem:function(){p.useLabels&&L.has.maxSelections()||((p.useLabels&&L.is.multiple()?E.not("."+m.active):E).removeClass(m.filtered),p.hideDividers&&F.removeClass(m.hidden),L.remove.empty())},optionValue:function(e){var e=L.escape.value(e),t=D.find('option[value="'+L.escape.string(e)+'"]');0<t.length&&t.hasClass(m.addition)&&(L.disconnect.selectObserver(),t.remove(),L.verbose("Removing user addition as an <option>",e),L.observe.select())},message:function(){A.children(b.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){L.verbose("Cleared search term"),k.val(""),L.set.filtered()},userAddition:function(){E.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=p.allowAdditions?t||L.get.itemWithAdditions(e):t||L.get.item(e)))return!1;t.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t);L.is.multiple()?p.useLabels?(L.remove.value(n,t,e,i),L.remove.label(n)):(L.remove.value(n,t,e,i),0===L.get.selectionCount()?L.set.placeholderText():L.set.text(L.add.variables(g.count))):L.remove.value(n,t,e,i),e.removeClass(m.filtered).removeClass(m.active),p.useLabels&&e.removeClass(m.selected)})},selectedItem:function(){E.removeClass(m.selected)},value:function(e,t,n,i){var a,o=L.get.values();e=L.escape.htmlEntities(e),L.has.selectInput()?(L.verbose("Input is <select> removing selected option",e),a=L.remove.arrayValue(e,o),L.remove.optionValue(e)):(L.verbose("Removing from delimited values",e),a=(a=L.remove.arrayValue(e,o)).join(p.delimiter)),!1===p.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",p.onRemove):p.onRemove.call(P,e,t,n),L.set.value(a,t,n,i),L.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=Z.grep(e,function(e){return t!=e}),L.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=L.escape.value(e),e=x.find(b.label).filter("[data-"+v.value+'="'+L.escape.string(p.ignoreCase?e.toLowerCase():e)+'"]');L.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||x.find(b.label).filter("."+m.active),L.verbose("Removing active label selections",e),L.remove.labels(e)},labels:function(e,a){e=e||x.find(b.label),L.verbose("Removing labels",e),e.each(function(){var e=Z(this),t=e.data(v.value),n=t!==ne?String(t):t,i=L.is.userValue(n);!1===p.onLabelRemove.call(e,t)?L.debug("Label remove callback cancelled removal"):(L.remove.message(),i?(L.remove.value(n,n,L.get.item(n),a),L.remove.label(n)):L.remove.selected(n,!1,a))})},tabbable:function(){(L.is.searchSelection()?(L.debug("Searchable dropdown initialized"),k):(L.debug("Simple selection dropdown initialized"),x)).removeAttr("tabindex"),A.removeAttr("tabindex")},diacritics:function(e){return p.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return L.has.search()&&0<k.closest(A).length},clearItem:function(){return 0<V.length},search:function(){return 0<k.length},sizer:function(){return 0<T.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return p.minCharacters&&!O?(e=e!==ne?String(e):String(L.get.query())).length>=p.minCharacters:!(O=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=L.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(b.menu).length},message:function(){return 0!==A.children(b.message).length},label:function(e){var e=L.escape.value(e),t=x.find(b.label);return p.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+v.value+'="'+L.escape.string(e)+'"]').length},maxSelections:function(){return p.maxSelections&&L.get.selectionCount()>=p.maxSelections},allResultsFiltered:function(){var e=E.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(b.addition).length},query:function(){return""!==L.get.query()},value:function(e){return p.ignoreCase?L.has.valueIgnoringCase(e):L.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=L.get.values(!0);return!!(Array.isArray(t)?t&&-1!==Z.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=L.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),Z.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return x.hasClass(m.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return Z(e.target).is("select, input")&&0<x.closest("label").length},bubbledIconClick:function(e){return 0<Z(e.target).closest(N).length},edge:function(){return!!ee.chrome&&!!ee.StyleMedia},chrome:function(){return!!ee.chrome&&!ee.StyleMedia},alreadySetup:function(){return x.is("select")&&x.parent(b.dropdown).data(y)!==ne&&0===x.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):A.transition&&A.transition("is animating")},leftward:function(e){return(e||A).hasClass(m.leftward)},clearable:function(){return x.hasClass(m.clearable)||p.clearable},disabled:function(){return x.hasClass(m.disabled)},focused:function(){return te.activeElement===x[0]},focusedOnSearch:function(){return te.activeElement===k[0]},allFiltered:function(){return(L.is.multiple()||L.has.search())&&!(!p.hideAdditions&&L.has.userSuggestion())&&!L.has.message()&&L.has.allResultsFiltered()},hidden:function(e){return!L.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return Z.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return x.hasClass(m.multiple)},remote:function(){return p.apiSettings&&L.can.useAPI()},noApiCache:function(){return p.apiSettings&&!p.apiSettings.cache},single:function(){return!L.is.multiple()},selectMutation:function(e){var n=!1;return Z.each(e,function(e,t){if(Z(t.target).is("select, option, optgroup")||Z(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return x.hasClass(m.search)},searchSelection:function(){return L.has.search()&&1===k.parent(b.dropdown).length},selection:function(){return x.hasClass(m.selection)},userValue:function(e){return-1!==Z.inArray(e,L.get.userValues())},upward:function(e){return(e||x).hasClass(m.upward)},visible:function(e){return(e||A).hasClass(m.visible)},verticallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return p.useLabels||!L.has.maxSelections()||L.has.maxSelections()&&e.hasClass(m.active)},openDownward:function(e){var t,e=e||A;return e.addClass(m.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollTop:w.scrollTop(),height:w.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},L.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),L.has.subMenu(e)&&(t.menu.height+=e.find(b.menu).first().outerHeight()),t=(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?(L.verbose("Dropdown can fit in context downward",t),!0):t.above?(L.verbose("Dropdown cannot fit below, opening upward",t),!1):(L.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(m.loading),t},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(m.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollLeft:w.scrollLeft(),width:w.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},L.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)&&(L.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(m.loading),n},extendSelect:function(){return p.allowAdditions||p.apiSettings},show:function(){return!L.is.disabled()&&(L.has.items()||L.has.message())},useAPI:function(){return Z.fn.api!==ne}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){L.hideSubMenus(),L.hideOthers(),L.set.active()};e=Z.isFunction(e)?e:function(){},L.verbose("Doing menu show animation",n),L.set.direction(t),t=p.transition.showMethod||L.get.transition(t),L.is.selection()&&L.set.scrollPosition(L.get.selectedItem(),!0),(L.is.hidden(n)||L.is.animating(n))&&("none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("show"),e.call(P)):Z.fn.transition!==ne&&x.transition("is supported")?n.transition({animation:t+" in",debug:p.debug,verbose:p.verbose,silent:p.silent,duration:p.transition.showDuration||p.duration,queue:!0,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.noTransition,t))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){L.unbind.intent(),L.remove.active()},t=p.transition.hideMethod||L.get.transition(t);e=Z.isFunction(e)?e:function(){},(L.is.visible(n)||L.is.animating(n))&&(L.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("hide"),e.call(P)):Z.fn.transition!==ne&&x.transition("is supported")?n.transition({animation:t+" out",duration:p.transition.hideDuration||p.duration,debug:p.debug,verbose:p.verbose,silent:p.silent,queue:!1,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.transition))}},hideAndClear:function(){L.remove.searchTerm(),L.has.maxSelections()||(L.has.search()?L.hide(function(){L.remove.filteredItem()}):L.hide())},delay:{show:function(){L.verbose("Delaying show event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.show,p.delay.show)},hide:function(){L.verbose("Delaying hide event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.hide,p.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(c.quote),a=[];return i||!n?e:(L.debug("Encoding quote values for use in select",e),t?(Z.each(e,function(e,t){a.push(t.replace(c.quote,"""))}),a):e.replace(c.quote,"""))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(L.debug("Changing setting",e,t),Z.isPlainObject(e))Z.extend(!0,p,e);else{if(t===ne)return p[e];Z.isPlainObject(p[e])?Z.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(Z.isPlainObject(e))Z.extend(!0,L,e);else{if(t===ne)return L[e];L[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?L.performance.log(arguments):(L.debug=Function.prototype.bind.call(console.info,console,p.name+":"),L.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?L.performance.log(arguments):(L.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),L.verbose.apply(console,arguments)))},error:function(){p.silent||(L.error=Function.prototype.bind.call(console.error,console,p.name+":"),L.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(Q||t),Q=t,G.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(L.performance.timer),L.performance.timer=setTimeout(L.performance.display,500)},display:function(){var e=p.name+":",n=0;Q=!1,clearTimeout(L.performance.timer),Z.each(G,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),(console.group!==ne||console.table!==ne)&&0<G.length&&(console.groupCollapsed(e),console.table?console.table(G):Z.each(G,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),G=[]}},invoke:function(i,e,t){var a,o,n,r=R;return e=e||_,t=t||P,"string"==typeof i&&r!==ne&&(i=i.split(/[\. ]/),a=i.length-1,Z.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Z.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==ne)return o=r[n],!1;{if(!Z.isPlainObject(r[t])||e==a)return r[t]!==ne?o=r[t]:L.error(u.method,i),!1;r=r[t]}}})),Z.isFunction(o)?n=o.apply(t,e):o!==ne&&(n=o),Array.isArray(Y)?Y.push(n):Y!==ne?Y=[Y,n]:n!==ne&&(Y=n),o}};J?(R===ne&&L.initialize(),L.invoke(X)):(R!==ne&&R.invoke("destroy"),L.initialize())}),Y!==ne?Y:B},Z.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:ee,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:"exact",ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!1,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!1,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,collapseOnActionable:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onActionable:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return Z(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",actionable:"actionable"},keys:{backspace:8,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",actionable:"actionable"}},Z.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var a=e.placeholder||!1,o="",r=Z.fn.dropdown.settings.templates.escape,s=Z.fn.dropdown.settings.templates.deQuote;return o=(o=(o=(o+='<i class="dropdown icon"></i>')+(a?'<div class="default text">'+r(a,n)+"</div>":'<div class="text"></div>'))+('<div class="'+s(i.menu)+'">'))+Z.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,c,u,d){var e=e[c.values]||[],f="",p=Z.fn.dropdown.settings.templates.escape,m=Z.fn.dropdown.settings.templates.deQuote;return Z.each(e,function(e,t){var n,i,a,o,r,s=t[c.type]||"item",l=-1!==s.indexOf("menu");"item"===s||l?(n=t[c.text]?' data-text="'+m(t[c.text],!0)+'"':"",o=t[c.actionable]?d.actionable+" ":"",r=t[c.disabled]?d.disabled+" ":"",i=t[c.descriptionVertical]?d.descriptionVertical+" ":"",a=""!=p(t[c.description]||"",u),f+='<div class="'+m(o+r+i+(t[c.class]||d.item))+'" data-value="'+m(t[c.value],!0)+'"'+n+">",l&&(f+='<i class="'+(-1!==s.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[c.image]&&(f+='<img class="'+m(t[c.imageClass]||d.image)+'" src="'+m(t[c.image])+'">'),t[c.icon]&&(f+='<i class="'+m(t[c.icon]+" "+(t[c.iconClass]||d.icon))+'"></i>'),a&&(f=(f+='<span class="'+m(d.description)+'">'+p(t[c.description]||"",u)+"</span>")+(l?"":'<span class="'+m(d.text)+'">')),l&&(f+='<span class="'+m(d.text)+'">'),f+=p(t[c.name]||"",u),l?f=(f=(f+="</span>")+'<div class="'+m(s)+'">')+Z.fn.dropdown.settings.templates.menu(t,c,u,d)+"</div>":a&&(f+="</span>"),f+="</div>"):"header"===s&&(o=p(t[c.name]||"",u),r=m(t[c.icon]||d.groupIcon),""===o&&""===r||(f+='<div class="'+m(t[c.class]||d.header)+'">',""!==r&&(f+='<i class="'+m(r+" "+(t[c.iconClass]||d.icon))+'"></i>'),f=f+o+"</div>"),t[c.divider]&&(f+='<div class="'+m(d.divider)+'"></div>'))}),f},label:function(e,t,n,i){var a=Z.fn.dropdown.settings.templates.escape,o=Z.fn.dropdown.settings.templates.deQuote;return a(t,n)+'<i class="'+o(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(I,R,L,q){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.form=function(k){var T,D=I(this),S=D.selector||"",A=(new Date).getTime(),E=[],F=k,M=arguments[1],O="string"==typeof F,P=[].slice.call(arguments,1);return D.each(function(){var n,d,t,e,f,l,p,m,g,i,c,a,o,s,u,h=I(this),v=this,b=[],y=!1,r=!1,x=!1,w=["clean","clean"],C={initialize:function(){C.get.settings(),O?(u===q&&C.instantiate(),C.invoke(F)):(u!==q&&(u.invoke("destroy"),C.refresh()),C.verbose("Initializing form validation",h,f),C.bindEvents(),C.set.defaults(),f.autoCheckRequired&&C.set.autoCheck(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),u=C,h.data(o,C)},destroy:function(){C.verbose("Destroying previous module",u),C.removeEvents(),h.removeData(o)},refresh:function(){C.verbose("Refreshing selector cache"),n=h.find(m.field),d=h.find(m.group),t=h.find(m.message),h.find(m.prompt),e=h.find(m.submit),h.find(m.clear),h.find(m.reset)},refreshEvents:function(){C.removeEvents(),C.bindEvents()},submit:function(){C.verbose("Submitting form",h),r=!0,h.submit()},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+s,function(e){C[t](),e.preventDefault()})},bindEvents:function(){C.verbose("Attaching form events"),h.on("submit"+s,C.validate.form).on("blur"+s,m.field,C.event.field.blur).on("click"+s,m.submit,C.submit).on("click"+s,m.reset,C.reset).on("click"+s,m.clear,C.clear),f.keyboardShortcuts&&h.on("keydown"+s,m.field,C.event.field.keydown),n.each(function(e,t){var t=I(t),n=t.prop("type"),n=C.get.changeEvent(n,t);t.on(n+s,C.event.field.change)}),f.preventLeaving&&I(R).on("beforeunload"+s,C.event.beforeUnload),n.on("change click keyup keydown blur",function(e){C.determine.isDirty()}),h.on("dirty"+s,function(e){f.onDirty.call()}),h.on("clean"+s,function(e){f.onClean.call()})},clear:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(d),a=i.find(m.prompt),o=t.closest(m.uiCalendar),r=t.data(p.defaultValue)||"",s=n.is(m.uiCheckbox),l=n.is(m.uiDropdown)&&C.can.useElement("dropdown"),c=0<o.length&&C.can.useElement("calendar");i.hasClass(g.error)&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),a.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?o.calendar("clear"):(C.verbose("Resetting field value",t,r),t.val(""))}),C.remove.states()},reset:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(d),a=t.closest(m.uiCalendar),o=i.find(m.prompt),r=t.data(p.defaultValue),s=n.is(m.uiCheckbox),l=n.is(m.uiDropdown)&&C.can.useElement("dropdown"),c=0<a.length&&C.can.useElement("calendar"),u=i.hasClass(g.error);r!==q&&(u&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),o.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(C.verbose("Resetting checkbox value",n,r),t.prop("checked",r)):c?a.calendar("set date",r):(C.verbose("Resetting field value",t,r),t.val(r)))}),C.remove.states()},determine:{isValid:function(){var n=!0;return I.each(l,function(e,t){C.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(m.checkbox).length?C.is.checkboxDirty(t):C.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i|=n}),i?C.set.dirty():C.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(f.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(m.checkbox)?!e.is(":checked"):C.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(C.verbose("Checking if field is valid",e),C.validate.field(l[e],e,!!n)):(C.verbose("Checking if form is valid"),I.each(l,function(e,t){C.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return x},clean:function(){return!x},fieldDirty:function(e){var t=e.data(p.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(p.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===w[0]},justClean:function(){return"clean"===w[0]}},removeEvents:function(){h.off(s),n.off(s),e.off(s)},event:{field:{keydown:function(e){var t=I(this),n=e.which,i=t.is(m.input),a=t.is(m.checkbox),o=0<t.closest(m.uiDropdown).length,r=13;n==27&&(C.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||o||a||(y||(t.one("keyup"+s,C.event.field.keyup),C.submit(),C.debug("Enter pressed on input submitting form"),e.preventDefault()),y=!0)},keyup:function(){y=!1},blur:function(e){var t=I(this),n=t.closest(d),i=C.get.validation(t);i&&("blur"==f.on||n.hasClass(g.error)&&f.revalidate)&&(C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0))},change:function(e){var t=I(this),n=t.closest(d),i=C.get.validation(t);i&&("change"==f.on||n.hasClass(g.error)&&f.revalidate)&&(clearTimeout(C.timer),C.timer=setTimeout(function(){C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(C.is.dirty()&&!r)return(e=e||R.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!C.is.bracketedRule(e))&&(e.value!==q?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return C.is.bracketedRule(e)?e.type.replace(e.type.match(f.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":C.get.inputEvent()},inputEvent:function(){return L.createElement("input").oninput!==q?"input":L.createElement("input").onpropertychange!==q?"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=C.get.ruleName(e),a=C.get.ancillaryValue(e),o=C.get.field(t.identifier),r=o.val(),r=I.isFunction(e.prompt)?e.prompt(r):e.prompt||f.prompt[i]||f.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return a&&0<=["integer","decimal","number"].indexOf(i)&&0<=a.indexOf("..")&&(n=a.split("..",2),e.prompt||(r+=(""===n[0]?f.prompt.maxValue.replace(/\{ruleValue\}/g,"{max}"):""===n[1]?f.prompt.minValue.replace(/\{ruleValue\}/g,"{min}"):f.prompt.range).replace(/\{name\}/g," "+f.text.and)),r=(r=r.replace(/\{min\}/g,n[0])).replace(/\{max\}/g,n[1])),s&&(r=r.replace(/\{value\}/g,o.val())),l&&(s=1==(n=o.closest(m.group).find("label").eq(0)).length?n.text():o.prop("placeholder")||f.text.unspecifiedField,r=r.replace(/\{name\}/g,s)),r=(r=r.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,a),e.prompt||C.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;I.isPlainObject(k)?0<(e=Object.keys(k)).length&&(k[e[0]].identifier!==q&&k[e[0]].rules!==q)?(f=I.extend(!0,{},I.fn.form.settings,M),l=I.extend(!0,{},I.fn.form.settings.defaults,k),C.error(f.error.oldSyntax,v),C.verbose("Extending settings from legacy parameters",l,f)):(k.fields&&(k.fields=C.get.fieldsFromShorthand(k.fields)),f=I.extend(!0,{},I.fn.form.settings,k),l=I.extend(!0,{},I.fn.form.settings.defaults,f.fields),C.verbose("Extending settings",l,f)):(f=I.extend(!0,{},I.fn.form.settings),l=I.extend(!0,{},I.fn.form.settings.defaults),C.verbose("Using default form validation",l,f)),a=f.namespace,p=f.metadata,m=f.selector,g=f.className,i=f.regExp,c=f.error,o="module-"+a,s="."+a,((u=h.data(o))||C).refresh()},field:function(e){var t;return C.verbose("Finding field with identifier",e),e=C.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-"+p.validate+'="'+e+'"]')).length?t:I("<input/>")},fields:function(e){var n=I();return I.each(e,function(e,t){n=n.add(C.get.field(t))}),n},validation:function(i){var a,o;return l&&(I.each(l,function(e,n){o=n.identifier||e,I.each(C.get.field(o),function(e,t){if(t==i[0])return n.identifier=o,a=n,!1})}),a)||!1},value:function(e){var t=[];return t.push(e),C.get.values.call(v,t)[e]},values:function(e){var e=Array.isArray(e)?C.get.fields(e):n,d={};return e.each(function(e,t){var t=I(t),n=t.closest(m.uiCalendar),i=t.prop("name"),a=t.val(),o=t.is(m.checkbox),r=t.is(m.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&C.can.useElement("calendar"),t=!!o&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),d[i]||(d[i]=[]),o?t?d[i].push(a||!0):d[i].push(!1):d[i].push(a);else if(r)d[i]!==q&&!1!==d[i]||(d[i]=!!t&&(a||!0));else if(o)d[i]=!!t&&(a||!0);else if(l){var c=n.calendar("get date");if(null!==c){if("date"==f.dateHandling)d[i]=c;else if("input"==f.dateHandling)d[i]=n.calendar("get input date");else if("formatter"==f.dateHandling){var u=n.calendar("setting","type");switch(u){case"date":d[i]=f.formatter.date(c);break;case"datetime":d[i]=f.formatter.datetime(c);break;case"time":d[i]=f.formatter.time(c);break;case"month":d[i]=f.formatter.month(c);break;case"year":d[i]=f.formatter.year(c);break;default:C.debug("Wrong calendar mode",n,u),d[i]=""}}}else d[i]=""}else d[i]=a}),d},dirtyFields:function(){return n.filter(function(e,t){return I(t).data(p.isDirty)})}},has:{field:function(e){return C.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=C.escape.string(e))&&C.error(c.identifier,e),0<n.filter("#"+e).length||0<n.filter('[name="'+e+'"]').length||0<n.filter("[data-"+p.validate+'="'+e+'"]').length}},can:{useElement:function(e){return I.fn[e]!==q||(C.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){C.add.field(e,t)},field:function(n,e){l[n]!==q&&l[n].rules!==q||(l[n]={rules:[]});var i={rules:[]};C.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)}),C.debug("Adding rules",i.rules,l),C.refreshEvents()},fields:function(e){l=I.extend(!0,{},l,C.get.fieldsFromShorthand(e)),C.refreshEvents()},prompt:function(e,t,n){var i=C.get.field(e).closest(d),a=i.children(m.prompt),o=0!==a.length;t="string"==typeof t?[t]:t,C.verbose("Adding field error state",e),n||i.addClass(g.error),f.inline&&(o||(a=I("<div/>").addClass(g.label)).appendTo(i),a.html(f.templates.prompt(t)),o?C.verbose("Inline errors are disabled, no inline error added",e):f.transition&&C.can.useElement("transition")&&h.transition("is supported")?(C.verbose("Displaying error with css transition",f.transition),a.transition(f.transition+" in",f.duration)):(C.verbose("Displaying error with fallback javascript animation"),a.fadeIn(f.duration)))},errors:function(e){C.debug("Adding form error messages",e),C.set.error(),t.html(f.templates.error(e))}},remove:{errors:function(){C.debug("Removing form error messages"),t.empty()},states:function(){h.removeClass(g.error).removeClass(g.success),f.inline||C.remove.errors(),C.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];l[n]!==q&&Array.isArray(l[n].rules)&&(e===q?(C.debug("Removed all rules"),l[n].rules=[]):I.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(C.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){C.remove.rule(t)}),C.refreshEvents()},rules:function(e,n){Array.isArray(e)?I.each(e,function(e,t){C.remove.rule(t,n)}):C.remove.rule(e,n)},fields:function(e){C.remove.field(e)},prompt:function(e){var t=C.get.field(e).closest(d),n=t.children(m.prompt);t.removeClass(g.error),f.inline&&n.is(":visible")&&(C.verbose("Removing prompt for field",e),f.transition&&C.can.useElement("transition")&&h.transition("is supported")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){h.removeClass(g.error).addClass(g.success)},defaults:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=0<t.filter(m.checkbox).length,a=n.is(m.uiDropdown)&&C.can.useElement("dropdown"),o=t.closest(m.uiCalendar),r=0<o.length&&C.can.useElement("calendar"),i=i?t.is(":checked"):t.val();a?n.dropdown("save defaults"):r&&o.calendar("refresh"),t.data(p.defaultValue,i),t.data(p.isDirty,!1)})},error:function(){h.removeClass(g.success).addClass(g.error)},value:function(e,t){var n={};return n[e]=t,C.set.values.call(v,n)},values:function(e){I.isEmptyObject(e)||I.each(e,function(e,t){var n,i=C.get.field(e),a=i.parent(),e=i.closest(m.uiCalendar),o=Array.isArray(t),r=a.is(m.uiCheckbox)&&C.can.useElement("checkbox"),s=a.is(m.uiDropdown)&&C.can.useElement("dropdown"),l=i.is(m.radio)&&r,c=0<e.length&&C.can.useElement("calendar");0<i.length&&(o&&r?(C.verbose("Selecting multiple",t,i),a.checkbox("uncheck"),I.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),a=n.parent(),0<n.length&&a.checkbox("check")})):l?(C.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(m.uiCheckbox).checkbox("check")):r?(C.verbose("Setting checkbox value",t,a),!0===t||1===t||"on"===t?a.checkbox("check"):a.checkbox("uncheck"),"string"==typeof t&&i.val(t)):s?(C.verbose("Setting dropdown value",t,a),a.dropdown("set selected",t)):c?e.calendar("set date",t):(C.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){C.verbose("Setting state dirty"),x=!0,w[0]=w[1],w[1]="dirty",C.is.justClean()&&h.trigger("dirty")},clean:function(){C.verbose("Setting state clean"),x=!1,w[0]=w[1],w[1]="clean",C.is.justDirty()&&h.trigger("clean")},asClean:function(){C.set.defaults(),C.set.clean()},asDirty:function(){C.set.defaults(),C.set.dirty()},autoCheck:function(){C.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(m.checkbox).length,a=n.prop("required")||t.hasClass(g.required)||t.parent().hasClass(g.required),t=n.is(":disabled")||t.hasClass(g.disabled)||t.parent().hasClass(g.disabled),o=C.get.validation(n),r=!!o&&0!==I.grep(o.rules,function(e){return"empty"==e.type}),o=o.identifier||n.attr("id")||n.attr("name")||n.data(p.validate);!a||t||r||o===q||(i?(C.verbose("Adding 'checked' rule on field",o),C.add.rule(o,"checked")):(C.verbose("Adding 'empty' rule on field",o),C.add.rule(o,"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=C.get.values();if(y)return!1;if(b=[],C.determine.isValid()){if(C.debug("Form has no validation errors, submitting"),C.set.success(),f.inline||C.remove.errors(),!0!==t)return f.onSuccess.call(v,e,i)}else if(C.debug("Form has errors"),r=!1,C.set.error(),f.inline||C.add.errors(b),e&&h.data("moduleApi")!==q&&e.stopImmediatePropagation(),f.errorFocus&&!0!==t&&(e=!0,"string"==typeof f.errorFocus?(e=(n=I(L).find(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+g.error).first().find(m.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(v,b,i)},field:function(i,e,a){a=a===q||a,"string"==typeof i&&(C.verbose("Validating field",i),i=l[e=i]);var o=i.identifier||e,e=C.get.field(o),t=!!i.depends&&C.get.field(i.depends),r=!0,s=[];return i.identifier||(C.debug("Using field name as identifier",o),i.identifier=o),!e.filter(":not(:disabled)").length?C.debug("Field is disabled. Skipping",o):i.optional&&C.is.blank(e)?C.debug("Field is optional and blank. Skipping",o):i.depends&&C.is.empty(t)?C.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==q&&(a&&e.closest(d).removeClass(g.error),I.each(i.rules,function(e,t){var n;C.has.field(o)&&0<(n=C.validate.rule(i,t,!0)||[]).length&&(C.debug("Field is invalid",o,t.type),s.push(C.get.prompt(t,i)),r=!1,a&&I(n).closest(d).addClass(g.error))})),r?(a&&(C.remove.prompt(o,s),f.onValid.call(e)),!0):(a&&(b=b.concat(s),C.add.prompt(o,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?I(e).filter(":checked"):I(e)).val())===q||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,a,h)}var e=C.get.field(e.identifier),a=C.get.ancillaryValue(n),o=C.get.ruleName(n),r=f.rules[o],s=[],l=e.is(m.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);C.error(c.noRule,o)}},setting:function(e,t){if(I.isPlainObject(e))I.extend(!0,f,e);else{if(t===q)return f[e];f[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,C,e);else{if(t===q)return C[e];C[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,f.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),C.verbose.apply(console,arguments)))},error:function(){f.silent||(C.error=Function.prototype.bind.call(console.error,console,f.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(C.performance.timer),I.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),1<D.length&&(e+=" ("+D.length+")"),(console.group!==q||console.table!==q)&&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 a,o,n,r=u;return e=e||P,t=t||v,"string"==typeof i&&r!==q&&(i=i.split(/[\. ]/),a=i.length-1,I.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==q)return o=r[n],!1;{if(!I.isPlainObject(r[t])||e==a)return r[t]!==q&&(o=r[t]),!1;r=r[t]}}})),I.isFunction(o)?n=o.apply(t,e):o!==q&&(n=o),Array.isArray(T)?T.push(n):T!==q?T=[T,n]:n!==q&&(T=n),o}};C.initialize()}),T!==q?T: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:!0,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",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"]):not([type="reset"]):not([type="button"]):not([type="submit"]), 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>"}),n+="</ul>"},prompt:function(e){var n;return 1===e.length?e[0]:(n='<ul class="ui list">',I.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>")}},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===q||""===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){var n,i;return t instanceof RegExp?e.match(t):((n=t.match(I.fn.form.settings.regExp.flags))&&(t=2<=n.length?n[1]:t,i=3<=n.length?n[2]:""),e.match(new RegExp(t,i)))},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,a;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=a=+t):(t=t.split("..",2),n.test(t[0])&&(i=+t[0]),n.test(t[1])&&(a=+t[1]))),n.test(e)&&(i===q||i<=e)&&(a===q||e<=a)},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!==q&&e.length>=t},exactLength:function(e,t){return e!==q&&e.length==t},maxLength:function(e,t){return e!==q&&e.length<=t},match:function(e,t,n){var i,a;return 0<(a=n.find('[data-validate="'+t+'"]')).length||0<(a=n.find("#"+t)).length||0<(a=n.find('[name="'+t+'"]')).length?i=a.val():0<(a=n.find('[name="'+t+'[]"]')).length&&(i=a),i!==q&&e.toString()==i.toString()},different:function(e,t,n){var i,a;return 0<(a=n.find('[data-validate="'+t+'"]')).length||0<(a=n.find("#"+t)).length||0<(a=n.find('[name="'+t+'"]')).length?i=a.val():0<(a=n.find('[name="'+t+'[]"]')).length&&(i=a),i!==q&&e.toString()!==i.toString()},creditCard:function(n,e){var i,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]}},o=!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){(i=a[t])&&(i={length:-1!==I.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&i.pattern&&(o=!0)}),!o))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,r=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],l=0;t--;)l+=s[r][parseInt(n.charAt(t),10)],r^=1;return l%10==0&&0<l}},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(Y,B,$,K){"use strict";Y.isFunction=Y.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},B=void 0!==B&&B.Math==Math?B:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Y.modal=Y.fn.modal=function(P){var I,e=Y(this),R=Y(B),L=Y($),q=Y("body"),j=e.selector||"",H=(new Date).getTime(),N=[],V=P,z="string"==typeof V,U=[].slice.call(arguments,1),W=B.requestAnimationFrame||B.mozRequestAnimationFrame||B.webkitRequestAnimationFrame||B.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,a,o,e,i,n,r,s,l,c,u,d=Y.isPlainObject(P)?Y.extend(!0,{},Y.fn.modal.settings,P):Y.extend({},Y.fn.modal.settings),f=d.selector,p=d.className,m=d.namespace,g=d.fields,h=d.error,v="."+m,b="module-"+m,y=Y(this),x=[B,$].indexOf(d.context)<0?L.find(d.context):q,w=x[0]===q[0],C=y.find(f.closeIcon),k=y.hasClass("modal"),T=this,D=k?y.data(b):K,S=!1,A="",E="",F=!1,M=!1,O={initialize:function(){var o;O.create.id(),k||(O.create.modal(),Y.isFunction(d.onHidden)||(d.onHidden=function(){O.destroy(),y.remove()})),y.addClass(d.class),""!==d.title&&y.find(f.title).html(O.helpers.escape(d.title,d.preserveHTML)).addClass(d.classTitle),""!==d.content&&y.find(f.content).html(O.helpers.escape(d.content,d.preserveHTML)).addClass(d.classContent),O.has.configActions()&&(0===(o=y.find(f.actions).addClass(d.classActions)).length?o=Y("<div/>",{class:p.actions+" "+(d.classActions||"")}).appendTo(y):o.empty(),d.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+O.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=O.helpers.escape(e[g.text]||"",d.preserveHTML),i=O.helpers.deQuote(e[g.class]||""),a=e[g.click]&&Y.isFunction(e[g.click])?e[g.click]:function(){};o.append(Y("<button/>",{html:t+n,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:p.button+" "+i,click:function(){var e=Y(this);e.is(f.approve)||e.is(f.deny)||!1===a.call(T,y)||O.hide()}}))})),O.cache={},O.verbose("Initializing dimmer",x),O.create.dimmer(),d.allowMultiple&&O.create.innerDimmer(),d.centered||y.addClass("top aligned"),O.refreshModals(),O.refreshInputs(),O.bind.events(),O.observeChanges(),O.instantiate(),d.autoShow&&O.show()},instantiate:function(){O.verbose("Storing instance of modal"),D=O,y.data(b,D)},create:{modal:function(){var e;y=Y("<div/>",{class:p.modal,role:"dialog","aria-modal":!0}),d.closeIcon&&(C=Y("<i/>",{class:p.close,role:"button",tabindex:0,"aria-label":d.text.close}),y.append(C)),""!==d.title&&(e="_"+O.get.id()+"title",y.attr("aria-labelledby",e),Y("<div/>",{class:p.title,id:e}).appendTo(y)),""!==d.content&&(e="_"+O.get.id()+"desc",y.attr("aria-describedby",e),Y("<div/>",{class:p.content,id:e}).appendTo(y)),O.has.configActions()&&Y("<div/>",{class:p.actions}).appendTo(y),x.append(y)},dimmer:function(){var e={debug:d.debug,dimmerName:"modals"},e=Y.extend(!0,e,d.dimmerSettings);Y.fn.dimmer===K?O.error(h.dimmer):(O.debug("Creating dimmer"),i=x.dimmer(e),F=O.is.scrolling(),d.detachable?(O.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):O.set.undetached(),n=i.dimmer("get dimmer"))},id:function(){c=(Math.random().toString(16)+"000000000").slice(2,10),l="."+c,O.verbose("Creating unique id for element",c)},innerDimmer:function(){0===y.find(f.dimmer).length&&Y("<div/>",{class:p.innerDimmer}).prependTo(y)}},destroy:function(){u&&u.disconnect(),O.verbose("Destroying previous modal"),y.removeData(b).off(v),R.off(l),n.off(l),C.off(l),t&&t.off(l),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in B&&((u=new MutationObserver(function(e){d.observeChanges&&(O.debug("DOM tree modified, refreshing"),O.refresh()),O.refreshInputs()})).observe(T,{childList:!0,subtree:!0}),O.debug("Setting up mutation observer",u))},refresh:function(){O.remove.scrolling(),O.cacheSizes(),O.can.useFlex()||O.set.modalOffset(),O.set.screenHeight(),O.set.type()},refreshModals:function(){o=y.siblings(f.modal),a=o.add(y)},refreshInputs:function(){t&&t.off("keydown"+l),(t=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===Y(this).closest(".disabled").length})).first().on("keydown"+l,O.event.inputKeyDown.first),t.last().on("keydown"+l,O.event.inputKeyDown.last)},attachEvents:function(e,t){var n=Y(e);t=Y.isFunction(O[t])?O[t]:O.toggle,0<n.length?(O.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):O.error(h.notFound,e)},bind:{events:function(){O.verbose("Attaching events"),y.on("click"+v,f.close,O.event.close).on("click"+v,f.approve,O.event.approve).on("click"+v,f.deny,O.event.deny),C.on("keyup"+l,O.event.closeKeyUp),R.on("resize"+l,O.event.resize)},scrollLock:function(){i[0].addEventListener("touchmove",O.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i[0].removeEventListener("touchmove",O.event.preventScroll,{passive:!1})}},get:{id:function(){return c},element:function(){return y},settings:function(){return d}},event:{approve:function(){S||!1===d.onApprove.call(T,Y(this))?O.verbose("Approve callback returned false cancelling hide"):(S=!0,O.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===d.onDeny.call(T,Y(this))?O.verbose("Deny callback returned false cancelling hide"):(S=!0,O.hide(function(){S=!1}))},close:function(){O.hide()},closeKeyUp:function(e){e=e.which;e!==d.keys.enter&&e!==d.keys.space||!y.hasClass(p.front)||O.hide()},inputKeyDown:{first:function(e){e.which===d.keys.tab&&e.shiftKey&&(t.last().focus(),e.preventDefault())},last:function(e){e.which!==d.keys.tab||e.shiftKey||(t.first().focus(),e.preventDefault())}},mousedown:function(e){var t=Y(e.target),n=O.is.rtl();(r=0<t.closest(f.modal).length)&&O.verbose("Mouse down event registered inside the modal"),(s=O.is.scrolling()&&(!n&&R.outerWidth()-d.scrollbarWidth<=e.clientX||n&&d.scrollbarWidth>=e.clientX))&&O.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(d.closable)if(r)O.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)O.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<Y(e.target).closest(f.modal).length,e=Y.contains($.documentElement,e.target);if(!t&&e&&O.is.active()&&y.hasClass(p.front)){if(O.debug("Dimmer clicked, hiding all modals"),d.allowMultiple){if(!O.hideAll())return}else if(!O.hide())return;O.remove.clickaway()}}else O.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(O.timer),O.timer=setTimeout(e,t)},keyboard:function(e){e.which===d.keys.escape&&(d.closable?(O.debug("Escape key pressed hiding modal"),y.hasClass(p.front)&&O.hide()):O.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(O.is.animating()||O.is.active())&&W(O.refresh)}},toggle:function(){O.is.active()||O.is.animating()?O.hide():O.show()},show:function(e){e=Y.isFunction(e)?e:function(){},O.refreshModals(),O.set.dimmerSettings(),O.set.dimmerStyles(),O.showModal(e)},hide:function(e){return e=Y.isFunction(e)?e:function(){},O.refreshModals(),O.hideModal(e)},showModal:function(e){e=Y.isFunction(e)?e:function(){},O.is.animating()||!O.is.active()?!1===d.onShow.call(T)?O.verbose("Show callback returned false cancelling show"):(M=O.has.scrollbar(),O.showDimmer(),O.cacheSizes(),M&&O.set.bodyMargin(),O.can.useFlex()?O.remove.legacy():(O.set.legacy(),O.set.modalOffset(),O.debug("Using non-flex legacy modal positioning.")),O.set.screenHeight(),O.set.type(),O.set.clickaway(),!d.allowMultiple&&O.others.active()?O.hideOthers(O.showModal):(S=!1,d.allowMultiple&&(O.others.active()&&o.filter("."+p.active).find(f.dimmer).addClass("active"),d.detachable&&y.detach().appendTo(n)),d.transition&&Y.fn.transition!==K&&y.transition("is supported")?(O.debug("Showing modal with css animations"),y.transition({debug:d.debug,verbose:d.verbose,silent:d.silent,animation:(d.transition.showMethod||d.transition)+" in",queue:d.queue,duration:d.transition.showDuration||d.duration,useFailSafe:!0,onComplete:function(){d.onVisible.apply(T),d.keyboardShortcuts&&O.add.keyboardShortcuts(),O.save.focus(),O.set.active(),d.autofocus&&O.set.autofocus(),e()}})):O.error(h.noTransition))):O.debug("Modal is already visible")},hideModal:function(e,t,n){var i=o.filter("."+p.active).last();if(e=Y.isFunction(e)?e:function(){},!1===d.onHide.call(T,Y(this)))return O.verbose("Hide callback returned false cancelling hide"),S=!1;(O.is.animating()||O.is.active())&&(O.debug("Hiding modal"),d.transition&&Y.fn.transition!==K&&y.transition("is supported")?(O.remove.active(),y.transition({debug:d.debug,verbose:d.verbose,silent:d.silent,animation:(d.transition.hideMethod||d.transition)+" out",queue:d.queue,duration:d.transition.hideDuration||d.duration,useFailSafe:!0,onStart:function(){O.others.active()||O.others.animating()||t||O.hideDimmer(),d.keyboardShortcuts&&!O.others.active()&&O.remove.keyboardShortcuts()},onComplete:function(){O.unbind.scrollLock(),d.allowMultiple&&(i.addClass(p.front),y.removeClass(p.front),(n?a:i).find(f.dimmer).removeClass("active")),Y.isFunction(d.onHidden)&&d.onHidden.call(T),O.remove.dimmerStyles(),O.restore.focus(),e()}})):O.error(h.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(M&&(w||n.css("top",i.scrollTop()),O.save.bodyMargin()),O.debug("Showing dimmer"),i.dimmer("show")):O.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(O.unbind.scrollLock(),i.dimmer("hide",function(){M&&O.restore.bodyMargin(),O.remove.clickaway(),O.remove.screenHeight()})):O.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=a.filter("."+p.active+", ."+p.animating);if(n=Y.isFunction(n)?n:function(){},0<e.length)return O.debug("Hiding all visible modals"),i=!0,Y(e.get().reverse()).each(function(e,t){i=i&&Y(t).modal("hide modal",n,!1,!0)}),i&&O.hideDimmer(),i},hideOthers:function(e){var t=o.filter("."+p.active+", ."+p.animating);e=Y.isFunction(e)?e:function(){},0<t.length&&(O.debug("Hiding other modals",o),t.modal("hide modal",e,!0))},others:{active:function(){return 0<o.filter("."+p.active).length},animating:function(){return 0<o.filter("."+p.animating).length}},add:{keyboardShortcuts:function(){O.verbose("Adding keyboard shortcuts"),L.on("keydown"+v,O.event.keyboard)}},save:{focus:function(){0<Y($.activeElement).closest(y).length||(e=Y($.activeElement).blur())},bodyMargin:function(){A=x.css((w?"margin-":"padding-")+(O.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(A.replace(/[^\d.]/g,"")),t=w?B.innerWidth-$.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;E=e+t}},restore:{focus:function(){e&&0<e.length&&d.restoreFocus&&e.focus()},bodyMargin:function(){var n=O.can.leftBodyScrollbar()?"left":"right";x.css((w?"margin-":"padding-")+n,A),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=Y(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(p.active)},legacy:function(){y.removeClass(p.legacy)},clickaway:function(){d.detachable||y.off("mousedown"+l),n.off("mousedown"+l),n.off("mouseup"+l)},dimmerStyles:function(){n.removeClass(p.inverted),i.removeClass(p.blurring)},bodyStyle:function(){""===x.attr("style")&&(O.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){O.debug("Removing page height"),x.css("height",""),O.remove.bodyStyle()},keyboardShortcuts:function(){O.verbose("Removing keyboard shortcuts"),L.off("keydown"+v)},scrolling:function(){F||i.removeClass(p.scrolling),y.removeClass(p.scrolling)}},cacheSizes:function(){y.addClass(p.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();O.cache.pageHeight!==K&&0===n||(Y.extend(O.cache,{pageHeight:L.outerHeight(),width:t,height:n+d.offset,scrollHeight:e+d.offset,contextHeight:(w?R:i).height()}),O.cache.topOffset=-O.cache.height/2),y.removeClass(p.loading),O.debug("Caching modal and container sizes",O.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return O.cache.leftBodyScrollbar===K&&(O.cache.leftBodyScrollbar=O.is.rtl()&&(O.is.iframe&&!O.is.firefox()||O.is.safari()||O.is.edge()||O.is.ie())),O.cache.leftBodyScrollbar},useFlex:function(){return"auto"===d.useFlex?d.detachable&&!O.is.ie():(d.useFlex&&O.is.ie()?O.debug("useFlex true is not supported in IE"):d.useFlex&&!d.detachable&&O.debug("useFlex true in combination with detachable false is not supported"),d.useFlex)},fit:function(){var e=O.cache.contextHeight,t=O.cache.contextHeight/2,n=O.cache.topOffset,i=O.cache.scrollHeight,a=O.cache.height,o=d.padding;return a<i?t+n+i+o<e:a+2*o<e}},has:{configActions:function(){return Array.isArray(d.actions)&&0<d.actions.length},scrollbar:function(){return w||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(p.active)},ie:function(){var e,t;return O.cache.isIE===K&&(e=!B.ActiveXObject&&"ActiveXObject"in B,t="ActiveXObject"in B,O.cache.isIE=e||t),O.cache.isIE},animating:function(){return y.transition("is supported")?y.transition("is animating"):y.is(":visible")},scrolling:function(){return i.hasClass(p.scrolling)},modernBrowser:function(){return!(B.ActiveXObject||"ActiveXObject"in B)},rtl:function(){return O.cache.isRTL===K&&(O.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===q.attr("dir")||"rtl"===q.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),O.cache.isRTL},safari:function(){return O.cache.isSafari===K&&(O.cache.isSafari=/constructor/i.test(B.HTMLElement)||!!B.ApplePaySession),O.cache.isSafari},edge:function(){return O.cache.isEdge===K&&(O.cache.isEdge=!!B.setImmediate&&!O.is.ie()),O.cache.isEdge},firefox:function(){return O.cache.isFirefox===K&&(O.cache.isFirefox=!!B.InstallTrigger),O.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.focus()},bodyMargin:function(){var n=O.can.leftBodyScrollbar()?"left":"right";(d.detachable||O.can.fit())&&x.css((w?"margin-":"padding-")+n,E+"px"),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=Y(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},clickaway:function(){d.detachable||y.on("mousedown"+l,O.event.mousedown),n.on("mousedown"+l,O.event.mousedown),n.on("mouseup"+l,O.event.mouseup)},dimmerSettings:function(){var e;Y.fn.dimmer===K?O.error(h.dimmer):(e={debug:d.debug,dimmerName:"modals",closable:"auto",useFlex:O.can.useFlex(),duration:{show:d.transition.showDuration||d.duration,hide:d.transition.hideDuration||d.duration}},e=Y.extend(!0,e,d.dimmerSettings),d.inverted&&(e.variation=e.variation!==K?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){d.inverted?n.addClass(p.inverted):n.removeClass(p.inverted),d.blurring?i.addClass(p.blurring):i.removeClass(p.blurring)},modalOffset:function(){var e;d.detachable?y.css({marginTop:!y.hasClass("aligned")&&O.can.fit()?-O.cache.height/2:d.padding/2,marginLeft:-O.cache.width/2}):(e=O.can.fit(),y.css({top:!y.hasClass("aligned")&&e?L.scrollTop()+(O.cache.contextHeight-O.cache.height)/2:!e||y.hasClass("top")?L.scrollTop()+d.padding:L.scrollTop()+(O.cache.contextHeight-O.cache.height-d.padding),marginLeft:-O.cache.width/2})),O.verbose("Setting modal offset for legacy mode")},screenHeight:function(){O.can.fit()?x.css("height",""):y.hasClass("bottom")||(O.debug("Modal is taller than page content, resizing page height"),x.css("height",O.cache.height+2*d.padding))},active:function(){y.addClass(p.active+" "+p.front),o.filter("."+p.active).removeClass(p.front)},scrolling:function(){i.addClass(p.scrolling),y.addClass(p.scrolling),O.unbind.scrollLock()},legacy:function(){y.addClass(p.legacy)},type:function(){O.can.fit()?(O.verbose("Modal fits on screen"),O.others.active()||O.others.animating()||(O.remove.scrolling(),O.bind.scrollLock())):y.hasClass("bottom")?O.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(O.verbose("Modal cannot fit on screen setting to scrolling"),O.set.scrolling())},undetached:function(){i.addClass(p.undetached)}},setting:function(e,t){if(O.debug("Changing setting",e,t),Y.isPlainObject(e))Y.extend(!0,d,e);else{if(t===K)return d[e];Y.isPlainObject(d[e])?Y.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,O,e);else{if(t===K)return O[e];O[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?O.performance.log(arguments):(O.debug=Function.prototype.bind.call(console.info,console,d.name+":"),O.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?O.performance.log(arguments):(O.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),O.verbose.apply(console,arguments)))},error:function(){d.silent||(O.error=Function.prototype.bind.call(console.error,console,d.name+":"),O.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(H||t),H=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(O.performance.timer),O.performance.timer=setTimeout(O.performance.display,500)},display:function(){var e=d.name+":",n=0;H=!1,clearTimeout(O.performance.timer),Y.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",j&&(e+=" '"+j+"'"),(console.group!==K||console.table!==K)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):Y.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var a,o,n,r=D;return e=e||U,t=t||T,"string"==typeof i&&r!==K&&(i=i.split(/[\. ]/),a=i.length-1,Y.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Y.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==K)return o=r[n],!1;{if(!Y.isPlainObject(r[t])||e==a)return r[t]!==K&&(o=r[t]),!1;r=r[t]}}})),Y.isFunction(o)?n=o.apply(t,e):o!==K&&(n=o),Array.isArray(I)?I.push(n):I!==K?I=[I,n]:n!==K&&(I=n),o}};z?(D===K&&(Y.isFunction(d.templates[V])&&(d.autoShow=!0,d.className.modal=d.className.template,d=Y.extend(!0,{},d,d.templates[V].apply(O,U)),p=d.className,d.namespace,g=d.fields,h=d.error),O.initialize()),Y.isFunction(d.templates[V])||O.invoke(V)):(D!==K&&D.invoke("destroy"),O.initialize(),I=y)}),I!==K?I:this},Y.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},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .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",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},Y.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return Y.isPlainObject(e[0])?Y.extend({handler:function(){},content:"",title:""},e[0]):(Y.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),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];a.handler(Y(e).val())}function t(){a.handler(null)}var n=this,i=this.get.settings(),a=i.templates.getArguments(arguments);return 0===Y(Y.parseHTML(a.content)).filter(".ui.input").length&&(a.content+='<p><div class="'+this.helpers.deQuote(i.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(a.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(a.defaultValue||"")+'"></div></p>'),{title:a.title,content:a.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document),function(q,j,H,N){"use strict";q.isFunction=q.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.popup=function(T){var D,e=q(this),S=q(H),A=q(j),E=q("body"),F=e.selector||"",M="ontouchstart"in H.documentElement?"touchstart":"click",O=(new Date).getTime(),P=[],I=T,R="string"==typeof I,L=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,u=q.isPlainObject(T)?q.extend(!0,{},q.fn.popup.settings,T):q.extend({},q.fn.popup.settings),i=u.selector,d=u.className,f=u.error,p=u.metadata,a=u.namespace,o="."+u.namespace,r="module-"+a,m=q(this),l=[j,H].indexOf(u.context)<0?S.find(u.context):q(u.context),g=[j,H].indexOf(u.scrollContext)<0?S.find(u.scrollContext):q(u.scrollContext),h=[j,H].indexOf(u.boundary)<0?S.find(u.boundary):q(u.boundary),v=u.target?[j,H].indexOf(u.target)<0?S.find(u.target):q(u.target):m,b=0,y=!1,x=!1,w=this,C=m.data(r),k={initialize:function(){k.debug("Initializing",m),k.createID(),k.bind.events(),!k.exists()&&u.preserve&&k.create(),u.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),C=k,m.data(r,C)},observeChanges:function(){"MutationObserver"in j&&((e=new MutationObserver(k.event.documentChanged)).observe(H,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){u.popup?c=S.find(u.popup).eq(0):u.inline&&(c=v.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=k.get.offsetParent(),c.removeClass(d.loading),u.movePopup&&k.has.popup()&&k.get.offsetParent(c)[0]!==s[0]&&(k.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=u.inline?k.get.offsetParent(v):k.has.popup()?k.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(k.debug("Setting page as offset parent"),s=E),k.get.variation()&&k.set.variation()},reposition:function(){k.refresh(),k.set.position()},destroy:function(){k.debug("Destroying previous module"),e&&e.disconnect(),c&&!u.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),m.removeData(r)},event:{start:function(e){var t=q.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(k.hideTimer),x&&!u.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=q.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){x=!0,u.addTouchEvents&&k.show()},resize:function(){k.is.visible()&&k.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==w||0<q(e).find(w).length)&&(k.debug("Element removed from DOM, tearing down events"),k.destroy())})})},hideGracefully:function(e){var t=q(e.target),n=q.contains(H.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(k.debug("Click occurred outside popup hiding popup"),k.hide()):k.debug("Click was inside popup, keeping popup open")}},create:function(){var e=k.get.html(),t=k.get.title(),n=k.get.content();e||n||t?(k.debug("Creating pop-up html"),e=e||u.templates.popup({title:t,content:n}),c=q("<div/>").addClass(d.popup).data(p.activator,m).html(e),u.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(m)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),u.hoverable&&k.bind.popup(),u.onCreate.call(c,w)):u.popup?(S.find(u.popup).data(p.activator,m),k.verbose("Used popup specified in settings"),k.refresh(),u.hoverable&&k.bind.popup()):0!==v.next(i.popup).length?(k.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(i.popup).data(p.activator,m),k.refresh(),u.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",w)},createID:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),t="."+n,k.verbose("Creating unique id for element",n)},toggle:function(){k.debug("Toggling pop-up"),k.is.hidden()?(k.debug("Popup is hidden, showing pop-up"),k.unbind.close(),k.show()):(k.debug("Popup is visible, hiding pop-up"),k.hide())},show:function(e){e=e||function(){},k.debug("Showing pop-up",u.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===u.onShow.call(c,w)?k.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),u.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===u.onHide.call(c,w)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){S.find(i.popup).filter("."+d.popupVisible).each(function(){q(this).data(p.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?k.has.popup():1<=c.closest(l).length)},removePopup:function(){k.has.popup()&&!u.popup&&(k.debug("Removing popup",c),c.remove(),c=N,u.onRemove.call(c,w))},save:{conditions:function(){k.cache={title:m.attr("title")},k.cache.title&&m.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(m.attr("title",k.cache.title),k.verbose("Restoring original attributes",k.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=q.isFunction(e)?e:function(){},u.transition&&q.fn.transition!==N&&m.transition("is supported")?(k.set.visible(),c.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){k.bind.close(),e.call(c,w),u.onVisible.call(c,w)}})):k.error(f.noTransition)},hide:function(e){e=q.isFunction(e)?e:function(){},k.debug("Hiding pop-up"),u.transition&&q.fn.transition!==N&&m.transition("is supported")?c.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){k.reset(),e.call(c,w),u.onHidden.call(c,w)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return m.removeData(p.html),m.data(p.html)||u.html},title:function(){return m.removeData(p.title),m.data(p.title)||u.title},content:function(){return m.removeData(p.content),m.data(p.content)||u.content||m.attr("title")},variation:function(){return m.removeData(p.variation),m.data(p.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]==j,i=v.offset(),a=u.inline||u.popup&&u.movePopup?v.offsetParent().offset():{top:0,left:0},o=n?{top:0,left:0}:h.offset(),r={},n=n?{top:A.scrollTop(),left:A.scrollLeft()}:{top:0,left:0},r={target:{element:v[0],width:v.outerWidth(),height:v.outerHeight(),top:i.top-a.top,left:i.left-a.left,margin:{}},popup:{width:c.outerWidth(),height:c.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:o.top,left:o.left,scroll:{top:n.top,left:n.left},width:h.width(),height:h.height()}};return e[0]!==s[0]&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),u.setFluidWidth&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(j.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?k.is.rtl()?parseInt(j.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(j.getComputedStyle(t).getPropertyValue("margin-left"),10):0,a=r.screen,r.boundary={top:a.top+a.scroll.top,bottom:a.top+a.scroll.top+a.height,left:a.left+a.scroll.left,right:a.left+a.scroll.left+a.width},r},id:function(){return n},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(e,t){var n={},i=(t=t||k.get.calculations()).popup,t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+i.width),bottom:t.bottom-(e.top+i.height)},k.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(e!==N?e:v)[0].parentNode,n=q(t);if(t)for(var i="none"===n.css("transform"),a="static"===n.css("position"),o=n.is("body");t&&!o&&a&&i;)t=t.parentNode,i="none"===(n=q(t)).css("transform"),a="static"===n.css("position"),o=n.is("body");return n&&0<n.length?n:q()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],t=t[1],i="top"==n||"bottom"==n,a=!1,o=!1,r=!1;return y||(k.verbose("All available positions available"),y=k.get.positions()),k.debug("Recording last position tried",e),y[e]=!0,"opposite"===u.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),a=!0===y[r],k.debug("Trying opposite strategy",r)),"adjacent"===u.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),o=!0===y[r],k.debug("Trying adjacent strategy",r)),(o||a)&&(k.debug("Using backup position",r),r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),r}},set:{position:function(e,t){if(0!==v.length&&0!==c.length){var n,i,a,o,r,s,l;if(t=t||k.get.calculations(),e=e||m.data(p.position)||u.position,n=m.data(p.offset)||u.offset,i=u.distanceAway,a=t.target,o=t.popup,r=t.parent,k.should.centerArrow(t)&&(k.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(n=(n+=a.width/2)-u.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(n=(n-=a.width/2)+u.arrowPixelsFromEdge)),0===a.width&&0===a.height&&!k.is.svg(a.element))return k.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(k.debug("Adding margin to calculation",a.margin),"left center"==e||"right center"==e?(n+=a.margin.top,i+=-a.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=a.margin.left,i-=a.margin.top):(n+=a.margin.left,i+=a.margin.top)),k.debug("Determining popup position from calculations",e,t),k.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),k.debug("RTL: Popup position updated",e)),e=b==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:e){case"top left":s={top:"auto",bottom:r.height-a.top+i,left:a.left+n,right:"auto"};break;case"top center":s={bottom:r.height-a.top+i,left:a.left+a.width/2-o.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-a.top+i,right:r.width-a.left-a.width-n,top:"auto",left:"auto"};break;case"left center":s={top:a.top+a.height/2-o.height/2+n,right:r.width-a.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:a.top+a.height/2-o.height/2+n,left:a.left+a.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:a.top+a.height+i,left:a.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:a.top+a.height+i,left:a.left+a.width/2-o.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:a.top+a.height+i,right:r.width-a.left-a.width-n,left:"auto",bottom:"auto"}}if(s===N&&k.error(f.invalidPosition,e),k.debug("Calculated popup positioning values",s),c.css(s).removeClass(d.position).addClass(e).addClass(d.loading),l=k.get.popupOffset(),l=k.get.distanceFromBoundary(l,t),!u.forcePosition&&k.is.offstage(l,e)){if(k.debug("Position is outside viewport",e),b<u.maxSearchDepth)return b++,e=k.get.nextPosition(e),k.debug("Trying new position",e),!!c&&k.set.position(e,t);if(!u.lastResort)return k.debug("Popup could not find a position to display",c),k.error(f.cannotPlace,w),k.remove.attempts(),k.remove.loading(),k.reset(),u.onUnplaceable.call(c,w),!1;k.debug("No position found, showing with last position")}return k.debug("Position is on stage",e),k.remove.attempts(),k.remove.loading(),u.setFluidWidth&&k.is.fluid()&&k.set.fluidWidth(t),!0}k.error(f.notFound)},fluidWidth:function(e){e=e||k.get.calculations(),k.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},variation:function(e){(e=e||k.get.variation())&&k.has.popup()&&(k.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){m.addClass(d.visible)}},remove:{loading:function(){c.removeClass(d.loading)},variation:function(e){(e=e||k.get.variation())&&(k.verbose("Removing variation",e),c.removeClass(e))},visible:function(){m.removeClass(d.visible)},attempts:function(){k.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){k.debug("Binding popup events to module"),"click"==u.on&&m.on(M+o,k.toggle),"hover"==u.on&&m.on("touchstart"+o,k.event.touchstart),k.get.startEvent()&&m.on(k.get.startEvent()+o,k.event.start).on(k.get.endEvent()+o,k.event.end),u.target&&k.debug("Target set to element",v),A.on("resize"+t,k.event.resize)},popup:function(){k.verbose("Allowing hover events on popup to prevent closing"),c&&k.has.popup()&&c.on("mouseenter"+o,k.event.start).on("mouseleave"+o,k.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&k.bind.closeOnScroll(),k.is.closable()?k.bind.clickaway():"hover"==u.on&&x&&k.bind.touchClose()},closeOnScroll:function(){k.verbose("Binding scroll close event to document"),g.one(k.get.scrollEvent()+t,k.event.hideGracefully)},touchClose:function(){k.verbose("Binding popup touchclose event to document"),S.on("touchstart"+t,function(e){k.verbose("Touched away from popup"),k.event.hideGracefully.call(w,e)})},clickaway:function(){k.verbose("Binding popup close event to document"),S.on(M+t,function(e){k.verbose("Clicked away from popup"),k.event.hideGracefully.call(w,e)})}},unbind:{events:function(){A.off(t),m.off(o)},close:function(){S.off(t),g.off(t)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!k.is.basic()&&e.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(e,n){var i=[];return q.each(e,function(e,t){t<-u.jitter&&(k.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return k.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return m.hasClass(d.basic)},active:function(){return m.hasClass(d.active)},animating:function(){return c!==N&&c.hasClass(d.animating)},fluid:function(){return c!==N&&c.hasClass(d.fluid)},visible:function(){return c!==N&&c.hasClass(d.popupVisible)},dropdown:function(){return m.hasClass(d.dropdown)},hidden:function(){return!k.is.visible()},rtl:function(){return"rtl"===m.attr("dir")||"rtl"===m.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){k.remove.visible(),u.preserve?q.fn.transition!==N&&c.transition("remove transition"):k.removePopup()},setting:function(e,t){if(q.isPlainObject(e))q.extend(!0,u,e);else{if(t===N)return u[e];u[e]=t}},internal:function(e,t){if(q.isPlainObject(e))q.extend(!0,k,e);else{if(t===N)return k[e];k[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,u.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),k.verbose.apply(console,arguments)))},error:function(){u.silent||(k.error=Function.prototype.bind.call(console.error,console,u.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(O||t),O=t,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=u.name+":",n=0;O=!1,clearTimeout(k.performance.timer),q.each(P,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",F&&(e+=" '"+F+"'"),(console.group!==N||console.table!==N)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):q.each(P,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(i,e,t){var a,o,n,r=C;return e=e||L,t=t||w,"string"==typeof i&&r!==N&&(i=i.split(/[\. ]/),a=i.length-1,q.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(q.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==N)return o=r[n],!1;{if(!q.isPlainObject(r[t])||e==a)return r[t]!==N&&(o=r[t]),!1;r=r[t]}}})),q.isFunction(o)?n=o.apply(t,e):o!==N&&(n=o),Array.isArray(D)?D.push(n):D!==N?D=[D,n]:n!==N&&(D=n),o}};R?(C===N&&k.initialize(),k.invoke(I)):(C!==N&&C.invoke("destroy"),k.initialize())}),D!==N?D:this},q.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:j,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:j,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=q.fn.popup.settings.templates.escape;return typeof e!==N&&(typeof e.title!==N&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==N&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(T,e,D,S){"use strict";T.isFunction=T.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")(),T.fn.progress=function(h){var v,e=T(this),b=e.selector||"",y=(new Date).getTime(),x=[],w=h,C="string"==typeof w,k=[].slice.call(arguments,1);return e.each(function(){var r=T.isPlainObject(h)?T.extend(!0,{},T.fn.progress.settings,h):T.extend({},T.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,i=r.selector,s=r.error,a="."+e,o="module-"+e,c=T(this),u=T(this).find(i.bar),l=T(this).find(i.progress),d=T(this).find(i.label),f=this,p=c.data(o),m=!1,g={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,a=e/t;n<10&&!(1<(a*=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(){g.set.duration(),g.set.transitionEvent(),g.debug(f),g.read.metadata(),g.read.settings(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of progress",g),p=g,c.data(o,g)},destroy:function(){g.verbose("Destroying previous progress for",c),clearInterval(p.interval),g.remove.state(),c.removeData(o),p=S},reset:function(){g.remove.nextValue(),g.update.progress(0)},complete:function(e){(g.percent===S||g.percent<100)&&(g.remove.progressPoll(),!0!==e&&g.set.percent(100))},read:{metadata:function(){var e={percent:g.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:g.helper.forceArray(c.data(t.value))};e.total!==S&&(g.debug("Total value set from metadata",e.total),g.set.total(e.total)),0<e.value.length&&(g.debug("Current value set from metadata",e.value),g.set.value(e.value),g.set.progress(e.value)),0<e.percent.length&&(g.debug("Current percent value set from metadata",e.percent),g.set.percent(e.percent))},settings:function(){!1!==r.total&&(g.debug("Current total set in settings",r.total),g.set.total(r.total)),!1!==r.value&&(g.debug("Current value set in settings",r.value),g.set.value(r.value),g.set.progress(g.value)),!1!==r.percent&&(g.debug("Current percent set in settings",r.percent),g.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=g.get.transitionEnd();u.one(e+a,function(e){clearTimeout(g.failSafeTimer),t.call(this,e)}),g.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},r.duration+r.failSafeDelay),g.verbose("Adding fail safe timer",g.timer)}},increment:function(e){var t;e=g.has.total()?(t=g.get.value(),e||1):(t=g.get.percent(),e||g.get.randomValue()),g.debug("Incrementing percentage by",t,t=t+e,e),t=g.get.normalizedValue(t),g.set.progress(t)},decrement:function(e){var t,n;g.get.total()?(n=(t=g.get.value())-(e=e||1),g.debug("Decrementing value by",e,t)):(n=(t=g.get.percent())-(e=e||g.get.randomValue()),g.debug("Decrementing percentage by",e,t)),n=g.get.normalizedValue(n),g.set.progress(n)},has:{progressPoll:function(){return g.progressPoll},total:function(){return!1!==g.get.total()}},get:{text:function(e,t){var t=t||0,n=g.get.value(t),i=g.get.total(),a=m?g.get.displayPercent(t):g.get.percent(t),o=!1!==i?Math.max(0,i-n):100-a;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",r.text.bars[t]||""),g.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return g.debug("Value cannot decrement below 0"),0;if(g.has.total()){if(e>g.total)return g.debug("Value cannot increment above total",g.total),g.total}else if(100<e)return g.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return g.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=D.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==S)return n[e]},displayPercent:function(e){var e=T(u[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:g.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return g.percent&&g.percent[e||0]||0},value:function(e){return g.nextValue||g.value&&g.value[e||0]||0},total:function(){return g.total!==S&&g.total}},create:{progressPoll:function(){g.progressPoll=setTimeout(function(){g.update.toNextValue(),g.remove.progressPoll()},g.get.updateInterval())}},is:{complete:function(){return g.is.success()||g.is.warning()||g.is.error()},success:function(){return c.hasClass(n.success)},warning:function(){return c.hasClass(n.warning)},error:function(){return c.hasClass(n.error)},active:function(){return c.hasClass(n.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){g.verbose("Removing progress poll timer"),g.progressPoll&&(clearTimeout(g.progressPoll),delete g.progressPoll)},nextValue:function(){g.verbose("Removing progress value stored for next update"),delete g.nextValue},state:function(){g.verbose("Removing stored state"),delete g.total,delete g.percent,delete g.value},active:function(){g.verbose("Removing active state"),c.removeClass(n.active)},success:function(){g.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){g.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){g.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){g.debug("set bar width with ",e),e=g.helper.forceArray(e);var a=-1,o=-1,r=g.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=T(u[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1==a&&(a=t),o=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){T(u[t]).css({borderTopLeftRadius:t==a?"":0,borderBottomLeftRadius:t==a?"":0,borderTopRightRadius:t==o?"":0,borderBottomRightRadius:t==o?"":0})}),c.attr("data-percent",t)},duration:function(e){e=e||r.duration,g.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=g.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=g.has.total(),i=g.helper.sum(e),a=1<e.length&&n,o=g.helper.sum(g.helper.forceArray(g.value));a&&o>g.total?g.error(s.sumExceedsTotal,o,g.total):!a&&100<i?g.error(s.tooHigh,i):i<0?g.error(s.tooLow,i):(t=0<r.precision?r.precision:a?g.helper.derivePrecision(Math.min.apply(null,g.value),g.total):0,o=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),g.percent=o,n&&(g.value=e.map(function(e){return 0<t?Math.round(e/100*g.total*(10*t))/(10*t):Math.round(e/100*g.total*10)/10})),g.set.barWidth(e),g.set.labelInterval()),r.onChange.call(f,e,g.value,g.total)},labelInterval:function(){clearInterval(g.interval),g.bind.transitionEnd(function(){g.verbose("Bar finished animating, removing continuous label updates"),clearInterval(g.interval),m=!1,g.set.labels()}),m=!0,g.interval=setInterval(function(){T.contains(D.documentElement,f)||(clearInterval(g.interval),m=!1),g.set.labels()},r.framerate)},labels:function(){g.verbose("Setting both bar progress and outer label text"),g.set.barLabel(),g.set.state()},label:function(e){(e=e||"")&&(e=g.get.text(e),g.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=e!==S?e:g.helper.sum(g.percent))?r.autoSuccess&&1===u.length&&!(g.is.warning()||g.is.error()||g.is.success())?(g.set.success(),g.debug("Automatically triggering success at 100%")):(g.verbose("Reached 100% removing active state"),g.remove.active(),g.remove.progressPoll()):0<e?(g.verbose("Adjusting active progress bar label",e),g.set.active()):(g.remove.active(),g.remove.warning(),g.remove.error(),g.remove.success(),g.set.label(r.text.active))},barLabel:function(n){l.map(function(e,t){t=T(t);n!==S?t.text(g.get.text(n,e)):"ratio"==r.label&&g.has.total()?(g.verbose("Adding ratio to bar label"),t.text(g.get.text(r.text.ratio,e))):"percent"==r.label&&(g.verbose("Adding percentage to bar label"),t.text(g.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,g.debug("Setting active state"),r.showActivity&&!g.is.active()&&c.addClass(n.active),g.remove.warning(),g.remove.error(),g.remove.success(),(e=r.onLabelUpdate("active",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onActive.call(f,g.value,g.total)})},success:function(e,t){e=e||r.text.success||r.text.active,g.debug("Setting success state"),c.addClass(n.success),g.remove.active(),g.remove.warning(),g.remove.error(),g.complete(t),e=r.text.success?r.onLabelUpdate("success",e,g.value,g.total):r.onLabelUpdate("active",e,g.value,g.total),g.set.label(e),g.bind.transitionEnd(function(){r.onSuccess.call(f,g.total)})},warning:function(e,t){e=e||r.text.warning,g.debug("Setting warning state"),c.addClass(n.warning),g.remove.active(),g.remove.success(),g.remove.error(),g.complete(t),(e=r.onLabelUpdate("warning",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onWarning.call(f,g.value,g.total)})},error:function(e,t){e=e||r.text.error,g.debug("Setting error state"),c.addClass(n.error),g.remove.active(),g.remove.success(),g.remove.warning(),g.complete(t),(e=r.onLabelUpdate("error",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onError.call(f,g.value,g.total)})},transitionEvent:function(){g.get.transitionEnd()},total:function(e){g.total=e},value:function(e){g.value=g.helper.forceArray(e)},progress:function(e){g.has.progressPoll()?(g.debug("Updated within interval, setting next update to use new value",e),g.set.nextValue(e)):(g.debug("First update in progress update interval, immediately updating",e),g.update.progress(e),g.create.progressPoll())},nextValue:function(e){g.nextValue=e}},update:{toNextValue:function(){var e=g.nextValue;e&&(g.debug("Update interval complete using last updated value",e),g.update.progress(e),g.remove.nextValue())},progress:function(e){var n=g.has.total(),e=(n&&g.set.value(e),g.helper.forceArray(e).map(function(e){var t;return!1===(e=g.get.numericValue(e))&&g.error(s.nonNumeric,e),e=g.get.normalizedValue(e),n?(t=0<g.total?e/g.total*100:100,g.debug("Calculating percent complete from total",t)):(t=e,g.debug("Setting value to exact percentage value",t)),t}));g.set.percent(e)}},setting:function(e,t){if(g.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,r,e);else{if(t===S)return r[e];T.isPlainObject(r[e])?T.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,g,e);else{if(t===S)return g[e];g[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){r.silent||(g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.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:f,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(g.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==S||console.table!==S)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var a,o,n,r=p;return e=e||k,t=t||f,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),a=i.length-1,T.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==S)return o=r[n],!1;{if(!T.isPlainObject(r[t])||e==a)return r[t]!==S?o=r[t]:g.error(s.method,i),!1;r=r[t]}}})),T.isFunction(o)?n=o.apply(t,e):o!==S&&(n=o),Array.isArray(v)?v.push(n):v!==S?v=[v,n]:n!==S&&(v=n),o}};C?(p===S&&g.initialize(),g.invoke(w)):(p!==S&&p.invoke("destroy"),g.initialize())}),v!==S?v:this},T.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 multiple values exceed total"},regExp:{variable:/\{\$*[a-z0-9]+\}/gi},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(H,N,V,z){"use strict";H.isFunction=H.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},N=void 0!==N&&N.Math==Math?N:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),H.fn.sidebar=function(T){var D,e=H(this),S=H(N),A=H(V),E=H("body"),F=H("html"),M=H("head"),O=e.selector||"",P=(new Date).getTime(),I=[],R=T,L="string"==typeof R,q=[].slice.call(arguments,1),j=N.requestAnimationFrame||N.mozRequestAnimationFrame||N.webkitRequestAnimationFrame||N.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var a,o,e,r,s,l=H.isPlainObject(T)?H.extend(!0,{},H.fn.sidebar.settings,T):H.extend({},H.fn.sidebar.settings),t=l.selector,c=l.className,n=l.namespace,i=l.regExp,u=l.error,d="."+n,f="module-"+n,p=H(this),m=[N,V].indexOf(l.context)<0?H(V).find(l.context):E,g=m[0]===E[0],h=p.children(t.sidebar),v=(m.children(t.fixed),m.children(t.pusher)),b=this,y=p.data(f),x="",w="",C=!1,k={initialize:function(){k.debug("Initializing sidebar",T),k.create.id(),s=k.get.transitionEvent(),l.delaySetup?j(k.setup.layout):k.setup.layout(),j(function(){k.setup.cache()}),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),y=k,p.data(f,k)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),o="."+e,k.verbose("Creating unique id for element",e)}},destroy:function(){k.verbose("Destroying previous module for",p),p.off(d).removeData(f),k.is.ios()&&k.remove.ios(),m.off(o),S.off(o),A.off(o)},event:{clickaway:function(e){var t;l.closable&&(t=0<v.find(e.target).length||v.is(e.target),e=m.is(e.target),t&&(k.verbose("User clicked on dimmed page"),k.hide()),e&&(k.verbose("User clicked on dimmable context (scaled out page)"),k.hide()))},touch:function(e){},containScroll:function(e){b.scrollTop<=0&&(b.scrollTop=1),b.scrollTop+b.offsetHeight>=b.scrollHeight&&(b.scrollTop=b.scrollHeight-b.offsetHeight-1)},scroll:function(e){0===H(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){k.verbose("Adding clickaway events to context",m),m.on("click"+o,k.event.clickaway).on("touchend"+o,k.event.clickaway)},scrollLock:function(){l.scrollLock&&(k.debug("Disabling page scroll"),(C=k.has.scrollbar())&&(k.save.bodyMargin(),k.set.bodyMargin()),m.addClass(c.locked)),k.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+o,k.event.touch),p.on("scroll"+d,k.event.containScroll)}},unbind:{clickaway:function(){k.verbose("Removing clickaway events from context",m),m.off(o)},scrollLock:function(){k.verbose("Removing scroll lock from page"),C&&k.restore.bodyMargin(),m.removeClass(c.locked),A.off(o),p.off("scroll"+d)}},add:{inlineCSS:function(){var e=k.cache.width||p.outerWidth(),t=k.cache.height||p.outerHeight(),n=k.is.rtl(),i=k.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(k.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(k.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); }"),k.is.ie()&&("left"===i||"right"===i?(k.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); }"),a=H(n+="</style>").appendTo(M),k.debug("Adding sizing css to head",a)}},refresh:function(){k.verbose("Refreshing selector cache"),m=[N,V].indexOf(l.context)<0?H(V).find(l.context):H(l.context),h=m.children(t.sidebar),v=m.children(t.pusher),m.children(t.fixed),k.clear.cache()},refreshSidebars:function(){k.verbose("Refreshing other sidebars"),h=m.children(t.sidebar)},repaint:function(){k.verbose("Forcing repaint event"),b.style.display="none";b.offsetHeight;b.scrollTop=b.scrollTop,b.style.display=""},setup:{cache:function(){k.cache={width:p.outerWidth(),height:p.outerHeight()}},layout:function(){0===m.children(t.pusher).length&&(k.debug("Adding wrapper element for sidebar"),k.error(u.pusher),v=H('<div class="pusher" />'),m.children().not(t.omitted).not(h).wrapAll(v),k.refresh()),0!==p.nextAll(t.pusher).length&&p.nextAll(t.pusher)[0]===v[0]||(k.debug("Moved sidebar to correct parent element"),k.error(u.movedSidebar,b),p.detach().prependTo(m),k.refresh()),k.clear.cache(),k.set.pushable(),k.set.direction()}},attachEvents:function(e,t){var n=H(e);t=H.isFunction(k[t])?k[t]:k.toggle,0<n.length?(k.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):k.error(u.notFound,e)},can:{leftBodyScrollbar:function(){return k.cache.leftBodyScrollbar===z&&(k.cache.leftBodyScrollbar=k.is.rtl()&&(k.is.iframe&&!k.is.firefox()||k.is.safari()||k.is.edge()||k.is.ie())),k.cache.leftBodyScrollbar}},save:{bodyMargin:function(){x=m.css((g?"margin-":"padding-")+(k.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(x.replace(/[^\d.]/g,"")),t=g?N.innerWidth-V.documentElement.clientWidth:m[0].offsetWidth-m[0].clientWidth;w=e+t}},show:function(e){if(e=H.isFunction(e)?e:function(){},k.is.hidden())if(!1===l.onShow.call(b))k.verbose("Show callback returned false cancelling show");else{if(k.refreshSidebars(),l.overlay&&(k.error(u.overlay),l.transition="overlay"),k.refresh(),k.othersActive())if(k.debug("Other sidebars currently visible"),l.exclusive){if("overlay"!=l.transition)return void k.hideOthers(k.show);k.hideOthers()}else l.transition="overlay";k.pushPage(function(){e.call(b),l.onVisible.call(b)}),l.onChange.call(b)}else k.debug("Sidebar is already visible")},hide:function(e){e=H.isFunction(e)?e:function(){},(k.is.visible()||k.is.animating())&&!1!==l.onHide.call(b)&&(k.debug("Hiding sidebar",e),k.refreshSidebars(),k.pullPage(function(){e.call(b),l.onHidden.call(b)}),l.onChange.call(b))},othersAnimating:function(){return 0<h.not(p).filter("."+c.animating).length},othersVisible:function(){return 0<h.not(p).filter("."+c.visible).length},othersActive:function(){return k.othersVisible()||k.othersAnimating()},hideOthers:function(e){var t=h.not(p).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){k.verbose("Determining toggled direction"),k.is.hidden()?k.show():k.hide()},pushPage:function(t){var e,n,i=k.get.transition(),a="overlay"===i||k.othersActive()?p:v;t=H.isFunction(t)?t:function(){},l.returnScroll&&(r=(g?S:m).scrollTop()),"scale down"===l.transition&&k.scrollToTop(),k.bind.scrollLock(),k.set.transition(i),k.repaint(),i=function(){k.bind.clickaway(),k.add.inlineCSS(),k.set.animating(),k.set.visible()},e=function(){k.set.dimmed()},n=function(e){e.target==a[0]&&(a.off(s+o,n),k.remove.animating(),t.call(b))},a.off(s+o),a.on(s+o,n),j(i),l.dimPage&&!k.othersVisible()&&j(e)},pullPage:function(t){var e,n,i=k.get.transition(),a="overlay"==i||k.othersActive()?p:v;t=H.isFunction(t)?t:function(){},k.verbose("Removing context push state",k.get.direction()),k.unbind.clickaway(),k.unbind.scrollLock(),e=function(){k.set.transition(i),k.set.animating(),k.remove.visible(),l.dimPage&&!k.othersVisible()&&v.removeClass(c.dimmed)},n=function(e){e.target==a[0]&&(a.off(s+o,n),k.remove.animating(),k.remove.transition(),k.remove.inlineCSS(),"scale down"!==i&&!l.returnScroll||k.scrollBack(),t.call(b))},a.off(s+o),a.on(s+o,n),j(e)},scrollToTop:function(){k.verbose("Scrolling to top of page to avoid animation issues"),p.scrollTop(0),(g?S:m)[0].scrollTo(0,0)},scrollBack:function(){k.verbose("Scrolling back to original page position"),(g?S:m)[0].scrollTo(0,r)},clear:{cache:function(){k.verbose("Clearing cached dimensions"),k.cache={}}},set:{bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";m.css((g?"margin-":"padding-")+n,w+"px"),m.find(t.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+w+"px)")})},ios:function(){F.addClass(c.ios)},pushed:function(){m.addClass(c.pushed)},pushable:function(){m.addClass(c.pushable)},dimmed:function(){v.addClass(c.dimmed)},active:function(){p.addClass(c.active)},animating:function(){p.addClass(c.animating)},transition:function(e){e=e||k.get.transition(),p.addClass(e)},direction:function(e){e=e||k.get.direction(),p.addClass(c[e])},visible:function(){p.addClass(c.visible)},overlay:function(){p.addClass(c.overlay)}},remove:{inlineCSS:function(){k.debug("Removing inline css styles",a),a&&0<a.length&&a.remove()},ios:function(){F.removeClass(c.ios)},pushed:function(){m.removeClass(c.pushed)},pushable:function(){m.removeClass(c.pushable)},active:function(){p.removeClass(c.active)},animating:function(){p.removeClass(c.animating)},transition:function(e){e=e||k.get.transition(),p.removeClass(e)},direction:function(e){e=e||k.get.direction(),p.removeClass(c[e])},visible:function(){p.removeClass(c.visible)},overlay:function(){p.removeClass(c.overlay)}},restore:{bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";m.css((g?"margin-":"padding-")+n,x),m.find(t.bodyFixed.replace("right",n)).each(function(){var e=H(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},get:{direction:function(){return p.hasClass(c.top)?c.top:p.hasClass(c.right)?c.right:p.hasClass(c.bottom)?c.bottom:c.left},transition:function(){var e=k.get.direction(),e=k.is.mobile()?"auto"==l.mobileTransition?l.defaultTransition.mobile[e]:l.mobileTransition:"auto"==l.transition?l.defaultTransition.computer[e]:l.transition;return k.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=V.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==z)return n[e]}},has:{scrollbar:function(){return g||"hidden"!==m.css("overflow-y")}},is:{safari:function(){return k.cache.isSafari===z&&(k.cache.isSafari=/constructor/i.test(N.HTMLElement)||!!N.ApplePaySession),k.cache.isSafari},edge:function(){return k.cache.isEdge===z&&(k.cache.isEdge=!!N.setImmediate&&!k.is.ie()),k.cache.isEdge},firefox:function(){return k.cache.isFirefox===z&&(k.cache.isFirefox=!!N.InstallTrigger),k.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return k.cache.isIE===z&&(e=!N.ActiveXObject&&"ActiveXObject"in N,t="ActiveXObject"in N,k.cache.isIE=e||t),k.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(i.ios),n=e.match(i.mobileChrome);return!(!t||n)&&(k.verbose("Browser was found to be iOS",e),!0)},mobile:function(){var e=navigator.userAgent;return e.match(i.mobile)?(k.verbose("Browser was found to be mobile",e),!0):(k.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!k.is.visible()},visible:function(){return p.hasClass(c.visible)},open:function(){return k.is.visible()},closed:function(){return k.is.hidden()},vertical:function(){return p.hasClass(c.top)},animating:function(){return m.hasClass(c.animating)},rtl:function(){return k.cache.isRTL===z&&(k.cache.isRTL="rtl"===p.attr("dir")||"rtl"===p.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===m.attr("dir")||"rtl"===m.css("direction")),k.cache.isRTL}},setting:function(e,t){if(k.debug("Changing setting",e,t),H.isPlainObject(e))H.extend(!0,l,e);else{if(t===z)return l[e];H.isPlainObject(l[e])?H.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(H.isPlainObject(e))H.extend(!0,k,e);else{if(t===z)return k[e];k[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,l.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),k.verbose.apply(console,arguments)))},error:function(){l.silent||(k.error=Function.prototype.bind.call(console.error,console,l.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(P||t),P=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=l.name+":",n=0;P=!1,clearTimeout(k.performance.timer),H.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),(console.group!==z||console.table!==z)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):H.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var a,o,n,r=y;return e=e||q,t=t||b,"string"==typeof i&&r!==z&&(i=i.split(/[\. ]/),a=i.length-1,H.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(H.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==z)return o=r[n],!1;{if(!H.isPlainObject(r[t])||e==a)return r[t]!==z?o=r[t]:k.error(u.method,i),!1;r=r[t]}}})),H.isFunction(o)?n=o.apply(t,e):o!==z&&(n=o),Array.isArray(D)?D.push(n):D!==z?D=[D,n]:n!==z&&(D=n),o}};L?(y===z&&k.initialize(),k.invoke(R)):(y!==z&&k.invoke("destroy"),k.initialize())}),D!==z?D:this},H.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,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",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(M,O,P,I){"use strict";M.isWindow=M.isWindow||function(e){return null!=e&&e===e.window},M.isFunction=M.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.fn.tab=function(l){var c,u=M.isFunction(this)?M(O):M(this),d=u.selector||"",f=(new Date).getTime(),D=[],S=l,A="string"==typeof S,E=[].slice.call(arguments,1),F=!1;return u.each(function(){var p,a,m,g,h,v=M.isPlainObject(l)?M.extend(!0,{},M.fn.tab.settings,l):M.extend({},M.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,x=v.error,n=v.regExp,e="."+v.namespace,i="module-"+v.namespace,w=M(this),o={},C=!0,r=0,k=this,s=w.data(i),T={initialize:function(){T.debug("Initializing tab menu item",w),T.fix.callbacks(),T.determineTabs(),T.debug("Determining tabs",v.context,a),v.auto&&T.set.auto(),T.bind.events(),v.history&&!F&&(T.initializeHistory(),F=!0);var e,t=T.determine.activeTab();v.autoTabActivation&&s===I&&null==t&&(t=!0===v.autoTabActivation?T.get.initialPath():v.autoTabActivation,T.debug("No active tab detected, setting tab active",t),T.changeTab(t)),null!=t&&v.history&&(e=M.address.autoUpdate(),M.address.autoUpdate(!1),M.address.value(t),M.address.autoUpdate(e)),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),s=T,w.data(i,T)},destroy:function(){T.debug("Destroying tabs",w),w.removeData(i).off(e)},bind:{events:function(){M.isWindow(k)||(T.debug("Attaching tab activation events to element",w),w.on("click"+e,T.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<w.closest(t.ui).length?(e=w.closest(t.ui),T.verbose("Using closest UI element as parent",e)):e=w,p=e.parent(),T.verbose("Determined parent element for creating context",p)):v.context?(p=[O,P].indexOf(v.context)<0?M(P).find(v.context):M(v.context),T.verbose("Using selector for tab context",v.context,p)):p=M("body"),v.childrenOnly?(a=p.children(t.tabs),T.debug("Searching tab context children for tabs",p,a)):(a=p.find(t.tabs),T.debug("Searching tab context for tabs",p,a))},fix:{callbacks:function(){M.isPlainObject(l)&&(l.onTabLoad||l.onTabInit)&&(l.onTabLoad&&(l.onLoad=l.onTabLoad,delete l.onTabLoad,T.error(x.legacyLoad,l.onLoad)),l.onTabInit&&(l.onFirstLoad=l.onTabInit,delete l.onTabInit,T.error(x.legacyInit,l.onFirstLoad)),v=M.extend(!0,{},M.fn.tab.settings,l))}},initializeHistory:function(){if(T.debug("Initializing page state"),M.address===I)return T.error(x.state),!1;if("state"==v.historyType){if(T.debug("Using HTML5 to manage state"),!1===v.path)return T.error(x.path),!1;M.address.history(!0).state(v.path),M(O).trigger("popstate")}M.address.bind("change",T.event.history.change)},event:{click:function(e){var t=M(this).data(y.tab);t!==I?(v.history?(T.verbose("Updating page state",e),M.address.value(t)):(T.verbose("Changing tab",e),T.changeTab(t)),e.preventDefault()):T.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||T.get.initialPath(),n=v.templates.determineTitle(t)||!1;T.performance.display(),T.debug("History change event",t,e),h=e,t!==I&&T.changeTab(t),n&&M.address.title(n)}}},refresh:function(){m&&(T.debug("Refreshing tab",m),T.changeTab(m))},cache:{read:function(e){return e!==I&&o[e]},add:function(e,t){e=e||m,T.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||m,T.debug("Removing cached content for",e),delete o[e]}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";T.verbose("Setting up automatic tab retrieval from server",e),M.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=T.get.tabElement(e);t.hasClass(b.loading)||(T.verbose("Setting loading state for",t),t.addClass(b.loading).siblings(a).removeClass(b.active+" "+b.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){M.address.value(e)}},changeTab:function(c){var u=O.history&&O.history.pushState&&v.ignoreFirstLoad&&C,d=v.auto||M.isPlainObject(v.apiSettings),f=d&&!u?T.utilities.pathToArray(c):T.get.defaultPathArray(c);c=T.utilities.arrayToPath(f),M.each(f,function(e,t){var n,i,a=f.slice(0,e+1),o=T.utilities.arrayToPath(a),r=T.is.tab(o),s=e+1==f.length,l=T.get.tabElement(o);return T.verbose("Looking for tab",t),r?(T.verbose("Tab was found",t),m=o,g=T.utilities.filterArray(f,a),s?i=!0:(r=f.slice(0,e+2),t=T.utilities.arrayToPath(r),(i=!T.is.tab(t))&&T.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(k,o)?(T.debug("onBeforeChange returned false, cancelling tab change",l),!1):i&&d?(u?(T.debug("Ignoring remote content on first tab load",o),C=!1,T.cache.add(c,l.html()),T.activate.all(o),v.onFirstLoad.call(l[0],o,g,h),v.onLoad.call(l[0],o,g,h)):(T.activate.navigation(o),T.fetch.content(o,c)),!1):(T.debug("Opened local tab",o),T.activate.all(o),T.cache.read(o)||(T.cache.add(o,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],o,g,h)),void v.onLoad.call(l[0],o,g,h))):-1!=c.search("/")||""===c?(T.error(x.missingTab,w,p,o),!1):(c=T.escape.string(c),o=(n=M("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=T.get.tabElement(o),n&&0<n.length&&o?(T.debug("Anchor link used, opening parent tab",l,n),!1===v.onBeforeChange.call(k,o)?T.debug("onBeforeChange returned false, cancelling tab change",l):(l.hasClass(b.active)||setTimeout(function(){T.scrollTo(n)},0),T.activate.all(o),T.cache.read(o)||(T.cache.add(o,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],o,g,h)),v.onLoad.call(l[0],o,g,h)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(T.debug("Forcing scroll to an in-page link in a hidden tab",t,e),M(P).scrollTop(t))},update:{content:function(e,t,n){var i=T.get.tabElement(e),a=i[0];n=n!==I?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(M(t).clone(!0)):n?(T.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(T.debug("Updating HTML",e,t),a.innerHTML=t)}},fetch:{content:function(t,n){var e,i=T.get.tabElement(t),a={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&T.cache.add(n,e),T.update.content(t,e),t==m?(T.debug("Content loaded",t),T.activate.tab(t)):T.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,g,h),v.onLoad.call(i[0],t,g,h),v.loadOnce?T.cache.add(n,!0):"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=(e=i.children().clone(!0)).not("script");T.cache.add(n,e)},0):T.cache.add(n,i.html())},urlData:{tab:n}},o=i.api("get request")||!1,o=o&&"pending"===o.state();n=n||t,e=T.cache.read(n),v.cache&&e?(T.activate.tab(t),T.debug("Adding cached content",n),v.loadOnce||("once"==v.evaluateScripts?T.update.content(t,e,!1):T.update.content(t,e)),v.onLoad.call(i[0],t,g,h)):o?(T.set.loading(t),T.debug("Content is already loading",n)):M.api!==I?(e=M.extend(!0,{},v.apiSettings,a),T.debug("Retrieving remote content",n,e),T.set.loading(t),i.api(e)):T.error(x.api)}},activate:{all:function(e){T.activate.tab(e),T.activate.navigation(e)},tab:function(e){var t=T.get.tabElement(e),n="siblings"==v.deactivate?t.siblings(a):a.not(t),i=t.hasClass(b.active);T.verbose("Showing tab content for",t),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=T.get.navElement(e),n="siblings"==v.deactivate?t.siblings(u):u.not(t),i=t.hasClass(b.active);T.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){T.deactivate.navigation(),T.deactivate.tabs()},navigation:function(){u.removeClass(b.active)},tabs:function(){a.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return e!==I&&0<T.get.tabElement(e).length}},get:{initialPath:function(){return u.eq(0).data(y.tab)||a.eq(0).data(y.tab)},path:function(){return M.address.value()},defaultPathArray:function(e){return T.utilities.pathToArray(T.get.defaultPath(e))},defaultPath:function(e){var t=u.filter("[data-"+y.tab+'^="'+T.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(T.debug("Found default tab",t),r<v.maxDepth)return r++,T.get.defaultPath(t);T.error(x.recursion)}else T.debug("No default tabs found for",e,a);return r=0,e},navElement:function(e){return e=e||m,u.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||m,t=T.utilities.pathToArray(e),t=T.utilities.last(t),e=a.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]'),t=a.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return m}},determine:{activeTab:function(){var n=null;return a.each(function(e,t){M(t).hasClass(b.active)&&(t=M(this).data(y.tab),u.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]').hasClass(b.active)&&(n=t))}),n}},utilities:{filterArray:function(e,t){return M.grep(e,function(e){return-1==M.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===I?m:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(T.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,v,e);else{if(t===I)return v[e];M.isPlainObject(v[e])?M.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,T,e);else{if(t===I)return T[e];T[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,v.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),T.verbose.apply(console,arguments)))},error:function(){v.silent||(T.error=Function.prototype.bind.call(console.error,console,v.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(f||t),f=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=v.name+":",n=0;f=!1,clearTimeout(T.performance.timer),M.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",d&&(e+=" '"+d+"'"),(console.group!==I||console.table!==I)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):M.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var a,o,n,r=s;return e=e||E,t=t||k,"string"==typeof i&&r!==I&&(i=i.split(/[\. ]/),a=i.length-1,M.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==I)return o=r[n],!1;{if(!M.isPlainObject(r[t])||e==a)return r[t]!==I?o=r[t]:T.error(x.method,i),!1;r=r[t]}}})),M.isFunction(o)?n=o.apply(t,e):o!==I&&(n=o),Array.isArray(c)?c.push(n):c!==I?c=[c,n]:n!==I&&(c=n),o}};A?(s===I&&T.initialize(),T.invoke(S)):(s!==I&&s.invoke("destroy"),T.initialize())}),c!==I?c:this},M.tab=function(){M(O).tab.apply(this,arguments)},M.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(M,O,P,I){"use strict";M.isFunction=M.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.toast=M.fn.toast=function(C){var k,e=M(this),T=e.selector||"",D=(new Date).getTime(),S=[],A=C,E="string"==typeof A,F=[].slice.call(arguments,1);return e.each(function(){var n,i,o,a,r,s,l,e,c=M.isPlainObject(C)?M.extend(!0,{},M.fn.toast.settings,C):M.extend({},M.fn.toast.settings),u=c.className,d=c.selector,f=c.error,t=c.namespace,p=c.fields,m="."+t,g=t+"-module",h=M(this),v=c.context?[O,P].indexOf(c.context)<0?M(P).find(c.context):M(c.context):M("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),y=this,x=b?h.data(g):I,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(b||""!==c.message||""!==c.title||""!==w.get.iconClass()||c.showImage||w.has.configActions())&&("string"==typeof c.showProgress&&-1!==[u.top,u.bottom].indexOf(c.showProgress)||(c.showProgress=!1),w.create.toast(),c.closeOnClick&&(c.closeIcon||0<M(i).find(d.input).length||w.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(u.unclickable),w.bind.events()),w.instantiate(),n&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),x=w,h.data(g,x)},destroy:function(){n&&(w.debug("Removing toast",n),w.unbind.events(),n.remove(),s=i=n=I,c.onRemove.call(n,y),l=r=a=I),h.removeData(g)},show:function(e){!1===c.onShow.call(n,y)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===c.onHide.call(n,y)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),v.append(M("<div/>",{class:c.position+" "+u.container+" "+(c.horizontal?u.horizontal:"")+" "+(c.context&&"body"!==c.context?u.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){n=M("<div/>",{class:u.box});var e,t=w.get.iconClass();b?(i=c.cloneModule?h.clone().removeAttr("id"):h,l=i.find("> i"+w.helpers.toClass(u.close)),c.closeIcon=0<l.length,""!==t&&i.find(d.icon).attr("class",t+" "+u.icon),c.showImage&&i.find(d.image).attr("src",c.showImage),""!==c.title&&i.find(d.title).html(w.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(d.message).html(w.helpers.escape(c.message,c.preserveHTML))):(w.verbose("Creating toast"),i=M("<div/>",{role:"alert"}),e=M("<div/>",{class:u.content}),""!==t&&i.append(M("<i/>",{class:t+" "+u.icon})),c.showImage&&i.append(M("<img>",{class:u.image+" "+c.classImage,src:c.showImage})),""!==c.title&&(t="_"+w.get.id()+"title",i.attr("aria-labelledby",t),e.append(M("<div/>",{class:u.title,id:t,html:w.helpers.escape(c.title,c.preserveHTML)}))),t="_"+w.get.id()+"desc",i.attr("aria-describedby",t),e.append(M("<div/>",{class:u.message,id:t,html:w.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+u.toast).append(e),i.css("opacity",c.opacity),c.closeIcon&&((l=M("<i/>",{class:u.close+" "+("string"==typeof c.closeIcon?c.closeIcon:""),role:"button",tabindex:0,"aria-label":c.text.close})).hasClass(u.left)?i.prepend(l):i.append(l))),i.hasClass(u.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),o=i.find(".actions"),w.has.configActions()&&(0===o.length&&(o=M("<div/>",{class:u.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!o.hasClass(u.attached)&&(o.addClass(u.extraContent),o.hasClass(u.vertical)&&(o.removeClass(u.vertical),w.error(f.verticalCard))),c.actions.forEach(function(e){var t=e[p.icon]?"<i "+(e[p.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[p.icon])+' icon"></i>':"",n=w.helpers.escape(e[p.text]||"",c.preserveHTML),i=w.helpers.deQuote(e[p.class]||""),a=e[p.click]&&M.isFunction(e[p.click])?e[p.click]:function(){};o.append(M("<button/>",{html:t+n,"aria-label":(e[p.text]||e[p.icon]||"").replace(/<[^>]+(>|$)/g,""),class:u.button+" "+i,click:function(){var e=M(this);e.is(d.approve)||e.is(d.deny)||!1===a.call(y,h)||w.close()}}))})),o&&o.hasClass(u.vertical)&&i.addClass(u.vertical),0<o.length&&!o.hasClass(u.attached)&&(!o||o.hasClass(u.basic)&&!o.hasClass(u.left)||i.addClass(u.actions)),"auto"===c.displayTime&&(c.displayTime=Math.max(c.minDisplayTime,i.text().split(" ").length/c.wordsPerMinute*6e4)),n.append(i),0<o.length&&o.hasClass(u.attached)&&(o.addClass(u.buttons),o.detach(),i.addClass(u.attached),o.hasClass(u.vertical)?(i.wrap(M("<div/>",{class:u.vertical+" "+u.attached+" "+(c.compact?u.compact:"")})),o.hasClass(u.left)?i.addClass(u.left).parent().addClass(u.left).prepend(o):i.parent().append(o)):o.hasClass(u.top)?(n.prepend(o),i.addClass(u.bottom)):(n.append(o),i.addClass(u.top))),h!==i&&(y=(h=i)[0]),0<c.displayTime&&(t=u.progressing+" "+(c.pauseOnHover?u.pausable:""),c.showProgress&&(a=M("<div/>",{class:u.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(u.inverted)?a.addClass(u.inverted):a.removeClass(u.inverted)),r=M("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),a.addClass(c.showProgress).append(r),a.hasClass(u.top)?n.prepend(a):n.append(a),r.css("animation-duration",c.displayTime/1e3+"s")),(s=M("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(u.compact),i.addClass(u.compact),a&&a.addClass(u.compact)),c.newestOnTop?n.prependTo(w.get.container()):n.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),c.closeIcon&&l.on("click"+m,w.event.close),i.on("click"+m,w.event.click),s&&s.on("animationend"+m,w.event.close),n.on("click"+m,d.approve,w.event.approve).on("click"+m,d.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),c.closeIcon&&l.off("click"+m),i.off("click"+m),s&&s.off("animationend"+m),n.off("click"+m)}},animate:{show:function(e){e=M.isFunction(e)?e:function(){},c.transition&&w.can.useElement("transition")&&h.transition("is supported")&&(w.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,silent:c.silent,duration:c.transition.showDuration,onComplete:function(){e.call(n,y),c.onVisible.call(n,y)}}))},close:function(e){e=M.isFunction(e)?e:function(){},c.transition&&M.fn.transition!==I&&h.transition("is supported")?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,silent:c.silent,interval:50,onBeforeHide:function(e){e=M.isFunction(e)?e:function(){},""!==c.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(c.transition.closeDuration,c.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,y),c.onHidden.call(n,y),w.destroy()}}):w.error(f.noTransition)},pause:function(){s.css("animationPlayState","paused"),r&&r.css("animationPlayState","paused")},continue:function(){s.css("animationPlayState","running"),r&&r.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{id:function(){return e},containers:function(){return v.children(w.helpers.toClass(c.position)+d.container+(c.horizontal?w.helpers.toClass(u.horizontal):":not("+w.helpers.toClass(u.horizontal)+")")+(c.context&&"body"!==c.context?w.helpers.toClass(u.absolute):":not("+w.helpers.toClass(u.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return M(w.get.container()).find(d.box)},iconClass:function(){return"string"==typeof c.showIcon?c.showIcon:c.showIcon&&c.icons[c.class]?c.icons[c.class]:""},remainingTime:function(){return s?s.css("opacity")*c.displayTime:0}},set:{visible:function(){i.addClass(u.visible)}},remove:{visible:function(){i.removeClass(u.visible)}},event:{close:function(){w.close()},click:function(e){0===M(e.target).closest(d.clickable).length&&(!1!==c.onClick.call(n,y)&&c.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===c.onApprove.call(y,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===c.onDeny.call(y,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return M.fn[e]!==I||(w.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(w.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,c,e);else{if(t===I)return c[e];M.isPlainObject(c[e])?M.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,w,e);else{if(t===I)return w[e];w[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(D||t),D=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=c.name+":",n=0;D=!1,clearTimeout(w.performance.timer),M.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",T&&(e+=" '"+T+"'"),(console.group!==I||console.table!==I)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):M.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var a,o,n,r=x;return e=e||F,t=t||y,"string"==typeof i&&r!==I&&(i=i.split(/[\. ]/),a=i.length-1,M.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==I)return o=r[n],!1;{if(!M.isPlainObject(r[t])||e==a)return r[t]!==I?o=r[t]:w.error(f.method,i),!1;r=r[t]}}})),M.isFunction(o)?n=o.apply(t,e):o!==I&&(n=o),Array.isArray(k)?k.push(n):k!==I?k=[k,n]:n!==I&&(k=n),o}};E?(x===I&&w.initialize(),w.invoke(A)):(x!==I&&x.invoke("destroy"),w.initialize(),k=h)}),k!==I?k:this},M.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",absolute:"absolute",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"},text:{close:"Close"},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',clickable:"a, details, .ui.accordion",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(){}},M.extend(M.easing,{easeOutBounce:function(e,t,n,i,a){return(t/=a)<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,document),function(F,M,O,P){"use strict";F.isWindow=F.isWindow||function(e){return null!=e&&e===e.window},M=void 0!==M&&M.Math==Math?M:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.api=F.fn.api=function(w){var C,e=F.isFunction(this)?F(M):F(this),k=e.selector||"",T=(new Date).getTime(),D=[],S=w,A="string"==typeof S,E=[].slice.call(arguments,1);return e.each(function(){var o,i,n,e,r,a,f=F.isPlainObject(w)?F.extend(!0,{},F.fn.api.settings,w):F.extend({},F.fn.api.settings),t=f.namespace,s=f.metadata,l=f.selector,c=f.error,u=f.className,d="."+t,p="module-"+t,m=F(this),g=m.closest(l.form),h=f.stateContext?[M,O].indexOf(f.stateContext)<0?F(O).find(f.stateContext):F(f.stateContext):m,v=this,b=h[0],y=m.data(p),x={initialize:function(){A||(a=f.data,x.bind.events()),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),y=x,m.data(p,y)},destroy:function(){x.verbose("Destroying previous module for",v),m.removeData(p).off(d)},bind:{events:function(){var e=x.get.event();e?(x.verbose("Attaching API events to element",e),m.on(e+d,x.event.trigger)):"now"==f.on&&(x.debug("Querying API endpoint immediately"),x.query())}},decode:{json:function(e){if(e!==P&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(M.Storage!==P)return t=sessionStorage.getItem(e+x.get.normalizedData()),x.debug("Using cached response",e,f.data,t),x.decode.json(t);x.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?x.debug("Response empty, not caching",t):M.Storage===P?x.error(c.noStorage):(F.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+x.get.normalizedData(),t),x.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(x.is.disabled())x.debug("Element is disabled API request aborted");else{if(x.is.loading()){if(!f.interruptRequests)return void x.debug("Cancelling request, previous request is still pending");x.debug("Interrupting previous request"),x.abort()}f.defaultData&&F.extend(!0,f.urlData,x.get.defaultData()),f.serializeForm&&(f.data=x.add.formData(a||f.data)),!1===(i=x.get.settings())?(x.cancelled=!0,x.error(c.beforeSend)):(x.cancelled=!1,(n=x.get.templatedURL())||x.is.mocked()?((n=x.add.urlData(n))||x.is.mocked())&&(i.url=f.base+n,o=F.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+n,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),x.debug("Querying URL",o.url),x.verbose("Using AJAX settings",o),"local"===f.cache&&x.read.cachedResponse(n)?(x.debug("Response returned from local cache"),x.request=x.create.request(),x.request.resolveWith(b,[x.read.cachedResponse(n)])):f.throttle?f.throttleFirstRequest||x.timer?(x.debug("Throttling request",f.throttle),clearTimeout(x.timer),x.timer=setTimeout(function(){x.timer&&delete x.timer,x.debug("Sending throttled request",e,o.method),x.send.request()},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request(),x.timer=setTimeout(function(){},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request())):x.error(c.missingURL))}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!x.is.form()}},is:{disabled:function(){return 0<m.filter(l.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return m.is("form")||h.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return m.is("input")},loading:function(){return!!x.request&&"pending"==x.request.state()},abortedRequest:function(e){return e&&e.readyState!==P&&0===e.readyState?(x.verbose("XHR request determined to be aborted"),!0):(x.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return x.is.expectingJSON()&&F.isFunction(f.successTest)?(x.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(x.debug("Response passed success test",e),!0):(x.debug("Response failed success test",e),!1)):(x.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return x.cancelled||!1},successful:function(){return x.request&&"resolved"==x.request.state()},failure:function(){return x.request&&"rejected"==x.request.state()},complete:function(){return x.request&&("resolved"==x.request.state()||"rejected"==x.request.state())}},add:{urlData:function(a,o){var e,t;return a&&(e=a.match(f.regExp.required),t=a.match(f.regExp.optional),o=o||f.urlData,e&&(x.debug("Looking for required URL variables",e),F.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),i=F.isPlainObject(o)&&o[n]!==P?o[n]:m.data(n)!==P?m.data(n):h.data(n)!==P?h.data(n):o[n];if(i===P)return x.error(c.requiredParameter,n,a),a=!1;x.verbose("Found required variable",n,i),i=f.encodeParameters?x.get.urlEncodedValue(i):i,a=a.replace(t,i)})),t&&(x.debug("Looking for optional URL variables",e),F.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),i=F.isPlainObject(o)&&o[n]!==P?o[n]:m.data(n)!==P?m.data(n):h.data(n)!==P?h.data(n):o[n];a=i!==P?(x.verbose("Optional variable Found",n,i),a.replace(t,i)):(x.verbose("Optional variable not found",n),-1!==a.indexOf("/"+t)?a.replace("/"+t,""):a.replace(t,""))}))),a},formData:function(n){var e,i,l,c,u,d={},t="formdata"===f.serializeForm;return n=n||a||f.data,e=F.isPlainObject(n),t?(d=new FormData(g[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(i=g.serializeArray(),l={},c={},u=function(e,t,n){return e[t]=n,e},F.each(F('input[type="file"]',g),function(e,n){F.each(F(n)[0].files,function(e,t){i.push({name:n.name,value:t})})}),F.each(i,function(e,t){if(f.regExp.validate.test(t.name)){var n,i="checkbox"===F('[name="'+t.name+'"]',g).attr("type"),a=parseFloat(t.value),o=i&&"on"===t.value||"true"===t.value||(String(a)===t.value?a:"false"!==t.value&&t.value),r=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[\]$/,"");s in l?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(l[s]=0,c[s]=o),o=c[s];for(;(n=r.pop())!==P;)""!=n||Array.isArray(o)?f.regExp.fixed.test(n)?o=u([],n,o):f.regExp.named.test(n)&&(o=u({},n,o)):o=u([],l[s]++,o);d=F.extend(!0,d,o)}})),n=e?(x.debug("Extending existing data with form data",n,d),t?(F.each(Object.keys(n),function(e,t){d.append(t,n[t])}),d):F.extend(!0,{},n,d)):(x.debug("Adding form data",d),d)}},send:{request:function(){x.set.loading(),x.request=x.create.request(),x.is.mocked()?x.mockedXHR=x.create.mockedXHR():x.xhr=x.create.xhr(),f.onRequest.call(b,x.request,x.xhr)}},event:{trigger:function(e){x.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,a=(new Date).getTime()-r,a=f.loadingDuration-a,o=!!F.isFunction(f.onResponse)&&(x.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(i,F.extend(!0,{},e)):f.onResponse.call(i,e)),a=0<a?a:0;o&&(x.debug("Modified API response in onResponse callback",f.onResponse,o,e),e=o),0<a&&x.debug("Response completed early delaying state change by",a),setTimeout(function(){x.is.validResponse(e)?x.request.resolveWith(i,[e,n]):x.request.rejectWith(i,[n,"invalid"])},a)},fail:function(e,t,n){var i=this,a=(new Date).getTime()-r,a=f.loadingDuration-a;0<(a=0<a?a:0)&&x.debug("Response completed early delaying state change by",a),setTimeout(function(){x.is.abortedRequest(e)?x.request.rejectWith(i,[e,"aborted",n]):x.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){x.debug("Successful API Response",e),"local"===f.cache&&n&&(x.write.cachedResponse(n,e),x.debug("Saving server response locally",x.cache)),f.onSuccess.call(b,e,m,t)},complete:function(e,t){var n,i;x.was.successful()?(i=e,n=t):i=x.get.responseFromXHR(n=e),x.remove.loading(),f.onComplete.call(b,i,m,n)},fail:function(e,t,n){var i=x.get.responseFromXHR(e),a=x.get.errorFromRequest(i,t,n);if("aborted"==t)return x.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),f.onAbort.call(b,t,m,e),!0;"invalid"==t?x.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==P&&(x.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==P&&""!==n&&x.error(c.statusMessage+n,o.url),f.onError.call(b,a,m,e)),f.errorDuration&&"aborted"!==t&&(x.debug("Adding error state"),x.set.error(),x.should.removeError()&&setTimeout(x.remove.error,f.errorDuration)),x.debug("API Request failed",a,e),f.onFailure.call(b,i,m,e)}}},create:{request:function(){return F.Deferred().always(x.event.request.complete).done(x.event.request.done).fail(x.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,n=F.Deferred().always(x.event.xhr.complete).done(x.event.xhr.done).fail(x.event.xhr.fail);return e?(e=F.isFunction(e)?(x.debug("Using specified synchronous callback",e),e.call(b,i)):(x.debug("Using settings specified response",e),e),n.resolveWith(b,[e,!1,{responseText:e}])):F.isFunction(t)&&(e=function(e){x.debug("Async callback returned response",e),e?n.resolveWith(b,[e,!1,{responseText:e}]):n.rejectWith(b,[{responseText:e},!1,!1])},x.debug("Using specified async response callback",t),t.call(b,i,e)),n},xhr:function(){var e=F.ajax(o).always(x.event.xhr.always).done(x.event.xhr.done).fail(x.event.xhr.fail);return x.verbose("Created server request",e,o),e}},set:{error:function(){x.verbose("Adding error state to element",h),h.addClass(u.error)},loading:function(){x.verbose("Adding loading state to element",h),h.addClass(u.loading),r=(new Date).getTime()}},remove:{error:function(){x.verbose("Removing error state from element",h),h.removeClass(u.error)},loading:function(){x.verbose("Removing loading state from element",h),h.removeClass(u.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!F.isPlainObject(e)&&(x.is.expectingJSON()?x.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return F.isPlainObject(e)&&e.error!==P?e.error:f.error[t]!==P?f.error[t]:n},request:function(){return x.request||!1},xhr:function(){return x.xhr||!1},settings:function(){var e=f.beforeSend.call(m,f);return e&&(e.success!==P&&(x.debug("Legacy success callback detected",e),x.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==P&&(x.debug("Legacy failure callback detected",e),x.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==P&&(x.debug("Legacy complete callback detected",e),x.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===P&&x.error(c.noReturnedValue),!1===e?e:e!==P?F.extend(!0,{},e):F.extend(!0,{},f)},urlEncodedValue:function(e){var t=M.decodeURIComponent(e),n=M.encodeURIComponent(e);return t!==e?(x.debug("URL value is already encoded, avoiding double encoding",e),e):(x.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return F.isWindow(v)||(x.is.input()?e.value=m.val():x.is.form()||(e.text=m.text())),e},event:function(){return F.isWindow(v)||"now"==f.on?(x.debug("API called without element, no events attached"),!1):"auto"==f.on?m.is("input")?v.oninput!==P?"input":v.onpropertychange!==P?"propertychange":"keyup":m.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||m.data(s.action)||f.action||!1,n=m.data(s.url)||f.url||!1)x.debug("Using specified url",n);else if(e){if(x.debug("Looking up url for action",e,f.api),f.api[e]===P&&!x.is.mocked())return void x.error(c.missingAction,f.action,f.api);n=f.api[e]}else x.is.form()&&(n=m.attr("action")||h.attr("action")||!1,x.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=x.get.xhr();e&&"resolved"!==e.state()&&(x.debug("Cancelling API request"),e.abort())},reset:function(){x.remove.error(),x.remove.loading()},setting:function(e,t){if(x.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,f,e);else{if(t===P)return f[e];F.isPlainObject(f[e])?F.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,x,e);else{if(t===P)return x[e];x[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,f.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),x.verbose.apply(console,arguments)))},error:function(){f.silent||(x.error=Function.prototype.bind.call(console.error,console,f.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=f.name+":",n=0;T=!1,clearTimeout(x.performance.timer),F.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),(console.group!==P||console.table!==P)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):F.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var a,o,n,r=y;return e=e||E,t=t||v,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),a=i.length-1,F.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==P)return o=r[n],!1;{if(!F.isPlainObject(r[t])||e==a)return r[t]!==P?o=r[t]:x.error(c.method,i),!1;r=r[t]}}})),F.isFunction(o)?n=o.apply(t,e):o!==P&&(n=o),Array.isArray(C)?C.push(n):C!==P?C=[C,n]:n!==P&&(C=n),o}};A?(y===P&&x.initialize(),x.invoke(S)):(y!==P&&y.invoke("destroy"),x.initialize())}),C!==P?C:this},F.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:!0,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",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]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(w,e,C,k){"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 p,r=w(this),m=r.selector||"",g=(new Date).getTime(),h=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),x="string"==typeof b;return r.each(function(n){var l,s,t,c,i,a,e,o,u=w(this),d=this,f={initialize:function(){l=f.get.settings.apply(d,v),c=l.className,t=l.error,i=l.metadata,o="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||f,a=f.get.animationEndEvent(),!1===(x=x&&f.invoke(b))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),s=f,u.data(e,s)},destroy:function(){f.verbose("Destroying previous module for",d),u.removeData(e)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){f.verbose("Repainting element");d.offsetWidth},delay:function(e){var t=(t=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");e=e!==k?e:l.interval,t="auto"==l.reverse&&t==c.outward||!0===l.reverse?(r.length-n)*e:n*e,f.debug("Delaying animation by",t),setTimeout(f.animate,t)},animate:function(e){if(l=e||l,!f.is.supported())return f.error(t.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),s.complete()}f.can.animate()?f.set.animating(l.animation):f.error(t.noAnimation,l.animation,d)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(e){f.debug("Queueing animation of",e),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(e){e&&e.target===d&&e.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(d)))},force:{visible:function(){var e=u.attr("style"),e=f.get.userStyle(e),t=f.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)?(f.remove.transition(),!1):(f.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===k||""===e;"none"===t||f.is.hidden()?e&&u.removeAttr("style"):(f.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){f.remove.completeCallback(),e=e||l.animation;e=f.get.animationClass(e);f.save.animation(e),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(f.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||f.get.direction())==c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.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||f.get.animationClass(),f.debug("Starting tween",e),u.addClass(e).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(d)}},save:{animation:function(e){f.cache||(f.cache={}),f.cache.animation=e},displayType:function(e){"none"!==e&&u.data(i.displayType,e)},transitionExists:function(e,t){w.fn.transition.exists[e]=t,f.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=f.get.currentAnimation();e&&(u.removeClass(e),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var e=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},e+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.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=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+t+e},currentAnimation:function(){return!(!f.cache||f.cache.animation===k)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.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===k||e)&&u.data(i.displayType)===k&&(""===(e=u.css("display"))||"none"===e?f.can.transition(!0):f.save.displayType(e)),u.data(i.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]!==k)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]!==k)return n[e];return!1}},can:{transition:function(e){var t,n,i,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===k||e){if(f.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=w("<"+t+" />").addClass(e).insertAfter(u)).addClass(o).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),t.detach().insertAfter(u),i=t.addClass(c.inward).css("animationName"),s||(t.detach().insertAfter(u),s=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),t.remove(),n!=i)f.debug("Direction exists for animation",o),a=!0;else{if("none"==n||!n)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==k?r:a},animate:function(){return f.can.transition()!==k}},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!==a}},hide:function(){if(!1===l.onHide.call(d))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),d.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(d,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(d),l.onComplete.call(d)},show:function(e){f.force.visible()&&!1!==l.onShow.call(d)&&(f.verbose("Showing element",e),f.remove.hidden(),l.onBeforeShow.call(d,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(d),l.onComplete.call(d)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(e,t){if(f.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,l,e);else{if(t===k)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,f,e);else{if(t===k)return f[e];f[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(g||t),g=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=l.name+":",n=0;g=!1,clearTimeout(f.performance.timer),w.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",m&&(e+=" '"+m+"'"),1<r.length&&(e+=" ("+r.length+")"),(console.group!==k||console.table!==k)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):w.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(i,e,t){var a,o,n,r=s;return e=e||y,t=t||d,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),a=i.length-1,w.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(w.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==k)return o=r[n],!1;{if(!w.isPlainObject(r[t])||e==a)return r[t]!==k&&(o=r[t]),!1;r=r[t]}}})),w.isFunction(o)?n=o.apply(t,e):o!==k&&(n=o),Array.isArray(p)?p.push(n):p!==k?p=[p,n]:n!==k&&(p=n),o!==k&&o}};f.initialize()}),p!==k?p: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(){},onBeforeShow:function(e){e.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(e){e.call(this)},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 suppress 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); |