fomantic-ui 2.9.0-beta.212 → 2.9.0-beta.216
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +96 -54
- package/dist/components/button.min.css +2 -2
- package/dist/components/calendar.css +18 -1
- package/dist/components/calendar.js +5 -3
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +192 -117
- package/dist/semantic.js +29 -27
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/elements/button.less +227 -103
- package/src/definitions/modules/calendar.js +4 -2
- package/src/definitions/modules/calendar.less +20 -0
- package/src/themes/default/elements/button.variables +5 -0
- package/src/themes/default/globals/variation.variables +5 -0
- package/src/themes/default/modules/calendar.variables +3 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.0-beta.
|
2
|
+
* # Fomantic UI - 2.9.0-beta.216
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* http://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* http://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(De,T,O,ve){"use strict";De.isFunction=De.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},T=void 0!==T&&T.Math==Math?T:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),De.fn.calendar=function(g){var y,e=De(this),D=e.selector||"",v=(new Date).getTime(),b=[],C=g,w="string"==typeof C,M=[].slice.call(arguments,1),x={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}},ye=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var c,e,ue,de=De.isPlainObject(g)?De.extend(!0,{},De.fn.calendar.settings,g):De.extend({},De.fn.calendar.settings),fe=de.className,t=de.namespace,i=de.selector,ce=de.formatter,a=de.parser,pe=de.metadata,he=x[de.minTimeGap],s=de.error,n="."+t,r="module-"+t,o=De(this),l=o.find(i.input),me=o.find(i.popup),u=o.find(i.activator),p=this,d=o.data(r),h=!1,ge=o.hasClass(fe.inverted),f=!1,m=!1;ue={initialize:function(){ue.debug("Initializing calendar for",p,o),c=ue.get.isTouch(),ue.setup.config(),ue.setup.popup(),ue.setup.inline(),ue.setup.input(),ue.setup.date(),ue.create.calendar(),ue.bind.events(),ue.observeChanges(),ue.instantiate()},instantiate:function(){ue.verbose("Storing instance of calendar"),d=ue,o.data(r,d)},destroy:function(){ue.verbose("Destroying previous calendar for",p),o.removeData(r),ue.unbind.events(),ue.disconnect.classObserver()},setup:{config:function(){null!==ue.get.minDate()&&ue.set.minDate(o.data(pe.minDate)),null!==ue.get.maxDate()&&ue.set.maxDate(o.data(pe.maxDate)),ue.setting("type",ue.get.type()),ue.setting("on",de.on||"click")},popup:function(){if(!de.inline&&(u.length||(u=o.children().first()).length))if(De.fn.popup!==ve){if(!me.length){var e=u.parent(),t=0!==e.closest(i.append).length?"appendTo":"prependTo";me=De("<div/>").addClass(fe.popup)[t](e)}me.addClass(fe.calendar),ge&&me.addClass(fe.inverted);var a=function(){return ue.refreshTooltips(),de.onVisible.apply(me,arguments)};l.length||(me.attr("tabindex","0"),a=function(){return ue.refreshTooltips(),ue.focus(),de.onVisible.apply(me,arguments)});var n=ue.setting("on"),r=De.extend({},de.popupOptions,{popup:me,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ue.set.focusDate(ue.get.date()),ue.set.mode(ue.get.validatedMode(de.startMode)),de.onShow.apply(me,arguments)},onVisible:a,onHide:de.onHide,onHidden:function(){return ue.blur(),de.onHidden.apply(me,arguments)}});ue.popup(r)}else ue.error(s.popup)},inline:function(){u.length&&!de.inline||(de.inline=!0,me=De("<div/>").addClass(fe.calendar).appendTo(o),l.length||me.attr("tabindex","0"))},input:function(){de.touchReadonly&&l.length&&c&&l.prop("readonly",!0),ue.check.disabled()},date:function(){var e;de.initialDate?e=a.date(de.initialDate,de):o.data(pe.date)!==ve?e=a.date(o.data(pe.date),de):l.length&&(e=a.date(l.val(),de)),ue.set.date(e,de.formatInput,!1),ue.set.mode(ue.get.mode(),!1)}},trigger:{change:function(){var e=l[0];if(e){var t=O.createEvent("HTMLEvents");ue.verbose("Triggering native change event"),t.initEvent("change",!0,!1),e.dispatchEvent(t)}}},create:{calendar:function(){var e,t,a,n,r,i,o,s=ue.get.mode(),l=new Date,u=ue.get.date(),d=ue.get.focusDate(),f=ue.helper.dateInRange(d||u||de.initialDate||l);d||(d=f,ue.set.focusDate(d,!1,!1));var c="year"===s,p="month"===s,h="day"===s,m="hour"===s,g="minute"===s,y="time"===de.type,D=Math.max(de.multiMonth,1),v=h?ue.get.monthOffset():0,b=f.getMinutes(),C=f.getHours(),w=f.getDate(),M=f.getMonth()+v,x=f.getFullYear(),T=h?de.showWeekNumbers?8:7:m?4:he.column,O=h||m?6:he.row,k=h?D:1,A=me,F=A.hasClass("left")?"right center":"left center";for(A.empty(),1<k&&(o=De("<div/>").addClass(fe.grid).appendTo(A)),n=0;n<k;n++){if(1<k)A=De("<div/>").addClass(fe.column).appendTo(o);var H=M+n,N=(new Date(x,H,1).getDay()-de.firstDayOfWeek%7+7)%7;if(!de.constantHeight&&h){var E=new Date(x,H+1,0).getDate()+N;O=Math.ceil(E/7)}var Y=c?10:p?1:0,I=h?1:0,j=m||g?1:0,q=m||g?w:1,S=new Date(x-Y,H-I,q-j,C),W=new Date(x+Y,H+I,q+j,C),R=c?new Date(10*Math.ceil(x/10)-9,0,0):p?new Date(x,0,0):h?new Date(x,H,0):new Date(x,H,w,-1),V=c?new Date(10*Math.ceil(x/10)+1,0,1):p?new Date(x+1,0,1):h?new Date(x,H+1,1):new Date(x,H,w+1),G=s;h&&de.showWeekNumbers&&(G+=" andweek");var P=De("<table/>").addClass(fe.table).addClass(G).addClass(ye[T]+" column").appendTo(A);ge&&P.addClass(fe.inverted);var B=T;if(!y){var K=De("<thead/>").appendTo(P);r=De("<tr/>").appendTo(K),i=De("<th/>").attr("colspan",""+T).appendTo(r);var U=c||p?new Date(x,0,1):h?new Date(x,H,1):new Date(x,H,w,C,b),J=De("<span/>").addClass(fe.link).appendTo(i);J.text(ce.header(U,s,de));var z=p?de.disableYear?"day":"year":h?de.disableMonth?"year":"month":"day";if(J.data(pe.mode,z),0===n){var L=De("<span/>").addClass(fe.prev).appendTo(i);L.data(pe.focusDate,S),L.toggleClass(fe.disabledCell,!ue.helper.isDateInRange(R,s)),De("<i/>").addClass(fe.prevIcon).appendTo(L)}if(n===k-1){var $=De("<span/>").addClass(fe.next).appendTo(i);$.data(pe.focusDate,W),$.toggleClass(fe.disabledCell,!ue.helper.isDateInRange(V,s)),De("<i/>").addClass(fe.nextIcon).appendTo($)}if(h)for(r=De("<tr/>").appendTo(K),de.showWeekNumbers&&((i=De("<th/>").appendTo(r)).text(de.text.weekNo),i.addClass(fe.weekCell),B--),e=0;e<B;e++)(i=De("<th/>").appendTo(r)).text(ce.dayColumnHeader((e+de.firstDayOfWeek)%7,de))}var Q=De("<tbody/>").appendTo(P);for(e=c?10*Math.ceil(x/10)-9:h?1-N:0,t=0;t<O;t++)for(r=De("<tr/>").appendTo(Q),h&&de.showWeekNumbers&&((i=De("<th/>").appendTo(r)).text(ue.get.weekOfYear(x,H,e+1-de.firstDayOfWeek)),i.addClass(fe.weekCell)),a=0;a<B;a++,e++){var Z=c?new Date(e,H,1,C,b):p?new Date(x,e,1,C,b):h?new Date(x,H,e,C,b):m?new Date(x,H,w,e):new Date(x,H,w,C,e*de.minTimeGap),X=c?e:p?de.text.monthsShort[e]:h?Z.getDate():ce.time(Z,de,!0);(i=De("<td/>").addClass(fe.cell).appendTo(r)).text(X),i.data(pe.date,Z);var _,ee=h&&Z.getMonth()!==(H+12)%12,te=!de.selectAdjacentDays&&ee||!ue.helper.isDateInRange(Z,s)||de.isDisabled(Z,s)||ue.helper.isDisabled(Z,s)||!ue.helper.isEnabled(Z,s);if(te){var ae=ue.helper.findDayAsObject(Z,s,de.disabledDates);if(null!==ae&&ae[pe.message]&&(i.attr("data-tooltip",ae[pe.message]),i.attr("data-position",ae[pe.position]||F),(ae[pe.inverted]||ge&&ae[pe.inverted]===ve)&&i.attr("data-inverted",""),ae[pe.variation]&&i.attr("data-variation",ae[pe.variation])),"hour"===s){var ne=ue.helper.findHourAsObject(Z,s,de.disabledHours);null!==ne&&ne[pe.message]&&(i.attr("data-tooltip",ne[pe.message]),i.attr("data-position",ne[pe.position]||F),(ne[pe.inverted]||ge&&ne[pe.inverted]===ve)&&i.attr("data-inverted",""),ne[pe.variation]&&i.attr("data-variation",ne[pe.variation]))}}else null!==(_=ue.helper.findDayAsObject(Z,s,de.eventDates))&&(i.addClass(_[pe.class]||de.eventClass),_[pe.message]&&(i.attr("data-tooltip",_[pe.message]),i.attr("data-position",_[pe.position]||F),(_[pe.inverted]||ge&&_[pe.inverted]===ve)&&i.attr("data-inverted",""),_[pe.variation]&&i.attr("data-variation",_[pe.variation])));var re=ue.helper.dateEqual(Z,u,s),ie=ue.helper.dateEqual(Z,l,s);i.toggleClass(fe.adjacentCell,ee&&!_),i.toggleClass(fe.disabledCell,te),i.toggleClass(fe.activeCell,re&&!(ee&&te)),m||g||i.toggleClass(fe.todayCell,!ee&&ie);var oe={mode:s,adjacent:ee,disabled:te,active:re,today:ie};ce.cell(i,Z,oe),ue.helper.dateEqual(Z,d,s)&&ue.set.focusDate(Z,!1,!1)}if(de.today){var se=De("<tr/>").appendTo(Q),le=De("<td/>").attr("colspan",""+T).addClass(fe.today).appendTo(se);le.text(ce.today(de)),le.data(pe.date,l)}ue.update.focus(!1,P),de.inline&&ue.refreshTooltips()}}},update:{focus:function(e,t){t=t||me;var s=ue.get.mode(),a=ue.get.date(),l=ue.get.focusDate(),u=ue.get.startDate(),d=ue.get.endDate(),f=(e?l:null)||a||(c?null:l);t.find("td").each(function(){var e=De(this),t=e.data(pe.date);if(t){var a=e.hasClass(fe.disabledCell),n=e.hasClass(fe.activeCell),r=e.hasClass(fe.adjacentCell),i=ue.helper.dateEqual(t,l,s),o=!!f&&(!!u&&ue.helper.isDateInRange(t,s,u,f)||!!d&&ue.helper.isDateInRange(t,s,f,d));e.toggleClass(fe.focusCell,i&&(!c||h)&&(!r||de.selectAdjacentDays&&r)&&!a),ue.helper.isTodayButton(e)||e.toggleClass(fe.rangeCell,o&&!n&&!a)}})}},refresh:function(){ue.create.calendar()},refreshTooltips:function(){var r=De(T).width();me.find("td[data-position]").each(function(){var e=De(this),t=T.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),a=e.attr("data-position"),n=r-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(n)&&e.attr("data-position",a.replace(/(left|right)/,n))})},bind:{events:function(){ue.debug("Binding events"),me.on("mousedown"+n,ue.event.mousedown),me.on("touchstart"+n,ue.event.mousedown),me.on("mouseup"+n,ue.event.mouseup),me.on("touchend"+n,ue.event.mouseup),me.on("mouseover"+n,ue.event.mouseover),l.length?(l.on("input"+n,ue.event.inputChange),l.on("focus"+n,ue.event.inputFocus),l.on("blur"+n,ue.event.inputBlur),l.on("keydown"+n,ue.event.keydown)):me.on("keydown"+n,ue.event.keydown)}},unbind:{events:function(){ue.debug("Unbinding events"),me.off(n),l.length&&l.off(n)}},event:{mouseover:function(e){var t=De(e.target).data(pe.date),a=1===e.buttons;t&&ue.set.focusDate(t,!1,!0,a)},mousedown:function(e){l.length&&e.preventDefault(),h=0<=e.type.indexOf("touch");var t=De(e.target).data(pe.date);t&&ue.set.focusDate(t,!1,!0,!0)},mouseup:function(e){ue.focus(),e.preventDefault(),e.stopPropagation(),h=!1;var t=De(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),i=t.data(pe.mode);if(n&&!1!==de.onSelect.call(p,n,ue.get.mode())){var o=t.hasClass(fe.today);ue.selectDate(n,o)}else r?ue.set.focusDate(r):i&&ue.set.mode(i)}},keydown:function(e){var t=e.which;if(27!==t&&9!==t||ue.popup("hide"),ue.popup("is visible"))if(37===t||38===t||39===t||40===t){var a="day"===(f=ue.get.mode())?7:"hour"===f?4:"minute"===f?he.column:3,n=37===t?-1:38===t?-a:39==t?1:a;n*="minute"===f?de.minTimeGap:1;var r=ue.get.focusDate()||ue.get.date()||new Date,i=r.getFullYear()+("year"===f?n:0),o=r.getMonth()+("month"===f?n:0),s=r.getDate()+("day"===f?n:0),l=r.getHours()+("hour"===f?n:0),u=r.getMinutes()+("minute"===f?n:0),d=new Date(i,o,s,l,u);"time"===de.type&&(d=ue.helper.mergeDateTime(r,d)),ue.helper.isDateInRange(d,f)&&ue.set.focusDate(d)}else if(13===t){var f=ue.get.mode(),c=ue.get.focusDate();c&&!de.isDisabled(c,f)&&!ue.helper.isDisabled(c,f)&&ue.helper.isEnabled(c,f)&&!1!==de.onSelect.call(p,c,ue.get.mode())&&ue.selectDate(c),e.preventDefault(),e.stopPropagation()}38!==t&&40!==t||(e.preventDefault(),ue.popup("show"))},inputChange:function(){var e=l.val(),t=a.date(e,de);ue.set.date(t,!1)},inputFocus:function(){me.addClass(fe.active)},inputBlur:function(){if(me.removeClass(fe.active),de.formatInput){var e=ue.get.date(),t=ce.datetime(e,de);l.val(t)}m&&(ue.trigger.change(),m=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ue.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ue.event.class.mutation),ue.debug("Setting up mutation observer",e),ue.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(fe.disabled)}},check:{disabled:function(){l.attr("tabindex",ue.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){var n,r,i;return n=Date.UTC(e,t,a+3)/864e5,r=Math.floor(n/7),i=new Date(6048e5*r).getUTCFullYear(),r-Math.floor(Date.UTC(i,0,7)/6048e5)+1},date:function(){return ue.helper.sanitiseDate(o.data(pe.date))||null},inputDate:function(){return l.val()},focusDate:function(){return o.data(pe.focusDate)||null},startDate:function(){var e=ue.get.calendarModule(de.startCalendar);return(e?e.get.date():o.data(pe.startDate))||null},endDate:function(){var e=ue.get.calendarModule(de.endCalendar);return(e?e.get.date():o.data(pe.endDate))||null},minDate:function(){return o.data(pe.minDate)||null},maxDate:function(){return o.data(pe.maxDate)||null},monthOffset:function(){return o.data(pe.monthOffset)||0},mode:function(){var e=o.data(pe.mode)||de.startMode;return ue.get.validatedMode(e)},validatedMode:function(e){var t=ue.get.validModes();return 0<=De.inArray(e,t)?e:"time"===de.type?"hour":"month"===de.type?"month":"year"===de.type?"year":"day"},type:function(){return o.data(pe.type)||de.type},validModes:function(){var e=[];return"time"!==de.type&&(de.disableYear&&"year"!==de.type||e.push("year"),(de.disableMonth||"year"===de.type)&&"month"!==de.type||e.push("month"),0<=de.type.indexOf("date")&&e.push("day")),0<=de.type.indexOf("time")&&(e.push("hour"),de.disableMinute||e.push("minute")),e},isTouch:function(){try{return O.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof De||(e=De(e).first()),e.data(r)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ue.helper.sanitiseDate(e),e=ue.helper.dateInRange(e);var n=ue.get.mode(),r=ce.datetime(e,de);if(a&&!1===de.onBeforeChange.call(p,e,r,n))return!1;if(ue.set.focusDate(e),de.isDisabled(e,n))return!1;var i=ue.get.endDate();i&&e&&i<e&&ue.set.endDate(ve),ue.set.dataKeyValue(pe.date,e),t&&l.length&&l.val(r),a&&de.onChange.call(p,e,r,n)},startDate:function(e,t){e=ue.helper.sanitiseDate(e);var a=ue.get.calendarModule(de.startCalendar);a&&a.set.date(e),ue.set.dataKeyValue(pe.startDate,e,t)},endDate:function(e,t){e=ue.helper.sanitiseDate(e);var a=ue.get.calendarModule(de.endCalendar);a&&a.set.date(e),ue.set.dataKeyValue(pe.endDate,e,t)},focusDate:function(e,t,a,n){e=ue.helper.sanitiseDate(e),e=ue.helper.dateInRange(e);var r="day"===ue.get.mode(),i=ue.get.focusDate();if(r&&e&&i){var o=12*(e.getFullYear()-i.getFullYear())+e.getMonth()-i.getMonth();if(o){var s=ue.get.monthOffset()-o;ue.set.monthOffset(s,!1)}}var l=ue.set.dataKeyValue(pe.focusDate,e,!!e&&t);a=!1!==a&&l&&!1===t||f!=n,f=n,a&&ue.update.focus(n)},minDate:function(e){e=ue.helper.sanitiseDate(e),null!==de.maxDate&&de.maxDate<=e?ue.verbose("Unable to set minDate variable bigger that maxDate variable",e,de.maxDate):(ue.setting("minDate",e),ue.set.dataKeyValue(pe.minDate,e))},maxDate:function(e){e=ue.helper.sanitiseDate(e),null!==de.minDate&&de.minDate>=e?ue.verbose("Unable to set maxDate variable lower that minDate variable",e,de.minDate):(ue.setting("maxDate",e),ue.set.dataKeyValue(pe.maxDate,e))},monthOffset:function(e,t){var a=Math.max(de.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ue.set.dataKeyValue(pe.monthOffset,e,t)},mode:function(e,t){ue.set.dataKeyValue(pe.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),r=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!r)&&ue.refresh(),!r}},selectDate:function(e,t){ue.verbose("New date selection",e);var a=ue.get.mode();if(t||"minute"===a||de.disableMinute&&"hour"===a||"date"===de.type&&"day"===a||"month"===de.type&&"month"===a||"year"===de.type&&"year"===a){if(!(!1===ue.set.date(e))&&(m=!0,de.closable)){ue.popup("hide");var n=ue.get.calendarModule(de.endCalendar);n&&(n.refresh(),"focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{var r="year"===a?de.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";ue.set.mode(r),"hour"===a||"day"===a&&ue.get.date()?ue.set.date(e,!0,!1):ue.set.focusDate(e)}},changeDate:function(e){ue.set.date(e)},clear:function(){ue.set.date(ve)},popup:function(){return u.popup.apply(u,arguments)},focus:function(){l.length?l.focus():me.focus()},blur:function(){l.length?l.blur():me.blur()},helper:{isDisabled:function(a,n){return("day"===n||"month"===n||"year"===n||"hour"===n)&&("day"===n&&-1!==de.disabledDaysOfWeek.indexOf(a.getDay())||de.disabledDates.some(function(e){if("string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date)return ue.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=ue.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 ue.helper.dateEqual(a,ue.helper.sanitiseDate(e[pe.date]),n);if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){return ue.helper.dateEqual(a,e,n)})}})||"hour"===n&&de.disabledHours.some(function(e){if("string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date)return ue.helper.dateEqual(a,e,n);if("number"==typeof e)return a.getHours()===e;if(null!==e&&"object"==typeof e){var t=!0;if(e[pe.date])if(e[pe.date]instanceof Date)t=ue.helper.dateEqual(a,ue.helper.sanitiseDate(e[pe.date]));else if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){t=ue.helper.dateEqual(a,e,n)});if(e[pe.days]&&("number"==typeof e[pe.days]?t=a.getDay()==e[pe.days]:Array.isArray(e[pe.days])&&(t=-1<e[pe.days].indexOf(a.getDay()))),e[pe.hours]){if("number"==typeof e[pe.hours])return t&&a.getHours()==e[pe.hours];if(Array.isArray(e[pe.hours]))return t&&-1<e[pe.hours].indexOf(a.getHours())}}}))},isEnabled:function(t,a){return"day"!==a||(0===de.enabledDates.length||de.enabledDates.some(function(e){return"string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date?ue.helper.dateEqual(t,e,a):null!==e&&"object"==typeof e&&e[pe.date]?ue.helper.dateEqual(t,ue.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=ue.helper.sanitiseDate(n)),n instanceof Date&&ue.helper.dateEqual(t,n,a)){var i={};return i[pe.date]=n,i}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 o=ue.helper.sanitiseDate(n[pe.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return n}}else if(n[pe.date]&&"day"===a){if(n[pe.date]instanceof Date&&ue.helper.dateEqual(t,ue.helper.sanitiseDate(n[pe.date]),a))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return ue.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a)for(var n,r=function(e,t){if(t[pe.hours]){if("number"==typeof t[pe.hours]&&e.getHours()==t[pe.hours])return t;if(Array.isArray(t[pe.hours])&&-1<t[pe.hours].indexOf(e.getHours()))return t}},i=0;i<e.length;i++){if("number"==typeof(n=e[i])&&t.getHours()==n)return null;if(null!==n&&"object"==typeof n)if(n[pe.days]&&r(t,n)){if("number"==typeof n[pe.days]&&t.getDay()==n[pe.days])return n;if(Array.isArray(n[pe.days])&&-1<n[pe.days].indexOf(t.getDay()))return n}else if(n[pe.date]&&r(t,n)){if(n[pe.date]instanceof Date&&ue.helper.dateEqual(t,ue.helper.sanitiseDate(n[pe.date])))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return ue.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return e instanceof Date||(e=a.date(""+e,de)),!e||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){a=a||"day";var n="time"===de.type,r="year"===a,i=r||"month"===a,o="minute"===a,s=o||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:r?0:e.getMonth(),n?1:i?1:e.getDate(),s?e.getHours():0,o?de.minTimeGap*Math.floor(e.getMinutes()/de.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n?0:r?0:t.getMonth(),n?1:i?1:t.getDate(),s?t.getHours():0,o?de.minTimeGap*Math.floor(t.getMinutes()/de.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ue.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var r=ue.get.startDate();a=r&&de.minDate?new Date(Math.max(r,de.minDate)):r||de.minDate,n=de.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),de.minTimeGap*Math.ceil(a.getMinutes()/de.minTimeGap)),!(!e||a&&0<ue.helper.dateDiff(e,a,t)||n&&0<ue.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=ue.get.startDate();t=n&&de.minDate?new Date(Math.max(n,de.minDate)):n||de.minDate,a=de.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),de.minTimeGap*Math.ceil(t.getMinutes()/de.minTimeGap));var r="time"===de.type;return e?t&&0<ue.helper.dateDiff(e,t,"minute")?r?ue.helper.mergeDateTime(e,t):t:a&&0<ue.helper.dateDiff(a,e,"minute")?r?ue.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()===de.text.today}},setting:function(e,t){if(ue.debug("Changing setting",e,t),De.isPlainObject(e))De.extend(!0,de,e);else{if(t===ve)return de[e];De.isPlainObject(de[e])?De.extend(!0,de[e],t):de[e]=t}},internal:function(e,t){if(De.isPlainObject(e))De.extend(!0,ue,e);else{if(t===ve)return ue[e];ue[e]=t}},debug:function(){!de.silent&&de.debug&&(de.performance?ue.performance.log(arguments):(ue.debug=Function.prototype.bind.call(console.info,console,de.name+":"),ue.debug.apply(console,arguments)))},verbose:function(){!de.silent&&de.verbose&&de.debug&&(de.performance?ue.performance.log(arguments):(ue.verbose=Function.prototype.bind.call(console.info,console,de.name+":"),ue.verbose.apply(console,arguments)))},error:function(){de.silent||(ue.error=Function.prototype.bind.call(console.error,console,de.name+":"),ue.error.apply(console,arguments))},performance:{log:function(e){var t,a;de.performance&&(a=(t=(new Date).getTime())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":a})),clearTimeout(ue.performance.timer),ue.performance.timer=setTimeout(ue.performance.display,500)},display:function(){var e=de.name+":",a=0;v=!1,clearTimeout(ue.performance.timer),De.each(b,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",D&&(e+=" '"+D+"'"),(console.group!==ve||console.table!==ve)&&0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):De.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(n,e,t){var r,i,a,o=d;return e=e||M,t=p||t,"string"==typeof n&&o!==ve&&(n=n.split(/[\. ]/),r=n.length-1,De.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(De.isPlainObject(o[a])&&e!=r)o=o[a];else{if(o[a]!==ve)return i=o[a],!1;if(!De.isPlainObject(o[t])||e==r)return o[t]!==ve?i=o[t]:ue.error(s.method,n),!1;o=o[t]}})),De.isFunction(i)?a=i.apply(t,e):i!==ve&&(a=i),Array.isArray(y)?y.push(a):y!==ve?y=[y,a]:a!==ve&&(y=a),i}},w?(d===ve&&ue.initialize(),ue.invoke(C)):(d!==ve&&d.invoke("destroy"),ue.initialize())}),y!==ve?y:this},De.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,disabledHours:[],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(),i="";return t.ampm&&(i=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(r<10?"0":"")+r+i},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]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var a,n,r,i=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(i.getDate()))return i;e=e.toLowerCase();var o,s,l,u=-1,d=-1,f=-1,c=-1,p=-1,h=ve,m="time"===t.type,g=t.type.indexOf("time")<0,y=e.split(t.regExp.dateWords),D=e.split(t.regExp.dateNumbers);if(!g)for(h=0<=De.inArray(t.text.am.toLowerCase(),y)||!(0<=De.inArray(t.text.pm.toLowerCase(),y))&&ve,a=0;a<D.length;a++)if(0<=(s=D[a]).indexOf(":")){if(d<0||u<0)for(l=s.split(":"),r=0;r<Math.min(2,l.length);r++)n=parseInt(l[r]),isNaN(n)&&(n=0),0===r?d=n%24:u=n%60;D.splice(a,1)}if(!m){for(a=0;a<y.length;a++)if(!((o=y[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].substring(0,o.length).toLowerCase()===o){c=n+1;break}if(0<=c)break}for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&n>=t.centuryBreak&&a===D.length-1){n<=99&&(n+=t.currentCentury-100),p=n,D.splice(a,1);break}if(c<0)for(a=0;a<D.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(D[r]),!isNaN(n)&&1<=n&&n<=12){c=n,D.splice(r,1);break}for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&1<=n&&n<=31){f=n,D.splice(a,1);break}if(p<0)for(a=D.length-1;0<=a;a--)if(n=parseInt(D[a]),!isNaN(n)){n<=99&&(n+=t.currentCentury),p=n,D.splice(a,1);break}}if(!g){if(d<0)for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&0<=n&&n<=23){d=n,D.splice(a,1);break}if(u<0)for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&0<=n&&n<=59){u=n,D.splice(a,1);break}}if(u<0&&d<0&&f<0&&c<0&&p<0)return null;u<0&&(u=0),d<0&&(d=0),f<0&&(f=1),c<0&&(c=1),p<0&&(p=(new Date).getFullYear()),h!==ve&&(h?12===d&&(d=0):d<12&&(d+=12));var v=new Date(p,c-1,f,d,u);return v.getMonth()===c-1&&v.getFullYear()===p||(v=new Date(p,c,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",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document);
|
11
|
+
!function(De,T,O,ve){"use strict";De.isFunction=De.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},T=void 0!==T&&T.Math==Math?T:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),De.fn.calendar=function(g){var y,e=De(this),D=e.selector||"",v=(new Date).getTime(),b=[],C=g,w="string"==typeof C,M=[].slice.call(arguments,1),x={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}},ye=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var c,e,ue,de=De.isPlainObject(g)?De.extend(!0,{},De.fn.calendar.settings,g):De.extend({},De.fn.calendar.settings),fe=de.className,t=de.namespace,i=de.selector,ce=de.formatter,a=de.parser,pe=de.metadata,he=x[de.minTimeGap],s=de.error,n="."+t,r="module-"+t,o=De(this),l=o.find(i.input),me=o.find(i.popup),u=o.find(i.activator),p=this,d=o.data(r),h=!1,ge=o.hasClass(fe.inverted),f=!1,m=!1;ue={initialize:function(){ue.debug("Initializing calendar for",p,o),c=ue.get.isTouch(),ue.setup.config(),ue.setup.popup(),ue.setup.inline(),ue.setup.input(),ue.setup.date(),ue.create.calendar(),ue.bind.events(),ue.observeChanges(),ue.instantiate()},instantiate:function(){ue.verbose("Storing instance of calendar"),d=ue,o.data(r,d)},destroy:function(){ue.verbose("Destroying previous calendar for",p),o.removeData(r),ue.unbind.events(),ue.disconnect.classObserver()},setup:{config:function(){null!==ue.get.minDate()&&ue.set.minDate(o.data(pe.minDate)),null!==ue.get.maxDate()&&ue.set.maxDate(o.data(pe.maxDate)),ue.setting("type",ue.get.type()),ue.setting("on",de.on||"click")},popup:function(){if(!de.inline&&(u.length||(u=o.children().first()).length))if(De.fn.popup!==ve){if(!me.length){var e=u.parent(),t=0!==e.closest(i.append).length?"appendTo":"prependTo";me=De("<div/>").addClass(fe.popup)[t](e)}me.addClass(fe.calendar),ge&&me.addClass(fe.inverted);var a=function(){return ue.refreshTooltips(),de.onVisible.apply(me,arguments)};l.length||(me.attr("tabindex","0"),a=function(){return ue.refreshTooltips(),ue.focus(),de.onVisible.apply(me,arguments)});var n=ue.setting("on"),r=De.extend({},de.popupOptions,{popup:me,on:n,hoverable:"hover"===n,closable:"click"===n,onShow:function(){return ue.set.focusDate(ue.get.date()),ue.set.mode(ue.get.validatedMode(de.startMode)),de.onShow.apply(me,arguments)},onVisible:a,onHide:de.onHide,onHidden:function(){return ue.blur(),de.onHidden.apply(me,arguments)}});ue.popup(r)}else ue.error(s.popup)},inline:function(){u.length&&!de.inline||(de.inline=!0,me=De("<div/>").addClass(fe.calendar).appendTo(o),l.length||me.attr("tabindex","0"))},input:function(){de.touchReadonly&&l.length&&c&&l.prop("readonly",!0),ue.check.disabled()},date:function(){var e;de.initialDate?e=a.date(de.initialDate,de):o.data(pe.date)!==ve?e=a.date(o.data(pe.date),de):l.length&&(e=a.date(l.val(),de)),ue.set.date(e,de.formatInput,!1),ue.set.mode(ue.get.mode(),!1)}},trigger:{change:function(){var e=l[0];if(e){var t=O.createEvent("HTMLEvents");ue.verbose("Triggering native change event"),t.initEvent("change",!0,!1),e.dispatchEvent(t)}}},create:{calendar:function(){var e,t,a,n,r,i,o,s=ue.get.mode(),l=new Date,u=ue.get.date(),d=ue.get.focusDate(),f=ue.helper.dateInRange(d||u||de.initialDate||l);d||(d=f,ue.set.focusDate(d,!1,!1));var c="year"===s,p="month"===s,h="day"===s,m="hour"===s,g="minute"===s,y="time"===de.type,D=Math.max(de.multiMonth,1),v=h?ue.get.monthOffset():0,b=f.getMinutes(),C=f.getHours(),w=f.getDate(),M=f.getMonth()+v,x=f.getFullYear(),T=h?de.showWeekNumbers?8:7:m?4:he.column,O=h||m?6:he.row,k=h?D:1,A=me,F=A.hasClass("left")?"right center":"left center";for(A.empty(),1<k&&(o=De("<div/>").addClass(fe.grid).appendTo(A)),n=0;n<k;n++){if(1<k)A=De("<div/>").addClass(fe.column).appendTo(o);var H=M+n,N=(new Date(x,H,1).getDay()-de.firstDayOfWeek%7+7)%7;if(!de.constantHeight&&h){var E=new Date(x,H+1,0).getDate()+N;O=Math.ceil(E/7)}var Y=c?10:p?1:0,I=h?1:0,j=m||g?1:0,q=m||g?w:1,S=new Date(x-Y,H-I,q-j,C),W=new Date(x+Y,H+I,q+j,C),R=c?new Date(10*Math.ceil(x/10)-9,0,0):p?new Date(x,0,0):h?new Date(x,H,0):new Date(x,H,w,-1),V=c?new Date(10*Math.ceil(x/10)+1,0,1):p?new Date(x+1,0,1):h?new Date(x,H+1,1):new Date(x,H,w+1),G=s;h&&de.showWeekNumbers&&(G+=" andweek");var P=De("<table/>").addClass(fe.table).addClass(G).addClass(ye[T]+" column").appendTo(A);ge&&P.addClass(fe.inverted);var B=T;if(!y){var K=De("<thead/>").appendTo(P);r=De("<tr/>").appendTo(K),i=De("<th/>").attr("colspan",""+T).appendTo(r);var U=c||p?new Date(x,0,1):h?new Date(x,H,1):new Date(x,H,w,C,b),J=De("<span/>").addClass(fe.link).appendTo(i);J.text(ce.header(U,s,de));var z=p?de.disableYear?"day":"year":h?de.disableMonth?"year":"month":"day";if(J.data(pe.mode,z),0===n){var L=De("<span/>").addClass(fe.prev).appendTo(i);L.data(pe.focusDate,S),L.toggleClass(fe.disabledCell,!ue.helper.isDateInRange(R,s)),De("<i/>").addClass(fe.prevIcon).appendTo(L)}if(n===k-1){var $=De("<span/>").addClass(fe.next).appendTo(i);$.data(pe.focusDate,W),$.toggleClass(fe.disabledCell,!ue.helper.isDateInRange(V,s)),De("<i/>").addClass(fe.nextIcon).appendTo($)}if(h)for(r=De("<tr/>").appendTo(K),de.showWeekNumbers&&((i=De("<th/>").appendTo(r)).text(de.text.weekNo),i.addClass(fe.weekCell),B--),e=0;e<B;e++)(i=De("<th/>").appendTo(r)).text(ce.dayColumnHeader((e+de.firstDayOfWeek)%7,de))}var Q=De("<tbody/>").appendTo(P);for(e=c?10*Math.ceil(x/10)-9:h?1-N:0,t=0;t<O;t++)for(r=De("<tr/>").appendTo(Q),h&&de.showWeekNumbers&&((i=De("<th/>").appendTo(r)).text(ue.get.weekOfYear(x,H,e+1-de.firstDayOfWeek)),i.addClass(fe.weekCell)),a=0;a<B;a++,e++){var Z=c?new Date(e,H,1,C,b):p?new Date(x,e,1,C,b):h?new Date(x,H,e,C,b):m?new Date(x,H,w,e):new Date(x,H,w,C,e*de.minTimeGap),X=c?e:p?de.text.monthsShort[e]:h?Z.getDate():ce.time(Z,de,!0);(i=De("<td/>").addClass(fe.cell).appendTo(r)).text(X),i.data(pe.date,Z);var _,ee=h&&Z.getMonth()!==(H+12)%12,te=!de.selectAdjacentDays&&ee||!ue.helper.isDateInRange(Z,s)||de.isDisabled(Z,s)||ue.helper.isDisabled(Z,s)||!ue.helper.isEnabled(Z,s);if(te){var ae=ue.helper.findDayAsObject(Z,s,de.disabledDates);if(null!==ae&&ae[pe.message]&&(i.attr("data-tooltip",ae[pe.message]),i.attr("data-position",ae[pe.position]||F),(ae[pe.inverted]||ge&&ae[pe.inverted]===ve)&&i.attr("data-inverted",""),ae[pe.variation]&&i.attr("data-variation",ae[pe.variation])),"hour"===s){var ne=ue.helper.findHourAsObject(Z,s,de.disabledHours);null!==ne&&ne[pe.message]&&(i.attr("data-tooltip",ne[pe.message]),i.attr("data-position",ne[pe.position]||F),(ne[pe.inverted]||ge&&ne[pe.inverted]===ve)&&i.attr("data-inverted",""),ne[pe.variation]&&i.attr("data-variation",ne[pe.variation]))}}else null!==(_=ue.helper.findDayAsObject(Z,s,de.eventDates))&&(i.addClass(_[pe.class]||de.eventClass),_[pe.message]&&(i.attr("data-tooltip",_[pe.message]),i.attr("data-position",_[pe.position]||F),(_[pe.inverted]||ge&&_[pe.inverted]===ve)&&i.attr("data-inverted",""),_[pe.variation]&&i.attr("data-variation",_[pe.variation])));var re=ue.helper.dateEqual(Z,u,s),ie=ue.helper.dateEqual(Z,l,s);i.toggleClass(fe.adjacentCell,ee&&!_),i.toggleClass(fe.disabledCell,te),i.toggleClass(fe.activeCell,re&&!(ee&&te)),m||g||i.toggleClass(fe.todayCell,!ee&&ie);var oe={mode:s,adjacent:ee,disabled:te,active:re,today:ie};ce.cell(i,Z,oe),ue.helper.dateEqual(Z,d,s)&&ue.set.focusDate(Z,!1,!1)}if(de.today){var se=De("<tr/>").appendTo(Q),le=De("<td/>").attr("colspan",""+T).addClass(fe.today).appendTo(se);le.text(ce.today(de)),le.data(pe.date,l)}ue.update.focus(!1,P),de.inline&&ue.refreshTooltips()}}},update:{focus:function(e,t){t=t||me;var s=ue.get.mode(),a=ue.get.date(),l=ue.get.focusDate(),u=ue.get.startDate(),d=ue.get.endDate(),f=(e?l:null)||a||(c?null:l);t.find("td").each(function(){var e=De(this),t=e.data(pe.date);if(t){var a=e.hasClass(fe.disabledCell),n=e.hasClass(fe.activeCell),r=e.hasClass(fe.adjacentCell),i=ue.helper.dateEqual(t,l,s),o=!!f&&(!!u&&ue.helper.isDateInRange(t,s,u,f)||!!d&&ue.helper.isDateInRange(t,s,f,d));e.toggleClass(fe.focusCell,i&&(!c||h)&&(!r||de.selectAdjacentDays&&r)&&!a),ue.helper.isTodayButton(e)||e.toggleClass(fe.rangeCell,o&&!n&&!a)}})}},refresh:function(){ue.create.calendar()},refreshTooltips:function(){var r=De(T).width();me.find("td[data-position]").each(function(){var e=De(this),t=T.getComputedStyle(e[0],":after").width.replace(/[^0-9\.]/g,""),a=e.attr("data-position"),n=r-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(n)&&e.attr("data-position",a.replace(/(left|right)/,n))})},bind:{events:function(){ue.debug("Binding events"),me.on("mousedown"+n,ue.event.mousedown),me.on("touchstart"+n,ue.event.mousedown),me.on("mouseup"+n,ue.event.mouseup),me.on("touchend"+n,ue.event.mouseup),me.on("mouseover"+n,ue.event.mouseover),l.length?(l.on("input"+n,ue.event.inputChange),l.on("focus"+n,ue.event.inputFocus),l.on("blur"+n,ue.event.inputBlur),l.on("keydown"+n,ue.event.keydown)):me.on("keydown"+n,ue.event.keydown)}},unbind:{events:function(){ue.debug("Unbinding events"),me.off(n),l.length&&l.off(n)}},event:{mouseover:function(e){var t=De(e.target).data(pe.date),a=1===e.buttons;t&&ue.set.focusDate(t,!1,!0,a)},mousedown:function(e){l.length&&e.preventDefault(),h=0<=e.type.indexOf("touch");var t=De(e.target).data(pe.date);t&&ue.set.focusDate(t,!1,!0,!0)},mouseup:function(e){ue.focus(),e.preventDefault(),e.stopPropagation(),h=!1;var t=De(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),i=t.data(pe.mode);if(n&&!1!==de.onSelect.call(p,n,ue.get.mode())){var o=t.hasClass(fe.today);ue.selectDate(n,o)}else r?ue.set.focusDate(r):i&&ue.set.mode(i)}},keydown:function(e){var t=e.which;if(27!==t&&9!==t||ue.popup("hide"),ue.popup("is visible"))if(37===t||38===t||39===t||40===t){var a="day"===(f=ue.get.mode())?7:"hour"===f?4:"minute"===f?he.column:3,n=37===t?-1:38===t?-a:39==t?1:a;n*="minute"===f?de.minTimeGap:1;var r=ue.get.focusDate()||ue.get.date()||new Date,i=r.getFullYear()+("year"===f?n:0),o=r.getMonth()+("month"===f?n:0),s=r.getDate()+("day"===f?n:0),l=r.getHours()+("hour"===f?n:0),u=r.getMinutes()+("minute"===f?n:0),d=new Date(i,o,s,l,u);"time"===de.type&&(d=ue.helper.mergeDateTime(r,d)),ue.helper.isDateInRange(d,f)&&ue.set.focusDate(d)}else if(13===t){var f=ue.get.mode(),c=ue.get.focusDate();c&&!de.isDisabled(c,f)&&!ue.helper.isDisabled(c,f)&&ue.helper.isEnabled(c,f)&&!1!==de.onSelect.call(p,c,ue.get.mode())&&ue.selectDate(c),e.preventDefault(),e.stopPropagation()}38!==t&&40!==t||(e.preventDefault(),ue.popup("show"))},inputChange:function(){var e=l.val(),t=a.date(e,de);ue.set.date(t,!1)},inputFocus:function(){me.addClass(fe.active)},inputBlur:function(){if(me.removeClass(fe.active),de.formatInput){var e=ue.get.date(),t=ce.datetime(e,de);l.val(t)}m&&(ue.trigger.change(),m=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ue.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ue.event.class.mutation),ue.debug("Setting up mutation observer",e),ue.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(fe.disabled)}},check:{disabled:function(){l.attr("tabindex",ue.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){var n,r,i;return n=Date.UTC(e,t,a+3)/864e5,r=Math.floor(n/7),i=new Date(6048e5*r).getUTCFullYear(),r-Math.floor(Date.UTC(i,0,7)/6048e5)+1},date:function(){return ue.helper.sanitiseDate(o.data(pe.date))||null},inputDate:function(){return l.val()},focusDate:function(){return o.data(pe.focusDate)||null},startDate:function(){var e=ue.get.calendarModule(de.startCalendar);return(e?e.get.date():o.data(pe.startDate))||null},endDate:function(){var e=ue.get.calendarModule(de.endCalendar);return(e?e.get.date():o.data(pe.endDate))||null},minDate:function(){return o.data(pe.minDate)||null},maxDate:function(){return o.data(pe.maxDate)||null},monthOffset:function(){return o.data(pe.monthOffset)||de.monthOffset||0},mode:function(){var e=o.data(pe.mode)||de.startMode;return ue.get.validatedMode(e)},validatedMode:function(e){var t=ue.get.validModes();return 0<=De.inArray(e,t)?e:"time"===de.type?"hour":"month"===de.type?"month":"year"===de.type?"year":"day"},type:function(){return o.data(pe.type)||de.type},validModes:function(){var e=[];return"time"!==de.type&&(de.disableYear&&"year"!==de.type||e.push("year"),(de.disableMonth||"year"===de.type)&&"month"!==de.type||e.push("month"),0<=de.type.indexOf("date")&&e.push("day")),0<=de.type.indexOf("time")&&(e.push("hour"),de.disableMinute||e.push("minute")),e},isTouch:function(){try{return O.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e instanceof De||(e=De(e).first()),e.data(r)):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ue.helper.sanitiseDate(e),e=ue.helper.dateInRange(e);var n=ue.get.mode(),r=ce.datetime(e,de);if(a&&!1===de.onBeforeChange.call(p,e,r,n))return!1;if(ue.set.focusDate(e),de.isDisabled(e,n))return!1;var i=ue.get.endDate();i&&e&&i<e&&ue.set.endDate(ve),ue.set.dataKeyValue(pe.date,e),t&&l.length&&l.val(r),a&&de.onChange.call(p,e,r,n)},startDate:function(e,t){e=ue.helper.sanitiseDate(e);var a=ue.get.calendarModule(de.startCalendar);a&&a.set.date(e),ue.set.dataKeyValue(pe.startDate,e,t)},endDate:function(e,t){e=ue.helper.sanitiseDate(e);var a=ue.get.calendarModule(de.endCalendar);a&&a.set.date(e),ue.set.dataKeyValue(pe.endDate,e,t)},focusDate:function(e,t,a,n){e=ue.helper.sanitiseDate(e),e=ue.helper.dateInRange(e);var r="day"===ue.get.mode(),i=ue.get.focusDate();if(r&&e&&i){var o=12*(e.getFullYear()-i.getFullYear())+e.getMonth()-i.getMonth();if(o){var s=ue.get.monthOffset()-o;ue.set.monthOffset(s,!1)}}var l=ue.set.dataKeyValue(pe.focusDate,e,!!e&&t);a=!1!==a&&l&&!1===t||f!=n,f=n,a&&ue.update.focus(n)},minDate:function(e){e=ue.helper.sanitiseDate(e),null!==de.maxDate&&de.maxDate<=e?ue.verbose("Unable to set minDate variable bigger that maxDate variable",e,de.maxDate):(ue.setting("minDate",e),ue.set.dataKeyValue(pe.minDate,e))},maxDate:function(e){e=ue.helper.sanitiseDate(e),null!==de.minDate&&de.minDate>=e?ue.verbose("Unable to set maxDate variable lower that minDate variable",e,de.minDate):(ue.setting("maxDate",e),ue.set.dataKeyValue(pe.maxDate,e))},monthOffset:function(e,t){var a=Math.max(de.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ue.set.dataKeyValue(pe.monthOffset,e,t)},mode:function(e,t){ue.set.dataKeyValue(pe.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),r=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!r)&&ue.refresh(),!r}},selectDate:function(e,t){ue.verbose("New date selection",e);var a=ue.get.mode();if(t||"minute"===a||de.disableMinute&&"hour"===a||"date"===de.type&&"day"===a||"month"===de.type&&"month"===a||"year"===de.type&&"year"===a){if(!(!1===ue.set.date(e))&&(m=!0,de.closable)){ue.popup("hide");var n=ue.get.calendarModule(de.endCalendar);n&&(n.refresh(),"focus"!==n.setting("on")&&n.popup("show"),n.focus())}}else{var r="year"===a?de.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute";ue.set.mode(r),"hour"===a||"day"===a&&ue.get.date()?ue.set.date(e,!0,!1):ue.set.focusDate(e)}},changeDate:function(e){ue.set.date(e)},clear:function(){ue.set.date(ve)},popup:function(){return u.popup.apply(u,arguments)},focus:function(){l.length?l.focus():me.focus()},blur:function(){l.length?l.blur():me.blur()},helper:{isDisabled:function(a,n){return("day"===n||"month"===n||"year"===n||"hour"===n)&&("day"===n&&-1!==de.disabledDaysOfWeek.indexOf(a.getDay())||de.disabledDates.some(function(e){if("string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date)return ue.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=ue.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 ue.helper.dateEqual(a,ue.helper.sanitiseDate(e[pe.date]),n);if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){return ue.helper.dateEqual(a,e,n)})}})||"hour"===n&&de.disabledHours.some(function(e){if("string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date)return ue.helper.dateEqual(a,e,n);if("number"==typeof e)return a.getHours()===e;if(null!==e&&"object"==typeof e){var t=!0;if(e[pe.date])if(e[pe.date]instanceof Date)t=ue.helper.dateEqual(a,ue.helper.sanitiseDate(e[pe.date]));else if(Array.isArray(e[pe.date]))return e[pe.date].some(function(e){t=ue.helper.dateEqual(a,e,n)});if(e[pe.days]&&("number"==typeof e[pe.days]?t=a.getDay()==e[pe.days]:Array.isArray(e[pe.days])&&(t=-1<e[pe.days].indexOf(a.getDay()))),e[pe.hours]){if("number"==typeof e[pe.hours])return t&&a.getHours()==e[pe.hours];if(Array.isArray(e[pe.hours]))return t&&-1<e[pe.hours].indexOf(a.getHours())}}}))},isEnabled:function(t,a){return"day"!==a||(0===de.enabledDates.length||de.enabledDates.some(function(e){return"string"==typeof e&&(e=ue.helper.sanitiseDate(e)),e instanceof Date?ue.helper.dateEqual(t,e,a):null!==e&&"object"==typeof e&&e[pe.date]?ue.helper.dateEqual(t,ue.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=ue.helper.sanitiseDate(n)),n instanceof Date&&ue.helper.dateEqual(t,n,a)){var i={};return i[pe.date]=n,i}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 o=ue.helper.sanitiseDate(n[pe.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return n}}else if(n[pe.date]&&"day"===a){if(n[pe.date]instanceof Date&&ue.helper.dateEqual(t,ue.helper.sanitiseDate(n[pe.date]),a))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return ue.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a)for(var n,r=function(e,t){if(t[pe.hours]){if("number"==typeof t[pe.hours]&&e.getHours()==t[pe.hours])return t;if(Array.isArray(t[pe.hours])&&-1<t[pe.hours].indexOf(e.getHours()))return t}},i=0;i<e.length;i++){if("number"==typeof(n=e[i])&&t.getHours()==n)return null;if(null!==n&&"object"==typeof n)if(n[pe.days]&&r(t,n)){if("number"==typeof n[pe.days]&&t.getDay()==n[pe.days])return n;if(Array.isArray(n[pe.days])&&-1<n[pe.days].indexOf(t.getDay()))return n}else if(n[pe.date]&&r(t,n)){if(n[pe.date]instanceof Date&&ue.helper.dateEqual(t,ue.helper.sanitiseDate(n[pe.date])))return n;if(Array.isArray(n[pe.date])&&n[pe.date].some(function(e){return ue.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return e instanceof Date||(e=a.date(""+e,de)),!e||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){a=a||"day";var n="time"===de.type,r="year"===a,i=r||"month"===a,o="minute"===a,s=o||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n?0:r?0:e.getMonth(),n?1:i?1:e.getDate(),s?e.getHours():0,o?de.minTimeGap*Math.floor(e.getMinutes()/de.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n?0:r?0:t.getMonth(),n?1:i?1:t.getDate(),s?t.getHours():0,o?de.minTimeGap*Math.floor(t.getMinutes()/de.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ue.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){if(!a&&!n){var r=ue.get.startDate();a=r&&de.minDate?new Date(Math.max(r,de.minDate)):r||de.minDate,n=de.maxDate}return a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),de.minTimeGap*Math.ceil(a.getMinutes()/de.minTimeGap)),!(!e||a&&0<ue.helper.dateDiff(e,a,t)||n&&0<ue.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){if(!t&&!a){var n=ue.get.startDate();t=n&&de.minDate?new Date(Math.max(n,de.minDate)):n||de.minDate,a=de.maxDate}t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),de.minTimeGap*Math.ceil(t.getMinutes()/de.minTimeGap));var r="time"===de.type;return e?t&&0<ue.helper.dateDiff(e,t,"minute")?r?ue.helper.mergeDateTime(e,t):t:a&&0<ue.helper.dateDiff(a,e,"minute")?r?ue.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()===de.text.today}},setting:function(e,t){if(ue.debug("Changing setting",e,t),De.isPlainObject(e))De.extend(!0,de,e);else{if(t===ve)return de[e];De.isPlainObject(de[e])?De.extend(!0,de[e],t):de[e]=t}},internal:function(e,t){if(De.isPlainObject(e))De.extend(!0,ue,e);else{if(t===ve)return ue[e];ue[e]=t}},debug:function(){!de.silent&&de.debug&&(de.performance?ue.performance.log(arguments):(ue.debug=Function.prototype.bind.call(console.info,console,de.name+":"),ue.debug.apply(console,arguments)))},verbose:function(){!de.silent&&de.verbose&&de.debug&&(de.performance?ue.performance.log(arguments):(ue.verbose=Function.prototype.bind.call(console.info,console,de.name+":"),ue.verbose.apply(console,arguments)))},error:function(){de.silent||(ue.error=Function.prototype.bind.call(console.error,console,de.name+":"),ue.error.apply(console,arguments))},performance:{log:function(e){var t,a;de.performance&&(a=(t=(new Date).getTime())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":a})),clearTimeout(ue.performance.timer),ue.performance.timer=setTimeout(ue.performance.display,500)},display:function(){var e=de.name+":",a=0;v=!1,clearTimeout(ue.performance.timer),De.each(b,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",D&&(e+=" '"+D+"'"),(console.group!==ve||console.table!==ve)&&0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):De.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(n,e,t){var r,i,a,o=d;return e=e||M,t=p||t,"string"==typeof n&&o!==ve&&(n=n.split(/[\. ]/),r=n.length-1,De.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(De.isPlainObject(o[a])&&e!=r)o=o[a];else{if(o[a]!==ve)return i=o[a],!1;if(!De.isPlainObject(o[t])||e==r)return o[t]!==ve?i=o[t]:ue.error(s.method,n),!1;o=o[t]}})),De.isFunction(i)?a=i.apply(t,e):i!==ve&&(a=i),Array.isArray(y)?y.push(a):y!==ve?y=[y,a]:a!==ve&&(y=a),i}},w?(d===ve&&ue.initialize(),ue.invoke(C)):(d!==ve&&d.invoke("destroy"),ue.initialize())}),y!==ve?y:this},De.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,monthOffset:0,minTimeGap:5,showWeekNumbers:null,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],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(),i="";return t.ampm&&(i=" "+(n<12?t.text.am:t.text.pm),n=0===n?12:12<n?n-12:n),n+":"+(r<10?"0":"")+r+i},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).replace(/\s/g,"")).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var a,n,r,i=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(i.getDate()))return i;e=e.toLowerCase();var o,s,l,u=-1,d=-1,f=-1,c=-1,p=-1,h=ve,m="time"===t.type,g=t.type.indexOf("time")<0,y=e.split(t.regExp.dateWords),D=e.split(t.regExp.dateNumbers);if(!g)for(h=0<=De.inArray(t.text.am.toLowerCase(),y)||!(0<=De.inArray(t.text.pm.toLowerCase(),y))&&ve,a=0;a<D.length;a++)if(0<=(s=D[a]).indexOf(":")){if(d<0||u<0)for(l=s.split(":"),r=0;r<Math.min(2,l.length);r++)n=parseInt(l[r]),isNaN(n)&&(n=0),0===r?d=n%24:u=n%60;D.splice(a,1)}if(!m){for(a=0;a<y.length;a++)if(!((o=y[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].substring(0,o.length).toLowerCase()===o){c=n+1;break}if(0<=c)break}for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&n>=t.centuryBreak&&a===D.length-1){n<=99&&(n+=t.currentCentury-100),p=n,D.splice(a,1);break}if(c<0)for(a=0;a<D.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(D[r]),!isNaN(n)&&1<=n&&n<=12){c=n,D.splice(r,1);break}for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&1<=n&&n<=31){f=n,D.splice(a,1);break}if(p<0)for(a=D.length-1;0<=a;a--)if(n=parseInt(D[a]),!isNaN(n)){n<=99&&(n+=t.currentCentury),p=n,D.splice(a,1);break}}if(!g){if(d<0)for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&0<=n&&n<=23){d=n,D.splice(a,1);break}if(u<0)for(a=0;a<D.length;a++)if(n=parseInt(D[a]),!isNaN(n)&&0<=n&&n<=59){u=n,D.splice(a,1);break}}if(u<0&&d<0&&f<0&&c<0&&p<0)return null;u<0&&(u=0),d<0&&(d=0),f<0&&(f=1),c<0&&(c=1),p<0&&(p=(new Date).getFullYear()),h!==ve&&(h?12===d&&(d=0):d<12&&(d+=12));var v=new Date(p,c-1,f,d,u);return v.getMonth()===c-1&&v.getFullYear()===p||(v=new Date(p,c,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",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document);
|
package/dist/components/card.css
CHANGED
package/dist/components/embed.js
CHANGED
package/dist/components/feed.css
CHANGED
package/dist/components/flag.css
CHANGED
package/dist/components/form.css
CHANGED
package/dist/components/form.js
CHANGED
package/dist/components/grid.css
CHANGED
package/dist/components/icon.css
CHANGED
package/dist/components/item.css
CHANGED
package/dist/components/list.css
CHANGED
package/dist/components/modal.js
CHANGED