New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fomantic-ui-css

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fomantic-ui-css - npm Package Compare versions

Comparing version 2.8.5 to 2.8.6

2

components/accordion.min.js
/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -11,2 +11,2 @@ * http://fomantic-ui.com/

*/
!function(he,e,M,x){"use strict";he.isFunction=he.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")(),he.fn.calendar=function(r){var g,e=he(this),o=e.selector||"",D=(new Date).getTime(),y=[],v=r,b="string"==typeof v,C=[].slice.call(arguments,1),w={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}};return e.each(function(){var p,se,ue=he.isPlainObject(r)?he.extend(!0,{},he.fn.calendar.settings,r):he.extend({},he.fn.calendar.settings),de=ue.className,e=ue.namespace,i=ue.selector,fe=ue.formatter,a=ue.parser,pe=ue.metadata,ce=w[ue.minTimeGap],l=ue.error,t="."+e,n="module-"+e,s=he(this),u=s.find(i.input),me=s.find(i.popup),d=s.find(i.activator),f=this,c=s.data(n),m=!1,h=!1;se={initialize:function(){se.debug("Initializing calendar for",f,s),p=se.get.isTouch(),se.setup.config(),se.setup.popup(),se.setup.inline(),se.setup.input(),se.setup.date(),se.create.calendar(),se.bind.events(),se.instantiate()},instantiate:function(){se.verbose("Storing instance of calendar"),c=se,s.data(n,c)},destroy:function(){se.verbose("Destroying previous calendar for",f),s.removeData(n),se.unbind.events()},setup:{config:function(){null!==se.get.minDate()&&se.set.minDate(s.data(pe.minDate)),null!==se.get.maxDate()&&se.set.maxDate(s.data(pe.maxDate)),se.setting("type",se.get.type()),se.setting("on",ue.on||(u.length?"focus":"click"))},popup:function(){if(!ue.inline&&(d.length||(d=s.children().first()).length))if(he.fn.popup!==x){if(!me.length){var e=d.parent(),t=0!==e.closest(i.append).length?"appendTo":"prependTo";me=he("<div/>").addClass(de.popup)[t](e)}me.addClass(de.calendar);var a=ue.onVisible,n=ue.onHidden;u.length||(me.attr("tabindex","0"),a=function(){return se.focus(),ue.onVisible.apply(me,arguments)},n=function(){return se.blur(),ue.onHidden.apply(me,arguments)});var r=se.setting("on"),o=he.extend({},ue.popupOptions,{popup:me,on:r,hoverable:"hover"===r,onShow:function(){return se.set.focusDate(se.get.date()),se.set.mode(ue.startMode),ue.onShow.apply(me,arguments)},onVisible:a,onHide:ue.onHide,onHidden:n});se.popup(o)}else se.error(l.popup)},inline:function(){d.length&&!ue.inline||(me=he("<div/>").addClass(de.calendar).appendTo(s),u.length||me.attr("tabindex","0"))},input:function(){ue.touchReadonly&&u.length&&p&&u.prop("readonly",!0)},date:function(){var e;ue.initialDate?e=a.date(ue.initialDate,ue):s.data(pe.date)!==x?e=a.date(s.data(pe.date),ue):u.length&&(e=a.date(u.val(),ue)),se.set.date(e,ue.formatInput,!1)}},create:{calendar:function(){var e,t,a,n,r,o,i,l=se.get.mode(),s=new Date,u=se.get.date(),d=se.get.focusDate(),f=se.helper.dateInRange(d||u||ue.initialDate||s);d||(d=f,se.set.focusDate(d,!1,!1));var p="year"===l,c="month"===l,m="day"===l,h="hour"===l,g="minute"===l,D="time"===ue.type,y=Math.max(ue.multiMonth,1),v=m?se.get.monthOffset():0,b=f.getMinutes(),C=f.getHours(),w=f.getDate(),M=f.getMonth()+v,x=f.getFullYear(),T=m?ue.showWeekNumbers?8:7:h?4:ce.column,k=m||h?6:ce.row,O=m?y:1,F=me,N=F.hasClass("left")?"right center":"left center";for(F.empty(),1<O&&(i=he("<div/>").addClass(de.grid).appendTo(F)),n=0;n<O;n++){if(1<O)F=he("<div/>").addClass(de.column).appendTo(i);var A=M+n,H=(new Date(x,A,1).getDay()-ue.firstDayOfWeek%7+7)%7;if(!ue.constantHeight&&m){var Y=new Date(x,A+1,0).getDate()+H;k=Math.ceil(Y/7)}var I=p?10:c?1:0,E=m?1:0,j=h||g?1:0,q=h||g?w:1,W=new Date(x-I,A-E,q-j,C),R=new Date(x+I,A+E,q+j,C),S=p?new Date(10*Math.ceil(x/10)-9,0,0):c?new Date(x,0,0):m?new Date(x,A,0):new Date(x,A,w,-1),V=p?new Date(10*Math.ceil(x/10)+1,0,1):c?new Date(x+1,0,1):m?new Date(x,A+1,1):new Date(x,A,w+1),G=l;m&&ue.showWeekNumbers&&(G+=" andweek");var P=he("<table/>").addClass(de.table).addClass(G).appendTo(F),B=T;if(!D){var K=he("<thead/>").appendTo(P);r=he("<tr/>").appendTo(K),o=he("<th/>").attr("colspan",""+T).appendTo(r);var U=p||c?new Date(x,0,1):m?new Date(x,A,1):new Date(x,A,w,C,b),J=he("<span/>").addClass(de.link).appendTo(o);J.text(fe.header(U,l,ue));var z=c?ue.disableYear?"day":"year":m?ue.disableMonth?"year":"month":"day";if(J.data(pe.mode,z),0===n){var L=he("<span/>").addClass(de.prev).appendTo(o);L.data(pe.focusDate,W),L.toggleClass(de.disabledCell,!se.helper.isDateInRange(S,l)),he("<i/>").addClass(de.prevIcon).appendTo(L)}if(n===O-1){var $=he("<span/>").addClass(de.next).appendTo(o);$.data(pe.focusDate,R),$.toggleClass(de.disabledCell,!se.helper.isDateInRange(V,l)),he("<i/>").addClass(de.nextIcon).appendTo($)}if(m)for(r=he("<tr/>").appendTo(K),ue.showWeekNumbers&&((o=he("<th/>").appendTo(r)).text(ue.text.weekNo),o.addClass(de.weekCell),B--),e=0;e<B;e++)(o=he("<th/>").appendTo(r)).text(fe.dayColumnHeader((e+ue.firstDayOfWeek)%7,ue))}var Q=he("<tbody/>").appendTo(P);for(e=p?10*Math.ceil(x/10)-9:m?1-H:0,t=0;t<k;t++)for(r=he("<tr/>").appendTo(Q),m&&ue.showWeekNumbers&&((o=he("<th/>").appendTo(r)).text(se.get.weekOfYear(x,A,e+1-ue.firstDayOfWeek)),o.addClass(de.weekCell)),a=0;a<B;a++,e++){var Z=p?new Date(e,A,1,C,b):c?new Date(x,e,1,C,b):m?new Date(x,A,e,C,b):h?new Date(x,A,w,e):new Date(x,A,w,C,e*ue.minTimeGap),X=p?e:c?ue.text.monthsShort[e]:m?Z.getDate():fe.time(Z,ue,!0);(o=he("<td/>").addClass(de.cell).appendTo(r)).text(X),o.data(pe.date,Z);var _=m&&Z.getMonth()!==(A+12)%12,ee=!ue.selectAdjacentDays&&_||!se.helper.isDateInRange(Z,l)||ue.isDisabled(Z,l)||se.helper.isDisabled(Z,l)||!se.helper.isEnabled(Z,l);if(ee){var te=se.helper.findDayAsObject(Z,l,ue.disabledDates);null!==te&&te[pe.message]&&(o.attr("data-tooltip",te[pe.message]),o.attr("data-position",N))}else{var ae=se.helper.findDayAsObject(Z,l,ue.eventDates);null!==ae&&(o.addClass(ae[pe.class]||ue.eventClass),ae[pe.message]&&(o.attr("data-tooltip",ae[pe.message]),o.attr("data-position",N)))}var ne=se.helper.dateEqual(Z,u,l),re=se.helper.dateEqual(Z,s,l);o.toggleClass(de.adjacentCell,_),o.toggleClass(de.disabledCell,ee),o.toggleClass(de.activeCell,ne&&!_),h||g||o.toggleClass(de.todayCell,!_&&re);var oe={mode:l,adjacent:_,disabled:ee,active:ne,today:re};fe.cell(o,Z,oe),se.helper.dateEqual(Z,d,l)&&se.set.focusDate(Z,!1,!1)}if(ue.today){var ie=he("<tr/>").appendTo(Q),le=he("<td/>").attr("colspan",""+T).addClass(de.today).appendTo(ie);le.text(fe.today(ue)),le.data(pe.date,s)}se.update.focus(!1,P)}}},update:{focus:function(e,t){t=t||me;var l=se.get.mode(),a=se.get.date(),s=se.get.focusDate(),u=se.get.startDate(),d=se.get.endDate(),f=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e=he(this),t=e.data(pe.date);if(t){var a=e.hasClass(de.disabledCell),n=e.hasClass(de.activeCell),r=e.hasClass(de.adjacentCell),o=se.helper.dateEqual(t,s,l),i=!!f&&(!!u&&se.helper.isDateInRange(t,l,u,f)||!!d&&se.helper.isDateInRange(t,l,f,d));e.toggleClass(de.focusCell,o&&(!p||m)&&(!r||ue.selectAdjacentDays&&r)&&!a),se.helper.isTodayButton(e)||e.toggleClass(de.rangeCell,i&&!n&&!a)}})}},refresh:function(){se.create.calendar()},bind:{events:function(){se.debug("Binding events"),me.on("mousedown"+t,se.event.mousedown),me.on("touchstart"+t,se.event.mousedown),me.on("mouseup"+t,se.event.mouseup),me.on("touchend"+t,se.event.mouseup),me.on("mouseover"+t,se.event.mouseover),u.length?(u.on("input"+t,se.event.inputChange),u.on("focus"+t,se.event.inputFocus),u.on("blur"+t,se.event.inputBlur),u.on("keydown"+t,se.event.keydown)):me.on("keydown"+t,se.event.keydown)}},unbind:{events:function(){se.debug("Unbinding events"),me.off(t),u.length&&u.off(t)}},event:{mouseover:function(e){var t=he(e.target).data(pe.date),a=1===e.buttons;t&&se.set.focusDate(t,!1,!0,a)},mousedown:function(e){u.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");var t=he(e.target).data(pe.date);t&&se.set.focusDate(t,!1,!0,!0)},mouseup:function(e){se.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t=he(e.target);if(!t.hasClass("disabled")){var a=t.parent();(a.data(pe.date)||a.data(pe.focusDate)||a.data(pe.mode))&&(t=a);var n=t.data(pe.date),r=t.data(pe.focusDate),o=t.data(pe.mode);if(n&&!1!==ue.onSelect.call(f,n,se.get.mode())){var i=t.hasClass(de.today);se.selectDate(n,i)}else r?se.set.focusDate(r):o&&se.set.mode(o)}},keydown:function(e){var t=e.which;if(27!==t&&9!==t||se.popup("hide"),se.popup("is visible"))if(37===t||38===t||39===t||40===t){var a="day"===(f=se.get.mode())?7:"hour"===f?4:"minute"===f?ce.column:3,n=37===t?-1:38===t?-a:39==t?1:a;n*="minute"===f?ue.minTimeGap:1;var r=se.get.focusDate()||se.get.date()||new Date,o=r.getFullYear()+("year"===f?n:0),i=r.getMonth()+("month"===f?n:0),l=r.getDate()+("day"===f?n:0),s=r.getHours()+("hour"===f?n:0),u=r.getMinutes()+("minute"===f?n:0),d=new Date(o,i,l,s,u);"time"===ue.type&&(d=se.helper.mergeDateTime(r,d)),se.helper.isDateInRange(d,f)&&se.set.focusDate(d)}else if(13===t){var f=se.get.mode(),p=se.get.focusDate();p&&!ue.isDisabled(p,f)&&!se.helper.isDisabled(p,f)&&se.helper.isEnabled(p,f)&&se.selectDate(p),e.preventDefault(),e.stopPropagation()}38!==t&&40!==t||(e.preventDefault(),se.popup("show"))},inputChange:function(){var e=u.val(),t=a.date(e,ue);se.set.date(t,!1)},inputFocus:function(){me.addClass(de.active)},inputBlur:function(){if(me.removeClass(de.active),ue.formatInput){var e=se.get.date(),t=fe.datetime(e,ue);u.val(t)}}},get:{weekOfYear:function(e,t,a){var n,r,o;return n=Date.UTC(e,t,a+3)/864e5,r=Math.floor(n/7),o=new Date(6048e5*r).getUTCFullYear(),r-Math.floor(Date.UTC(o,0,7)/6048e5)+1},date:function(){return se.helper.sanitiseDate(s.data(pe.date))||null},inputDate:function(){return u.val()},focusDate:function(){return s.data(pe.focusDate)||null},startDate:function(){var e=se.get.calendarModule(ue.startCalendar);return(e?e.get.date():s.data(pe.startDate))||null},endDate:function(){var e=se.get.calendarModule(ue.endCalendar);return(e?e.get.date():s.data(pe.endDate))||null},minDate:function(){return s.data(pe.minDate)||null},maxDate:function(){return s.data(pe.maxDate)||null},monthOffset:function(){return s.data(pe.monthOffset)||0},mode:function(){var e=s.data(pe.mode)||ue.startMode,t=se.get.validModes();return 0<=he.inArray(e,t)?e:"time"===ue.type?"hour":"month"===ue.type?"month":"year"===ue.type?"year":"day"},type:function(){return s.data(pe.type)||ue.type},validModes:function(){var e=[];return"time"!==ue.type&&(ue.disableYear&&"year"!==ue.type||e.push("year"),(ue.disableMonth||"year"===ue.type)&&"month"!==ue.type||e.push("month"),0<=ue.type.indexOf("date")&&e.push("day")),0<=ue.type.indexOf("time")&&(e.push("hour"),ue.disableMinute||e.push("minute")),e},isTouch:function(){try{return M.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof he||(e=he(e).first()),e.data(n)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=se.helper.sanitiseDate(e),e=se.helper.dateInRange(e);var n=se.get.mode(),r=fe.datetime(e,ue);if(a&&!1===ue.onBeforeChange.call(f,e,r,n))return!1;if(se.set.focusDate(e),ue.isDisabled(e,n))return!1;var o=se.get.endDate();o&&e&&o<e&&se.set.endDate(x),se.set.dataKeyValue(pe.date,e),t&&u.length&&u.val(r),a&&ue.onChange.call(f,e,r,n)},startDate:function(e,t){e=se.helper.sanitiseDate(e);var a=se.get.calendarModule(ue.startCalendar);a&&a.set.date(e),se.set.dataKeyValue(pe.startDate,e,t)},endDate:function(e,t){e=se.helper.sanitiseDate(e);var a=se.get.calendarModule(ue.endCalendar);a&&a.set.date(e),se.set.dataKeyValue(pe.endDate,e,t)},focusDate:function(e,t,a,n){e=se.helper.sanitiseDate(e),e=se.helper.dateInRange(e);var r="day"===se.get.mode(),o=se.get.focusDate();if(r&&e&&o){var i=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth();if(i){var l=se.get.monthOffset()-i;se.set.monthOffset(l,!1)}}var s=se.set.dataKeyValue(pe.focusDate,e,t);a=!1!==a&&s&&!1===t||h!=n,h=n,a&&se.update.focus(n)},minDate:function(e){e=se.helper.sanitiseDate(e),null!==ue.maxDate&&ue.maxDate<=e?se.verbose("Unable to set minDate variable bigger that maxDate variable",e,ue.maxDate):(se.setting("minDate",e),se.set.dataKeyValue(pe.minDate,e))},maxDate:function(e){e=se.helper.sanitiseDate(e),null!==ue.minDate&&ue.minDate>=e?se.verbose("Unable to set maxDate variable lower that minDate variable",e,ue.minDate):(se.setting("maxDate",e),se.set.dataKeyValue(pe.maxDate,e))},monthOffset:function(e,t){var a=Math.max(ue.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),se.set.dataKeyValue(pe.monthOffset,e,t)},mode:function(e,t){se.set.dataKeyValue(pe.mode,e,t)},dataKeyValue:function(e,t,a){var n=s.data(e),r=n===t||n<=t&&t<=n;return t?s.data(e,t):s.removeData(e),(a=!1!==a&&!r)&&se.refresh(),!r}},selectDate:function(e,t){se.verbose("New date selection",e);var a=se.get.mode();if(t||"minute"===a||ue.disableMinute&&"hour"===a||"date"===ue.type&&"day"===a||"month"===ue.type&&"month"===a||"year"===ue.type&&"year"===a){if(!(!1===se.set.date(e))&&ue.closable){se.popup("hide");var n=se.get.calendarModule(ue.endCalendar);n&&("focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{var r="year"===a?ue.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";se.set.mode(r),"hour"===a||"day"===a&&se.get.date()?se.set.date(e,!0,!1):se.set.focusDate(e)}},changeDate:function(e){se.set.date(e)},clear:function(){se.set.date(x)},popup:function(){return d.popup.apply(d,arguments)},focus:function(){u.length?u.focus():me.focus()},blur:function(){u.length?u.blur():me.blur()},helper:{isDisabled:function(a,n){return("day"===n||"month"===n||"year"===n)&&(-1!==ue.disabledDaysOfWeek.indexOf(a.getDay())||ue.disabledDates.some(function(e){if("string"==typeof e&&(e=se.helper.sanitiseDate(e)),e instanceof Date)return se.helper.dateEqual(a,e,n);if(null!==e&&"object"==typeof e)if(e[pe.year]){if("number"==typeof e[pe.year])return a.getFullYear()==e[pe.year];if(Array.isArray(e[pe.year]))return-1<e[pe.year].indexOf(a.getFullYear())}else if(e[pe.month]){if("number"==typeof e[pe.month])return a.getMonth()==e[pe.month];if(Array.isArray(e[pe.month]))return-1<e[pe.month].indexOf(a.getMonth());if(e[pe.month]instanceof Date){var t=se.helper.sanitiseDate(e[pe.month]);return a.getMonth()==t.getMonth()&&a.getFullYear()==t.getFullYear()}}else if(e[pe.date]&&"day"===n){if(e[pe.date]instanceof Date)return se.helper.dateEqual(a,se.helper.sanitiseDate(e[pe.date]),n);if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){return se.helper.dateEqual(a,e,n)})}}))},isEnabled:function(t,a){return"day"!==a||(0===ue.enabledDates.length||ue.enabledDates.some(function(e){return"string"==typeof e&&(e=se.helper.sanitiseDate(e)),e instanceof Date?se.helper.dateEqual(t,e,a):null!==e&&"object"==typeof e&&e[pe.date]?se.helper.dateEqual(t,se.helper.sanitiseDate(e[pe.date]),a):void 0}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if("string"==typeof(n=e[r])&&(n=se.helper.sanitiseDate(n)),n instanceof Date&&se.helper.dateEqual(t,n,a)){var o={};return o[pe.date]=n,o}if(null!==n&&"object"==typeof n)if(n[pe.year]){if("number"==typeof n[pe.year]&&t.getFullYear()==n[pe.year])return n;if(Array.isArray(n[pe.year])&&-1<n[pe.year].indexOf(t.getFullYear()))return n}else if(n[pe.month]){if("number"==typeof n[pe.month]&&t.getMonth()==n[pe.month])return n;if(Array.isArray(n[pe.month])){if(-1<n[pe.month].indexOf(t.getMonth()))return n}else if(n[pe.month]instanceof Date){var i=se.helper.sanitiseDate(n[pe.month]);if(t.getMonth()==i.getMonth()&&t.getFullYear()==i.getFullYear())return n}}else if(n[pe.date]&&"day"===a){if(n[pe.date]instanceof Date&&se.helper.dateEqual(t,se.helper.sanitiseDate(n[pe.date]),a))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return se.helper.dateEqual(t,e,a)}))return n}}return null},sanitiseDate:function(e){return e?(e instanceof Date||(e=a.date(""+e,ue)),!e||null===e||isNaN(e.getTime())?x:e):x},dateDiff:function(e,t,a){a=a||"day";var n="time"===ue.type,r="year"===a,o=r||"month"===a,i="minute"===a,l=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:r?0:e.getMonth(),n?1:o?1:e.getDate(),l?e.getHours():0,i?ue.minTimeGap*Math.floor(e.getMinutes()/ue.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n?0:r?0:t.getMonth(),n?1:o?1:t.getDate(),l?t.getHours():0,i?ue.minTimeGap*Math.floor(t.getMinutes()/ue.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===se.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var r=se.get.startDate();a=r&&ue.minDate?new Date(Math.max(r,ue.minDate)):r||ue.minDate,n=ue.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),ue.minTimeGap*Math.ceil(a.getMinutes()/ue.minTimeGap)),!(!e||a&&0<se.helper.dateDiff(e,a,t)||n&&0<se.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=se.get.startDate();t=n&&ue.minDate?new Date(Math.max(n,ue.minDate)):n||ue.minDate,a=ue.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),ue.minTimeGap*Math.ceil(t.getMinutes()/ue.minTimeGap));var r="time"===ue.type;return e?t&&0<se.helper.dateDiff(e,t,"minute")?r?se.helper.mergeDateTime(e,t):t:a&&0<se.helper.dateDiff(a,e,"minute")?r?se.helper.mergeDateTime(e,a):a:e: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()===ue.text.today}},setting:function(e,t){if(se.debug("Changing setting",e,t),he.isPlainObject(e))he.extend(!0,ue,e);else{if(t===x)return ue[e];he.isPlainObject(ue[e])?he.extend(!0,ue[e],t):ue[e]=t}},internal:function(e,t){if(he.isPlainObject(e))he.extend(!0,se,e);else{if(t===x)return se[e];se[e]=t}},debug:function(){!ue.silent&&ue.debug&&(ue.performance?se.performance.log(arguments):(se.debug=Function.prototype.bind.call(console.info,console,ue.name+":"),se.debug.apply(console,arguments)))},verbose:function(){!ue.silent&&ue.verbose&&ue.debug&&(ue.performance?se.performance.log(arguments):(se.verbose=Function.prototype.bind.call(console.info,console,ue.name+":"),se.verbose.apply(console,arguments)))},error:function(){ue.silent||(se.error=Function.prototype.bind.call(console.error,console,ue.name+":"),se.error.apply(console,arguments))},performance:{log:function(e){var t,a;ue.performance&&(a=(t=(new Date).getTime())-(D||t),D=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":a})),clearTimeout(se.performance.timer),se.performance.timer=setTimeout(se.performance.display,500)},display:function(){var e=ue.name+":",a=0;D=!1,clearTimeout(se.performance.timer),he.each(y,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",o&&(e+=" '"+o+"'"),(console.group!==x||console.table!==x)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):he.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var r,o,a,i=c;return e=e||C,t=f||t,"string"==typeof n&&i!==x&&(n=n.split(/[\. ]/),r=n.length-1,he.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(he.isPlainObject(i[a])&&e!=r)i=i[a];else{if(i[a]!==x)return o=i[a],!1;if(!he.isPlainObject(i[t])||e==r)return i[t]!==x?o=i[t]:se.error(l.method,n),!1;i=i[t]}})),he.isFunction(o)?a=o.apply(t,e):o!==x&&(a=o),Array.isArray(g)?g.push(a):g!==x?g=[g,a]:a!==x&&(g=a),o}},b?(c===x&&se.initialize(),se.invoke(v)):(c!==x&&c.invoke("destroy"),se.initialize())}),g!==x?g:this},he.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!1,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,ampm:!0,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,minTimeGap:5,showWeekNumbers:null,disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],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:{header:function(e,t,a){return"year"===t?a.formatter.yearHeader(e,a):"month"===t?a.formatter.monthHeader(e,a):"day"===t?a.formatter.dayHeader(e,a):"hour"===t?a.formatter.hourHeader(e,a):a.formatter.minuteHeader(e,a)},yearHeader:function(e,t){var a=10*Math.ceil(e.getFullYear()/10);return a-9+" - "+(2+a)},monthHeader:function(e,t){return e.getFullYear()},dayHeader:function(e,t){return t.text.months[e.getMonth()]+" "+e.getFullYear()},hourHeader:function(e,t){return t.formatter.date(e,t)},minuteHeader:function(e,t){return t.formatter.date(e,t)},dayColumnHeader:function(e,t){return t.text.days[e]},datetime:function(e,t){if(!e)return"";var a="time"===t.type?"":t.formatter.date(e,t),n=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return a+("datetime"===t.type?" ":"")+n},date:function(e,t){if(!e)return"";var a=e.getDate(),n=t.text.months[e.getMonth()],r=e.getFullYear();return"year"===t.type?r:"month"===t.type?n+" "+r:(t.monthFirst?n+" "+a:a+" "+n)+", "+r},time:function(e,t,a){if(!e)return"";var n=e.getHours(),r=e.getMinutes(),o="";return t.ampm&&(o=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(r<10?"0":"")+r+o},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=(""+e).trim().toLowerCase()).length)return null;e=t.monthFirst?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var a,n,r,o=new Date(e);if(!isNaN(o.getDate()))return o;var i,l,s,u=-1,d=-1,f=-1,p=-1,c=-1,m=x,h="time"===t.type,g=t.type.indexOf("time")<0,D=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!g)for(m=0<=he.inArray(t.text.am.toLowerCase(),D)||!(0<=he.inArray(t.text.pm.toLowerCase(),D))&&x,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(d<0||u<0)for(s=l.split(":"),r=0;r<Math.min(2,s.length);r++)n=parseInt(s[r]),isNaN(n)&&(n=0),0===r?d=n%24:u=n%60;y.splice(a,1)}if(!h){for(a=0;a<D.length;a++)if(!((i=D[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].substring(0,i.length).toLowerCase()===i){p=n+1;break}if(0<=p)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),c=n,y.splice(a,1);break}if(p<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r]),!isNaN(n)&&1<=n&&n<=12){p=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&1<=n&&n<=31){f=n,y.splice(a,1);break}if(c<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a]),!isNaN(n)){n<=99&&(n+=t.currentCentury),c=n,y.splice(a,1);break}}if(!g){if(d<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&0<=n&&n<=23){d=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&d<0&&f<0&&p<0&&c<0)return null;u<0&&(u=0),d<0&&(d=0),f<0&&(f=1),p<0&&(p=1),c<0&&(c=(new Date).getFullYear()),m!==x&&(m?12===d&&(d=0):d<12&&(d+=12));var v=new Date(c,p-1,f,d,u);return v.getMonth()===p-1&&v.getFullYear()===c||(v=new Date(c,p,0,d,u)),isNaN(v.getTime())?null:v}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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},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",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"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",month:"month",year:"year"},eventClass:"blue"}}(jQuery,window,document);
!function(he,e,M,x){"use strict";he.isFunction=he.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")(),he.fn.calendar=function(r){var g,e=he(this),o=e.selector||"",D=(new Date).getTime(),y=[],v=r,b="string"==typeof v,C=[].slice.call(arguments,1),w={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}};return e.each(function(){var p,se,ue=he.isPlainObject(r)?he.extend(!0,{},he.fn.calendar.settings,r):he.extend({},he.fn.calendar.settings),de=ue.className,e=ue.namespace,i=ue.selector,fe=ue.formatter,a=ue.parser,pe=ue.metadata,ce=w[ue.minTimeGap],l=ue.error,t="."+e,n="module-"+e,s=he(this),u=s.find(i.input),me=s.find(i.popup),d=s.find(i.activator),f=this,c=s.data(n),m=!1,h=!1;se={initialize:function(){se.debug("Initializing calendar for",f,s),p=se.get.isTouch(),se.setup.config(),se.setup.popup(),se.setup.inline(),se.setup.input(),se.setup.date(),se.create.calendar(),se.bind.events(),se.instantiate()},instantiate:function(){se.verbose("Storing instance of calendar"),c=se,s.data(n,c)},destroy:function(){se.verbose("Destroying previous calendar for",f),s.removeData(n),se.unbind.events()},setup:{config:function(){null!==se.get.minDate()&&se.set.minDate(s.data(pe.minDate)),null!==se.get.maxDate()&&se.set.maxDate(s.data(pe.maxDate)),se.setting("type",se.get.type()),se.setting("on",ue.on||(u.length?"focus":"click"))},popup:function(){if(!ue.inline&&(d.length||(d=s.children().first()).length))if(he.fn.popup!==x){if(!me.length){var e=d.parent(),t=0!==e.closest(i.append).length?"appendTo":"prependTo";me=he("<div/>").addClass(de.popup)[t](e)}me.addClass(de.calendar);var a=ue.onVisible,n=ue.onHidden;u.length||(me.attr("tabindex","0"),a=function(){return se.focus(),ue.onVisible.apply(me,arguments)},n=function(){return se.blur(),ue.onHidden.apply(me,arguments)});var r=se.setting("on"),o=he.extend({},ue.popupOptions,{popup:me,on:r,hoverable:"hover"===r,closable:"click"===r,onShow:function(){return se.set.focusDate(se.get.date()),se.set.mode(ue.startMode),ue.onShow.apply(me,arguments)},onVisible:a,onHide:ue.onHide,onHidden:n});se.popup(o)}else se.error(l.popup)},inline:function(){d.length&&!ue.inline||(me=he("<div/>").addClass(de.calendar).appendTo(s),u.length||me.attr("tabindex","0"))},input:function(){ue.touchReadonly&&u.length&&p&&u.prop("readonly",!0)},date:function(){var e;ue.initialDate?e=a.date(ue.initialDate,ue):s.data(pe.date)!==x?e=a.date(s.data(pe.date),ue):u.length&&(e=a.date(u.val(),ue)),se.set.date(e,ue.formatInput,!1)}},create:{calendar:function(){var e,t,a,n,r,o,i,l=se.get.mode(),s=new Date,u=se.get.date(),d=se.get.focusDate(),f=se.helper.dateInRange(d||u||ue.initialDate||s);d||(d=f,se.set.focusDate(d,!1,!1));var p="year"===l,c="month"===l,m="day"===l,h="hour"===l,g="minute"===l,D="time"===ue.type,y=Math.max(ue.multiMonth,1),v=m?se.get.monthOffset():0,b=f.getMinutes(),C=f.getHours(),w=f.getDate(),M=f.getMonth()+v,x=f.getFullYear(),T=m?ue.showWeekNumbers?8:7:h?4:ce.column,k=m||h?6:ce.row,O=m?y:1,F=me,N=F.hasClass("left")?"right center":"left center";for(F.empty(),1<O&&(i=he("<div/>").addClass(de.grid).appendTo(F)),n=0;n<O;n++){if(1<O)F=he("<div/>").addClass(de.column).appendTo(i);var A=M+n,H=(new Date(x,A,1).getDay()-ue.firstDayOfWeek%7+7)%7;if(!ue.constantHeight&&m){var Y=new Date(x,A+1,0).getDate()+H;k=Math.ceil(Y/7)}var I=p?10:c?1:0,E=m?1:0,j=h||g?1:0,q=h||g?w:1,W=new Date(x-I,A-E,q-j,C),R=new Date(x+I,A+E,q+j,C),S=p?new Date(10*Math.ceil(x/10)-9,0,0):c?new Date(x,0,0):m?new Date(x,A,0):new Date(x,A,w,-1),V=p?new Date(10*Math.ceil(x/10)+1,0,1):c?new Date(x+1,0,1):m?new Date(x,A+1,1):new Date(x,A,w+1),G=l;m&&ue.showWeekNumbers&&(G+=" andweek");var P=he("<table/>").addClass(de.table).addClass(G).appendTo(F),B=T;if(!D){var K=he("<thead/>").appendTo(P);r=he("<tr/>").appendTo(K),o=he("<th/>").attr("colspan",""+T).appendTo(r);var U=p||c?new Date(x,0,1):m?new Date(x,A,1):new Date(x,A,w,C,b),J=he("<span/>").addClass(de.link).appendTo(o);J.text(fe.header(U,l,ue));var z=c?ue.disableYear?"day":"year":m?ue.disableMonth?"year":"month":"day";if(J.data(pe.mode,z),0===n){var L=he("<span/>").addClass(de.prev).appendTo(o);L.data(pe.focusDate,W),L.toggleClass(de.disabledCell,!se.helper.isDateInRange(S,l)),he("<i/>").addClass(de.prevIcon).appendTo(L)}if(n===O-1){var $=he("<span/>").addClass(de.next).appendTo(o);$.data(pe.focusDate,R),$.toggleClass(de.disabledCell,!se.helper.isDateInRange(V,l)),he("<i/>").addClass(de.nextIcon).appendTo($)}if(m)for(r=he("<tr/>").appendTo(K),ue.showWeekNumbers&&((o=he("<th/>").appendTo(r)).text(ue.text.weekNo),o.addClass(de.weekCell),B--),e=0;e<B;e++)(o=he("<th/>").appendTo(r)).text(fe.dayColumnHeader((e+ue.firstDayOfWeek)%7,ue))}var Q=he("<tbody/>").appendTo(P);for(e=p?10*Math.ceil(x/10)-9:m?1-H:0,t=0;t<k;t++)for(r=he("<tr/>").appendTo(Q),m&&ue.showWeekNumbers&&((o=he("<th/>").appendTo(r)).text(se.get.weekOfYear(x,A,e+1-ue.firstDayOfWeek)),o.addClass(de.weekCell)),a=0;a<B;a++,e++){var Z=p?new Date(e,A,1,C,b):c?new Date(x,e,1,C,b):m?new Date(x,A,e,C,b):h?new Date(x,A,w,e):new Date(x,A,w,C,e*ue.minTimeGap),X=p?e:c?ue.text.monthsShort[e]:m?Z.getDate():fe.time(Z,ue,!0);(o=he("<td/>").addClass(de.cell).appendTo(r)).text(X),o.data(pe.date,Z);var _=m&&Z.getMonth()!==(A+12)%12,ee=!ue.selectAdjacentDays&&_||!se.helper.isDateInRange(Z,l)||ue.isDisabled(Z,l)||se.helper.isDisabled(Z,l)||!se.helper.isEnabled(Z,l);if(ee){var te=se.helper.findDayAsObject(Z,l,ue.disabledDates);null!==te&&te[pe.message]&&(o.attr("data-tooltip",te[pe.message]),o.attr("data-position",N))}else{var ae=se.helper.findDayAsObject(Z,l,ue.eventDates);null!==ae&&(o.addClass(ae[pe.class]||ue.eventClass),ae[pe.message]&&(o.attr("data-tooltip",ae[pe.message]),o.attr("data-position",N)))}var ne=se.helper.dateEqual(Z,u,l),re=se.helper.dateEqual(Z,s,l);o.toggleClass(de.adjacentCell,_),o.toggleClass(de.disabledCell,ee),o.toggleClass(de.activeCell,ne&&!_),h||g||o.toggleClass(de.todayCell,!_&&re);var oe={mode:l,adjacent:_,disabled:ee,active:ne,today:re};fe.cell(o,Z,oe),se.helper.dateEqual(Z,d,l)&&se.set.focusDate(Z,!1,!1)}if(ue.today){var ie=he("<tr/>").appendTo(Q),le=he("<td/>").attr("colspan",""+T).addClass(de.today).appendTo(ie);le.text(fe.today(ue)),le.data(pe.date,s)}se.update.focus(!1,P)}}},update:{focus:function(e,t){t=t||me;var l=se.get.mode(),a=se.get.date(),s=se.get.focusDate(),u=se.get.startDate(),d=se.get.endDate(),f=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e=he(this),t=e.data(pe.date);if(t){var a=e.hasClass(de.disabledCell),n=e.hasClass(de.activeCell),r=e.hasClass(de.adjacentCell),o=se.helper.dateEqual(t,s,l),i=!!f&&(!!u&&se.helper.isDateInRange(t,l,u,f)||!!d&&se.helper.isDateInRange(t,l,f,d));e.toggleClass(de.focusCell,o&&(!p||m)&&(!r||ue.selectAdjacentDays&&r)&&!a),se.helper.isTodayButton(e)||e.toggleClass(de.rangeCell,i&&!n&&!a)}})}},refresh:function(){se.create.calendar()},bind:{events:function(){se.debug("Binding events"),me.on("mousedown"+t,se.event.mousedown),me.on("touchstart"+t,se.event.mousedown),me.on("mouseup"+t,se.event.mouseup),me.on("touchend"+t,se.event.mouseup),me.on("mouseover"+t,se.event.mouseover),u.length?(u.on("input"+t,se.event.inputChange),u.on("focus"+t,se.event.inputFocus),u.on("blur"+t,se.event.inputBlur),u.on("keydown"+t,se.event.keydown)):me.on("keydown"+t,se.event.keydown)}},unbind:{events:function(){se.debug("Unbinding events"),me.off(t),u.length&&u.off(t)}},event:{mouseover:function(e){var t=he(e.target).data(pe.date),a=1===e.buttons;t&&se.set.focusDate(t,!1,!0,a)},mousedown:function(e){u.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");var t=he(e.target).data(pe.date);t&&se.set.focusDate(t,!1,!0,!0)},mouseup:function(e){se.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t=he(e.target);if(!t.hasClass("disabled")){var a=t.parent();(a.data(pe.date)||a.data(pe.focusDate)||a.data(pe.mode))&&(t=a);var n=t.data(pe.date),r=t.data(pe.focusDate),o=t.data(pe.mode);if(n&&!1!==ue.onSelect.call(f,n,se.get.mode())){var i=t.hasClass(de.today);se.selectDate(n,i)}else r?se.set.focusDate(r):o&&se.set.mode(o)}},keydown:function(e){var t=e.which;if(27!==t&&9!==t||se.popup("hide"),se.popup("is visible"))if(37===t||38===t||39===t||40===t){var a="day"===(f=se.get.mode())?7:"hour"===f?4:"minute"===f?ce.column:3,n=37===t?-1:38===t?-a:39==t?1:a;n*="minute"===f?ue.minTimeGap:1;var r=se.get.focusDate()||se.get.date()||new Date,o=r.getFullYear()+("year"===f?n:0),i=r.getMonth()+("month"===f?n:0),l=r.getDate()+("day"===f?n:0),s=r.getHours()+("hour"===f?n:0),u=r.getMinutes()+("minute"===f?n:0),d=new Date(o,i,l,s,u);"time"===ue.type&&(d=se.helper.mergeDateTime(r,d)),se.helper.isDateInRange(d,f)&&se.set.focusDate(d)}else if(13===t){var f=se.get.mode(),p=se.get.focusDate();p&&!ue.isDisabled(p,f)&&!se.helper.isDisabled(p,f)&&se.helper.isEnabled(p,f)&&se.selectDate(p),e.preventDefault(),e.stopPropagation()}38!==t&&40!==t||(e.preventDefault(),se.popup("show"))},inputChange:function(){var e=u.val(),t=a.date(e,ue);se.set.date(t,!1)},inputFocus:function(){me.addClass(de.active)},inputBlur:function(){if(me.removeClass(de.active),ue.formatInput){var e=se.get.date(),t=fe.datetime(e,ue);u.val(t)}}},get:{weekOfYear:function(e,t,a){var n,r,o;return n=Date.UTC(e,t,a+3)/864e5,r=Math.floor(n/7),o=new Date(6048e5*r).getUTCFullYear(),r-Math.floor(Date.UTC(o,0,7)/6048e5)+1},date:function(){return se.helper.sanitiseDate(s.data(pe.date))||null},inputDate:function(){return u.val()},focusDate:function(){return s.data(pe.focusDate)||null},startDate:function(){var e=se.get.calendarModule(ue.startCalendar);return(e?e.get.date():s.data(pe.startDate))||null},endDate:function(){var e=se.get.calendarModule(ue.endCalendar);return(e?e.get.date():s.data(pe.endDate))||null},minDate:function(){return s.data(pe.minDate)||null},maxDate:function(){return s.data(pe.maxDate)||null},monthOffset:function(){return s.data(pe.monthOffset)||0},mode:function(){var e=s.data(pe.mode)||ue.startMode,t=se.get.validModes();return 0<=he.inArray(e,t)?e:"time"===ue.type?"hour":"month"===ue.type?"month":"year"===ue.type?"year":"day"},type:function(){return s.data(pe.type)||ue.type},validModes:function(){var e=[];return"time"!==ue.type&&(ue.disableYear&&"year"!==ue.type||e.push("year"),(ue.disableMonth||"year"===ue.type)&&"month"!==ue.type||e.push("month"),0<=ue.type.indexOf("date")&&e.push("day")),0<=ue.type.indexOf("time")&&(e.push("hour"),ue.disableMinute||e.push("minute")),e},isTouch:function(){try{return M.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof he||(e=he(e).first()),e.data(n)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=se.helper.sanitiseDate(e),e=se.helper.dateInRange(e);var n=se.get.mode(),r=fe.datetime(e,ue);if(a&&!1===ue.onBeforeChange.call(f,e,r,n))return!1;if(se.set.focusDate(e),ue.isDisabled(e,n))return!1;var o=se.get.endDate();o&&e&&o<e&&se.set.endDate(x),se.set.dataKeyValue(pe.date,e),t&&u.length&&u.val(r),a&&ue.onChange.call(f,e,r,n)},startDate:function(e,t){e=se.helper.sanitiseDate(e);var a=se.get.calendarModule(ue.startCalendar);a&&a.set.date(e),se.set.dataKeyValue(pe.startDate,e,t)},endDate:function(e,t){e=se.helper.sanitiseDate(e);var a=se.get.calendarModule(ue.endCalendar);a&&a.set.date(e),se.set.dataKeyValue(pe.endDate,e,t)},focusDate:function(e,t,a,n){e=se.helper.sanitiseDate(e),e=se.helper.dateInRange(e);var r="day"===se.get.mode(),o=se.get.focusDate();if(r&&e&&o){var i=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth();if(i){var l=se.get.monthOffset()-i;se.set.monthOffset(l,!1)}}var s=se.set.dataKeyValue(pe.focusDate,e,t);a=!1!==a&&s&&!1===t||h!=n,h=n,a&&se.update.focus(n)},minDate:function(e){e=se.helper.sanitiseDate(e),null!==ue.maxDate&&ue.maxDate<=e?se.verbose("Unable to set minDate variable bigger that maxDate variable",e,ue.maxDate):(se.setting("minDate",e),se.set.dataKeyValue(pe.minDate,e))},maxDate:function(e){e=se.helper.sanitiseDate(e),null!==ue.minDate&&ue.minDate>=e?se.verbose("Unable to set maxDate variable lower that minDate variable",e,ue.minDate):(se.setting("maxDate",e),se.set.dataKeyValue(pe.maxDate,e))},monthOffset:function(e,t){var a=Math.max(ue.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),se.set.dataKeyValue(pe.monthOffset,e,t)},mode:function(e,t){se.set.dataKeyValue(pe.mode,e,t)},dataKeyValue:function(e,t,a){var n=s.data(e),r=n===t||n<=t&&t<=n;return t?s.data(e,t):s.removeData(e),(a=!1!==a&&!r)&&se.refresh(),!r}},selectDate:function(e,t){se.verbose("New date selection",e);var a=se.get.mode();if(t||"minute"===a||ue.disableMinute&&"hour"===a||"date"===ue.type&&"day"===a||"month"===ue.type&&"month"===a||"year"===ue.type&&"year"===a){if(!(!1===se.set.date(e))&&ue.closable){se.popup("hide");var n=se.get.calendarModule(ue.endCalendar);n&&("focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{var r="year"===a?ue.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";se.set.mode(r),"hour"===a||"day"===a&&se.get.date()?se.set.date(e,!0,!1):se.set.focusDate(e)}},changeDate:function(e){se.set.date(e)},clear:function(){se.set.date(x)},popup:function(){return d.popup.apply(d,arguments)},focus:function(){u.length?u.focus():me.focus()},blur:function(){u.length?u.blur():me.blur()},helper:{isDisabled:function(a,n){return("day"===n||"month"===n||"year"===n)&&(-1!==ue.disabledDaysOfWeek.indexOf(a.getDay())||ue.disabledDates.some(function(e){if("string"==typeof e&&(e=se.helper.sanitiseDate(e)),e instanceof Date)return se.helper.dateEqual(a,e,n);if(null!==e&&"object"==typeof e)if(e[pe.year]){if("number"==typeof e[pe.year])return a.getFullYear()==e[pe.year];if(Array.isArray(e[pe.year]))return-1<e[pe.year].indexOf(a.getFullYear())}else if(e[pe.month]){if("number"==typeof e[pe.month])return a.getMonth()==e[pe.month];if(Array.isArray(e[pe.month]))return-1<e[pe.month].indexOf(a.getMonth());if(e[pe.month]instanceof Date){var t=se.helper.sanitiseDate(e[pe.month]);return a.getMonth()==t.getMonth()&&a.getFullYear()==t.getFullYear()}}else if(e[pe.date]&&"day"===n){if(e[pe.date]instanceof Date)return se.helper.dateEqual(a,se.helper.sanitiseDate(e[pe.date]),n);if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){return se.helper.dateEqual(a,e,n)})}}))},isEnabled:function(t,a){return"day"!==a||(0===ue.enabledDates.length||ue.enabledDates.some(function(e){return"string"==typeof e&&(e=se.helper.sanitiseDate(e)),e instanceof Date?se.helper.dateEqual(t,e,a):null!==e&&"object"==typeof e&&e[pe.date]?se.helper.dateEqual(t,se.helper.sanitiseDate(e[pe.date]),a):void 0}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if("string"==typeof(n=e[r])&&(n=se.helper.sanitiseDate(n)),n instanceof Date&&se.helper.dateEqual(t,n,a)){var o={};return o[pe.date]=n,o}if(null!==n&&"object"==typeof n)if(n[pe.year]){if("number"==typeof n[pe.year]&&t.getFullYear()==n[pe.year])return n;if(Array.isArray(n[pe.year])&&-1<n[pe.year].indexOf(t.getFullYear()))return n}else if(n[pe.month]){if("number"==typeof n[pe.month]&&t.getMonth()==n[pe.month])return n;if(Array.isArray(n[pe.month])){if(-1<n[pe.month].indexOf(t.getMonth()))return n}else if(n[pe.month]instanceof Date){var i=se.helper.sanitiseDate(n[pe.month]);if(t.getMonth()==i.getMonth()&&t.getFullYear()==i.getFullYear())return n}}else if(n[pe.date]&&"day"===a){if(n[pe.date]instanceof Date&&se.helper.dateEqual(t,se.helper.sanitiseDate(n[pe.date]),a))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return se.helper.dateEqual(t,e,a)}))return n}}return null},sanitiseDate:function(e){return e?(e instanceof Date||(e=a.date(""+e,ue)),!e||null===e||isNaN(e.getTime())?x:e):x},dateDiff:function(e,t,a){a=a||"day";var n="time"===ue.type,r="year"===a,o=r||"month"===a,i="minute"===a,l=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:r?0:e.getMonth(),n?1:o?1:e.getDate(),l?e.getHours():0,i?ue.minTimeGap*Math.floor(e.getMinutes()/ue.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n?0:r?0:t.getMonth(),n?1:o?1:t.getDate(),l?t.getHours():0,i?ue.minTimeGap*Math.floor(t.getMinutes()/ue.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===se.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var r=se.get.startDate();a=r&&ue.minDate?new Date(Math.max(r,ue.minDate)):r||ue.minDate,n=ue.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),ue.minTimeGap*Math.ceil(a.getMinutes()/ue.minTimeGap)),!(!e||a&&0<se.helper.dateDiff(e,a,t)||n&&0<se.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=se.get.startDate();t=n&&ue.minDate?new Date(Math.max(n,ue.minDate)):n||ue.minDate,a=ue.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),ue.minTimeGap*Math.ceil(t.getMinutes()/ue.minTimeGap));var r="time"===ue.type;return e?t&&0<se.helper.dateDiff(e,t,"minute")?r?se.helper.mergeDateTime(e,t):t:a&&0<se.helper.dateDiff(a,e,"minute")?r?se.helper.mergeDateTime(e,a):a:e: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()===ue.text.today}},setting:function(e,t){if(se.debug("Changing setting",e,t),he.isPlainObject(e))he.extend(!0,ue,e);else{if(t===x)return ue[e];he.isPlainObject(ue[e])?he.extend(!0,ue[e],t):ue[e]=t}},internal:function(e,t){if(he.isPlainObject(e))he.extend(!0,se,e);else{if(t===x)return se[e];se[e]=t}},debug:function(){!ue.silent&&ue.debug&&(ue.performance?se.performance.log(arguments):(se.debug=Function.prototype.bind.call(console.info,console,ue.name+":"),se.debug.apply(console,arguments)))},verbose:function(){!ue.silent&&ue.verbose&&ue.debug&&(ue.performance?se.performance.log(arguments):(se.verbose=Function.prototype.bind.call(console.info,console,ue.name+":"),se.verbose.apply(console,arguments)))},error:function(){ue.silent||(se.error=Function.prototype.bind.call(console.error,console,ue.name+":"),se.error.apply(console,arguments))},performance:{log:function(e){var t,a;ue.performance&&(a=(t=(new Date).getTime())-(D||t),D=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":a})),clearTimeout(se.performance.timer),se.performance.timer=setTimeout(se.performance.display,500)},display:function(){var e=ue.name+":",a=0;D=!1,clearTimeout(se.performance.timer),he.each(y,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",o&&(e+=" '"+o+"'"),(console.group!==x||console.table!==x)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):he.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(n,e,t){var r,o,a,i=c;return e=e||C,t=f||t,"string"==typeof n&&i!==x&&(n=n.split(/[\. ]/),r=n.length-1,he.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(he.isPlainObject(i[a])&&e!=r)i=i[a];else{if(i[a]!==x)return o=i[a],!1;if(!he.isPlainObject(i[t])||e==r)return i[t]!==x?o=i[t]:se.error(l.method,n),!1;i=i[t]}})),he.isFunction(o)?a=o.apply(t,e):o!==x&&(a=o),Array.isArray(g)?g.push(a):g!==x?g=[g,a]:a!==x&&(g=a),o}},b?(c===x&&se.initialize(),se.invoke(v)):(c!==x&&c.invoke("destroy"),se.initialize())}),g!==x?g:this},he.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!1,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,ampm:!0,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,minTimeGap:5,showWeekNumbers:null,disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],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:{header:function(e,t,a){return"year"===t?a.formatter.yearHeader(e,a):"month"===t?a.formatter.monthHeader(e,a):"day"===t?a.formatter.dayHeader(e,a):"hour"===t?a.formatter.hourHeader(e,a):a.formatter.minuteHeader(e,a)},yearHeader:function(e,t){var a=10*Math.ceil(e.getFullYear()/10);return a-9+" - "+(2+a)},monthHeader:function(e,t){return e.getFullYear()},dayHeader:function(e,t){return t.text.months[e.getMonth()]+" "+e.getFullYear()},hourHeader:function(e,t){return t.formatter.date(e,t)},minuteHeader:function(e,t){return t.formatter.date(e,t)},dayColumnHeader:function(e,t){return t.text.days[e]},datetime:function(e,t){if(!e)return"";var a="time"===t.type?"":t.formatter.date(e,t),n=t.type.indexOf("time")<0?"":t.formatter.time(e,t,!1);return a+("datetime"===t.type?" ":"")+n},date:function(e,t){if(!e)return"";var a=e.getDate(),n=t.text.months[e.getMonth()],r=e.getFullYear();return"year"===t.type?r:"month"===t.type?n+" "+r:(t.monthFirst?n+" "+a:a+" "+n)+", "+r},time:function(e,t,a){if(!e)return"";var n=e.getHours(),r=e.getMinutes(),o="";return t.ampm&&(o=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(r<10?"0":"")+r+o},today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim()).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{2}[\/\-\.][0-9]{2}$/)&&(e+=" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var a,n,r,o=new Date(e);if(!isNaN(o.getDate()))return o;e=e.toLowerCase();var i,l,s,u=-1,d=-1,f=-1,p=-1,c=-1,m=x,h="time"===t.type,g=t.type.indexOf("time")<0,D=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!g)for(m=0<=he.inArray(t.text.am.toLowerCase(),D)||!(0<=he.inArray(t.text.pm.toLowerCase(),D))&&x,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(d<0||u<0)for(s=l.split(":"),r=0;r<Math.min(2,s.length);r++)n=parseInt(s[r]),isNaN(n)&&(n=0),0===r?d=n%24:u=n%60;y.splice(a,1)}if(!h){for(a=0;a<D.length;a++)if(!((i=D[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].substring(0,i.length).toLowerCase()===i){p=n+1;break}if(0<=p)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),c=n,y.splice(a,1);break}if(p<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r]),!isNaN(n)&&1<=n&&n<=12){p=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&1<=n&&n<=31){f=n,y.splice(a,1);break}if(c<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a]),!isNaN(n)){n<=99&&(n+=t.currentCentury),c=n,y.splice(a,1);break}}if(!g){if(d<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&0<=n&&n<=23){d=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a]),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&d<0&&f<0&&p<0&&c<0)return null;u<0&&(u=0),d<0&&(d=0),f<0&&(f=1),p<0&&(p=1),c<0&&(c=(new Date).getFullYear()),m!==x&&(m?12===d&&(d=0):d<12&&(d+=12));var v=new Date(c,p-1,f,d,u);return v.getMonth()===p-1&&v.getFullYear()===c||(v=new Date(c,p,0,d,u)),isNaN(v.getTime())?null:v}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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},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",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"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",month:"month",year:"year"},eventClass:"blue"}}(jQuery,window,document);
/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -11,2 +11,2 @@ * http://fomantic-ui.com/

*/
!function(_,ee,te,ne){"use strict";_.isFunction=_.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")(),_.fn.dropdown=function(j){var U,B=_(this),K=_(te),W=B.selector||"",Q="ontouchstart"in te.documentElement,Y=Q?"touchstart":"click",$=(new Date).getTime(),X=[],G=j,J="string"==typeof G,Z=[].slice.call(arguments,1);return B.each(function(n){var c,e,t,i,a,o,s,r,h,f=_.isPlainObject(j)?_.extend(!0,{},_.fn.dropdown.settings,j):_.extend({},_.fn.dropdown.settings),g=f.className,u=f.message,l=f.fields,p=f.keys,b=f.metadata,d=f.namespace,v=f.regExp,w=f.selector,m=f.error,C=f.templates,x="."+d,y="module-"+d,S=_(this),A=_(f.context),T=S.find(w.text),L=S.find(w.search),I=S.find(w.sizer),D=S.find(w.input),k=S.find(w.icon),q=S.find(w.clearIcon),R=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),O=S.children(w.menu),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_(),M=!1,z=!1,F=!1,P=!1,N=this,H=S.data(y);h={initialize:function(){h.debug("Initializing dropdown",f),h.is.alreadySetup()?h.setup.reference():(f.ignoreDiacritics&&!String.prototype.normalize&&(f.ignoreDiacritics=!1,h.error(m.noNormalize,N)),h.setup.layout(),f.values&&(h.set.initialLoad(),h.change.values(f.values),h.remove.initialLoad()),h.refreshData(),h.save.defaults(),h.restore.selected(),h.create.id(),h.bind.events(),h.observeChanges(),h.instantiate())},instantiate:function(){h.verbose("Storing instance of dropdown",h),H=h,S.data(y,h)},destroy:function(){h.verbose("Destroying previous dropdown",S),h.remove.tabbable(),h.remove.active(),O.transition("stop all"),O.removeClass(g.visible).addClass(g.hidden),S.off(x).removeData(y),O.off(x),K.off(a),h.disconnect.menuObserver(),h.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in ee&&(s=new MutationObserver(h.event.select.mutation),r=new MutationObserver(h.event.menu.mutation),h.debug("Setting up mutation observer",s,r),h.observe.select(),h.observe.menu())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){s&&s.disconnect()}},observe:{select:function(){h.has.input()&&s&&s.observe(S[0],{childList:!0,subtree:!0})},menu:function(){h.has.menu()&&r&&r.observe(O[0],{childList:!0,subtree:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),a="."+o,h.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i,a;return!!(e=e||h.get.userValues())&&(e=Array.isArray(e)?e:[e],_.each(e,function(e,t){!1===h.get.item(t)&&(a=f.templates.addition(h.add.variables(u.addResult,t)),i=_("<div />").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),f.hideAdditions&&i.addClass(g.hidden),n=n===ne?i:n.add(i),h.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=h.get.userValues();t&&(h.debug("Adding user labels",t),_.each(t,function(e,t){h.verbose("Adding custom user value"),h.add.label(t,t)}))},menu:function(){O=_("<div />").addClass(g.menu).appendTo(S)},sizer:function(){I=_("<span />").addClass(g.sizer).insertAfter(L)}},search:function(e){e=e!==ne?e:h.get.query(),h.verbose("Searching for query",e),h.has.minCharacters(e)?h.filter(e):h.hide(null,!0)},select:{firstUnfiltered:function(){h.verbose("Selecting first non-filtered element"),h.remove.selectedItem(),E.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0<t.length?(h.verbose("Moving selection to",t),t.addClass(g.selected)):(h.verbose("Moving selection to",n),n.addClass(g.selected))}},setup:{api:function(){var e={debug:f.debug,urlData:{value:h.get.value(),query:h.get.query()},on:!1};h.verbose("First request, initializing API"),S.api(e)},layout:function(){S.is("select")&&(h.setup.select(),h.setup.returnedObject()),h.has.menu()||h.create.menu(),h.is.selection()&&h.is.clearable()&&!h.has.clearItem()&&(h.verbose("Adding clear icon"),q=_("<i />").addClass("remove icon").insertBefore(T)),h.is.search()&&!h.has.search()&&(h.verbose("Adding search input"),L=_("<input />").addClass(g.search).prop("autocomplete","off").insertBefore(T)),h.is.multiple()&&h.is.searchSelection()&&!h.has.sizer()&&h.create.sizer(),f.allowTab&&h.set.tabbable()},select:function(){var e=h.get.selectValues();h.debug("Dropdown initialized on a select",e),S.is("select")&&(D=S),0<D.parent(w.dropdown).length?(h.debug("UI dropdown already exists. Creating dropdown menu only"),S=D.closest(w.dropdown),h.has.menu()||h.create.menu(),O=S.children(w.menu),h.setup.menu(e)):(h.debug("Creating entire dropdown from select"),S=_("<div />").attr("class",D.attr("class")).addClass(g.selection).addClass(g.dropdown).html(C.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(g.multiple)&&!1===D.prop("multiple")&&(h.error(m.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&h.set.multiple(),D.prop("disabled")&&(h.debug("Disabling dropdown"),S.addClass(g.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(S)),h.refresh()},menu:function(e){O.html(C.menu(e,l,f.preserveHTML,f.className)),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},reference:function(){h.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(w.dropdown),H=S.data(y),N=S.get(0),h.refresh(),h.setup.returnedObject()},returnedObject:function(){var e=B.slice(0,n),t=B.slice(n+1);B=e.add(S).add(t)}},refresh:function(){h.refreshSelectors(),h.refreshData()},refreshItems:function(){E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},refreshSelectors:function(){h.verbose("Refreshing selector cache"),T=S.find(w.text),L=S.find(w.search),D=S.find(w.input),k=S.find(w.icon),R=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),O=S.children(w.menu),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},refreshData:function(){h.verbose("Refreshing cached metadata"),E.removeData(b.text).removeData(b.value)},clearData:function(){h.verbose("Clearing metadata"),E.removeData(b.text).removeData(b.value),S.removeData(b.defaultText).removeData(b.defaultValue).removeData(b.placeholderText)},toggle:function(){h.verbose("Toggling menu visibility"),h.is.active()?h.hide():h.show()},show:function(e,t){if(e=_.isFunction(e)?e:function(){},!h.can.show()&&h.is.remote()&&(h.debug("No API results retrieved, searching before show"),h.queryRemote(h.get.query(),h.show)),h.can.show()&&!h.is.active()){if(h.debug("Showing dropdown"),!h.has.message()||h.has.maxSelections()||h.has.allResultsFiltered()||h.remove.message(),h.is.allFiltered())return!0;!1!==f.onShow.call(N)&&h.animate.show(function(){h.can.click()&&h.bind.intent(),h.has.search()&&!t&&h.focusSearch(),h.set.visible(),e.call(N)})}},hide:function(e,t){e=_.isFunction(e)?e:function(){},h.is.active()&&!h.is.animatingOutward()?(h.debug("Hiding dropdown"),!1!==f.onHide.call(N)&&h.animate.hide(function(){h.remove.visible(),h.is.focusedOnSearch()&&!0!==t&&L.blur(),e.call(N)})):h.can.click()&&h.unbind.intent(),P=!1},hideOthers:function(){h.verbose("Finding other dropdowns to hide"),B.not(S).has(w.menu+"."+g.visible).dropdown("hide")},hideMenu:function(){h.verbose("Hiding menu instantaneously"),h.remove.active(),h.remove.visible(),O.transition("hide")},hideSubMenus:function(){var e=O.children(w.item).find(w.menu);h.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){h.bind.keyboardEvents(),h.bind.inputEvents(),h.bind.mouseEvents()},keyboardEvents:function(){h.verbose("Binding keyboard events"),S.on("keydown"+x,h.event.keydown),h.has.search()&&S.on(h.get.inputEvent()+x,w.search,h.event.input),h.is.multiple()&&K.on("keydown"+a,h.event.document.keydown)},inputEvents:function(){h.verbose("Binding input change events"),S.on("change"+x,w.input,h.event.change)},mouseEvents:function(){h.verbose("Binding mouse events"),h.is.multiple()&&S.on(Y+x,w.label,h.event.label.click).on(Y+x,w.remove,h.event.remove.click),h.is.searchSelection()?(S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("mousedown"+x,w.menu,h.event.menu.mousedown).on("mouseup"+x,w.menu,h.event.menu.mouseup).on(Y+x,w.icon,h.event.icon.click).on(Y+x,w.clearIcon,h.event.clearIcon.click).on("focus"+x,w.search,h.event.search.focus).on(Y+x,w.search,h.event.search.focus).on("blur"+x,w.search,h.event.search.blur).on(Y+x,w.text,h.event.text.focus),h.is.multiple()&&S.on(Y+x,h.event.click)):("click"==f.on?S.on(Y+x,w.icon,h.event.icon.click).on(Y+x,h.event.test.toggle):"hover"==f.on?S.on("mouseenter"+x,h.delay.show).on("mouseleave"+x,h.delay.hide):S.on(f.on+x,h.toggle),S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("focus"+x,h.event.focus).on(Y+x,w.clearIcon,h.event.clearIcon.click),h.has.menuSearch()?S.on("blur"+x,w.search,h.event.search.blur):S.on("blur"+x,h.event.blur)),O.on((Q?"touchstart":"mouseenter")+x,w.item,h.event.item.mouseenter).on("mouseleave"+x,w.item,h.event.item.mouseleave).on("click"+x,w.item,h.event.item.click)},intent:function(){h.verbose("Binding hide intent event to document"),Q&&K.on("touchstart"+a,h.event.test.touch).on("touchmove"+a,h.event.test.touch),K.on(Y+a,h.event.test.hide)}},unbind:{intent:function(){h.verbose("Removing hide intent event from document"),Q&&K.off("touchstart"+a).off("touchmove"+a),K.off(Y+a)}},filter:function(e){function t(){h.is.multiple()&&h.filterActive(),(e||!e&&0==h.get.activeItem().length)&&h.select.firstUnfiltered(),h.has.allResultsFiltered()?f.onNoResults.call(N,n)?f.allowAdditions?f.hideAdditions&&(h.verbose("User addition with no menu, setting empty style"),h.set.empty(),h.hideMenu()):(h.verbose("All items filtered, showing message",n),h.add.message(u.noResults)):(h.verbose("All items filtered, hiding dropdown",n),h.hideMenu()):(h.remove.empty(),h.remove.message()),f.allowAdditions&&h.add.userSuggestion(h.escape.htmlEntities(e)),h.is.searchSelection()&&h.can.show()&&h.is.focusedOnSearch()&&h.show()}var n=e!==ne?e:h.get.query();f.useLabels&&h.has.maxSelections()||(f.apiSettings?h.can.useAPI()?h.queryRemote(n,function(){f.filterRemoteData&&h.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(f.delimiter):[]),_.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(g.filtered)}),t()}):h.error(m.noAPI):(h.filterItems(n),t()))},queryRemote:function(e,n){var t={errorDuration:!1,cache:"local",throttle:f.throttle,urlData:{query:e},onError:function(){h.add.message(u.serverError),n()},onFailure:function(){h.add.message(u.serverError),n()},onSuccess:function(e){var t=e[l.remoteValues];Array.isArray(t)||(t=[]),h.remove.message(),h.setup.menu({values:t}),0!==t.length||f.allowAdditions||h.add.message(u.noResults),n()}};S.api("get request")||h.setup.api(),t=_.extend(!0,{},t,f.apiSettings),S.api("setting",t).api("query")},filterItems:function(e){var i=h.remove.diacritics(e!==ne?e:h.get.query()),a=null,t=h.escape.string(i),n=(f.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+t,n);h.has.query()&&(a=[],h.verbose("Searching for matching values",i),E.each(function(){var e,t,n=_(this);if(n.hasClass(g.unfilterable))return a.push(this),!0;if("both"===f.match||"text"===f.match){if(-1!==(e=h.remove.diacritics(String(h.get.choiceText(n,!1)))).search(o))return a.push(this),!0;if("exact"===f.fullTextSearch&&h.exactSearch(i,e))return a.push(this),!0;if(!0===f.fullTextSearch&&h.fuzzySearch(i,e))return a.push(this),!0}if("both"===f.match||"value"===f.match){if(-1!==(t=h.remove.diacritics(String(h.get.choiceValue(n,e)))).search(o))return a.push(this),!0;if("exact"===f.fullTextSearch&&h.exactSearch(i,t))return a.push(this),!0;if(!0===f.fullTextSearch&&h.fuzzySearch(i,t))return a.push(this),!0}})),h.debug("Showing only matched items",i),h.remove.filteredItem(),a&&E.not(a).addClass(g.filtered),h.has.query()?!0===f.hideDividers?V.addClass(g.hidden):"empty"===f.hideDividers&&V.removeClass(g.hidden).filter(function(){var e=_(this).nextUntil(w.item);return 0===(e.length?e:_(this)).nextUntil(w.divider).filter(w.item+":not(."+g.filtered+")").length}).addClass(g.hidden):V.removeClass(g.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=f.ignoreSearchCase?e.toLowerCase():e,t=f.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 s=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===s)continue e;return!1}return!0},exactSearch:function(e,t){return e=f.ignoreSearchCase?e.toLowerCase():e,-1<(t=f.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){f.useLabels&&E.filter("."+g.active).addClass(g.filtered)},focusSearch:function(e){h.has.search()&&!h.is.focusedOnSearch()&&(e?(S.off("focus"+x,w.search),L.focus(),S.on("focus"+x,w.search,h.event.search.focus)):L.focus())},blurSearch:function(){h.has.search()&&L.blur()},forceSelection:function(){var e=E.not(g.filtered).filter("."+g.selected).eq(0),t=E.not(g.filtered).filter("."+g.active).eq(0),n=0<e.length?e:t,i=0<n.length;f.allowAdditions||i&&!h.is.multiple()?(h.debug("Forcing partial selection to selected item",n),h.event.item.click.call(n,{},!0)):h.remove.searchTerm()},change:{values:function(e){f.allowAdditions||h.clear(),h.debug("Creating dropdown with specified values",e),h.setup.menu({values:e}),_.each(e,function(e,t){if(1==t.selected&&(h.debug("Setting initial selection to",t[l.value]),h.set.selected(t[l.value]),!h.is.multiple()))return!1}),h.has.selectInput()&&(h.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),_.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),i=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('<option value="'+n+'">'+i+"</option>")}),h.observe.select())}},event:{change:function(){F||(h.debug("Input changed, updating selection"),h.set.selected())},focus:function(){f.showOnFocus&&!M&&h.is.hidden()&&!t&&h.show()},blur:function(e){t=te.activeElement===this,M||t||(h.remove.activeLabel(),h.hide())},mousedown:function(){h.is.searchSelection()?i=!0:M=!0},mouseup:function(){h.is.searchSelection()?i=!1:M=!1},click:function(e){_(e.target).is(S)&&(h.is.focusedOnSearch()?h.show():h.focusSearch())},search:{focus:function(e){M=!0,h.is.multiple()&&h.remove.activeLabel(),(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)&&h.search()},blur:function(e){t=te.activeElement===this,h.is.searchSelection()&&!i&&(z||t||(f.forceSelection?h.forceSelection():f.allowAdditions||h.remove.searchTerm(),h.hide())),i=!1}},clearIcon:{click:function(e){h.clear(),h.is.searchSelection()&&h.remove.searchTerm(),h.hide(),e.stopPropagation()}},icon:{click:function(e){P=!0,h.has.search()?h.is.active()?h.blurSearch():f.showOnFocus?h.focusSearch():h.toggle():h.toggle()}},text:{focus:function(e){M=!0,h.focusSearch()}},input:function(e){(h.is.multiple()||h.is.searchSelection())&&h.set.filtered(),clearTimeout(h.timer),h.timer=setTimeout(h.search,f.delay.search)},label:{click:function(e){var t=_(this),n=S.find(w.label),i=n.filter("."+g.active),a=t.nextAll("."+g.active),o=t.prevAll("."+g.active),s=0<a.length?t.nextUntil(a).add(i).add(t):t.prevUntil(o).add(i).add(t);e.shiftKey?(i.removeClass(g.active),s.addClass(g.active)):e.ctrlKey?t.toggleClass(g.active):(i.removeClass(g.active),t.addClass(g.active)),f.onLabelSelect.apply(this,n.filter("."+g.active))}},remove:{click:function(){var e=_(this).parent();e.hasClass(g.active)?h.remove.activeLabels():h.remove.activeLabels(e)}},test:{toggle:function(e){var t=h.is.multiple()?h.show:h.toggle;h.is.bubbledLabelClick(e)||h.is.bubbledIconClick(e)||h.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){h.determine.eventOnElement(e,function(){"touchstart"==e.type?h.timer=setTimeout(function(){h.hide()},f.delay.touch):"touchmove"==e.type&&clearTimeout(h.timer)}),e.stopPropagation()},hide:function(e){h.determine.eventInModule(e,h.hide)&&N.id&&_(e.target).attr("for")===N.id&&e.preventDefault()}},select:{mutation:function(e){h.debug("<select> modified, recreating menu"),h.is.selectMutation(e)&&(h.disconnect.selectObserver(),h.refresh(),h.setup.select(),h.set.selected(),h.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?_(t.addedNodes[0]):_(!1),i=t.removedNodes?_(t.removedNodes[0]):_(!1),a=n.add(i),o=a.is(w.addition)||0<a.closest(w.addition).length,s=a.is(w.message)||0<a.closest(w.message).length;o||s?(h.debug("Updating item selector cache"),h.refreshItems()):(h.debug("Menu modified, updating selector cache"),h.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=_(e.target),n=_(this),i=n.children(w.menu),a=n.siblings(w.item).children(w.menu),o=0<i.length;0<i.find(t).length||!o||(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Showing sub-menu",i),_.each(a,function(){h.animate.hide(!1,_(this))}),h.animate.show(!1,i)},f.delay.show),e.preventDefault())},mouseleave:function(e){var t=_(this).children(w.menu);0<t.length&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Hiding sub-menu",t),h.animate.hide(!1,t)},f.delay.hide))},click:function(e,t){var n=_(this),i=_(e?e.target:""),a=n.find(w.menu),o=h.get.choiceText(n),s=h.get.choiceValue(n,o),r=0<a.length,l=0<a.find(i).length;"input"!==te.activeElement.tagName.toLowerCase()&&_(te.activeElement).blur(),l||r&&!f.allowCategorySelection||(h.is.searchSelection()&&(f.allowAdditions&&h.remove.userAddition(),h.remove.searchTerm(),h.is.focusedOnSearch()||1==t||h.focusSearch(!0)),f.useLabels||(h.remove.filteredItem(),h.set.scrollPosition(n)),h.determine.selectAction.call(this,o,s))}},document:{keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n=S.find(w.label),i=n.filter("."+g.active),a=(i.data(b.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1==o,u=h.is.searchSelection(),d=h.is.focusedOnSearch(),v=h.is.focused(),m=d&&0===h.get.caretPosition(!1),f=m&&0!==h.get.caretPosition(!0);if(u&&!s&&!d)return;t==p.leftArrow?!v&&!m||s?s&&(e.shiftKey?h.verbose("Adding previous label to selection"):(h.verbose("Selecting previous label"),n.removeClass(g.active)),l&&!r?i.addClass(g.active):i.prev(w.siblingLabel).addClass(g.active).end(),e.preventDefault()):(h.verbose("Selecting previous label"),n.last().addClass(g.active)):t==p.rightArrow?(v&&!s&&n.first().addClass(g.active),s&&(e.shiftKey?h.verbose("Adding next label to selection"):(h.verbose("Selecting next label"),n.removeClass(g.active)),c?u?d?n.removeClass(g.active):h.focusSearch():r?i.next(w.siblingLabel).addClass(g.active):i.addClass(g.active):i.next(w.siblingLabel).addClass(g.active),e.preventDefault())):t==p.deleteKey||t==p.backspace?s?(h.verbose("Removing active labels"),c&&u&&!d&&h.focusSearch(),i.last().next(w.siblingLabel).addClass(g.active),h.remove.activeLabels(i),e.preventDefault()):!m||f||s||t!=p.backspace||(h.verbose("Removing last label on input backspace"),i=n.last().addClass(g.active),h.remove.activeLabels(i)):i.removeClass(g.active)}}},keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n,i=E.not(w.unselectable).filter("."+g.selected).eq(0),a=O.children("."+g.active).eq(0),o=0<i.length?i:a,s=0<o.length?o.siblings(":not(."+g.filtered+")").addBack():O.children(":not(."+g.filtered+")"),r=o.children(w.menu),l=o.closest(w.menu),c=l.hasClass(g.visible)||l.hasClass(g.animating)||0<l.parent(w.menu).length,u=0<r.length,d=0<o.length,v=0<o.not(w.unselectable).length,m=t==p.delimiter&&f.allowAdditions&&h.is.multiple();if(f.allowAdditions&&f.hideAdditions&&(t==p.enter||m)&&v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&h.remove.searchTerm(),h.is.multiple()&&e.preventDefault()),h.is.visible()){if(t!=p.enter&&!m||(t==p.enter&&d&&u&&!f.allowCategorySelection?(h.verbose("Pressed enter on unselectable category, opening sub menu"),t=p.rightArrow):v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&(h.remove.searchTerm(),h.is.multiple()&&L.focus())),e.preventDefault()),d&&(t==p.leftArrow&&l[0]!==O[0]&&(h.verbose("Left key pressed, closing sub-menu"),h.animate.hide(!1,l),o.removeClass(g.selected),l.closest(w.item).addClass(g.selected),e.preventDefault()),t==p.rightArrow&&u&&(h.verbose("Right key pressed, opening sub-menu"),h.animate.show(!1,r),o.removeClass(g.selected),r.find(w.item).eq(0).addClass(g.selected),e.preventDefault())),t==p.upArrow){if(n=d&&c?o.prevAll(w.item+":not("+w.unselectable+")").eq(0):E.eq(0),s.index(n)<0)return h.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();h.verbose("Up key pressed, changing active item"),o.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}if(t==p.downArrow){if(0===(n=d&&c?n=o.nextAll(w.item+":not("+w.unselectable+")").eq(0):E.eq(0)).length)return h.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();h.verbose("Down key pressed, changing active item"),E.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}t==p.pageUp&&(h.scrollPage("up"),e.preventDefault()),t==p.pageDown&&(h.scrollPage("down"),e.preventDefault()),t==p.escape&&(h.verbose("Escape key pressed, closing dropdown"),h.hide())}else m&&e.preventDefault(),t!=p.downArrow||h.is.visible()||(h.verbose("Down key pressed, showing dropdown"),h.show(),e.preventDefault())}else h.has.search()||h.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=te.createEvent("HTMLEvents"),t=D[0];t&&(h.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){c=!0,h.verbose("Determining action",f.action),_.isFunction(h.action[f.action])?(h.verbose("Triggering preset action",f.action,e,t),h.action[f.action].call(N,e,t,this)):_.isFunction(f.action)?(h.verbose("Triggering user action",f.action,e,t),f.action.call(N,e,t,this)):h.error(m.action,f.action),c=!1},eventInModule:function(e,t){var n=_(e.target),i=0<n.closest(te.documentElement).length,a=0<n.closest(S).length;return t=_.isFunction(t)?t:function(){},i&&!a?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=_(e.target),i=n.closest(w.siblingLabel),a=te.body.contains(e.target),o=0===S.find(i).length||!(h.is.multiple()&&f.useLabels),s=0===n.closest(O).length;return t=_.isFunction(t)?t:function(){},a&&o&&s?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==ne?t:e,h.can.activate(_(n))&&(h.set.selected(t,_(n)),h.is.multiple()||h.hideAndClear())},select:function(e,t,n){t=t!==ne?t:e,h.can.activate(_(n))&&(h.set.value(t,e,_(n)),h.is.multiple()||h.hideAndClear())},combo:function(e,t,n){t=t!==ne?t:e,h.set.selected(t,_(n)),h.hideAndClear()},hide:function(e,t,n){h.set.value(t,e,_(n)),h.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return S.data(b.defaultText)},defaultValue:function(){return S.data(b.defaultValue)},placeholderText:function(){return"auto"!=f.placeholder&&"string"==typeof f.placeholder?f.placeholder:S.data(b.placeholderText)||""},text:function(){return T.text()},query:function(){return String(L.val()).trim()},searchWidth:function(e){return e=e!==ne?e:L.val(),I.text(e),Math.ceil(I.width()+1)},selectionCount:function(){var e=h.get.values();return h.is.multiple()?Array.isArray(e)?e.length:0:""!==h.get.value()?1:0},transition:function(e){return"auto"==f.transition?h.is.upward(e)?"slide up":"slide down":f.transition},userValues:function(){var e=h.get.values();return!!e&&(e=Array.isArray(e)?e:[e],_.grep(e,function(e){return!1===h.get.item(e)}))},uniqueArray:function(n){return _.grep(n,function(e,t){return _.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=L.get(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():S.data(b.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===ne||t?"":e},values:function(){var e=h.get.value();return""===e?"":!h.has.selectInput()&&h.is.multiple()?"string"==typeof e?h.escape.htmlEntities(e).split(f.delimiter):"":e},remoteValues:function(){var e=h.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),_.each(e,function(e,t){var n=h.read.remoteData(t);h.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)})),i},choiceText:function(e,t){if(t=t!==ne?t:f.preserveHTML,e)return 0<e.find(w.menu).length&&(h.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(w.menu).remove(),e.find(w.menuIcon).remove()),e.data(b.text)!==ne?e.data(b.text):t?e.html().trim():e.text().trim()},choiceValue:function(e,t){return t=t||h.get.choiceText(e),!!e&&(e.data(b.value)!==ne?String(e.data(b.value)):"string"==typeof t?String(f.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=L[0];return!!e&&(e.oninput!==ne?"input":e.onpropertychange!==ne?"propertychange":"keyup")},selectValues:function(){var s={},r=[];return s.values=[],S.find("option").each(function(){var e=_(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==ne?e.attr("value"):t,a=e.data(b.text)!==ne?e.data(b.text):t,o=e.parent("optgroup");"auto"===f.placeholder&&""===i?s.placeholder=t:(o.length===r.length&&o[0]===r[0]||(s.values.push({type:"header",divider:f.headerDivider,name:o.attr("label")||""}),r=o),s.values.push({name:t,value:i,text:a,disabled:n}))}),f.placeholder&&"auto"!==f.placeholder&&(h.debug("Setting placeholder value to",f.placeholder),s.placeholder=f.placeholder),f.sortSelect?(!0===f.sortSelect?s.values.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===f.sortSelect?s.values.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):_.isFunction(f.sortSelect)&&s.values.sort(f.sortSelect),h.debug("Retrieved and sorted values from select",s)):h.debug("Retrieved values from select",s),s},activeItem:function(){return E.filter("."+g.active)},selectedItem:function(){var e=E.not(w.unselectable).filter("."+g.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=h.get.item(e),n=h.create.userChoice(e);return n&&0<n.length&&(t=0<t.length?t.add(n):n),t},item:function(i,a){var e,o,s=!1;return i=i!==ne?i:h.get.values()!==ne?h.get.values():h.get.text(),e=(o=h.is.multiple()&&Array.isArray(i))?0<i.length:i!==ne&&null!==i,a=""===i||!1===i||!0===i||(a||!1),e&&E.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);if(null!==n&&n!==ne)if(o)-1!==_.inArray(h.escape.htmlEntities(String(n)),i.map(function(e){return String(e)}))&&(s=s?s.add(e):e);else if(a){if(h.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return s=e,!0}else if(f.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),h.escape.htmlEntities(String(n))===h.escape.htmlEntities(String(i)))return h.verbose("Found select item by value",n,i),s=e,!0}),s}},check:{maxSelections:function(e){return!f.maxSelections||((e=e!==ne?e:h.get.selectionCount())>=f.maxSelections?(h.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(g.filtered),h.add.message(u.maxSelections)),!0):(h.verbose("No longer at maximum selection count"),h.remove.message(),h.remove.filteredItem(),h.is.searchSelection()&&h.filterItems(),!1))}},restore:{defaults:function(e){h.clear(e),h.restore.defaultText(),h.restore.defaultValue()},defaultText:function(){var e=h.get.defaultText();e===h.get.placeholderText?(h.debug("Restoring default placeholder text",e),h.set.placeholderText(e)):(h.debug("Restoring default text",e),h.set.text(e))},placeholderText:function(){h.set.placeholderText()},defaultValue:function(){var e=h.get.defaultValue();e!==ne&&(h.debug("Restoring default value",e),""!==e?(h.set.value(e),h.set.selected()):(h.remove.activeItem(),h.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(h.error(m.labels),f.useLabels=!0),h.debug("Restoring selected values"),h.create.userLabels()),h.check.maxSelections()},selected:function(){h.restore.values(),h.is.multiple()?(h.debug("Restoring previously selected values and labels"),h.restore.labels()):h.debug("Restoring previously selected values")},values:function(){h.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&h.get.remoteValues()?h.restore.remoteValues():h.set.selected();var e=h.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(g.noselection):D.removeClass(g.noselection),h.remove.initialLoad()},remoteValues:function(){var e=h.get.remoteValues();h.debug("Recreating selected from session data",e),e&&(h.is.single()?_.each(e,function(e,t){h.set.text(t)}):_.each(e,function(e,t){h.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(ee.Storage!==ne)return(t=sessionStorage.getItem(e))!==ne&&t;h.error(m.noStorage)}},save:{defaults:function(){h.save.defaultText(),h.save.placeholderText(),h.save.defaultValue()},defaultValue:function(){var e=h.get.value();h.verbose("Saving default value as",e),S.data(b.defaultValue,e)},defaultText:function(){var e=h.get.text();h.verbose("Saving default text as",e),S.data(b.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&T.hasClass(g.placeholder)&&(e=h.get.text(),h.verbose("Saving placeholder text as",e),S.data(b.placeholderText,e))},remoteData:function(e,t){ee.Storage!==ne?(h.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):h.error(m.noStorage)}},clear:function(e){h.is.multiple()&&f.useLabels?h.remove.labels():(h.remove.activeItem(),h.remove.selectedItem(),h.remove.filteredItem()),h.set.placeholderText(),h.clearValue(e)},clearValue:function(e){h.set.value("",null,null,e)},scrollPage:function(e,t){var n,i,a=t||h.get.selectedItem(),o=a.closest(w.menu),s=o.outerHeight(),r=o.scrollTop(),l=E.eq(0).outerHeight(),c=Math.floor(s/l),u=(o.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=E.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length&&(h.debug("Scrolling page",e,n),a.removeClass(g.selected),n.addClass(g.selected),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),o.scrollTop(u))},set:{filtered:function(){var e=h.is.multiple(),t=h.is.searchSelection(),n=e&&t,i=t?h.get.query():"",a="string"==typeof i&&0<i.length,o=h.get.searchWidth(),s=""!==i;e&&a&&(h.verbose("Adjusting input width",o,f.glyphWidth),L.css("width",o)),a||n&&s?(h.verbose("Hiding placeholder text"),T.addClass(g.filtered)):e&&(!n||s)||(h.verbose("Showing placeholder text"),T.removeClass(g.filtered))},empty:function(){S.addClass(g.empty)},loading:function(){S.addClass(g.loading)},placeholderText:function(e){e=e||h.get.placeholderText(),h.debug("Setting placeholder text",e),h.set.text(e),T.addClass(g.placeholder)},tabbable:function(){h.is.searchSelection()?(h.debug("Added tabindex to searchable dropdown"),L.val("").attr("tabindex",0),O.attr("tabindex",-1)):(h.debug("Added tabindex to dropdown"),S.attr("tabindex")===ne&&(S.attr("tabindex",0),O.attr("tabindex",-1)))},initialLoad:function(){h.verbose("Setting initial load"),e=!0},activeItem:function(e){f.allowAdditions&&0<e.filter(w.addition).length?e.addClass(g.filtered):e.addClass(g.active)},partialSearch:function(e){var t=h.get.query().length;L.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,s,r;n=(e=e||h.get.selectedItem()).closest(w.menu),i=e&&0<e.length,t=t!==ne&&t,0===h.get.activeItem().length&&(t=!1),e&&0<n.length&&i&&(e.position().top,n.addClass(g.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(r=o+n.height()<a+5,s=a-5<o),h.debug("Scrolling to active item",a),(t||s||r)&&n.scrollTop(a),n.removeClass(g.loading))},text:function(e){"combo"===f.action?(h.debug("Changing combo button text",e,R),f.preserveHTML?R.html(e):R.text(e)):"activate"===f.action&&(e!==h.get.placeholderText()&&T.removeClass(g.placeholder),h.debug("Changing text",e,T),T.removeClass(g.filtered),f.preserveHTML?T.html(e):T.text(e))},selectedItem:function(e){var t=h.get.choiceValue(e),n=h.get.choiceText(e,!1),i=h.get.choiceText(e,!0);h.debug("Setting user selection to item",e),h.remove.activeItem(),h.set.partialSearch(n),h.set.activeItem(e),h.set.selected(t,e),h.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+g.selected),i=0<n.length&&h.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(E).eq(0),h.has.firstLetter(t,e)&&(a=t)),a||E.each(function(){if(h.has.firstLetter(_(this),e))return a=_(this),!1}),a&&(h.verbose("Scrolling to next value with letter",e),h.set.scrollPosition(a),n.removeClass(g.selected),a.addClass(g.selected),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(a))},direction:function(e){"auto"==f.direction?(e?h.is.upward(e)&&h.remove.upward(e):h.remove.upward(),h.can.openDownward(e)?h.remove.upward(e):h.set.upward(e),h.is.leftward(e)||h.can.openRightward(e)||h.set.leftward(e)):"upward"==f.direction&&h.set.upward(e)},upward:function(e){(e||S).addClass(g.upward)},leftward:function(e){(e||O).addClass(g.leftward)},value:function(e,t,n,i){e===ne||""===e||Array.isArray(e)&&0===e.length?D.addClass(g.noselection):D.removeClass(g.noselection);var a=h.escape.value(e),o=0<D.length,s=h.get.values(),r=e!==ne?String(e):e;if(o){if(!f.allowReselection&&r==s&&(h.verbose("Skipping value update already same value",e,s),!h.is.initialLoad()))return;h.is.single()&&h.has.selectInput()&&h.can.extendSelect()&&(h.debug("Adding user option",e),h.add.optionValue(e)),h.debug("Updating input value",a,s),F=!0,D.val(a),!1===f.fireOnInit&&h.is.initialLoad()?h.debug("Input native change event ignored on initial load"):!0!==i&&h.trigger.change(),F=!1}else h.verbose("Storing value in metadata",a,D),a!==s&&S.data(b.value,r);!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",f.onChange):!0!==i&&f.onChange.call(N,e,t,n)},active:function(){S.addClass(g.active)},multiple:function(){S.addClass(g.multiple)},visible:function(){S.addClass(g.visible)},exactly:function(e,t){h.debug("Setting selected to exact values"),h.clear(),h.set.selected(e,t)},selected:function(e,r){var l=h.is.multiple();(r=f.allowAdditions?r||h.get.itemWithAdditions(e):r||h.get.item(e))&&(h.debug("Setting selected menu item to",r),h.is.multiple()&&h.remove.searchWidth(),h.is.single()?(h.remove.activeItem(),h.remove.selectedItem()):f.useLabels&&h.remove.selectedItem(),r.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t),i=e.hasClass(g.filtered),a=e.hasClass(g.active),o=e.hasClass(g.addition),s=l&&1==r.length;l?!a||o?(f.apiSettings&&f.saveRemoteData&&h.save.remoteData(t,n),f.useLabels?(h.add.label(n,t,s),h.add.value(n,t,e),h.set.activeItem(e),h.filterActive(),h.select.nextAvailable(r)):(h.add.value(n,t,e),h.set.text(h.add.variables(u.count)),h.set.activeItem(e))):i||!f.useLabels&&!c||(h.debug("Selected active value, removing label"),h.remove.selected(n)):(f.apiSettings&&f.saveRemoteData&&h.save.remoteData(t,n),h.set.text(t),h.set.value(n,t,e),e.addClass(g.active).addClass(g.selected))}),h.remove.searchTerm())}},add:{label:function(e,t,n){var i,a=h.is.searchSelection()?L:T,o=h.escape.value(e);f.ignoreCase&&(o=o.toLowerCase()),i=_("<a />").addClass(g.label).attr("data-"+b.value,o).html(C.label(o,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,o,t),h.has.label(e)?h.debug("User selection already exists, skipping",o):(f.label.variation&&i.addClass(f.label.variation),!0===n?(h.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(h.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=O.children(w.message),n=f.templates.message(h.add.variables(e));0<t.length?t.html(n):t=_("<div/>").html(n).addClass(g.message).appendTo(O)},optionValue:function(e){var t=h.escape.value(e);0<D.find('option[value="'+h.escape.string(t)+'"]').length||(h.disconnect.selectObserver(),h.is.single()&&(h.verbose("Removing previous user addition"),D.find("option."+g.addition).remove()),_("<option/>").prop("value",t).addClass(g.addition).html(e).appendTo(D),h.verbose("Adding user addition as an <option>",e),h.observe.select())},userSuggestion:function(e){var t,n=O.children(w.addition),i=h.get.item(e),a=i&&i.not(w.addition).length,o=0<n.length;f.useLabels&&h.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(b.value,e).data(b.text,e).attr("data-"+b.value,e).attr("data-"+b.text,e).removeClass(g.filtered),f.hideAdditions||(t=f.templates.addition(h.add.variables(u.addResult,e)),n.html(t)),h.verbose("Replacing user suggestion with new value",n)):((n=h.create.userChoice(e)).prependTo(O),h.verbose("Adding item choice to menu corresponding with user choice addition",n)),f.hideAdditions&&!h.is.allFiltered()||n.addClass(g.selected).siblings().removeClass(g.selected),h.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),s=-1!==e.search("{term}");return h.verbose("Adding templated variables to message",e),a&&(n=h.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=h.get.selectionCount(),e=e.replace("{maxCount}",f.maxSelections)),s&&(i=t||h.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,a=h.get.values();h.has.value(e)?h.debug("Value already selected"):""!==e?(i=Array.isArray(a)?(i=a.concat([e]),h.get.uniqueArray(i)):[e],h.has.selectInput()?h.can.extendSelect()&&(h.debug("Adding value to select",e,i,D),h.add.optionValue(e)):(i=i.join(f.delimiter),h.debug("Setting hidden input to delimited value",i,D)),!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("Skipping onadd callback on initial load",f.onAdd):f.onAdd.call(N,e,t,n),h.set.value(i,t,n),h.check.maxSelections()):h.debug("Cannot select blank values from multiselect")}},remove:{active:function(){S.removeClass(g.active)},activeLabel:function(){S.find(w.label).removeClass(g.active)},empty:function(){S.removeClass(g.empty)},loading:function(){S.removeClass(g.loading)},initialLoad:function(){e=!1},upward:function(e){(e||S).removeClass(g.upward)},leftward:function(e){(e||O).removeClass(g.leftward)},visible:function(){S.removeClass(g.visible)},activeItem:function(){E.removeClass(g.active)},filteredItem:function(){f.useLabels&&h.has.maxSelections()||(f.useLabels&&h.is.multiple()?E.not("."+g.active).removeClass(g.filtered):E.removeClass(g.filtered),f.hideDividers&&V.removeClass(g.hidden),h.remove.empty())},optionValue:function(e){var t=h.escape.value(e),n=D.find('option[value="'+h.escape.string(t)+'"]');0<n.length&&n.hasClass(g.addition)&&(s&&(s.disconnect(),h.verbose("Temporarily disconnecting mutation observer")),n.remove(),h.verbose("Removing user addition as an <option>",t),s&&s.observe(D[0],{childList:!0,subtree:!0}))},message:function(){O.children(w.message).remove()},searchWidth:function(){L.css("width","")},searchTerm:function(){h.verbose("Cleared search term"),L.val(""),h.set.filtered()},userAddition:function(){E.filter(w.addition).remove()},selected:function(e,t){if(!(t=f.allowAdditions?t||h.get.itemWithAdditions(e):t||h.get.item(e)))return!1;t.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);h.is.multiple()?f.useLabels?(h.remove.value(n,t,e),h.remove.label(n)):(h.remove.value(n,t,e),0===h.get.selectionCount()?h.set.placeholderText():h.set.text(h.add.variables(u.count))):h.remove.value(n,t,e),e.removeClass(g.filtered).removeClass(g.active),f.useLabels&&e.removeClass(g.selected)})},selectedItem:function(){E.removeClass(g.selected)},value:function(e,t,n){var i,a=h.get.values();e=h.escape.htmlEntities(e),h.has.selectInput()?(h.verbose("Input is <select> removing selected option",e),i=h.remove.arrayValue(e,a),h.remove.optionValue(e)):(h.verbose("Removing from delimited values",e),i=(i=h.remove.arrayValue(e,a)).join(f.delimiter)),!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",f.onRemove):f.onRemove.call(N,e,t,n),h.set.value(i,t,n),h.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=_.grep(e,function(e){return t!=e}),h.verbose("Removed value from delimited string",t,e),e},label:function(e,t){var n=S.find(w.label).filter("[data-"+b.value+'="'+h.escape.string(f.ignoreCase?e.toLowerCase():e)+'"]');h.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||S.find(w.label).filter("."+g.active),h.verbose("Removing active label selections",e),h.remove.labels(e)},labels:function(e){e=e||S.find(w.label),h.verbose("Removing labels",e),e.each(function(){var e=_(this),t=e.data(b.value),n=t!==ne?String(t):t,i=h.is.userValue(n);!1!==f.onLabelRemove.call(e,t)?(h.remove.message(),i?(h.remove.value(n),h.remove.label(n)):h.remove.selected(n)):h.debug("Label remove callback cancelled removal")})},tabbable:function(){h.is.searchSelection()?(h.debug("Searchable dropdown initialized"),L.removeAttr("tabindex")):(h.debug("Simple selection dropdown initialized"),S.removeAttr("tabindex")),O.removeAttr("tabindex")},diacritics:function(e){return f.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return h.has.search()&&0<L.closest(O).length},clearItem:function(){return 0<q.length},search:function(){return 0<L.length},sizer:function(){return 0<I.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return f.minCharacters&&!P?(e=e!==ne?String(e):String(h.get.query())).length>=f.minCharacters:!(P=!1)},firstLetter:function(e,t){var n;return!(!e||0===e.length||"string"!=typeof t)&&(n=h.get.choiceText(e,!1),(t=t.toLowerCase())==String(n).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<O.length},message:function(){return 0!==O.children(w.message).length},label:function(e){var t=h.escape.value(e),n=S.find(w.label);return f.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+b.value+'="'+h.escape.string(t)+'"]').length},maxSelections:function(){return f.maxSelections&&h.get.selectionCount()>=f.maxSelections},allResultsFiltered:function(){var e=E.not(w.addition);return e.filter(w.unselectable).length===e.length},userSuggestion:function(){return 0<O.children(w.addition).length},query:function(){return""!==h.get.query()},value:function(e){return f.ignoreCase?h.has.valueIgnoringCase(e):h.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=h.get.values();return!!(Array.isArray(t)?t&&-1!==_.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=h.get.values(),i=!1;return Array.isArray(e)||(e=[e]),_.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return S.hasClass(g.active)},animatingInward:function(){return O.transition("is inward")},animatingOutward:function(){return O.transition("is outward")},bubbledLabelClick:function(e){return _(e.target).is("select, input")&&0<S.closest("label").length},bubbledIconClick:function(e){return 0<_(e.target).closest(k).length},alreadySetup:function(){return S.is("select")&&S.parent(w.dropdown).data(y)!==ne&&0===S.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):O.transition&&O.transition("is animating")},leftward:function(e){return(e||O).hasClass(g.leftward)},clearable:function(){return S.hasClass(g.clearable)||f.clearable},disabled:function(){return S.hasClass(g.disabled)},focused:function(){return te.activeElement===S[0]},focusedOnSearch:function(){return te.activeElement===L[0]},allFiltered:function(){return(h.is.multiple()||h.has.search())&&!(0==f.hideAdditions&&h.has.userSuggestion())&&!h.has.message()&&h.has.allResultsFiltered()},hidden:function(e){return!h.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return _.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return S.hasClass(g.multiple)},remote:function(){return f.apiSettings&&h.can.useAPI()},single:function(){return!h.is.multiple()},selectMutation:function(e){var n=!1;return _.each(e,function(e,t){if(_(t.target).is("select")||_(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return S.hasClass(g.search)},searchSelection:function(){return h.has.search()&&1===L.parent(w.dropdown).length},selection:function(){return S.hasClass(g.selection)},userValue:function(e){return-1!==_.inArray(e,h.get.userValues())},upward:function(e){return(e||S).hasClass(g.upward)},visible:function(e){return e?e.hasClass(g.visible):O.hasClass(g.visible)},verticallyScrollableContext:function(){var e=A.get(0)!==ee&&A.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=A.get(0)!==ee&&A.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!f.useLabels||(!h.has.maxSelections()||!(!h.has.maxSelections()||!e.hasClass(g.active)))},openDownward:function(e){var t,n,i=e||O,a=!0;return i.addClass(g.loading),n={context:{offset:A.get(0)===ee?{top:0,left:0}:A.offset(),scrollTop:A.scrollTop(),height:A.outerHeight()},menu:{offset:i.offset(),height:i.outerHeight()}},h.is.verticallyScrollableContext()&&(n.menu.offset.top+=n.context.scrollTop),a=(t={above:n.context.scrollTop<=n.menu.offset.top-n.context.offset.top-n.menu.height,below:n.context.scrollTop+n.context.height>=n.menu.offset.top-n.context.offset.top+n.menu.height}).below?(h.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(h.verbose("Dropdown cannot fit below, opening upward",t),!1):(h.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),i.removeClass(g.loading),a},openRightward:function(e){var t,n,i=e||O,a=!0;return i.addClass(g.loading),n={context:{offset:A.get(0)===ee?{top:0,left:0}:A.offset(),scrollLeft:A.scrollLeft(),width:A.outerWidth()},menu:{offset:i.offset(),width:i.outerWidth()}},h.is.horizontallyScrollableContext()&&(n.menu.offset.left+=n.context.scrollLeft),(t=n.menu.offset.left-n.context.offset.left+n.menu.width>=n.context.scrollLeft+n.context.width)&&(h.verbose("Dropdown cannot fit in context rightward",t),a=!1),i.removeClass(g.loading),a},click:function(){return Q||"click"==f.on},extendSelect:function(){return f.allowAdditions||f.apiSettings},show:function(){return!h.is.disabled()&&(h.has.items()||h.has.message())},useAPI:function(){return _.fn.api!==ne}},animate:{show:function(e,t){var n,i=t||O,a=t?function(){}:function(){h.hideSubMenus(),h.hideOthers(),h.set.active()};e=_.isFunction(e)?e:function(){},h.verbose("Doing menu show animation",i),h.set.direction(t),n=h.get.transition(t),h.is.selection()&&h.set.scrollPosition(h.get.selectedItem(),!0),(h.is.hidden(i)||h.is.animating(i))&&("none"==n?(a(),i.transition("show"),e.call(N)):_.fn.transition!==ne&&S.transition("is supported")?i.transition({animation:n+" in",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0,onStart:a,onComplete:function(){e.call(N)}}):h.error(m.noTransition,n))},hide:function(e,t){var n=t||O,i=t?function(){}:function(){h.can.click()&&h.unbind.intent(),h.remove.active()},a=h.get.transition(t);e=_.isFunction(e)?e:function(){},(h.is.visible(n)||h.is.animating(n))&&(h.verbose("Doing menu hide animation",n),"none"==a?(i(),n.transition("hide"),e.call(N)):_.fn.transition!==ne&&S.transition("is supported")?n.transition({animation:a+" out",duration:f.duration,debug:f.debug,verbose:f.verbose,queue:!1,onStart:i,onComplete:function(){e.call(N)}}):h.error(m.transition))}},hideAndClear:function(){h.remove.searchTerm(),h.has.maxSelections()||(h.has.search()?h.hide(function(){h.remove.filteredItem()}):h.hide())},delay:{show:function(){h.verbose("Delaying show event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.show,f.delay.show)},hide:function(){h.verbose("Delaying hide event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.hide,f.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,a=n&&-1!==e.search(v.quote),o=[];return i||!a?e:(h.debug("Encoding quote values for use in select",e),t?(_.each(e,function(e,t){o.push(t.replace(v.quote,"&quot;"))}),o):e.replace(v.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(v.escape,"\\$&")},htmlEntities: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}},setting:function(e,t){if(h.debug("Changing setting",e,t),_.isPlainObject(e))_.extend(!0,f,e);else{if(t===ne)return f[e];_.isPlainObject(f[e])?_.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(_.isPlainObject(e))_.extend(!0,h,e);else{if(t===ne)return h[e];h[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,f.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),h.verbose.apply(console,arguments)))},error:function(){f.silent||(h.error=Function.prototype.bind.call(console.error,console,f.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-($||t),$=t,X.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:N,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=f.name+":",n=0;$=!1,clearTimeout(h.performance.timer),_.each(X,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",W&&(e+=" '"+W+"'"),(console.group!==ne||console.table!==ne)&&0<X.length&&(console.groupCollapsed(e),console.table?console.table(X):_.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,s=H;return e=e||Z,t=N||t,"string"==typeof i&&s!==ne&&(i=i.split(/[\. ]/),a=i.length-1,_.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(_.isPlainObject(s[n])&&e!=a)s=s[n];else{if(s[n]!==ne)return o=s[n],!1;if(!_.isPlainObject(s[t])||e==a)return s[t]!==ne?o=s[t]:h.error(m.method,i),!1;s=s[t]}})),_.isFunction(o)?n=o.apply(t,e):o!==ne&&(n=o),Array.isArray(U)?U.push(n):U!==ne?U=[U,n]:n!==ne&&(U=n),o}},J?(H===ne&&h.initialize(),h.invoke(G)):(H!==ne&&H.invoke("destroy"),h.initialize())}),U!==ne?U:B},_.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:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return _(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",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",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",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},_.fn.dropdown.settings.templates={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},dropdown:function(e,t,n,i){var a=e.placeholder||!1,o="",s=_.fn.dropdown.settings.templates.escape;return o+='<i class="dropdown icon"></i>',o+=a?'<div class="default text">'+s(a,n)+"</div>":'<div class="text"></div>',o+='<div class="'+i.menu+'">',o+=_.fn.dropdown.settings.templates.menu(e,t,n,i),o+="</div>"},menu:function(e,r,l,c){var t=e[r.values]||[],u="",d=_.fn.dropdown.settings.templates.escape,v=_.fn.dropdown.settings.templates.deQuote;return _.each(t,function(e,t){var n=t[r.type]?t[r.type]:"item";if("item"===n){var i=t[r.text]?' data-text="'+v(t[r.text])+'"':"",a=t[r.disabled]?c.disabled+" ":"";u+='<div class="'+a+(t[r.class]?v(t[r.class]):c.item)+'" data-value="'+v(t[r.value])+'"'+i+">",t[r.image]&&(u+='<img class="'+(t[r.imageClass]?v(t[r.imageClass]):c.image)+'" src="'+v(t[r.image])+'">'),t[r.icon]&&(u+='<i class="'+v(t[r.icon])+" "+(t[r.iconClass]?v(t[r.iconClass]):c.icon)+'"></i>'),u+=d(t[r.name]||"",l),u+="</div>"}else if("header"===n){var o=d(t[r.name]||"",l),s=t[r.icon]?v(t[r.icon]):c.groupIcon;""===o&&""===s||(u+='<div class="'+(t[r.class]?v(t[r.class]):c.header)+'">',""!==s&&(u+='<i class="'+s+" "+(t[r.iconClass]?v(t[r.iconClass]):c.icon)+'"></i>'),u+=o,u+="</div>"),t[r.divider]&&(u+='<div class="'+c.divider+'"></div>')}}),u},label:function(e,t,n,i){return(0,_.fn.dropdown.settings.templates.escape)(t,n)+'<i class="'+i.delete+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
!function(_,ee,te,ne){"use strict";_.isFunction=_.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")(),_.fn.dropdown=function(j){var U,B=_(this),K=_(te),W=B.selector||"",Q="ontouchstart"in te.documentElement,Y=Q?"touchstart":"click",$=(new Date).getTime(),X=[],G=j,J="string"==typeof G,Z=[].slice.call(arguments,1);return B.each(function(n){var c,e,t,i,a,o,s,r,h,f=_.isPlainObject(j)?_.extend(!0,{},_.fn.dropdown.settings,j):_.extend({},_.fn.dropdown.settings),g=f.className,u=f.message,l=f.fields,p=f.keys,b=f.metadata,d=f.namespace,v=f.regExp,w=f.selector,m=f.error,C=f.templates,x="."+d,y="module-"+d,S=_(this),A=_(f.context),T=S.find(w.text),L=S.find(w.search),I=S.find(w.sizer),D=S.find(w.input),k=S.find(w.icon),q=S.find(w.clearIcon),R=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),O=S.children(w.menu),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_(),M=!1,z=!1,F=!1,P=!1,N=this,H=S.data(y);h={initialize:function(){h.debug("Initializing dropdown",f),h.is.alreadySetup()?h.setup.reference():(f.ignoreDiacritics&&!String.prototype.normalize&&(f.ignoreDiacritics=!1,h.error(m.noNormalize,N)),h.setup.layout(),f.values&&(h.set.initialLoad(),h.change.values(f.values),h.remove.initialLoad()),h.refreshData(),h.save.defaults(),h.restore.selected(),h.create.id(),h.bind.events(),h.observeChanges(),h.instantiate())},instantiate:function(){h.verbose("Storing instance of dropdown",h),H=h,S.data(y,h)},destroy:function(){h.verbose("Destroying previous dropdown",S),h.remove.tabbable(),h.remove.active(),O.transition("stop all"),O.removeClass(g.visible).addClass(g.hidden),S.off(x).removeData(y),O.off(x),K.off(a),h.disconnect.menuObserver(),h.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in ee&&(s=new MutationObserver(h.event.select.mutation),r=new MutationObserver(h.event.menu.mutation),h.debug("Setting up mutation observer",s,r),h.observe.select(),h.observe.menu())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){s&&s.disconnect()}},observe:{select:function(){h.has.input()&&s&&s.observe(S[0],{childList:!0,subtree:!0})},menu:function(){h.has.menu()&&r&&r.observe(O[0],{childList:!0,subtree:!0})}},create:{id:function(){o=(Math.random().toString(16)+"000000000").substr(2,8),a="."+o,h.verbose("Creating unique id for element",o)},userChoice:function(e){var n,i,a;return!!(e=e||h.get.userValues())&&(e=Array.isArray(e)?e:[e],_.each(e,function(e,t){!1===h.get.item(t)&&(a=f.templates.addition(h.add.variables(u.addResult,t)),i=_("<div />").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),f.hideAdditions&&i.addClass(g.hidden),n=n===ne?i:n.add(i),h.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=h.get.userValues();t&&(h.debug("Adding user labels",t),_.each(t,function(e,t){h.verbose("Adding custom user value"),h.add.label(t,t)}))},menu:function(){O=_("<div />").addClass(g.menu).appendTo(S)},sizer:function(){I=_("<span />").addClass(g.sizer).insertAfter(L)}},search:function(e){e=e!==ne?e:h.get.query(),h.verbose("Searching for query",e),h.has.minCharacters(e)?h.filter(e):h.hide(null,!0)},select:{firstUnfiltered:function(){h.verbose("Selecting first non-filtered element"),h.remove.selectedItem(),E.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0<t.length?(h.verbose("Moving selection to",t),t.addClass(g.selected)):(h.verbose("Moving selection to",n),n.addClass(g.selected))}},setup:{api:function(){var e={debug:f.debug,urlData:{value:h.get.value(),query:h.get.query()},on:!1};h.verbose("First request, initializing API"),S.api(e)},layout:function(){S.is("select")&&(h.setup.select(),h.setup.returnedObject()),h.has.menu()||h.create.menu(),h.is.selection()&&h.is.clearable()&&!h.has.clearItem()&&(h.verbose("Adding clear icon"),q=_("<i />").addClass("remove icon").insertBefore(T)),h.is.search()&&!h.has.search()&&(h.verbose("Adding search input"),L=_("<input />").addClass(g.search).prop("autocomplete","off").insertBefore(T)),h.is.multiple()&&h.is.searchSelection()&&!h.has.sizer()&&h.create.sizer(),f.allowTab&&h.set.tabbable()},select:function(){var e=h.get.selectValues();h.debug("Dropdown initialized on a select",e),S.is("select")&&(D=S),0<D.parent(w.dropdown).length?(h.debug("UI dropdown already exists. Creating dropdown menu only"),S=D.closest(w.dropdown),h.has.menu()||h.create.menu(),O=S.children(w.menu),h.setup.menu(e)):(h.debug("Creating entire dropdown from select"),S=_("<div />").attr("class",D.attr("class")).addClass(g.selection).addClass(g.dropdown).html(C.dropdown(e,l,f.preserveHTML,f.className)).insertBefore(D),D.hasClass(g.multiple)&&!1===D.prop("multiple")&&(h.error(m.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&h.set.multiple(),D.prop("disabled")&&(h.debug("Disabling dropdown"),S.addClass(g.disabled)),D.removeAttr("required").removeAttr("class").detach().prependTo(S)),h.refresh()},menu:function(e){O.html(C.menu(e,l,f.preserveHTML,f.className)),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},reference:function(){h.debug("Dropdown behavior was called on select, replacing with closest dropdown"),S=S.parent(w.dropdown),H=S.data(y),N=S.get(0),h.refresh(),h.setup.returnedObject()},returnedObject:function(){var e=B.slice(0,n),t=B.slice(n+1);B=e.add(S).add(t)}},refresh:function(){h.refreshSelectors(),h.refreshData()},refreshItems:function(){E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},refreshSelectors:function(){h.verbose("Refreshing selector cache"),T=S.find(w.text),L=S.find(w.search),D=S.find(w.input),k=S.find(w.icon),R=0<S.prev().find(w.text).length?S.prev().find(w.text):S.prev(),O=S.children(w.menu),E=O.find(w.item),V=f.hideDividers?E.parent().children(w.divider):_()},refreshData:function(){h.verbose("Refreshing cached metadata"),E.removeData(b.text).removeData(b.value)},clearData:function(){h.verbose("Clearing metadata"),E.removeData(b.text).removeData(b.value),S.removeData(b.defaultText).removeData(b.defaultValue).removeData(b.placeholderText)},toggle:function(){h.verbose("Toggling menu visibility"),h.is.active()?h.hide():h.show()},show:function(e,t){if(e=_.isFunction(e)?e:function(){},!h.can.show()&&h.is.remote()&&(h.debug("No API results retrieved, searching before show"),h.queryRemote(h.get.query(),h.show)),h.can.show()&&!h.is.active()){if(h.debug("Showing dropdown"),!h.has.message()||h.has.maxSelections()||h.has.allResultsFiltered()||h.remove.message(),h.is.allFiltered())return!0;!1!==f.onShow.call(N)&&h.animate.show(function(){h.can.click()&&h.bind.intent(),h.has.search()&&!t&&h.focusSearch(),h.set.visible(),e.call(N)})}},hide:function(e,t){e=_.isFunction(e)?e:function(){},h.is.active()&&!h.is.animatingOutward()?(h.debug("Hiding dropdown"),!1!==f.onHide.call(N)&&h.animate.hide(function(){h.remove.visible(),h.is.focusedOnSearch()&&!0!==t&&L.blur(),e.call(N)})):h.can.click()&&h.unbind.intent(),P=!1},hideOthers:function(){h.verbose("Finding other dropdowns to hide"),B.not(S).has(w.menu+"."+g.visible).dropdown("hide")},hideMenu:function(){h.verbose("Hiding menu instantaneously"),h.remove.active(),h.remove.visible(),O.transition("hide")},hideSubMenus:function(){var e=O.children(w.item).find(w.menu);h.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){h.bind.keyboardEvents(),h.bind.inputEvents(),h.bind.mouseEvents()},keyboardEvents:function(){h.verbose("Binding keyboard events"),S.on("keydown"+x,h.event.keydown),h.has.search()&&S.on(h.get.inputEvent()+x,w.search,h.event.input),h.is.multiple()&&K.on("keydown"+a,h.event.document.keydown)},inputEvents:function(){h.verbose("Binding input change events"),S.on("change"+x,w.input,h.event.change)},mouseEvents:function(){h.verbose("Binding mouse events"),h.is.multiple()&&S.on(Y+x,w.label,h.event.label.click).on(Y+x,w.remove,h.event.remove.click),h.is.searchSelection()?(S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("mousedown"+x,w.menu,h.event.menu.mousedown).on("mouseup"+x,w.menu,h.event.menu.mouseup).on(Y+x,w.icon,h.event.icon.click).on(Y+x,w.clearIcon,h.event.clearIcon.click).on("focus"+x,w.search,h.event.search.focus).on(Y+x,w.search,h.event.search.focus).on("blur"+x,w.search,h.event.search.blur).on(Y+x,w.text,h.event.text.focus),h.is.multiple()&&S.on(Y+x,h.event.click)):("click"==f.on?S.on(Y+x,w.icon,h.event.icon.click).on(Y+x,h.event.test.toggle):"hover"==f.on?S.on("mouseenter"+x,h.delay.show).on("mouseleave"+x,h.delay.hide):S.on(f.on+x,h.toggle),S.on("mousedown"+x,h.event.mousedown).on("mouseup"+x,h.event.mouseup).on("focus"+x,h.event.focus).on(Y+x,w.clearIcon,h.event.clearIcon.click),h.has.menuSearch()?S.on("blur"+x,w.search,h.event.search.blur):S.on("blur"+x,h.event.blur)),O.on((Q?"touchstart":"mouseenter")+x,w.item,h.event.item.mouseenter).on("mouseleave"+x,w.item,h.event.item.mouseleave).on("click"+x,w.item,h.event.item.click)},intent:function(){h.verbose("Binding hide intent event to document"),Q&&K.on("touchstart"+a,h.event.test.touch).on("touchmove"+a,h.event.test.touch),K.on(Y+a,h.event.test.hide)}},unbind:{intent:function(){h.verbose("Removing hide intent event from document"),Q&&K.off("touchstart"+a).off("touchmove"+a),K.off(Y+a)}},filter:function(e){function t(){h.is.multiple()&&h.filterActive(),(e||!e&&0==h.get.activeItem().length)&&h.select.firstUnfiltered(),h.has.allResultsFiltered()?f.onNoResults.call(N,n)?f.allowAdditions?f.hideAdditions&&(h.verbose("User addition with no menu, setting empty style"),h.set.empty(),h.hideMenu()):(h.verbose("All items filtered, showing message",n),h.add.message(u.noResults)):(h.verbose("All items filtered, hiding dropdown",n),h.hideMenu()):(h.remove.empty(),h.remove.message()),f.allowAdditions&&h.add.userSuggestion(h.escape.htmlEntities(e)),h.is.searchSelection()&&h.can.show()&&h.is.focusedOnSearch()&&h.show()}var n=e!==ne?e:h.get.query();f.useLabels&&h.has.maxSelections()||(f.apiSettings?h.can.useAPI()?h.queryRemote(n,function(){f.filterRemoteData&&h.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(f.delimiter):[]),_.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(g.filtered)}),t()}):h.error(m.noAPI):(h.filterItems(n),t()))},queryRemote:function(e,n){var t={errorDuration:!1,cache:"local",throttle:f.throttle,urlData:{query:e},onError:function(){h.add.message(u.serverError),n()},onFailure:function(){h.add.message(u.serverError),n()},onSuccess:function(e){var t=e[l.remoteValues];Array.isArray(t)||(t=[]),h.remove.message(),h.setup.menu({values:t}),0!==t.length||f.allowAdditions||h.add.message(u.noResults),n()}};S.api("get request")||h.setup.api(),t=_.extend(!0,{},t,f.apiSettings),S.api("setting",t).api("query")},filterItems:function(e){var i=h.remove.diacritics(e!==ne?e:h.get.query()),a=null,t=h.escape.string(i),n=(f.ignoreSearchCase?"i":"")+"gm",o=new RegExp("^"+t,n);h.has.query()&&(a=[],h.verbose("Searching for matching values",i),E.each(function(){var e,t,n=_(this);if(n.hasClass(g.unfilterable))return a.push(this),!0;if("both"===f.match||"text"===f.match){if(-1!==(e=h.remove.diacritics(String(h.get.choiceText(n,!1)))).search(o))return a.push(this),!0;if("exact"===f.fullTextSearch&&h.exactSearch(i,e))return a.push(this),!0;if(!0===f.fullTextSearch&&h.fuzzySearch(i,e))return a.push(this),!0}if("both"===f.match||"value"===f.match){if(-1!==(t=h.remove.diacritics(String(h.get.choiceValue(n,e)))).search(o))return a.push(this),!0;if("exact"===f.fullTextSearch&&h.exactSearch(i,t))return a.push(this),!0;if(!0===f.fullTextSearch&&h.fuzzySearch(i,t))return a.push(this),!0}})),h.debug("Showing only matched items",i),h.remove.filteredItem(),a&&E.not(a).addClass(g.filtered),h.has.query()?!0===f.hideDividers?V.addClass(g.hidden):"empty"===f.hideDividers&&V.removeClass(g.hidden).filter(function(){var e=_(this).nextUntil(w.item);return 0===(e.length?e:_(this)).nextUntil(w.divider).filter(w.item+":not(."+g.filtered+")").length}).addClass(g.hidden):V.removeClass(g.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=f.ignoreSearchCase?e.toLowerCase():e,t=f.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 s=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===s)continue e;return!1}return!0},exactSearch:function(e,t){return e=f.ignoreSearchCase?e.toLowerCase():e,-1<(t=f.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){f.useLabels&&E.filter("."+g.active).addClass(g.filtered)},focusSearch:function(e){h.has.search()&&!h.is.focusedOnSearch()&&(e?(S.off("focus"+x,w.search),L.focus(),S.on("focus"+x,w.search,h.event.search.focus)):L.focus())},blurSearch:function(){h.has.search()&&L.blur()},forceSelection:function(){var e=E.not(g.filtered).filter("."+g.selected).eq(0),t=E.not(g.filtered).filter("."+g.active).eq(0),n=0<e.length?e:t,i=0<n.length;f.allowAdditions||i&&!h.is.multiple()?(h.debug("Forcing partial selection to selected item",n),h.event.item.click.call(n,{},!0)):h.remove.searchTerm()},change:{values:function(e){f.allowAdditions||h.clear(),h.debug("Creating dropdown with specified values",e),h.setup.menu({values:e}),_.each(e,function(e,t){if(1==t.selected&&(h.debug("Setting initial selection to",t[l.value]),h.set.selected(t[l.value]),!h.is.multiple()))return!1}),h.has.selectInput()&&(h.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),_.each(e,function(e,t){var n=f.templates.deQuote(t[l.value]),i=f.templates.escape(t[l.name]||"",f.preserveHTML);D.append('<option value="'+n+'">'+i+"</option>")}),h.observe.select())}},event:{change:function(){F||(h.debug("Input changed, updating selection"),h.set.selected())},focus:function(){f.showOnFocus&&!M&&h.is.hidden()&&!t&&h.show()},blur:function(e){t=te.activeElement===this,M||t||(h.remove.activeLabel(),h.hide())},mousedown:function(){h.is.searchSelection()?i=!0:M=!0},mouseup:function(){h.is.searchSelection()?i=!1:M=!1},click:function(e){_(e.target).is(S)&&(h.is.focusedOnSearch()?h.show():h.focusSearch())},search:{focus:function(e){M=!0,h.is.multiple()&&h.remove.activeLabel(),(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)&&h.search()},blur:function(e){t=te.activeElement===this,h.is.searchSelection()&&!i&&(z||t||(f.forceSelection?h.forceSelection():f.allowAdditions||h.remove.searchTerm(),h.hide())),i=!1}},clearIcon:{click:function(e){h.clear(),h.is.searchSelection()&&h.remove.searchTerm(),h.hide(),e.stopPropagation()}},icon:{click:function(e){P=!0,h.has.search()?h.is.active()?h.blurSearch():f.showOnFocus?h.focusSearch():h.toggle():h.toggle()}},text:{focus:function(e){M=!0,h.focusSearch()}},input:function(e){(h.is.multiple()||h.is.searchSelection())&&h.set.filtered(),clearTimeout(h.timer),h.timer=setTimeout(h.search,f.delay.search)},label:{click:function(e){var t=_(this),n=S.find(w.label),i=n.filter("."+g.active),a=t.nextAll("."+g.active),o=t.prevAll("."+g.active),s=0<a.length?t.nextUntil(a).add(i).add(t):t.prevUntil(o).add(i).add(t);e.shiftKey?(i.removeClass(g.active),s.addClass(g.active)):e.ctrlKey?t.toggleClass(g.active):(i.removeClass(g.active),t.addClass(g.active)),f.onLabelSelect.apply(this,n.filter("."+g.active))}},remove:{click:function(){var e=_(this).parent();e.hasClass(g.active)?h.remove.activeLabels():h.remove.activeLabels(e)}},test:{toggle:function(e){var t=h.is.multiple()?h.show:h.toggle;h.is.bubbledLabelClick(e)||h.is.bubbledIconClick(e)||h.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){h.determine.eventOnElement(e,function(){"touchstart"==e.type?h.timer=setTimeout(function(){h.hide()},f.delay.touch):"touchmove"==e.type&&clearTimeout(h.timer)}),e.stopPropagation()},hide:function(e){h.determine.eventInModule(e,h.hide)&&N.id&&_(e.target).attr("for")===N.id&&e.preventDefault()}},select:{mutation:function(e){h.debug("<select> modified, recreating menu"),h.is.selectMutation(e)&&(h.disconnect.selectObserver(),h.refresh(),h.setup.select(),h.set.selected(),h.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?_(t.addedNodes[0]):_(!1),i=t.removedNodes?_(t.removedNodes[0]):_(!1),a=n.add(i),o=a.is(w.addition)||0<a.closest(w.addition).length,s=a.is(w.message)||0<a.closest(w.message).length;o||s?(h.debug("Updating item selector cache"),h.refreshItems()):(h.debug("Menu modified, updating selector cache"),h.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=_(e.target),n=_(this),i=n.children(w.menu),a=n.siblings(w.item).children(w.menu),o=0<i.length;0<i.find(t).length||!o||(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Showing sub-menu",i),_.each(a,function(){h.animate.hide(!1,_(this))}),h.animate.show(!1,i)},f.delay.show),e.preventDefault())},mouseleave:function(e){var t=_(this).children(w.menu);0<t.length&&(clearTimeout(h.itemTimer),h.itemTimer=setTimeout(function(){h.verbose("Hiding sub-menu",t),h.animate.hide(!1,t)},f.delay.hide))},click:function(e,t){var n=_(this),i=_(e?e.target:""),a=n.find(w.menu),o=h.get.choiceText(n),s=h.get.choiceValue(n,o),r=0<a.length,l=0<a.find(i).length;"input"!==te.activeElement.tagName.toLowerCase()&&_(te.activeElement).blur(),l||r&&!f.allowCategorySelection||(h.is.searchSelection()&&(f.allowAdditions&&h.remove.userAddition(),h.remove.searchTerm(),h.is.focusedOnSearch()||1==t||h.focusSearch(!0)),f.useLabels||(h.remove.filteredItem(),h.set.scrollPosition(n)),h.determine.selectAction.call(this,o,s))}},document:{keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n=S.find(w.label),i=n.filter("."+g.active),a=(i.data(b.value),n.index(i)),o=n.length,s=0<i.length,r=1<i.length,l=0===a,c=a+1==o,u=h.is.searchSelection(),d=h.is.focusedOnSearch(),v=h.is.focused(),m=d&&0===h.get.caretPosition(!1),f=m&&0!==h.get.caretPosition(!0);if(u&&!s&&!d)return;t==p.leftArrow?!v&&!m||s?s&&(e.shiftKey?h.verbose("Adding previous label to selection"):(h.verbose("Selecting previous label"),n.removeClass(g.active)),l&&!r?i.addClass(g.active):i.prev(w.siblingLabel).addClass(g.active).end(),e.preventDefault()):(h.verbose("Selecting previous label"),n.last().addClass(g.active)):t==p.rightArrow?(v&&!s&&n.first().addClass(g.active),s&&(e.shiftKey?h.verbose("Adding next label to selection"):(h.verbose("Selecting next label"),n.removeClass(g.active)),c?u?d?n.removeClass(g.active):h.focusSearch():r?i.next(w.siblingLabel).addClass(g.active):i.addClass(g.active):i.next(w.siblingLabel).addClass(g.active),e.preventDefault())):t==p.deleteKey||t==p.backspace?s?(h.verbose("Removing active labels"),c&&u&&!d&&h.focusSearch(),i.last().next(w.siblingLabel).addClass(g.active),h.remove.activeLabels(i),e.preventDefault()):!m||f||s||t!=p.backspace||(h.verbose("Removing last label on input backspace"),i=n.last().addClass(g.active),h.remove.activeLabels(i)):i.removeClass(g.active)}}},keydown:function(e){var t=e.which;if(h.is.inObject(t,p)){var n,i=E.not(w.unselectable).filter("."+g.selected).eq(0),a=O.children("."+g.active).eq(0),o=0<i.length?i:a,s=0<o.length?o.siblings(":not(."+g.filtered+")").addBack():O.children(":not(."+g.filtered+")"),r=o.children(w.menu),l=o.closest(w.menu),c=l.hasClass(g.visible)||l.hasClass(g.animating)||0<l.parent(w.menu).length,u=0<r.length,d=0<o.length,v=0<o.not(w.unselectable).length,m=t==p.delimiter&&f.allowAdditions&&h.is.multiple();if(f.allowAdditions&&f.hideAdditions&&(t==p.enter||m)&&v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&h.remove.searchTerm(),h.is.multiple()&&e.preventDefault()),h.is.visible()){if(t!=p.enter&&!m||(t==p.enter&&d&&u&&!f.allowCategorySelection?(h.verbose("Pressed enter on unselectable category, opening sub menu"),t=p.rightArrow):v&&(h.verbose("Selecting item from keyboard shortcut",o),h.event.item.click.call(o,e),h.is.searchSelection()&&(h.remove.searchTerm(),h.is.multiple()&&L.focus())),e.preventDefault()),d&&(t==p.leftArrow&&l[0]!==O[0]&&(h.verbose("Left key pressed, closing sub-menu"),h.animate.hide(!1,l),o.removeClass(g.selected),l.closest(w.item).addClass(g.selected),e.preventDefault()),t==p.rightArrow&&u&&(h.verbose("Right key pressed, opening sub-menu"),h.animate.show(!1,r),o.removeClass(g.selected),r.find(w.item).eq(0).addClass(g.selected),e.preventDefault())),t==p.upArrow){if(n=d&&c?o.prevAll(w.item+":not("+w.unselectable+")").eq(0):E.eq(0),s.index(n)<0)return h.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();h.verbose("Up key pressed, changing active item"),o.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}if(t==p.downArrow){if(0===(n=d&&c?n=o.nextAll(w.item+":not("+w.unselectable+")").eq(0):E.eq(0)).length)return h.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();h.verbose("Down key pressed, changing active item"),E.removeClass(g.selected),n.addClass(g.selected),h.set.scrollPosition(n),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),e.preventDefault()}t==p.pageUp&&(h.scrollPage("up"),e.preventDefault()),t==p.pageDown&&(h.scrollPage("down"),e.preventDefault()),t==p.escape&&(h.verbose("Escape key pressed, closing dropdown"),h.hide())}else m&&e.preventDefault(),t!=p.downArrow||h.is.visible()||(h.verbose("Down key pressed, showing dropdown"),h.show(),e.preventDefault())}else h.has.search()||h.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=te.createEvent("HTMLEvents"),t=D[0];t&&(h.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){c=!0,h.verbose("Determining action",f.action),_.isFunction(h.action[f.action])?(h.verbose("Triggering preset action",f.action,e,t),h.action[f.action].call(N,e,t,this)):_.isFunction(f.action)?(h.verbose("Triggering user action",f.action,e,t),f.action.call(N,e,t,this)):h.error(m.action,f.action),c=!1},eventInModule:function(e,t){var n=_(e.target),i=0<n.closest(te.documentElement).length,a=0<n.closest(S).length;return t=_.isFunction(t)?t:function(){},i&&!a?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=_(e.target),i=n.closest(w.siblingLabel),a=te.body.contains(e.target),o=0===S.find(i).length||!(h.is.multiple()&&f.useLabels),s=0===n.closest(O).length;return t=_.isFunction(t)?t:function(){},a&&o&&s?(h.verbose("Triggering event",t),t(),!0):(h.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==ne?t:e,h.can.activate(_(n))&&(h.set.selected(t,_(n)),h.is.multiple()||h.hideAndClear())},select:function(e,t,n){t=t!==ne?t:e,h.can.activate(_(n))&&(h.set.value(t,e,_(n)),h.is.multiple()||h.hideAndClear())},combo:function(e,t,n){t=t!==ne?t:e,h.set.selected(t,_(n)),h.hideAndClear()},hide:function(e,t,n){h.set.value(t,e,_(n)),h.hideAndClear()}},get:{id:function(){return o},defaultText:function(){return S.data(b.defaultText)},defaultValue:function(){return S.data(b.defaultValue)},placeholderText:function(){return"auto"!=f.placeholder&&"string"==typeof f.placeholder?f.placeholder:S.data(b.placeholderText)||""},text:function(){return T.text()},query:function(){return String(L.val()).trim()},searchWidth:function(e){return e=e!==ne?e:L.val(),I.text(e),Math.ceil(I.width()+1)},selectionCount:function(){var e=h.get.values();return h.is.multiple()?Array.isArray(e)?e.length:0:""!==h.get.value()?1:0},transition:function(e){return"auto"==f.transition?h.is.upward(e)?"slide up":"slide down":f.transition},userValues:function(){var e=h.get.values();return!!e&&(e=Array.isArray(e)?e:[e],_.grep(e,function(e){return!1===h.get.item(e)}))},uniqueArray:function(n){return _.grep(n,function(e,t){return _.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=L.get(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():S.data(b.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===ne||t?"":e},values:function(){var e=h.get.value();return""===e?"":!h.has.selectInput()&&h.is.multiple()?"string"==typeof e?h.escape.htmlEntities(e).split(f.delimiter):"":e},remoteValues:function(){var e=h.get.values(),i=!1;return e&&("string"==typeof e&&(e=[e]),_.each(e,function(e,t){var n=h.read.remoteData(t);h.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)})),i},choiceText:function(e,t){if(t=t!==ne?t:f.preserveHTML,e)return 0<e.find(w.menu).length&&(h.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(w.menu).remove(),e.find(w.menuIcon).remove()),e.data(b.text)!==ne?e.data(b.text):t?e.html().trim():e.text().trim()},choiceValue:function(e,t){return t=t||h.get.choiceText(e),!!e&&(e.data(b.value)!==ne?String(e.data(b.value)):"string"==typeof t?String(f.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=L[0];return!!e&&(e.oninput!==ne?"input":e.onpropertychange!==ne?"propertychange":"keyup")},selectValues:function(){var s={},r=[];return s.values=[],S.find("option").each(function(){var e=_(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==ne?e.attr("value"):t,a=e.data(b.text)!==ne?e.data(b.text):t,o=e.parent("optgroup");"auto"===f.placeholder&&""===i?s.placeholder=t:(o.length===r.length&&o[0]===r[0]||(s.values.push({type:"header",divider:f.headerDivider,name:o.attr("label")||""}),r=o),s.values.push({name:t,value:i,text:a,disabled:n}))}),f.placeholder&&"auto"!==f.placeholder&&(h.debug("Setting placeholder value to",f.placeholder),s.placeholder=f.placeholder),f.sortSelect?(!0===f.sortSelect?s.values.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===f.sortSelect?s.values.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):_.isFunction(f.sortSelect)&&s.values.sort(f.sortSelect),h.debug("Retrieved and sorted values from select",s)):h.debug("Retrieved values from select",s),s},activeItem:function(){return E.filter("."+g.active)},selectedItem:function(){var e=E.not(w.unselectable).filter("."+g.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=h.get.item(e),n=h.create.userChoice(e);return n&&0<n.length&&(t=0<t.length?t.add(n):n),t},item:function(i,a){var e,o,s=!1;return i=i!==ne?i:h.get.values()!==ne?h.get.values():h.get.text(),e=(o=h.is.multiple()&&Array.isArray(i))?0<i.length:i!==ne&&null!==i,a=""===i||!1===i||!0===i||(a||!1),e&&E.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);if(null!==n&&n!==ne)if(o)-1!==_.inArray(h.escape.htmlEntities(String(n)),i.map(function(e){return String(e)}))&&(s=s?s.add(e):e);else if(a){if(h.verbose("Ambiguous dropdown value using strict type check",e,i),n===i)return s=e,!0}else if(f.ignoreCase&&(n=n.toLowerCase(),i=i.toLowerCase()),h.escape.htmlEntities(String(n))===h.escape.htmlEntities(String(i)))return h.verbose("Found select item by value",n,i),s=e,!0}),s}},check:{maxSelections:function(e){return!f.maxSelections||((e=e!==ne?e:h.get.selectionCount())>=f.maxSelections?(h.debug("Maximum selection count reached"),f.useLabels&&(E.addClass(g.filtered),h.add.message(u.maxSelections)),!0):(h.verbose("No longer at maximum selection count"),h.remove.message(),h.remove.filteredItem(),h.is.searchSelection()&&h.filterItems(),!1))}},restore:{defaults:function(e){h.clear(e),h.restore.defaultText(),h.restore.defaultValue()},defaultText:function(){var e=h.get.defaultText();e===h.get.placeholderText?(h.debug("Restoring default placeholder text",e),h.set.placeholderText(e)):(h.debug("Restoring default text",e),h.set.text(e))},placeholderText:function(){h.set.placeholderText()},defaultValue:function(){var e=h.get.defaultValue();e!==ne&&(h.debug("Restoring default value",e),""!==e?(h.set.value(e),h.set.selected()):(h.remove.activeItem(),h.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(h.error(m.labels),f.useLabels=!0),h.debug("Restoring selected values"),h.create.userLabels()),h.check.maxSelections()},selected:function(){h.restore.values(),h.is.multiple()?(h.debug("Restoring previously selected values and labels"),h.restore.labels()):h.debug("Restoring previously selected values")},values:function(){h.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&h.get.remoteValues()?h.restore.remoteValues():h.set.selected();var e=h.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(g.noselection):D.removeClass(g.noselection),h.remove.initialLoad()},remoteValues:function(){var e=h.get.remoteValues();h.debug("Recreating selected from session data",e),e&&(h.is.single()?_.each(e,function(e,t){h.set.text(t)}):_.each(e,function(e,t){h.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(ee.Storage!==ne)return(t=sessionStorage.getItem(e))!==ne&&t;h.error(m.noStorage)}},save:{defaults:function(){h.save.defaultText(),h.save.placeholderText(),h.save.defaultValue()},defaultValue:function(){var e=h.get.value();h.verbose("Saving default value as",e),S.data(b.defaultValue,e)},defaultText:function(){var e=h.get.text();h.verbose("Saving default text as",e),S.data(b.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&T.hasClass(g.placeholder)&&(e=h.get.text(),h.verbose("Saving placeholder text as",e),S.data(b.placeholderText,e))},remoteData:function(e,t){ee.Storage!==ne?(h.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):h.error(m.noStorage)}},clear:function(e){h.is.multiple()&&f.useLabels?h.remove.labels():(h.remove.activeItem(),h.remove.selectedItem(),h.remove.filteredItem()),h.set.placeholderText(),h.clearValue(e)},clearValue:function(e){h.set.value("",null,null,e)},scrollPage:function(e,t){var n,i,a=t||h.get.selectedItem(),o=a.closest(w.menu),s=o.outerHeight(),r=o.scrollTop(),l=E.eq(0).outerHeight(),c=Math.floor(s/l),u=(o.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=E.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i<d.length)?d.eq(i):"up"==e?d.first():d.last()).length&&(h.debug("Scrolling page",e,n),a.removeClass(g.selected),n.addClass(g.selected),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(n),o.scrollTop(u))},set:{filtered:function(){var e=h.is.multiple(),t=h.is.searchSelection(),n=e&&t,i=t?h.get.query():"",a="string"==typeof i&&0<i.length,o=h.get.searchWidth(),s=""!==i;e&&a&&(h.verbose("Adjusting input width",o,f.glyphWidth),L.css("width",o)),a||n&&s?(h.verbose("Hiding placeholder text"),T.addClass(g.filtered)):e&&(!n||s)||(h.verbose("Showing placeholder text"),T.removeClass(g.filtered))},empty:function(){S.addClass(g.empty)},loading:function(){S.addClass(g.loading)},placeholderText:function(e){e=e||h.get.placeholderText(),h.debug("Setting placeholder text",e),h.set.text(e),T.addClass(g.placeholder)},tabbable:function(){h.is.searchSelection()?(h.debug("Added tabindex to searchable dropdown"),L.val("").attr("tabindex",0),O.attr("tabindex",-1)):(h.debug("Added tabindex to dropdown"),S.attr("tabindex")===ne&&(S.attr("tabindex",0),O.attr("tabindex",-1)))},initialLoad:function(){h.verbose("Setting initial load"),e=!0},activeItem:function(e){f.allowAdditions&&0<e.filter(w.addition).length?e.addClass(g.filtered):e.addClass(g.active)},partialSearch:function(e){var t=h.get.query().length;L.val(e.substr(0,t))},scrollPosition:function(e,t){var n,i,a,o,s,r;n=(e=e||h.get.selectedItem()).closest(w.menu),i=e&&0<e.length,t=t!==ne&&t,0===h.get.activeItem().length&&(t=!1),e&&0<n.length&&i&&(e.position().top,n.addClass(g.loading),a=(o=n.scrollTop())-n.offset().top+e.offset().top,t||(r=o+n.height()<a+5,s=a-5<o),h.debug("Scrolling to active item",a),(t||s||r)&&n.scrollTop(a),n.removeClass(g.loading))},text:function(e){"combo"===f.action?(h.debug("Changing combo button text",e,R),f.preserveHTML?R.html(e):R.text(e)):"activate"===f.action&&(e!==h.get.placeholderText()&&T.removeClass(g.placeholder),h.debug("Changing text",e,T),T.removeClass(g.filtered),f.preserveHTML?T.html(e):T.text(e))},selectedItem:function(e){var t=h.get.choiceValue(e),n=h.get.choiceText(e,!1),i=h.get.choiceText(e,!0);h.debug("Setting user selection to item",e),h.remove.activeItem(),h.set.partialSearch(n),h.set.activeItem(e),h.set.selected(t,e),h.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+g.selected),i=0<n.length&&h.has.firstLetter(n,e),a=!1;i&&(t=n.nextAll(E).eq(0),h.has.firstLetter(t,e)&&(a=t)),a||E.each(function(){if(h.has.firstLetter(_(this),e))return a=_(this),!1}),a&&(h.verbose("Scrolling to next value with letter",e),h.set.scrollPosition(a),n.removeClass(g.selected),a.addClass(g.selected),f.selectOnKeydown&&h.is.single()&&h.set.selectedItem(a))},direction:function(e){"auto"==f.direction?(e?h.is.upward(e)&&h.remove.upward(e):h.remove.upward(),h.can.openDownward(e)?h.remove.upward(e):h.set.upward(e),h.is.leftward(e)||h.can.openRightward(e)||h.set.leftward(e)):"upward"==f.direction&&h.set.upward(e)},upward:function(e){(e||S).addClass(g.upward)},leftward:function(e){(e||O).addClass(g.leftward)},value:function(e,t,n,i){e===ne||""===e||Array.isArray(e)&&0===e.length?D.addClass(g.noselection):D.removeClass(g.noselection);var a=h.escape.value(e),o=0<D.length,s=h.get.values(),r=e!==ne?String(e):e;if(o){if(!f.allowReselection&&r==s&&(h.verbose("Skipping value update already same value",e,s),!h.is.initialLoad()))return;h.is.single()&&h.has.selectInput()&&h.can.extendSelect()&&(h.debug("Adding user option",e),h.add.optionValue(e)),h.debug("Updating input value",a,s),F=!0,D.val(a),!1===f.fireOnInit&&h.is.initialLoad()?h.debug("Input native change event ignored on initial load"):!0!==i&&h.trigger.change(),F=!1}else h.verbose("Storing value in metadata",a,D),a!==s&&S.data(b.value,r);!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",f.onChange):!0!==i&&f.onChange.call(N,e,t,n)},active:function(){S.addClass(g.active)},multiple:function(){S.addClass(g.multiple)},visible:function(){S.addClass(g.visible)},exactly:function(e,t){h.debug("Setting selected to exact values"),h.clear(),h.set.selected(e,t)},selected:function(e,r){var l=h.is.multiple();(r=f.allowAdditions?r||h.get.itemWithAdditions(e):r||h.get.item(e))&&(h.debug("Setting selected menu item to",r),h.is.multiple()&&h.remove.searchWidth(),h.is.single()?(h.remove.activeItem(),h.remove.selectedItem()):f.useLabels&&h.remove.selectedItem(),r.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t),i=e.hasClass(g.filtered),a=e.hasClass(g.active),o=e.hasClass(g.addition),s=l&&1==r.length;l?!a||o?(f.apiSettings&&f.saveRemoteData&&h.save.remoteData(t,n),f.useLabels?(h.add.label(n,t,s),h.add.value(n,t,e),h.set.activeItem(e),h.filterActive(),h.select.nextAvailable(r)):(h.add.value(n,t,e),h.set.text(h.add.variables(u.count)),h.set.activeItem(e))):i||!f.useLabels&&!c||(h.debug("Selected active value, removing label"),h.remove.selected(n)):(f.apiSettings&&f.saveRemoteData&&h.save.remoteData(t,n),h.set.text(t),h.set.value(n,t,e),e.addClass(g.active).addClass(g.selected))}),h.remove.searchTerm())}},add:{label:function(e,t,n){var i,a=h.is.searchSelection()?L:T,o=h.escape.value(e);f.ignoreCase&&(o=o.toLowerCase()),i=_("<a />").addClass(g.label).attr("data-"+b.value,o).html(C.label(o,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,o,t),h.has.label(e)?h.debug("User selection already exists, skipping",o):(f.label.variation&&i.addClass(f.label.variation),!0===n?(h.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(h.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=O.children(w.message),n=f.templates.message(h.add.variables(e));0<t.length?t.html(n):t=_("<div/>").html(n).addClass(g.message).appendTo(O)},optionValue:function(e){var t=h.escape.value(e);0<D.find('option[value="'+h.escape.string(t)+'"]').length||(h.disconnect.selectObserver(),h.is.single()&&(h.verbose("Removing previous user addition"),D.find("option."+g.addition).remove()),_("<option/>").prop("value",t).addClass(g.addition).html(e).appendTo(D),h.verbose("Adding user addition as an <option>",e),h.observe.select())},userSuggestion:function(e){var t,n=O.children(w.addition),i=h.get.item(e),a=i&&i.not(w.addition).length,o=0<n.length;f.useLabels&&h.has.maxSelections()||(""===e||a?n.remove():(o?(n.data(b.value,e).data(b.text,e).attr("data-"+b.value,e).attr("data-"+b.text,e).removeClass(g.filtered),f.hideAdditions||(t=f.templates.addition(h.add.variables(u.addResult,e)),n.html(t)),h.verbose("Replacing user suggestion with new value",n)):((n=h.create.userChoice(e)).prependTo(O),h.verbose("Adding item choice to menu corresponding with user choice addition",n)),f.hideAdditions&&!h.is.allFiltered()||n.addClass(g.selected).siblings().removeClass(g.selected),h.refreshItems()))},variables:function(e,t){var n,i,a=-1!==e.search("{count}"),o=-1!==e.search("{maxCount}"),s=-1!==e.search("{term}");return h.verbose("Adding templated variables to message",e),a&&(n=h.get.selectionCount(),e=e.replace("{count}",n)),o&&(n=h.get.selectionCount(),e=e.replace("{maxCount}",f.maxSelections)),s&&(i=t||h.get.query(),e=e.replace("{term}",i)),e},value:function(e,t,n){var i,a=h.get.values();h.has.value(e)?h.debug("Value already selected"):""!==e?(i=Array.isArray(a)?(i=a.concat([e]),h.get.uniqueArray(i)):[e],h.has.selectInput()?h.can.extendSelect()&&(h.debug("Adding value to select",e,i,D),h.add.optionValue(e)):(i=i.join(f.delimiter),h.debug("Setting hidden input to delimited value",i,D)),!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("Skipping onadd callback on initial load",f.onAdd):f.onAdd.call(N,e,t,n),h.set.value(i,t,n),h.check.maxSelections()):h.debug("Cannot select blank values from multiselect")}},remove:{active:function(){S.removeClass(g.active)},activeLabel:function(){S.find(w.label).removeClass(g.active)},empty:function(){S.removeClass(g.empty)},loading:function(){S.removeClass(g.loading)},initialLoad:function(){e=!1},upward:function(e){(e||S).removeClass(g.upward)},leftward:function(e){(e||O).removeClass(g.leftward)},visible:function(){S.removeClass(g.visible)},activeItem:function(){E.removeClass(g.active)},filteredItem:function(){f.useLabels&&h.has.maxSelections()||(f.useLabels&&h.is.multiple()?E.not("."+g.active).removeClass(g.filtered):E.removeClass(g.filtered),f.hideDividers&&V.removeClass(g.hidden),h.remove.empty())},optionValue:function(e){var t=h.escape.value(e),n=D.find('option[value="'+h.escape.string(t)+'"]');0<n.length&&n.hasClass(g.addition)&&(s&&(s.disconnect(),h.verbose("Temporarily disconnecting mutation observer")),n.remove(),h.verbose("Removing user addition as an <option>",t),s&&s.observe(D[0],{childList:!0,subtree:!0}))},message:function(){O.children(w.message).remove()},searchWidth:function(){L.css("width","")},searchTerm:function(){h.verbose("Cleared search term"),L.val(""),h.set.filtered()},userAddition:function(){E.filter(w.addition).remove()},selected:function(e,t){if(!(t=f.allowAdditions?t||h.get.itemWithAdditions(e):t||h.get.item(e)))return!1;t.each(function(){var e=_(this),t=h.get.choiceText(e),n=h.get.choiceValue(e,t);h.is.multiple()?f.useLabels?(h.remove.value(n,t,e),h.remove.label(n)):(h.remove.value(n,t,e),0===h.get.selectionCount()?h.set.placeholderText():h.set.text(h.add.variables(u.count))):h.remove.value(n,t,e),e.removeClass(g.filtered).removeClass(g.active),f.useLabels&&e.removeClass(g.selected)})},selectedItem:function(){E.removeClass(g.selected)},value:function(e,t,n){var i,a=h.get.values();e=h.escape.htmlEntities(e),h.has.selectInput()?(h.verbose("Input is <select> removing selected option",e),i=h.remove.arrayValue(e,a),h.remove.optionValue(e)):(h.verbose("Removing from delimited values",e),i=(i=h.remove.arrayValue(e,a)).join(f.delimiter)),!1===f.fireOnInit&&h.is.initialLoad()?h.verbose("No callback on initial load",f.onRemove):f.onRemove.call(N,e,t,n),h.set.value(i,t,n),h.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=_.grep(e,function(e){return t!=e}),h.verbose("Removed value from delimited string",t,e),e},label:function(e,t){var n=S.find(w.label).filter("[data-"+b.value+'="'+h.escape.string(f.ignoreCase?e.toLowerCase():e)+'"]');h.verbose("Removing label",n),n.remove()},activeLabels:function(e){e=e||S.find(w.label).filter("."+g.active),h.verbose("Removing active label selections",e),h.remove.labels(e)},labels:function(e){e=e||S.find(w.label),h.verbose("Removing labels",e),e.each(function(){var e=_(this),t=e.data(b.value),n=t!==ne?String(t):t,i=h.is.userValue(n);!1!==f.onLabelRemove.call(e,t)?(h.remove.message(),i?(h.remove.value(n),h.remove.label(n)):h.remove.selected(n)):h.debug("Label remove callback cancelled removal")})},tabbable:function(){h.is.searchSelection()?(h.debug("Searchable dropdown initialized"),L.removeAttr("tabindex")):(h.debug("Simple selection dropdown initialized"),S.removeAttr("tabindex")),O.removeAttr("tabindex")},diacritics:function(e){return f.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return h.has.search()&&0<L.closest(O).length},clearItem:function(){return 0<q.length},search:function(){return 0<L.length},sizer:function(){return 0<I.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return f.minCharacters&&!P?(e=e!==ne?String(e):String(h.get.query())).length>=f.minCharacters:!(P=!1)},firstLetter:function(e,t){var n;return!(!e||0===e.length||"string"!=typeof t)&&(n=h.get.choiceText(e,!1),(t=t.toLowerCase())==String(n).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<O.length},message:function(){return 0!==O.children(w.message).length},label:function(e){var t=h.escape.value(e),n=S.find(w.label);return f.ignoreCase&&(t=t.toLowerCase()),0<n.filter("[data-"+b.value+'="'+h.escape.string(t)+'"]').length},maxSelections:function(){return f.maxSelections&&h.get.selectionCount()>=f.maxSelections},allResultsFiltered:function(){var e=E.not(w.addition);return e.filter(w.unselectable).length===e.length},userSuggestion:function(){return 0<O.children(w.addition).length},query:function(){return""!==h.get.query()},value:function(e){return f.ignoreCase?h.has.valueIgnoringCase(e):h.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=h.get.values();return!!(Array.isArray(t)?t&&-1!==_.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=h.get.values(),i=!1;return Array.isArray(e)||(e=[e]),_.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return S.hasClass(g.active)},animatingInward:function(){return O.transition("is inward")},animatingOutward:function(){return O.transition("is outward")},bubbledLabelClick:function(e){return _(e.target).is("select, input")&&0<S.closest("label").length},bubbledIconClick:function(e){return 0<_(e.target).closest(k).length},alreadySetup:function(){return S.is("select")&&S.parent(w.dropdown).data(y)!==ne&&0===S.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):O.transition&&O.transition("is animating")},leftward:function(e){return(e||O).hasClass(g.leftward)},clearable:function(){return S.hasClass(g.clearable)||f.clearable},disabled:function(){return S.hasClass(g.disabled)},focused:function(){return te.activeElement===S[0]},focusedOnSearch:function(){return te.activeElement===L[0]},allFiltered:function(){return(h.is.multiple()||h.has.search())&&!(0==f.hideAdditions&&h.has.userSuggestion())&&!h.has.message()&&h.has.allResultsFiltered()},hidden:function(e){return!h.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return _.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return S.hasClass(g.multiple)},remote:function(){return f.apiSettings&&h.can.useAPI()},single:function(){return!h.is.multiple()},selectMutation:function(e){var n=!1;return _.each(e,function(e,t){if(_(t.target).is("select")||_(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return S.hasClass(g.search)},searchSelection:function(){return h.has.search()&&1===L.parent(w.dropdown).length},selection:function(){return S.hasClass(g.selection)},userValue:function(e){return-1!==_.inArray(e,h.get.userValues())},upward:function(e){return(e||S).hasClass(g.upward)},visible:function(e){return e?e.hasClass(g.visible):O.hasClass(g.visible)},verticallyScrollableContext:function(){var e=A.get(0)!==ee&&A.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=A.get(0)!==ee&&A.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!f.useLabels||(!h.has.maxSelections()||!(!h.has.maxSelections()||!e.hasClass(g.active)))},openDownward:function(e){var t,n,i=e||O,a=!0;return i.addClass(g.loading),n={context:{offset:A.get(0)===ee?{top:0,left:0}:A.offset(),scrollTop:A.scrollTop(),height:A.outerHeight()},menu:{offset:i.offset(),height:i.outerHeight()}},h.is.verticallyScrollableContext()&&(n.menu.offset.top+=n.context.scrollTop),a=(t={above:n.context.scrollTop<=n.menu.offset.top-n.context.offset.top-n.menu.height,below:n.context.scrollTop+n.context.height>=n.menu.offset.top-n.context.offset.top+n.menu.height}).below?(h.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(h.verbose("Dropdown cannot fit below, opening upward",t),!1):(h.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),i.removeClass(g.loading),a},openRightward:function(e){var t,n,i=e||O,a=!0;return i.addClass(g.loading),n={context:{offset:A.get(0)===ee?{top:0,left:0}:A.offset(),scrollLeft:A.scrollLeft(),width:A.outerWidth()},menu:{offset:i.offset(),width:i.outerWidth()}},h.is.horizontallyScrollableContext()&&(n.menu.offset.left+=n.context.scrollLeft),(t=n.menu.offset.left-n.context.offset.left+n.menu.width>=n.context.scrollLeft+n.context.width)&&(h.verbose("Dropdown cannot fit in context rightward",t),a=!1),i.removeClass(g.loading),a},click:function(){return Q||"click"==f.on},extendSelect:function(){return f.allowAdditions||f.apiSettings},show:function(){return!h.is.disabled()&&(h.has.items()||h.has.message())},useAPI:function(){return _.fn.api!==ne}},animate:{show:function(e,t){var n,i=t||O,a=t?function(){}:function(){h.hideSubMenus(),h.hideOthers(),h.set.active()};e=_.isFunction(e)?e:function(){},h.verbose("Doing menu show animation",i),h.set.direction(t),n=h.get.transition(t),h.is.selection()&&h.set.scrollPosition(h.get.selectedItem(),!0),(h.is.hidden(i)||h.is.animating(i))&&("none"==n?(a(),i.transition("show"),e.call(N)):_.fn.transition!==ne&&S.transition("is supported")?i.transition({animation:n+" in",debug:f.debug,verbose:f.verbose,duration:f.duration,queue:!0,onStart:a,onComplete:function(){e.call(N)}}):h.error(m.noTransition,n))},hide:function(e,t){var n=t||O,i=t?function(){}:function(){h.can.click()&&h.unbind.intent(),h.remove.active()},a=h.get.transition(t);e=_.isFunction(e)?e:function(){},(h.is.visible(n)||h.is.animating(n))&&(h.verbose("Doing menu hide animation",n),"none"==a?(i(),n.transition("hide"),e.call(N)):_.fn.transition!==ne&&S.transition("is supported")?n.transition({animation:a+" out",duration:f.duration,debug:f.debug,verbose:f.verbose,queue:!1,onStart:i,onComplete:function(){e.call(N)}}):h.error(m.transition))}},hideAndClear:function(){h.remove.searchTerm(),h.has.maxSelections()||(h.has.search()?h.hide(function(){h.remove.filteredItem()}):h.hide())},delay:{show:function(){h.verbose("Delaying show event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.show,f.delay.show)},hide:function(){h.verbose("Delaying hide event to ensure user intent"),clearTimeout(h.timer),h.timer=setTimeout(h.hide,f.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,a=n&&-1!==e.search(v.quote),o=[];return i||!a?e:(h.debug("Encoding quote values for use in select",e),t?(_.each(e,function(e,t){o.push(t.replace(v.quote,"&quot;"))}),o):e.replace(v.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(v.escape,"\\$&")},htmlEntities: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}},setting:function(e,t){if(h.debug("Changing setting",e,t),_.isPlainObject(e))_.extend(!0,f,e);else{if(t===ne)return f[e];_.isPlainObject(f[e])?_.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(_.isPlainObject(e))_.extend(!0,h,e);else{if(t===ne)return h[e];h[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?h.performance.log(arguments):(h.debug=Function.prototype.bind.call(console.info,console,f.name+":"),h.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?h.performance.log(arguments):(h.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),h.verbose.apply(console,arguments)))},error:function(){f.silent||(h.error=Function.prototype.bind.call(console.error,console,f.name+":"),h.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-($||t),$=t,X.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:N,"Execution Time":n})),clearTimeout(h.performance.timer),h.performance.timer=setTimeout(h.performance.display,500)},display:function(){var e=f.name+":",n=0;$=!1,clearTimeout(h.performance.timer),_.each(X,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",W&&(e+=" '"+W+"'"),(console.group!==ne||console.table!==ne)&&0<X.length&&(console.groupCollapsed(e),console.table?console.table(X):_.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,s=H;return e=e||Z,t=N||t,"string"==typeof i&&s!==ne&&(i=i.split(/[\. ]/),a=i.length-1,_.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(_.isPlainObject(s[n])&&e!=a)s=s[n];else{if(s[n]!==ne)return o=s[n],!1;if(!_.isPlainObject(s[t])||e==a)return s[t]!==ne?o=s[t]:h.error(m.method,i),!1;s=s[t]}})),_.isFunction(o)?n=o.apply(t,e):o!==ne&&(n=o),Array.isArray(U)?U.push(n):U!==ne?U=[U,n]:n!==ne&&(U=n),o}},J?(H===ne&&h.initialize(),h.invoke(G)):(H!==ne&&H.invoke("destroy"),h.initialize())}),U!==ne?U:B},_.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:!1,ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,headerDivider:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return _(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",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",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",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable"}},_.fn.dropdown.settings.templates={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},dropdown:function(e,t,n,i){var a=e.placeholder||!1,o="",s=_.fn.dropdown.settings.templates.escape;return o+='<i class="dropdown icon"></i>',o+=a?'<div class="default text">'+s(a,n)+"</div>":'<div class="text"></div>',o+='<div class="'+i.menu+'">',o+=_.fn.dropdown.settings.templates.menu(e,t,n,i),o+="</div>"},menu:function(e,r,l,c){var t=e[r.values]||[],u="",d=_.fn.dropdown.settings.templates.escape,v=_.fn.dropdown.settings.templates.deQuote;return _.each(t,function(e,t){var n=t[r.type]?t[r.type]:"item";if("item"===n){var i=t[r.text]?' data-text="'+v(t[r.text])+'"':"",a=t[r.disabled]?c.disabled+" ":"";u+='<div class="'+a+(t[r.class]?v(t[r.class]):c.item)+'" data-value="'+v(t[r.value])+'"'+i+">",t[r.image]&&(u+='<img class="'+(t[r.imageClass]?v(t[r.imageClass]):c.image)+'" src="'+v(t[r.image])+'">'),t[r.icon]&&(u+='<i class="'+v(t[r.icon])+" "+(t[r.iconClass]?v(t[r.iconClass]):c.icon)+'"></i>'),u+=d(t[r.name]||"",l),u+="</div>"}else if("header"===n){var o=d(t[r.name]||"",l),s=t[r.icon]?v(t[r.icon]):c.groupIcon;""===o&&""===s||(u+='<div class="'+(t[r.class]?v(t[r.class]):c.header)+'">',""!==s&&(u+='<i class="'+s+" "+(t[r.iconClass]?v(t[r.iconClass]):c.icon)+'"></i>'),u+=o,u+="</div>"),t[r.divider]&&(u+='<div class="'+c.divider+'"></div>')}}),u},label:function(e,t,n,i){return(0,_.fn.dropdown.settings.templates.escape)(t,n)+'<i class="'+i.delete+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document);
/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

/*
* # Fomantic UI - 2.8.5
* # Fomantic UI - 2.8.6
* https://github.com/fomantic/Fomantic-UI

@@ -4,0 +4,0 @@ * http://fomantic-ui.com/

{
"name": "fomantic-ui-css",
"version": "2.8.5",
"version": "2.8.6",
"title": "Fomantic UI",

@@ -5,0 +5,0 @@ "description": "CSS Only distribution of Fomantic UI",

@@ -9,3 +9,3 @@ # CSS Distribution

If you have any issues please use the main [Fomantic-UI repositroy](https://github.com/fomantic/Fomantic-UI).
If you have any issues please use the main [Fomantic-UI repository](https://github.com/fomantic/Fomantic-UI).

@@ -12,0 +12,0 @@ ## Installation

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc