text:  /*
   * # Fomantic UI - 2.8.4
   * https://github.com/fomantic/Fomantic-UI
   * http://fomantic-ui.com/
   *
   * Copyright 2014 Contributors
   * Released under the MIT license
   * http://opensource.org/licenses/MIT
   *
   */
  !function(m,h,b,v){m.isFunction=m.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m.site=m.fn.site=function(e){var s,c,i=(new Date).getTime(),o=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),u=m.isPlainObject(e)?m.extend(!0,{},m.site.settings,e):m.extend({},m.site.settings),a=u.namespace,d=u.error,r="module-"+a,f=m(b),p=this,g=f.data(r);return s={initialize:function(){s.instantiate()},instantiate:function(){s.verbose("Storing instance of site",s),g=s,f.data(r,s)},normalize:function(){s.fix.console(),s.fix.requestAnimationFrame()},fix:{console:function(){s.debug("Normalizing window.console"),console!==v&&console.log!==v||(s.verbose("Console not available, normalizing events"),s.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(s.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(s.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){s.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){s.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===v&&(s.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 m.fn[e]!==v&&m.fn[e].settings!==v},enabled:{modules:function(e){var n=[];return e=e||u.modules,m.each(e,function(e,t){s.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||u.modules,m.each(e,function(e,t){s.moduleExists(t)||n.push(t)}),n}},change:{setting:function(o,a,e,r){e="string"==typeof e?"all"===e?u.modules:[e]:e||u.modules,r=r===v||r,m.each(e,function(e,t){var n,i=!s.moduleExists(t)||(m.fn[t].settings.namespace||!1);s.moduleExists(t)&&(s.verbose("Changing default setting",o,a,t),m.fn[t].settings[o]=a,r&&i&&0<(n=m(":data(module-"+i+")")).length&&(s.verbose("Modifying existing settings",n),n[t]("setting",o,a)))})},settings:function(i,e,o){e="string"==typeof e?[e]:e||u.modules,o=o===v||o,m.each(e,function(e,t){var n;s.moduleExists(t)&&(s.verbose("Changing default setting",i,t),m.extend(!0,m.fn[t].settings,i),o&&a&&0<(n=m(":data(module-"+a+")")).length&&(s.verbose("Modifying existing settings",n),n[t]("setting",i)))})}},enable:{console:function(){s.console(!0)},debug:function(e,t){e=e||u.modules,s.debug("Enabling debug for modules",e),s.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||u.modules,s.debug("Enabling verbose debug for modules",e),s.change.setting("verbose",!0,e,t)}},disable:{console:function(){s.console(!1)},debug:function(e,t){e=e||u.modules,s.debug("Disabling debug for modules",e),s.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||u.modules,s.debug("Disabling verbose debug for modules",e),s.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(g.cache.console===v)return void s.error(d.console);s.debug("Restoring console function"),h.console=g.cache.console}else s.debug("Disabling console function"),g.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(){s.verbose("Destroying previous site for",f),f.removeData(r)},cache:{},setting:function(e,t){if(m.isPlainObject(e))m.extend(!0,u,e);else{if(t===v)return u[e];u[e]=t}},internal:function(e,t){if(m.isPlainObject(e))m.extend(!0,s,e);else{if(t===v)return s[e];s[e]=t}},debug:function(){u.debug&&(u.performance?s.performance.log(arguments):(s.debug=Function.prototype.bind.call(console.info,console,u.name+":"),s.debug.apply(console,arguments)))},verbose:function(){u.verbose&&u.debug&&(u.performance?s.performance.log(arguments):(s.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),s.verbose.apply(console,arguments)))},error:function(){s.error=Function.prototype.bind.call(console.error,console,u.name+":"),s.error.apply(console,arguments)},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,o.push({Element:p,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(s.performance.timer),s.performance.timer=setTimeout(s.performance.display,500)},display:function(){var e=u.name+":",n=0;i=!1,clearTimeout(s.performance.timer),m.each(o,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==v||console.table!==v)&&0<o.length&&(console.groupCollapsed(e),console.table?console.table(o):m.each(o,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),o=[]}},invoke:function(i,e,t){var o,a,n,r=g;return e=e||l,t=p||t,"string"==typeof i&&r!==v&&(i=i.split(/[\. ]/),o=i.length-1,m.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(m.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==v)return a=r[n],!1;if(!m.isPlainObject(r[t])||e==o)return r[t]!==v?a=r[t]:s.error(d.method,i),!1;r=r[t]}})),m.isFunction(a)?n=a.apply(t,e):a!==v&&(n=a),Array.isArray(c)?c.push(n):c!==v?c=[c,n]:n!==v&&(c=n),a}},n?(g===v&&s.initialize(),s.invoke(t)):(g!==v&&s.destroy(),s.initialize()),c!==v?c:this},m.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:{}}},m.extend(m.expr[":"],{data:m.expr.createPseudo?m.expr.createPseudo(function(t){return function(e){return!!m.data(e,t)}}):function(e,t,n){return!!m.data(e,n[3])}})}(jQuery,window,document),function(I,R,j,z){"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(w){var E,T=I(this),F=T.selector||"",S=(new Date).getTime(),D=[],A=w,P=arguments[1],O="string"==typeof A,M=[].slice.call(arguments,1);return T.each(function(){var n,f,t,e,g,l,p,m,h,i,u,o,a,s,c,b,d=I(this),v=this,y=[],k=!1,r=!1,x=!1,C=["clean","clean"];(b={initialize:function(){b.get.settings(),O?(c===z&&b.instantiate(),b.invoke(A)):(c!==z&&c.invoke("destroy"),b.verbose("Initializing form validation",d,g),b.bindEvents(),b.set.defaults(),g.autoCheckRequired&&b.set.autoCheck(),b.instantiate())},instantiate:function(){b.verbose("Storing instance of module",b),c=b,d.data(a,b)},destroy:function(){b.verbose("Destroying previous module",c),b.removeEvents(),d.removeData(a)},refresh:function(){b.verbose("Refreshing selector cache"),n=d.find(m.field),f=d.find(m.group),t=d.find(m.message),d.find(m.prompt),e=d.find(m.submit),d.find(m.clear),d.find(m.reset)},submit:function(){b.verbose("Submitting form",d),r=!0,d.submit()},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+s,function(e){b[t](),e.preventDefault()})},bindEvents:function(){b.verbose("Attaching form events"),d.on("submit"+s,b.validate.form).on("blur"+s,m.field,b.event.field.blur).on("click"+s,m.submit,b.submit).on("click"+s,m.reset,b.reset).on("click"+s,m.clear,b.clear),g.keyboardShortcuts&&d.on("keydown"+s,m.field,b.event.field.keydown),n.each(function(e,t){var n=I(t),i=n.prop("type"),o=b.get.changeEvent(i,n);n.on(o+s,b.event.field.change)}),g.preventLeaving&&I(R).on("beforeunload"+s,b.event.beforeUnload),n.on("change click keyup keydown blur",function(e){I(this).triggerHandler(e.type+".dirty")}),n.on("change.dirty click.dirty keyup.dirty keydown.dirty blur.dirty",b.determine.isDirty),d.on("dirty"+s,function(e){g.onDirty.call()}),d.on("clean"+s,function(e){g.onClean.call()})},clear:function(){n.each(function(e,t){var n=I(t),i=n.parent(),o=n.closest(f),a=o.find(m.prompt),r=n.closest(m.uiCalendar),s=n.data(p.defaultValue)||"",c=i.is(m.uiCheckbox),l=i.is(m.uiDropdown)&&b.can.useElement("dropdown"),u=0<r.length&&b.can.useElement("calendar");o.hasClass(h.error)&&(b.verbose("Resetting error on field",o),o.removeClass(h.error),a.remove()),l?(b.verbose("Resetting dropdown value",i,s),i.dropdown("clear",!0)):c?n.prop("checked",!1):u?r.calendar("clear"):(b.verbose("Resetting field value",n,s),n.val(""))})},reset:function(){n.each(function(e,t){var n=I(t),i=n.parent(),o=n.closest(f),a=n.closest(m.uiCalendar),r=o.find(m.prompt),s=n.data(p.defaultValue),c=i.is(m.uiCheckbox),l=i.is(m.uiDropdown)&&b.can.useElement("dropdown"),u=0<a.length&&b.can.useElement("calendar"),d=o.hasClass(h.error);s!==z&&(d&&(b.verbose("Resetting error on field",o),o.removeClass(h.error),r.remove()),l?(b.verbose("Resetting dropdown value",i,s),i.dropdown("restore defaults",!0)):c?(b.verbose("Resetting checkbox value",i,s),n.prop("checked",s)):u?a.calendar("set date",s):(b.verbose("Resetting field value",n,s),n.val(s)))}),b.determine.isDirty()},determine:{isValid:function(){var n=!0;return I.each(l,function(e,t){b.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var o=!1;n.each(function(e,t){var n,i=I(t);n=0<i.filter(m.checkbox).length?b.is.checkboxDirty(i):b.is.fieldDirty(i),i.data(g.metadata.isDirty,n),o|=n}),o?b.set.dirty():b.set.clean(),e&&"dirty"===e.namespace&&(e.stopImmediatePropagation(),e.preventDefault())}},is:{bracketedRule:function(e){return e.type&&e.type.match(g.regExp.bracket)},shorthandFields:function(e){var t=e[Object.keys(e)[0]];return b.is.shorthandRules(t)},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"):b.is.blank(e))},blank:function(e){return""===I.trim(e.val())},valid:function(e){var n=!0;return e?(b.verbose("Checking if field is valid",e),b.validate.field(l[e],e,!1)):(b.verbose("Checking if form is valid"),I.each(l,function(e,t){b.is.valid(e)||(n=!1)}),n)},dirty:function(){return x},clean:function(){return!x},fieldDirty:function(e){var t=e.data(p.defaultValue);null==t&&(t="");var n=e.val();null==n&&(n="");var i=/^(true|false)$/i;return i.test(t)&&i.test(n)?!new RegExp("^"+t+"$","i").test(n):n!==t},checkboxDirty:function(e){return e.data(p.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===C[0]},justClean:function(){return"clean"===C[0]}},removeEvents:function(){d.off(s),n.off(s),e.off(s),n.off(s)},event:{field:{keydown:function(e){var t=I(this),n=e.which,i=t.is(m.input),o=t.is(m.checkbox),a=0<t.closest(m.uiDropdown).length,r=13;n==27&&(b.verbose("Escape key pressed blurring field"),t.blur()),e.ctrlKey||n!=r||!i||a||o||(k||(t.one("keyup"+s,b.event.field.keyup),b.submit(),b.debug("Enter pressed on input submitting form")),k=!0)},keyup:function(){k=!1},blur:function(e){var t=I(this),n=t.closest(f),i=b.get.validation(t);n.hasClass(h.error)?(b.debug("Revalidating field",t,i),i&&b.validate.field(i)):"blur"==g.on&&i&&b.validate.field(i)},change:function(e){var t=I(this),n=t.closest(f),i=b.get.validation(t);i&&("change"==g.on||n.hasClass(h.error)&&g.revalidate)&&(clearTimeout(b.timer),b.timer=setTimeout(function(){b.debug("Revalidating field",t,b.get.validation(t)),b.validate.field(i)},g.delay))}},beforeUnload:function(e){if(b.is.dirty()&&!r)return(e=e||R.event)&&(e.returnValue=g.text.leavingMessage),g.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!b.is.bracketedRule(e))&&(e.value!==z?e.value:e.type.match(g.regExp.bracket)[1]+"")},ruleName:function(e){return b.is.bracketedRule(e)?e.type.replace(e.type.match(g.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":b.get.inputEvent()},inputEvent:function(){return j.createElement("input").oninput!==z?"input":j.createElement("input").onpropertychange!==z?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return I.each(e,function(n,e){"string"==typeof e&&(e=[e]),i[n]={rules:[]},I.each(e,function(e,t){i[n].rules.push({type:t})})}),i},prompt:function(e,t){var n,i,o=b.get.ruleName(e),a=b.get.ancillaryValue(e),r=b.get.field(t.identifier),s=r.val(),c=I.isFunction(e.prompt)?e.prompt(s):e.prompt||g.prompt[o]||g.text.unspecifiedRule,l=-1!==c.search("{value}"),u=-1!==c.search("{name}");return l&&(c=c.replace(/\{value\}/g,r.val())),u&&(i=1==(n=r.closest(m.group).find("label").eq(0)).length?n.text():r.prop("placeholder")||g.text.unspecifiedField,c=c.replace(/\{name\}/g,i)),c=(c=c.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,a),e.prompt||b.verbose("Using default validation prompt for type",c,o),c},settings:function(){if(I.isPlainObject(w)){var e=Object.keys(w);0<e.length&&(w[e[0]].identifier!==z&&w[e[0]].rules!==z)?(g=I.extend(!0,{},I.fn.form.settings,P),l=I.extend({},I.fn.form.settings.defaults,w),b.error(g.error.oldSyntax,v),b.verbose("Extending settings from legacy parameters",l,g)):(w.fields&&b.is.shorthandFields(w.fields)&&(w.fields=b.get.fieldsFromShorthand(w.fields)),g=I.extend(!0,{},I.fn.form.settings,w),l=I.extend({},I.fn.form.settings.defaults,g.fields),b.verbose("Extending settings",l,g))}else g=I.fn.form.settings,l=I.fn.form.settings.defaults,b.verbose("Using default form validation",l,g);o=g.namespace,p=g.metadata,m=g.selector,h=g.className,i=g.regExp,u=g.error,a="module-"+o,s="."+o,c=d.data(a),b.refresh()},field:function(e){var t;return b.verbose("Finding field with identifier",e),e=b.escape.string(e),0<(t=n.filter("#"+e)).length?t:0<(t=n.filter('[name="'+e+'"]')).length?t:0<(t=n.filter('[name="'+e+'[]"]')).length?t: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(b.get.field(t))}),n},validation:function(i){var o,a;return!!l&&(I.each(l,function(e,n){a=n.identifier||e,I.each(b.get.field(a),function(e,t){if(t==i[0])return n.identifier=a,o=n,!1})}),o||!1)},value:function(e){var t=[];return t.push(e),b.get.values.call(v,t)[e]},values:function(e){var t=Array.isArray(e)?b.get.fields(e):n,p={};return t.each(function(e,t){var n=I(t),i=n.closest(m.uiCalendar),o=n.prop("name"),a=n.val(),r=n.is(m.checkbox),s=n.is(m.radio),c=-1!==o.indexOf("[]"),l=0<i.length&&b.can.useElement("calendar"),u=!!r&&n.is(":checked");if(o)if(c)o=o.replace("[]",""),p[o]||(p[o]=[]),r?u?p[o].push(a||!0):p[o].push(!1):p[o].push(a);else if(s)p[o]!==z&&!1!==p[o]||(p[o]=!!u&&(a||!0));else if(r)p[o]=!!u&&(a||!0);else if(l){var d=i.calendar("get date");if(null!==d){if("date"==g.dateHandling)p[o]=d;else if("input"==g.dateHandling)p[o]=i.calendar("get input date");else if("formatter"==g.dateHandling){var f=i.calendar("setting","type");switch(f){case"date":p[o]=g.formatter.date(d);break;case"datetime":p[o]=g.formatter.datetime(d);break;case"time":p[o]=g.formatter.time(d);break;case"month":p[o]=g.formatter.month(d);break;case"year":p[o]=g.formatter.year(d);break;default:b.debug("Wrong calendar mode",i,f),p[o]=""}}}else p[o]=""}else p[o]=a}),p},dirtyFields:function(){return n.filter(function(e,t){return I(t).data(p.isDirty)})}},has:{field:function(e){return b.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=b.escape.string(e))&&b.error(u.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]!==z||(b.error(u.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){b.add.field(e,t)},field:function(n,e){l[n]!==z&&l[n].rules!==z||(l[n]={rules:[]});var i={rules:[]};b.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)}),b.debug("Adding rules",i.rules,l)},fields:function(e){var t;t=e&&b.is.shorthandFields(e)?b.get.fieldsFromShorthand(e):e,l=I.extend({},l,t)},prompt:function(e,t,n){var i=b.get.field(e).closest(f),o=i.children(m.prompt),a=0!==o.length;t="string"==typeof t?[t]:t,b.verbose("Adding field error state",e),n||i.addClass(h.error),g.inline&&(a||(o=g.templates.prompt(t,h.label)).appendTo(i),o.html(t[0]),a?b.verbose("Inline errors are disabled, no inline error added",e):g.transition&&b.can.useElement("transition")&&d.transition("is supported")?(b.verbose("Displaying error with css transition",g.transition),o.transition(g.transition+" in",g.duration)):(b.verbose("Displaying error with fallback javascript animation"),o.fadeIn(g.duration)))},errors:function(e){b.debug("Adding form error messages",e),b.set.error(),t.html(g.templates.error(e))}},remove:{rule:function(n,e){var i=Array.isArray(e)?e:[e];if(l[n]!==z&&Array.isArray(l[n].rules))return e===z?(b.debug("Removed all rules"),void(l[n].rules=[])):void I.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(b.debug("Removed rule",t.type),l[n].rules.splice(e,1))})},field:function(e){var t=Array.isArray(e)?e:[e];I.each(t,function(e,t){b.remove.rule(t)})},rules:function(e,n){Array.isArray(e)?I.each(e,function(e,t){b.remove.rule(t,n)}):b.remove.rule(e,n)},fields:function(e){b.remove.field(e)},prompt:function(e){var t=b.get.field(e).closest(f),n=t.children(m.prompt);t.removeClass(h.error),g.inline&&n.is(":visible")&&(b.verbose("Removing prompt for field",e),g.transition&&b.can.useElement("transition")&&d.transition("is supported")?n.transition(g.transition+" out",g.duration,function(){n.remove()}):n.fadeOut(g.duration,function(){n.remove()}))}},set:{success:function(){d.removeClass(h.error).addClass(h.success)},defaults:function(){n.each(function(e,t){var n=I(t),i=n.parent(),o=0<n.filter(m.checkbox).length,a=i.is(m.uiDropdown)&&b.can.useElement("dropdown"),r=n.closest(m.uiCalendar),s=0<r.length&&b.can.useElement("calendar"),c=o?n.is(":checked"):n.val();a?i.dropdown("save defaults"):s&&r.calendar("refresh"),n.data(p.defaultValue,c),n.data(p.isDirty,!1)})},error:function(){d.removeClass(h.success).addClass(h.error)},value:function(e,t){var n={};return n[e]=t,b.set.values.call(v,n)},values:function(e){I.isEmptyObject(e)||I.each(e,function(e,t){var n,i=b.get.field(e),o=i.parent(),a=i.closest(m.uiCalendar),r=Array.isArray(t),s=o.is(m.uiCheckbox)&&b.can.useElement("checkbox"),c=o.is(m.uiDropdown)&&b.can.useElement("dropdown"),l=i.is(m.radio)&&s,u=0<a.length&&b.can.useElement("calendar");0<i.length&&(r&&s?(b.verbose("Selecting multiple",t,i),o.checkbox("uncheck"),I.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),o=n.parent(),0<n.length&&o.checkbox("check")})):l?(b.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(m.uiCheckbox).checkbox("check")):s?(b.verbose("Setting checkbox value",t,o),!0===t||1===t?o.checkbox("check"):o.checkbox("uncheck")):c?(b.verbose("Setting dropdown value",t,o),o.dropdown("set selected",t)):u?a.calendar("set date",t):(b.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){b.verbose("Setting state dirty"),x=!0,C[0]=C[1],C[1]="dirty",b.is.justClean()&&d.trigger("dirty")},clean:function(){b.verbose("Setting state clean"),x=!1,C[0]=C[1],C[1]="clean",b.is.justDirty()&&d.trigger("clean")},asClean:function(){b.set.defaults(),b.set.clean()},asDirty:function(){b.set.defaults(),b.set.dirty()},autoCheck:function(){b.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=I(t),i=I(t).closest(f),o=0<n.filter(m.checkbox).length,a=n.prop("required")||i.hasClass(h.required)||i.parent().hasClass(h.required),r=n.prop("disabled")||i.hasClass(h.disabled)||i.parent().hasClass(h.disabled),s=b.get.validation(n),c=!!s&&0!==I.grep(s.rules,function(e){return"empty"==e.type}),l=s.identifier||n.attr("id")||n.attr("name")||n.data(p.validate);!a||r||c||l===z||(o?(b.verbose("Adding 'checked' rule on field",l),b.add.rule(l,"checked")):(b.verbose("Adding 'empty' rule on field",l),b.add.rule(l,"empty")))})}},validate:{form:function(e,t){var n=b.get.values();if(k)return!1;if(y=[],b.determine.isValid()){if(b.debug("Form has no validation errors, submitting"),b.set.success(),!0!==t)return g.onSuccess.call(v,e,n)}else if(b.debug("Form has errors"),b.set.error(),g.inline||b.add.errors(y),e&&d.data("moduleApi")!==z&&e.stopImmediatePropagation(),!0!==t)return g.onFailure.call(v,y,n)},field:function(i,e,o){o=o===z||o,"string"==typeof i&&(b.verbose("Validating field",i),i=l[e=i]);var a=i.identifier||e,t=b.get.field(a),n=!!i.depends&&b.get.field(i.depends),r=!0,s=[];i.identifier||(b.debug("Using field name as identifier",a),i.identifier=a);var c=!0;return I.each(t,function(){if(!I(this).prop("disabled"))return c=!1}),c?b.debug("Field is disabled. Skipping",a):i.optional&&b.is.blank(t)?b.debug("Field is optional and blank. Skipping",a):i.depends&&b.is.empty(n)?b.debug("Field depends on another value that is not present or empty. Skipping",n):i.rules!==z&&(t.closest(f).removeClass(h.error),I.each(i.rules,function(e,t){if(b.has.field(a)){var n=b.validate.rule(i,t,!0)||[];0<n.length&&(b.debug("Field is invalid",a,t.type),s.push(b.get.prompt(t,i)),r=!1,o&&I(n).closest(f).addClass(h.error))}})),r?(o&&(b.remove.prompt(a,s),g.onValid.call(t)),!0):(o&&(y=y.concat(s),b.add.prompt(a,s,!0),g.onInvalid.call(t,s)),!1)},rule:function(e,t,n){function i(e){var t=l?I(e).filter(":checked").val():I(e).val();return t=t===z||""===t||null===t?"":g.shouldTrim?I.trim(t+""):String(t+""),s.call(e,t,a,d)}var o=b.get.field(e.identifier),a=b.get.ancillaryValue(t),r=b.get.ruleName(t),s=g.rules[r],c=[],l=o.is(m.checkbox);if(I.isFunction(s))return l?i(o)||(c=o):I.each(o,function(e,t){i(t)||c.push(t)}),n?c:!(0<c.length);b.error(u.noRule,r)}},setting:function(e,t){if(I.isPlainObject(e))I.extend(!0,g,e);else{if(t===z)return g[e];g[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,b,e);else{if(t===z)return b[e];b[e]=t}},debug:function(){!g.silent&&g.debug&&(g.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,g.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!g.silent&&g.verbose&&g.debug&&(g.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),b.verbose.apply(console,arguments)))},error:function(){g.silent||(b.error=Function.prototype.bind.call(console.error,console,g.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,n;g.performance&&(n=(t=(new Date).getTime())-(S||t),S=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){var e=g.name+":",n=0;S=!1,clearTimeout(b.performance.timer),I.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",F&&(e+=" '"+F+"'"),1<T.length&&(e+=" ("+T.length+")"),(console.group!==z||console.table!==z)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):I.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var o,a,n,r=c;return e=e||M,t=v||t,"string"==typeof i&&r!==z&&(i=i.split(/[\. ]/),o=i.length-1,I.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==z)return a=r[n],!1;if(!I.isPlainObject(r[t])||e==o)return r[t]!==z&&(a=r[t]),!1;r=r[t]}})),I.isFunction(a)?n=a.apply(t,e):a!==z&&(n=a),Array.isArray(E)?E.push(n):E!==z?E=[E,n]:n!==z&&(E=n),a}}).initialize()}),E!==z?E: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,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:{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:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain  "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noElement:"This module requires ui {element}"},templates:{error:function(e){var n='<ul class="list">';return I.each(e,function(e,t){n+="<li>"+t+"</li>"}),I(n+="</ul>")},prompt:function(e,t){return I("<div/>").addClass(t).html(e[0])}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===z||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<I(this).filter(":checked").length},email:function(e){return I.fn.form.settings.regExp.email.test(e)},url:function(e){return I.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){if(t instanceof RegExp)return e.match(t);var n,i=t.match(I.fn.form.settings.regExp.flags);return i&&(t=2<=i.length?i[1]:t,n=3<=i.length?i[2]:""),e.match(new RegExp(t,n))},integer:function(e,t){var n,i,o,a=I.fn.form.settings.regExp.integer;return t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?a.test(t)&&(n=i=t-0):(o=t.split("..",2),a.test(o[0])&&(n=o[0]-0),a.test(o[1])&&(i=o[1]-0))),a.test(e)&&(n===z||n<=e)&&(i===z||e<=i)},decimal:function(e){return I.fn.form.settings.regExp.decimal.test(e)},number:function(e){return I.fn.form.settings.regExp.number.test(e)},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!==z&&e.length>=t},length:function(e,t){return e!==z&&e.length>=t},exactLength:function(e,t){return e!==z&&e.length==t},maxLength:function(e,t){return e!==z&&e.length<=t},match:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length?i=o.val():0<(o=n.find("#"+t)).length?i=o.val():0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==z&&e.toString()==i.toString()},different:function(e,t,n){var i,o;return 0<(o=n.find('[data-validate="'+t+'"]')).length?i=o.val():0<(o=n.find("#"+t)).length?i=o.val():0<(o=n.find('[name="'+t+'"]')).length?i=o.val():0<(o=n.find('[name="'+t+'[]"]')).length&&(i=o),i!==z&&e.toString()!==i.toString()},creditCard:function(n,e){var t,i,o={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]}},a={},r=!1,s="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\-]/g,""),s&&(I.each(s,function(e,t){(i=o[t])&&(a={length:-1!==I.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&a.pattern&&(r=!0)}),!r))return!1;if((t={number:-1!==I.inArray(n.length,o.unionPay.length),pattern:-1!==n.search(o.unionPay.pattern)}).number&&t.pattern)return!0;for(var c=n.length,l=0,u=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],d=0;c--;)d+=u[l][parseInt(n.charAt(c),10)],l^=1;return d%10==0&&0<d}},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(T,F,S,D){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),T.fn.checkbox=function(u){var d,e=T(this),f=e.selector||"",k=(new Date).getTime(),x=[],C=u,w="string"==typeof C,E=[].slice.call(arguments,1);return e.each(function(){var e,p,g=T.extend(!0,{},T.fn.checkbox.settings,u),t=g.className,n=g.namespace,m=g.selector,s=g.error,i="."+n,o="module-"+n,h=T(this),a=T(this).children(m.label),b=T(this).children(m.input),v=b[0],r=!1,y=!1,c=h.data(o),l=this;p={initialize:function(){p.verbose("Initializing checkbox",g),p.create.label(),p.bind.events(),p.set.tabbable(),p.hide.input(),p.observeChanges(),p.instantiate(),p.setup()},instantiate:function(){p.verbose("Storing instance of module",p),c=p,h.data(o,p)},destroy:function(){p.verbose("Destroying module"),p.unbind.events(),p.show.input(),h.removeData(o)},fix:{reference:function(){h.is(m.input)&&(p.debug("Behavior called on <input> adjusting invoked element"),h=h.closest(m.checkbox),p.refresh())}},setup:function(){p.set.initialLoad(),p.is.indeterminate()?(p.debug("Initial value is indeterminate"),p.indeterminate()):p.is.checked()?(p.debug("Initial value is checked"),p.check()):(p.debug("Initial value is unchecked"),p.uncheck()),p.remove.initialLoad()},refresh:function(){a=h.children(m.label),b=h.children(m.input),v=b[0]},hide:{input:function(){p.verbose("Modifying <input> z-index to be unselectable"),b.addClass(t.hidden)}},show:{input:function(){p.verbose("Modifying <input> z-index to be selectable"),b.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in F&&((e=new MutationObserver(function(e){p.debug("DOM tree modified, updating selector cache"),p.refresh()})).observe(l,{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",e))},attachEvents:function(e,t){var n=T(e);t=T.isFunction(p[t])?p[t]:p.toggle,0<n.length?(p.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):p.error(s.notFound)},preventDefaultOnInputTarget:function(){"undefined"!=typeof event&&null!==event&&T(event.target).is(m.input)&&(p.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){p.should.ignoreCallbacks()||g.onChange.call(v)},click:function(e){var t=T(e.target);t.is(m.input)?p.verbose("Using default check action on initialized checkbox"):t.is(m.link)?p.debug("Clicking link inside checkbox, skipping toggle"):(p.toggle(),b.focus(),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,o=27,a=37,r=38,s=39,c=40,l=p.get.radios(),u=l.index(h),d=l.length,f=!1;if(t==a||t==r?f=(0===u?d:u)-1:t!=s&&t!=c||(f=u===d-1?0:u+1),!p.should.ignoreCallbacks()&&!1!==f){if(!1===g.beforeUnchecked.apply(v))return p.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===g.beforeChecked.apply(T(l[f]).children(m.input)[0]))return p.verbose("Next option should not allow check, cancelling key navigation"),!1}y=t==o?(p.verbose("Escape key pressed blurring field"),b.blur(),!0):!(e.ctrlKey||!(t==i||t==n&&g.enableEnterKey))&&(p.verbose("Enter/space key pressed, toggling checkbox"),p.toggle(),!0)},keyup:function(e){y&&e.preventDefault()}},check:function(){p.should.allowCheck()&&(p.debug("Checking checkbox",b),p.set.checked(),p.should.ignoreCallbacks()||(g.onChecked.call(v),p.trigger.change()),p.preventDefaultOnInputTarget())},uncheck:function(){p.should.allowUncheck()&&(p.debug("Unchecking checkbox"),p.set.unchecked(),p.should.ignoreCallbacks()||(g.onUnchecked.call(v),p.trigger.change()),p.preventDefaultOnInputTarget())},indeterminate:function(){p.should.allowIndeterminate()?p.debug("Checkbox is already indeterminate"):(p.debug("Making checkbox indeterminate"),p.set.indeterminate(),p.should.ignoreCallbacks()||(g.onIndeterminate.call(v),p.trigger.change()))},determinate:function(){p.should.allowDeterminate()?p.debug("Checkbox is already determinate"):(p.debug("Making checkbox determinate"),p.set.determinate(),p.should.ignoreCallbacks()||(g.onDeterminate.call(v),p.trigger.change()))},enable:function(){p.is.enabled()?p.debug("Checkbox is already enabled"):(p.debug("Enabling checkbox"),p.set.enabled(),p.should.ignoreCallbacks()||(g.onEnable.call(v),g.onEnabled.call(v),p.trigger.change()))},disable:function(){p.is.disabled()?p.debug("Checkbox is already disabled"):(p.debug("Disabling checkbox"),p.set.disabled(),p.should.ignoreCallbacks()||(g.onDisable.call(v),g.onDisabled.call(v),p.trigger.change()))},get:{radios:function(){var e=p.get.name();return T('input[name="'+e+'"]').closest(m.checkbox)},otherRadios:function(){return p.get.radios().not(h)},name:function(){return b.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return b.hasClass(t.radio)||"radio"==b.attr("type")},indeterminate:function(){return b.prop("indeterminate")!==D&&b.prop("indeterminate")},checked:function(){return b.prop("checked")!==D&&b.prop("checked")},disabled:function(){return b.prop("disabled")!==D&&b.prop("disabled")},enabled:function(){return!p.is.disabled()},determinate:function(){return!p.is.indeterminate()},unchecked:function(){return!p.is.checked()}},should:{allowCheck:function(){return p.is.determinate()&&p.is.checked()&&!p.is.initialLoad()?(p.debug("Should not allow check, checkbox is already checked"),!1):!(!p.should.ignoreCallbacks()&&!1===g.beforeChecked.apply(v))||(p.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return p.is.determinate()&&p.is.unchecked()&&!p.is.initialLoad()?(p.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!p.should.ignoreCallbacks()&&!1===g.beforeUnchecked.apply(v))||(p.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return p.is.indeterminate()&&!p.is.initialLoad()?(p.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!p.should.ignoreCallbacks()&&!1===g.beforeIndeterminate.apply(v))||(p.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return p.is.determinate()&&!p.is.initialLoad()?(p.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!p.should.ignoreCallbacks()&&!1===g.beforeDeterminate.apply(v))||(p.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return r&&!g.fireOnInit}},can:{change:function(){return!(h.hasClass(t.disabled)||h.hasClass(t.readOnly)||b.prop("disabled")||b.prop("readonly"))},uncheck:function(){return"boolean"==typeof g.uncheckable?g.uncheckable:!p.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){p.verbose("Setting class to checked"),h.removeClass(t.indeterminate).addClass(t.checked),p.is.radio()&&p.uncheckOthers(),p.is.indeterminate()||!p.is.checked()?(p.verbose("Setting state to checked",v),b.prop("indeterminate",!1).prop("checked",!0)):p.debug("Input is already checked, skipping input property change")},unchecked:function(){p.verbose("Removing checked class"),h.removeClass(t.indeterminate).removeClass(t.checked),p.is.indeterminate()||!p.is.unchecked()?(p.debug("Setting state to unchecked"),b.prop("indeterminate",!1).prop("checked",!1)):p.debug("Input is already unchecked")},indeterminate:function(){p.verbose("Setting class to indeterminate"),h.addClass(t.indeterminate),p.is.indeterminate()?p.debug("Input is already indeterminate, skipping input property change"):(p.debug("Setting state to indeterminate"),b.prop("indeterminate",!0))},determinate:function(){p.verbose("Removing indeterminate class"),h.removeClass(t.indeterminate),p.is.determinate()?p.debug("Input is already determinate, skipping input property change"):(p.debug("Setting state to determinate"),b.prop("indeterminate",!1))},disabled:function(){p.verbose("Setting class to disabled"),h.addClass(t.disabled),p.is.disabled()?p.debug("Input is already disabled, skipping input property change"):(p.debug("Setting state to disabled"),b.prop("disabled","disabled"))},enabled:function(){p.verbose("Removing disabled class"),h.removeClass(t.disabled),p.is.enabled()?p.debug("Input is already enabled, skipping input property change"):(p.debug("Setting state to enabled"),b.prop("disabled",!1))},tabbable:function(){p.verbose("Adding tabindex to checkbox"),b.attr("tabindex")===D&&b.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e=S.createEvent("HTMLEvents"),t=b[0];t&&(p.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<b.prevAll(m.label).length?(b.prev(m.label).detach().insertAfter(b),p.debug("Moving existing label",a)):p.has.label()||(a=T("<label>").insertAfter(b),p.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){p.verbose("Attaching checkbox events"),h.on("click"+i,p.event.click).on("change"+i,p.event.change).on("keydown"+i,m.input,p.event.keydown).on("keyup"+i,m.input,p.event.keyup)}},unbind:{events:function(){p.debug("Removing events"),h.off(i)}},uncheckOthers:function(){var e=p.get.otherRadios();p.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){p.can.change()?p.is.indeterminate()||p.is.unchecked()?(p.debug("Currently unchecked"),p.check()):p.is.checked()&&p.can.uncheck()&&(p.debug("Currently checked"),p.uncheck()):p.is.radio()||p.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(p.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,g,e);else{if(t===D)return g[e];T.isPlainObject(g[e])?T.extend(!0,g[e],t):g[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,p,e);else{if(t===D)return p[e];p[e]=t}},debug:function(){!g.silent&&g.debug&&(g.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,g.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!g.silent&&g.verbose&&g.debug&&(g.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,g.name+":"),p.verbose.apply(console,arguments)))},error:function(){g.silent||(p.error=Function.prototype.bind.call(console.error,console,g.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;g.performance&&(n=(t=(new Date).getTime())-(k||t),k=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=g.name+":",n=0;k=!1,clearTimeout(p.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==D||console.table!==D)&&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 o,a,n,r=c;return e=e||E,t=l||t,"string"==typeof i&&r!==D&&(i=i.split(/[\. ]/),o=i.length-1,T.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==D)return a=r[n],!1;if(!T.isPlainObject(r[t])||e==o)return r[t]!==D?a=r[t]:p.error(s.method,i),!1;r=r[t]}})),T.isFunction(a)?n=a.apply(t,e):a!==D&&(n=a),Array.isArray(d)?d.push(n):d!==D?d=[d,n]:n!==D&&(d=n),a}},w?(c===D&&p.initialize(),p.invoke(C)):(c!==D&&c.invoke("destroy"),p.initialize())}),d!==D?d:this},T.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,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, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(V,L,q,N){"use strict";V.isFunction=V.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},L=void 0!==L&&L.Math==Math?L:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),V.fn.modal=function(F){var S,e=V(this),D=V(L),A=V(q),P=V("body"),O=e.selector||"",M=(new Date).getTime(),I=[],R=F,j="string"==typeof R,z=[].slice.call(arguments,1),H=L.requestAnimationFrame||L.mozRequestAnimationFrame||L.webkitRequestAnimationFrame||L.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,a,e,i,n,r,s,t,c,l,u,d=V.isPlainObject(F)?V.extend(!0,{},V.fn.modal.settings,F):V.extend({},V.fn.modal.settings),f=d.selector,p=d.className,g=d.namespace,m=d.error,h="."+g,b="module-"+g,v=V(this),y=V(d.context),k=v.find(f.close),x=this,C=v.data(b),w=!1,E="",T="";u={initialize:function(){u.cache={},u.verbose("Initializing dimmer",y),u.create.id(),u.create.dimmer(),d.allowMultiple&&u.create.innerDimmer(),d.centered||v.addClass("top aligned"),u.refreshModals(),u.bind.events(),d.observeChanges&&u.observeChanges(),u.instantiate()},instantiate:function(){u.verbose("Storing instance of modal"),C=u,v.data(b,C)},create:{dimmer:function(){var e={debug:d.debug,dimmerName:"modals"},t=V.extend(!0,e,d.dimmerSettings);V.fn.dimmer!==N?(u.debug("Creating dimmer"),i=y.dimmer(t),d.detachable?(u.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",v)):u.set.undetached(),n=i.dimmer("get dimmer")):u.error(m.dimmer)},id:function(){c=(Math.random().toString(16)+"000000000").substr(2,8),t="."+c,u.verbose("Creating unique id for element",c)},innerDimmer:function(){0==v.find(f.dimmer).length&&v.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){l&&l.disconnect(),u.verbose("Destroying previous modal"),v.removeData(b).off(h),D.off(t),n.off(t),k.off(h),y.dimmer("destroy")},observeChanges:function(){"MutationObserver"in L&&((l=new MutationObserver(function(e){u.debug("DOM tree modified, refreshing"),u.refresh()})).observe(x,{childList:!0,subtree:!0}),u.debug("Setting up mutation observer",l))},refresh:function(){u.remove.scrolling(),u.cacheSizes(),u.can.useFlex()||u.set.modalOffset(),u.set.screenHeight(),u.set.type()},refreshModals:function(){a=v.siblings(f.modal),o=a.add(v)},attachEvents:function(e,t){var n=V(e);t=V.isFunction(u[t])?u[t]:u.toggle,0<n.length?(u.debug("Attaching modal events to element",e,t),n.off(h).on("click"+h,t)):u.error(m.notFound,e)},bind:{events:function(){u.verbose("Attaching events"),v.on("click"+h,f.close,u.event.close).on("click"+h,f.approve,u.event.approve).on("click"+h,f.deny,u.event.deny),D.on("resize"+t,u.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",u.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",u.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){w||!1===d.onApprove.call(x,V(this))?u.verbose("Approve callback returned false cancelling hide"):(w=!0,u.hide(function(){w=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){w||!1===d.onDeny.call(x,V(this))?u.verbose("Deny callback returned false cancelling hide"):(w=!0,u.hide(function(){w=!1}))},close:function(){u.hide()},mousedown:function(e){var t=V(e.target),n=u.is.rtl();(r=0<t.closest(f.modal).length)&&u.verbose("Mouse down event registered inside the modal"),(s=u.is.scrolling()&&(!n&&V(L).outerWidth()-d.scrollbarWidth<=e.clientX||n&&d.scrollbarWidth>=e.clientX))&&u.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(d.closable)if(r)u.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)u.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<V(e.target).closest(f.modal).length,n=V.contains(q.documentElement,e.target);if(!t&&n&&u.is.active()&&v.hasClass(p.front)){if(u.debug("Dimmer clicked, hiding all modals"),d.allowMultiple){if(!u.hideAll())return}else if(!u.hide())return;u.remove.clickaway()}}else u.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(u.timer),u.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(d.closable?(u.debug("Escape key pressed hiding modal"),v.hasClass(p.front)&&u.hide()):u.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(u.is.animating()||u.is.active())&&H(u.refresh)}},toggle:function(){u.is.active()||u.is.animating()?u.hide():u.show()},show:function(e){e=V.isFunction(e)?e:function(){},u.refreshModals(),u.set.dimmerSettings(),u.set.dimmerStyles(),u.showModal(e)},hide:function(e){return e=V.isFunction(e)?e:function(){},u.refreshModals(),u.hideModal(e)},showModal:function(e){e=V.isFunction(e)?e:function(){},u.is.animating()||!u.is.active()?(u.showDimmer(),u.cacheSizes(),u.set.bodyMargin(),u.can.useFlex()?u.remove.legacy():(u.set.legacy(),u.set.modalOffset(),u.debug("Using non-flex legacy modal positioning.")),u.set.screenHeight(),u.set.type(),u.set.clickaway(),!d.allowMultiple&&u.others.active()?u.hideOthers(u.showModal):(w=!1,d.allowMultiple&&(u.others.active()&&a.filter("."+p.active).find(f.dimmer).addClass("active"),d.detachable&&v.detach().appendTo(n)),d.onShow.call(x),d.transition&&V.fn.transition!==N&&v.transition("is supported")?(u.debug("Showing modal with css animations"),v.transition({debug:d.debug,animation:d.transition+" in",queue:d.queue,duration:d.duration,useFailSafe:!0,onComplete:function(){d.onVisible.apply(x),d.keyboardShortcuts&&u.add.keyboardShortcuts(),u.save.focus(),u.set.active(),d.autofocus&&u.set.autofocus(),e()}})):u.error(m.noTransition))):u.debug("Modal is already visible")},hideModal:function(e,t,n){var i=a.filter("."+p.active).last();if(e=V.isFunction(e)?e:function(){},u.debug("Hiding modal"),!1===d.onHide.call(x,V(this)))return u.verbose("Hide callback returned false cancelling hide"),w=!1;(u.is.animating()||u.is.active())&&(d.transition&&V.fn.transition!==N&&v.transition("is supported")?(u.remove.active(),v.transition({debug:d.debug,animation:d.transition+" out",queue:d.queue,duration:d.duration,useFailSafe:!0,onStart:function(){u.others.active()||u.others.animating()||t||u.hideDimmer(),d.keyboardShortcuts&&!u.others.active()&&u.remove.keyboardShortcuts()},onComplete:function(){u.unbind.scrollLock(),d.allowMultiple&&(i.addClass(p.front),v.removeClass(p.front),n?o.find(f.dimmer).removeClass("active"):i.find(f.dimmer).removeClass("active")),d.onHidden.call(x),u.remove.dimmerStyles(),u.restore.focus(),e()}})):u.error(m.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(u.save.bodyMargin(),u.debug("Showing dimmer"),i.dimmer("show")):u.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(u.unbind.scrollLock(),i.dimmer("hide",function(){u.restore.bodyMargin(),u.remove.clickaway(),u.remove.screenHeight()})):u.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var e=o.filter("."+p.active+", ."+p.animating);if(n=V.isFunction(n)?n:function(){},0<e.length){u.debug("Hiding all visible modals");var i=!0;return V(e.get().reverse()).each(function(e,t){i=i&&V(t).modal("hide modal",n,!1,!0)}),i&&u.hideDimmer(),i}},hideOthers:function(e){var t=a.filter("."+p.active+", ."+p.animating);e=V.isFunction(e)?e:function(){},0<t.length&&(u.debug("Hiding other modals",a),t.modal("hide modal",e,!0))},others:{active:function(){return 0<a.filter("."+p.active).length},animating:function(){return 0<a.filter("."+p.animating).length}},add:{keyboardShortcuts:function(){u.verbose("Adding keyboard shortcuts"),A.on("keyup"+h,u.event.keyboard)}},save:{focus:function(){0<V(q.activeElement).closest(v).length||(e=V(q.activeElement).blur())},bodyMargin:function(){E=P.css("margin-"+(u.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(E.replace(/[^\d.]/g,"")),t=L.innerWidth-q.documentElement.clientWidth;T=e+t}},restore:{focus:function(){e&&0<e.length&&d.restoreFocus&&e.focus()},bodyMargin:function(){var e=u.can.leftBodyScrollbar()?"left":"right";P.css("margin-"+e,E),P.find(f.bodyFixed.replace("right",e)).css("padding-"+e,E)}},remove:{active:function(){v.removeClass(p.active)},legacy:function(){v.removeClass(p.legacy)},clickaway:function(){d.detachable||v.off("mousedown"+t),n.off("mousedown"+t),n.off("mouseup"+t)},dimmerStyles:function(){n.removeClass(p.inverted),i.removeClass(p.blurring)},bodyStyle:function(){""===P.attr("style")&&(u.verbose("Removing style attribute"),P.removeAttr("style"))},screenHeight:function(){u.debug("Removing page height"),P.css("height","")},keyboardShortcuts:function(){u.verbose("Removing keyboard shortcuts"),A.off("keyup"+h)},scrolling:function(){i.removeClass(p.scrolling),v.removeClass(p.scrolling)}},cacheSizes:function(){v.addClass(p.loading);var e=v.prop("scrollHeight"),t=v.outerWidth(),n=v.outerHeight();u.cache.pageHeight!==N&&0===n||(V.extend(u.cache,{pageHeight:V(q).outerHeight(),width:t,height:n+d.offset,scrollHeight:e+d.offset,contextHeight:"body"==d.context?V(L).height():i.height()}),u.cache.topOffset=-u.cache.height/2),v.removeClass(p.loading),u.debug("Caching modal and container sizes",u.cache)},can:{leftBodyScrollbar:function(){return u.cache.leftBodyScrollbar===N&&(u.cache.leftBodyScrollbar=u.is.rtl()&&(u.is.iframe&&!u.is.firefox()||u.is.safari()||u.is.edge()||u.is.ie())),u.cache.leftBodyScrollbar},useFlex:function(){return"auto"===d.useFlex?d.detachable&&!u.is.ie():(d.useFlex&&u.is.ie()?u.debug("useFlex true is not supported in IE"):d.useFlex&&!d.detachable&&u.debug("useFlex true in combination with detachable false is not supported"),d.useFlex)},fit:function(){var e=u.cache.contextHeight,t=u.cache.contextHeight/2,n=u.cache.topOffset,i=u.cache.scrollHeight,o=u.cache.height,a=d.padding;return o<i?t+n+i+a<e:o+2*a<e}},is:{active:function(){return v.hasClass(p.active)},ie:function(){if(u.cache.isIE===N){var e=!L.ActiveXObject&&"ActiveXObject"in L,t="ActiveXObject"in L;u.cache.isIE=e||t}return u.cache.isIE},animating:function(){return v.transition("is supported")?v.transition("is animating"):v.is(":visible")},scrolling:function(){return i.hasClass(p.scrolling)},modernBrowser:function(){return!(L.ActiveXObject||"ActiveXObject"in L)},rtl:function(){return u.cache.isRTL===N&&(u.cache.isRTL="rtl"===P.attr("dir")||"rtl"===P.css("direction")),u.cache.isRTL},safari:function(){return u.cache.isSafari===N&&(u.cache.isSafari=/constructor/i.test(L.HTMLElement)||!!L.ApplePaySession),u.cache.isSafari},edge:function(){return u.cache.isEdge===N&&(u.cache.isEdge=!!L.setImmediate&&!u.is.ie()),u.cache.isEdge},firefox:function(){return u.cache.isFirefox===N&&(u.cache.isFirefox=!!L.InstallTrigger),u.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=v.find("[tabindex], :input").filter(":visible").filter(function(){return 0===V(this).closest(".disabled").length}),t=e.filter("[autofocus]"),n=0<t.length?t.first():e.first();0<n.length&&n.focus()},bodyMargin:function(){var e=u.can.leftBodyScrollbar()?"left":"right";(d.detachable||u.can.fit())&&P.css("margin-"+e,T+"px"),P.find(f.bodyFixed.replace("right",e)).css("padding-"+e,T+"px")},clickaway:function(){d.detachable||v.on("mousedown"+t,u.event.mousedown),n.on("mousedown"+t,u.event.mousedown),n.on("mouseup"+t,u.event.mouseup)},dimmerSettings:function(){if(V.fn.dimmer!==N){var e={debug:d.debug,dimmerName:"modals",closable:"auto",useFlex:u.can.useFlex(),duration:{show:d.duration,hide:d.duration}},t=V.extend(!0,e,d.dimmerSettings);d.inverted&&(t.variation=t.variation!==N?t.variation+" inverted":"inverted"),y.dimmer("setting",t)}else u.error(m.dimmer)},dimmerStyles:function(){d.inverted?n.addClass(p.inverted):n.removeClass(p.inverted),d.blurring?i.addClass(p.blurring):i.removeClass(p.blurring)},modalOffset:function(){if(d.detachable)v.css({marginTop:!v.hasClass("aligned")&&u.can.fit()?-u.cache.height/2:d.padding/2,marginLeft:-u.cache.width/2});else{var e=u.can.fit();v.css({top:!v.hasClass("aligned")&&e?V(q).scrollTop()+(u.cache.contextHeight-u.cache.height)/2:!e||v.hasClass("top")?V(q).scrollTop()+d.padding:V(q).scrollTop()+(u.cache.contextHeight-u.cache.height-d.padding),marginLeft:-u.cache.width/2})}u.verbose("Setting modal offset for legacy mode")},screenHeight:function(){u.can.fit()?P.css("height",""):v.hasClass("bottom")||(u.debug("Modal is taller than page content, resizing page height"),P.css("height",u.cache.height+2*d.padding))},active:function(){v.addClass(p.active+" "+p.front),a.filter("."+p.active).removeClass(p.front)},scrolling:function(){i.addClass(p.scrolling),v.addClass(p.scrolling),u.unbind.scrollLock()},legacy:function(){v.addClass(p.legacy)},type:function(){u.can.fit()?(u.verbose("Modal fits on screen"),u.others.active()||u.others.animating()||(u.remove.scrolling(),u.bind.scrollLock())):v.hasClass("bottom")?u.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(u.verbose("Modal cannot fit on screen setting to scrolling"),u.set.scrolling())},undetached:function(){i.addClass(p.undetached)}},setting:function(e,t){if(u.debug("Changing setting",e,t),V.isPlainObject(e))V.extend(!0,d,e);else{if(t===N)return d[e];V.isPlainObject(d[e])?V.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(V.isPlainObject(e))V.extend(!0,u,e);else{if(t===N)return u[e];u[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,d.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),u.verbose.apply(console,arguments)))},error:function(){d.silent||(u.error=Function.prototype.bind.call(console.error,console,d.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(M||t),M=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=d.name+":",n=0;M=!1,clearTimeout(u.performance.timer),V.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),(console.group!==N||console.table!==N)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):V.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var o,a,n,r=C;return e=e||z,t=x||t,"string"==typeof i&&r!==N&&(i=i.split(/[\. ]/),o=i.length-1,V.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(V.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==N)return a=r[n],!1;if(!V.isPlainObject(r[t])||e==o)return r[t]!==N&&(a=r[t]),!1;r=r[t]}})),V.isFunction(a)?n=a.apply(t,e):a!==N&&(n=a),Array.isArray(S)?S.push(n):S!==N?S=[S,n]:n!==N&&(S=n),a}},j?(C===N&&u.initialize(),u.invoke(R)):(C!==N&&C.invoke("destroy"),u.initialize())}),S!==N?S:this},V.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,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,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},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"}}}(jQuery,window,document),function(z,H,V,L){"use strict";z.isFunction=z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},H=void 0!==H&&H.Math==Math?H:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.popup=function(E){var T,e=z(this),F=z(V),S=z(H),D=z("body"),A=e.selector||"",P="ontouchstart"in V.documentElement?"touchstart":"click",O=(new Date).getTime(),M=[],I=E,R="string"==typeof I,j=[].slice.call(arguments,1);return e.each(function(){var u,l,e,t,n,d,f=z.isPlainObject(E)?z.extend(!0,{},z.fn.popup.settings,E):z.extend({},z.fn.popup.settings),o=f.selector,p=f.className,g=f.error,m=f.metadata,i=f.namespace,a="."+f.namespace,r="module-"+i,h=z(this),s=z(f.context),c=z(f.scrollContext),b=z(f.boundary),v=f.target?z(f.target):h,y=0,k=!1,x=!1,C=this,w=h.data(r);d={initialize:function(){d.debug("Initializing",h),d.createID(),d.bind.events(),!d.exists()&&f.preserve&&d.create(),f.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){d.verbose("Storing instance",d),w=d,h.data(r,w)},observeChanges:function(){"MutationObserver"in H&&((e=new MutationObserver(d.event.documentChanged)).observe(V,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",e))},refresh:function(){f.popup?u=z(f.popup).eq(0):f.inline&&(u=v.nextAll(o.popup).eq(0),f.popup=u),f.popup?(u.addClass(p.loading),l=d.get.offsetParent(),u.removeClass(p.loading),f.movePopup&&d.has.popup()&&d.get.offsetParent(u)[0]!==l[0]&&(d.debug("Moving popup to the same offset parent as target"),u.detach().appendTo(l))):l=f.inline?d.get.offsetParent(v):d.has.popup()?d.get.offsetParent(u):D,l.is("html")&&l[0]!==D[0]&&(d.debug("Setting page as offset parent"),l=D),d.get.variation()&&d.set.variation()},reposition:function(){d.refresh(),d.set.position()},destroy:function(){d.debug("Destroying previous module"),e&&e.disconnect(),u&&!f.preserve&&d.removePopup(),clearTimeout(d.hideTimer),clearTimeout(d.showTimer),d.unbind.close(),d.unbind.events(),h.removeData(r)},event:{start:function(e){var t=z.isPlainObject(f.delay)?f.delay.show:f.delay;clearTimeout(d.hideTimer),(!x||x&&f.addTouchEvents)&&(d.showTimer=setTimeout(d.show,t))},end:function(){var e=z.isPlainObject(f.delay)?f.delay.hide:f.delay;clearTimeout(d.showTimer),d.hideTimer=setTimeout(d.hide,e)},touchstart:function(e){x=!0,f.addTouchEvents&&d.show()},resize:function(){d.is.visible()&&d.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==C||0<z(e).find(C).length)&&(d.debug("Element removed from DOM, tearing down events"),d.destroy())})})},hideGracefully:function(e){var t=z(e.target),n=z.contains(V.documentElement,e.target),i=0<t.closest(o.popup).length;e&&!i&&n?(d.debug("Click occurred outside popup hiding popup"),d.hide()):d.debug("Click was inside popup, keeping popup open")}},create:function(){var e=d.get.html(),t=d.get.title(),n=d.get.content();e||n||t?(d.debug("Creating pop-up html"),e=e||f.templates.popup({title:t,content:n}),u=z("<div/>").addClass(p.popup).data(m.activator,h).html(e),f.inline?(d.verbose("Inserting popup element inline",u),u.insertAfter(h)):(d.verbose("Appending popup element to body",u),u.appendTo(s)),d.refresh(),d.set.variation(),f.hoverable&&d.bind.popup(),f.onCreate.call(u,C)):f.popup?(z(f.popup).data(m.activator,h),d.verbose("Used popup specified in settings"),d.refresh(),f.hoverable&&d.bind.popup()):0!==v.next(o.popup).length?(d.verbose("Pre-existing popup found"),f.inline=!0,f.popup=v.next(o.popup).data(m.activator,h),d.refresh(),f.hoverable&&d.bind.popup()):d.debug("No content specified skipping display",C)},createID:function(){n=(Math.random().toString(16)+"000000000").substr(2,8),t="."+n,d.verbose("Creating unique id for element",n)},toggle:function(){d.debug("Toggling pop-up"),d.is.hidden()?(d.debug("Popup is hidden, showing pop-up"),d.unbind.close(),d.show()):(d.debug("Popup is visible, hiding pop-up"),d.hide())},show:function(e){if(e=e||function(){},d.debug("Showing pop-up",f.transition),d.is.hidden()&&(!d.is.active()||!d.is.dropdown())){if(d.exists()||d.create(),!1===f.onShow.call(u,C))return void d.debug("onShow callback returned false, cancelling popup animation");f.preserve||f.popup||d.refresh(),u&&d.set.position()&&(d.save.conditions(),f.exclusive&&d.hideAll(),d.animate.show(e))}},hide:function(e){if(e=e||function(){},d.is.visible()||d.is.animating()){if(!1===f.onHide.call(u,C))return void d.debug("onHide callback returned false, cancelling popup animation");d.remove.visible(),d.unbind.close(),d.restore.conditions(),d.animate.hide(e)}},hideAll:function(){z(o.popup).filter("."+p.popupVisible).each(function(){z(this).data(m.activator).popup("hide")})},exists:function(){return!!u&&(f.inline||f.popup?d.has.popup():1<=u.closest(s).length)},removePopup:function(){d.has.popup()&&!f.popup&&(d.debug("Removing popup",u),u.remove(),u=L,f.onRemove.call(u,C))},save:{conditions:function(){d.cache={title:h.attr("title")},d.cache.title&&h.removeAttr("title"),d.verbose("Saving original attributes",d.cache.title)}},restore:{conditions:function(){return d.cache&&d.cache.title&&(h.attr("title",d.cache.title),d.verbose("Restoring original attributes",d.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=z.isFunction(e)?e:function(){},f.transition&&z.fn.transition!==L&&h.transition("is supported")?(d.set.visible(),u.transition({animation:f.transition+" in",queue:!1,debug:f.debug,verbose:f.verbose,duration:f.duration,onComplete:function(){d.bind.close(),e.call(u,C),f.onVisible.call(u,C)}})):d.error(g.noTransition)},hide:function(e){e=z.isFunction(e)?e:function(){},d.debug("Hiding pop-up"),f.transition&&z.fn.transition!==L&&h.transition("is supported")?u.transition({animation:f.transition+" out",queue:!1,duration:f.duration,debug:f.debug,verbose:f.verbose,onComplete:function(){d.reset(),e.call(u,C),f.onHidden.call(u,C)}}):d.error(g.noTransition)}},change:{content:function(e){u.html(e)}},get:{html:function(){return h.removeData(m.html),h.data(m.html)||f.html},title:function(){return h.removeData(m.title),h.data(m.title)||f.title},content:function(){return h.removeData(m.content),h.data(m.content)||f.content||h.attr("title")},variation:function(){return h.removeData(m.variation),h.data(m.variation)||f.variation},popup:function(){return u},popupOffset:function(){return u.offset()},calculations:function(){var e,t=d.get.offsetParent(u),n=v[0],i=b[0]==H,o=f.inline||f.popup&&f.movePopup?v.position():v.offset(),a=i?{top:0,left:0}:b.offset(),r={},s=i?{top:S.scrollTop(),left:S.scrollLeft()}:{top:0,left:0};if(r={target:{element:v[0],width:v.outerWidth(),height:v.outerHeight(),top:o.top,left:o.left,margin:{}},popup:{width:u.outerWidth(),height:u.outerHeight()},parent:{width:l.outerWidth(),height:l.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:s.top,left:s.left},width:b.width(),height:b.height()}},t.get(0)!==l.get(0)){var c=t.offset();r.target.top-=c.top,r.target.left-=c.left,r.parent.width=t.outerWidth(),r.parent.height=t.outerHeight()}return f.setFluidWidth&&d.is.fluid()&&(r.container={width:u.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=f.inline?parseInt(H.getComputedStyle(n).getPropertyValue("margin-top"),10):0,r.target.margin.left=f.inline?d.is.rtl()?parseInt(H.getComputedStyle(n).getPropertyValue("margin-right"),10):parseInt(H.getComputedStyle(n).getPropertyValue("margin-left"),10):0,e=r.screen,r.boundary={top:e.top+e.scroll.top,bottom:e.top+e.scroll.top+e.height,left:e.left+e.scroll.left,right:e.left+e.scroll.left+e.width},r},id:function(){return n},startEvent:function(){return"hover"==f.on?"mouseenter":"focus"==f.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==f.on?"mouseleave":"focus"==f.on&&"blur"},distanceFromBoundary:function(e,t){var n,i,o={};return n=(t=t||d.get.calculations()).popup,i=t.boundary,e&&(o={top:e.top-i.top,left:e.left-i.left,right:i.right-(e.left+n.width),bottom:i.bottom-(e.top+n.height)},d.verbose("Distance from boundaries determined",e,o)),o},offsetParent:function(e){var t=(e!==L?e[0]:v[0]).parentNode,n=z(t);if(t)for(var i="none"===n.css("transform"),o="static"===n.css("position"),a=n.is("body");t&&!a&&o&&i;)t=t.parentNode,i="none"===(n=z(t)).css("transform"),o="static"===n.css("position"),a=n.is("body");return n&&0<n.length?n:z()},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],i=t[1],o="top"==n||"bottom"==n,a=!1,r=!1,s=!1;return k||(d.verbose("All available positions available"),k=d.get.positions()),d.debug("Recording last position tried",e),k[e]=!0,"opposite"===f.prefer&&(s=(s=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],i]).join(" "),a=!0===k[s],d.debug("Trying opposite strategy",s)),"adjacent"===f.prefer&&o&&(s=(s=[n,{left:"center",center:"right",right:"left"}[i]]).join(" "),r=!0===k[s],d.debug("Trying adjacent strategy",s)),(r||a)&&(d.debug("Using backup position",s),s={"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]),s}},set:{position:function(e,t){if(0!==v.length&&0!==u.length){var n,i,o,a,r,s,c,l;if(t=t||d.get.calculations(),e=e||h.data(m.position)||f.position,n=h.data(m.offset)||f.offset,i=f.distanceAway,o=t.target,a=t.popup,r=t.parent,d.should.centerArrow(t)&&(d.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(n+=o.width/2,n-=f.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(n-=o.width/2,n+=f.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!d.is.svg(o.element))return d.debug("Popup target is hidden, no action taken"),!1;switch(f.inline&&(d.debug("Adding margin to calculation",o.margin),"left center"==e||"right center"==e?(n+=o.margin.top,i+=-o.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=o.margin.left,i-=o.margin.top):(n+=o.margin.left,i+=o.margin.top)),d.debug("Determining popup position from calculations",e,t),d.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),d.debug("RTL: Popup position updated",e)),y==f.maxSearchDepth&&"string"==typeof f.lastResort&&(e=f.lastResort),e){case"top left":s={top:"auto",bottom:r.height-o.top+i,left:o.left+n,right:"auto"};break;case"top center":s={bottom:r.height-o.top+i,left:o.left+o.width/2-a.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-o.top+i,right:r.width-o.left-o.width-n,top:"auto",left:"auto"};break;case"left center":s={top:o.top+o.height/2-a.height/2+n,right:r.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:o.top+o.height/2-a.height/2+n,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:o.top+o.height+i,left:o.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:o.top+o.height+i,right:r.width-o.left-o.width-n,left:"auto",bottom:"auto"}}if(s===L&&d.error(g.invalidPosition,e),d.debug("Calculated popup positioning values",s),u.css(s).removeClass(p.position).addClass(e).addClass(p.loading),c=d.get.popupOffset(),l=d.get.distanceFromBoundary(c,t),!f.forcePosition&&d.is.offstage(l,e)){if(d.debug("Position is outside viewport",e),y<f.maxSearchDepth)return y++,e=d.get.nextPosition(e),d.debug("Trying new position",e),!!u&&d.set.position(e,t);if(!f.lastResort)return d.debug("Popup could not find a position to display",u),d.error(g.cannotPlace,C),d.remove.attempts(),d.remove.loading(),d.reset(),f.onUnplaceable.call(u,C),!1;d.debug("No position found, showing with last position")}return d.debug("Position is on stage",e),d.remove.attempts(),d.remove.loading(),f.setFluidWidth&&d.is.fluid()&&d.set.fluidWidth(t),!0}d.error(g.notFound)},fluidWidth:function(e){e=e||d.get.calculations(),d.debug("Automatically setting element width to parent width",e.parent.width),u.css("width",e.container.width)},variation:function(e){(e=e||d.get.variation())&&d.has.popup()&&(d.verbose("Adding variation to popup",e),u.addClass(e))},visible:function(){h.addClass(p.visible)}},remove:{loading:function(){u.removeClass(p.loading)},variation:function(e){(e=e||d.get.variation())&&(d.verbose("Removing variation",e),u.removeClass(e))},visible:function(){h.removeClass(p.visible)},attempts:function(){d.verbose("Resetting all searched positions"),y=0,k=!1}},bind:{events:function(){d.debug("Binding popup events to module"),"click"==f.on&&h.on(P+a,d.toggle),"hover"==f.on&&h.on("touchstart"+a,d.event.touchstart),d.get.startEvent()&&h.on(d.get.startEvent()+a,d.event.start).on(d.get.endEvent()+a,d.event.end),f.target&&d.debug("Target set to element",v),S.on("resize"+t,d.event.resize)},popup:function(){d.verbose("Allowing hover events on popup to prevent closing"),u&&d.has.popup()&&u.on("mouseenter"+a,d.event.start).on("mouseleave"+a,d.event.end)},close:function(){(!0===f.hideOnScroll||"auto"==f.hideOnScroll&&"click"!=f.on)&&d.bind.closeOnScroll(),d.is.closable()?d.bind.clickaway():"hover"==f.on&&x&&d.bind.touchClose()},closeOnScroll:function(){d.verbose("Binding scroll close event to document"),c.one(d.get.scrollEvent()+t,d.event.hideGracefully)},touchClose:function(){d.verbose("Binding popup touchclose event to document"),F.on("touchstart"+t,function(e){d.verbose("Touched away from popup"),d.event.hideGracefully.call(C,e)})},clickaway:function(){d.verbose("Binding popup close event to document"),F.on(P+t,function(e){d.verbose("Clicked away from popup"),d.event.hideGracefully.call(C,e)})}},unbind:{events:function(){S.off(t),h.off(a)},close:function(){F.off(t),c.off(t)}},has:{popup:function(){return u&&0<u.length}},should:{centerArrow:function(e){return!d.is.basic()&&e.target.width<=2*f.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==f.closable?"hover"!=f.on:f.closable},offstage:function(e,n){var i=[];return z.each(e,function(e,t){t<-f.jitter&&(d.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return d.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return h.hasClass(p.basic)},active:function(){return h.hasClass(p.active)},animating:function(){return u!==L&&u.hasClass(p.animating)},fluid:function(){return u!==L&&u.hasClass(p.fluid)},visible:function(){return u!==L&&u.hasClass(p.popupVisible)},dropdown:function(){return h.hasClass(p.dropdown)},hidden:function(){return!d.is.visible()},rtl:function(){return"rtl"===h.attr("dir")||"rtl"===h.css("direction")}},reset:function(){d.remove.visible(),f.preserve?z.fn.transition!==L&&u.transition("remove transition"):d.removePopup()},setting:function(e,t){if(z.isPlainObject(e))z.extend(!0,f,e);else{if(t===L)return f[e];f[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,d,e);else{if(t===L)return d[e];d[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,f.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),d.verbose.apply(console,arguments)))},error:function(){f.silent||(d.error=Function.prototype.bind.call(console.error,console,f.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(O||t),O=t,M.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=f.name+":",n=0;O=!1,clearTimeout(d.performance.timer),z.each(M,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",A&&(e+=" '"+A+"'"),(console.group!==L||console.table!==L)&&0<M.length&&(console.groupCollapsed(e),console.table?console.table(M):z.each(M,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),M=[]}},invoke:function(i,e,t){var o,a,n,r=w;return e=e||j,t=C||t,"string"==typeof i&&r!==L&&(i=i.split(/[\. ]/),o=i.length-1,z.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(z.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==L)return a=r[n],!1;if(!z.isPlainObject(r[t])||e==o)return r[t]!==L&&(a=r[t]),!1;r=r[t]}})),z.isFunction(a)?n=a.apply(t,e):a!==L&&(n=a),Array.isArray(T)?T.push(n):T!==L?T=[T,n]:n!==L&&(T=n),a}},R?(w===L&&d.initialize(),d.invoke(I)):(w!==L&&w.invoke("destroy"),d.initialize())}),T!==L?T:this},z.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:H,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:H,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={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=z.fn.popup.settings.templates.escape;return typeof e!==L&&(typeof e.title!==L&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==L&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>")),t}}}}(jQuery,window,document),function(A,e,t,P){"use strict";A.isFunction=A.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")(),A.fn.toast=function(x){var C,e=A(this),w=e.selector||"",E=(new Date).getTime(),T=[],F=x,S="string"==typeof F,D=[].slice.call(arguments,1);return e.each(function(){var i,o,a,r,s,c,l,u,d=A.isPlainObject(x)?A.extend(!0,{},A.fn.toast.settings,x):A.extend({},A.fn.toast.settings),f=d.className,e=d.selector,p=d.error,t=d.namespace,g=d.fields,n="."+t,m=t+"-module",h=A(this),b=d.context?A(d.context):A("body"),v=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),y=this,k=v?h.data(m):P;u={initialize:function(){u.verbose("Initializing element"),u.has.container()||u.create.container(),(v||""!==d.message||""!==d.title||""!==u.get.iconClass()||d.showImage||u.has.configActions())&&("string"==typeof d.showProgress&&-1!==[f.top,f.bottom].indexOf(d.showProgress)||(d.showProgress=!1),u.create.toast(),d.closeOnClick&&(d.closeIcon||0<A(o).find(e.input).length||u.has.configActions())&&(d.closeOnClick=!1),d.closeOnClick||i.addClass(f.unclickable),u.bind.events()),u.instantiate(),i&&u.show()},instantiate:function(){u.verbose("Storing instance of toast"),k=u,h.data(m,k)},destroy:function(){i&&(u.debug("Removing toast",i),u.unbind.events(),i.remove(),c=o=i=P,d.onRemove.call(i,y),l=s=r=P),h.removeData(m)},show:function(e){e=e||function(){},u.debug("Showing toast"),!1!==d.onShow.call(i,y)?u.animate.show(e):u.debug("onShow callback returned false, cancelling toast animation")},close:function(e){e=e||function(){},u.remove.visible(),u.unbind.events(),u.animate.close(e)},create:{container:function(){u.verbose("Creating container"),b.append(A("<div/>",{class:d.position+" "+f.container}))},toast:function(){if(i=A("<div/>",{class:f.box}),v)o=d.cloneModule?h.clone().removeAttr("id"):h,l=o.find("> i"+u.helpers.toClass(f.close)),d.closeIcon=0<l.length;else{u.verbose("Creating toast"),o=A("<div/>");var e=A("<div/>",{class:f.content}),t=u.get.iconClass();""!==t&&o.append(A("<i/>",{class:t+" "+f.icon})),d.showImage&&o.append(A("<img>",{class:f.image+" "+d.classImage,src:d.showImage})),""!==d.title&&e.append(A("<div/>",{class:f.title,text:d.title})),e.append(A("<div/>",{html:u.helpers.escape(d.message,d.preserveHTML)})),o.addClass(d.class+" "+f.toast).append(e),o.css("opacity",d.opacity),d.closeIcon&&((l=A("<i/>",{class:f.close+" "+("string"==typeof d.closeIcon?d.closeIcon:"")})).hasClass(f.left)?o.prepend(l):o.append(l))}if(o.hasClass(f.compact)&&(d.compact=!0),o.hasClass("card")&&(d.compact=!1),a=o.find(".actions"),u.has.configActions()&&(0===a.length&&(a=A("<div/>",{class:f.actions+" "+(d.classActions||"")}).appendTo(o)),o.hasClass("card")&&!a.hasClass(f.attached)&&(a.addClass(f.extraContent),a.hasClass(f.vertical)&&(a.removeClass(f.vertical),u.error(p.verticalCard))),d.actions.forEach(function(e){var t=e[g.icon]?'<i class="'+u.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=u.helpers.escape(e[g.text]||"",d.preserveHTML),i=u.helpers.deQuote(e[g.class]||""),o=e[g.click]&&A.isFunction(e[g.click])?e[g.click]:function(){};a.append(A("<button/>",{html:t+n,class:f.button+" "+i,click:function(){!1!==o.call(y,h)&&u.close()}}))})),a&&a.hasClass(f.vertical)&&o.addClass(f.vertical),0<a.length&&!a.hasClass(f.attached)&&(!a||a.hasClass(f.basic)&&!a.hasClass(f.left)||o.addClass(f.actions)),"auto"===d.displayTime&&(d.displayTime=Math.max(d.minDisplayTime,o.text().split(" ").length/d.wordsPerMinute*6e4)),i.append(o),0<a.length&&a.hasClass(f.attached)&&(a.addClass(f.buttons),a.detach(),o.addClass(f.attached),a.hasClass(f.vertical)?(o.wrap(A("<div/>",{class:f.vertical+" "+f.attached+" "+(d.compact?f.compact:"")})),a.hasClass(f.left)?o.addClass(f.left).parent().addClass(f.left).prepend(a):o.parent().append(a)):a.hasClass(f.top)?(i.prepend(a),o.addClass(f.bottom)):(i.append(a),o.addClass(f.top))),h!==o&&(y=(h=o)[0]),0<d.displayTime){var n=f.progressing+" "+(d.pauseOnHover?f.pausable:"");d.showProgress&&(r=A("<div/>",{class:f.progress+" "+(d.classProgress||d.class),"data-percent":""}),d.classProgress||(o.hasClass("toast")&&!o.hasClass(f.inverted)?r.addClass(f.inverted):r.removeClass(f.inverted)),s=A("<div/>",{class:"bar "+(d.progressUp?"up ":"down ")+n}),r.addClass(d.showProgress).append(s),r.hasClass(f.top)?i.prepend(r):i.append(r),s.css("animation-duration",d.displayTime/1e3+"s")),(c=A("<span/>",{class:"wait "+n})).css("animation-duration",d.displayTime/1e3+"s"),c.appendTo(o)}d.compact&&(i.addClass(f.compact),o.addClass(f.compact),r&&r.addClass(f.compact)),d.newestOnTop?i.prependTo(u.get.container()):i.appendTo(u.get.container())}},bind:{events:function(){u.debug("Binding events to toast"),(d.closeOnClick||d.closeIcon)&&(d.closeIcon?l:o).on("click"+n,u.event.click),c&&c.on("animationend"+n,u.close),i.on("click"+n,e.approve,u.event.approve).on("click"+n,e.deny,u.event.deny)}},unbind:{events:function(){u.debug("Unbinding events to toast"),(d.closeOnClick||d.closeIcon)&&(d.closeIcon?l:o).off("click"+n),c&&c.off("animationend"+n),i.off("click"+n)}},animate:{show:function(e){e=A.isFunction(e)?e:function(){},d.transition&&u.can.useElement("transition")&&h.transition("is supported")&&(u.set.visible(),i.transition({animation:d.transition.showMethod+" in",queue:!1,debug:d.debug,verbose:d.verbose,duration:d.transition.showDuration,onComplete:function(){e.call(i,y),d.onVisible.call(i,y)}}))},close:function(e){e=A.isFunction(e)?e:function(){},u.debug("Closing toast"),!1!==d.onHide.call(i,y)?d.transition&&A.fn.transition!==P&&h.transition("is supported")?i.transition({animation:d.transition.hideMethod+" out",queue:!1,duration:d.transition.hideDuration,debug:d.debug,verbose:d.verbose,interval:50,onBeforeHide:function(e){e=A.isFunction(e)?e:function(){},""!==d.transition.closeEasing?i&&(i.css("opacity",0),i.wrap("<div/>").parent().slideUp(500,d.transition.closeEasing,function(){i&&(i.parent().remove(),e.call(i))})):e.call(i)},onComplete:function(){e.call(i,y),d.onHidden.call(i,y),u.destroy()}}):u.error(p.noTransition):u.debug("onHide callback returned false, cancelling toast animation")},pause:function(){c.css("animationPlayState","paused"),s&&s.css("animationPlayState","paused")},continue:function(){c.css("animationPlayState","running"),s&&s.css("animationPlayState","running")}},has:{container:function(){return u.verbose("Determining if there is already a container"),0<b.find(u.helpers.toClass(d.position)+e.container).length},toast:function(){return!!u.get.toast()},toasts:function(){return 0<u.get.toasts().length},configActions:function(){return Array.isArray(d.actions)&&0<d.actions.length}},get:{container:function(){return b.find(u.helpers.toClass(d.position)+e.container)[0]},toastBox:function(){return i||null},toast:function(){return o||null},toasts:function(){return A(u.get.container()).find(e.box)},iconClass:function(){return"string"==typeof d.showIcon?d.showIcon:d.showIcon&&d.icons[d.class]?d.icons[d.class]:""},remainingTime:function(){return c?c.css("opacity")*d.displayTime:0}},set:{visible:function(){o.addClass(f.visible)}},remove:{visible:function(){o.removeClass(f.visible)}},event:{click:function(e){0===A(e.target).closest("a").length&&(d.onClick.call(i,y),u.close())},approve:function(){!1!==d.onApprove.call(y,h)?u.close():u.verbose("Approve callback returned false cancelling close")},deny:function(){!1!==d.onDeny.call(y,h)?u.close():u.verbose("Deny callback returned false cancelling close")}},helpers:{toClass:function(e){var t=e.split(" "),n="";return t.forEach(function(e){n+="."+e}),n},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&amp;")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return A.fn[e]!==P||(u.error(p.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(u.debug("Changing setting",e,t),A.isPlainObject(e))A.extend(!0,d,e);else{if(t===P)return d[e];A.isPlainObject(d[e])?A.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(A.isPlainObject(e))A.extend(!0,u,e);else{if(t===P)return u[e];u[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?u.performance.log(arguments):(u.debug=Function.prototype.bind.call(console.info,console,d.name+":"),u.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?u.performance.log(arguments):(u.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),u.verbose.apply(console,arguments)))},error:function(){d.silent||(u.error=Function.prototype.bind.call(console.error,console,d.name+":"),u.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(E||t),E=t,T.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(u.performance.display,500)},display:function(){var e=d.name+":",n=0;E=!1,clearTimeout(u.performance.timer),A.each(T,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",w&&(e+=" '"+w+"'"),(console.group!==P||console.table!==P)&&0<T.length&&(console.groupCollapsed(e),console.table?console.table(T):A.each(T,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),T=[]}},invoke:function(i,e,t){var o,a,n,r=k;return e=e||D,t=y||t,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),o=i.length-1,A.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(A.isPlainObject(r[n])&&e!=o)r=r[n];else{if(r[n]!==P)return a=r[n],!1;if(!A.isPlainObject(r[t])||e==o)return r[t]!==P?a=r[t]:u.error(p.method,i),!1;r=r[t]}})),A.isFunction(a)?n=a.apply(t,e):a!==P&&(n=a),Array.isArray(C)?C.push(n):C!==P?C=[C,n]:n!==P&&(C=n),a}},S?(k===P&&u.initialize(),u.invoke(F)):(k!==P&&k.invoke("destroy"),u.initialize(),C=h)}),C!==P?C:this},A.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",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"},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},A.extend(A.easing,{easeOutBounce:function(e,t,n,i,o){return(t/=o)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document);