fomantic-ui 2.9.1-beta.23 → 2.9.1-beta.24
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/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +6 -11
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +22 -22
- 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 +47 -47
- 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 +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +69 -58
- package/dist/components/calendar.min.css +1 -1
- 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 +9 -9
- 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 +11 -11
- 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 +171 -173
- 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 +16 -16
- 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/flyout.css +1 -1
- package/dist/components/flyout.js +21 -17
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +87 -87
- 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 +30 -26
- 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 +7 -7
- 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 +45 -45
- 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 +30 -32
- 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 +10 -10
- 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 +31 -31
- 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 +34 -34
- 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 +21 -21
- 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 +14 -14
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +33 -25
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +11 -11
- 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 +21 -21
- 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 +23 -23
- 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 +41 -17
- 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 +21 -21
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +21 -21
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +50 -50
- package/dist/semantic.js +847 -800
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +2 -2
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +3 -1
- package/src/definitions/behaviors/api.js +46 -46
- package/src/definitions/behaviors/form.js +86 -86
- package/src/definitions/behaviors/state.js +10 -10
- package/src/definitions/behaviors/visibility.js +20 -20
- package/src/definitions/globals/site.js +13 -13
- package/src/definitions/modules/accordion.js +21 -21
- package/src/definitions/modules/calendar.js +68 -57
- package/src/definitions/modules/checkbox.js +8 -8
- package/src/definitions/modules/dimmer.js +10 -10
- package/src/definitions/modules/dropdown.js +170 -172
- package/src/definitions/modules/embed.js +15 -15
- package/src/definitions/modules/flyout.js +20 -16
- package/src/definitions/modules/modal.js +29 -25
- package/src/definitions/modules/nag.js +6 -6
- package/src/definitions/modules/popup.js +44 -44
- package/src/definitions/modules/progress.js +29 -31
- package/src/definitions/modules/rating.js +9 -9
- package/src/definitions/modules/search.js +30 -30
- package/src/definitions/modules/shape.js +33 -33
- package/src/definitions/modules/sidebar.js +20 -20
- package/src/definitions/modules/slider.js +32 -24
- package/src/definitions/modules/sticky.js +20 -20
- package/src/definitions/modules/tab.js +22 -22
- package/src/definitions/modules/toast.js +40 -16
- package/src/definitions/modules/transition.js +20 -20
- package/tasks/admin/components/create.js +1 -1
- package/tasks/admin/components/init.js +1 -1
- package/tasks/admin/components/update.js +4 -4
- package/tasks/admin/distributions/create.js +2 -2
- package/tasks/admin/distributions/init.js +1 -1
- package/tasks/admin/distributions/update.js +4 -4
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +5 -5
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +1 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/config/admin/github.js +3 -4
- package/tasks/config/npm/gulpfile.js +1 -1
- package/tasks/config/project/config.js +8 -6
- package/tasks/config/project/install.js +10 -10
- package/tasks/config/project/release.js +3 -2
- package/tasks/config/tasks.js +2 -2
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +1 -1
- package/tasks/docs/metadata.js +1 -1
- package/tasks/docs/serve.js +2 -1
- package/tasks/install.js +2 -2
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Calendar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
performance = [],
|
31
31
|
|
32
32
|
query = arguments[0],
|
33
|
-
methodInvoked =
|
33
|
+
methodInvoked = typeof query === 'string',
|
34
34
|
queryArguments = [].slice.call(arguments, 1),
|
35
35
|
returnedValue,
|
36
36
|
timeGapTable = {
|
@@ -45,7 +45,7 @@
|
|
45
45
|
|
46
46
|
$allModules.each(function () {
|
47
47
|
var
|
48
|
-
settings =
|
48
|
+
settings = $.isPlainObject(parameters)
|
49
49
|
? $.extend(true, {}, $.fn.calendar.settings, parameters)
|
50
50
|
: $.extend({}, $.fn.calendar.settings),
|
51
51
|
|
@@ -283,7 +283,9 @@
|
|
283
283
|
year = display.getFullYear()
|
284
284
|
;
|
285
285
|
|
286
|
-
var columns = isDay
|
286
|
+
var columns = isDay
|
287
|
+
? (settings.showWeekNumbers ? 8 : 7)
|
288
|
+
: (isHour ? 4 : timeGap.column);
|
287
289
|
var rows = isDay || isHour ? 6 : timeGap.row;
|
288
290
|
var pages = isDay ? multiMonth : 1;
|
289
291
|
|
@@ -308,7 +310,7 @@
|
|
308
310
|
}
|
309
311
|
|
310
312
|
var
|
311
|
-
yearChange = isYear ? 10 : isMonth ? 1 : 0,
|
313
|
+
yearChange = isYear ? 10 : (isMonth ? 1 : 0),
|
312
314
|
monthChange = isDay ? 1 : 0,
|
313
315
|
dayChange = isHour || isMinute ? 1 : 0,
|
314
316
|
prevNextDay = isHour || isMinute ? day : 1,
|
@@ -316,18 +318,18 @@
|
|
316
318
|
nextDate = new Date(year + yearChange, month + monthChange, prevNextDay + dayChange, hour),
|
317
319
|
prevLast = isYear
|
318
320
|
? new Date(Math.ceil(year / 10) * 10 - 9, 0, 0)
|
319
|
-
: isMonth
|
321
|
+
: (isMonth
|
320
322
|
? new Date(year, 0, 0)
|
321
|
-
: isDay
|
323
|
+
: (isDay // eslint-disable-line unicorn/no-nested-ternary
|
322
324
|
? new Date(year, month, 0)
|
323
|
-
: new Date(year, month, day, -1),
|
325
|
+
: new Date(year, month, day, -1))),
|
324
326
|
nextFirst = isYear
|
325
327
|
? new Date(Math.ceil(year / 10) * 10 + 1, 0, 1)
|
326
|
-
: isMonth
|
328
|
+
: (isMonth
|
327
329
|
? new Date(year + 1, 0, 1)
|
328
|
-
: isDay
|
330
|
+
: (isDay // eslint-disable-line unicorn/no-nested-ternary
|
329
331
|
? new Date(year, month + 1, 1)
|
330
|
-
: new Date(year, month, day + 1)
|
332
|
+
: new Date(year, month, day + 1)))
|
331
333
|
;
|
332
334
|
|
333
335
|
var tempMode = mode;
|
@@ -349,16 +351,16 @@
|
|
349
351
|
|
350
352
|
var headerDate = isYear || isMonth
|
351
353
|
? new Date(year, 0, 1)
|
352
|
-
: isDay
|
354
|
+
: (isDay
|
353
355
|
? new Date(year, month, 1)
|
354
|
-
: new Date(year, month, day, hour, minute);
|
356
|
+
: new Date(year, month, day, hour, minute));
|
355
357
|
var headerText = $('<span/>').addClass(className.link).appendTo(cell);
|
356
358
|
headerText.text(module.helper.dateFormat(formatter[mode + 'Header'], headerDate));
|
357
359
|
var newMode = isMonth
|
358
360
|
? (settings.disableYear ? 'day' : 'year')
|
359
|
-
: isDay
|
360
|
-
? (settings.disableMonth ? 'year' : 'month')
|
361
|
-
: 'day';
|
361
|
+
: (isDay
|
362
|
+
? (settings.disableMonth ? 'year' : 'month') // eslint-disable-line unicorn/no-nested-ternary
|
363
|
+
: 'day');
|
362
364
|
headerText.data(metadata.mode, newMode);
|
363
365
|
|
364
366
|
if (p === 0) {
|
@@ -390,7 +392,9 @@
|
|
390
392
|
}
|
391
393
|
|
392
394
|
var tbody = $('<tbody/>').appendTo(table);
|
393
|
-
i = isYear
|
395
|
+
i = isYear
|
396
|
+
? Math.ceil(year / 10) * 10 - 9
|
397
|
+
: (isDay ? 1 - firstMonthDayColumn : 0);
|
394
398
|
for (r = 0; r < rows; r++) {
|
395
399
|
row = $('<tr/>').appendTo(tbody);
|
396
400
|
if (isDay && settings.showWeekNumbers) {
|
@@ -401,20 +405,20 @@
|
|
401
405
|
for (c = 0; c < textColumns; c++, i++) {
|
402
406
|
var cellDate = isYear
|
403
407
|
? new Date(i, month, 1, hour, minute)
|
404
|
-
: isMonth
|
408
|
+
: (isMonth
|
405
409
|
? new Date(year, i, 1, hour, minute)
|
406
|
-
: isDay
|
410
|
+
: (isDay // eslint-disable-line unicorn/no-nested-ternary
|
407
411
|
? new Date(year, month, i, hour, minute)
|
408
|
-
: isHour
|
412
|
+
: (isHour
|
409
413
|
? new Date(year, month, day, i)
|
410
|
-
: new Date(year, month, day, hour, i * settings.minTimeGap);
|
414
|
+
: new Date(year, month, day, hour, i * settings.minTimeGap))));
|
411
415
|
var cellText = isYear
|
412
416
|
? i
|
413
|
-
: isMonth
|
417
|
+
: (isMonth
|
414
418
|
? settings.text.monthsShort[i]
|
415
|
-
: isDay
|
419
|
+
: (isDay // eslint-disable-line unicorn/no-nested-ternary
|
416
420
|
? cellDate.getDate()
|
417
|
-
: module.helper.dateFormat(formatter.cellTime, cellDate);
|
421
|
+
: module.helper.dateFormat(formatter.cellTime, cellDate)));
|
418
422
|
cell = $('<td/>').addClass(className.cell).appendTo(row);
|
419
423
|
cell.text(cellText);
|
420
424
|
cell.data(metadata.date, cellDate);
|
@@ -527,8 +531,8 @@
|
|
527
531
|
var focused = module.helper.dateEqual(cellDate, focusDate, mode);
|
528
532
|
var inRange = !rangeDate
|
529
533
|
? false
|
530
|
-
: (
|
531
|
-
|| (!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate))
|
534
|
+
: (!!startDate && module.helper.isDateInRange(cellDate, mode, startDate, rangeDate))
|
535
|
+
|| (!!endDate && module.helper.isDateInRange(cellDate, mode, rangeDate, endDate));
|
532
536
|
$cell.toggleClass(className.focusCell, focused && (!isTouch || isTouchDown) && (!adjacent || (settings.selectAdjacentDays && adjacent)) && !disabled);
|
533
537
|
|
534
538
|
if (module.helper.isTodayButton($cell)) {
|
@@ -649,8 +653,16 @@
|
|
649
653
|
case 38:
|
650
654
|
case 39:
|
651
655
|
case 40: {
|
652
|
-
var bigIncrement = mode === 'day'
|
653
|
-
|
656
|
+
var bigIncrement = mode === 'day'
|
657
|
+
? 7
|
658
|
+
: (mode === 'hour'
|
659
|
+
? 4
|
660
|
+
: (mode === 'minute' ? timeGap.column : 3)); // eslint-disable-line unicorn/no-nested-ternary
|
661
|
+
var increment = keyCode === 37
|
662
|
+
? -1
|
663
|
+
: (keyCode === 38
|
664
|
+
? -bigIncrement
|
665
|
+
: (keyCode == 39 ? 1 : bigIncrement)); // eslint-disable-line unicorn/no-nested-ternary
|
654
666
|
increment *= mode === 'minute' ? settings.minTimeGap : 1;
|
655
667
|
var focusDate = module.get.focusDate() || module.get.date() || new Date();
|
656
668
|
var year = focusDate.getFullYear() + (mode === 'year' ? increment : 0);
|
@@ -769,17 +781,14 @@
|
|
769
781
|
get: {
|
770
782
|
weekOfYear: function (weekYear, weekMonth, weekDay) {
|
771
783
|
// adapted from http://www.merlyn.demon.co.uk/weekcalc.htm
|
772
|
-
var ms1d =
|
773
|
-
ms7d = 7 * ms1d
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
AWN = Math.floor(DC3 / 7), // an Absolute Week Number
|
779
|
-
Wyr = new Date(AWN * ms7d).getUTCFullYear();
|
784
|
+
var ms1d = 24 * 3600 * 1000,
|
785
|
+
ms7d = 7 * ms1d,
|
786
|
+
DC3 = Date.UTC(weekYear, weekMonth, weekDay + 3) / ms1d, // an absolute day number
|
787
|
+
AWN = Math.floor(DC3 / 7), // an absolute week number
|
788
|
+
Wyr = new Date(AWN * ms7d).getUTCFullYear()
|
789
|
+
;
|
780
790
|
|
781
|
-
|
782
|
-
}();
|
791
|
+
return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1;
|
783
792
|
},
|
784
793
|
formattedDate: function (format, date) {
|
785
794
|
return module.helper.dateFormat(format || formatter[settings.type], date || module.get.date());
|
@@ -826,9 +835,9 @@
|
|
826
835
|
|
827
836
|
return settings.type === 'time'
|
828
837
|
? 'hour'
|
829
|
-
: settings.type === 'month'
|
838
|
+
: (settings.type === 'month'
|
830
839
|
? 'month'
|
831
|
-
: settings.type === 'year' ? 'year' : 'day';
|
840
|
+
: (settings.type === 'year' ? 'year' : 'day')); // eslint-disable-line unicorn/no-nested-ternary
|
832
841
|
},
|
833
842
|
type: function () {
|
834
843
|
return $module.data(metadata.type) || settings.type;
|
@@ -1019,9 +1028,9 @@
|
|
1019
1028
|
} else {
|
1020
1029
|
var newMode = mode === 'year'
|
1021
1030
|
? (!settings.disableMonth ? 'month' : 'day')
|
1022
|
-
: mode === 'month'
|
1031
|
+
: (mode === 'month'
|
1023
1032
|
? 'day'
|
1024
|
-
: mode === 'day' ? 'hour' : 'minute';
|
1033
|
+
: (mode === 'day' ? 'hour' : 'minute')); // eslint-disable-line unicorn/no-nested-ternary
|
1025
1034
|
module.set.mode(newMode);
|
1026
1035
|
if (mode === 'hour' || (mode === 'day' && module.get.date())) {
|
1027
1036
|
// the user has chosen enough to consider a valid date/time has been chosen
|
@@ -1103,7 +1112,7 @@
|
|
1103
1112
|
ss: ('0' + s).slice(-2),
|
1104
1113
|
a: a,
|
1105
1114
|
A: a.toUpperCase(),
|
1106
|
-
S: ['th', 'st', 'nd', 'rd'][(D % 10) > 3 ? 0 : ((
|
1115
|
+
S: ['th', 'st', 'nd', 'rd'][(D % 10) > 3 ? 0 : ((D % 100) - (D % 10) === 10 ? 0 : D % 10)],
|
1107
1116
|
w: w,
|
1108
1117
|
ww: ('0' + w).slice(-2),
|
1109
1118
|
}
|
@@ -1114,7 +1123,7 @@
|
|
1114
1123
|
return tokens[match];
|
1115
1124
|
}
|
1116
1125
|
|
1117
|
-
return match.slice(1,
|
1126
|
+
return match.slice(1, -1);
|
1118
1127
|
});
|
1119
1128
|
},
|
1120
1129
|
isDisabled: function (date, mode) {
|
@@ -1345,15 +1354,15 @@
|
|
1345
1354
|
// only care about a minute accuracy of settings.minTimeGap
|
1346
1355
|
date1 = new Date(
|
1347
1356
|
isTimeOnly ? 2000 : date1.getFullYear(),
|
1348
|
-
isTimeOnly ? 0 : isYear ? 0 : date1.getMonth(),
|
1349
|
-
isTimeOnly ? 1 : isYearOrMonth ? 1 : date1.getDate(),
|
1357
|
+
isTimeOnly ? 0 : (isYear ? 0 : date1.getMonth()),
|
1358
|
+
isTimeOnly ? 1 : (isYearOrMonth ? 1 : date1.getDate()),
|
1350
1359
|
!isHourOrMinute ? 0 : date1.getHours(),
|
1351
1360
|
!isMinute ? 0 : settings.minTimeGap * Math.floor(date1.getMinutes() / settings.minTimeGap)
|
1352
1361
|
);
|
1353
1362
|
date2 = new Date(
|
1354
1363
|
isTimeOnly ? 2000 : date2.getFullYear(),
|
1355
|
-
isTimeOnly ? 0 : isYear ? 0 : date2.getMonth(),
|
1356
|
-
isTimeOnly ? 1 : isYearOrMonth ? 1 : date2.getDate(),
|
1364
|
+
isTimeOnly ? 0 : (isYear ? 0 : date2.getMonth()),
|
1365
|
+
isTimeOnly ? 1 : (isYearOrMonth ? 1 : date2.getDate()),
|
1357
1366
|
!isHourOrMinute ? 0 : date2.getHours(),
|
1358
1367
|
!isMinute ? 0 : settings.minTimeGap * Math.floor(date2.getMinutes() / settings.minTimeGap)
|
1359
1368
|
);
|
@@ -1386,14 +1395,14 @@
|
|
1386
1395
|
|
1387
1396
|
return !date
|
1388
1397
|
? date
|
1389
|
-
: (minDate && module.helper.dateDiff(date, minDate, 'minute') > 0
|
1390
|
-
? (isTimeOnly ? module.helper.mergeDateTime(date, minDate) : minDate)
|
1391
|
-
: (maxDate && module.helper.dateDiff(maxDate, date, 'minute') > 0
|
1398
|
+
: (minDate && module.helper.dateDiff(date, minDate, 'minute') > 0
|
1399
|
+
? (isTimeOnly ? module.helper.mergeDateTime(date, minDate) : minDate) // eslint-disable-line unicorn/no-nested-ternary
|
1400
|
+
: (maxDate && module.helper.dateDiff(maxDate, date, 'minute') > 0 // eslint-disable-line unicorn/no-nested-ternary
|
1392
1401
|
? (isTimeOnly ? module.helper.mergeDateTime(date, maxDate) : maxDate)
|
1393
|
-
: date;
|
1402
|
+
: date));
|
1394
1403
|
},
|
1395
1404
|
mergeDateTime: function (date, time) {
|
1396
|
-
return
|
1405
|
+
return !date || !time
|
1397
1406
|
? time
|
1398
1407
|
: new Date(date.getFullYear(), date.getMonth(), date.getDate(), time.getHours(), time.getMinutes());
|
1399
1408
|
},
|
@@ -1514,7 +1523,7 @@
|
|
1514
1523
|
query = query.split(/[ .]/);
|
1515
1524
|
maxDepth = query.length - 1;
|
1516
1525
|
$.each(query, function (depth, value) {
|
1517
|
-
var camelCaseValue =
|
1526
|
+
var camelCaseValue = depth != maxDepth
|
1518
1527
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
1519
1528
|
: query
|
1520
1529
|
;
|
@@ -1567,7 +1576,7 @@
|
|
1567
1576
|
}
|
1568
1577
|
});
|
1569
1578
|
|
1570
|
-
return
|
1579
|
+
return returnedValue !== undefined
|
1571
1580
|
? returnedValue
|
1572
1581
|
: this;
|
1573
1582
|
};
|
@@ -1720,7 +1729,7 @@
|
|
1720
1729
|
// am/pm
|
1721
1730
|
isAm = $.inArray(settings.text.am.toLowerCase(), words) >= 0
|
1722
1731
|
? true
|
1723
|
-
: $.inArray(settings.text.pm.toLowerCase(), words) >= 0 ? false : undefined;
|
1732
|
+
: ($.inArray(settings.text.pm.toLowerCase(), words) >= 0 ? false : undefined);
|
1724
1733
|
|
1725
1734
|
// time with ':'
|
1726
1735
|
for (i = 0; i < numbers.length; i++) {
|
@@ -1786,7 +1795,9 @@
|
|
1786
1795
|
// numeric month
|
1787
1796
|
if (month < 0) {
|
1788
1797
|
for (i = 0; i < numbers.length; i++) {
|
1789
|
-
k = i > 1 || settings.monthFirst
|
1798
|
+
k = i > 1 || settings.monthFirst
|
1799
|
+
? i
|
1800
|
+
: (i === 1 ? 0 : 1);
|
1790
1801
|
j = parseInt(numbers[k], 10);
|
1791
1802
|
if (isNaN(j)) {
|
1792
1803
|
continue;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.1-beta.
|
2
|
+
* # Fomantic UI - 2.9.1-beta.24+029436f
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(oe,T,Y,ie){"use strict";T=T!==ie&&T.Math===Math?T:globalThis,oe.fn.calendar=function(m){var g,e=oe(this),y=oe(Y),D=e.selector||"",v=Date.now(),b=[],M=m,C="string"==typeof M,w=[].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}},re=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var p,e,z=oe.isPlainObject(m)?oe.extend(!0,{},oe.fn.calendar.settings,m):oe.extend({},oe.fn.calendar.settings),_=z.className,a=z.namespace,n=z.selector,Q=z.formatter,Z=z.parser,X=z.metadata,ee=x[z.minTimeGap],l=z.error,t="."+a,r="module-"+a,o=oe(this),i=o.find(n.input),s=o.find(n.activator),d=this,u=o.data(r),te=u&&u.popupId?y.find("#"+u.popupId):o.find(n.popup),c=!1,ae=o.hasClass(_.inverted),f=!1,h=!1,ne={initialize:function(){ne.debug("Initializing calendar for",d,o),p=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),u=ne,o.data(r,u)},destroy:function(){ne.verbose("Destroying previous calendar for",d),o.removeData(r),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(o.data(X.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(o.data(X.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",z.on||"click")},popup:function(){var e,t;z.inline||0===s.length&&0===(s=o.children().first()).length||(oe.fn.popup===ie?ne.error(l.popup):((te=0===te.length?z.context?(ne.popupId=a+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),oe("<div/>",{id:ne.popupId}).addClass(_.popup).appendTo(y.find(z.context))):(e=0<(t=s.parent()).closest(n.append).length?"appendTo":"prependTo",oe("<div/>").addClass(_.popup)[e](t)):te).addClass(_.calendar),ae&&te.addClass(_.inverted),e=function(){return ne.refreshTooltips(),z.onVisible.apply(te,arguments)},0===i.length&&(te.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),z.onVisible.apply(te,arguments)}),t=ne.setting("on"),t=oe.extend({},z.popupOptions,{popup:te,movePopup:!z.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(z.startMode)),z.onShow.apply(te,arguments)},onVisible:e,onHide:z.onHide,onHidden:function(){return ne.blur(),z.onHidden.apply(te,arguments)}}),ne.popup(t)))},inline:function(){0<s.length&&!z.inline||(z.inline=!0,te=oe("<div/>").addClass(_.calendar).appendTo(o),0===i.length&&te.attr("tabindex","0"))},input:function(){z.touchReadonly&&0<i.length&&p&&i.prop("readonly",!0),ne.check.disabled()},date:function(){var e;z.initialDate?e=Z.date(z.initialDate,z):o.data(X.date)!==ie?e=Z.date(o.data(X.date),z):0<i.length&&(e=Z.date(i.val(),z)),ne.set.date(e,z.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=i[0];t&&(e=Y.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,j,a=ne.get.mode(),n=new Date,q=ne.get.date(),r=ne.get.focusDate(),o=ne.helper.dateInRange(r||q||Z.date(z.initialDate,z)||n),i=(r||ne.set.focusDate(r=o,!1,!1),"year"===a),s="month"===a,l="day"===a,d="hour"===a,u="minute"===a,W="time"===z.type,R=Math.max(z.multiMonth,1),V=l?ne.get.monthOffset():0,p=o.getMinutes(),c=o.getHours(),f=o.getDate(),G=o.getMonth()+V,h=o.getFullYear(),m=l?z.showWeekNumbers?8:7:d?4:ee.column,P=l||d?6:ee.row,g=l?R:1,y=(D=te).hasClass("left")?"right center":"left center";for(D.empty(),1<g&&(j=oe("<div/>").addClass(_.grid).appendTo(D)),t=0;t<g;t++){1<g&&(D=oe("<div/>").addClass(_.column).appendTo(j));var D,v=G+t,B=(new Date(h,v,1).getDay()-z.firstDayOfWeek%7+7)%7,b=(!z.constantHeight&&l&&(b=new Date(h,v+1,0).getDate()+B,P=Math.ceil(b/7)),i?10:s?1:0),M=l?1:0,C=d||u?1:0,w=d||u?f:1,x=new Date(h-b,v-M,w-C,c),M=new Date(h+b,v+M,w+C,c),w=i?new Date(10*Math.ceil(h/10)-9,0,0):s?new Date(h,0,0):l?new Date(h,v,0):new Date(h,v,f,-1),C=i?new Date(10*Math.ceil(h/10)+1,0,1):s?new Date(h+1,0,1):l?new Date(h,v+1,1):new Date(h,v,f+1),T=a,T=(l&&z.showWeekNumbers&&(T+=" andweek"),oe("<table/>").addClass(_.table).addClass(T).addClass(re[m]+" column").appendTo(D)),K=(ae&&T.addClass(_.inverted),m);if(!W){var U=oe("<thead/>").appendTo(T),Y=oe("<tr/>").appendTo(U),k=oe("<th/>").attr("colspan",""+m).appendTo(Y),O=i||s?new Date(h,0,1):l?new Date(h,v,1):new Date(h,v,f,c,p),A=oe("<span/>").addClass(_.link).appendTo(k),O=(A.text(ne.helper.dateFormat(Q[a+"Header"],O)),s?z.disableYear?"day":"year":l?z.disableMonth?"year":"month":"day");if(A.data(X.mode,O),0===t&&((A=oe("<span/>").addClass(_.prev).appendTo(k)).data(X.focusDate,x),A.toggleClass(_.disabledCell,!ne.helper.isDateInRange(w,a)),oe("<i/>").addClass(_.prevIcon).appendTo(A)),t===g-1&&((O=oe("<span/>").addClass(_.next).appendTo(k)).data(X.focusDate,M),O.toggleClass(_.disabledCell,!ne.helper.isDateInRange(C,a)),oe("<i/>").addClass(_.nextIcon).appendTo(O)),l)for(Y=oe("<tr/>").appendTo(U),z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(z.text.weekNo),k.addClass(_.weekCell),K--),N=0;N<K;N++)(k=oe("<th/>").appendTo(Y)).text(Q.dayColumnHeader((N+z.firstDayOfWeek)%7,z))}for(var J=oe("<tbody/>").appendTo(T),N=i?10*Math.ceil(h/10)-9:l?1-B:0,L=0;L<P;L++)for(Y=oe("<tr/>").appendTo(J),l&&z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(ne.get.weekOfYear(h,v,N+1-z.firstDayOfWeek)),k.addClass(_.weekCell)),e=0;e<K;e++,N++){var F,H=i?new Date(N,v,1,c,p):s?new Date(h,N,1,c,p):l?new Date(h,v,N,c,p):d?new Date(h,v,f,N):new Date(h,v,f,c,N*z.minTimeGap),E=i?N:s?z.text.monthsShort[N]:l?H.getDate():ne.helper.dateFormat(Q.cellTime,H),E=((k=oe("<td/>").addClass(_.cell).appendTo(Y)).text(E),k.data(X.date,H),l&&H.getMonth()!==(v+12)%12),I=!z.selectAdjacentDays&&E||!ne.helper.isDateInRange(H,a)||z.isDisabled(H,a)||ne.helper.isDisabled(H,a)||!ne.helper.isEnabled(H,a),S=(I?(null!==(S=ne.helper.findDayAsObject(H,a,z.disabledDates))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&S[X.inverted]===ie)&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation])),"hour"===a&&null!==(S=ne.helper.findHourAsObject(H,a,z.disabledHours))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&S[X.inverted]===ie)&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation]))):null!==(F=ne.helper.findDayAsObject(H,a,z.eventDates))&&(k.addClass(F[X.class]||z.eventClass),F[X.message]&&(k.attr("data-tooltip",F[X.message]),k.attr("data-position",F[X.position]||y),(F[X.inverted]||ae&&F[X.inverted]===ie)&&k.attr("data-inverted",""),F[X.variation]&&k.attr("data-variation",F[X.variation]))),ne.helper.dateEqual(H,q,a)),$=ne.helper.dateEqual(H,n,a),E=(k.toggleClass(_.adjacentCell,E&&!F),k.toggleClass(_.disabledCell,I),k.toggleClass(_.activeCell,S&&!(E&&I)),d||u||k.toggleClass(_.todayCell,!E&&$),{mode:a,adjacent:E,disabled:I,active:S,today:$});Q.cell(k,H,E),ne.helper.dateEqual(H,r,a)&&ne.set.focusDate(H,!1,!1)}z.today&&(x=oe("<tr/>").appendTo(J),(w=oe("<td/>").attr("colspan",""+m).addClass(_.today).appendTo(x)).text(Q.today(z)),w.data(X.date,n)),ne.update.focus(!1,T),z.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||te;var i=ne.get.mode(),a=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),d=ne.get.endDate(),u=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e,t,a,n,r=oe(this),o=r.data(X.date);o&&(e=r.hasClass(_.disabledCell),t=r.hasClass(_.activeCell),a=r.hasClass(_.adjacentCell),n=ne.helper.dateEqual(o,s,i),o=!!u&&(!!l&&ne.helper.isDateInRange(o,i,l,u)||!!d&&ne.helper.isDateInRange(o,i,u,d)),r.toggleClass(_.focusCell,n&&(!p||c)&&(!a||z.selectAdjacentDays&&a)&&!e),ne.helper.isTodayButton(r)||r.toggleClass(_.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var n=oe(T).width();te.find("td[data-position]").each(function(){var e=oe(this),t=T.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,""),a=e.attr("data-position"),t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(t)&&e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),te.on("mousedown"+t,ne.event.mousedown),te.on("touchstart"+t,ne.event.mousedown),te.on("mouseup"+t,ne.event.mouseup),te.on("touchend"+t,ne.event.mouseup),te.on("mouseover"+t,ne.event.mouseover),0<i.length?(i.on("input"+t,ne.event.inputChange),i.on("focus"+t,ne.event.inputFocus),i.on("blur"+t,ne.event.inputBlur),i.on("keydown"+t,ne.event.keydown)):te.on("keydown"+t,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),te.off(t),0<i.length&&i.off(t)}},event:{mouseover:function(e){var t=oe(e.target).data(X.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),c=0<=e.type.indexOf("touch");e=oe(e.target).data(X.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),c=!1;var t,a,n,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(X.date)||t.data(X.focusDate)||t.data(X.mode)?t:e).data(X.date),a=e.data(X.focusDate),n=e.data(X.mode),t&&!1!==z.onSelect.call(d,t,ne.get.mode())?(e=e.hasClass(_.today),ne.selectDate(t,e)):a?ne.set.focusDate(a):n&&ne.set.mode(n))},keydown:function(e){var t=e.which;if(9===t&&ne.popup("hide"),ne.popup("is visible")){var a=ne.get.mode();switch(t){case 37:case 38:case 39:case 40:var n="day"===a?7:"hour"===a?4:"minute"===a?ee.column:3,n=37===t?-1:38===t?-n:39==t?1:n,r=(n*="minute"===a?z.minTimeGap:1,ne.get.focusDate()||ne.get.date()||new Date),o=r.getFullYear()+("year"===a?n:0),i=r.getMonth()+("month"===a?n:0),s=r.getDate()+("day"===a?n:0),l=r.getHours()+("hour"===a?n:0),n=r.getMinutes()+("minute"===a?n:0),o=new Date(o,i,s,l,n);"time"===z.type&&(o=ne.helper.mergeDateTime(r,o)),ne.helper.isDateInRange(o,a)&&ne.set.focusDate(o);break;case 13:i=ne.get.focusDate();i&&!z.isDisabled(i,a)&&!ne.helper.isDisabled(i,a)&&ne.helper.isEnabled(i,a)&&!1!==z.onSelect.call(d,i,ne.get.mode())&&ne.selectDate(i),e.preventDefault(),e.stopPropagation();break;case 27:ne.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=i.val(),e=Z.date(e,z);ne.set.date(e,!1)},inputFocus:function(){te.addClass(_.active)},inputBlur:function(){var e;te.removeClass(_.active),z.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(Q[z.type],e),i.val(e)),h&&(ne.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){0<i.length&&e&&e.disconnect()}},observe:{class:function(){0<i.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(_.disabled)}},check:{disabled:function(){i.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){return e=Date.UTC(e,t,a+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||Q[z.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(o.data(X.date))||null},inputDate:function(){return i.val()},focusDate:function(){return o.data(X.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(z.startCalendar);return(e?e.get.date():o.data(X.startDate))||null},endDate:function(){var e=ne.get.calendarModule(z.endCalendar);return(e?e.get.date():o.data(X.endDate))||null},minDate:function(){return o.data(X.minDate)||null},maxDate:function(){return o.data(X.maxDate)||null},monthOffset:function(){return o.data(X.monthOffset)||z.monthOffset||0},mode:function(){var e=o.data(X.mode)||z.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===z.type?"hour":"month"===z.type?"month":"year"===z.type?"year":"day"},type:function(){return o.data(X.type)||z.type},validModes:function(){var e=[];return"time"!==z.type&&(z.disableYear&&"year"!==z.type||e.push("year"),(z.disableMonth||"year"===z.type)&&"month"!==z.type||e.push("month"),0<=z.type.indexOf("date")&&e.push("day")),0<=z.type.indexOf("time")&&(e.push("hour"),z.disableMinute||e.push("minute")),e},isTouch:function(){try{return Y.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:y.find(e).first()).data(r):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var n=ne.get.mode(),r=ne.helper.dateFormat(Q[z.type],e);if(a&&!1===z.onBeforeChange.call(d,e,r,n))return!1;if(ne.set.focusDate(e),z.isDisabled(e,n))return!1;var o=ne.get.endDate();o&&e&&o<e&&ne.set.endDate(),ne.set.dataKeyValue(X.date,e),t&&0<i.length&&i.val(r),a&&z.onChange.call(d,e,r,n)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.startCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.endCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.endDate,e,t)},focusDate:function(e,t,a,n){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var r="day"===ne.get.mode(),o=ne.get.focusDate(),r=(r&&e&&o&&((r=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-r,ne.set.monthOffset(o,!1))),ne.set.dataKeyValue(X.focusDate,e,!!e&&t));a=!1!==a&&r&&!1===t||f!=n,f=n,a&&ne.update.focus(n)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.maxDate&&z.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,z.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(X.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.minDate&&z.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,z.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(X.maxDate,e))},monthOffset:function(e,t){var a=Math.max(z.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ne.set.dataKeyValue(X.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(X.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),n=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!n)&&ne.refresh(),!n}},selectDate:function(e,t){ne.verbose("New date selection",e);var a=ne.get.mode();t||"minute"===a||z.disableMinute&&"hour"===a||"date"===z.type&&"day"===a||"month"===z.type&&"month"===a||"year"===z.type&&"year"===a?!1!==ne.set.date(e)&&(h=!0,z.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(z.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===a?z.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute",ne.set.mode(t),"hour"===a||"day"===a&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date()},popup:function(){return s.popup.apply(s,arguments)},focus:function(){(0<i.length?i:te).trigger("focus")},blur:function(){(0<i.length?i:te).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(ne,t,z);var a=t.getDate(),n=t.getMonth(),r=t.getFullYear(),o=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(r,n,a+1-z.firstDayOfWeek),d=i%12||12,u=(i<12?z.text.am:z.text.pm).toLowerCase(),p={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:z.text.monthsShort[n],MMMM:z.text.months[n],Y:r,YY:String(r).slice(2),YYYY:r,d:o,dd:z.text.dayNamesShort[o].slice(0,2),ddd:z.text.dayNamesShort[o],dddd:z.text.dayNames[o],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(z.regExp.token,function(e){return e in p?p[e]:e.slice(1,e.length-1)})},isDisabled:function(n,r){return("day"===r||"month"===r||"year"===r||"hour"===r)&&("day"===r&&-1!==z.disabledDaysOfWeek.indexOf(n.getDay())||z.disabledDates.some(function(e){var t,a=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?a=ne.helper.dateEqual(n,e,r):null!==e&&"object"==typeof e&&(e[X.year]?"number"==typeof e[X.year]?a=n.getFullYear()==e[X.year]:Array.isArray(e[X.year])&&(a=-1<e[X.year].indexOf(n.getFullYear())):e[X.month]?"number"==typeof e[X.month]?a=n.getMonth()==e[X.month]:Array.isArray(e[X.month])?a=-1<e[X.month].indexOf(n.getMonth()):e[X.month]instanceof Date&&(t=ne.helper.sanitiseDate(e[X.month]),a=n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):e[X.date]&&"day"===r&&(e[X.date]instanceof Date?a=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date]),r):Array.isArray(e[X.date])&&(a=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)})))),a})||"hour"===r&&z.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(n,e,r):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[X.date]&&(e[X.date]instanceof Date?t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date])):Array.isArray(e[X.date])&&(t=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)}))),e[X.days]&&("number"==typeof e[X.days]?t=n.getDay()==e[X.days]:Array.isArray(e[X.days])&&(t=-1<e[X.days].indexOf(n.getDay()))),e[X.hours]&&("number"==typeof e[X.hours]?t=t&&n.getHours()==e[X.hours]:Array.isArray(e[X.hours])&&(t=t&&-1<e[X.hours].indexOf(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===z.enabledDates.length||z.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[X.date]&&(t=ne.helper.dateEqual(a,ne.helper.sanitiseDate(e[X.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if((n="string"==typeof(n=e[r])?ne.helper.sanitiseDate(n):n)instanceof Date&&ne.helper.dateEqual(t,n,a))return(o={})[X.date]=n,o;if(null!==n&&"object"==typeof n)if(n[X.year]){if("number"==typeof n[X.year]&&t.getFullYear()==n[X.year])return n;if(Array.isArray(n[X.year])&&-1<n[X.year].indexOf(t.getFullYear()))return n}else if(n[X.month]){if("number"==typeof n[X.month]&&t.getMonth()==n[X.month])return n;if(Array.isArray(n[X.month])){if(-1<n[X.month].indexOf(t.getMonth()))return n}else if(n[X.month]instanceof Date){var o=ne.helper.sanitiseDate(n[X.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return n}}else if(n[X.date]&&"day"===a){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date]),a))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.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[X.hours])return"number"==typeof t[X.hours]&&e.getHours()==t[X.hours]||Array.isArray(t[X.hours])&&-1<t[X.hours].indexOf(e.getHours())?t:void 0},o=0;o<e.length;o++){if("number"==typeof(n=e[o])&&t.getHours()==n)return null;if(null!==n&&"object"==typeof n)if(n[X.days]&&r(t,n)){if("number"==typeof n[X.days]&&t.getDay()==n[X.days])return n;if(Array.isArray(n[X.days])&&-1<n[X.days].indexOf(t.getDay()))return n}else if(n[X.date]&&r(t,n)){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date])))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:Z.date(""+e,z))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){var n="time"===z.type,r="year"===(a=a||"day"),o=r||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||r?0:e.getMonth(),n||o?1:e.getDate(),a?e.getHours():0,i?z.minTimeGap*Math.floor(e.getMinutes()/z.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||r?0:t.getMonth(),n||o?1:t.getDate(),a?t.getHours():0,i?z.minTimeGap*Math.floor(t.getMinutes()/z.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var r;return a||n||(a=(r=ne.get.startDate())&&z.minDate?new Date(Math.max(r,z.minDate)):r||z.minDate,n=z.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),z.minTimeGap*Math.ceil(a.getMinutes()/z.minTimeGap)),!(!e||a&&0<ne.helper.dateDiff(e,a,t)||n&&0<ne.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=ne.get.startDate())&&z.minDate?new Date(Math.max(n,z.minDate)):n||z.minDate,a=z.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),z.minTimeGap*Math.ceil(t.getMinutes()/z.minTimeGap));var n="time"===z.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?n?ne.helper.mergeDateTime(e,t):t:a&&0<ne.helper.dateDiff(a,e,"minute")?n?ne.helper.mergeDateTime(e,a):a: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()===z.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,z,e);else{if(t===ie)return z[e];oe.isPlainObject(z[e])?oe.extend(!0,z[e],t):z[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(t===ie)return ne[e];ne[e]=t}},debug:function(){!z.silent&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,z.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!z.silent&&z.verbose&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,z.name+":"),ne.verbose.apply(console,arguments)))},error:function(){z.silent||(ne.error=Function.prototype.bind.call(console.error,console,z.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,a;z.performance&&(a=(t=Date.now())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":a})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=z.name+":",a=0;v=!1,clearTimeout(ne.performance.timer),oe.each(b,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",D&&(e+=" '"+D+"'"),(console.group!==ie||console.table!==ie)&&0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):oe.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(n,e,t){var r,o,a,i,s=u;return e=e||w,t=t||d,"string"==typeof n&&s!==ie&&(n=n.split(/[ .]/),r=n.length-1,oe.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(oe.isPlainObject(s[a])&&e!=r)s=s[a];else{if(s[a]!==ie)return o=s[a],!1;{if(!oe.isPlainObject(s[t])||e==r)return s[t]!==ie?o=s[t]:ne.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?a=o.apply(t,e):o!==ie&&(a=o),Array.isArray(g)?g.push(a):g!==ie?g=[g,a]:a!==ie&&(g=a),o}};C?(u===ie&&ne.initialize(),ne.invoke(M)):(u!==ie&&u.invoke("destroy"),ne.initialize())}),g!==ie?g:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!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,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim().replace(/([./:-])\s+/g,"$1").replace(/\s+([./:-])/g,"$1").replace(/\s+/g," ")).length)return null;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var a,n,r,o=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var i,s,l,d,u=-1,p=-1,c=-1,f=-1,h=-1,o="time"===t.type,m=t.type.indexOf("time")<0,g=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!m)for(i=0<=oe.inArray(t.text.am.toLowerCase(),g)||!(0<=oe.inArray(t.text.pm.toLowerCase(),g))&&ie,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(p<0||u<0)for(d=l.split(":"),r=0;r<Math.min(2,d.length);r++)n=parseInt(d[r],10),isNaN(n)&&(n=0),0===r?p=n%24:u=n%60;y.splice(a,1)}if(!o){for(a=0;a<g.length;a++)if(!((s=g[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].slice(0,s.length).toLowerCase()===s){f=n+1;break}if(0<=f)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),h=n,y.splice(a,1);break}if(f<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r],10),!isNaN(n)&&1<=n&&n<=12){f=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&1<=n&&n<=31){c=n,y.splice(a,1);break}if(h<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a],10),!isNaN(n)){n<=99&&(n+=t.currentCentury),h=n,y.splice(a,1);break}}if(!m){if(p<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=23){p=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&p<0&&c<0&&f<0&&h<0)return null;u<0&&(u=0),p<0&&(p=0),c<0&&(c=1),f<0&&(f=1),h<0&&(h=(new Date).getFullYear()),i!==ie&&(i?12===p&&(p=0):p<12&&(p+=12));e=new Date(h,f-1,c,p,u);return e.getMonth()===f-1&&e.getFullYear()===h||(e=new Date(h,f,0,p,u)),isNaN(e.getTime())?null:e}},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,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[ASYa]|"[^"]*"|'[^']*'/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(oe,T,Y,ie){"use strict";T=T!==ie&&T.Math===Math?T:globalThis,oe.fn.calendar=function(m){var g,e=oe(this),y=oe(Y),D=e.selector||"",v=Date.now(),b=[],M=m,C="string"==typeof M,w=[].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}},re=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var p,e,z=oe.isPlainObject(m)?oe.extend(!0,{},oe.fn.calendar.settings,m):oe.extend({},oe.fn.calendar.settings),_=z.className,a=z.namespace,n=z.selector,Q=z.formatter,Z=z.parser,X=z.metadata,ee=x[z.minTimeGap],l=z.error,t="."+a,r="module-"+a,o=oe(this),i=o.find(n.input),s=o.find(n.activator),d=this,u=o.data(r),te=u&&u.popupId?y.find("#"+u.popupId):o.find(n.popup),c=!1,ae=o.hasClass(_.inverted),f=!1,h=!1,ne={initialize:function(){ne.debug("Initializing calendar for",d,o),p=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),u=ne,o.data(r,u)},destroy:function(){ne.verbose("Destroying previous calendar for",d),o.removeData(r),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(o.data(X.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(o.data(X.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",z.on||"click")},popup:function(){var e,t;z.inline||0===s.length&&0===(s=o.children().first()).length||(oe.fn.popup===ie?ne.error(l.popup):((te=0===te.length?z.context?(ne.popupId=a+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),oe("<div/>",{id:ne.popupId}).addClass(_.popup).appendTo(y.find(z.context))):(e=0<(t=s.parent()).closest(n.append).length?"appendTo":"prependTo",oe("<div/>").addClass(_.popup)[e](t)):te).addClass(_.calendar),ae&&te.addClass(_.inverted),e=function(){return ne.refreshTooltips(),z.onVisible.apply(te,arguments)},0===i.length&&(te.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),z.onVisible.apply(te,arguments)}),t=ne.setting("on"),t=oe.extend({},z.popupOptions,{popup:te,movePopup:!z.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(z.startMode)),z.onShow.apply(te,arguments)},onVisible:e,onHide:z.onHide,onHidden:function(){return ne.blur(),z.onHidden.apply(te,arguments)}}),ne.popup(t)))},inline:function(){0<s.length&&!z.inline||(z.inline=!0,te=oe("<div/>").addClass(_.calendar).appendTo(o),0===i.length&&te.attr("tabindex","0"))},input:function(){z.touchReadonly&&0<i.length&&p&&i.prop("readonly",!0),ne.check.disabled()},date:function(){var e;z.initialDate?e=Z.date(z.initialDate,z):o.data(X.date)!==ie?e=Z.date(o.data(X.date),z):0<i.length&&(e=Z.date(i.val(),z)),ne.set.date(e,z.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=i[0];t&&(e=Y.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,j,a=ne.get.mode(),n=new Date,q=ne.get.date(),r=ne.get.focusDate(),o=ne.helper.dateInRange(r||q||Z.date(z.initialDate,z)||n),i=(r||ne.set.focusDate(r=o,!1,!1),"year"===a),s="month"===a,l="day"===a,d="hour"===a,u="minute"===a,W="time"===z.type,R=Math.max(z.multiMonth,1),V=l?ne.get.monthOffset():0,p=o.getMinutes(),c=o.getHours(),f=o.getDate(),G=o.getMonth()+V,h=o.getFullYear(),m=l?z.showWeekNumbers?8:7:d?4:ee.column,P=l||d?6:ee.row,g=l?R:1,y=(D=te).hasClass("left")?"right center":"left center";for(D.empty(),1<g&&(j=oe("<div/>").addClass(_.grid).appendTo(D)),t=0;t<g;t++){1<g&&(D=oe("<div/>").addClass(_.column).appendTo(j));var D,v=G+t,B=(new Date(h,v,1).getDay()-z.firstDayOfWeek%7+7)%7,b=(!z.constantHeight&&l&&(b=new Date(h,v+1,0).getDate()+B,P=Math.ceil(b/7)),i?10:s?1:0),M=l?1:0,C=d||u?1:0,w=d||u?f:1,x=new Date(h-b,v-M,w-C,c),M=new Date(h+b,v+M,w+C,c),w=i?new Date(10*Math.ceil(h/10)-9,0,0):s?new Date(h,0,0):l?new Date(h,v,0):new Date(h,v,f,-1),C=i?new Date(10*Math.ceil(h/10)+1,0,1):s?new Date(h+1,0,1):l?new Date(h,v+1,1):new Date(h,v,f+1),T=a,T=(l&&z.showWeekNumbers&&(T+=" andweek"),oe("<table/>").addClass(_.table).addClass(T).addClass(re[m]+" column").appendTo(D)),K=(ae&&T.addClass(_.inverted),m);if(!W){var U=oe("<thead/>").appendTo(T),Y=oe("<tr/>").appendTo(U),k=oe("<th/>").attr("colspan",""+m).appendTo(Y),O=i||s?new Date(h,0,1):l?new Date(h,v,1):new Date(h,v,f,c,p),A=oe("<span/>").addClass(_.link).appendTo(k),O=(A.text(ne.helper.dateFormat(Q[a+"Header"],O)),s?z.disableYear?"day":"year":l?z.disableMonth?"year":"month":"day");if(A.data(X.mode,O),0===t&&((A=oe("<span/>").addClass(_.prev).appendTo(k)).data(X.focusDate,x),A.toggleClass(_.disabledCell,!ne.helper.isDateInRange(w,a)),oe("<i/>").addClass(_.prevIcon).appendTo(A)),t===g-1&&((O=oe("<span/>").addClass(_.next).appendTo(k)).data(X.focusDate,M),O.toggleClass(_.disabledCell,!ne.helper.isDateInRange(C,a)),oe("<i/>").addClass(_.nextIcon).appendTo(O)),l)for(Y=oe("<tr/>").appendTo(U),z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(z.text.weekNo),k.addClass(_.weekCell),K--),N=0;N<K;N++)(k=oe("<th/>").appendTo(Y)).text(Q.dayColumnHeader((N+z.firstDayOfWeek)%7,z))}for(var J=oe("<tbody/>").appendTo(T),N=i?10*Math.ceil(h/10)-9:l?1-B:0,L=0;L<P;L++)for(Y=oe("<tr/>").appendTo(J),l&&z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(ne.get.weekOfYear(h,v,N+1-z.firstDayOfWeek)),k.addClass(_.weekCell)),e=0;e<K;e++,N++){var F,H=i?new Date(N,v,1,c,p):s?new Date(h,N,1,c,p):l?new Date(h,v,N,c,p):d?new Date(h,v,f,N):new Date(h,v,f,c,N*z.minTimeGap),E=i?N:s?z.text.monthsShort[N]:l?H.getDate():ne.helper.dateFormat(Q.cellTime,H),E=((k=oe("<td/>").addClass(_.cell).appendTo(Y)).text(E),k.data(X.date,H),l&&H.getMonth()!==(v+12)%12),I=!z.selectAdjacentDays&&E||!ne.helper.isDateInRange(H,a)||z.isDisabled(H,a)||ne.helper.isDisabled(H,a)||!ne.helper.isEnabled(H,a),S=(I?(null!==(S=ne.helper.findDayAsObject(H,a,z.disabledDates))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&S[X.inverted]===ie)&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation])),"hour"===a&&null!==(S=ne.helper.findHourAsObject(H,a,z.disabledHours))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&S[X.inverted]===ie)&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation]))):null!==(F=ne.helper.findDayAsObject(H,a,z.eventDates))&&(k.addClass(F[X.class]||z.eventClass),F[X.message]&&(k.attr("data-tooltip",F[X.message]),k.attr("data-position",F[X.position]||y),(F[X.inverted]||ae&&F[X.inverted]===ie)&&k.attr("data-inverted",""),F[X.variation]&&k.attr("data-variation",F[X.variation]))),ne.helper.dateEqual(H,q,a)),$=ne.helper.dateEqual(H,n,a),E=(k.toggleClass(_.adjacentCell,E&&!F),k.toggleClass(_.disabledCell,I),k.toggleClass(_.activeCell,S&&!(E&&I)),d||u||k.toggleClass(_.todayCell,!E&&$),{mode:a,adjacent:E,disabled:I,active:S,today:$});Q.cell(k,H,E),ne.helper.dateEqual(H,r,a)&&ne.set.focusDate(H,!1,!1)}z.today&&(x=oe("<tr/>").appendTo(J),(w=oe("<td/>").attr("colspan",""+m).addClass(_.today).appendTo(x)).text(Q.today(z)),w.data(X.date,n)),ne.update.focus(!1,T),z.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||te;var i=ne.get.mode(),a=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),d=ne.get.endDate(),u=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e,t,a,n,r=oe(this),o=r.data(X.date);o&&(e=r.hasClass(_.disabledCell),t=r.hasClass(_.activeCell),a=r.hasClass(_.adjacentCell),n=ne.helper.dateEqual(o,s,i),o=!!u&&(!!l&&ne.helper.isDateInRange(o,i,l,u)||!!d&&ne.helper.isDateInRange(o,i,u,d)),r.toggleClass(_.focusCell,n&&(!p||c)&&(!a||z.selectAdjacentDays&&a)&&!e),ne.helper.isTodayButton(r)||r.toggleClass(_.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var n=oe(T).width();te.find("td[data-position]").each(function(){var e=oe(this),t=T.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,""),a=e.attr("data-position"),t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(t)&&e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),te.on("mousedown"+t,ne.event.mousedown),te.on("touchstart"+t,ne.event.mousedown),te.on("mouseup"+t,ne.event.mouseup),te.on("touchend"+t,ne.event.mouseup),te.on("mouseover"+t,ne.event.mouseover),0<i.length?(i.on("input"+t,ne.event.inputChange),i.on("focus"+t,ne.event.inputFocus),i.on("blur"+t,ne.event.inputBlur),i.on("keydown"+t,ne.event.keydown)):te.on("keydown"+t,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),te.off(t),0<i.length&&i.off(t)}},event:{mouseover:function(e){var t=oe(e.target).data(X.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),c=0<=e.type.indexOf("touch");e=oe(e.target).data(X.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),c=!1;var t,a,n,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(X.date)||t.data(X.focusDate)||t.data(X.mode)?t:e).data(X.date),a=e.data(X.focusDate),n=e.data(X.mode),t&&!1!==z.onSelect.call(d,t,ne.get.mode())?(e=e.hasClass(_.today),ne.selectDate(t,e)):a?ne.set.focusDate(a):n&&ne.set.mode(n))},keydown:function(e){var t=e.which;if(9===t&&ne.popup("hide"),ne.popup("is visible")){var a=ne.get.mode();switch(t){case 37:case 38:case 39:case 40:var n="day"===a?7:"hour"===a?4:"minute"===a?ee.column:3,n=37===t?-1:38===t?-n:39==t?1:n,r=(n*="minute"===a?z.minTimeGap:1,ne.get.focusDate()||ne.get.date()||new Date),o=r.getFullYear()+("year"===a?n:0),i=r.getMonth()+("month"===a?n:0),s=r.getDate()+("day"===a?n:0),l=r.getHours()+("hour"===a?n:0),n=r.getMinutes()+("minute"===a?n:0),o=new Date(o,i,s,l,n);"time"===z.type&&(o=ne.helper.mergeDateTime(r,o)),ne.helper.isDateInRange(o,a)&&ne.set.focusDate(o);break;case 13:i=ne.get.focusDate();i&&!z.isDisabled(i,a)&&!ne.helper.isDisabled(i,a)&&ne.helper.isEnabled(i,a)&&!1!==z.onSelect.call(d,i,ne.get.mode())&&ne.selectDate(i),e.preventDefault(),e.stopPropagation();break;case 27:ne.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=i.val(),e=Z.date(e,z);ne.set.date(e,!1)},inputFocus:function(){te.addClass(_.active)},inputBlur:function(){var e;te.removeClass(_.active),z.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(Q[z.type],e),i.val(e)),h&&(ne.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){0<i.length&&e&&e.disconnect()}},observe:{class:function(){0<i.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(_.disabled)}},check:{disabled:function(){i.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){e=Date.UTC(e,t,a+3)/864e5,t=Math.floor(e/7),a=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(a,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||Q[z.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(o.data(X.date))||null},inputDate:function(){return i.val()},focusDate:function(){return o.data(X.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(z.startCalendar);return(e?e.get.date():o.data(X.startDate))||null},endDate:function(){var e=ne.get.calendarModule(z.endCalendar);return(e?e.get.date():o.data(X.endDate))||null},minDate:function(){return o.data(X.minDate)||null},maxDate:function(){return o.data(X.maxDate)||null},monthOffset:function(){return o.data(X.monthOffset)||z.monthOffset||0},mode:function(){var e=o.data(X.mode)||z.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===z.type?"hour":"month"===z.type?"month":"year"===z.type?"year":"day"},type:function(){return o.data(X.type)||z.type},validModes:function(){var e=[];return"time"!==z.type&&(z.disableYear&&"year"!==z.type||e.push("year"),(z.disableMonth||"year"===z.type)&&"month"!==z.type||e.push("month"),0<=z.type.indexOf("date")&&e.push("day")),0<=z.type.indexOf("time")&&(e.push("hour"),z.disableMinute||e.push("minute")),e},isTouch:function(){try{return Y.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:y.find(e).first()).data(r):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var n=ne.get.mode(),r=ne.helper.dateFormat(Q[z.type],e);if(a&&!1===z.onBeforeChange.call(d,e,r,n))return!1;if(ne.set.focusDate(e),z.isDisabled(e,n))return!1;var o=ne.get.endDate();o&&e&&o<e&&ne.set.endDate(),ne.set.dataKeyValue(X.date,e),t&&0<i.length&&i.val(r),a&&z.onChange.call(d,e,r,n)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.startCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.endCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.endDate,e,t)},focusDate:function(e,t,a,n){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var r="day"===ne.get.mode(),o=ne.get.focusDate(),r=(r&&e&&o&&((r=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-r,ne.set.monthOffset(o,!1))),ne.set.dataKeyValue(X.focusDate,e,!!e&&t));a=!1!==a&&r&&!1===t||f!=n,f=n,a&&ne.update.focus(n)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.maxDate&&z.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,z.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(X.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.minDate&&z.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,z.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(X.maxDate,e))},monthOffset:function(e,t){var a=Math.max(z.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ne.set.dataKeyValue(X.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(X.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),n=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!n)&&ne.refresh(),!n}},selectDate:function(e,t){ne.verbose("New date selection",e);var a=ne.get.mode();t||"minute"===a||z.disableMinute&&"hour"===a||"date"===z.type&&"day"===a||"month"===z.type&&"month"===a||"year"===z.type&&"year"===a?!1!==ne.set.date(e)&&(h=!0,z.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(z.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===a?z.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute",ne.set.mode(t),"hour"===a||"day"===a&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date()},popup:function(){return s.popup.apply(s,arguments)},focus:function(){(0<i.length?i:te).trigger("focus")},blur:function(){(0<i.length?i:te).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(ne,t,z);var a=t.getDate(),n=t.getMonth(),r=t.getFullYear(),o=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(r,n,a+1-z.firstDayOfWeek),d=i%12||12,u=(i<12?z.text.am:z.text.pm).toLowerCase(),p={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:z.text.monthsShort[n],MMMM:z.text.months[n],Y:r,YY:String(r).slice(2),YYYY:r,d:o,dd:z.text.dayNamesShort[o].slice(0,2),ddd:z.text.dayNamesShort[o],dddd:z.text.dayNames[o],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(z.regExp.token,function(e){return e in p?p[e]:e.slice(1,-1)})},isDisabled:function(n,r){return("day"===r||"month"===r||"year"===r||"hour"===r)&&("day"===r&&-1!==z.disabledDaysOfWeek.indexOf(n.getDay())||z.disabledDates.some(function(e){var t,a=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?a=ne.helper.dateEqual(n,e,r):null!==e&&"object"==typeof e&&(e[X.year]?"number"==typeof e[X.year]?a=n.getFullYear()==e[X.year]:Array.isArray(e[X.year])&&(a=-1<e[X.year].indexOf(n.getFullYear())):e[X.month]?"number"==typeof e[X.month]?a=n.getMonth()==e[X.month]:Array.isArray(e[X.month])?a=-1<e[X.month].indexOf(n.getMonth()):e[X.month]instanceof Date&&(t=ne.helper.sanitiseDate(e[X.month]),a=n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):e[X.date]&&"day"===r&&(e[X.date]instanceof Date?a=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date]),r):Array.isArray(e[X.date])&&(a=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)})))),a})||"hour"===r&&z.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(n,e,r):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[X.date]&&(e[X.date]instanceof Date?t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date])):Array.isArray(e[X.date])&&(t=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)}))),e[X.days]&&("number"==typeof e[X.days]?t=n.getDay()==e[X.days]:Array.isArray(e[X.days])&&(t=-1<e[X.days].indexOf(n.getDay()))),e[X.hours]&&("number"==typeof e[X.hours]?t=t&&n.getHours()==e[X.hours]:Array.isArray(e[X.hours])&&(t=t&&-1<e[X.hours].indexOf(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===z.enabledDates.length||z.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[X.date]&&(t=ne.helper.dateEqual(a,ne.helper.sanitiseDate(e[X.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if((n="string"==typeof(n=e[r])?ne.helper.sanitiseDate(n):n)instanceof Date&&ne.helper.dateEqual(t,n,a))return(o={})[X.date]=n,o;if(null!==n&&"object"==typeof n)if(n[X.year]){if("number"==typeof n[X.year]&&t.getFullYear()==n[X.year])return n;if(Array.isArray(n[X.year])&&-1<n[X.year].indexOf(t.getFullYear()))return n}else if(n[X.month]){if("number"==typeof n[X.month]&&t.getMonth()==n[X.month])return n;if(Array.isArray(n[X.month])){if(-1<n[X.month].indexOf(t.getMonth()))return n}else if(n[X.month]instanceof Date){var o=ne.helper.sanitiseDate(n[X.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return n}}else if(n[X.date]&&"day"===a){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date]),a))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.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[X.hours])return"number"==typeof t[X.hours]&&e.getHours()==t[X.hours]||Array.isArray(t[X.hours])&&-1<t[X.hours].indexOf(e.getHours())?t:void 0},o=0;o<e.length;o++){if("number"==typeof(n=e[o])&&t.getHours()==n)return null;if(null!==n&&"object"==typeof n)if(n[X.days]&&r(t,n)){if("number"==typeof n[X.days]&&t.getDay()==n[X.days])return n;if(Array.isArray(n[X.days])&&-1<n[X.days].indexOf(t.getDay()))return n}else if(n[X.date]&&r(t,n)){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date])))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:Z.date(""+e,z))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){var n="time"===z.type,r="year"===(a=a||"day"),o=r||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||r?0:e.getMonth(),n||o?1:e.getDate(),a?e.getHours():0,i?z.minTimeGap*Math.floor(e.getMinutes()/z.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||r?0:t.getMonth(),n||o?1:t.getDate(),a?t.getHours():0,i?z.minTimeGap*Math.floor(t.getMinutes()/z.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var r;return a||n||(a=(r=ne.get.startDate())&&z.minDate?new Date(Math.max(r,z.minDate)):r||z.minDate,n=z.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),z.minTimeGap*Math.ceil(a.getMinutes()/z.minTimeGap)),!(!e||a&&0<ne.helper.dateDiff(e,a,t)||n&&0<ne.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=ne.get.startDate())&&z.minDate?new Date(Math.max(n,z.minDate)):n||z.minDate,a=z.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),z.minTimeGap*Math.ceil(t.getMinutes()/z.minTimeGap));var n="time"===z.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?n?ne.helper.mergeDateTime(e,t):t:a&&0<ne.helper.dateDiff(a,e,"minute")?n?ne.helper.mergeDateTime(e,a):a: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()===z.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,z,e);else{if(t===ie)return z[e];oe.isPlainObject(z[e])?oe.extend(!0,z[e],t):z[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(t===ie)return ne[e];ne[e]=t}},debug:function(){!z.silent&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,z.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!z.silent&&z.verbose&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,z.name+":"),ne.verbose.apply(console,arguments)))},error:function(){z.silent||(ne.error=Function.prototype.bind.call(console.error,console,z.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,a;z.performance&&(a=(t=Date.now())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":a})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=z.name+":",a=0;v=!1,clearTimeout(ne.performance.timer),oe.each(b,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",D&&(e+=" '"+D+"'"),(console.group!==ie||console.table!==ie)&&0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):oe.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(n,e,t){var r,o,a,i,s=u;return e=e||w,t=t||d,"string"==typeof n&&s!==ie&&(n=n.split(/[ .]/),r=n.length-1,oe.each(n,function(e,t){var a=e!=r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(oe.isPlainObject(s[a])&&e!=r)s=s[a];else{if(s[a]!==ie)return o=s[a],!1;{if(!oe.isPlainObject(s[t])||e==r)return s[t]!==ie?o=s[t]:ne.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?a=o.apply(t,e):o!==ie&&(a=o),Array.isArray(g)?g.push(a):g!==ie?g=[g,a]:a!==ie&&(g=a),o}};C?(u===ie&&ne.initialize(),ne.invoke(M)):(u!==ie&&u.invoke("destroy"),ne.initialize())}),g!==ie?g:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!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,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,a){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim().replace(/([./:-])\s+/g,"$1").replace(/\s+([./:-])/g,"$1").replace(/\s+/g," ")).length)return null;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var a,n,r,o=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var i,s,l,d,u=-1,p=-1,c=-1,f=-1,h=-1,o="time"===t.type,m=t.type.indexOf("time")<0,g=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!m)for(i=0<=oe.inArray(t.text.am.toLowerCase(),g)||!(0<=oe.inArray(t.text.pm.toLowerCase(),g))&&ie,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(p<0||u<0)for(d=l.split(":"),r=0;r<Math.min(2,d.length);r++)n=parseInt(d[r],10),isNaN(n)&&(n=0),0===r?p=n%24:u=n%60;y.splice(a,1)}if(!o){for(a=0;a<g.length;a++)if(!((s=g[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].slice(0,s.length).toLowerCase()===s){f=n+1;break}if(0<=f)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),h=n,y.splice(a,1);break}if(f<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r],10),!isNaN(n)&&1<=n&&n<=12){f=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&1<=n&&n<=31){c=n,y.splice(a,1);break}if(h<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a],10),!isNaN(n)){n<=99&&(n+=t.currentCentury),h=n,y.splice(a,1);break}}if(!m){if(p<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=23){p=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&p<0&&c<0&&f<0&&h<0)return null;u<0&&(u=0),p<0&&(p=0),c<0&&(c=1),f<0&&(f=1),h<0&&(h=(new Date).getFullYear()),i!==ie&&(i?12===p&&(p=0):p<12&&(p+=12));e=new Date(h,f-1,c,p,u);return e.getMonth()===f-1&&e.getFullYear()===h||(e=new Date(h,f,0,p,u)),isNaN(e.getTime())?null:e}},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,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[ASYa]|"[^"]*"|'[^']*'/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
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.1-beta.
|
2
|
+
* # Fomantic-UI 2.9.1-beta.24+029436f - Checkbox
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
query = arguments[0],
|
31
|
-
methodInvoked =
|
31
|
+
methodInvoked = typeof query === 'string',
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
33
|
returnedValue
|
34
34
|
;
|
@@ -370,7 +370,7 @@
|
|
370
370
|
return initialLoad;
|
371
371
|
},
|
372
372
|
radio: function () {
|
373
|
-
return
|
373
|
+
return $input.hasClass(className.radio) || $input.attr('type') == 'radio';
|
374
374
|
},
|
375
375
|
indeterminate: function () {
|
376
376
|
return $input.prop('indeterminate') !== undefined && $input.prop('indeterminate');
|
@@ -450,7 +450,7 @@
|
|
450
450
|
return true;
|
451
451
|
},
|
452
452
|
ignoreCallbacks: function () {
|
453
|
-
return
|
453
|
+
return initialLoad && !settings.fireOnInit;
|
454
454
|
},
|
455
455
|
},
|
456
456
|
|
@@ -459,7 +459,7 @@
|
|
459
459
|
return !($module.hasClass(className.disabled) || $module.hasClass(className.readOnly) || $input.prop('disabled') || $input.prop('readonly'));
|
460
460
|
},
|
461
461
|
uncheck: function () {
|
462
|
-
return
|
462
|
+
return typeof settings.uncheckable === 'boolean'
|
463
463
|
? settings.uncheckable
|
464
464
|
: !module.is.radio();
|
465
465
|
},
|
@@ -606,7 +606,7 @@
|
|
606
606
|
|
607
607
|
has: {
|
608
608
|
label: function () {
|
609
|
-
return
|
609
|
+
return $label.length > 0;
|
610
610
|
},
|
611
611
|
},
|
612
612
|
|
@@ -767,7 +767,7 @@
|
|
767
767
|
query = query.split(/[ .]/);
|
768
768
|
maxDepth = query.length - 1;
|
769
769
|
$.each(query, function (depth, value) {
|
770
|
-
var camelCaseValue =
|
770
|
+
var camelCaseValue = depth != maxDepth
|
771
771
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
772
772
|
: query
|
773
773
|
;
|
@@ -820,7 +820,7 @@
|
|
820
820
|
}
|
821
821
|
});
|
822
822
|
|
823
|
-
return
|
823
|
+
return returnedValue !== undefined
|
824
824
|
? returnedValue
|
825
825
|
: this;
|
826
826
|
};
|