+ * version: 1.8.1
+ * https://github.com/wenzhixin/bootstrap-table/
+ */
+
+!(function ($) {
+ 'use strict';
+
+ // TOOLS DEFINITION
+ // ======================
+
+ var cachedWidth = null;
+
+ // it only does '%s', and return '' when arguments are undefined
+ var sprintf = function (str) {
+ var args = arguments,
+ flag = true,
+ i = 1;
+
+ str = str.replace(/%s/g, function () {
+ var arg = args[i++];
+
+ if (typeof arg === 'undefined') {
+ flag = false;
+ return '';
+ }
+ return arg;
+ });
+ return flag ? str : '';
+ };
+
+ var getPropertyFromOther = function (list, from, to, value) {
+ var result = '';
+ $.each(list, function (i, item) {
+ if (item[from] === value) {
+ result = item[to];
+ return false;
+ }
+ return true;
+ });
+ return result;
+ };
+
+ var getFieldIndex = function (columns, field) {
+ var index = -1;
+
+ $.each(columns, function (i, column) {
+ if (column.field === field) {
+ index = i;
+ return false;
+ }
+ return true;
+ });
+ return index;
+ };
+
+ // http://jsfiddle.net/wenyi/47nz7ez9/3/
+ var setFieldIndex = function (columns) {
+ var i,
+ j,
+ k,
+ totalCol = 0,
+ flag = [];
+
+ for (i = 0; i < columns[0].length; i++) {
+ totalCol += columns[0][i].colspan || 1;
+ }
+
+ for (i = 0; i < columns.length; i++) {
+ flag[i] = [];
+ for (j = 0; j < totalCol; j++) {
+ flag[i][j] = false;
+ }
+ }
+
+ for (i = 0; i < columns.length; i++) {
+ for (j = 0; j < columns[i].length; j++) {
+ var r = columns[i][j],
+ rowspan = r.rowspan || 1,
+ colspan = r.colspan || 1,
+ index = $.inArray(false, flag[i]);
+
+ if (colspan === 1) {
+ r.fieldIndex = index;
+ // when field is undefined, use index instead
+ if (typeof r.field === 'undefined') {
+ r.field = index;
+ }
+ }
+
+ for (k = 0; k < rowspan; k++) {
+ flag[i + k][index] = true;
+ }
+ for (k = 0; k < colspan; k++) {
+ flag[i][index + k] = true;
+ }
+ }
+ }
+ };
+
+ var getScrollBarWidth = function () {
+ if (cachedWidth === null) {
+ var inner = $('').addClass('fixed-table-scroll-inner'),
+ outer = $('').addClass('fixed-table-scroll-outer'),
+ w1,
+ w2;
+
+ outer.append(inner);
+ $('body').append(outer);
+
+ w1 = inner[0].offsetWidth;
+ outer.css('overflow', 'scroll');
+ w2 = inner[0].offsetWidth;
+
+ if (w1 === w2) {
+ w2 = outer[0].clientWidth;
+ }
+
+ outer.remove();
+ cachedWidth = w1 - w2;
+ }
+ return cachedWidth;
+ };
+
+ var calculateObjectValue = function (self, name, args, defaultValue) {
+ var func = name;
+
+ if (typeof name === 'string') {
+ // support obj.func1.func2
+ var names = name.split('.');
+
+ if (names.length > 1) {
+ func = window;
+ $.each(names, function (i, f) {
+ func = func[f];
+ });
+ } else {
+ func = window[name];
+ }
+ }
+ if (typeof func === 'object') {
+ return func;
+ }
+ if (typeof func === 'function') {
+ return func.apply(self, args);
+ }
+ if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) {
+ return sprintf.apply(this, [name].concat(args));
+ }
+ return defaultValue;
+ };
+
+ var compareObjects = function (objectA, objectB, compareLength) {
+ // Create arrays of property names
+ var objectAProperties = Object.getOwnPropertyNames(objectA),
+ objectBProperties = Object.getOwnPropertyNames(objectB),
+ propName = '';
+
+ if (compareLength) {
+ // If number of properties is different, objects are not equivalent
+ if (objectAProperties.length != objectBProperties.length) {
+ return false;
+ }
+ }
+
+ for (var i = 0; i < objectAProperties.length; i++) {
+ propName = objectAProperties[i];
+
+ // If the property is not in the object B properties, continue with the next property
+ if ($.inArray(propName, objectBProperties) > -1) {
+ // If values of same property are not equal, objects are not equivalent
+ if (objectA[propName] !== objectB[propName]) {
+ return false;
+ }
+ }
+ }
+
+ // If we made it this far, objects are considered equivalent
+ return true;
+ };
+
+ var escapeHTML = function (text) {
+ if (typeof text === 'string') {
+ return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''');
+ }
+ return text;
+ };
+
+ var getRealHeight = function ($el) {
+ var height = 0;
+ $el.children().each(function () {
+ if (height < $(this).outerHeight(true)) {
+ height = $(this).outerHeight(true);
+ }
+ });
+ return height;
+ };
+
+ var getRealDataAttr = function (dataAttr) {
+ for (var attr in dataAttr) {
+ var auxAttr = attr
+ .split(/(?=[A-Z])/)
+ .join('-')
+ .toLowerCase();
+ if (auxAttr !== attr) {
+ dataAttr[auxAttr] = dataAttr[attr];
+ delete dataAttr[attr];
+ }
+ }
+
+ return dataAttr;
+ };
+
+ // BOOTSTRAP TABLE CLASS DEFINITION
+ // ======================
+
+ var BootstrapTable = function (el, options) {
+ this.options = options;
+ this.$el = $(el);
+ this.$el_ = this.$el.clone();
+ this.timeoutId_ = 0;
+ this.timeoutFooter_ = 0;
+
+ this.init();
+ };
+
+ BootstrapTable.DEFAULTS = {
+ classes: 'table table-hover',
+ locale: undefined,
+ height: undefined,
+ undefinedText: '-',
+ sortName: undefined,
+ sortOrder: 'asc',
+ striped: false,
+ columns: [[]],
+ data: [],
+ method: 'get',
+ url: undefined,
+ ajax: undefined,
+ cache: true,
+ contentType: 'application/json',
+ dataType: 'json',
+ ajaxOptions: {},
+ queryParams: function (params) {
+ return params;
+ },
+ queryParamsType: 'limit', // undefined
+ responseHandler: function (res) {
+ return res;
+ },
+ pagination: false,
+ sidePagination: 'client', // client or server
+ totalRows: 0, // server side need to set
+ pageNumber: 1,
+ pageSize: 10,
+ pageList: [10, 25, 50, 100],
+ paginationHAlign: 'right', //right, left
+ paginationVAlign: 'bottom', //bottom, top, both
+ paginationDetailHAlign: 'left', //right, left
+ paginationFirstText: '',
+ paginationPreText: '‹',
+ paginationNextText: '›',
+ paginationLastText: '',
+ search: false,
+ strictSearch: false,
+ searchAlign: 'right',
+ selectItemName: 'btSelectItem',
+ showHeader: true,
+ showFooter: false,
+ showColumns: false,
+ showPaginationSwitch: false,
+ showRefresh: false,
+ showToggle: false,
+ buttonsAlign: 'right',
+ smartDisplay: true,
+ minimumCountColumns: 1,
+ idField: undefined,
+ uniqueId: undefined,
+ cardView: false,
+ detailView: false,
+ detailFormatter: function (index, row) {
+ return '';
+ },
+ trimOnSearch: true,
+ clickToSelect: false,
+ singleSelect: false,
+ toolbar: undefined,
+ toolbarAlign: 'left',
+ checkboxHeader: true,
+ sortable: true,
+ maintainSelected: false,
+ searchTimeOut: 500,
+ searchText: '',
+ iconSize: undefined,
+ iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome)
+ icons: {
+ paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
+ paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
+ refresh: 'glyphicon-refresh icon-refresh',
+ toggle: 'glyphicon-list-alt icon-list-alt',
+ columns: 'glyphicon-th icon-th',
+ detailOpen: 'glyphicon-plus icon-plus',
+ detailClose: 'glyphicon-minus icon-minus',
+ },
+
+ rowStyle: function (row, index) {
+ return {};
+ },
+
+ rowAttributes: function (row, index) {
+ return {};
+ },
+
+ onAll: function (name, args) {
+ return false;
+ },
+ onClickCell: function (field, value, row, $element) {
+ return false;
+ },
+ onDblClickCell: function (field, value, row, $element) {
+ return false;
+ },
+ onClickRow: function (item, $element) {
+ return false;
+ },
+ onDblClickRow: function (item, $element) {
+ return false;
+ },
+ onSort: function (name, order) {
+ return false;
+ },
+ onCheck: function (row) {
+ return false;
+ },
+ onUncheck: function (row) {
+ return false;
+ },
+ onCheckAll: function (rows) {
+ return false;
+ },
+ onUncheckAll: function (rows) {
+ return false;
+ },
+ onCheckSome: function (rows) {
+ return false;
+ },
+ onUncheckSome: function (rows) {
+ return false;
+ },
+ onLoadSuccess: function (data) {
+ return false;
+ },
+ onLoadError: function (status) {
+ return false;
+ },
+ onColumnSwitch: function (field, checked) {
+ return false;
+ },
+ onPageChange: function (number, size) {
+ return false;
+ },
+ onSearch: function (text) {
+ return false;
+ },
+ onToggle: function (cardView) {
+ return false;
+ },
+ onPreBody: function (data) {
+ return false;
+ },
+ onPostBody: function () {
+ return false;
+ },
+ onPostHeader: function () {
+ return false;
+ },
+ onExpandRow: function (index, row, $detail) {
+ return false;
+ },
+ onCollapseRow: function (index, row) {
+ return false;
+ },
+ onRefreshOptions: function (options) {
+ return false;
+ },
+ onResetView: function () {
+ return false;
+ },
+ };
+
+ BootstrapTable.LOCALES = [];
+
+ BootstrapTable.LOCALES['en-US'] = BootstrapTable.LOCALES['en'] = {
+ formatLoadingMessage: function () {
+ return 'Loading, please wait...';
+ },
+ formatRecordsPerPage: function (pageNumber) {
+ return sprintf('%s records per page', pageNumber);
+ },
+ formatShowingRows: function (pageFrom, pageTo, totalRows) {
+ return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows);
+ },
+ formatSearch: function () {
+ return 'Search';
+ },
+ formatNoMatches: function () {
+ return 'No matching records found';
+ },
+ formatPaginationSwitch: function () {
+ return 'Hide/Show pagination';
+ },
+ formatRefresh: function () {
+ return 'Refresh';
+ },
+ formatToggle: function () {
+ return 'Toggle';
+ },
+ formatColumns: function () {
+ return 'Columns';
+ },
+ formatAllRows: function () {
+ return 'All';
+ },
+ };
+
+ $.extend(BootstrapTable.DEFAULTS, BootstrapTable.LOCALES['en-US']);
+
+ BootstrapTable.COLUMN_DEFAULTS = {
+ radio: false,
+ checkbox: false,
+ checkboxEnabled: true,
+ field: undefined,
+ title: undefined,
+ titleTooltip: undefined,
+ class: undefined,
+ align: undefined, // left, right, center
+ halign: undefined, // left, right, center
+ falign: undefined, // left, right, center
+ valign: undefined, // top, middle, bottom
+ width: undefined,
+ sortable: false,
+ order: 'asc', // asc, desc
+ visible: true,
+ switchable: true,
+ clickToSelect: true,
+ formatter: undefined,
+ footerFormatter: undefined,
+ events: undefined,
+ sorter: undefined,
+ sortName: undefined,
+ cellStyle: undefined,
+ searchable: true,
+ cardVisible: true,
+ };
+
+ BootstrapTable.EVENTS = {
+ 'all.bs.table': 'onAll',
+ 'click-cell.bs.table': 'onClickCell',
+ 'dbl-click-cell.bs.table': 'onDblClickCell',
+ 'click-row.bs.table': 'onClickRow',
+ 'dbl-click-row.bs.table': 'onDblClickRow',
+ 'sort.bs.table': 'onSort',
+ 'check.bs.table': 'onCheck',
+ 'uncheck.bs.table': 'onUncheck',
+ 'check-all.bs.table': 'onCheckAll',
+ 'uncheck-all.bs.table': 'onUncheckAll',
+ 'check-some.bs.table': 'onCheckSome',
+ 'uncheck-some.bs.table': 'onUncheckSome',
+ 'load-success.bs.table': 'onLoadSuccess',
+ 'load-error.bs.table': 'onLoadError',
+ 'column-switch.bs.table': 'onColumnSwitch',
+ 'page-change.bs.table': 'onPageChange',
+ 'search.bs.table': 'onSearch',
+ 'toggle.bs.table': 'onToggle',
+ 'pre-body.bs.table': 'onPreBody',
+ 'post-body.bs.table': 'onPostBody',
+ 'post-header.bs.table': 'onPostHeader',
+ 'expand-row.bs.table': 'onExpandRow',
+ 'collapse-row.bs.table': 'onCollapseRow',
+ 'refresh-options.bs.table': 'onRefreshOptions',
+ 'reset-view.bs.table': 'onResetView',
+ };
+
+ BootstrapTable.prototype.init = function () {
+ this.initLocale();
+ this.initContainer();
+ this.initTable();
+ this.initHeader();
+ this.initData();
+ this.initFooter();
+ this.initToolbar();
+ this.initPagination();
+ this.initBody();
+ this.initServer();
+ };
+
+ BootstrapTable.prototype.initLocale = function () {
+ if (this.options.locale) {
+ var parts = this.options.locale.split(/-|_/);
+ parts[0].toLowerCase();
+ parts[1] && parts[1].toUpperCase();
+ if ($.fn.bootstrapTable.locales[this.options.locale]) {
+ // locale as requested
+ $.extend(this.options, $.fn.bootstrapTable.locales[this.options.locale]);
+ } else if ($.fn.bootstrapTable.locales[parts.join('-')]) {
+ // locale with sep set to - (in case original was specified with _)
+ $.extend(this.options, $.fn.bootstrapTable.locales[parts.join('-')]);
+ } else if ($.fn.bootstrapTable.locales[parts[0]]) {
+ // short locale language code (i.e. 'en')
+ $.extend(this.options, $.fn.bootstrapTable.locales[parts[0]]);
+ }
+ }
+ };
+
+ BootstrapTable.prototype.initContainer = function () {
+ this.$container = $(
+ [
+ '',
+ '
',
+ this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both'
+ ? ''
+ : '',
+ '
',
+ '',
+ '
',
+ '
',
+ this.options.formatLoadingMessage(),
+ '
',
+ '
',
+ '',
+ this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both'
+ ? ''
+ : '',
+ '
',
+ '
',
+ ].join('')
+ );
+
+ this.$container.insertAfter(this.$el);
+ this.$tableContainer = this.$container.find('.fixed-table-container');
+ this.$tableHeader = this.$container.find('.fixed-table-header');
+ this.$tableBody = this.$container.find('.fixed-table-body');
+ this.$tableLoading = this.$container.find('.fixed-table-loading');
+ this.$tableFooter = this.$container.find('.fixed-table-footer');
+ this.$toolbar = this.$container.find('.fixed-table-toolbar');
+ this.$pagination = this.$container.find('.fixed-table-pagination');
+
+ this.$tableBody.append(this.$el);
+ this.$container.after('');
+
+ this.$el.addClass(this.options.classes);
+ if (this.options.striped) {
+ this.$el.addClass('table-striped');
+ }
+ if ($.inArray('table-no-bordered', this.options.classes.split(' ')) !== -1) {
+ this.$tableContainer.addClass('table-no-bordered');
+ }
+ };
+
+ BootstrapTable.prototype.initTable = function () {
+ var that = this,
+ columns = [],
+ data = [];
+
+ this.$header = this.$el.find('thead');
+ if (!this.$header.length) {
+ this.$header = $('').appendTo(this.$el);
+ }
+ this.$header.find('tr').each(function () {
+ var column = [];
+
+ $(this)
+ .find('th')
+ .each(function () {
+ column.push(
+ $.extend(
+ {},
+ {
+ title: $(this).html(),
+ class: $(this).attr('class'),
+ titleTooltip: $(this).attr('title'),
+ rowspan: $(this).attr('rowspan') ? +$(this).attr('rowspan') : undefined,
+ colspan: $(this).attr('colspan') ? +$(this).attr('colspan') : undefined,
+ },
+ $(this).data()
+ )
+ );
+ });
+ columns.push(column);
+ });
+ if (!$.isArray(this.options.columns[0])) {
+ this.options.columns = [this.options.columns];
+ }
+ this.options.columns = $.extend(true, [], columns, this.options.columns);
+ this.columns = [];
+
+ setFieldIndex(this.options.columns);
+ $.each(this.options.columns, function (i, columns) {
+ $.each(columns, function (j, column) {
+ column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column);
+
+ if (typeof column.fieldIndex !== 'undefined') {
+ that.columns[column.fieldIndex] = column;
+ }
+
+ that.options.columns[i][j] = column;
+ });
+ });
+
+ // if options.data is setting, do not process tbody data
+ if (this.options.data.length) {
+ return;
+ }
+
+ this.$el.find('tbody tr').each(function () {
+ var row = {};
+
+ // save tr's id, class and data-* attributes
+ row._id = $(this).attr('id');
+ row._class = $(this).attr('class');
+ row._data = getRealDataAttr($(this).data());
+
+ $(this)
+ .find('td')
+ .each(function (i) {
+ var field = that.columns[i].field;
+
+ row[field] = $(this).html();
+ // save td's id, class and data-* attributes
+ row['_' + field + '_id'] = $(this).attr('id');
+ row['_' + field + '_class'] = $(this).attr('class');
+ row['_' + field + '_rowspan'] = $(this).attr('rowspan');
+ row['_' + field + '_title'] = $(this).attr('title');
+ row['_' + field + '_data'] = getRealDataAttr($(this).data());
+ });
+ data.push(row);
+ });
+ this.options.data = data;
+ };
+
+ BootstrapTable.prototype.initHeader = function () {
+ var that = this,
+ visibleColumns = {},
+ html = [];
+
+ this.header = {
+ fields: [],
+ styles: [],
+ classes: [],
+ formatters: [],
+ events: [],
+ sorters: [],
+ sortNames: [],
+ cellStyles: [],
+ clickToSelects: [],
+ searchables: [],
+ };
+
+ $.each(this.options.columns, function (i, columns) {
+ html.push('');
+
+ if (i == 0 && !that.options.cardView && that.options.detailView) {
+ html.push(sprintf(' | ', that.options.columns.length));
+ }
+
+ $.each(columns, function (j, column) {
+ var text = '',
+ halign = '', // header align style
+ align = '', // body align style
+ style = '',
+ class_ = sprintf(' class="%s"', column['class']),
+ order = that.options.sortOrder || column.order,
+ unitWidth = 'px',
+ width = column.width;
+
+ if (column.width !== undefined && !that.options.cardView) {
+ if (typeof column.width === 'string') {
+ if (column.width.indexOf('%') !== -1) {
+ unitWidth = '%';
+ }
+ }
+ }
+ if (column.width && typeof column.width === 'string') {
+ width = column.width.replace('%', '').replace('px', '');
+ }
+
+ halign = sprintf('text-align: %s; ', column.halign ? column.halign : column.align);
+ align = sprintf('text-align: %s; ', column.align);
+ style = sprintf('vertical-align: %s; ', column.valign);
+ style += sprintf('width: %s%s; ', column.checkbox || column.radio ? 36 : width, unitWidth);
+
+ if (typeof column.fieldIndex !== 'undefined') {
+ that.header.fields[column.fieldIndex] = column.field;
+ that.header.styles[column.fieldIndex] = align + style;
+ that.header.classes[column.fieldIndex] = class_;
+ that.header.formatters[column.fieldIndex] = column.formatter;
+ that.header.events[column.fieldIndex] = column.events;
+ that.header.sorters[column.fieldIndex] = column.sorter;
+ that.header.sortNames[column.fieldIndex] = column.sortName;
+ that.header.cellStyles[column.fieldIndex] = column.cellStyle;
+ that.header.clickToSelects[column.fieldIndex] = column.clickToSelect;
+ that.header.searchables[column.fieldIndex] = column.searchable;
+
+ if (!column.visible) {
+ return;
+ }
+
+ if (that.options.cardView && !column.cardVisible) {
+ return;
+ }
+
+ visibleColumns[column.field] = column;
+ }
+
+ html.push(
+ ''
+ );
+
+ html.push(sprintf(' ', that.options.sortable && column.sortable ? 'sortable both' : ''));
+
+ text = column.title;
+
+ if (column.checkbox) {
+ if (!that.options.singleSelect && that.options.checkboxHeader) {
+ text = '';
+ }
+ that.header.stateField = column.field;
+ }
+ if (column.radio) {
+ text = '';
+ that.header.stateField = column.field;
+ that.options.singleSelect = true;
+ }
+
+ html.push(text);
+ html.push(' ');
+ html.push('');
+ html.push('');
+ html.push(' | ');
+ });
+ html.push('
');
+ });
+
+ this.$header.html(html.join(''));
+ this.$header.find('th[data-field]').each(function (i) {
+ $(this).data(visibleColumns[$(this).data('field')]);
+ });
+ this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
+ if (that.options.sortable && $(this).parent().data().sortable) {
+ that.onSort(event);
+ }
+ });
+
+ if (!this.options.showHeader || this.options.cardView) {
+ this.$header.hide();
+ this.$tableHeader.hide();
+ this.$tableLoading.css('top', 0);
+ } else {
+ this.$header.show();
+ this.$tableHeader.show();
+ this.$tableLoading.css('top', this.$header.outerHeight() + 1);
+ // Assign the correct sortable arrow
+ this.getCaret();
+ }
+
+ this.$selectAll = this.$header.find('[name="btSelectAll"]');
+ this.$container.off('click', '[name="btSelectAll"]').on('click', '[name="btSelectAll"]', function () {
+ var checked = $(this).prop('checked');
+ that[checked ? 'checkAll' : 'uncheckAll']();
+ });
+ };
+
+ BootstrapTable.prototype.initFooter = function () {
+ if (!this.options.showFooter || this.options.cardView) {
+ this.$tableFooter.hide();
+ } else {
+ this.$tableFooter.show();
+ }
+ };
+
+ /**
+ * @param data
+ * @param type: append / prepend
+ */
+ BootstrapTable.prototype.initData = function (data, type) {
+ if (type === 'append') {
+ this.data = this.data.concat(data);
+ } else if (type === 'prepend') {
+ this.data = [].concat(data).concat(this.data);
+ } else {
+ this.data = data || this.options.data;
+ }
+
+ // Fix #839 Records deleted when adding new row on filtered table
+ if (type === 'append') {
+ this.options.data = this.options.data.concat(data);
+ } else if (type === 'prepend') {
+ this.options.data = [].concat(data).concat(this.options.data);
+ } else {
+ this.options.data = this.data;
+ }
+
+ if (this.options.sidePagination === 'server') {
+ return;
+ }
+ this.initSort();
+ };
+
+ BootstrapTable.prototype.initSort = function () {
+ var that = this,
+ name = this.options.sortName,
+ order = this.options.sortOrder === 'desc' ? -1 : 1,
+ index = $.inArray(this.options.sortName, this.header.fields);
+
+ if (index !== -1) {
+ this.data.sort(function (a, b) {
+ if (that.header.sortNames[index]) {
+ name = that.header.sortNames[index];
+ }
+ var aa = a[name],
+ bb = b[name],
+ value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]);
+
+ if (value !== undefined) {
+ return order * value;
+ }
+
+ // Fix #161: undefined or null string sort bug.
+ if (aa === undefined || aa === null) {
+ aa = '';
+ }
+ if (bb === undefined || bb === null) {
+ bb = '';
+ }
+
+ // IF both values are numeric, do a numeric comparison
+ if ($.isNumeric(aa) && $.isNumeric(bb)) {
+ // Convert numerical values form string to float.
+ aa = parseFloat(aa);
+ bb = parseFloat(bb);
+ if (aa < bb) {
+ return order * -1;
+ }
+ return order;
+ }
+
+ if (aa === bb) {
+ return 0;
+ }
+
+ // If value is not a string, convert to string
+ if (typeof aa !== 'string') {
+ aa = aa.toString();
+ }
+
+ if (aa.localeCompare(bb) === -1) {
+ return order * -1;
+ }
+
+ return order;
+ });
+ }
+ };
+
+ BootstrapTable.prototype.onSort = function (event) {
+ var $this = $(event.currentTarget).parent(),
+ $this_ = this.$header.find('th').eq($this.index());
+
+ this.$header.add(this.$header_).find('span.order').remove();
+
+ if (this.options.sortName === $this.data('field')) {
+ this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc';
+ } else {
+ this.options.sortName = $this.data('field');
+ this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc';
+ }
+ this.trigger('sort', this.options.sortName, this.options.sortOrder);
+
+ $this.add($this_).data('order', this.options.sortOrder);
+
+ // Assign the correct sortable arrow
+ this.getCaret();
+
+ if (this.options.sidePagination === 'server') {
+ this.initServer();
+ return;
+ }
+
+ this.initSort();
+ this.initBody();
+ };
+
+ BootstrapTable.prototype.initToolbar = function () {
+ var that = this,
+ html = [],
+ timeoutId = 0,
+ $keepOpen,
+ $search,
+ switchableCount = 0;
+
+ this.$toolbar.html('');
+
+ if (typeof this.options.toolbar === 'string') {
+ $(sprintf('', this.options.toolbarAlign)).appendTo(this.$toolbar).append($(this.options.toolbar));
+ }
+
+ // showColumns, showToggle, showRefresh
+ html = [sprintf('', this.options.buttonsAlign, this.options.buttonsAlign)];
+
+ if (typeof this.options.icons === 'string') {
+ this.options.icons = calculateObjectValue(null, this.options.icons);
+ }
+
+ if (this.options.showPaginationSwitch) {
+ html.push(
+ sprintf('
'
+ );
+ }
+
+ if (this.options.showRefresh) {
+ html.push(
+ sprintf(
+ '
'
+ );
+ }
+
+ if (this.options.showToggle) {
+ html.push(
+ sprintf(
+ '
'
+ );
+ }
+
+ if (this.options.showColumns) {
+ html.push(
+ sprintf('
', this.options.formatColumns()),
+ '',
+ '', '
');
+ }
+
+ html.push('
');
+
+ // Fix #188: this.showToolbar is for extentions
+ if (this.showToolbar || html.length > 2) {
+ this.$toolbar.append(html.join(''));
+ }
+
+ if (this.options.showPaginationSwitch) {
+ this.$toolbar.find('button[name="paginationSwitch"]').off('click').on('click', $.proxy(this.togglePagination, this));
+ }
+
+ if (this.options.showRefresh) {
+ this.$toolbar.find('button[name="refresh"]').off('click').on('click', $.proxy(this.refresh, this));
+ }
+
+ if (this.options.showToggle) {
+ this.$toolbar
+ .find('button[name="toggle"]')
+ .off('click')
+ .on('click', function () {
+ that.toggleView();
+ });
+ }
+
+ if (this.options.showColumns) {
+ $keepOpen = this.$toolbar.find('.keep-open');
+
+ if (switchableCount <= this.options.minimumCountColumns) {
+ $keepOpen.find('input').prop('disabled', true);
+ }
+
+ $keepOpen
+ .find('li')
+ .off('click')
+ .on('click', function (event) {
+ event.stopImmediatePropagation();
+ });
+ $keepOpen
+ .find('input')
+ .off('click')
+ .on('click', function () {
+ var $this = $(this);
+
+ that.toggleColumn(getFieldIndex(that.columns, $(this).data('field')), $this.prop('checked'), false);
+ that.trigger('column-switch', $(this).data('field'), $this.prop('checked'));
+ });
+ }
+
+ if (this.options.search) {
+ html = [];
+ html.push(
+ '',
+ sprintf(
+ '',
+ this.options.formatSearch()
+ ),
+ '
'
+ );
+
+ this.$toolbar.append(html.join(''));
+ $search = this.$toolbar.find('.search input');
+ $search.off('keyup drop').on('keyup drop', function (event) {
+ clearTimeout(timeoutId); // doesn't matter if it's 0
+ timeoutId = setTimeout(function () {
+ that.onSearch(event);
+ }, that.options.searchTimeOut);
+ });
+
+ if (this.options.searchText !== '') {
+ $search.val(this.options.searchText);
+ clearTimeout(timeoutId); // doesn't matter if it's 0
+ timeoutId = setTimeout(function () {
+ $search.trigger('keyup');
+ }, that.options.searchTimeOut);
+ }
+ }
+ };
+
+ BootstrapTable.prototype.onSearch = function (event) {
+ var text = $.trim($(event.currentTarget).val());
+
+ // trim search input
+ if (this.options.trimOnSearch && $(event.currentTarget).val() !== text) {
+ $(event.currentTarget).val(text);
+ }
+
+ if (text === this.searchText) {
+ return;
+ }
+ this.searchText = text;
+
+ this.options.pageNumber = 1;
+ this.initSearch();
+ this.updatePagination();
+ this.trigger('search', text);
+ };
+
+ BootstrapTable.prototype.initSearch = function () {
+ var that = this;
+
+ if (this.options.sidePagination !== 'server') {
+ var s = this.searchText && this.searchText.toLowerCase();
+ var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns;
+
+ // Check filter
+ this.data = f
+ ? $.grep(this.options.data, function (item, i) {
+ for (var key in f) {
+ if (item[key] !== f[key]) {
+ return false;
+ }
+ }
+ return true;
+ })
+ : this.options.data;
+
+ this.data = s
+ ? $.grep(this.data, function (item, i) {
+ for (var key in item) {
+ key = $.isNumeric(key) ? parseInt(key, 10) : key;
+ var value = item[key],
+ column = that.columns[getFieldIndex(that.columns, key)],
+ j = $.inArray(key, that.header.fields);
+
+ // Fix #142: search use formated data
+ value = calculateObjectValue(column, that.header.formatters[j], [value, item, i], value);
+
+ var index = $.inArray(key, that.header.fields);
+ if (index !== -1 && that.header.searchables[index] && (typeof value === 'string' || typeof value === 'number')) {
+ if (that.options.strictSearch) {
+ if ((value + '').toLowerCase() === s) {
+ return true;
+ }
+ } else {
+ if ((value + '').toLowerCase().indexOf(s) !== -1) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ })
+ : this.data;
+ }
+ };
+
+ BootstrapTable.prototype.initPagination = function () {
+ if (!this.options.pagination) {
+ this.$pagination.hide();
+ return;
+ } else {
+ this.$pagination.show();
+ }
+
+ var that = this,
+ html = [],
+ $allSelected = false,
+ i,
+ from,
+ to,
+ $pageList,
+ $first,
+ $pre,
+ $next,
+ $last,
+ $number,
+ data = this.getData();
+
+ if (this.options.sidePagination !== 'server') {
+ this.options.totalRows = data.length;
+ }
+
+ this.totalPages = 0;
+ if (this.options.totalRows) {
+ if (this.options.pageSize === this.options.formatAllRows()) {
+ this.options.pageSize = this.options.totalRows;
+ $allSelected = true;
+ } else if (this.options.pageSize === this.options.totalRows) {
+ // Fix #667 Table with pagination,
+ // multiple pages and a search that matches to one page throws exception
+ var pageLst =
+ typeof this.options.pageList === 'string'
+ ? this.options.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',')
+ : this.options.pageList;
+ if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
+ $allSelected = true;
+ }
+ }
+
+ this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1;
+
+ this.options.totalPages = this.totalPages;
+ }
+ if (this.totalPages > 0 && this.options.pageNumber > this.totalPages) {
+ this.options.pageNumber = this.totalPages;
+ }
+
+ this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1;
+ this.pageTo = this.options.pageNumber * this.options.pageSize;
+ if (this.pageTo > this.options.totalRows) {
+ this.pageTo = this.options.totalRows;
+ }
+
+ html.push(
+ '',
+ ''
+ );
+
+ this.$pagination.html(html.join(''));
+
+ $pageList = this.$pagination.find('.page-list a');
+ $first = this.$pagination.find('.page-first');
+ $pre = this.$pagination.find('.page-pre');
+ $next = this.$pagination.find('.page-next');
+ $last = this.$pagination.find('.page-last');
+ $number = this.$pagination.find('.page-number');
+
+ if (this.options.pageNumber <= 1) {
+ $first.addClass('disabled');
+ $pre.addClass('disabled');
+ }
+ if (this.options.pageNumber >= this.totalPages) {
+ $next.addClass('disabled');
+ $last.addClass('disabled');
+ }
+ if (this.options.smartDisplay) {
+ if (this.totalPages <= 1) {
+ this.$pagination.find('div.pagination').hide();
+ }
+ if (pageList.length < 2 || this.options.totalRows <= pageList[0]) {
+ this.$pagination.find('span.page-list').hide();
+ }
+
+ // when data is empty, hide the pagination
+ this.$pagination[this.getData().length ? 'show' : 'hide']();
+ }
+ if ($allSelected) {
+ this.options.pageSize = this.options.formatAllRows();
+ }
+ $pageList.off('click').on('click', $.proxy(this.onPageListChange, this));
+ $first.off('click').on('click', $.proxy(this.onPageFirst, this));
+ $pre.off('click').on('click', $.proxy(this.onPagePre, this));
+ $next.off('click').on('click', $.proxy(this.onPageNext, this));
+ $last.off('click').on('click', $.proxy(this.onPageLast, this));
+ $number.off('click').on('click', $.proxy(this.onPageNumber, this));
+ };
+
+ BootstrapTable.prototype.updatePagination = function (event) {
+ // Fix #171: IE disabled button can be clicked bug.
+ if (event && $(event.currentTarget).hasClass('disabled')) {
+ return;
+ }
+
+ if (!this.options.maintainSelected) {
+ this.resetRows();
+ }
+
+ this.initPagination();
+ if (this.options.sidePagination === 'server') {
+ this.initServer();
+ } else {
+ this.initBody();
+ }
+
+ this.trigger('page-change', this.options.pageNumber, this.options.pageSize);
+ };
+
+ BootstrapTable.prototype.onPageListChange = function (event) {
+ var $this = $(event.currentTarget);
+
+ $this.parent().addClass('active').siblings().removeClass('active');
+ this.options.pageSize =
+ $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? this.options.formatAllRows() : +$this.text();
+ this.$toolbar.find('.page-size').text(this.options.pageSize);
+
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageFirst = function (event) {
+ this.options.pageNumber = 1;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPagePre = function (event) {
+ this.options.pageNumber--;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageNext = function (event) {
+ this.options.pageNumber++;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageLast = function (event) {
+ this.options.pageNumber = this.totalPages;
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.onPageNumber = function (event) {
+ if (this.options.pageNumber === +$(event.currentTarget).text()) {
+ return;
+ }
+ this.options.pageNumber = +$(event.currentTarget).text();
+ this.updatePagination(event);
+ };
+
+ BootstrapTable.prototype.initBody = function (fixedScroll) {
+ var that = this,
+ html = [],
+ data = this.getData();
+
+ this.trigger('pre-body', data);
+
+ this.$body = this.$el.find('tbody');
+ if (!this.$body.length) {
+ this.$body = $('').appendTo(this.$el);
+ }
+
+ //Fix #389 Bootstrap-table-flatJSON is not working
+
+ if (!this.options.pagination || this.options.sidePagination === 'server') {
+ this.pageFrom = 1;
+ this.pageTo = data.length;
+ }
+
+ for (var i = this.pageFrom - 1; i < this.pageTo; i++) {
+ var key,
+ item = data[i],
+ style = {},
+ csses = [],
+ data_ = '',
+ attributes = {},
+ htmlAttributes = [];
+
+ style = calculateObjectValue(this.options, this.options.rowStyle, [item, i], style);
+
+ if (style && style.css) {
+ for (key in style.css) {
+ csses.push(key + ': ' + style.css[key]);
+ }
+ }
+
+ attributes = calculateObjectValue(this.options, this.options.rowAttributes, [item, i], attributes);
+
+ if (attributes) {
+ for (key in attributes) {
+ htmlAttributes.push(sprintf('%s="%s"', key, escapeHTML(attributes[key])));
+ }
+ }
+
+ if (item._data && !$.isEmptyObject(item._data)) {
+ $.each(item._data, function (k, v) {
+ // ignore data-index
+ if (k === 'index') {
+ return;
+ }
+ data_ += sprintf(' data-%s="%s"', k, v);
+ });
+ }
+
+ html.push(
+ ''
+ );
+
+ if (this.options.cardView) {
+ html.push(sprintf('', this.header.fields.length));
+ }
+
+ if (!this.options.cardView && this.options.detailView) {
+ html.push(
+ ' | ',
+ '',
+ sprintf('', this.options.iconsPrefix, this.options.icons.detailOpen),
+ '',
+ ' | '
+ );
+ }
+
+ $.each(this.header.fields, function (j, field) {
+ var text = '',
+ value = item[field],
+ type = '',
+ cellStyle = {},
+ id_ = '',
+ class_ = that.header.classes[j],
+ data_ = '',
+ rowspan_ = '',
+ title_ = '',
+ column = that.columns[getFieldIndex(that.columns, field)];
+
+ if (!column.visible) {
+ return;
+ }
+
+ style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
+
+ value = calculateObjectValue(column, that.header.formatters[j], [value, item, i], value);
+
+ // handle td's id and class
+ if (item['_' + field + '_id']) {
+ id_ = sprintf(' id="%s"', item['_' + field + '_id']);
+ }
+ if (item['_' + field + '_class']) {
+ class_ = sprintf(' class="%s"', item['_' + field + '_class']);
+ }
+ if (item['_' + field + '_rowspan']) {
+ rowspan_ = sprintf(' rowspan="%s"', item['_' + field + '_rowspan']);
+ }
+ if (item['_' + field + '_title']) {
+ title_ = sprintf(' title="%s"', item['_' + field + '_title']);
+ }
+ cellStyle = calculateObjectValue(that.header, that.header.cellStyles[j], [value, item, i], cellStyle);
+ if (cellStyle.classes) {
+ class_ = sprintf(' class="%s"', cellStyle.classes);
+ }
+ if (cellStyle.css) {
+ var csses_ = [];
+ for (var key in cellStyle.css) {
+ csses_.push(key + ': ' + cellStyle.css[key]);
+ }
+ style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; '));
+ }
+
+ if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) {
+ $.each(item['_' + field + '_data'], function (k, v) {
+ // ignore data-index
+ if (k === 'index') {
+ return;
+ }
+ data_ += sprintf(' data-%s="%s"', k, v);
+ });
+ }
+
+ if (column.checkbox || column.radio) {
+ type = column.checkbox ? 'checkbox' : type;
+ type = column.radio ? 'radio' : type;
+
+ text = [
+ that.options.cardView ? '' : '
',
+ '',
+ that.options.cardView ? '' : ' | ',
+ ].join('');
+
+ item[that.header.stateField] = value === true || (value && value.checked);
+ } else {
+ value = typeof value === 'undefined' || value === null ? that.options.undefinedText : value;
+
+ text = that.options.cardView
+ ? [
+ '
',
+ that.options.showHeader
+ ? sprintf('%s', style, getPropertyFromOther(that.columns, 'field', 'title', field))
+ : '',
+ sprintf('%s', value),
+ '
',
+ ].join('')
+ : [sprintf('
', id_, class_, style, data_, rowspan_, title_), value, ' | '].join('');
+
+ // Hide empty data on Card view when smartDisplay is set to true.
+ if (that.options.cardView && that.options.smartDisplay && value === '') {
+ text = '';
+ }
+ }
+
+ html.push(text);
+ });
+
+ if (this.options.cardView) {
+ html.push('');
+ }
+
+ html.push('
');
+ }
+
+ // show no records
+ if (!html.length) {
+ html.push(
+ '',
+ sprintf('%s | ', this.$header.find('th').length, this.options.formatNoMatches()),
+ '
'
+ );
+ }
+
+ this.$body.html(html.join(''));
+
+ if (!fixedScroll) {
+ this.scrollTo(0);
+ }
+
+ // click to select by column
+ this.$body
+ .find('> tr[data-index] > td')
+ .off('click dblclick')
+ .on('click dblclick', function (e) {
+ var $td = $(this),
+ $tr = $td.parent(),
+ item = that.data[$tr.data('index')],
+ cellIndex = $td[0].cellIndex,
+ $headerCell = that.$header.find('th:eq(' + cellIndex + ')'),
+ field = $headerCell.data('field'),
+ value = item[field];
+
+ that.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td);
+ that.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr);
+ // if click to select - then trigger the checkbox/radio click
+ if (e.type === 'click' && that.options.clickToSelect) {
+ if (that.header.clickToSelects[$tr.children().index($(this))]) {
+ var $selectItem = $tr.find(sprintf('[name="%s"]', that.options.selectItemName));
+ if ($selectItem.length) {
+ $selectItem[0].click(); // #144: .trigger('click') bug
+ }
+ }
+ }
+ });
+
+ this.$body
+ .find('> tr[data-index] > td > .detail-icon')
+ .off('click')
+ .on('click', function () {
+ var $this = $(this),
+ $tr = $this.parent().parent(),
+ index = $tr.data('index'),
+ row = data[index]; // Fix #980 Detail view, when searching, returns wrong row
+
+ // remove and update
+ if ($tr.next().is('tr.detail-view')) {
+ $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen));
+ $tr.next().remove();
+ that.trigger('collapse-row', index, row);
+ } else {
+ $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose));
+ $tr.after(
+ sprintf(
+ '%s |
',
+ $tr.find('td').length,
+ calculateObjectValue(that.options, that.options.detailFormatter, [index, row], '')
+ )
+ );
+ that.trigger('expand-row', index, row, $tr.next().find('td'));
+ }
+ that.resetView();
+ });
+
+ this.$selectItem = this.$body.find(sprintf('[name="%s"]', this.options.selectItemName));
+ this.$selectItem.off('click').on('click', function (event) {
+ event.stopImmediatePropagation();
+
+ var checked = $(this).prop('checked'),
+ row = that.data[$(this).data('index')];
+
+ row[that.header.stateField] = checked;
+
+ if (that.options.singleSelect) {
+ that.$selectItem.not(this).each(function () {
+ that.data[$(this).data('index')][that.header.stateField] = false;
+ });
+ that.$selectItem.filter(':checked').not(this).prop('checked', false);
+ }
+
+ that.updateSelected();
+ that.trigger(checked ? 'check' : 'uncheck', row);
+ });
+
+ $.each(this.header.events, function (i, events) {
+ if (!events) {
+ return;
+ }
+ // fix bug, if events is defined with namespace
+ if (typeof events === 'string') {
+ events = calculateObjectValue(null, events);
+ }
+
+ var field = that.header.fields[i],
+ fieldIndex = $.inArray(field, that.getVisibleFields());
+
+ if (that.options.detailView && !that.options.cardView) {
+ fieldIndex += 1;
+ }
+
+ for (var key in events) {
+ that.$body.find('tr').each(function () {
+ var $tr = $(this),
+ $td = $tr.find(that.options.cardView ? '.card-view' : 'td').eq(fieldIndex),
+ index = key.indexOf(' '),
+ name = key.substring(0, index),
+ el = key.substring(index + 1),
+ func = events[key];
+
+ $td
+ .find(el)
+ .off(name)
+ .on(name, function (e) {
+ var index = $tr.data('index'),
+ row = that.data[index],
+ value = row[field];
+
+ func.apply(this, [e, value, row, index]);
+ });
+ });
+ }
+ });
+
+ this.updateSelected();
+ this.resetView();
+
+ this.trigger('post-body');
+ };
+
+ BootstrapTable.prototype.initServer = function (silent, query) {
+ var that = this,
+ data = {},
+ params = {
+ pageSize: this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize,
+ pageNumber: this.options.pageNumber,
+ searchText: this.searchText,
+ sortName: this.options.sortName,
+ sortOrder: this.options.sortOrder,
+ },
+ request;
+
+ if (!this.options.url && !this.options.ajax) {
+ return;
+ }
+
+ if (this.options.queryParamsType === 'limit') {
+ params = {
+ search: params.searchText,
+ sort: params.sortName,
+ order: params.sortOrder,
+ };
+ if (this.options.pagination) {
+ params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
+ params.offset = this.options.pageSize === this.options.formatAllRows() ? 0 : this.options.pageSize * (this.options.pageNumber - 1);
+ }
+ }
+
+ if (!$.isEmptyObject(this.filterColumnsPartial)) {
+ params['filter'] = JSON.stringify(this.filterColumnsPartial, null);
+ }
+
+ data = calculateObjectValue(this.options, this.options.queryParams, [params], data);
+
+ $.extend(data, query || {});
+
+ // false to stop request
+ if (data === false) {
+ return;
+ }
+
+ if (!silent) {
+ this.$tableLoading.show();
+ }
+ request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), {
+ type: this.options.method,
+ url: this.options.url,
+ data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data,
+ cache: this.options.cache,
+ contentType: this.options.contentType,
+ dataType: this.options.dataType,
+ success: function (res) {
+ res = calculateObjectValue(that.options, that.options.responseHandler, [res], res);
+
+ that.load(res);
+ that.trigger('load-success', res);
+ },
+ error: function (res) {
+ that.trigger('load-error', res.status);
+ },
+ complete: function () {
+ if (!silent) {
+ that.$tableLoading.hide();
+ }
+ },
+ });
+
+ if (this.options.ajax) {
+ calculateObjectValue(this, this.options.ajax, [request], null);
+ } else {
+ $.ajax(request);
+ }
+ };
+
+ BootstrapTable.prototype.getCaret = function () {
+ var that = this;
+
+ $.each(this.$header.find('th'), function (i, th) {
+ $(th)
+ .find('.sortable')
+ .removeClass('desc asc')
+ .addClass($(th).data('field') === that.options.sortName ? that.options.sortOrder : 'both');
+ });
+ };
+
+ BootstrapTable.prototype.updateSelected = function () {
+ var checkAll = this.$selectItem.filter(':enabled').length === this.$selectItem.filter(':enabled').filter(':checked').length;
+
+ this.$selectAll.add(this.$selectAll_).prop('checked', checkAll);
+
+ this.$selectItem.each(function () {
+ $(this).parents('tr')[$(this).prop('checked') ? 'addClass' : 'removeClass']('selected');
+ });
+ };
+
+ BootstrapTable.prototype.updateRows = function () {
+ var that = this;
+
+ this.$selectItem.each(function () {
+ that.data[$(this).data('index')][that.header.stateField] = $(this).prop('checked');
+ });
+ };
+
+ BootstrapTable.prototype.resetRows = function () {
+ var that = this;
+
+ $.each(this.data, function (i, row) {
+ that.$selectAll.prop('checked', false);
+ that.$selectItem.prop('checked', false);
+ row[that.header.stateField] = false;
+ });
+ };
+
+ BootstrapTable.prototype.trigger = function (name) {
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ name += '.bs.table';
+ this.options[BootstrapTable.EVENTS[name]].apply(this.options, args);
+ this.$el.trigger($.Event(name), args);
+
+ this.options.onAll(name, args);
+ this.$el.trigger($.Event('all.bs.table'), [name, args]);
+ };
+
+ BootstrapTable.prototype.resetHeader = function () {
+ // fix #61: the hidden table reset header bug.
+ // fix bug: get $el.css('width') error sometime (height = 500)
+ clearTimeout(this.timeoutId_);
+ this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0);
+ };
+
+ BootstrapTable.prototype.fitHeader = function () {
+ var that = this,
+ fixedBody,
+ scrollWidth;
+
+ if (that.$el.is(':hidden')) {
+ that.timeoutId_ = setTimeout($.proxy(that.fitHeader, that), 100);
+ return;
+ }
+ fixedBody = this.$tableBody.get(0);
+
+ scrollWidth =
+ fixedBody.scrollWidth > fixedBody.clientWidth && fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight()
+ ? getScrollBarWidth()
+ : 0;
+
+ this.$el.css('margin-top', -this.$header.outerHeight());
+ this.$header_ = this.$header.clone(true, true);
+ this.$selectAll_ = this.$header_.find('[name="btSelectAll"]');
+ this.$tableHeader
+ .css({
+ 'margin-right': scrollWidth,
+ })
+ .find('table')
+ .css('width', this.$el.outerWidth())
+ .html('')
+ .attr('class', this.$el.attr('class'))
+ .append(this.$header_);
+
+ // fix bug: $.data() is not working as expected after $.append()
+ this.$header.find('th[data-field]').each(function (i) {
+ that.$header_.find(sprintf('th[data-field="%s"]', $(this).data('field'))).data($(this).data());
+ });
+
+ var visibleFields = this.getVisibleFields();
+
+ this.$body.find('tr:first-child:not(.no-records-found) > *').each(function (i) {
+ var $this = $(this),
+ index = i;
+
+ if (that.options.detailView && !that.options.cardView) {
+ if (i === 0) {
+ that.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth());
+ }
+ index = i - 1;
+ }
+
+ that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index])).find('.fht-cell').width($this.innerWidth());
+ });
+ // horizontal scroll event
+ // TODO: it's probably better improving the layout than binding to scroll event
+ this.$tableBody.off('scroll').on('scroll', function () {
+ that.$tableHeader.scrollLeft($(this).scrollLeft());
+ });
+ that.trigger('post-header');
+ };
+
+ BootstrapTable.prototype.resetFooter = function () {
+ var that = this,
+ data = that.getData(),
+ html = [];
+
+ if (!this.options.showFooter || this.options.cardView) {
+ //do nothing
+ return;
+ }
+
+ if (!this.options.cardView && this.options.detailView) {
+ html.push(' | ');
+ }
+
+ $.each(this.columns, function (i, column) {
+ var falign = '', // footer align style
+ style = '',
+ class_ = sprintf(' class="%s"', column['class']);
+
+ if (!column.visible) {
+ return;
+ }
+
+ if (that.options.cardView && !column.cardVisible) {
+ return;
+ }
+
+ falign = sprintf('text-align: %s; ', column.falign ? column.falign : column.align);
+ style = sprintf('vertical-align: %s; ', column.valign);
+
+ html.push('');
+
+ html.push(calculateObjectValue(column, column.footerFormatter, [data], ' ') || ' ');
+ html.push(' | ');
+ });
+
+ this.$tableFooter.find('tr').html(html.join(''));
+ clearTimeout(this.timeoutFooter_);
+ this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), this.$el.is(':hidden') ? 100 : 0);
+ };
+
+ BootstrapTable.prototype.fitFooter = function () {
+ var that = this,
+ $footerTd,
+ elWidth,
+ scrollWidth;
+
+ clearTimeout(this.timeoutFooter_);
+ if (this.$el.is(':hidden')) {
+ this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), 100);
+ return;
+ }
+
+ elWidth = this.$el.css('width');
+ scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0;
+
+ this.$tableFooter
+ .css({
+ 'margin-right': scrollWidth,
+ })
+ .find('table')
+ .css('width', elWidth)
+ .attr('class', this.$el.attr('class'));
+
+ $footerTd = this.$tableFooter.find('td');
+
+ this.$tableBody.find('tbody tr:first-child:not(.no-records-found) > td').each(function (i) {
+ $footerTd.eq(i).outerWidth($(this).outerWidth());
+ });
+ };
+
+ BootstrapTable.prototype.toggleColumn = function (index, checked, needUpdate) {
+ if (index === -1) {
+ return;
+ }
+ this.columns[index].visible = checked;
+ this.initHeader();
+ this.initSearch();
+ this.initPagination();
+ this.initBody();
+
+ if (this.options.showColumns) {
+ var $items = this.$toolbar.find('.keep-open input').prop('disabled', false);
+
+ if (needUpdate) {
+ $items.filter(sprintf('[value="%s"]', index)).prop('checked', checked);
+ }
+
+ if ($items.filter(':checked').length <= this.options.minimumCountColumns) {
+ $items.filter(':checked').prop('disabled', true);
+ }
+ }
+ };
+
+ BootstrapTable.prototype.toggleRow = function (index, isIdField, visible) {
+ if (index === -1) {
+ return;
+ }
+
+ $(this.$body[0])
+ .children()
+ .filter(sprintf(isIdField ? '[data-uniqueid="%s"]' : '[data-index="%s"]', index))
+ [visible ? 'show' : 'hide']();
+ };
+
+ BootstrapTable.prototype.getVisibleFields = function () {
+ var that = this,
+ visibleFields = [];
+
+ $.each(this.header.fields, function (j, field) {
+ var column = that.columns[getFieldIndex(that.columns, field)];
+
+ if (!column.visible) {
+ return;
+ }
+ visibleFields.push(field);
+ });
+ return visibleFields;
+ };
+
+ // PUBLIC FUNCTION DEFINITION
+ // =======================
+
+ BootstrapTable.prototype.resetView = function (params) {
+ var padding = 0;
+
+ if (params && params.height) {
+ this.options.height = params.height;
+ }
+
+ this.$selectAll.prop('checked', this.$selectItem.length > 0 && this.$selectItem.length === this.$selectItem.filter(':checked').length);
+
+ if (this.options.height) {
+ var toolbarHeight = getRealHeight(this.$toolbar),
+ paginationHeight = getRealHeight(this.$pagination),
+ height = this.options.height - toolbarHeight - paginationHeight;
+
+ this.$tableContainer.css('height', height + 'px');
+ }
+
+ if (this.options.cardView) {
+ // remove the element css
+ this.$el.css('margin-top', '0');
+ this.$tableContainer.css('padding-bottom', '0');
+ return;
+ }
+
+ if (this.options.showHeader && this.options.height) {
+ this.$tableHeader.show();
+ this.resetHeader();
+ padding += this.$header.outerHeight();
+ } else {
+ this.$tableHeader.hide();
+ this.trigger('post-header');
+ }
+
+ if (this.options.showFooter) {
+ this.resetFooter();
+ if (this.options.height) {
+ padding += this.$tableFooter.outerHeight();
+ }
+ }
+
+ // Assign the correct sortable arrow
+ this.getCaret();
+ this.$tableContainer.css('padding-bottom', padding + 'px');
+ this.trigger('reset-view');
+ };
+
+ BootstrapTable.prototype.getData = function (useCurrentPage) {
+ return this.searchText || !$.isEmptyObject(this.filterColumns) || !$.isEmptyObject(this.filterColumnsPartial)
+ ? useCurrentPage
+ ? this.data.slice(this.pageFrom - 1, this.pageTo)
+ : this.data
+ : useCurrentPage
+ ? this.options.data.slice(this.pageFrom - 1, this.pageTo)
+ : this.options.data;
+ };
+
+ BootstrapTable.prototype.load = function (data) {
+ var fixedScroll = false;
+
+ // #431: support pagination
+ if (this.options.sidePagination === 'server') {
+ this.options.totalRows = data.total;
+ fixedScroll = data.fixedScroll;
+ data = data.rows;
+ } else if (!$.isArray(data)) {
+ // support fixedScroll
+ fixedScroll = data.fixedScroll;
+ data = data.data;
+ }
+
+ this.initData(data);
+ this.initSearch();
+ this.initPagination();
+ this.initBody(fixedScroll);
+ };
+
+ BootstrapTable.prototype.append = function (data) {
+ this.initData(data, 'append');
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.prepend = function (data) {
+ this.initData(data, 'prepend');
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.remove = function (params) {
+ var len = this.options.data.length,
+ i,
+ row;
+
+ if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) {
+ return;
+ }
+
+ for (i = len - 1; i >= 0; i--) {
+ row = this.options.data[i];
+
+ if (!row.hasOwnProperty(params.field)) {
+ continue;
+ }
+ if ($.inArray(row[params.field], params.values) !== -1) {
+ this.options.data.splice(i, 1);
+ }
+ }
+
+ if (len === this.options.data.length) {
+ return;
+ }
+
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.removeAll = function () {
+ if (this.options.data.length > 0) {
+ this.options.data.splice(0, this.options.data.length);
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ }
+ };
+
+ BootstrapTable.prototype.getRowByUniqueId = function (id) {
+ var uniqueId = this.options.uniqueId,
+ len = this.options.data.length,
+ dataRow = undefined,
+ i,
+ row;
+
+ for (i = len - 1; i >= 0; i--) {
+ row = this.options.data[i];
+
+ if (!row.hasOwnProperty(uniqueId)) {
+ continue;
+ }
+
+ if (typeof row[uniqueId] === 'string') {
+ id = id.toString();
+ } else if (typeof row[uniqueId] === 'number') {
+ if (Number(row[uniqueId]) === row[uniqueId] && row[uniqueId] % 1 === 0) {
+ id = parseInt(id);
+ } else if (row[uniqueId] === Number(row[uniqueId]) && row[uniqueId] !== 0) {
+ id = parseFloat(id);
+ }
+ }
+
+ if (row[uniqueId] === id) {
+ dataRow = row;
+ break;
+ }
+ }
+
+ return dataRow;
+ };
+
+ BootstrapTable.prototype.removeByUniqueId = function (id) {
+ var len = this.options.data.length,
+ row = this.getRowByUniqueId(id);
+
+ if (row) {
+ this.options.data.splice(this.options.data.indexOf(row), 1);
+ }
+
+ if (len === this.options.data.length) {
+ return;
+ }
+
+ this.initSearch();
+ this.initPagination();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.insertRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
+ return;
+ }
+ this.data.splice(params.index, 0, params.row);
+ this.initSearch();
+ this.initPagination();
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.updateRow = function (params) {
+ if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) {
+ return;
+ }
+ $.extend(this.data[params.index], params.row);
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.showRow = function (params) {
+ if (!params.hasOwnProperty('index')) {
+ return;
+ }
+
+ this.toggleRow(params.index, params.isIdField === undefined ? false : true, true);
+ };
+
+ BootstrapTable.prototype.hideRow = function (params) {
+ if (!params.hasOwnProperty('index')) {
+ return;
+ }
+
+ this.toggleRow(params.index, params.isIdField === undefined ? false : true, false);
+ };
+
+ BootstrapTable.prototype.getRowsHidden = function (show) {
+ var rows = $(this.$body[0]).children().filter(':hidden'),
+ i = 0;
+ if (show) {
+ for (; i < rows.length; i++) {
+ $(rows[i]).show();
+ }
+ }
+ return rows;
+ };
+
+ BootstrapTable.prototype.mergeCells = function (options) {
+ var row = options.index,
+ col = $.inArray(options.field, this.getVisibleFields()),
+ rowspan = options.rowspan || 1,
+ colspan = options.colspan || 1,
+ i,
+ j,
+ $tr = this.$body.find('tr'),
+ $td;
+
+ if (this.options.detailView && !this.options.cardView) {
+ col += 1;
+ }
+
+ $td = $tr.eq(row).find('td').eq(col);
+
+ if (row < 0 || col < 0 || row >= this.data.length) {
+ return;
+ }
+
+ for (i = row; i < row + rowspan; i++) {
+ for (j = col; j < col + colspan; j++) {
+ $tr.eq(i).find('td').eq(j).hide();
+ }
+ }
+
+ $td.attr('rowspan', rowspan).attr('colspan', colspan).show();
+ };
+
+ BootstrapTable.prototype.updateCell = function (params) {
+ if (!params.hasOwnProperty('rowIndex') || !params.hasOwnProperty('fieldName') || !params.hasOwnProperty('fieldValue')) {
+ return;
+ }
+ this.data[params.rowIndex][params.fieldName] = params.fieldValue;
+ this.initSort();
+ this.initBody(true);
+ };
+
+ BootstrapTable.prototype.getOptions = function () {
+ return this.options;
+ };
+
+ BootstrapTable.prototype.getSelections = function () {
+ var that = this;
+
+ return $.grep(this.data, function (row) {
+ return row[that.header.stateField];
+ });
+ };
+
+ BootstrapTable.prototype.getAllSelections = function () {
+ var that = this;
+
+ return $.grep(this.options.data, function (row) {
+ return row[that.header.stateField];
+ });
+ };
+
+ BootstrapTable.prototype.checkAll = function () {
+ this.checkAll_(true);
+ };
+
+ BootstrapTable.prototype.uncheckAll = function () {
+ this.checkAll_(false);
+ };
+
+ BootstrapTable.prototype.checkAll_ = function (checked) {
+ var rows;
+ if (!checked) {
+ rows = this.getSelections();
+ }
+ this.$selectItem.filter(':enabled').prop('checked', checked);
+ this.updateRows();
+ this.updateSelected();
+ if (checked) {
+ rows = this.getSelections();
+ }
+ this.trigger(checked ? 'check-all' : 'uncheck-all', rows);
+ };
+
+ BootstrapTable.prototype.check = function (index) {
+ this.check_(true, index);
+ };
+
+ BootstrapTable.prototype.uncheck = function (index) {
+ this.check_(false, index);
+ };
+
+ BootstrapTable.prototype.check_ = function (checked, index) {
+ this.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
+ this.data[index][this.header.stateField] = checked;
+ this.updateSelected();
+ this.trigger(checked ? 'check' : 'uncheck', this.data[index]);
+ };
+
+ BootstrapTable.prototype.checkBy = function (obj) {
+ this.checkBy_(true, obj);
+ };
+
+ BootstrapTable.prototype.uncheckBy = function (obj) {
+ this.checkBy_(false, obj);
+ };
+
+ BootstrapTable.prototype.checkBy_ = function (checked, obj) {
+ if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) {
+ return;
+ }
+
+ var that = this,
+ rows = [];
+ $.each(this.options.data, function (index, row) {
+ if (!row.hasOwnProperty(obj.field)) {
+ return false;
+ }
+ if ($.inArray(row[obj.field], obj.values) !== -1) {
+ that.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked);
+ row[that.header.stateField] = checked;
+ rows.push(row);
+ that.trigger(checked ? 'check' : 'uncheck', row);
+ }
+ });
+ this.updateSelected();
+ this.trigger(checked ? 'check-some' : 'uncheck-some', rows);
+ };
+
+ BootstrapTable.prototype.destroy = function () {
+ this.$el.insertBefore(this.$container);
+ $(this.options.toolbar).insertBefore(this.$el);
+ this.$container.next().remove();
+ this.$container.remove();
+ this.$el
+ .html(this.$el_.html())
+ .css('margin-top', '0')
+ .attr('class', this.$el_.attr('class') || ''); // reset the class
+ };
+
+ BootstrapTable.prototype.showLoading = function () {
+ this.$tableLoading.show();
+ };
+
+ BootstrapTable.prototype.hideLoading = function () {
+ this.$tableLoading.hide();
+ };
+
+ BootstrapTable.prototype.togglePagination = function () {
+ this.options.pagination = !this.options.pagination;
+ var button = this.$toolbar.find('button[name="paginationSwitch"] i');
+ if (this.options.pagination) {
+ button.attr('class', this.options.iconsPrefix + ' ' + this.options.icons.paginationSwitchDown);
+ } else {
+ button.attr('class', this.options.iconsPrefix + ' ' + this.options.icons.paginationSwitchUp);
+ }
+ this.updatePagination();
+ };
+
+ BootstrapTable.prototype.refresh = function (params) {
+ if (params && params.url) {
+ this.options.url = params.url;
+ this.options.pageNumber = 1;
+ }
+ this.initServer(params && params.silent, params && params.query);
+ };
+
+ BootstrapTable.prototype.resetWidth = function () {
+ if (this.options.showHeader && this.options.height) {
+ this.fitHeader();
+ }
+ if (this.options.showFooter) {
+ this.fitFooter();
+ }
+ };
+
+ BootstrapTable.prototype.showColumn = function (field) {
+ this.toggleColumn(getFieldIndex(this.columns, field), true, true);
+ };
+
+ BootstrapTable.prototype.hideColumn = function (field) {
+ this.toggleColumn(getFieldIndex(this.columns, field), false, true);
+ };
+
+ BootstrapTable.prototype.getHiddenColumns = function () {
+ return $.grep(this.columns, function (column) {
+ return !column.visible;
+ });
+ };
+
+ BootstrapTable.prototype.filterBy = function (columns) {
+ this.filterColumns = $.isEmptyObject(columns) ? {} : columns;
+ this.options.pageNumber = 1;
+ this.initSearch();
+ this.updatePagination();
+ };
+
+ BootstrapTable.prototype.scrollTo = function (value) {
+ if (typeof value === 'string') {
+ value = value === 'bottom' ? this.$tableBody[0].scrollHeight : 0;
+ }
+ if (typeof value === 'number') {
+ this.$tableBody.scrollTop(value);
+ }
+ if (typeof value === 'undefined') {
+ return this.$tableBody.scrollTop();
+ }
+ };
+
+ BootstrapTable.prototype.getScrollPosition = function () {
+ return this.scrollTo();
+ };
+
+ BootstrapTable.prototype.selectPage = function (page) {
+ if (page > 0 && page <= this.options.totalPages) {
+ this.options.pageNumber = page;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.prevPage = function () {
+ if (this.options.pageNumber > 1) {
+ this.options.pageNumber--;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.nextPage = function () {
+ if (this.options.pageNumber < this.options.totalPages) {
+ this.options.pageNumber++;
+ this.updatePagination();
+ }
+ };
+
+ BootstrapTable.prototype.toggleView = function () {
+ this.options.cardView = !this.options.cardView;
+ this.initHeader();
+ // Fixed remove toolbar when click cardView button.
+ //that.initToolbar();
+ this.initBody();
+ this.trigger('toggle', this.options.cardView);
+ };
+
+ BootstrapTable.prototype.refreshOptions = function (options) {
+ //If the objects are equivalent then avoid the call of destroy / init methods
+ if (compareObjects(this.options, options, false)) {
+ return;
+ }
+ this.options = $.extend(this.options, options);
+ this.trigger('refresh-options', this.options);
+ this.destroy();
+ this.init();
+ };
+
+ // BOOTSTRAP TABLE PLUGIN DEFINITION
+ // =======================
+
+ var allowedMethods = [
+ 'getOptions',
+ 'getSelections',
+ 'getAllSelections',
+ 'getData',
+ 'load',
+ 'append',
+ 'prepend',
+ 'remove',
+ 'removeAll',
+ 'insertRow',
+ 'updateRow',
+ 'updateCell',
+ 'removeByUniqueId',
+ 'getRowByUniqueId',
+ 'showRow',
+ 'hideRow',
+ 'getRowsHidden',
+ 'mergeCells',
+ 'checkAll',
+ 'uncheckAll',
+ 'check',
+ 'uncheck',
+ 'checkBy',
+ 'uncheckBy',
+ 'refresh',
+ 'resetView',
+ 'resetWidth',
+ 'destroy',
+ 'showLoading',
+ 'hideLoading',
+ 'showColumn',
+ 'hideColumn',
+ 'getHiddenColumns',
+ 'filterBy',
+ 'scrollTo',
+ 'getScrollPosition',
+ 'selectPage',
+ 'prevPage',
+ 'nextPage',
+ 'togglePagination',
+ 'toggleView',
+ 'refreshOptions',
+ ];
+
+ $.fn.bootstrapTable = function (option) {
+ var value,
+ args = Array.prototype.slice.call(arguments, 1);
+
+ this.each(function () {
+ var $this = $(this),
+ data = $this.data('bootstrap.table'),
+ options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(), typeof option === 'object' && option);
+
+ if (typeof option === 'string') {
+ if ($.inArray(option, allowedMethods) < 0) {
+ throw new Error('Unknown method: ' + option);
+ }
+
+ if (!data) {
+ return;
+ }
+
+ value = data[option].apply(data, args);
+
+ if (option === 'destroy') {
+ $this.removeData('bootstrap.table');
+ }
+ }
+
+ if (!data) {
+ $this.data('bootstrap.table', (data = new BootstrapTable(this, options)));
+ }
+ });
+
+ return typeof value === 'undefined' ? this : value;
+ };
+
+ $.fn.bootstrapTable.Constructor = BootstrapTable;
+ $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS;
+ $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS;
+ $.fn.bootstrapTable.locales = BootstrapTable.LOCALES;
+ $.fn.bootstrapTable.methods = allowedMethods;
+
+ // BOOTSTRAP TABLE INIT
+ // =======================
+
+ $(function () {
+ $('[data-toggle="table"]').bootstrapTable();
+ });
+})(jQuery);
diff --git a/src/main/webapp/content/js/bootstrap.min.js b/src/main/webapp/content/js/bootstrap.min.js
new file mode 100644
index 0000000..3a3d346
--- /dev/null
+++ b/src/main/webapp/content/js/bootstrap.min.js
@@ -0,0 +1,1329 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if ('undefined' == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");
++(function (a) {
+ 'use strict';
+ var b = a.fn.jquery.split(' ')[0].split('.');
+ if ((b[0] < 2 && b[1] < 9) || (1 == b[0] && 9 == b[1] && b[2] < 1) || b[0] > 3)
+ throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");
+})(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b() {
+ var a = document.createElement('bootstrap'),
+ b = {
+ WebkitTransition: 'webkitTransitionEnd',
+ MozTransition: 'transitionend',
+ OTransition: 'oTransitionEnd otransitionend',
+ transition: 'transitionend',
+ };
+ for (var c in b) if (void 0 !== a.style[c]) return { end: b[c] };
+ return !1;
+ }
+ (a.fn.emulateTransitionEnd = function (b) {
+ var c = !1,
+ d = this;
+ a(this).one('bsTransitionEnd', function () {
+ c = !0;
+ });
+ var e = function () {
+ c || a(d).trigger(a.support.transition.end);
+ };
+ return setTimeout(e, b), this;
+ }),
+ a(function () {
+ (a.support.transition = b()),
+ a.support.transition &&
+ (a.event.special.bsTransitionEnd = {
+ bindType: a.support.transition.end,
+ delegateType: a.support.transition.end,
+ handle: function (b) {
+ if (a(b.target).is(this)) return b.handleObj.handler.apply(this, arguments);
+ },
+ });
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var c = a(this),
+ e = c.data('bs.alert');
+ e || c.data('bs.alert', (e = new d(this))), 'string' == typeof b && e[b].call(c);
+ });
+ }
+ var c = '[data-dismiss="alert"]',
+ d = function (b) {
+ a(b).on('click', c, this.close);
+ };
+ (d.VERSION = '3.3.7'),
+ (d.TRANSITION_DURATION = 150),
+ (d.prototype.close = function (b) {
+ function c() {
+ g.detach().trigger('closed.bs.alert').remove();
+ }
+ var e = a(this),
+ f = e.attr('data-target');
+ f || ((f = e.attr('href')), (f = f && f.replace(/.*(?=#[^\s]*$)/, '')));
+ var g = a('#' === f ? [] : f);
+ b && b.preventDefault(),
+ g.length || (g = e.closest('.alert')),
+ g.trigger((b = a.Event('close.bs.alert'))),
+ b.isDefaultPrevented() ||
+ (g.removeClass('in'),
+ a.support.transition && g.hasClass('fade') ? g.one('bsTransitionEnd', c).emulateTransitionEnd(d.TRANSITION_DURATION) : c());
+ });
+ var e = a.fn.alert;
+ (a.fn.alert = b),
+ (a.fn.alert.Constructor = d),
+ (a.fn.alert.noConflict = function () {
+ return (a.fn.alert = e), this;
+ }),
+ a(document).on('click.bs.alert.data-api', c, d.prototype.close);
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.button'),
+ f = 'object' == typeof b && b;
+ e || d.data('bs.button', (e = new c(this, f))), 'toggle' == b ? e.toggle() : b && e.setState(b);
+ });
+ }
+ var c = function (b, d) {
+ (this.$element = a(b)), (this.options = a.extend({}, c.DEFAULTS, d)), (this.isLoading = !1);
+ };
+ (c.VERSION = '3.3.7'),
+ (c.DEFAULTS = { loadingText: 'loading...' }),
+ (c.prototype.setState = function (b) {
+ var c = 'disabled',
+ d = this.$element,
+ e = d.is('input') ? 'val' : 'html',
+ f = d.data();
+ (b += 'Text'),
+ null == f.resetText && d.data('resetText', d[e]()),
+ setTimeout(
+ a.proxy(function () {
+ d[e](null == f[b] ? this.options[b] : f[b]),
+ 'loadingText' == b
+ ? ((this.isLoading = !0), d.addClass(c).attr(c, c).prop(c, !0))
+ : this.isLoading && ((this.isLoading = !1), d.removeClass(c).removeAttr(c).prop(c, !1));
+ }, this),
+ 0
+ );
+ }),
+ (c.prototype.toggle = function () {
+ var a = !0,
+ b = this.$element.closest('[data-toggle="buttons"]');
+ if (b.length) {
+ var c = this.$element.find('input');
+ 'radio' == c.prop('type')
+ ? (c.prop('checked') && (a = !1), b.find('.active').removeClass('active'), this.$element.addClass('active'))
+ : 'checkbox' == c.prop('type') &&
+ (c.prop('checked') !== this.$element.hasClass('active') && (a = !1), this.$element.toggleClass('active')),
+ c.prop('checked', this.$element.hasClass('active')),
+ a && c.trigger('change');
+ } else this.$element.attr('aria-pressed', !this.$element.hasClass('active')), this.$element.toggleClass('active');
+ });
+ var d = a.fn.button;
+ (a.fn.button = b),
+ (a.fn.button.Constructor = c),
+ (a.fn.button.noConflict = function () {
+ return (a.fn.button = d), this;
+ }),
+ a(document)
+ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (c) {
+ var d = a(c.target).closest('.btn');
+ b.call(d, 'toggle'),
+ a(c.target).is('input[type="radio"], input[type="checkbox"]') ||
+ (c.preventDefault(),
+ d.is('input,button') ? d.trigger('focus') : d.find('input:visible,button:visible').first().trigger('focus'));
+ })
+ .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (b) {
+ a(b.target)
+ .closest('.btn')
+ .toggleClass('focus', /^focus(in)?$/.test(b.type));
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.carousel'),
+ f = a.extend({}, c.DEFAULTS, d.data(), 'object' == typeof b && b),
+ g = 'string' == typeof b ? b : f.slide;
+ e || d.data('bs.carousel', (e = new c(this, f))), 'number' == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle();
+ });
+ }
+ var c = function (b, c) {
+ (this.$element = a(b)),
+ (this.$indicators = this.$element.find('.carousel-indicators')),
+ (this.options = c),
+ (this.paused = null),
+ (this.sliding = null),
+ (this.interval = null),
+ (this.$active = null),
+ (this.$items = null),
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', a.proxy(this.keydown, this)),
+ 'hover' == this.options.pause &&
+ !('ontouchstart' in document.documentElement) &&
+ this.$element.on('mouseenter.bs.carousel', a.proxy(this.pause, this)).on('mouseleave.bs.carousel', a.proxy(this.cycle, this));
+ };
+ (c.VERSION = '3.3.7'),
+ (c.TRANSITION_DURATION = 600),
+ (c.DEFAULTS = { interval: 5e3, pause: 'hover', wrap: !0, keyboard: !0 }),
+ (c.prototype.keydown = function (a) {
+ if (!/input|textarea/i.test(a.target.tagName)) {
+ switch (a.which) {
+ case 37:
+ this.prev();
+ break;
+ case 39:
+ this.next();
+ break;
+ default:
+ return;
+ }
+ a.preventDefault();
+ }
+ }),
+ (c.prototype.cycle = function (b) {
+ return (
+ b || (this.paused = !1),
+ this.interval && clearInterval(this.interval),
+ this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)),
+ this
+ );
+ }),
+ (c.prototype.getItemIndex = function (a) {
+ return (this.$items = a.parent().children('.item')), this.$items.index(a || this.$active);
+ }),
+ (c.prototype.getItemForDirection = function (a, b) {
+ var c = this.getItemIndex(b),
+ d = ('prev' == a && 0 === c) || ('next' == a && c == this.$items.length - 1);
+ if (d && !this.options.wrap) return b;
+ var e = 'prev' == a ? -1 : 1,
+ f = (c + e) % this.$items.length;
+ return this.$items.eq(f);
+ }),
+ (c.prototype.to = function (a) {
+ var b = this,
+ c = this.getItemIndex((this.$active = this.$element.find('.item.active')));
+ if (!(a > this.$items.length - 1 || a < 0))
+ return this.sliding
+ ? this.$element.one('slid.bs.carousel', function () {
+ b.to(a);
+ })
+ : c == a
+ ? this.pause().cycle()
+ : this.slide(a > c ? 'next' : 'prev', this.$items.eq(a));
+ }),
+ (c.prototype.pause = function (b) {
+ return (
+ b || (this.paused = !0),
+ this.$element.find('.next, .prev').length &&
+ a.support.transition &&
+ (this.$element.trigger(a.support.transition.end), this.cycle(!0)),
+ (this.interval = clearInterval(this.interval)),
+ this
+ );
+ }),
+ (c.prototype.next = function () {
+ if (!this.sliding) return this.slide('next');
+ }),
+ (c.prototype.prev = function () {
+ if (!this.sliding) return this.slide('prev');
+ }),
+ (c.prototype.slide = function (b, d) {
+ var e = this.$element.find('.item.active'),
+ f = d || this.getItemForDirection(b, e),
+ g = this.interval,
+ h = 'next' == b ? 'left' : 'right',
+ i = this;
+ if (f.hasClass('active')) return (this.sliding = !1);
+ var j = f[0],
+ k = a.Event('slide.bs.carousel', { relatedTarget: j, direction: h });
+ if ((this.$element.trigger(k), !k.isDefaultPrevented())) {
+ if (((this.sliding = !0), g && this.pause(), this.$indicators.length)) {
+ this.$indicators.find('.active').removeClass('active');
+ var l = a(this.$indicators.children()[this.getItemIndex(f)]);
+ l && l.addClass('active');
+ }
+ var m = a.Event('slid.bs.carousel', { relatedTarget: j, direction: h });
+ return (
+ a.support.transition && this.$element.hasClass('slide')
+ ? (f.addClass(b),
+ f[0].offsetWidth,
+ e.addClass(h),
+ f.addClass(h),
+ e
+ .one('bsTransitionEnd', function () {
+ f.removeClass([b, h].join(' ')).addClass('active'),
+ e.removeClass(['active', h].join(' ')),
+ (i.sliding = !1),
+ setTimeout(function () {
+ i.$element.trigger(m);
+ }, 0);
+ })
+ .emulateTransitionEnd(c.TRANSITION_DURATION))
+ : (e.removeClass('active'), f.addClass('active'), (this.sliding = !1), this.$element.trigger(m)),
+ g && this.cycle(),
+ this
+ );
+ }
+ });
+ var d = a.fn.carousel;
+ (a.fn.carousel = b),
+ (a.fn.carousel.Constructor = c),
+ (a.fn.carousel.noConflict = function () {
+ return (a.fn.carousel = d), this;
+ });
+ var e = function (c) {
+ var d,
+ e = a(this),
+ f = a(e.attr('data-target') || ((d = e.attr('href')) && d.replace(/.*(?=#[^\s]+$)/, '')));
+ if (f.hasClass('carousel')) {
+ var g = a.extend({}, f.data(), e.data()),
+ h = e.attr('data-slide-to');
+ h && (g.interval = !1), b.call(f, g), h && f.data('bs.carousel').to(h), c.preventDefault();
+ }
+ };
+ a(document).on('click.bs.carousel.data-api', '[data-slide]', e).on('click.bs.carousel.data-api', '[data-slide-to]', e),
+ a(window).on('load', function () {
+ a('[data-ride="carousel"]').each(function () {
+ var c = a(this);
+ b.call(c, c.data());
+ });
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ var c,
+ d = b.attr('data-target') || ((c = b.attr('href')) && c.replace(/.*(?=#[^\s]+$)/, ''));
+ return a(d);
+ }
+ function c(b) {
+ return this.each(function () {
+ var c = a(this),
+ e = c.data('bs.collapse'),
+ f = a.extend({}, d.DEFAULTS, c.data(), 'object' == typeof b && b);
+ !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1),
+ e || c.data('bs.collapse', (e = new d(this, f))),
+ 'string' == typeof b && e[b]();
+ });
+ }
+ var d = function (b, c) {
+ (this.$element = a(b)),
+ (this.options = a.extend({}, d.DEFAULTS, c)),
+ (this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]')),
+ (this.transitioning = null),
+ this.options.parent ? (this.$parent = this.getParent()) : this.addAriaAndCollapsedClass(this.$element, this.$trigger),
+ this.options.toggle && this.toggle();
+ };
+ (d.VERSION = '3.3.7'),
+ (d.TRANSITION_DURATION = 350),
+ (d.DEFAULTS = { toggle: !0 }),
+ (d.prototype.dimension = function () {
+ var a = this.$element.hasClass('width');
+ return a ? 'width' : 'height';
+ }),
+ (d.prototype.show = function () {
+ if (!this.transitioning && !this.$element.hasClass('in')) {
+ var b,
+ e = this.$parent && this.$parent.children('.panel').children('.in, .collapsing');
+ if (!(e && e.length && ((b = e.data('bs.collapse')), b && b.transitioning))) {
+ var f = a.Event('show.bs.collapse');
+ if ((this.$element.trigger(f), !f.isDefaultPrevented())) {
+ e && e.length && (c.call(e, 'hide'), b || e.data('bs.collapse', null));
+ var g = this.dimension();
+ this.$element.removeClass('collapse').addClass('collapsing')[g](0).attr('aria-expanded', !0),
+ this.$trigger.removeClass('collapsed').attr('aria-expanded', !0),
+ (this.transitioning = 1);
+ var h = function () {
+ this.$element.removeClass('collapsing').addClass('collapse in')[g](''),
+ (this.transitioning = 0),
+ this.$element.trigger('shown.bs.collapse');
+ };
+ if (!a.support.transition) return h.call(this);
+ var i = a.camelCase(['scroll', g].join('-'));
+ this.$element.one('bsTransitionEnd', a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i]);
+ }
+ }
+ }
+ }),
+ (d.prototype.hide = function () {
+ if (!this.transitioning && this.$element.hasClass('in')) {
+ var b = a.Event('hide.bs.collapse');
+ if ((this.$element.trigger(b), !b.isDefaultPrevented())) {
+ var c = this.dimension();
+ this.$element[c](this.$element[c]())[0].offsetHeight,
+ this.$element.addClass('collapsing').removeClass('collapse in').attr('aria-expanded', !1),
+ this.$trigger.addClass('collapsed').attr('aria-expanded', !1),
+ (this.transitioning = 1);
+ var e = function () {
+ (this.transitioning = 0), this.$element.removeClass('collapsing').addClass('collapse').trigger('hidden.bs.collapse');
+ };
+ return a.support.transition
+ ? void this.$element[c](0).one('bsTransitionEnd', a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION)
+ : e.call(this);
+ }
+ }
+ }),
+ (d.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']();
+ }),
+ (d.prototype.getParent = function () {
+ return a(this.options.parent)
+ .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
+ .each(
+ a.proxy(function (c, d) {
+ var e = a(d);
+ this.addAriaAndCollapsedClass(b(e), e);
+ }, this)
+ )
+ .end();
+ }),
+ (d.prototype.addAriaAndCollapsedClass = function (a, b) {
+ var c = a.hasClass('in');
+ a.attr('aria-expanded', c), b.toggleClass('collapsed', !c).attr('aria-expanded', c);
+ });
+ var e = a.fn.collapse;
+ (a.fn.collapse = c),
+ (a.fn.collapse.Constructor = d),
+ (a.fn.collapse.noConflict = function () {
+ return (a.fn.collapse = e), this;
+ }),
+ a(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (d) {
+ var e = a(this);
+ e.attr('data-target') || d.preventDefault();
+ var f = b(e),
+ g = f.data('bs.collapse'),
+ h = g ? 'toggle' : e.data();
+ c.call(f, h);
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ var c = b.attr('data-target');
+ c || ((c = b.attr('href')), (c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, '')));
+ var d = c && a(c);
+ return d && d.length ? d : b.parent();
+ }
+ function c(c) {
+ (c && 3 === c.which) ||
+ (a(e).remove(),
+ a(f).each(function () {
+ var d = a(this),
+ e = b(d),
+ f = { relatedTarget: this };
+ e.hasClass('open') &&
+ ((c && 'click' == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target)) ||
+ (e.trigger((c = a.Event('hide.bs.dropdown', f))),
+ c.isDefaultPrevented() ||
+ (d.attr('aria-expanded', 'false'), e.removeClass('open').trigger(a.Event('hidden.bs.dropdown', f)))));
+ }));
+ }
+ function d(b) {
+ return this.each(function () {
+ var c = a(this),
+ d = c.data('bs.dropdown');
+ d || c.data('bs.dropdown', (d = new g(this))), 'string' == typeof b && d[b].call(c);
+ });
+ }
+ var e = '.dropdown-backdrop',
+ f = '[data-toggle="dropdown"]',
+ g = function (b) {
+ a(b).on('click.bs.dropdown', this.toggle);
+ };
+ (g.VERSION = '3.3.7'),
+ (g.prototype.toggle = function (d) {
+ var e = a(this);
+ if (!e.is('.disabled, :disabled')) {
+ var f = b(e),
+ g = f.hasClass('open');
+ if ((c(), !g)) {
+ 'ontouchstart' in document.documentElement &&
+ !f.closest('.navbar-nav').length &&
+ a(document.createElement('div')).addClass('dropdown-backdrop').insertAfter(a(this)).on('click', c);
+ var h = { relatedTarget: this };
+ if ((f.trigger((d = a.Event('show.bs.dropdown', h))), d.isDefaultPrevented())) return;
+ e.trigger('focus').attr('aria-expanded', 'true'), f.toggleClass('open').trigger(a.Event('shown.bs.dropdown', h));
+ }
+ return !1;
+ }
+ }),
+ (g.prototype.keydown = function (c) {
+ if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
+ var d = a(this);
+ if ((c.preventDefault(), c.stopPropagation(), !d.is('.disabled, :disabled'))) {
+ var e = b(d),
+ g = e.hasClass('open');
+ if ((!g && 27 != c.which) || (g && 27 == c.which)) return 27 == c.which && e.find(f).trigger('focus'), d.trigger('click');
+ var h = ' li:not(.disabled):visible a',
+ i = e.find('.dropdown-menu' + h);
+ if (i.length) {
+ var j = i.index(c.target);
+ 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger('focus');
+ }
+ }
+ }
+ });
+ var h = a.fn.dropdown;
+ (a.fn.dropdown = d),
+ (a.fn.dropdown.Constructor = g),
+ (a.fn.dropdown.noConflict = function () {
+ return (a.fn.dropdown = h), this;
+ }),
+ a(document)
+ .on('click.bs.dropdown.data-api', c)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (a) {
+ a.stopPropagation();
+ })
+ .on('click.bs.dropdown.data-api', f, g.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', f, g.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', g.prototype.keydown);
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b, d) {
+ return this.each(function () {
+ var e = a(this),
+ f = e.data('bs.modal'),
+ g = a.extend({}, c.DEFAULTS, e.data(), 'object' == typeof b && b);
+ f || e.data('bs.modal', (f = new c(this, g))), 'string' == typeof b ? f[b](d) : g.show && f.show(d);
+ });
+ }
+ var c = function (b, c) {
+ (this.options = c),
+ (this.$body = a(document.body)),
+ (this.$element = a(b)),
+ (this.$dialog = this.$element.find('.modal-dialog')),
+ (this.$backdrop = null),
+ (this.isShown = null),
+ (this.originalBodyPad = null),
+ (this.scrollbarWidth = 0),
+ (this.ignoreBackdropClick = !1),
+ this.options.remote &&
+ this.$element.find('.modal-content').load(
+ this.options.remote,
+ a.proxy(function () {
+ this.$element.trigger('loaded.bs.modal');
+ }, this)
+ );
+ };
+ (c.VERSION = '3.3.7'),
+ (c.TRANSITION_DURATION = 300),
+ (c.BACKDROP_TRANSITION_DURATION = 150),
+ (c.DEFAULTS = { backdrop: !0, keyboard: !0, show: !0 }),
+ (c.prototype.toggle = function (a) {
+ return this.isShown ? this.hide() : this.show(a);
+ }),
+ (c.prototype.show = function (b) {
+ var d = this,
+ e = a.Event('show.bs.modal', { relatedTarget: b });
+ this.$element.trigger(e),
+ this.isShown ||
+ e.isDefaultPrevented() ||
+ ((this.isShown = !0),
+ this.checkScrollbar(),
+ this.setScrollbar(),
+ this.$body.addClass('modal-open'),
+ this.escape(),
+ this.resize(),
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', a.proxy(this.hide, this)),
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
+ d.$element.one('mouseup.dismiss.bs.modal', function (b) {
+ a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0);
+ });
+ }),
+ this.backdrop(function () {
+ var e = a.support.transition && d.$element.hasClass('fade');
+ d.$element.parent().length || d.$element.appendTo(d.$body),
+ d.$element.show().scrollTop(0),
+ d.adjustDialog(),
+ e && d.$element[0].offsetWidth,
+ d.$element.addClass('in'),
+ d.enforceFocus();
+ var f = a.Event('shown.bs.modal', { relatedTarget: b });
+ e
+ ? d.$dialog
+ .one('bsTransitionEnd', function () {
+ d.$element.trigger('focus').trigger(f);
+ })
+ .emulateTransitionEnd(c.TRANSITION_DURATION)
+ : d.$element.trigger('focus').trigger(f);
+ }));
+ }),
+ (c.prototype.hide = function (b) {
+ b && b.preventDefault(),
+ (b = a.Event('hide.bs.modal')),
+ this.$element.trigger(b),
+ this.isShown &&
+ !b.isDefaultPrevented() &&
+ ((this.isShown = !1),
+ this.escape(),
+ this.resize(),
+ a(document).off('focusin.bs.modal'),
+ this.$element.removeClass('in').off('click.dismiss.bs.modal').off('mouseup.dismiss.bs.modal'),
+ this.$dialog.off('mousedown.dismiss.bs.modal'),
+ a.support.transition && this.$element.hasClass('fade')
+ ? this.$element.one('bsTransitionEnd', a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION)
+ : this.hideModal());
+ }),
+ (c.prototype.enforceFocus = function () {
+ a(document)
+ .off('focusin.bs.modal')
+ .on(
+ 'focusin.bs.modal',
+ a.proxy(function (a) {
+ document === a.target ||
+ this.$element[0] === a.target ||
+ this.$element.has(a.target).length ||
+ this.$element.trigger('focus');
+ }, this)
+ );
+ }),
+ (c.prototype.escape = function () {
+ this.isShown && this.options.keyboard
+ ? this.$element.on(
+ 'keydown.dismiss.bs.modal',
+ a.proxy(function (a) {
+ 27 == a.which && this.hide();
+ }, this)
+ )
+ : this.isShown || this.$element.off('keydown.dismiss.bs.modal');
+ }),
+ (c.prototype.resize = function () {
+ this.isShown ? a(window).on('resize.bs.modal', a.proxy(this.handleUpdate, this)) : a(window).off('resize.bs.modal');
+ }),
+ (c.prototype.hideModal = function () {
+ var a = this;
+ this.$element.hide(),
+ this.backdrop(function () {
+ a.$body.removeClass('modal-open'), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger('hidden.bs.modal');
+ });
+ }),
+ (c.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove(), (this.$backdrop = null);
+ }),
+ (c.prototype.backdrop = function (b) {
+ var d = this,
+ e = this.$element.hasClass('fade') ? 'fade' : '';
+ if (this.isShown && this.options.backdrop) {
+ var f = a.support.transition && e;
+ if (
+ ((this.$backdrop = a(document.createElement('div'))
+ .addClass('modal-backdrop ' + e)
+ .appendTo(this.$body)),
+ this.$element.on(
+ 'click.dismiss.bs.modal',
+ a.proxy(function (a) {
+ return this.ignoreBackdropClick
+ ? void (this.ignoreBackdropClick = !1)
+ : void (a.target === a.currentTarget && ('static' == this.options.backdrop ? this.$element[0].focus() : this.hide()));
+ }, this)
+ ),
+ f && this.$backdrop[0].offsetWidth,
+ this.$backdrop.addClass('in'),
+ !b)
+ )
+ return;
+ f ? this.$backdrop.one('bsTransitionEnd', b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b();
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in');
+ var g = function () {
+ d.removeBackdrop(), b && b();
+ };
+ a.support.transition && this.$element.hasClass('fade')
+ ? this.$backdrop.one('bsTransitionEnd', g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION)
+ : g();
+ } else b && b();
+ }),
+ (c.prototype.handleUpdate = function () {
+ this.adjustDialog();
+ }),
+ (c.prototype.adjustDialog = function () {
+ var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
+ this.$element.css({
+ paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : '',
+ paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : '',
+ });
+ }),
+ (c.prototype.resetAdjustments = function () {
+ this.$element.css({ paddingLeft: '', paddingRight: '' });
+ }),
+ (c.prototype.checkScrollbar = function () {
+ var a = window.innerWidth;
+ if (!a) {
+ var b = document.documentElement.getBoundingClientRect();
+ a = b.right - Math.abs(b.left);
+ }
+ (this.bodyIsOverflowing = document.body.clientWidth < a), (this.scrollbarWidth = this.measureScrollbar());
+ }),
+ (c.prototype.setScrollbar = function () {
+ var a = parseInt(this.$body.css('padding-right') || 0, 10);
+ (this.originalBodyPad = document.body.style.paddingRight || ''),
+ this.bodyIsOverflowing && this.$body.css('padding-right', a + this.scrollbarWidth);
+ }),
+ (c.prototype.resetScrollbar = function () {
+ this.$body.css('padding-right', this.originalBodyPad);
+ }),
+ (c.prototype.measureScrollbar = function () {
+ var a = document.createElement('div');
+ (a.className = 'modal-scrollbar-measure'), this.$body.append(a);
+ var b = a.offsetWidth - a.clientWidth;
+ return this.$body[0].removeChild(a), b;
+ });
+ var d = a.fn.modal;
+ (a.fn.modal = b),
+ (a.fn.modal.Constructor = c),
+ (a.fn.modal.noConflict = function () {
+ return (a.fn.modal = d), this;
+ }),
+ a(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (c) {
+ var d = a(this),
+ e = d.attr('href'),
+ f = a(d.attr('data-target') || (e && e.replace(/.*(?=#[^\s]+$)/, ''))),
+ g = f.data('bs.modal') ? 'toggle' : a.extend({ remote: !/#/.test(e) && e }, f.data(), d.data());
+ d.is('a') && c.preventDefault(),
+ f.one('show.bs.modal', function (a) {
+ a.isDefaultPrevented() ||
+ f.one('hidden.bs.modal', function () {
+ d.is(':visible') && d.trigger('focus');
+ });
+ }),
+ b.call(f, g, this);
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.tooltip'),
+ f = 'object' == typeof b && b;
+ (!e && /destroy|hide/.test(b)) || (e || d.data('bs.tooltip', (e = new c(this, f))), 'string' == typeof b && e[b]());
+ });
+ }
+ var c = function (a, b) {
+ (this.type = null),
+ (this.options = null),
+ (this.enabled = null),
+ (this.timeout = null),
+ (this.hoverState = null),
+ (this.$element = null),
+ (this.inState = null),
+ this.init('tooltip', a, b);
+ };
+ (c.VERSION = '3.3.7'),
+ (c.TRANSITION_DURATION = 150),
+ (c.DEFAULTS = {
+ animation: !0,
+ placement: 'top',
+ selector: !1,
+ template: '',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: !1,
+ container: !1,
+ viewport: { selector: 'body', padding: 0 },
+ }),
+ (c.prototype.init = function (b, c, d) {
+ if (
+ ((this.enabled = !0),
+ (this.type = b),
+ (this.$element = a(c)),
+ (this.options = this.getOptions(d)),
+ (this.$viewport =
+ this.options.viewport &&
+ a(
+ a.isFunction(this.options.viewport)
+ ? this.options.viewport.call(this, this.$element)
+ : this.options.viewport.selector || this.options.viewport
+ )),
+ (this.inState = { click: !1, hover: !1, focus: !1 }),
+ this.$element[0] instanceof document.constructor && !this.options.selector)
+ )
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!');
+ for (var e = this.options.trigger.split(' '), f = e.length; f--; ) {
+ var g = e[f];
+ if ('click' == g) this.$element.on('click.' + this.type, this.options.selector, a.proxy(this.toggle, this));
+ else if ('manual' != g) {
+ var h = 'hover' == g ? 'mouseenter' : 'focusin',
+ i = 'hover' == g ? 'mouseleave' : 'focusout';
+ this.$element.on(h + '.' + this.type, this.options.selector, a.proxy(this.enter, this)),
+ this.$element.on(i + '.' + this.type, this.options.selector, a.proxy(this.leave, this));
+ }
+ }
+ this.options.selector ? (this._options = a.extend({}, this.options, { trigger: 'manual', selector: '' })) : this.fixTitle();
+ }),
+ (c.prototype.getDefaults = function () {
+ return c.DEFAULTS;
+ }),
+ (c.prototype.getOptions = function (b) {
+ return (
+ (b = a.extend({}, this.getDefaults(), this.$element.data(), b)),
+ b.delay && 'number' == typeof b.delay && (b.delay = { show: b.delay, hide: b.delay }),
+ b
+ );
+ }),
+ (c.prototype.getDelegateOptions = function () {
+ var b = {},
+ c = this.getDefaults();
+ return (
+ this._options &&
+ a.each(this._options, function (a, d) {
+ c[a] != d && (b[a] = d);
+ }),
+ b
+ );
+ }),
+ (c.prototype.enter = function (b) {
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data('bs.' + this.type);
+ return (
+ c || ((c = new this.constructor(b.currentTarget, this.getDelegateOptions())), a(b.currentTarget).data('bs.' + this.type, c)),
+ b instanceof a.Event && (c.inState['focusin' == b.type ? 'focus' : 'hover'] = !0),
+ c.tip().hasClass('in') || 'in' == c.hoverState
+ ? void (c.hoverState = 'in')
+ : (clearTimeout(c.timeout),
+ (c.hoverState = 'in'),
+ c.options.delay && c.options.delay.show
+ ? void (c.timeout = setTimeout(function () {
+ 'in' == c.hoverState && c.show();
+ }, c.options.delay.show))
+ : c.show())
+ );
+ }),
+ (c.prototype.isInStateTrue = function () {
+ for (var a in this.inState) if (this.inState[a]) return !0;
+ return !1;
+ }),
+ (c.prototype.leave = function (b) {
+ var c = b instanceof this.constructor ? b : a(b.currentTarget).data('bs.' + this.type);
+ if (
+ (c || ((c = new this.constructor(b.currentTarget, this.getDelegateOptions())), a(b.currentTarget).data('bs.' + this.type, c)),
+ b instanceof a.Event && (c.inState['focusout' == b.type ? 'focus' : 'hover'] = !1),
+ !c.isInStateTrue())
+ )
+ return (
+ clearTimeout(c.timeout),
+ (c.hoverState = 'out'),
+ c.options.delay && c.options.delay.hide
+ ? void (c.timeout = setTimeout(function () {
+ 'out' == c.hoverState && c.hide();
+ }, c.options.delay.hide))
+ : c.hide()
+ );
+ }),
+ (c.prototype.show = function () {
+ var b = a.Event('show.bs.' + this.type);
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(b);
+ var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
+ if (b.isDefaultPrevented() || !d) return;
+ var e = this,
+ f = this.tip(),
+ g = this.getUID(this.type);
+ this.setContent(), f.attr('id', g), this.$element.attr('aria-describedby', g), this.options.animation && f.addClass('fade');
+ var h =
+ 'function' == typeof this.options.placement
+ ? this.options.placement.call(this, f[0], this.$element[0])
+ : this.options.placement,
+ i = /\s?auto?\s?/i,
+ j = i.test(h);
+ j && (h = h.replace(i, '') || 'top'),
+ f
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(h)
+ .data('bs.' + this.type, this),
+ this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element),
+ this.$element.trigger('inserted.bs.' + this.type);
+ var k = this.getPosition(),
+ l = f[0].offsetWidth,
+ m = f[0].offsetHeight;
+ if (j) {
+ var n = h,
+ o = this.getPosition(this.$viewport);
+ (h =
+ 'bottom' == h && k.bottom + m > o.bottom
+ ? 'top'
+ : 'top' == h && k.top - m < o.top
+ ? 'bottom'
+ : 'right' == h && k.right + l > o.width
+ ? 'left'
+ : 'left' == h && k.left - l < o.left
+ ? 'right'
+ : h),
+ f.removeClass(n).addClass(h);
+ }
+ var p = this.getCalculatedOffset(h, k, l, m);
+ this.applyPlacement(p, h);
+ var q = function () {
+ var a = e.hoverState;
+ e.$element.trigger('shown.bs.' + e.type), (e.hoverState = null), 'out' == a && e.leave(e);
+ };
+ a.support.transition && this.$tip.hasClass('fade')
+ ? f.one('bsTransitionEnd', q).emulateTransitionEnd(c.TRANSITION_DURATION)
+ : q();
+ }
+ }),
+ (c.prototype.applyPlacement = function (b, c) {
+ var d = this.tip(),
+ e = d[0].offsetWidth,
+ f = d[0].offsetHeight,
+ g = parseInt(d.css('margin-top'), 10),
+ h = parseInt(d.css('margin-left'), 10);
+ isNaN(g) && (g = 0),
+ isNaN(h) && (h = 0),
+ (b.top += g),
+ (b.left += h),
+ a.offset.setOffset(
+ d[0],
+ a.extend(
+ {
+ using: function (a) {
+ d.css({ top: Math.round(a.top), left: Math.round(a.left) });
+ },
+ },
+ b
+ ),
+ 0
+ ),
+ d.addClass('in');
+ var i = d[0].offsetWidth,
+ j = d[0].offsetHeight;
+ 'top' == c && j != f && (b.top = b.top + f - j);
+ var k = this.getViewportAdjustedDelta(c, b, i, j);
+ k.left ? (b.left += k.left) : (b.top += k.top);
+ var l = /top|bottom/.test(c),
+ m = l ? 2 * k.left - e + i : 2 * k.top - f + j,
+ n = l ? 'offsetWidth' : 'offsetHeight';
+ d.offset(b), this.replaceArrow(m, d[0][n], l);
+ }),
+ (c.prototype.replaceArrow = function (a, b, c) {
+ this.arrow()
+ .css(c ? 'left' : 'top', 50 * (1 - a / b) + '%')
+ .css(c ? 'top' : 'left', '');
+ }),
+ (c.prototype.setContent = function () {
+ var a = this.tip(),
+ b = this.getTitle();
+ a.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](b), a.removeClass('fade in top bottom left right');
+ }),
+ (c.prototype.hide = function (b) {
+ function d() {
+ 'in' != e.hoverState && f.detach(),
+ e.$element && e.$element.removeAttr('aria-describedby').trigger('hidden.bs.' + e.type),
+ b && b();
+ }
+ var e = this,
+ f = a(this.$tip),
+ g = a.Event('hide.bs.' + this.type);
+ if ((this.$element.trigger(g), !g.isDefaultPrevented()))
+ return (
+ f.removeClass('in'),
+ a.support.transition && f.hasClass('fade') ? f.one('bsTransitionEnd', d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(),
+ (this.hoverState = null),
+ this
+ );
+ }),
+ (c.prototype.fixTitle = function () {
+ var a = this.$element;
+ (a.attr('title') || 'string' != typeof a.attr('data-original-title')) &&
+ a.attr('data-original-title', a.attr('title') || '').attr('title', '');
+ }),
+ (c.prototype.hasContent = function () {
+ return this.getTitle();
+ }),
+ (c.prototype.getPosition = function (b) {
+ b = b || this.$element;
+ var c = b[0],
+ d = 'BODY' == c.tagName,
+ e = c.getBoundingClientRect();
+ null == e.width && (e = a.extend({}, e, { width: e.right - e.left, height: e.bottom - e.top }));
+ var f = window.SVGElement && c instanceof window.SVGElement,
+ g = d ? { top: 0, left: 0 } : f ? null : b.offset(),
+ h = { scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop() },
+ i = d ? { width: a(window).width(), height: a(window).height() } : null;
+ return a.extend({}, e, h, i, g);
+ }),
+ (c.prototype.getCalculatedOffset = function (a, b, c, d) {
+ return 'bottom' == a
+ ? { top: b.top + b.height, left: b.left + b.width / 2 - c / 2 }
+ : 'top' == a
+ ? { top: b.top - d, left: b.left + b.width / 2 - c / 2 }
+ : 'left' == a
+ ? { top: b.top + b.height / 2 - d / 2, left: b.left - c }
+ : { top: b.top + b.height / 2 - d / 2, left: b.left + b.width };
+ }),
+ (c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
+ var e = { top: 0, left: 0 };
+ if (!this.$viewport) return e;
+ var f = (this.options.viewport && this.options.viewport.padding) || 0,
+ g = this.getPosition(this.$viewport);
+ if (/right|left/.test(a)) {
+ var h = b.top - f - g.scroll,
+ i = b.top + f - g.scroll + d;
+ h < g.top ? (e.top = g.top - h) : i > g.top + g.height && (e.top = g.top + g.height - i);
+ } else {
+ var j = b.left - f,
+ k = b.left + f + c;
+ j < g.left ? (e.left = g.left - j) : k > g.right && (e.left = g.left + g.width - k);
+ }
+ return e;
+ }),
+ (c.prototype.getTitle = function () {
+ var a,
+ b = this.$element,
+ c = this.options;
+ return (a = b.attr('data-original-title') || ('function' == typeof c.title ? c.title.call(b[0]) : c.title));
+ }),
+ (c.prototype.getUID = function (a) {
+ do a += ~~(1e6 * Math.random());
+ while (document.getElementById(a));
+ return a;
+ }),
+ (c.prototype.tip = function () {
+ if (!this.$tip && ((this.$tip = a(this.options.template)), 1 != this.$tip.length))
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!');
+ return this.$tip;
+ }),
+ (c.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'));
+ }),
+ (c.prototype.enable = function () {
+ this.enabled = !0;
+ }),
+ (c.prototype.disable = function () {
+ this.enabled = !1;
+ }),
+ (c.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled;
+ }),
+ (c.prototype.toggle = function (b) {
+ var c = this;
+ b &&
+ ((c = a(b.currentTarget).data('bs.' + this.type)),
+ c || ((c = new this.constructor(b.currentTarget, this.getDelegateOptions())), a(b.currentTarget).data('bs.' + this.type, c))),
+ b
+ ? ((c.inState.click = !c.inState.click), c.isInStateTrue() ? c.enter(c) : c.leave(c))
+ : c.tip().hasClass('in')
+ ? c.leave(c)
+ : c.enter(c);
+ }),
+ (c.prototype.destroy = function () {
+ var a = this;
+ clearTimeout(this.timeout),
+ this.hide(function () {
+ a.$element.off('.' + a.type).removeData('bs.' + a.type),
+ a.$tip && a.$tip.detach(),
+ (a.$tip = null),
+ (a.$arrow = null),
+ (a.$viewport = null),
+ (a.$element = null);
+ });
+ });
+ var d = a.fn.tooltip;
+ (a.fn.tooltip = b),
+ (a.fn.tooltip.Constructor = c),
+ (a.fn.tooltip.noConflict = function () {
+ return (a.fn.tooltip = d), this;
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.popover'),
+ f = 'object' == typeof b && b;
+ (!e && /destroy|hide/.test(b)) || (e || d.data('bs.popover', (e = new c(this, f))), 'string' == typeof b && e[b]());
+ });
+ }
+ var c = function (a, b) {
+ this.init('popover', a, b);
+ };
+ if (!a.fn.tooltip) throw new Error('Popover requires tooltip.js');
+ (c.VERSION = '3.3.7'),
+ (c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template:
+ '',
+ })),
+ (c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype)),
+ (c.prototype.constructor = c),
+ (c.prototype.getDefaults = function () {
+ return c.DEFAULTS;
+ }),
+ (c.prototype.setContent = function () {
+ var a = this.tip(),
+ b = this.getTitle(),
+ c = this.getContent();
+ a.find('.popover-title')[this.options.html ? 'html' : 'text'](b),
+ a.find('.popover-content').children().detach().end()[this.options.html ? ('string' == typeof c ? 'html' : 'append') : 'text'](c),
+ a.removeClass('fade top bottom left right in'),
+ a.find('.popover-title').html() || a.find('.popover-title').hide();
+ }),
+ (c.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent();
+ }),
+ (c.prototype.getContent = function () {
+ var a = this.$element,
+ b = this.options;
+ return a.attr('data-content') || ('function' == typeof b.content ? b.content.call(a[0]) : b.content);
+ }),
+ (c.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'));
+ });
+ var d = a.fn.popover;
+ (a.fn.popover = b),
+ (a.fn.popover.Constructor = c),
+ (a.fn.popover.noConflict = function () {
+ return (a.fn.popover = d), this;
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(c, d) {
+ (this.$body = a(document.body)),
+ (this.$scrollElement = a(a(c).is(document.body) ? window : c)),
+ (this.options = a.extend({}, b.DEFAULTS, d)),
+ (this.selector = (this.options.target || '') + ' .nav li > a'),
+ (this.offsets = []),
+ (this.targets = []),
+ (this.activeTarget = null),
+ (this.scrollHeight = 0),
+ this.$scrollElement.on('scroll.bs.scrollspy', a.proxy(this.process, this)),
+ this.refresh(),
+ this.process();
+ }
+ function c(c) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.scrollspy'),
+ f = 'object' == typeof c && c;
+ e || d.data('bs.scrollspy', (e = new b(this, f))), 'string' == typeof c && e[c]();
+ });
+ }
+ (b.VERSION = '3.3.7'),
+ (b.DEFAULTS = { offset: 10 }),
+ (b.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight);
+ }),
+ (b.prototype.refresh = function () {
+ var b = this,
+ c = 'offset',
+ d = 0;
+ (this.offsets = []),
+ (this.targets = []),
+ (this.scrollHeight = this.getScrollHeight()),
+ a.isWindow(this.$scrollElement[0]) || ((c = 'position'), (d = this.$scrollElement.scrollTop())),
+ this.$body
+ .find(this.selector)
+ .map(function () {
+ var b = a(this),
+ e = b.data('target') || b.attr('href'),
+ f = /^#./.test(e) && a(e);
+ return (f && f.length && f.is(':visible') && [[f[c]().top + d, e]]) || null;
+ })
+ .sort(function (a, b) {
+ return a[0] - b[0];
+ })
+ .each(function () {
+ b.offsets.push(this[0]), b.targets.push(this[1]);
+ });
+ }),
+ (b.prototype.process = function () {
+ var a,
+ b = this.$scrollElement.scrollTop() + this.options.offset,
+ c = this.getScrollHeight(),
+ d = this.options.offset + c - this.$scrollElement.height(),
+ e = this.offsets,
+ f = this.targets,
+ g = this.activeTarget;
+ if ((this.scrollHeight != c && this.refresh(), b >= d)) return g != (a = f[f.length - 1]) && this.activate(a);
+ if (g && b < e[0]) return (this.activeTarget = null), this.clear();
+ for (a = e.length; a--; ) g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a]);
+ }),
+ (b.prototype.activate = function (b) {
+ (this.activeTarget = b), this.clear();
+ var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]',
+ d = a(c).parents('li').addClass('active');
+ d.parent('.dropdown-menu').length && (d = d.closest('li.dropdown').addClass('active')), d.trigger('activate.bs.scrollspy');
+ }),
+ (b.prototype.clear = function () {
+ a(this.selector).parentsUntil(this.options.target, '.active').removeClass('active');
+ });
+ var d = a.fn.scrollspy;
+ (a.fn.scrollspy = c),
+ (a.fn.scrollspy.Constructor = b),
+ (a.fn.scrollspy.noConflict = function () {
+ return (a.fn.scrollspy = d), this;
+ }),
+ a(window).on('load.bs.scrollspy.data-api', function () {
+ a('[data-spy="scroll"]').each(function () {
+ var b = a(this);
+ c.call(b, b.data());
+ });
+ });
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.tab');
+ e || d.data('bs.tab', (e = new c(this))), 'string' == typeof b && e[b]();
+ });
+ }
+ var c = function (b) {
+ this.element = a(b);
+ };
+ (c.VERSION = '3.3.7'),
+ (c.TRANSITION_DURATION = 150),
+ (c.prototype.show = function () {
+ var b = this.element,
+ c = b.closest('ul:not(.dropdown-menu)'),
+ d = b.data('target');
+ if ((d || ((d = b.attr('href')), (d = d && d.replace(/.*(?=#[^\s]*$)/, ''))), !b.parent('li').hasClass('active'))) {
+ var e = c.find('.active:last a'),
+ f = a.Event('hide.bs.tab', { relatedTarget: b[0] }),
+ g = a.Event('show.bs.tab', { relatedTarget: e[0] });
+ if ((e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented())) {
+ var h = a(d);
+ this.activate(b.closest('li'), c),
+ this.activate(h, h.parent(), function () {
+ e.trigger({ type: 'hidden.bs.tab', relatedTarget: b[0] }), b.trigger({ type: 'shown.bs.tab', relatedTarget: e[0] });
+ });
+ }
+ }
+ }),
+ (c.prototype.activate = function (b, d, e) {
+ function f() {
+ g
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', !1),
+ b.addClass('active').find('[data-toggle="tab"]').attr('aria-expanded', !0),
+ h ? (b[0].offsetWidth, b.addClass('in')) : b.removeClass('fade'),
+ b.parent('.dropdown-menu').length &&
+ b.closest('li.dropdown').addClass('active').end().find('[data-toggle="tab"]').attr('aria-expanded', !0),
+ e && e();
+ }
+ var g = d.find('> .active'),
+ h = e && a.support.transition && ((g.length && g.hasClass('fade')) || !!d.find('> .fade').length);
+ g.length && h ? g.one('bsTransitionEnd', f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass('in');
+ });
+ var d = a.fn.tab;
+ (a.fn.tab = b),
+ (a.fn.tab.Constructor = c),
+ (a.fn.tab.noConflict = function () {
+ return (a.fn.tab = d), this;
+ });
+ var e = function (c) {
+ c.preventDefault(), b.call(a(this), 'show');
+ };
+ a(document).on('click.bs.tab.data-api', '[data-toggle="tab"]', e).on('click.bs.tab.data-api', '[data-toggle="pill"]', e);
+ })(jQuery),
+ +(function (a) {
+ 'use strict';
+ function b(b) {
+ return this.each(function () {
+ var d = a(this),
+ e = d.data('bs.affix'),
+ f = 'object' == typeof b && b;
+ e || d.data('bs.affix', (e = new c(this, f))), 'string' == typeof b && e[b]();
+ });
+ }
+ var c = function (b, d) {
+ (this.options = a.extend({}, c.DEFAULTS, d)),
+ (this.$target = a(this.options.target)
+ .on('scroll.bs.affix.data-api', a.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', a.proxy(this.checkPositionWithEventLoop, this))),
+ (this.$element = a(b)),
+ (this.affixed = null),
+ (this.unpin = null),
+ (this.pinnedOffset = null),
+ this.checkPosition();
+ };
+ (c.VERSION = '3.3.7'),
+ (c.RESET = 'affix affix-top affix-bottom'),
+ (c.DEFAULTS = { offset: 0, target: window }),
+ (c.prototype.getState = function (a, b, c, d) {
+ var e = this.$target.scrollTop(),
+ f = this.$element.offset(),
+ g = this.$target.height();
+ if (null != c && 'top' == this.affixed) return e < c && 'top';
+ if ('bottom' == this.affixed) return null != c ? !(e + this.unpin <= f.top) && 'bottom' : !(e + g <= a - d) && 'bottom';
+ var h = null == this.affixed,
+ i = h ? e : f.top,
+ j = h ? g : b;
+ return null != c && e <= c ? 'top' : null != d && i + j >= a - d && 'bottom';
+ }),
+ (c.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset;
+ this.$element.removeClass(c.RESET).addClass('affix');
+ var a = this.$target.scrollTop(),
+ b = this.$element.offset();
+ return (this.pinnedOffset = b.top - a);
+ }),
+ (c.prototype.checkPositionWithEventLoop = function () {
+ setTimeout(a.proxy(this.checkPosition, this), 1);
+ }),
+ (c.prototype.checkPosition = function () {
+ if (this.$element.is(':visible')) {
+ var b = this.$element.height(),
+ d = this.options.offset,
+ e = d.top,
+ f = d.bottom,
+ g = Math.max(a(document).height(), a(document.body).height());
+ 'object' != typeof d && (f = e = d),
+ 'function' == typeof e && (e = d.top(this.$element)),
+ 'function' == typeof f && (f = d.bottom(this.$element));
+ var h = this.getState(g, b, e, f);
+ if (this.affixed != h) {
+ null != this.unpin && this.$element.css('top', '');
+ var i = 'affix' + (h ? '-' + h : ''),
+ j = a.Event(i + '.bs.affix');
+ if ((this.$element.trigger(j), j.isDefaultPrevented())) return;
+ (this.affixed = h),
+ (this.unpin = 'bottom' == h ? this.getPinnedOffset() : null),
+ this.$element
+ .removeClass(c.RESET)
+ .addClass(i)
+ .trigger(i.replace('affix', 'affixed') + '.bs.affix');
+ }
+ 'bottom' == h && this.$element.offset({ top: g - b - f });
+ }
+ });
+ var d = a.fn.affix;
+ (a.fn.affix = b),
+ (a.fn.affix.Constructor = c),
+ (a.fn.affix.noConflict = function () {
+ return (a.fn.affix = d), this;
+ }),
+ a(window).on('load', function () {
+ a('[data-spy="affix"]').each(function () {
+ var c = a(this),
+ d = c.data();
+ (d.offset = d.offset || {}),
+ null != d.offsetBottom && (d.offset.bottom = d.offsetBottom),
+ null != d.offsetTop && (d.offset.top = d.offsetTop),
+ b.call(c, d);
+ });
+ });
+ })(jQuery);
diff --git a/src/main/webapp/content/js/chartist.min.js b/src/main/webapp/content/js/chartist.min.js
new file mode 100644
index 0000000..037fcf8
--- /dev/null
+++ b/src/main/webapp/content/js/chartist.min.js
@@ -0,0 +1,1660 @@
+/* Chartist.js 0.9.7
+ * Copyright © 2016 Gion Kunz
+ * Free to use under either the WTFPL license or the MIT license.
+ * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL
+ * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT
+ */
+
+!(function (a, b) {
+ 'function' == typeof define && define.amd
+ ? define([], function () {
+ return (a.Chartist = b());
+ })
+ : 'object' == typeof exports
+ ? (module.exports = b())
+ : (a.Chartist = b());
+})(this, function () {
+ var a = { version: '0.9.7' };
+ return (
+ (function (a, b, c) {
+ 'use strict';
+ (c.namespaces = {
+ svg: 'http://www.w3.org/2000/svg',
+ xmlns: 'http://www.w3.org/2000/xmlns/',
+ xhtml: 'http://www.w3.org/1999/xhtml',
+ xlink: 'http://www.w3.org/1999/xlink',
+ ct: 'http://gionkunz.github.com/chartist-js/ct',
+ }),
+ (c.noop = function (a) {
+ return a;
+ }),
+ (c.alphaNumerate = function (a) {
+ return String.fromCharCode(97 + (a % 26));
+ }),
+ (c.extend = function (a) {
+ a = a || {};
+ var b = Array.prototype.slice.call(arguments, 1);
+ return (
+ b.forEach(function (b) {
+ for (var d in b)
+ 'object' != typeof b[d] || null === b[d] || b[d] instanceof Array ? (a[d] = b[d]) : (a[d] = c.extend({}, a[d], b[d]));
+ }),
+ a
+ );
+ }),
+ (c.replaceAll = function (a, b, c) {
+ return a.replace(new RegExp(b, 'g'), c);
+ }),
+ (c.ensureUnit = function (a, b) {
+ return 'number' == typeof a && (a += b), a;
+ }),
+ (c.quantity = function (a) {
+ if ('string' == typeof a) {
+ var b = /^(\d+)\s*(.*)$/g.exec(a);
+ return { value: +b[1], unit: b[2] || void 0 };
+ }
+ return { value: a };
+ }),
+ (c.querySelector = function (a) {
+ return a instanceof Node ? a : b.querySelector(a);
+ }),
+ (c.times = function (a) {
+ return Array.apply(null, new Array(a));
+ }),
+ (c.sum = function (a, b) {
+ return a + (b ? b : 0);
+ }),
+ (c.mapMultiply = function (a) {
+ return function (b) {
+ return b * a;
+ };
+ }),
+ (c.mapAdd = function (a) {
+ return function (b) {
+ return b + a;
+ };
+ }),
+ (c.serialMap = function (a, b) {
+ var d = [],
+ e = Math.max.apply(
+ null,
+ a.map(function (a) {
+ return a.length;
+ })
+ );
+ return (
+ c.times(e).forEach(function (c, e) {
+ var f = a.map(function (a) {
+ return a[e];
+ });
+ d[e] = b.apply(null, f);
+ }),
+ d
+ );
+ }),
+ (c.roundWithPrecision = function (a, b) {
+ var d = Math.pow(10, b || c.precision);
+ return Math.round(a * d) / d;
+ }),
+ (c.precision = 8),
+ (c.escapingMap = { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }),
+ (c.serialize = function (a) {
+ return null === a || void 0 === a
+ ? a
+ : ('number' == typeof a ? (a = '' + a) : 'object' == typeof a && (a = JSON.stringify({ data: a })),
+ Object.keys(c.escapingMap).reduce(function (a, b) {
+ return c.replaceAll(a, b, c.escapingMap[b]);
+ }, a));
+ }),
+ (c.deserialize = function (a) {
+ if ('string' != typeof a) return a;
+ a = Object.keys(c.escapingMap).reduce(function (a, b) {
+ return c.replaceAll(a, c.escapingMap[b], b);
+ }, a);
+ try {
+ (a = JSON.parse(a)), (a = void 0 !== a.data ? a.data : a);
+ } catch (b) {}
+ return a;
+ }),
+ (c.createSvg = function (a, b, d, e) {
+ var f;
+ return (
+ (b = b || '100%'),
+ (d = d || '100%'),
+ Array.prototype.slice
+ .call(a.querySelectorAll('svg'))
+ .filter(function (a) {
+ return a.getAttributeNS(c.namespaces.xmlns, 'ct');
+ })
+ .forEach(function (b) {
+ a.removeChild(b);
+ }),
+ (f = new c.Svg('svg')
+ .attr({ width: b, height: d })
+ .addClass(e)
+ .attr({ style: 'width: ' + b + '; height: ' + d + ';' })),
+ a.appendChild(f._node),
+ f
+ );
+ }),
+ (c.normalizeData = function (a) {
+ if (
+ ((a = a || { series: [], labels: [] }),
+ (a.series = a.series || []),
+ (a.labels = a.labels || []),
+ a.series.length > 0 && 0 === a.labels.length)
+ ) {
+ var b,
+ d = c.getDataArray(a);
+ (b = d.every(function (a) {
+ return a instanceof Array;
+ })
+ ? Math.max.apply(
+ null,
+ d.map(function (a) {
+ return a.length;
+ })
+ )
+ : d.length),
+ (a.labels = c.times(b).map(function () {
+ return '';
+ }));
+ }
+ return a;
+ }),
+ (c.reverseData = function (a) {
+ a.labels.reverse(), a.series.reverse();
+ for (var b = 0; b < a.series.length; b++)
+ 'object' == typeof a.series[b] && void 0 !== a.series[b].data
+ ? a.series[b].data.reverse()
+ : a.series[b] instanceof Array && a.series[b].reverse();
+ }),
+ (c.getDataArray = function (a, b, d) {
+ function e(a) {
+ if (!c.isFalseyButZero(a)) {
+ if ((a.data || a) instanceof Array) return (a.data || a).map(e);
+ if (a.hasOwnProperty('value')) return e(a.value);
+ if (d) {
+ var b = {};
+ return (
+ 'string' == typeof d ? (b[d] = c.getNumberOrUndefined(a)) : (b.y = c.getNumberOrUndefined(a)),
+ (b.x = a.hasOwnProperty('x') ? c.getNumberOrUndefined(a.x) : b.x),
+ (b.y = a.hasOwnProperty('y') ? c.getNumberOrUndefined(a.y) : b.y),
+ b
+ );
+ }
+ return c.getNumberOrUndefined(a);
+ }
+ }
+ return ((b && !a.reversed) || (!b && a.reversed)) && (c.reverseData(a), (a.reversed = !a.reversed)), a.series.map(e);
+ }),
+ (c.normalizePadding = function (a, b) {
+ return (
+ (b = b || 0),
+ 'number' == typeof a
+ ? { top: a, right: a, bottom: a, left: a }
+ : {
+ top: 'number' == typeof a.top ? a.top : b,
+ right: 'number' == typeof a.right ? a.right : b,
+ bottom: 'number' == typeof a.bottom ? a.bottom : b,
+ left: 'number' == typeof a.left ? a.left : b,
+ }
+ );
+ }),
+ (c.getMetaData = function (a, b) {
+ var d = a.data ? a.data[b] : a[b];
+ return d ? c.serialize(d.meta) : void 0;
+ }),
+ (c.orderOfMagnitude = function (a) {
+ return Math.floor(Math.log(Math.abs(a)) / Math.LN10);
+ }),
+ (c.projectLength = function (a, b, c) {
+ return (b / c.range) * a;
+ }),
+ (c.getAvailableHeight = function (a, b) {
+ return Math.max((c.quantity(b.height).value || a.height()) - (b.chartPadding.top + b.chartPadding.bottom) - b.axisX.offset, 0);
+ }),
+ (c.getHighLow = function (a, b, d) {
+ function e(a) {
+ if (void 0 !== a)
+ if (a instanceof Array) for (var b = 0; b < a.length; b++) e(a[b]);
+ else {
+ var c = d ? +a[d] : +a;
+ g && c > f.high && (f.high = c), h && c < f.low && (f.low = c);
+ }
+ }
+ b = c.extend({}, b, d ? b['axis' + d.toUpperCase()] : {});
+ var f = { high: void 0 === b.high ? -Number.MAX_VALUE : +b.high, low: void 0 === b.low ? Number.MAX_VALUE : +b.low },
+ g = void 0 === b.high,
+ h = void 0 === b.low;
+ return (
+ (g || h) && e(a),
+ (b.referenceValue || 0 === b.referenceValue) &&
+ ((f.high = Math.max(b.referenceValue, f.high)), (f.low = Math.min(b.referenceValue, f.low))),
+ f.high <= f.low &&
+ (0 === f.low ? (f.high = 1) : f.low < 0 ? (f.high = 0) : f.high > 0 ? (f.low = 0) : ((f.high = 1), (f.low = 0))),
+ f
+ );
+ }),
+ (c.isNum = function (a) {
+ return !isNaN(a) && isFinite(a);
+ }),
+ (c.isFalseyButZero = function (a) {
+ return !a && 0 !== a;
+ }),
+ (c.getNumberOrUndefined = function (a) {
+ return isNaN(+a) ? void 0 : +a;
+ }),
+ (c.getMultiValue = function (a, b) {
+ return c.isNum(a) ? +a : a ? a[b || 'y'] || 0 : 0;
+ }),
+ (c.rho = function (a) {
+ function b(a, c) {
+ return a % c === 0 ? c : b(c, a % c);
+ }
+ function c(a) {
+ return a * a + 1;
+ }
+ if (1 === a) return a;
+ var d,
+ e = 2,
+ f = 2;
+ if (a % 2 === 0) return 2;
+ do (e = c(e) % a), (f = c(c(f)) % a), (d = b(Math.abs(e - f), a));
+ while (1 === d);
+ return d;
+ }),
+ (c.getBounds = function (a, b, d, e) {
+ var f,
+ g,
+ h,
+ i = 0,
+ j = { high: b.high, low: b.low };
+ (j.valueRange = j.high - j.low),
+ (j.oom = c.orderOfMagnitude(j.valueRange)),
+ (j.step = Math.pow(10, j.oom)),
+ (j.min = Math.floor(j.low / j.step) * j.step),
+ (j.max = Math.ceil(j.high / j.step) * j.step),
+ (j.range = j.max - j.min),
+ (j.numberOfSteps = Math.round(j.range / j.step));
+ var k = c.projectLength(a, j.step, j),
+ l = d > k,
+ m = e ? c.rho(j.range) : 0;
+ if (e && c.projectLength(a, 1, j) >= d) j.step = 1;
+ else if (e && m < j.step && c.projectLength(a, m, j) >= d) j.step = m;
+ else
+ for (;;) {
+ if (l && c.projectLength(a, j.step, j) <= d) j.step *= 2;
+ else {
+ if (l || !(c.projectLength(a, j.step / 2, j) >= d)) break;
+ if (((j.step /= 2), e && j.step % 1 !== 0)) {
+ j.step *= 2;
+ break;
+ }
+ }
+ if (i++ > 1e3) throw new Error('Exceeded maximum number of iterations while optimizing scale step!');
+ }
+ for (g = j.min, h = j.max; g + j.step <= j.low; ) g += j.step;
+ for (; h - j.step >= j.high; ) h -= j.step;
+ for (j.min = g, j.max = h, j.range = j.max - j.min, j.values = [], f = j.min; f <= j.max; f += j.step)
+ j.values.push(c.roundWithPrecision(f));
+ return j;
+ }),
+ (c.polarToCartesian = function (a, b, c, d) {
+ var e = ((d - 90) * Math.PI) / 180;
+ return { x: a + c * Math.cos(e), y: b + c * Math.sin(e) };
+ }),
+ (c.createChartRect = function (a, b, d) {
+ var e = !(!b.axisX && !b.axisY),
+ f = e ? b.axisY.offset : 0,
+ g = e ? b.axisX.offset : 0,
+ h = a.width() || c.quantity(b.width).value || 0,
+ i = a.height() || c.quantity(b.height).value || 0,
+ j = c.normalizePadding(b.chartPadding, d);
+ (h = Math.max(h, f + j.left + j.right)), (i = Math.max(i, g + j.top + j.bottom));
+ var k = {
+ padding: j,
+ width: function () {
+ return this.x2 - this.x1;
+ },
+ height: function () {
+ return this.y1 - this.y2;
+ },
+ };
+ return (
+ e
+ ? ('start' === b.axisX.position
+ ? ((k.y2 = j.top + g), (k.y1 = Math.max(i - j.bottom, k.y2 + 1)))
+ : ((k.y2 = j.top), (k.y1 = Math.max(i - j.bottom - g, k.y2 + 1))),
+ 'start' === b.axisY.position
+ ? ((k.x1 = j.left + f), (k.x2 = Math.max(h - j.right, k.x1 + 1)))
+ : ((k.x1 = j.left), (k.x2 = Math.max(h - j.right - f, k.x1 + 1))))
+ : ((k.x1 = j.left), (k.x2 = Math.max(h - j.right, k.x1 + 1)), (k.y2 = j.top), (k.y1 = Math.max(i - j.bottom, k.y2 + 1))),
+ k
+ );
+ }),
+ (c.createGrid = function (a, b, d, e, f, g, h, i) {
+ var j = {};
+ (j[d.units.pos + '1'] = a), (j[d.units.pos + '2'] = a), (j[d.counterUnits.pos + '1'] = e), (j[d.counterUnits.pos + '2'] = e + f);
+ var k = g.elem('line', j, h.join(' '));
+ i.emit('draw', c.extend({ type: 'grid', axis: d, index: b, group: g, element: k }, j));
+ }),
+ (c.createLabel = function (a, b, d, e, f, g, h, i, j, k, l) {
+ var m,
+ n = {};
+ if (
+ ((n[f.units.pos] = a + h[f.units.pos]),
+ (n[f.counterUnits.pos] = h[f.counterUnits.pos]),
+ (n[f.units.len] = b),
+ (n[f.counterUnits.len] = g - 10),
+ k)
+ ) {
+ var o =
+ '' +
+ e[d] +
+ '';
+ m = i.foreignObject(o, c.extend({ style: 'overflow: visible;' }, n));
+ } else m = i.elem('text', n, j.join(' ')).text(e[d]);
+ l.emit('draw', c.extend({ type: 'label', axis: f, index: d, group: i, element: m, text: e[d] }, n));
+ }),
+ (c.getSeriesOption = function (a, b, c) {
+ if (a.name && b.series && b.series[a.name]) {
+ var d = b.series[a.name];
+ return d.hasOwnProperty(c) ? d[c] : b[c];
+ }
+ return b[c];
+ }),
+ (c.optionsProvider = function (b, d, e) {
+ function f(b) {
+ var f = h;
+ if (((h = c.extend({}, j)), d))
+ for (i = 0; i < d.length; i++) {
+ var g = a.matchMedia(d[i][0]);
+ g.matches && (h = c.extend(h, d[i][1]));
+ }
+ e && !b && e.emit('optionsChanged', { previousOptions: f, currentOptions: h });
+ }
+ function g() {
+ k.forEach(function (a) {
+ a.removeListener(f);
+ });
+ }
+ var h,
+ i,
+ j = c.extend({}, b),
+ k = [];
+ if (!a.matchMedia) throw "window.matchMedia not found! Make sure you're using a polyfill.";
+ if (d)
+ for (i = 0; i < d.length; i++) {
+ var l = a.matchMedia(d[i][0]);
+ l.addListener(f), k.push(l);
+ }
+ return (
+ f(!0),
+ {
+ removeMediaQueryListeners: g,
+ getCurrentOptions: function () {
+ return c.extend({}, h);
+ },
+ }
+ );
+ });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ (c.Interpolation = {}),
+ (c.Interpolation.none = function (a) {
+ var b = { fillHoles: !1 };
+ return (
+ (a = c.extend({}, b, a)),
+ function (b, d) {
+ for (var e = new c.Svg.Path(), f = !0, g = 0; g < b.length; g += 2) {
+ var h = b[g],
+ i = b[g + 1],
+ j = d[g / 2];
+ void 0 !== j.value ? (f ? e.move(h, i, !1, j) : e.line(h, i, !1, j), (f = !1)) : a.fillHoles || (f = !0);
+ }
+ return e;
+ }
+ );
+ }),
+ (c.Interpolation.simple = function (a) {
+ var b = { divisor: 2, fillHoles: !1 };
+ a = c.extend({}, b, a);
+ var d = 1 / Math.max(1, a.divisor);
+ return function (b, e) {
+ for (var f, g, h, i = new c.Svg.Path(), j = 0; j < b.length; j += 2) {
+ var k = b[j],
+ l = b[j + 1],
+ m = (k - f) * d,
+ n = e[j / 2];
+ void 0 !== n.value
+ ? (void 0 === h ? i.move(k, l, !1, n) : i.curve(f + m, g, k - m, l, k, l, !1, n), (f = k), (g = l), (h = n))
+ : a.fillHoles || (f = k = h = void 0);
+ }
+ return i;
+ };
+ }),
+ (c.Interpolation.cardinal = function (a) {
+ function b(b, c) {
+ for (var d = [], e = !0, f = 0; f < b.length; f += 2)
+ void 0 === c[f / 2].value
+ ? a.fillHoles || (e = !0)
+ : (e && (d.push({ pathCoordinates: [], valueData: [] }), (e = !1)),
+ d[d.length - 1].pathCoordinates.push(b[f], b[f + 1]),
+ d[d.length - 1].valueData.push(c[f / 2]));
+ return d;
+ }
+ var d = { tension: 1, fillHoles: !1 };
+ a = c.extend({}, d, a);
+ var e = Math.min(1, Math.max(0, a.tension)),
+ f = 1 - e;
+ return function g(a, d) {
+ var h = b(a, d);
+ if (h.length) {
+ if (h.length > 1) {
+ var i = [];
+ return (
+ h.forEach(function (a) {
+ i.push(g(a.pathCoordinates, a.valueData));
+ }),
+ c.Svg.Path.join(i)
+ );
+ }
+ if (((a = h[0].pathCoordinates), (d = h[0].valueData), a.length <= 4)) return c.Interpolation.none()(a, d);
+ for (var j, k = new c.Svg.Path().move(a[0], a[1], !1, d[0]), l = 0, m = a.length; m - 2 * !j > l; l += 2) {
+ var n = [
+ { x: +a[l - 2], y: +a[l - 1] },
+ { x: +a[l], y: +a[l + 1] },
+ { x: +a[l + 2], y: +a[l + 3] },
+ { x: +a[l + 4], y: +a[l + 5] },
+ ];
+ j
+ ? l
+ ? m - 4 === l
+ ? (n[3] = { x: +a[0], y: +a[1] })
+ : m - 2 === l && ((n[2] = { x: +a[0], y: +a[1] }), (n[3] = { x: +a[2], y: +a[3] }))
+ : (n[0] = { x: +a[m - 2], y: +a[m - 1] })
+ : m - 4 === l
+ ? (n[3] = n[2])
+ : l || (n[0] = { x: +a[l], y: +a[l + 1] }),
+ k.curve(
+ (e * (-n[0].x + 6 * n[1].x + n[2].x)) / 6 + f * n[2].x,
+ (e * (-n[0].y + 6 * n[1].y + n[2].y)) / 6 + f * n[2].y,
+ (e * (n[1].x + 6 * n[2].x - n[3].x)) / 6 + f * n[2].x,
+ (e * (n[1].y + 6 * n[2].y - n[3].y)) / 6 + f * n[2].y,
+ n[2].x,
+ n[2].y,
+ !1,
+ d[(l + 2) / 2]
+ );
+ }
+ return k;
+ }
+ return c.Interpolation.none()([]);
+ };
+ }),
+ (c.Interpolation.step = function (a) {
+ var b = { postpone: !0, fillHoles: !1 };
+ return (
+ (a = c.extend({}, b, a)),
+ function (b, d) {
+ for (var e, f, g, h = new c.Svg.Path(), i = 0; i < b.length; i += 2) {
+ var j = b[i],
+ k = b[i + 1],
+ l = d[i / 2];
+ void 0 !== l.value
+ ? (void 0 === g ? h.move(j, k, !1, l) : (a.postpone ? h.line(j, f, !1, g) : h.line(e, k, !1, l), h.line(j, k, !1, l)),
+ (e = j),
+ (f = k),
+ (g = l))
+ : a.fillHoles || (e = f = g = void 0);
+ }
+ return h;
+ }
+ );
+ });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ c.EventEmitter = function () {
+ function a(a, b) {
+ (d[a] = d[a] || []), d[a].push(b);
+ }
+ function b(a, b) {
+ d[a] && (b ? (d[a].splice(d[a].indexOf(b), 1), 0 === d[a].length && delete d[a]) : delete d[a]);
+ }
+ function c(a, b) {
+ d[a] &&
+ d[a].forEach(function (a) {
+ a(b);
+ }),
+ d['*'] &&
+ d['*'].forEach(function (c) {
+ c(a, b);
+ });
+ }
+ var d = [];
+ return { addEventHandler: a, removeEventHandler: b, emit: c };
+ };
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a) {
+ var b = [];
+ if (a.length) for (var c = 0; c < a.length; c++) b.push(a[c]);
+ return b;
+ }
+ function e(a, b) {
+ var d = b || this.prototype || c.Class,
+ e = Object.create(d);
+ c.Class.cloneDefinitions(e, a);
+ var f = function () {
+ var a,
+ b = e.constructor || function () {};
+ return (a = this === c ? Object.create(e) : this), b.apply(a, Array.prototype.slice.call(arguments, 0)), a;
+ };
+ return (f.prototype = e), (f['super'] = d), (f.extend = this.extend), f;
+ }
+ function f() {
+ var a = d(arguments),
+ b = a[0];
+ return (
+ a.splice(1, a.length - 1).forEach(function (a) {
+ Object.getOwnPropertyNames(a).forEach(function (c) {
+ delete b[c], Object.defineProperty(b, c, Object.getOwnPropertyDescriptor(a, c));
+ });
+ }),
+ b
+ );
+ }
+ c.Class = { extend: e, cloneDefinitions: f };
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, d) {
+ return (
+ a && ((this.data = a), this.eventEmitter.emit('data', { type: 'update', data: this.data })),
+ b &&
+ ((this.options = c.extend({}, d ? this.options : this.defaultOptions, b)),
+ this.initializeTimeoutId ||
+ (this.optionsProvider.removeMediaQueryListeners(),
+ (this.optionsProvider = c.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter)))),
+ this.initializeTimeoutId || this.createChart(this.optionsProvider.getCurrentOptions()),
+ this
+ );
+ }
+ function e() {
+ return (
+ this.initializeTimeoutId
+ ? a.clearTimeout(this.initializeTimeoutId)
+ : (a.removeEventListener('resize', this.resizeListener), this.optionsProvider.removeMediaQueryListeners()),
+ this
+ );
+ }
+ function f(a, b) {
+ return this.eventEmitter.addEventHandler(a, b), this;
+ }
+ function g(a, b) {
+ return this.eventEmitter.removeEventHandler(a, b), this;
+ }
+ function h() {
+ a.addEventListener('resize', this.resizeListener),
+ (this.optionsProvider = c.optionsProvider(this.options, this.responsiveOptions, this.eventEmitter)),
+ this.eventEmitter.addEventHandler(
+ 'optionsChanged',
+ function () {
+ this.update();
+ }.bind(this)
+ ),
+ this.options.plugins &&
+ this.options.plugins.forEach(
+ function (a) {
+ a instanceof Array ? a[0](this, a[1]) : a(this);
+ }.bind(this)
+ ),
+ this.eventEmitter.emit('data', { type: 'initial', data: this.data }),
+ this.createChart(this.optionsProvider.getCurrentOptions()),
+ (this.initializeTimeoutId = void 0);
+ }
+ function i(a, b, d, e, f) {
+ (this.container = c.querySelector(a)),
+ (this.data = b),
+ (this.defaultOptions = d),
+ (this.options = e),
+ (this.responsiveOptions = f),
+ (this.eventEmitter = c.EventEmitter()),
+ (this.supportsForeignObject = c.Svg.isSupported('Extensibility')),
+ (this.supportsAnimations = c.Svg.isSupported('AnimationEventsAttribute')),
+ (this.resizeListener = function () {
+ this.update();
+ }.bind(this)),
+ this.container && (this.container.__chartist__ && this.container.__chartist__.detach(), (this.container.__chartist__ = this)),
+ (this.initializeTimeoutId = setTimeout(h.bind(this), 0));
+ }
+ c.Base = c.Class.extend({
+ constructor: i,
+ optionsProvider: void 0,
+ container: void 0,
+ svg: void 0,
+ eventEmitter: void 0,
+ createChart: function () {
+ throw new Error("Base chart type can't be instantiated!");
+ },
+ update: d,
+ detach: e,
+ on: f,
+ off: g,
+ version: c.version,
+ supportsForeignObject: !1,
+ });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, d, e, f, g) {
+ a instanceof Element
+ ? (this._node = a)
+ : ((this._node = b.createElementNS(c.namespaces.svg, a)), 'svg' === a && this.attr({ 'xmlns:ct': c.namespaces.ct })),
+ d && this.attr(d),
+ e && this.addClass(e),
+ f && (g && f._node.firstChild ? f._node.insertBefore(this._node, f._node.firstChild) : f._node.appendChild(this._node));
+ }
+ function e(a, b) {
+ return 'string' == typeof a
+ ? b
+ ? this._node.getAttributeNS(b, a)
+ : this._node.getAttribute(a)
+ : (Object.keys(a).forEach(
+ function (b) {
+ if (void 0 !== a[b])
+ if (-1 !== b.indexOf(':')) {
+ var d = b.split(':');
+ this._node.setAttributeNS(c.namespaces[d[0]], b, a[b]);
+ } else this._node.setAttribute(b, a[b]);
+ }.bind(this)
+ ),
+ this);
+ }
+ function f(a, b, d, e) {
+ return new c.Svg(a, b, d, this, e);
+ }
+ function g() {
+ return this._node.parentNode instanceof SVGElement ? new c.Svg(this._node.parentNode) : null;
+ }
+ function h() {
+ for (var a = this._node; 'svg' !== a.nodeName; ) a = a.parentNode;
+ return new c.Svg(a);
+ }
+ function i(a) {
+ var b = this._node.querySelector(a);
+ return b ? new c.Svg(b) : null;
+ }
+ function j(a) {
+ var b = this._node.querySelectorAll(a);
+ return b.length ? new c.Svg.List(b) : null;
+ }
+ function k(a, d, e, f) {
+ if ('string' == typeof a) {
+ var g = b.createElement('div');
+ (g.innerHTML = a), (a = g.firstChild);
+ }
+ a.setAttribute('xmlns', c.namespaces.xmlns);
+ var h = this.elem('foreignObject', d, e, f);
+ return h._node.appendChild(a), h;
+ }
+ function l(a) {
+ return this._node.appendChild(b.createTextNode(a)), this;
+ }
+ function m() {
+ for (; this._node.firstChild; ) this._node.removeChild(this._node.firstChild);
+ return this;
+ }
+ function n() {
+ return this._node.parentNode.removeChild(this._node), this.parent();
+ }
+ function o(a) {
+ return this._node.parentNode.replaceChild(a._node, this._node), a;
+ }
+ function p(a, b) {
+ return b && this._node.firstChild ? this._node.insertBefore(a._node, this._node.firstChild) : this._node.appendChild(a._node), this;
+ }
+ function q() {
+ return this._node.getAttribute('class') ? this._node.getAttribute('class').trim().split(/\s+/) : [];
+ }
+ function r(a) {
+ return (
+ this._node.setAttribute(
+ 'class',
+ this.classes(this._node)
+ .concat(a.trim().split(/\s+/))
+ .filter(function (a, b, c) {
+ return c.indexOf(a) === b;
+ })
+ .join(' ')
+ ),
+ this
+ );
+ }
+ function s(a) {
+ var b = a.trim().split(/\s+/);
+ return (
+ this._node.setAttribute(
+ 'class',
+ this.classes(this._node)
+ .filter(function (a) {
+ return -1 === b.indexOf(a);
+ })
+ .join(' ')
+ ),
+ this
+ );
+ }
+ function t() {
+ return this._node.setAttribute('class', ''), this;
+ }
+ function u() {
+ return this._node.getBoundingClientRect().height;
+ }
+ function v() {
+ return this._node.getBoundingClientRect().width;
+ }
+ function w(a, b, d) {
+ return (
+ void 0 === b && (b = !0),
+ Object.keys(a).forEach(
+ function (e) {
+ function f(a, b) {
+ var f,
+ g,
+ h,
+ i = {};
+ a.easing && ((h = a.easing instanceof Array ? a.easing : c.Svg.Easing[a.easing]), delete a.easing),
+ (a.begin = c.ensureUnit(a.begin, 'ms')),
+ (a.dur = c.ensureUnit(a.dur, 'ms')),
+ h && ((a.calcMode = 'spline'), (a.keySplines = h.join(' ')), (a.keyTimes = '0;1')),
+ b && ((a.fill = 'freeze'), (i[e] = a.from), this.attr(i), (g = c.quantity(a.begin || 0).value), (a.begin = 'indefinite')),
+ (f = this.elem('animate', c.extend({ attributeName: e }, a))),
+ b &&
+ setTimeout(
+ function () {
+ try {
+ f._node.beginElement();
+ } catch (b) {
+ (i[e] = a.to), this.attr(i), f.remove();
+ }
+ }.bind(this),
+ g
+ ),
+ d &&
+ f._node.addEventListener(
+ 'beginEvent',
+ function () {
+ d.emit('animationBegin', { element: this, animate: f._node, params: a });
+ }.bind(this)
+ ),
+ f._node.addEventListener(
+ 'endEvent',
+ function () {
+ d && d.emit('animationEnd', { element: this, animate: f._node, params: a }),
+ b && ((i[e] = a.to), this.attr(i), f.remove());
+ }.bind(this)
+ );
+ }
+ a[e] instanceof Array
+ ? a[e].forEach(
+ function (a) {
+ f.bind(this)(a, !1);
+ }.bind(this)
+ )
+ : f.bind(this)(a[e], b);
+ }.bind(this)
+ ),
+ this
+ );
+ }
+ function x(a) {
+ var b = this;
+ this.svgElements = [];
+ for (var d = 0; d < a.length; d++) this.svgElements.push(new c.Svg(a[d]));
+ Object.keys(c.Svg.prototype)
+ .filter(function (a) {
+ return (
+ -1 ===
+ ['constructor', 'parent', 'querySelector', 'querySelectorAll', 'replace', 'append', 'classes', 'height', 'width'].indexOf(a)
+ );
+ })
+ .forEach(function (a) {
+ b[a] = function () {
+ var d = Array.prototype.slice.call(arguments, 0);
+ return (
+ b.svgElements.forEach(function (b) {
+ c.Svg.prototype[a].apply(b, d);
+ }),
+ b
+ );
+ };
+ });
+ }
+ (c.Svg = c.Class.extend({
+ constructor: d,
+ attr: e,
+ elem: f,
+ parent: g,
+ root: h,
+ querySelector: i,
+ querySelectorAll: j,
+ foreignObject: k,
+ text: l,
+ empty: m,
+ remove: n,
+ replace: o,
+ append: p,
+ classes: q,
+ addClass: r,
+ removeClass: s,
+ removeAllClasses: t,
+ height: u,
+ width: v,
+ animate: w,
+ })),
+ (c.Svg.isSupported = function (a) {
+ return b.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#' + a, '1.1');
+ });
+ var y = {
+ easeInSine: [0.47, 0, 0.745, 0.715],
+ easeOutSine: [0.39, 0.575, 0.565, 1],
+ easeInOutSine: [0.445, 0.05, 0.55, 0.95],
+ easeInQuad: [0.55, 0.085, 0.68, 0.53],
+ easeOutQuad: [0.25, 0.46, 0.45, 0.94],
+ easeInOutQuad: [0.455, 0.03, 0.515, 0.955],
+ easeInCubic: [0.55, 0.055, 0.675, 0.19],
+ easeOutCubic: [0.215, 0.61, 0.355, 1],
+ easeInOutCubic: [0.645, 0.045, 0.355, 1],
+ easeInQuart: [0.895, 0.03, 0.685, 0.22],
+ easeOutQuart: [0.165, 0.84, 0.44, 1],
+ easeInOutQuart: [0.77, 0, 0.175, 1],
+ easeInQuint: [0.755, 0.05, 0.855, 0.06],
+ easeOutQuint: [0.23, 1, 0.32, 1],
+ easeInOutQuint: [0.86, 0, 0.07, 1],
+ easeInExpo: [0.95, 0.05, 0.795, 0.035],
+ easeOutExpo: [0.19, 1, 0.22, 1],
+ easeInOutExpo: [1, 0, 0, 1],
+ easeInCirc: [0.6, 0.04, 0.98, 0.335],
+ easeOutCirc: [0.075, 0.82, 0.165, 1],
+ easeInOutCirc: [0.785, 0.135, 0.15, 0.86],
+ easeInBack: [0.6, -0.28, 0.735, 0.045],
+ easeOutBack: [0.175, 0.885, 0.32, 1.275],
+ easeInOutBack: [0.68, -0.55, 0.265, 1.55],
+ };
+ (c.Svg.Easing = y), (c.Svg.List = c.Class.extend({ constructor: x }));
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, d, e, f, g) {
+ var h = c.extend({ command: f ? a.toLowerCase() : a.toUpperCase() }, b, g ? { data: g } : {});
+ d.splice(e, 0, h);
+ }
+ function e(a, b) {
+ a.forEach(function (c, d) {
+ u[c.command.toLowerCase()].forEach(function (e, f) {
+ b(c, e, d, f, a);
+ });
+ });
+ }
+ function f(a, b) {
+ (this.pathElements = []), (this.pos = 0), (this.close = a), (this.options = c.extend({}, v, b));
+ }
+ function g(a) {
+ return void 0 !== a ? ((this.pos = Math.max(0, Math.min(this.pathElements.length, a))), this) : this.pos;
+ }
+ function h(a) {
+ return this.pathElements.splice(this.pos, a), this;
+ }
+ function i(a, b, c, e) {
+ return d('M', { x: +a, y: +b }, this.pathElements, this.pos++, c, e), this;
+ }
+ function j(a, b, c, e) {
+ return d('L', { x: +a, y: +b }, this.pathElements, this.pos++, c, e), this;
+ }
+ function k(a, b, c, e, f, g, h, i) {
+ return d('C', { x1: +a, y1: +b, x2: +c, y2: +e, x: +f, y: +g }, this.pathElements, this.pos++, h, i), this;
+ }
+ function l(a, b, c, e, f, g, h, i, j) {
+ return d('A', { rx: +a, ry: +b, xAr: +c, lAf: +e, sf: +f, x: +g, y: +h }, this.pathElements, this.pos++, i, j), this;
+ }
+ function m(a) {
+ var b = a
+ .replace(/([A-Za-z])([0-9])/g, '$1 $2')
+ .replace(/([0-9])([A-Za-z])/g, '$1 $2')
+ .split(/[\s,]+/)
+ .reduce(function (a, b) {
+ return b.match(/[A-Za-z]/) && a.push([]), a[a.length - 1].push(b), a;
+ }, []);
+ 'Z' === b[b.length - 1][0].toUpperCase() && b.pop();
+ var d = b.map(function (a) {
+ var b = a.shift(),
+ d = u[b.toLowerCase()];
+ return c.extend(
+ { command: b },
+ d.reduce(function (b, c, d) {
+ return (b[c] = +a[d]), b;
+ }, {})
+ );
+ }),
+ e = [this.pos, 0];
+ return Array.prototype.push.apply(e, d), Array.prototype.splice.apply(this.pathElements, e), (this.pos += d.length), this;
+ }
+ function n() {
+ var a = Math.pow(10, this.options.accuracy);
+ return (
+ this.pathElements.reduce(
+ function (b, c) {
+ var d = u[c.command.toLowerCase()].map(
+ function (b) {
+ return this.options.accuracy ? Math.round(c[b] * a) / a : c[b];
+ }.bind(this)
+ );
+ return b + c.command + d.join(',');
+ }.bind(this),
+ ''
+ ) + (this.close ? 'Z' : '')
+ );
+ }
+ function o(a, b) {
+ return (
+ e(this.pathElements, function (c, d) {
+ c[d] *= 'x' === d[0] ? a : b;
+ }),
+ this
+ );
+ }
+ function p(a, b) {
+ return (
+ e(this.pathElements, function (c, d) {
+ c[d] += 'x' === d[0] ? a : b;
+ }),
+ this
+ );
+ }
+ function q(a) {
+ return (
+ e(this.pathElements, function (b, c, d, e, f) {
+ var g = a(b, c, d, e, f);
+ (g || 0 === g) && (b[c] = g);
+ }),
+ this
+ );
+ }
+ function r(a) {
+ var b = new c.Svg.Path(a || this.close);
+ return (
+ (b.pos = this.pos),
+ (b.pathElements = this.pathElements.slice().map(function (a) {
+ return c.extend({}, a);
+ })),
+ (b.options = c.extend({}, this.options)),
+ b
+ );
+ }
+ function s(a) {
+ var b = [new c.Svg.Path()];
+ return (
+ this.pathElements.forEach(function (d) {
+ d.command === a.toUpperCase() && 0 !== b[b.length - 1].pathElements.length && b.push(new c.Svg.Path()),
+ b[b.length - 1].pathElements.push(d);
+ }),
+ b
+ );
+ }
+ function t(a, b, d) {
+ for (var e = new c.Svg.Path(b, d), f = 0; f < a.length; f++)
+ for (var g = a[f], h = 0; h < g.pathElements.length; h++) e.pathElements.push(g.pathElements[h]);
+ return e;
+ }
+ var u = { m: ['x', 'y'], l: ['x', 'y'], c: ['x1', 'y1', 'x2', 'y2', 'x', 'y'], a: ['rx', 'ry', 'xAr', 'lAf', 'sf', 'x', 'y'] },
+ v = { accuracy: 3 };
+ (c.Svg.Path = c.Class.extend({
+ constructor: f,
+ position: g,
+ remove: h,
+ move: i,
+ line: j,
+ curve: k,
+ arc: l,
+ scale: o,
+ translate: p,
+ transform: q,
+ parse: m,
+ stringify: n,
+ clone: r,
+ splitByCommand: s,
+ })),
+ (c.Svg.Path.elementDescriptions = u),
+ (c.Svg.Path.join = t);
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, c, d) {
+ (this.units = a),
+ (this.counterUnits = a === f.x ? f.y : f.x),
+ (this.chartRect = b),
+ (this.axisLength = b[a.rectEnd] - b[a.rectStart]),
+ (this.gridOffset = b[a.rectOffset]),
+ (this.ticks = c),
+ (this.options = d);
+ }
+ function e(a, b, d, e, f) {
+ var g = e['axis' + this.units.pos.toUpperCase()],
+ h = this.ticks.map(this.projectValue.bind(this)),
+ i = this.ticks.map(g.labelInterpolationFnc);
+ h.forEach(
+ function (j, k) {
+ var l,
+ m = { x: 0, y: 0 };
+ (l = h[k + 1] ? h[k + 1] - j : Math.max(this.axisLength - j, 30)),
+ (c.isFalseyButZero(i[k]) && '' !== i[k]) ||
+ ('x' === this.units.pos
+ ? ((j = this.chartRect.x1 + j),
+ (m.x = e.axisX.labelOffset.x),
+ 'start' === e.axisX.position
+ ? (m.y = this.chartRect.padding.top + e.axisX.labelOffset.y + (d ? 5 : 20))
+ : (m.y = this.chartRect.y1 + e.axisX.labelOffset.y + (d ? 5 : 20)))
+ : ((j = this.chartRect.y1 - j),
+ (m.y = e.axisY.labelOffset.y - (d ? l : 0)),
+ 'start' === e.axisY.position
+ ? (m.x = d ? this.chartRect.padding.left + e.axisY.labelOffset.x : this.chartRect.x1 - 10)
+ : (m.x = this.chartRect.x2 + e.axisY.labelOffset.x + 10)),
+ g.showGrid &&
+ c.createGrid(
+ j,
+ k,
+ this,
+ this.gridOffset,
+ this.chartRect[this.counterUnits.len](),
+ a,
+ [e.classNames.grid, e.classNames[this.units.dir]],
+ f
+ ),
+ g.showLabel &&
+ c.createLabel(
+ j,
+ l,
+ k,
+ i,
+ this,
+ g.offset,
+ m,
+ b,
+ [e.classNames.label, e.classNames[this.units.dir], e.classNames[g.position]],
+ d,
+ f
+ ));
+ }.bind(this)
+ );
+ }
+ var f = {
+ x: { pos: 'x', len: 'width', dir: 'horizontal', rectStart: 'x1', rectEnd: 'x2', rectOffset: 'y2' },
+ y: { pos: 'y', len: 'height', dir: 'vertical', rectStart: 'y2', rectEnd: 'y1', rectOffset: 'x1' },
+ };
+ (c.Axis = c.Class.extend({
+ constructor: d,
+ createGridAndLabels: e,
+ projectValue: function (a, b, c) {
+ throw new Error("Base axis can't be instantiated!");
+ },
+ })),
+ (c.Axis.units = f);
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, d, e) {
+ var f = e.highLow || c.getHighLow(b.normalized, e, a.pos);
+ (this.bounds = c.getBounds(d[a.rectEnd] - d[a.rectStart], f, e.scaleMinSpace || 20, e.onlyInteger)),
+ (this.range = { min: this.bounds.min, max: this.bounds.max }),
+ c.AutoScaleAxis['super'].constructor.call(this, a, d, this.bounds.values, e);
+ }
+ function e(a) {
+ return (this.axisLength * (+c.getMultiValue(a, this.units.pos) - this.bounds.min)) / this.bounds.range;
+ }
+ c.AutoScaleAxis = c.Axis.extend({ constructor: d, projectValue: e });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, d, e) {
+ var f = e.highLow || c.getHighLow(b.normalized, e, a.pos);
+ (this.divisor = e.divisor || 1),
+ (this.ticks =
+ e.ticks ||
+ c.times(this.divisor).map(
+ function (a, b) {
+ return f.low + ((f.high - f.low) / this.divisor) * b;
+ }.bind(this)
+ )),
+ this.ticks.sort(function (a, b) {
+ return a - b;
+ }),
+ (this.range = { min: f.low, max: f.high }),
+ c.FixedScaleAxis['super'].constructor.call(this, a, d, this.ticks, e),
+ (this.stepLength = this.axisLength / this.divisor);
+ }
+ function e(a) {
+ return (this.axisLength * (+c.getMultiValue(a, this.units.pos) - this.range.min)) / (this.range.max - this.range.min);
+ }
+ c.FixedScaleAxis = c.Axis.extend({ constructor: d, projectValue: e });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, d, e) {
+ c.StepAxis['super'].constructor.call(this, a, d, e.ticks, e),
+ (this.stepLength = this.axisLength / (e.ticks.length - (e.stretch ? 1 : 0)));
+ }
+ function e(a, b) {
+ return this.stepLength * b;
+ }
+ c.StepAxis = c.Axis.extend({ constructor: d, projectValue: e });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a) {
+ this.data = c.normalizeData(this.data);
+ var b = { raw: this.data, normalized: c.getDataArray(this.data, a.reverseData, !0) };
+ this.svg = c.createSvg(this.container, a.width, a.height, a.classNames.chart);
+ var d,
+ e,
+ g = this.svg.elem('g').addClass(a.classNames.gridGroup),
+ h = this.svg.elem('g'),
+ i = this.svg.elem('g').addClass(a.classNames.labelGroup),
+ j = c.createChartRect(this.svg, a, f.padding);
+ (d =
+ void 0 === a.axisX.type
+ ? new c.StepAxis(c.Axis.units.x, b, j, c.extend({}, a.axisX, { ticks: b.raw.labels, stretch: a.fullWidth }))
+ : a.axisX.type.call(c, c.Axis.units.x, b, j, a.axisX)),
+ (e =
+ void 0 === a.axisY.type
+ ? new c.AutoScaleAxis(
+ c.Axis.units.y,
+ b,
+ j,
+ c.extend({}, a.axisY, { high: c.isNum(a.high) ? a.high : a.axisY.high, low: c.isNum(a.low) ? a.low : a.axisY.low })
+ )
+ : a.axisY.type.call(c, c.Axis.units.y, b, j, a.axisY)),
+ d.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter),
+ e.createGridAndLabels(g, i, this.supportsForeignObject, a, this.eventEmitter),
+ b.raw.series.forEach(
+ function (f, g) {
+ var i = h.elem('g');
+ i.attr({ 'ct:series-name': f.name, 'ct:meta': c.serialize(f.meta) }),
+ i.addClass([a.classNames.series, f.className || a.classNames.series + '-' + c.alphaNumerate(g)].join(' '));
+ var k = [],
+ l = [];
+ b.normalized[g].forEach(
+ function (a, h) {
+ var i = { x: j.x1 + d.projectValue(a, h, b.normalized[g]), y: j.y1 - e.projectValue(a, h, b.normalized[g]) };
+ k.push(i.x, i.y), l.push({ value: a, valueIndex: h, meta: c.getMetaData(f, h) });
+ }.bind(this)
+ );
+ var m = {
+ lineSmooth: c.getSeriesOption(f, a, 'lineSmooth'),
+ showPoint: c.getSeriesOption(f, a, 'showPoint'),
+ showLine: c.getSeriesOption(f, a, 'showLine'),
+ showArea: c.getSeriesOption(f, a, 'showArea'),
+ areaBase: c.getSeriesOption(f, a, 'areaBase'),
+ },
+ n = 'function' == typeof m.lineSmooth ? m.lineSmooth : m.lineSmooth ? c.Interpolation.cardinal() : c.Interpolation.none(),
+ o = n(k, l);
+ if (
+ (m.showPoint &&
+ o.pathElements.forEach(
+ function (b) {
+ var h = i
+ .elem('line', { x1: b.x, y1: b.y, x2: b.x + 0.01, y2: b.y }, a.classNames.point)
+ .attr({ 'ct:value': [b.data.value.x, b.data.value.y].filter(c.isNum).join(','), 'ct:meta': b.data.meta });
+ this.eventEmitter.emit('draw', {
+ type: 'point',
+ value: b.data.value,
+ index: b.data.valueIndex,
+ meta: b.data.meta,
+ series: f,
+ seriesIndex: g,
+ axisX: d,
+ axisY: e,
+ group: i,
+ element: h,
+ x: b.x,
+ y: b.y,
+ });
+ }.bind(this)
+ ),
+ m.showLine)
+ ) {
+ var p = i.elem('path', { d: o.stringify() }, a.classNames.line, !0);
+ this.eventEmitter.emit('draw', {
+ type: 'line',
+ values: b.normalized[g],
+ path: o.clone(),
+ chartRect: j,
+ index: g,
+ series: f,
+ seriesIndex: g,
+ axisX: d,
+ axisY: e,
+ group: i,
+ element: p,
+ });
+ }
+ if (m.showArea && e.range) {
+ var q = Math.max(Math.min(m.areaBase, e.range.max), e.range.min),
+ r = j.y1 - e.projectValue(q);
+ o.splitByCommand('M')
+ .filter(function (a) {
+ return a.pathElements.length > 1;
+ })
+ .map(function (a) {
+ var b = a.pathElements[0],
+ c = a.pathElements[a.pathElements.length - 1];
+ return a
+ .clone(!0)
+ .position(0)
+ .remove(1)
+ .move(b.x, r)
+ .line(b.x, b.y)
+ .position(a.pathElements.length + 1)
+ .line(c.x, r);
+ })
+ .forEach(
+ function (c) {
+ var h = i.elem('path', { d: c.stringify() }, a.classNames.area, !0);
+ this.eventEmitter.emit('draw', {
+ type: 'area',
+ values: b.normalized[g],
+ path: c.clone(),
+ series: f,
+ seriesIndex: g,
+ axisX: d,
+ axisY: e,
+ chartRect: j,
+ index: g,
+ group: i,
+ element: h,
+ });
+ }.bind(this)
+ );
+ }
+ }.bind(this)
+ ),
+ this.eventEmitter.emit('created', { bounds: e.bounds, chartRect: j, axisX: d, axisY: e, svg: this.svg, options: a });
+ }
+ function e(a, b, d, e) {
+ c.Line['super'].constructor.call(this, a, b, f, c.extend({}, f, d), e);
+ }
+ var f = {
+ axisX: {
+ offset: 30,
+ position: 'end',
+ labelOffset: { x: 0, y: 0 },
+ showLabel: !0,
+ showGrid: !0,
+ labelInterpolationFnc: c.noop,
+ type: void 0,
+ },
+ axisY: {
+ offset: 40,
+ position: 'start',
+ labelOffset: { x: 0, y: 0 },
+ showLabel: !0,
+ showGrid: !0,
+ labelInterpolationFnc: c.noop,
+ type: void 0,
+ scaleMinSpace: 20,
+ onlyInteger: !1,
+ },
+ width: void 0,
+ height: void 0,
+ showLine: !0,
+ showPoint: !0,
+ showArea: !1,
+ areaBase: 0,
+ lineSmooth: !0,
+ low: void 0,
+ high: void 0,
+ chartPadding: { top: 15, right: 15, bottom: 5, left: 10 },
+ fullWidth: !1,
+ reverseData: !1,
+ classNames: {
+ chart: 'ct-chart-line',
+ label: 'ct-label',
+ labelGroup: 'ct-labels',
+ series: 'ct-series',
+ line: 'ct-line',
+ point: 'ct-point',
+ area: 'ct-area',
+ grid: 'ct-grid',
+ gridGroup: 'ct-grids',
+ vertical: 'ct-vertical',
+ horizontal: 'ct-horizontal',
+ start: 'ct-start',
+ end: 'ct-end',
+ },
+ };
+ c.Line = c.Base.extend({ constructor: e, createChart: d });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a) {
+ this.data = c.normalizeData(this.data);
+ var b,
+ d = {
+ raw: this.data,
+ normalized: a.distributeSeries
+ ? c.getDataArray(this.data, a.reverseData, a.horizontalBars ? 'x' : 'y').map(function (a) {
+ return [a];
+ })
+ : c.getDataArray(this.data, a.reverseData, a.horizontalBars ? 'x' : 'y'),
+ };
+ this.svg = c.createSvg(
+ this.container,
+ a.width,
+ a.height,
+ a.classNames.chart + (a.horizontalBars ? ' ' + a.classNames.horizontalBars : '')
+ );
+ var e = this.svg.elem('g').addClass(a.classNames.gridGroup),
+ g = this.svg.elem('g'),
+ h = this.svg.elem('g').addClass(a.classNames.labelGroup);
+ if (a.stackBars && 0 !== d.normalized.length) {
+ var i = c.serialMap(d.normalized, function () {
+ return Array.prototype.slice
+ .call(arguments)
+ .map(function (a) {
+ return a;
+ })
+ .reduce(
+ function (a, b) {
+ return { x: a.x + (b && b.x) || 0, y: a.y + (b && b.y) || 0 };
+ },
+ { x: 0, y: 0 }
+ );
+ });
+ b = c.getHighLow([i], c.extend({}, a, { referenceValue: 0 }), a.horizontalBars ? 'x' : 'y');
+ } else b = c.getHighLow(d.normalized, c.extend({}, a, { referenceValue: 0 }), a.horizontalBars ? 'x' : 'y');
+ (b.high = +a.high || (0 === a.high ? 0 : b.high)), (b.low = +a.low || (0 === a.low ? 0 : b.low));
+ var j,
+ k,
+ l,
+ m,
+ n,
+ o = c.createChartRect(this.svg, a, f.padding);
+ (k = a.distributeSeries && a.stackBars ? d.raw.labels.slice(0, 1) : d.raw.labels),
+ a.horizontalBars
+ ? ((j = m =
+ void 0 === a.axisX.type
+ ? new c.AutoScaleAxis(c.Axis.units.x, d, o, c.extend({}, a.axisX, { highLow: b, referenceValue: 0 }))
+ : a.axisX.type.call(c, c.Axis.units.x, d, o, c.extend({}, a.axisX, { highLow: b, referenceValue: 0 }))),
+ (l = n =
+ void 0 === a.axisY.type
+ ? new c.StepAxis(c.Axis.units.y, d, o, { ticks: k })
+ : a.axisY.type.call(c, c.Axis.units.y, d, o, a.axisY)))
+ : ((l = m =
+ void 0 === a.axisX.type
+ ? new c.StepAxis(c.Axis.units.x, d, o, { ticks: k })
+ : a.axisX.type.call(c, c.Axis.units.x, d, o, a.axisX)),
+ (j = n =
+ void 0 === a.axisY.type
+ ? new c.AutoScaleAxis(c.Axis.units.y, d, o, c.extend({}, a.axisY, { highLow: b, referenceValue: 0 }))
+ : a.axisY.type.call(c, c.Axis.units.y, d, o, c.extend({}, a.axisY, { highLow: b, referenceValue: 0 }))));
+ var p = a.horizontalBars ? o.x1 + j.projectValue(0) : o.y1 - j.projectValue(0),
+ q = [];
+ l.createGridAndLabels(e, h, this.supportsForeignObject, a, this.eventEmitter),
+ j.createGridAndLabels(e, h, this.supportsForeignObject, a, this.eventEmitter),
+ d.raw.series.forEach(
+ function (b, e) {
+ var f,
+ h,
+ i = e - (d.raw.series.length - 1) / 2;
+ (f =
+ a.distributeSeries && !a.stackBars
+ ? l.axisLength / d.normalized.length / 2
+ : a.distributeSeries && a.stackBars
+ ? l.axisLength / 2
+ : l.axisLength / d.normalized[e].length / 2),
+ (h = g.elem('g')),
+ h.attr({ 'ct:series-name': b.name, 'ct:meta': c.serialize(b.meta) }),
+ h.addClass([a.classNames.series, b.className || a.classNames.series + '-' + c.alphaNumerate(e)].join(' ')),
+ d.normalized[e].forEach(
+ function (g, k) {
+ var r, s, t, u;
+ if (
+ ((u = a.distributeSeries && !a.stackBars ? e : a.distributeSeries && a.stackBars ? 0 : k),
+ (r = a.horizontalBars
+ ? {
+ x: o.x1 + j.projectValue(g && g.x ? g.x : 0, k, d.normalized[e]),
+ y: o.y1 - l.projectValue(g && g.y ? g.y : 0, u, d.normalized[e]),
+ }
+ : {
+ x: o.x1 + l.projectValue(g && g.x ? g.x : 0, u, d.normalized[e]),
+ y: o.y1 - j.projectValue(g && g.y ? g.y : 0, k, d.normalized[e]),
+ }),
+ l instanceof c.StepAxis &&
+ (l.options.stretch || (r[l.units.pos] += f * (a.horizontalBars ? -1 : 1)),
+ (r[l.units.pos] += a.stackBars || a.distributeSeries ? 0 : i * a.seriesBarDistance * (a.horizontalBars ? -1 : 1))),
+ (t = q[k] || p),
+ (q[k] = t - (p - r[l.counterUnits.pos])),
+ void 0 !== g)
+ ) {
+ var v = {};
+ (v[l.units.pos + '1'] = r[l.units.pos]),
+ (v[l.units.pos + '2'] = r[l.units.pos]),
+ !a.stackBars || ('accumulate' !== a.stackMode && a.stackMode)
+ ? ((v[l.counterUnits.pos + '1'] = p), (v[l.counterUnits.pos + '2'] = r[l.counterUnits.pos]))
+ : ((v[l.counterUnits.pos + '1'] = t), (v[l.counterUnits.pos + '2'] = q[k])),
+ (v.x1 = Math.min(Math.max(v.x1, o.x1), o.x2)),
+ (v.x2 = Math.min(Math.max(v.x2, o.x1), o.x2)),
+ (v.y1 = Math.min(Math.max(v.y1, o.y2), o.y1)),
+ (v.y2 = Math.min(Math.max(v.y2, o.y2), o.y1)),
+ (s = h
+ .elem('line', v, a.classNames.bar)
+ .attr({ 'ct:value': [g.x, g.y].filter(c.isNum).join(','), 'ct:meta': c.getMetaData(b, k) })),
+ this.eventEmitter.emit(
+ 'draw',
+ c.extend(
+ {
+ type: 'bar',
+ value: g,
+ index: k,
+ meta: c.getMetaData(b, k),
+ series: b,
+ seriesIndex: e,
+ axisX: m,
+ axisY: n,
+ chartRect: o,
+ group: h,
+ element: s,
+ },
+ v
+ )
+ );
+ }
+ }.bind(this)
+ );
+ }.bind(this)
+ ),
+ this.eventEmitter.emit('created', { bounds: j.bounds, chartRect: o, axisX: m, axisY: n, svg: this.svg, options: a });
+ }
+ function e(a, b, d, e) {
+ c.Bar['super'].constructor.call(this, a, b, f, c.extend({}, f, d), e);
+ }
+ var f = {
+ axisX: {
+ offset: 30,
+ position: 'end',
+ labelOffset: { x: 0, y: 0 },
+ showLabel: !0,
+ showGrid: !0,
+ labelInterpolationFnc: c.noop,
+ scaleMinSpace: 30,
+ onlyInteger: !1,
+ },
+ axisY: {
+ offset: 40,
+ position: 'start',
+ labelOffset: { x: 0, y: 0 },
+ showLabel: !0,
+ showGrid: !0,
+ labelInterpolationFnc: c.noop,
+ scaleMinSpace: 20,
+ onlyInteger: !1,
+ },
+ width: void 0,
+ height: void 0,
+ high: void 0,
+ low: void 0,
+ chartPadding: { top: 15, right: 15, bottom: 5, left: 10 },
+ seriesBarDistance: 15,
+ stackBars: !1,
+ stackMode: 'accumulate',
+ horizontalBars: !1,
+ distributeSeries: !1,
+ reverseData: !1,
+ classNames: {
+ chart: 'ct-chart-bar',
+ horizontalBars: 'ct-horizontal-bars',
+ label: 'ct-label',
+ labelGroup: 'ct-labels',
+ series: 'ct-series',
+ bar: 'ct-bar',
+ grid: 'ct-grid',
+ gridGroup: 'ct-grids',
+ vertical: 'ct-vertical',
+ horizontal: 'ct-horizontal',
+ start: 'ct-start',
+ end: 'ct-end',
+ },
+ };
+ c.Bar = c.Base.extend({ constructor: e, createChart: d });
+ })(window, document, a),
+ (function (a, b, c) {
+ 'use strict';
+ function d(a, b, c) {
+ var d = b.x > a.x;
+ return (d && 'explode' === c) || (!d && 'implode' === c)
+ ? 'start'
+ : (d && 'implode' === c) || (!d && 'explode' === c)
+ ? 'end'
+ : 'middle';
+ }
+ function e(a) {
+ this.data = c.normalizeData(this.data);
+ var b,
+ e,
+ f,
+ h,
+ i,
+ j = [],
+ k = a.startAngle,
+ l = c.getDataArray(this.data, a.reverseData);
+ (this.svg = c.createSvg(this.container, a.width, a.height, a.donut ? a.classNames.chartDonut : a.classNames.chartPie)),
+ (e = c.createChartRect(this.svg, a, g.padding)),
+ (f = Math.min(e.width() / 2, e.height() / 2)),
+ (i =
+ a.total ||
+ l.reduce(function (a, b) {
+ return a + b;
+ }, 0));
+ var m = c.quantity(a.donutWidth);
+ '%' === m.unit && (m.value *= f / 100),
+ (f -= a.donut ? m.value / 2 : 0),
+ (h = 'outside' === a.labelPosition || a.donut ? f : 'center' === a.labelPosition ? 0 : f / 2),
+ (h += a.labelOffset);
+ var n = { x: e.x1 + e.width() / 2, y: e.y2 + e.height() / 2 },
+ o =
+ 1 ===
+ this.data.series.filter(function (a) {
+ return a.hasOwnProperty('value') ? 0 !== a.value : 0 !== a;
+ }).length;
+ a.showLabel && (b = this.svg.elem('g', null, null, !0));
+ for (var p = 0; p < this.data.series.length; p++)
+ if (0 !== l[p] || !a.ignoreEmptyValues) {
+ var q = this.data.series[p];
+ (j[p] = this.svg.elem('g', null, null, !0)),
+ j[p].attr({ 'ct:series-name': q.name }),
+ j[p].addClass([a.classNames.series, q.className || a.classNames.series + '-' + c.alphaNumerate(p)].join(' '));
+ var r = k + (l[p] / i) * 360,
+ s = Math.max(0, k - (0 === p || o ? 0 : 0.2));
+ r - s >= 359.99 && (r = s + 359.99);
+ var t = c.polarToCartesian(n.x, n.y, f, s),
+ u = c.polarToCartesian(n.x, n.y, f, r),
+ v = new c.Svg.Path(!a.donut).move(u.x, u.y).arc(f, f, 0, r - k > 180, 0, t.x, t.y);
+ a.donut || v.line(n.x, n.y);
+ var w = j[p].elem('path', { d: v.stringify() }, a.donut ? a.classNames.sliceDonut : a.classNames.slicePie);
+ if (
+ (w.attr({ 'ct:value': l[p], 'ct:meta': c.serialize(q.meta) }),
+ a.donut && w.attr({ style: 'stroke-width: ' + m.value + 'px' }),
+ this.eventEmitter.emit('draw', {
+ type: 'slice',
+ value: l[p],
+ totalDataSum: i,
+ index: p,
+ meta: q.meta,
+ series: q,
+ group: j[p],
+ element: w,
+ path: v.clone(),
+ center: n,
+ radius: f,
+ startAngle: k,
+ endAngle: r,
+ }),
+ a.showLabel)
+ ) {
+ var x = c.polarToCartesian(n.x, n.y, h, k + (r - k) / 2),
+ y = a.labelInterpolationFnc(this.data.labels && !c.isFalseyButZero(this.data.labels[p]) ? this.data.labels[p] : l[p], p);
+ if (y || 0 === y) {
+ var z = b.elem('text', { dx: x.x, dy: x.y, 'text-anchor': d(n, x, a.labelDirection) }, a.classNames.label).text('' + y);
+ this.eventEmitter.emit('draw', { type: 'label', index: p, group: b, element: z, text: '' + y, x: x.x, y: x.y });
+ }
+ }
+ k = r;
+ }
+ this.eventEmitter.emit('created', { chartRect: e, svg: this.svg, options: a });
+ }
+ function f(a, b, d, e) {
+ c.Pie['super'].constructor.call(this, a, b, g, c.extend({}, g, d), e);
+ }
+ var g = {
+ width: void 0,
+ height: void 0,
+ chartPadding: 5,
+ classNames: {
+ chartPie: 'ct-chart-pie',
+ chartDonut: 'ct-chart-donut',
+ series: 'ct-series',
+ slicePie: 'ct-slice-pie',
+ sliceDonut: 'ct-slice-donut',
+ label: 'ct-label',
+ },
+ startAngle: 0,
+ total: void 0,
+ donut: !1,
+ donutWidth: 60,
+ showLabel: !0,
+ labelOffset: 0,
+ labelPosition: 'inside',
+ labelInterpolationFnc: c.noop,
+ labelDirection: 'neutral',
+ reverseData: !1,
+ ignoreEmptyValues: !1,
+ };
+ c.Pie = c.Base.extend({ constructor: f, createChart: e, determineAnchorPosition: d });
+ })(window, document, a),
+ a
+ );
+});
diff --git a/src/main/webapp/content/js/demo.js b/src/main/webapp/content/js/demo.js
new file mode 100644
index 0000000..28c389a
--- /dev/null
+++ b/src/main/webapp/content/js/demo.js
@@ -0,0 +1,1100 @@
+type = ['', 'info', 'success', 'warning', 'danger'];
+
+demo = {
+ initCirclePercentage: function () {
+ $('#chartDashboard, #chartOrders, #chartNewVisitors, #chartSubscriptions, #chartDashboardDoc, #chartOrdersDoc').easyPieChart({
+ lineWidth: 6,
+ size: 160,
+ scaleColor: false,
+ trackColor: 'rgba(255,255,255,.25)',
+ barColor: '#FFFFFF',
+ animate: { duration: 5000, enabled: true },
+ });
+ },
+
+ initGoogleMaps: function () {
+ // Satellite Map
+ var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
+ var mapOptions = {
+ zoom: 3,
+ scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
+ center: myLatlng,
+ mapTypeId: google.maps.MapTypeId.SATELLITE,
+ };
+
+ var map = new google.maps.Map(document.getElementById('satelliteMap'), mapOptions);
+
+ var marker = new google.maps.Marker({
+ position: myLatlng,
+ title: 'Satellite Map!',
+ });
+
+ marker.setMap(map);
+ },
+
+ initSmallGoogleMaps: function () {
+ // Regular Map
+ var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
+ var mapOptions = {
+ zoom: 8,
+ center: myLatlng,
+ scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
+ };
+
+ var map = new google.maps.Map(document.getElementById('regularMap'), mapOptions);
+
+ var marker = new google.maps.Marker({
+ position: myLatlng,
+ title: 'Regular Map!',
+ });
+
+ marker.setMap(map);
+
+ // Custom Skin & Settings Map
+ var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
+ var mapOptions = {
+ zoom: 13,
+ center: myLatlng,
+ scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
+ disableDefaultUI: true, // a way to quickly hide all controls
+ zoomControl: true,
+ styles: [
+ { featureType: 'water', stylers: [{ saturation: 43 }, { lightness: -11 }, { hue: '#0088ff' }] },
+ { featureType: 'road', elementType: 'geometry.fill', stylers: [{ hue: '#ff0000' }, { saturation: -100 }, { lightness: 99 }] },
+ { featureType: 'road', elementType: 'geometry.stroke', stylers: [{ color: '#808080' }, { lightness: 54 }] },
+ { featureType: 'landscape.man_made', elementType: 'geometry.fill', stylers: [{ color: '#ece2d9' }] },
+ { featureType: 'poi.park', elementType: 'geometry.fill', stylers: [{ color: '#ccdca1' }] },
+ { featureType: 'road', elementType: 'labels.text.fill', stylers: [{ color: '#767676' }] },
+ { featureType: 'road', elementType: 'labels.text.stroke', stylers: [{ color: '#ffffff' }] },
+ { featureType: 'poi', stylers: [{ visibility: 'off' }] },
+ { featureType: 'landscape.natural', elementType: 'geometry.fill', stylers: [{ visibility: 'on' }, { color: '#b8cb93' }] },
+ { featureType: 'poi.park', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.sports_complex', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.medical', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.business', stylers: [{ visibility: 'simplified' }] },
+ ],
+ };
+
+ var map = new google.maps.Map(document.getElementById('customSkinMap'), mapOptions);
+
+ var marker = new google.maps.Marker({
+ position: myLatlng,
+ title: 'Custom Skin & Settings Map!',
+ });
+
+ marker.setMap(map);
+ },
+
+ initVectorMap: function () {
+ var mapData = {
+ AU: 760,
+ BR: 550,
+ CA: 120,
+ DE: 1300,
+ FR: 540,
+ GB: 690,
+ GE: 200,
+ IN: 200,
+ RO: 600,
+ RU: 300,
+ US: 2920,
+ };
+
+ $('#worldMap').vectorMap({
+ map: 'world_mill_en',
+ backgroundColor: 'transparent',
+ zoomOnScroll: false,
+ regionStyle: {
+ initial: {
+ fill: '#e4e4e4',
+ 'fill-opacity': 0.9,
+ stroke: 'none',
+ 'stroke-width': 0,
+ 'stroke-opacity': 0,
+ },
+ },
+
+ series: {
+ regions: [
+ {
+ values: mapData,
+ scale: ['#AAAAAA', '#444444'],
+ normalizeFunction: 'polynomial',
+ },
+ ],
+ },
+ });
+ },
+
+ initFullScreenGoogleMap: function () {
+ var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
+ var mapOptions = {
+ zoom: 13,
+ center: myLatlng,
+ scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
+ styles: [
+ { featureType: 'water', stylers: [{ saturation: 43 }, { lightness: -11 }, { hue: '#0088ff' }] },
+ { featureType: 'road', elementType: 'geometry.fill', stylers: [{ hue: '#ff0000' }, { saturation: -100 }, { lightness: 99 }] },
+ { featureType: 'road', elementType: 'geometry.stroke', stylers: [{ color: '#808080' }, { lightness: 54 }] },
+ { featureType: 'landscape.man_made', elementType: 'geometry.fill', stylers: [{ color: '#ece2d9' }] },
+ { featureType: 'poi.park', elementType: 'geometry.fill', stylers: [{ color: '#ccdca1' }] },
+ { featureType: 'road', elementType: 'labels.text.fill', stylers: [{ color: '#767676' }] },
+ { featureType: 'road', elementType: 'labels.text.stroke', stylers: [{ color: '#ffffff' }] },
+ { featureType: 'poi', stylers: [{ visibility: 'off' }] },
+ { featureType: 'landscape.natural', elementType: 'geometry.fill', stylers: [{ visibility: 'on' }, { color: '#b8cb93' }] },
+ { featureType: 'poi.park', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.sports_complex', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.medical', stylers: [{ visibility: 'on' }] },
+ { featureType: 'poi.business', stylers: [{ visibility: 'simplified' }] },
+ ],
+ };
+ var map = new google.maps.Map(document.getElementById('map'), mapOptions);
+
+ var marker = new google.maps.Marker({
+ position: myLatlng,
+ title: 'Hello World!',
+ });
+
+ // To add the marker to the map, call setMap();
+ marker.setMap(map);
+ },
+
+ initOverviewDashboardDoc: function () {
+ /* **************** Chart Total Earnings - single line ******************** */
+
+ var dataPrice = {
+ labels: ['Jan', 'Feb', 'Mar', 'April', 'May', 'June'],
+ series: [[230, 340, 400, 300, 570, 500, 800]],
+ };
+
+ var optionsPrice = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '210px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ showGrid: false,
+ },
+ low: 0,
+ high: 'auto',
+ classNames: {
+ line: 'ct-line ct-green',
+ },
+ };
+
+ Chartist.Line('#chartTotalEarningsDoc', dataPrice, optionsPrice);
+
+ /* **************** Chart Subscriptions - single line ******************** */
+
+ var dataDays = {
+ labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
+ series: [[60, 50, 30, 50, 70, 60, 90, 100]],
+ };
+
+ var optionsDays = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '210px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ showGrid: false,
+ },
+ low: 0,
+ high: 'auto',
+ classNames: {
+ line: 'ct-line ct-red',
+ },
+ };
+
+ Chartist.Line('#chartTotalSubscriptionsDoc', dataDays, optionsDays);
+ },
+
+ initOverviewDashboard: function () {
+ /* **************** Chart Total Earnings - single line ******************** */
+
+ var dataPrice = {
+ labels: ['Jan', 'Feb', 'Mar', 'April', 'May', 'June'],
+ series: [[230, 340, 400, 300, 570, 500, 800]],
+ };
+
+ var optionsPrice = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '210px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ showGrid: false,
+ },
+ low: 0,
+ high: 'auto',
+ classNames: {
+ line: 'ct-line ct-green',
+ },
+ };
+
+ Chartist.Line('#chartTotalEarnings', dataPrice, optionsPrice);
+
+ /* **************** Chart Subscriptions - single line ******************** */
+
+ var dataDays = {
+ labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
+ series: [[60, 50, 30, 50, 70, 60, 90, 100]],
+ };
+
+ var optionsDays = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '210px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ showGrid: false,
+ },
+ low: 0,
+ high: 'auto',
+ classNames: {
+ line: 'ct-line ct-red',
+ },
+ };
+
+ Chartist.Line('#chartTotalSubscriptions', dataDays, optionsDays);
+
+ /* **************** Chart Total Downloads - single line ******************** */
+
+ var dataDownloads = {
+ labels: ['2009', '2010', '2011', '2012', '2013', '2014'],
+ series: [[1200, 1000, 3490, 8345, 3256, 2566]],
+ };
+
+ var optionsDownloads = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '210px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ showGrid: false,
+ },
+ low: 0,
+ high: 'auto',
+ classNames: {
+ line: 'ct-line ct-orange',
+ },
+ };
+
+ Chartist.Line('#chartTotalDownloads', dataDownloads, optionsDownloads);
+ },
+
+ initStatsDashboard: function () {
+ var dataSales = {
+ labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
+ series: [
+ [287, 385, 490, 562, 594, 626, 698, 895, 952],
+ [67, 152, 193, 240, 387, 435, 535, 642, 744],
+ [23, 113, 67, 108, 190, 239, 307, 410, 410],
+ ],
+ };
+
+ var optionsSales = {
+ lineSmooth: false,
+ low: 0,
+ high: 1000,
+ showArea: true,
+ height: '245px',
+ axisX: {
+ showGrid: false,
+ },
+ lineSmooth: Chartist.Interpolation.simple({
+ divisor: 3,
+ }),
+ showLine: true,
+ showPoint: false,
+ };
+
+ var responsiveSales = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
+
+ var data = {
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ series: [
+ [542, 543, 520, 680, 653, 753, 326, 434, 568, 610, 756, 895],
+ [230, 293, 380, 480, 503, 553, 600, 664, 698, 710, 736, 795],
+ ],
+ };
+
+ var options = {
+ seriesBarDistance: 10,
+ axisX: {
+ showGrid: false,
+ },
+ height: '245px',
+ };
+
+ var responsiveOptions = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ seriesBarDistance: 5,
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Line('#chartActivity', data, options, responsiveOptions);
+
+ Chartist.Pie('#chartPreferences', {
+ labels: ['62%', '32%', '6%'],
+ series: [62, 32, 6],
+ });
+ },
+
+ initChartsPage: function () {
+ /* **************** 24 Hours Performance - single line ******************** */
+
+ var dataPerformance = {
+ labels: ['6pm', '9pm', '11pm', '2am', '4am', '8am', '2pm', '5pm', '8pm', '11pm', '4am'],
+ series: [[1, 6, 8, 7, 4, 7, 8, 12, 16, 17, 14, 13]],
+ };
+
+ var optionsPerformance = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '200px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ },
+ low: 0,
+ high: 16,
+ height: '250px',
+ };
+
+ Chartist.Line('#chartPerformance', dataPerformance, optionsPerformance);
+
+ /* **************** 2014 Sales - Bar Chart ******************** */
+
+ var data = {
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ series: [
+ [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895],
+ [412, 243, 280, 580, 453, 353, 300, 364, 368, 410, 636, 695],
+ ],
+ };
+
+ var options = {
+ seriesBarDistance: 10,
+ axisX: {
+ showGrid: false,
+ },
+ height: '250px',
+ };
+
+ var responsiveOptions = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ seriesBarDistance: 5,
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Bar('#chartActivity', data, options, responsiveOptions);
+
+ /* **************** NASDAQ: AAPL - single line with points ******************** */
+
+ var dataStock = {
+ labels: ["'07", "'08", "'09", "'10", "'11", "'12", "'13", "'14", "'15"],
+ series: [[22.2, 34.9, 42.28, 51.93, 62.21, 80.23, 62.21, 82.12, 102.5, 107.23]],
+ };
+
+ var optionsStock = {
+ lineSmooth: false,
+ height: '200px',
+ axisY: {
+ offset: 40,
+ labelInterpolationFnc: function (value) {
+ return '$' + value;
+ },
+ },
+ low: 10,
+ height: '250px',
+ high: 110,
+ classNames: {
+ point: 'ct-point ct-green',
+ line: 'ct-line ct-green',
+ },
+ };
+
+ Chartist.Line('#chartStock', dataStock, optionsStock);
+
+ /* **************** Views - barchart ******************** */
+
+ var dataViews = {
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ series: [[542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]],
+ };
+
+ var optionsViews = {
+ seriesBarDistance: 10,
+ classNames: {
+ bar: 'ct-bar',
+ },
+ axisX: {
+ showGrid: false,
+ },
+ height: '250px',
+ };
+
+ var responsiveOptionsViews = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ seriesBarDistance: 5,
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Bar('#chartViews', dataViews, optionsViews, responsiveOptionsViews);
+ },
+
+ showSwal: function (type) {
+ if (type == 'basic') {
+ swal({
+ title: "Here's a message!",
+ buttonsStyling: false,
+ confirmButtonClass: 'btn btn-success btn-fill',
+ });
+ } else if (type == 'title-and-text') {
+ swal({
+ title: "Here's a message!",
+ text: "It's pretty, isn't it?",
+ buttonsStyling: false,
+ confirmButtonClass: 'btn btn-info btn-fill',
+ });
+ } else if (type == 'success-message') {
+ swal({
+ title: 'Good job!',
+ text: 'You clicked the button!',
+ buttonsStyling: false,
+ confirmButtonClass: 'btn btn-success btn-fill',
+ type: 'success',
+ });
+ } else if (type == 'warning-message-and-confirmation') {
+ swal({
+ title: 'Are you sure?',
+ text: "You won't be able to revert this!",
+ type: 'warning',
+ showCancelButton: true,
+ confirmButtonClass: 'btn btn-success btn-fill',
+ cancelButtonClass: 'btn btn-danger btn-fill',
+ confirmButtonText: 'Yes, delete it!',
+ buttonsStyling: false,
+ }).then(function () {
+ swal({
+ title: 'Deleted!',
+ text: 'Your file has been deleted.',
+ type: 'success',
+ confirmButtonClass: 'btn btn-success btn-fill',
+ buttonsStyling: false,
+ });
+ });
+ } else if (type == 'warning-message-and-cancel') {
+ swal({
+ title: 'Are you sure?',
+ text: 'You will not be able to recover this imaginary file!',
+ type: 'warning',
+ showCancelButton: true,
+ confirmButtonText: 'Yes, delete it!',
+ cancelButtonText: 'No, keep it',
+ confirmButtonClass: 'btn btn-success btn-fill',
+ cancelButtonClass: 'btn btn-danger btn-fill',
+ buttonsStyling: false,
+ }).then(
+ function () {
+ swal({
+ title: 'Deleted!',
+ text: 'Your imaginary file has been deleted.',
+ type: 'success',
+ confirmButtonClass: 'btn btn-success btn-fill',
+ buttonsStyling: false,
+ });
+ },
+ function (dismiss) {
+ // dismiss can be 'overlay', 'cancel', 'close', 'esc', 'timer'
+ if (dismiss === 'cancel') {
+ swal({
+ title: 'Cancelled',
+ text: 'Your imaginary file is safe :)',
+ type: 'error',
+ confirmButtonClass: 'btn btn-info btn-fill',
+ buttonsStyling: false,
+ });
+ }
+ }
+ );
+ } else if (type == 'custom-html') {
+ swal({
+ title: 'HTML example',
+ buttonsStyling: false,
+ confirmButtonClass: 'btn btn-success btn-fill',
+ html: 'You can use bold text, ' + 'links ' + 'and other HTML tags',
+ });
+ } else if (type == 'auto-close') {
+ swal({ title: 'Auto close alert!', text: 'I will close in 2 seconds.', timer: 2000, showConfirmButton: false });
+ } else if (type == 'input-field') {
+ swal({
+ title: 'Input something',
+ html: '' + '' + '
',
+ showCancelButton: true,
+ confirmButtonClass: 'btn btn-success btn-fill',
+ cancelButtonClass: 'btn btn-danger btn-fill',
+ buttonsStyling: false,
+ })
+ .then(function (result) {
+ swal({
+ type: 'success',
+ html: 'You entered: ' + $('#input-field').val() + '',
+ confirmButtonClass: 'btn btn-success btn-fill',
+ buttonsStyling: false,
+ });
+ })
+ .catch(swal.noop);
+ }
+ },
+
+ checkFullPageBackgroundImage: function () {
+ $page = $('.full-page');
+ image_src = $page.data('image');
+
+ if (image_src !== undefined) {
+ image_container = '';
+ $page.append(image_container);
+ }
+ },
+
+ initWizard: function () {
+ $(document).ready(function () {
+ var $validator = $('#wizardForm').validate({
+ rules: {
+ email: {
+ required: true,
+ email: true,
+ minlength: 5,
+ },
+ first_name: {
+ required: false,
+ minlength: 5,
+ },
+ last_name: {
+ required: false,
+ minlength: 5,
+ },
+ website: {
+ required: true,
+ minlength: 5,
+ url: true,
+ },
+ framework: {
+ required: false,
+ minlength: 4,
+ },
+ cities: {
+ required: true,
+ },
+ price: {
+ number: true,
+ },
+ },
+ });
+
+ // you can also use the nav-pills-[blue | azure | green | orange | red] for a different color of wizard
+ $('#wizardCard').bootstrapWizard({
+ tabClass: 'nav nav-pills',
+ nextSelector: '.btn-next',
+ previousSelector: '.btn-back',
+ onNext: function (tab, navigation, index) {
+ var $valid = $('#wizardForm').valid();
+
+ if (!$valid) {
+ $validator.focusInvalid();
+ return false;
+ }
+ },
+ onInit: function (tab, navigation, index) {
+ //check number of tabs and fill the entire row
+ var $total = navigation.find('li').length;
+ $width = 100 / $total;
+
+ $display_width = $(document).width();
+
+ if ($display_width < 600 && $total > 3) {
+ $width = 50;
+ }
+
+ navigation.find('li').css('width', $width + '%');
+ },
+ onTabClick: function (tab, navigation, index) {
+ // Disable the posibility to click on tabs
+ return false;
+ },
+ onTabShow: function (tab, navigation, index) {
+ var $total = navigation.find('li').length;
+ var $current = index + 1;
+
+ var wizard = navigation.closest('.card-wizard');
+
+ // If it's the last tab then hide the last button and show the finish instead
+ if ($current >= $total) {
+ $(wizard).find('.btn-next').hide();
+ $(wizard).find('.btn-finish').show();
+ } else if ($current == 1) {
+ $(wizard).find('.btn-back').hide();
+ } else {
+ $(wizard).find('.btn-back').show();
+ $(wizard).find('.btn-next').show();
+ $(wizard).find('.btn-finish').hide();
+ }
+ },
+ });
+ });
+
+ function onFinishWizard() {
+ //here you can do something, sent the form to server via ajax and show a success message with swal
+
+ swal('Good job!', 'You clicked the finish button!', 'success');
+ }
+ },
+
+ initFormExtendedSliders: function () {
+ // Sliders for demo purpose in refine cards section
+ var slider = document.getElementById('sliderRegular');
+
+ noUiSlider.create(slider, {
+ start: 40,
+ connect: [true, false],
+ range: {
+ min: 0,
+ max: 100,
+ },
+ });
+
+ var slider2 = document.getElementById('sliderDouble');
+
+ noUiSlider.create(slider2, {
+ start: [20, 60],
+ connect: true,
+ range: {
+ min: 0,
+ max: 100,
+ },
+ });
+ },
+
+ initFormExtendedDatetimepickers: function () {
+ $('.datetimepicker').datetimepicker({
+ icons: {
+ time: 'fa fa-clock-o',
+ date: 'fa fa-calendar',
+ up: 'fa fa-chevron-up',
+ down: 'fa fa-chevron-down',
+ previous: 'fa fa-chevron-left',
+ next: 'fa fa-chevron-right',
+ today: 'fa fa-screenshot',
+ clear: 'fa fa-trash',
+ close: 'fa fa-remove',
+ },
+ });
+
+ $('.datepicker').datetimepicker({
+ format: 'MM/DD/YYYY', //use this format if you want the 12hours timpiecker with AM/PM toggle
+ icons: {
+ time: 'fa fa-clock-o',
+ date: 'fa fa-calendar',
+ up: 'fa fa-chevron-up',
+ down: 'fa fa-chevron-down',
+ previous: 'fa fa-chevron-left',
+ next: 'fa fa-chevron-right',
+ today: 'fa fa-screenshot',
+ clear: 'fa fa-trash',
+ close: 'fa fa-remove',
+ },
+ });
+
+ $('.timepicker').datetimepicker({
+ // format: 'H:mm', // use this format if you want the 24hours timepicker
+ format: 'h:mm A', //use this format if you want the 12hours timpiecker with AM/PM toggle
+ icons: {
+ time: 'fa fa-clock-o',
+ date: 'fa fa-calendar',
+ up: 'fa fa-chevron-up',
+ down: 'fa fa-chevron-down',
+ previous: 'fa fa-chevron-left',
+ next: 'fa fa-chevron-right',
+ today: 'fa fa-screenshot',
+ clear: 'fa fa-trash',
+ close: 'fa fa-remove',
+ },
+ });
+ },
+
+ initFullCalendar: function () {
+ $calendar = $('#fullCalendar');
+
+ today = new Date();
+ y = today.getFullYear();
+ m = today.getMonth();
+ d = today.getDate();
+
+ $calendar.fullCalendar({
+ viewRender: function (view, element) {
+ // We make sure that we activate the perfect scrollbar when the view isn't on Month
+ if (view.name != 'month') {
+ $(element).find('.fc-scroller').perfectScrollbar();
+ }
+ },
+ header: {
+ left: 'title',
+ center: 'month,agendaWeek,agendaDay',
+ right: 'prev,next,today',
+ },
+ defaultDate: today,
+ selectable: true,
+ selectHelper: true,
+ views: {
+ month: {
+ // name of view
+ titleFormat: 'MMMM YYYY',
+ // other view-specific options here
+ },
+ week: {
+ titleFormat: ' MMMM D YYYY',
+ },
+ day: {
+ titleFormat: 'D MMM, YYYY',
+ },
+ },
+
+ select: function (start, end) {
+ // on select we show the Sweet Alert modal with an input
+ swal({
+ title: 'Create an Event',
+ html: '' + '' + '
',
+ showCancelButton: true,
+ confirmButtonClass: 'btn btn-success',
+ cancelButtonClass: 'btn btn-danger',
+ buttonsStyling: false,
+ }).then(function (result) {
+ var eventData;
+ event_title = $('#input-field').val();
+
+ if (event_title) {
+ eventData = {
+ title: event_title,
+ start: start,
+ end: end,
+ };
+ $calendar.fullCalendar('renderEvent', eventData, true); // stick? = true
+ }
+
+ $calendar.fullCalendar('unselect');
+ });
+ },
+ editable: true,
+ eventLimit: true, // allow "more" link when too many events
+
+ // color classes: [ event-blue | event-azure | event-green | event-orange | event-red ]
+ events: [
+ {
+ title: 'All Day Event',
+ start: new Date(y, m, 1),
+ className: 'event-default',
+ },
+ {
+ id: 999,
+ title: 'Repeating Event',
+ start: new Date(y, m, d - 4, 6, 0),
+ allDay: false,
+ className: 'event-rose',
+ },
+ {
+ id: 999,
+ title: 'Repeating Event',
+ start: new Date(y, m, d + 3, 6, 0),
+ allDay: false,
+ className: 'event-rose',
+ },
+ {
+ title: 'Meeting',
+ start: new Date(y, m, d - 1, 10, 30),
+ allDay: false,
+ className: 'event-green',
+ },
+ {
+ title: 'Lunch',
+ start: new Date(y, m, d + 7, 12, 0),
+ end: new Date(y, m, d + 7, 14, 0),
+ allDay: false,
+ className: 'event-red',
+ },
+ {
+ title: 'Md-pro Launch',
+ start: new Date(y, m, d - 2, 12, 0),
+ allDay: true,
+ className: 'event-azure',
+ },
+ {
+ title: 'Birthday Party',
+ start: new Date(y, m, d + 1, 19, 0),
+ end: new Date(y, m, d + 1, 22, 30),
+ allDay: false,
+ className: 'event-azure',
+ },
+ {
+ title: 'Click for Creative Tim',
+ start: new Date(y, m, 21),
+ end: new Date(y, m, 22),
+ url: 'http://www.creative-tim.com/',
+ className: 'event-orange',
+ },
+ {
+ title: 'Click for Google',
+ start: new Date(y, m, 21),
+ end: new Date(y, m, 22),
+ url: 'http://www.creative-tim.com/',
+ className: 'event-orange',
+ },
+ ],
+ });
+ },
+
+ showNotification: function (from, align) {
+ color = Math.floor(Math.random() * 4 + 1);
+
+ $.notify(
+ {
+ icon: 'ti-gift',
+ message: 'Welcome to Paper Dashboard - a beautiful dashboard for every web developer.',
+ },
+ {
+ type: type[color],
+ timer: 4000,
+ placement: {
+ from: from,
+ align: align,
+ },
+ }
+ );
+ },
+
+ initDocumentationCharts: function () {
+ // init single simple line chart
+ var dataPerformance = {
+ labels: ['6pm', '9pm', '11pm', '2am', '4am', '8am', '2pm', '5pm', '8pm', '11pm', '4am'],
+ series: [[1, 6, 8, 7, 4, 7, 8, 12, 16, 17, 14, 13]],
+ };
+
+ var optionsPerformance = {
+ showPoint: false,
+ lineSmooth: true,
+ height: '200px',
+ axisX: {
+ showGrid: false,
+ showLabel: true,
+ },
+ axisY: {
+ offset: 40,
+ },
+ low: 0,
+ high: 16,
+ height: '250px',
+ };
+
+ Chartist.Line('#chartPerformance', dataPerformance, optionsPerformance);
+
+ // init single line with points chart
+ var dataStock = {
+ labels: ["'07", "'08", "'09", "'10", "'11", "'12", "'13", "'14", "'15"],
+ series: [[22.2, 34.9, 42.28, 51.93, 62.21, 80.23, 62.21, 82.12, 102.5, 107.23]],
+ };
+
+ var optionsStock = {
+ lineSmooth: false,
+ height: '200px',
+ axisY: {
+ offset: 40,
+ labelInterpolationFnc: function (value) {
+ return '$' + value;
+ },
+ },
+ low: 10,
+ height: '250px',
+ high: 110,
+ classNames: {
+ point: 'ct-point ct-green',
+ line: 'ct-line ct-green',
+ },
+ };
+
+ Chartist.Line('#chartStock', dataStock, optionsStock);
+
+ // init multiple lines chart
+ var dataSales = {
+ labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'],
+ series: [
+ [287, 385, 490, 562, 594, 626, 698, 895, 952],
+ [67, 152, 193, 240, 387, 435, 535, 642, 744],
+ [23, 113, 67, 108, 190, 239, 307, 410, 410],
+ ],
+ };
+
+ var optionsSales = {
+ lineSmooth: false,
+ low: 0,
+ high: 1000,
+ showArea: true,
+ height: '245px',
+ axisX: {
+ showGrid: false,
+ },
+ lineSmooth: Chartist.Interpolation.simple({
+ divisor: 3,
+ }),
+ showLine: true,
+ showPoint: false,
+ };
+
+ var responsiveSales = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
+
+ // pie chart
+ Chartist.Pie('#chartPreferences', {
+ labels: ['62%', '32%', '6%'],
+ series: [62, 32, 6],
+ });
+
+ // bar chart
+ var dataViews = {
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ series: [[542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]],
+ };
+
+ var optionsViews = {
+ seriesBarDistance: 10,
+ classNames: {
+ bar: 'ct-bar',
+ },
+ axisX: {
+ showGrid: false,
+ },
+ height: '250px',
+ };
+
+ var responsiveOptionsViews = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ seriesBarDistance: 5,
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Bar('#chartViews', dataViews, optionsViews, responsiveOptionsViews);
+
+ // multiple bars chart
+ var data = {
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ series: [
+ [542, 543, 520, 680, 653, 753, 326, 434, 568, 610, 756, 895],
+ [230, 293, 380, 480, 503, 553, 600, 664, 698, 710, 736, 795],
+ ],
+ };
+
+ var options = {
+ seriesBarDistance: 10,
+ axisX: {
+ showGrid: false,
+ },
+ height: '245px',
+ };
+
+ var responsiveOptions = [
+ [
+ 'screen and (max-width: 640px)',
+ {
+ seriesBarDistance: 5,
+ axisX: {
+ labelInterpolationFnc: function (value) {
+ return value[0];
+ },
+ },
+ },
+ ],
+ ];
+
+ Chartist.Line('#chartActivity', data, options, responsiveOptions);
+ },
+};
diff --git a/src/main/webapp/content/js/es6-promise-auto.min.js b/src/main/webapp/content/js/es6-promise-auto.min.js
new file mode 100644
index 0000000..8bc4cef
--- /dev/null
+++ b/src/main/webapp/content/js/es6-promise-auto.min.js
@@ -0,0 +1,389 @@
+!(function (t, e) {
+ 'object' == typeof exports && 'undefined' != typeof module
+ ? (module.exports = e())
+ : 'function' == typeof define && define.amd
+ ? define(e)
+ : (t.ES6Promise = e());
+})(this, function () {
+ 'use strict';
+ function t(t) {
+ return 'function' == typeof t || ('object' == typeof t && null !== t);
+ }
+ function e(t) {
+ return 'function' == typeof t;
+ }
+ function n(t) {
+ I = t;
+ }
+ function r(t) {
+ J = t;
+ }
+ function o() {
+ return function () {
+ return process.nextTick(a);
+ };
+ }
+ function i() {
+ return 'undefined' != typeof H
+ ? function () {
+ H(a);
+ }
+ : c();
+ }
+ function s() {
+ var t = 0,
+ e = new V(a),
+ n = document.createTextNode('');
+ return (
+ e.observe(n, { characterData: !0 }),
+ function () {
+ n.data = t = ++t % 2;
+ }
+ );
+ }
+ function u() {
+ var t = new MessageChannel();
+ return (
+ (t.port1.onmessage = a),
+ function () {
+ return t.port2.postMessage(0);
+ }
+ );
+ }
+ function c() {
+ var t = setTimeout;
+ return function () {
+ return t(a, 1);
+ };
+ }
+ function a() {
+ for (var t = 0; t < G; t += 2) {
+ var e = $[t],
+ n = $[t + 1];
+ e(n), ($[t] = void 0), ($[t + 1] = void 0);
+ }
+ G = 0;
+ }
+ function f() {
+ try {
+ var t = require,
+ e = t('vertx');
+ return (H = e.runOnLoop || e.runOnContext), i();
+ } catch (n) {
+ return c();
+ }
+ }
+ function l(t, e) {
+ var n = arguments,
+ r = this,
+ o = new this.constructor(p);
+ void 0 === o[et] && k(o);
+ var i = r._state;
+ return (
+ i
+ ? !(function () {
+ var t = n[i - 1];
+ J(function () {
+ return x(i, o, t, r._result);
+ });
+ })()
+ : E(r, o, t, e),
+ o
+ );
+ }
+ function h(t) {
+ var e = this;
+ if (t && 'object' == typeof t && t.constructor === e) return t;
+ var n = new e(p);
+ return g(n, t), n;
+ }
+ function p() {}
+ function v() {
+ return new TypeError('You cannot resolve a promise with itself');
+ }
+ function d() {
+ return new TypeError('A promises callback cannot return that same promise.');
+ }
+ function _(t) {
+ try {
+ return t.then;
+ } catch (e) {
+ return (it.error = e), it;
+ }
+ }
+ function y(t, e, n, r) {
+ try {
+ t.call(e, n, r);
+ } catch (o) {
+ return o;
+ }
+ }
+ function m(t, e, n) {
+ J(function (t) {
+ var r = !1,
+ o = y(
+ n,
+ e,
+ function (n) {
+ r || ((r = !0), e !== n ? g(t, n) : S(t, n));
+ },
+ function (e) {
+ r || ((r = !0), j(t, e));
+ },
+ 'Settle: ' + (t._label || ' unknown promise')
+ );
+ !r && o && ((r = !0), j(t, o));
+ }, t);
+ }
+ function b(t, e) {
+ e._state === rt
+ ? S(t, e._result)
+ : e._state === ot
+ ? j(t, e._result)
+ : E(
+ e,
+ void 0,
+ function (e) {
+ return g(t, e);
+ },
+ function (e) {
+ return j(t, e);
+ }
+ );
+ }
+ function w(t, n, r) {
+ n.constructor === t.constructor && r === l && n.constructor.resolve === h
+ ? b(t, n)
+ : r === it
+ ? j(t, it.error)
+ : void 0 === r
+ ? S(t, n)
+ : e(r)
+ ? m(t, n, r)
+ : S(t, n);
+ }
+ function g(e, n) {
+ e === n ? j(e, v()) : t(n) ? w(e, n, _(n)) : S(e, n);
+ }
+ function A(t) {
+ t._onerror && t._onerror(t._result), P(t);
+ }
+ function S(t, e) {
+ t._state === nt && ((t._result = e), (t._state = rt), 0 !== t._subscribers.length && J(P, t));
+ }
+ function j(t, e) {
+ t._state === nt && ((t._state = ot), (t._result = e), J(A, t));
+ }
+ function E(t, e, n, r) {
+ var o = t._subscribers,
+ i = o.length;
+ (t._onerror = null), (o[i] = e), (o[i + rt] = n), (o[i + ot] = r), 0 === i && t._state && J(P, t);
+ }
+ function P(t) {
+ var e = t._subscribers,
+ n = t._state;
+ if (0 !== e.length) {
+ for (var r = void 0, o = void 0, i = t._result, s = 0; s < e.length; s += 3) (r = e[s]), (o = e[s + n]), r ? x(n, r, o, i) : o(i);
+ t._subscribers.length = 0;
+ }
+ }
+ function T() {
+ this.error = null;
+ }
+ function M(t, e) {
+ try {
+ return t(e);
+ } catch (n) {
+ return (st.error = n), st;
+ }
+ }
+ function x(t, n, r, o) {
+ var i = e(r),
+ s = void 0,
+ u = void 0,
+ c = void 0,
+ a = void 0;
+ if (i) {
+ if (((s = M(r, o)), s === st ? ((a = !0), (u = s.error), (s = null)) : (c = !0), n === s)) return void j(n, d());
+ } else (s = o), (c = !0);
+ n._state !== nt || (i && c ? g(n, s) : a ? j(n, u) : t === rt ? S(n, s) : t === ot && j(n, s));
+ }
+ function C(t, e) {
+ try {
+ e(
+ function (e) {
+ g(t, e);
+ },
+ function (e) {
+ j(t, e);
+ }
+ );
+ } catch (n) {
+ j(t, n);
+ }
+ }
+ function O() {
+ return ut++;
+ }
+ function k(t) {
+ (t[et] = ut++), (t._state = void 0), (t._result = void 0), (t._subscribers = []);
+ }
+ function Y(t, e) {
+ (this._instanceConstructor = t),
+ (this.promise = new t(p)),
+ this.promise[et] || k(this.promise),
+ B(e)
+ ? ((this._input = e),
+ (this.length = e.length),
+ (this._remaining = e.length),
+ (this._result = new Array(this.length)),
+ 0 === this.length
+ ? S(this.promise, this._result)
+ : ((this.length = this.length || 0), this._enumerate(), 0 === this._remaining && S(this.promise, this._result)))
+ : j(this.promise, q());
+ }
+ function q() {
+ return new Error('Array Methods must be provided an Array');
+ }
+ function F(t) {
+ return new Y(this, t).promise;
+ }
+ function D(t) {
+ var e = this;
+ return new e(
+ B(t)
+ ? function (n, r) {
+ for (var o = t.length, i = 0; i < o; i++) e.resolve(t[i]).then(n, r);
+ }
+ : function (t, e) {
+ return e(new TypeError('You must pass an array to race.'));
+ }
+ );
+ }
+ function K(t) {
+ var e = this,
+ n = new e(p);
+ return j(n, t), n;
+ }
+ function L() {
+ throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
+ }
+ function N() {
+ throw new TypeError(
+ "Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."
+ );
+ }
+ function U(t) {
+ (this[et] = O()),
+ (this._result = this._state = void 0),
+ (this._subscribers = []),
+ p !== t && ('function' != typeof t && L(), this instanceof U ? C(this, t) : N());
+ }
+ function W() {
+ var t = void 0;
+ if ('undefined' != typeof global) t = global;
+ else if ('undefined' != typeof self) t = self;
+ else
+ try {
+ t = Function('return this')();
+ } catch (e) {
+ throw new Error('polyfill failed because global object is unavailable in this environment');
+ }
+ var n = t.Promise;
+ if (n) {
+ var r = null;
+ try {
+ r = Object.prototype.toString.call(n.resolve());
+ } catch (e) {}
+ if ('[object Promise]' === r && !n.cast) return;
+ }
+ t.Promise = U;
+ }
+ var z = void 0;
+ z = Array.isArray
+ ? Array.isArray
+ : function (t) {
+ return '[object Array]' === Object.prototype.toString.call(t);
+ };
+ var B = z,
+ G = 0,
+ H = void 0,
+ I = void 0,
+ J = function (t, e) {
+ ($[G] = t), ($[G + 1] = e), (G += 2), 2 === G && (I ? I(a) : tt());
+ },
+ Q = 'undefined' != typeof window ? window : void 0,
+ R = Q || {},
+ V = R.MutationObserver || R.WebKitMutationObserver,
+ X = 'undefined' == typeof self && 'undefined' != typeof process && '[object process]' === {}.toString.call(process),
+ Z = 'undefined' != typeof Uint8ClampedArray && 'undefined' != typeof importScripts && 'undefined' != typeof MessageChannel,
+ $ = new Array(1e3),
+ tt = void 0;
+ tt = X ? o() : V ? s() : Z ? u() : void 0 === Q && 'function' == typeof require ? f() : c();
+ var et = Math.random().toString(36).substring(16),
+ nt = void 0,
+ rt = 1,
+ ot = 2,
+ it = new T(),
+ st = new T(),
+ ut = 0;
+ return (
+ (Y.prototype._enumerate = function () {
+ for (var t = this.length, e = this._input, n = 0; this._state === nt && n < t; n++) this._eachEntry(e[n], n);
+ }),
+ (Y.prototype._eachEntry = function (t, e) {
+ var n = this._instanceConstructor,
+ r = n.resolve;
+ if (r === h) {
+ var o = _(t);
+ if (o === l && t._state !== nt) this._settledAt(t._state, e, t._result);
+ else if ('function' != typeof o) this._remaining--, (this._result[e] = t);
+ else if (n === U) {
+ var i = new n(p);
+ w(i, t, o), this._willSettleAt(i, e);
+ } else
+ this._willSettleAt(
+ new n(function (e) {
+ return e(t);
+ }),
+ e
+ );
+ } else this._willSettleAt(r(t), e);
+ }),
+ (Y.prototype._settledAt = function (t, e, n) {
+ var r = this.promise;
+ r._state === nt && (this._remaining--, t === ot ? j(r, n) : (this._result[e] = n)), 0 === this._remaining && S(r, this._result);
+ }),
+ (Y.prototype._willSettleAt = function (t, e) {
+ var n = this;
+ E(
+ t,
+ void 0,
+ function (t) {
+ return n._settledAt(rt, e, t);
+ },
+ function (t) {
+ return n._settledAt(ot, e, t);
+ }
+ );
+ }),
+ (U.all = F),
+ (U.race = D),
+ (U.resolve = h),
+ (U.reject = K),
+ (U._setScheduler = n),
+ (U._setAsap = r),
+ (U._asap = J),
+ (U.prototype = {
+ constructor: U,
+ then: l,
+ catch: function (t) {
+ return this.then(null, t);
+ },
+ }),
+ (U.polyfill = W),
+ (U.Promise = U),
+ U
+ );
+}),
+ ES6Promise.polyfill();
diff --git a/src/main/webapp/content/js/fullcalendar.min.js b/src/main/webapp/content/js/fullcalendar.min.js
new file mode 100644
index 0000000..9dda3e8
--- /dev/null
+++ b/src/main/webapp/content/js/fullcalendar.min.js
@@ -0,0 +1,5687 @@
+/*!
+ * FullCalendar v3.1.0
+ * Docs & License: http://fullcalendar.io/
+ * (c) 2016 Adam Shaw
+ */
+!(function (t) {
+ 'function' == typeof define && define.amd
+ ? define(['jquery', 'moment'], t)
+ : 'object' == typeof exports
+ ? (module.exports = t(require('jquery'), require('moment')))
+ : t(jQuery, moment);
+})(function (t, e) {
+ function n(t) {
+ return q(t, $t);
+ }
+ function i(t, e) {
+ e.left && t.css({ 'border-left-width': 1, 'margin-left': e.left - 1 }),
+ e.right && t.css({ 'border-right-width': 1, 'margin-right': e.right - 1 });
+ }
+ function r(t) {
+ t.css({ 'margin-left': '', 'margin-right': '', 'border-left-width': '', 'border-right-width': '' });
+ }
+ function s() {
+ t('body').addClass('fc-not-allowed');
+ }
+ function o() {
+ t('body').removeClass('fc-not-allowed');
+ }
+ function l(e, n, i) {
+ var r = Math.floor(n / e.length),
+ s = Math.floor(n - r * (e.length - 1)),
+ o = [],
+ l = [],
+ u = [],
+ c = 0;
+ a(e),
+ e.each(function (n, i) {
+ var a = n === e.length - 1 ? s : r,
+ d = t(i).outerHeight(!0);
+ d < a ? (o.push(i), l.push(d), u.push(t(i).height())) : (c += d);
+ }),
+ i && ((n -= c), (r = Math.floor(n / o.length)), (s = Math.floor(n - r * (o.length - 1)))),
+ t(o).each(function (e, n) {
+ var i = e === o.length - 1 ? s : r,
+ a = l[e],
+ c = u[e],
+ d = i - (a - c);
+ a < i && t(n).height(d);
+ });
+ }
+ function a(t) {
+ t.height('');
+ }
+ function u(e) {
+ var n = 0;
+ return (
+ e.find('> *').each(function (e, i) {
+ var r = t(i).outerWidth();
+ r > n && (n = r);
+ }),
+ n++,
+ e.width(n),
+ n
+ );
+ }
+ function c(t, e) {
+ var n,
+ i = t.add(e);
+ return i.css({ position: 'relative', left: -1 }), (n = t.outerHeight() - e.outerHeight()), i.css({ position: '', left: '' }), n;
+ }
+ function d(e) {
+ var n = e.css('position'),
+ i = e
+ .parents()
+ .filter(function () {
+ var e = t(this);
+ return /(auto|scroll)/.test(e.css('overflow') + e.css('overflow-y') + e.css('overflow-x'));
+ })
+ .eq(0);
+ return 'fixed' !== n && i.length ? i : t(e[0].ownerDocument || document);
+ }
+ function h(t, e) {
+ var n = t.offset(),
+ i = n.left - (e ? e.left : 0),
+ r = n.top - (e ? e.top : 0);
+ return { left: i, right: i + t.outerWidth(), top: r, bottom: r + t.outerHeight() };
+ }
+ function f(t, e) {
+ var n = t.offset(),
+ i = p(t),
+ r = n.left + y(t, 'border-left-width') + i.left - (e ? e.left : 0),
+ s = n.top + y(t, 'border-top-width') + i.top - (e ? e.top : 0);
+ return { left: r, right: r + t[0].clientWidth, top: s, bottom: s + t[0].clientHeight };
+ }
+ function g(t, e) {
+ var n = t.offset(),
+ i = n.left + y(t, 'border-left-width') + y(t, 'padding-left') - (e ? e.left : 0),
+ r = n.top + y(t, 'border-top-width') + y(t, 'padding-top') - (e ? e.top : 0);
+ return { left: i, right: i + t.width(), top: r, bottom: r + t.height() };
+ }
+ function p(t) {
+ var e = t.innerWidth() - t[0].clientWidth,
+ n = { left: 0, right: 0, top: 0, bottom: t.innerHeight() - t[0].clientHeight };
+ return v() && 'rtl' == t.css('direction') ? (n.left = e) : (n.right = e), n;
+ }
+ function v() {
+ return null === Qt && (Qt = m()), Qt;
+ }
+ function m() {
+ var e = t('')
+ .css({ position: 'absolute', top: -1e3, left: 0, border: 0, padding: 0, overflow: 'scroll', direction: 'rtl' })
+ .appendTo('body'),
+ n = e.children(),
+ i = n.offset().left > e.offset().left;
+ return e.remove(), i;
+ }
+ function y(t, e) {
+ return parseFloat(t.css(e)) || 0;
+ }
+ function S(t) {
+ return 1 == t.which && !t.ctrlKey;
+ }
+ function w(t) {
+ if (void 0 !== t.pageX) return t.pageX;
+ var e = t.originalEvent.touches;
+ return e ? e[0].pageX : void 0;
+ }
+ function E(t) {
+ if (void 0 !== t.pageY) return t.pageY;
+ var e = t.originalEvent.touches;
+ return e ? e[0].pageY : void 0;
+ }
+ function b(t) {
+ return /^touch/.test(t.type);
+ }
+ function D(t) {
+ t.addClass('fc-unselectable').on('selectstart', T);
+ }
+ function T(t) {
+ t.preventDefault();
+ }
+ function C(t) {
+ return !!window.addEventListener && (window.addEventListener('scroll', t, !0), !0);
+ }
+ function H(t) {
+ return !!window.removeEventListener && (window.removeEventListener('scroll', t, !0), !0);
+ }
+ function R(t, e) {
+ var n = {
+ left: Math.max(t.left, e.left),
+ right: Math.min(t.right, e.right),
+ top: Math.max(t.top, e.top),
+ bottom: Math.min(t.bottom, e.bottom),
+ };
+ return n.left < n.right && n.top < n.bottom && n;
+ }
+ function x(t, e) {
+ return { left: Math.min(Math.max(t.left, e.left), e.right), top: Math.min(Math.max(t.top, e.top), e.bottom) };
+ }
+ function I(t) {
+ return { left: (t.left + t.right) / 2, top: (t.top + t.bottom) / 2 };
+ }
+ function k(t, e) {
+ return { left: t.left - e.left, top: t.top - e.top };
+ }
+ function L(e) {
+ var n,
+ i,
+ r = [],
+ s = [];
+ for (
+ 'string' == typeof e ? (s = e.split(/\s*,\s*/)) : 'function' == typeof e ? (s = [e]) : t.isArray(e) && (s = e), n = 0;
+ n < s.length;
+ n++
+ )
+ (i = s[n]),
+ 'string' == typeof i
+ ? r.push('-' == i.charAt(0) ? { field: i.substring(1), order: -1 } : { field: i, order: 1 })
+ : 'function' == typeof i && r.push({ func: i });
+ return r;
+ }
+ function M(t, e, n) {
+ var i, r;
+ for (i = 0; i < n.length; i++) if ((r = B(t, e, n[i]))) return r;
+ return 0;
+ }
+ function B(t, e, n) {
+ return n.func ? n.func(t, e) : z(t[n.field], e[n.field]) * (n.order || 1);
+ }
+ function z(e, n) {
+ return e || n
+ ? null == n
+ ? -1
+ : null == e
+ ? 1
+ : 'string' === t.type(e) || 'string' === t.type(n)
+ ? String(e).localeCompare(String(n))
+ : e - n
+ : 0;
+ }
+ function F(t, e) {
+ var n,
+ i,
+ r,
+ s,
+ o = t.start,
+ l = t.end,
+ a = e.start,
+ u = e.end;
+ if (l > a && o < u)
+ return (
+ o >= a ? ((n = o.clone()), (r = !0)) : ((n = a.clone()), (r = !1)),
+ l <= u ? ((i = l.clone()), (s = !0)) : ((i = u.clone()), (s = !1)),
+ { start: n, end: i, isStart: r, isEnd: s }
+ );
+ }
+ function N(t, n) {
+ return e.duration({ days: t.clone().stripTime().diff(n.clone().stripTime(), 'days'), ms: t.time() - n.time() });
+ }
+ function G(t, n) {
+ return e.duration({ days: t.clone().stripTime().diff(n.clone().stripTime(), 'days') });
+ }
+ function O(t, n, i) {
+ return e.duration(Math.round(t.diff(n, i, !0)), i);
+ }
+ function A(t, e) {
+ var n, i, r;
+ for (n = 0; n < Kt.length && ((i = Kt[n]), (r = V(i, t, e)), !(r >= 1 && ot(r))); n++);
+ return i;
+ }
+ function V(t, n, i) {
+ return null != i ? i.diff(n, t, !0) : e.isDuration(n) ? n.as(t) : n.end.diff(n.start, t, !0);
+ }
+ function P(t, e, n) {
+ var i;
+ return W(n)
+ ? (e - t) / n
+ : ((i = n.asMonths()), Math.abs(i) >= 1 && ot(i) ? e.diff(t, 'months', !0) / i : e.diff(t, 'days', !0) / n.asDays());
+ }
+ function _(t, e) {
+ var n, i;
+ return W(t) || W(e)
+ ? t / e
+ : ((n = t.asMonths()), (i = e.asMonths()), Math.abs(n) >= 1 && ot(n) && Math.abs(i) >= 1 && ot(i) ? n / i : t.asDays() / e.asDays());
+ }
+ function Y(t, n) {
+ var i;
+ return W(t)
+ ? e.duration(t * n)
+ : ((i = t.asMonths()), Math.abs(i) >= 1 && ot(i) ? e.duration({ months: i * n }) : e.duration({ days: t.asDays() * n }));
+ }
+ function W(t) {
+ return Boolean(t.hours() || t.minutes() || t.seconds() || t.milliseconds());
+ }
+ function U(t) {
+ return '[object Date]' === Object.prototype.toString.call(t) || t instanceof Date;
+ }
+ function j(t) {
+ return /^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t);
+ }
+ function q(t, e) {
+ var n,
+ i,
+ r,
+ s,
+ o,
+ l,
+ a = {};
+ if (e)
+ for (n = 0; n < e.length; n++) {
+ for (i = e[n], r = [], s = t.length - 1; s >= 0; s--)
+ if (((o = t[s][i]), 'object' == typeof o)) r.unshift(o);
+ else if (void 0 !== o) {
+ a[i] = o;
+ break;
+ }
+ r.length && (a[i] = q(r));
+ }
+ for (n = t.length - 1; n >= 0; n--) {
+ l = t[n];
+ for (i in l) i in a || (a[i] = l[i]);
+ }
+ return a;
+ }
+ function Z(t) {
+ var e = function () {};
+ return (e.prototype = t), new e();
+ }
+ function $(t, e) {
+ for (var n in t) Q(t, n) && (e[n] = t[n]);
+ }
+ function Q(t, e) {
+ return Jt.call(t, e);
+ }
+ function X(e) {
+ return /undefined|null|boolean|number|string/.test(t.type(e));
+ }
+ function K(e, n, i) {
+ if ((t.isFunction(e) && (e = [e]), e)) {
+ var r, s;
+ for (r = 0; r < e.length; r++) s = e[r].apply(n, i) || s;
+ return s;
+ }
+ }
+ function J() {
+ for (var t = 0; t < arguments.length; t++) if (void 0 !== arguments[t]) return arguments[t];
+ }
+ function tt(t) {
+ return (t + '')
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/'/g, ''')
+ .replace(/"/g, '"')
+ .replace(/\n/g, '
');
+ }
+ function et(t) {
+ return t.replace(/&.*?;/g, '');
+ }
+ function nt(e) {
+ var n = [];
+ return (
+ t.each(e, function (t, e) {
+ null != e && n.push(t + ':' + e);
+ }),
+ n.join(';')
+ );
+ }
+ function it(e) {
+ var n = [];
+ return (
+ t.each(e, function (t, e) {
+ null != e && n.push(t + '="' + tt(e) + '"');
+ }),
+ n.join(' ')
+ );
+ }
+ function rt(t) {
+ return t.charAt(0).toUpperCase() + t.slice(1);
+ }
+ function st(t, e) {
+ return t - e;
+ }
+ function ot(t) {
+ return t % 1 === 0;
+ }
+ function lt(t, e) {
+ var n = t[e];
+ return function () {
+ return n.apply(t, arguments);
+ };
+ }
+ function at(t, e, n) {
+ var i,
+ r,
+ s,
+ o,
+ l,
+ a = function () {
+ var u = +new Date() - o;
+ u < e ? (i = setTimeout(a, e - u)) : ((i = null), n || ((l = t.apply(s, r)), (s = r = null)));
+ };
+ return function () {
+ (s = this), (r = arguments), (o = +new Date());
+ var u = n && !i;
+ return i || (i = setTimeout(a, e)), u && ((l = t.apply(s, r)), (s = r = null)), l;
+ };
+ }
+ function ut(n, i, r) {
+ var s,
+ o,
+ l,
+ a,
+ u = n[0],
+ c = 1 == n.length && 'string' == typeof u;
+ return (
+ e.isMoment(u) || U(u) || void 0 === u
+ ? (a = e.apply(null, n))
+ : ((s = !1),
+ (o = !1),
+ c
+ ? te.test(u)
+ ? ((u += '-01'), (n = [u]), (s = !0), (o = !0))
+ : (l = ee.exec(u)) && ((s = !l[5]), (o = !0))
+ : t.isArray(u) && (o = !0),
+ (a = i || s ? e.utc.apply(e, n) : e.apply(null, n)),
+ s ? ((a._ambigTime = !0), (a._ambigZone = !0)) : r && (o ? (a._ambigZone = !0) : c && a.utcOffset(u))),
+ (a._fullCalendar = !0),
+ a
+ );
+ }
+ function ct(t, e) {
+ return ie.format.call(t, e);
+ }
+ function dt(t, e) {
+ return ht(t, mt(e));
+ }
+ function ht(t, e) {
+ var n,
+ i = '';
+ for (n = 0; n < e.length; n++) i += ft(t, e[n]);
+ return i;
+ }
+ function ft(t, e) {
+ var n, i;
+ return 'string' == typeof e
+ ? e
+ : (n = e.token)
+ ? se[n]
+ ? se[n](t)
+ : ct(t, n)
+ : e.maybe && ((i = ht(t, e.maybe)), i.match(/[1-9]/))
+ ? i
+ : '';
+ }
+ function gt(t, e, n, i, r) {
+ var s;
+ return (
+ (t = qt.moment.parseZone(t)),
+ (e = qt.moment.parseZone(e)),
+ (s = t.localeData()),
+ (n = s.longDateFormat(n) || n),
+ (i = i || ' - '),
+ pt(t, e, mt(n), i, r)
+ );
+ }
+ function pt(t, e, n, i, r) {
+ var s,
+ o,
+ l,
+ a,
+ u = t.clone().stripZone(),
+ c = e.clone().stripZone(),
+ d = '',
+ h = '',
+ f = '',
+ g = '',
+ p = '';
+ for (o = 0; o < n.length && ((s = vt(t, e, u, c, n[o])), s !== !1); o++) d += s;
+ for (l = n.length - 1; l > o && ((s = vt(t, e, u, c, n[l])), s !== !1); l--) h = s + h;
+ for (a = o; a <= l; a++) (f += ft(t, n[a])), (g += ft(e, n[a]));
+ return (f || g) && (p = r ? g + i + f : f + i + g), d + p + h;
+ }
+ function vt(t, e, n, i, r) {
+ var s, o;
+ return 'string' == typeof r ? r : !!((s = r.token) && ((o = oe[s.charAt(0)]), o && n.isSame(i, o))) && ct(t, s);
+ }
+ function mt(t) {
+ return t in le ? le[t] : (le[t] = yt(t));
+ }
+ function yt(t) {
+ for (var e, n = [], i = /\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g; (e = i.exec(t)); )
+ e[1] ? n.push(e[1]) : e[2] ? n.push({ maybe: yt(e[2]) }) : e[3] ? n.push({ token: e[3] }) : e[5] && n.push(e[5]);
+ return n;
+ }
+ function St() {}
+ function wt(t, e) {
+ var n;
+ return (
+ Q(e, 'constructor') && (n = e.constructor),
+ 'function' != typeof n &&
+ (n = e.constructor =
+ function () {
+ t.apply(this, arguments);
+ }),
+ (n.prototype = Z(t.prototype)),
+ $(e, n.prototype),
+ $(t, n),
+ n
+ );
+ }
+ function Et(t, e) {
+ $(e, t.prototype);
+ }
+ function bt(e) {
+ var n = t.Deferred(),
+ i = n.promise();
+ if (
+ ('function' == typeof e &&
+ e(
+ function (t) {
+ bt.immediate && (i._value = t), n.resolve(t);
+ },
+ function () {
+ n.reject();
+ }
+ ),
+ bt.immediate)
+ ) {
+ var r = i.then;
+ i.then = function (t, e) {
+ var n = i.state();
+ if ('resolved' === n) {
+ if ('function' == typeof t) return bt.resolve(t(i._value));
+ } else if ('rejected' === n && 'function' == typeof e) return e(), i;
+ return r.call(i, t, e);
+ };
+ }
+ return i;
+ }
+ function Dt(t) {
+ function e(t) {
+ return new bt(function (e) {
+ var i = function () {
+ bt.resolve(t())
+ .then(e)
+ .then(function () {
+ n.shift(), n.length && n[0]();
+ });
+ };
+ n.push(i), 1 === n.length && i();
+ });
+ }
+ var n = [];
+ (this.add = 'number' == typeof t ? at(e, t) : e), (this.addQuickly = e);
+ }
+ function Tt(t, e) {
+ return (!t && !e) || (!(!t || !e) && t.component === e.component && Ct(t, e) && Ct(e, t));
+ }
+ function Ct(t, e) {
+ for (var n in t) if (!/^(component|left|right|top|bottom)$/.test(n) && t[n] !== e[n]) return !1;
+ return !0;
+ }
+ function Ht(t) {
+ return { start: t.start.clone(), end: t.end ? t.end.clone() : null, allDay: t.allDay };
+ }
+ function Rt(t) {
+ var e = It(t);
+ return 'background' === e || 'inverse-background' === e;
+ }
+ function xt(t) {
+ return 'inverse-background' === It(t);
+ }
+ function It(t) {
+ return J((t.source || {}).rendering, t.rendering);
+ }
+ function kt(t) {
+ var e,
+ n,
+ i = {};
+ for (e = 0; e < t.length; e++) (n = t[e]), (i[n._id] || (i[n._id] = [])).push(n);
+ return i;
+ }
+ function Lt(t, e) {
+ return t.start - e.start;
+ }
+ function Mt(n) {
+ var i,
+ r,
+ s,
+ o,
+ l = qt.dataAttrPrefix;
+ return (
+ l && (l += '-'),
+ (i = n.data(l + 'event') || null),
+ i &&
+ ((i = 'object' == typeof i ? t.extend({}, i) : {}),
+ (r = i.start),
+ null == r && (r = i.time),
+ (s = i.duration),
+ (o = i.stick),
+ delete i.start,
+ delete i.time,
+ delete i.duration,
+ delete i.stick),
+ null == r && (r = n.data(l + 'start')),
+ null == r && (r = n.data(l + 'time')),
+ null == s && (s = n.data(l + 'duration')),
+ null == o && (o = n.data(l + 'stick')),
+ (r = null != r ? e.duration(r) : null),
+ (s = null != s ? e.duration(s) : null),
+ (o = Boolean(o)),
+ { eventProps: i, startTime: r, duration: s, stick: o }
+ );
+ }
+ function Bt(t, e) {
+ var n, i;
+ for (n = 0; n < e.length; n++) if (((i = e[n]), i.leftCol <= t.rightCol && i.rightCol >= t.leftCol)) return !0;
+ return !1;
+ }
+ function zt(t, e) {
+ return t.leftCol - e.leftCol;
+ }
+ function Ft(t) {
+ var e,
+ n,
+ i,
+ r = [];
+ for (e = 0; e < t.length; e++) {
+ for (n = t[e], i = 0; i < r.length && Ot(n, r[i]).length; i++);
+ (n.level = i), (r[i] || (r[i] = [])).push(n);
+ }
+ return r;
+ }
+ function Nt(t) {
+ var e, n, i, r, s;
+ for (e = 0; e < t.length; e++)
+ for (n = t[e], i = 0; i < n.length; i++) for (r = n[i], r.forwardSegs = [], s = e + 1; s < t.length; s++) Ot(r, t[s], r.forwardSegs);
+ }
+ function Gt(t) {
+ var e,
+ n,
+ i = t.forwardSegs,
+ r = 0;
+ if (void 0 === t.forwardPressure) {
+ for (e = 0; e < i.length; e++) (n = i[e]), Gt(n), (r = Math.max(r, 1 + n.forwardPressure));
+ t.forwardPressure = r;
+ }
+ }
+ function Ot(t, e, n) {
+ n = n || [];
+ for (var i = 0; i < e.length; i++) At(t, e[i]) && n.push(e[i]);
+ return n;
+ }
+ function At(t, e) {
+ return t.bottom > e.top && t.top < e.bottom;
+ }
+ function Vt(t) {
+ this.items = t || [];
+ }
+ function Pt(e, n) {
+ function i(t) {
+ n = t;
+ }
+ function r() {
+ var i = n.layout;
+ (p = e.options.theme ? 'ui' : 'fc'),
+ i
+ ? (g ? g.empty() : (g = this.el = t("")),
+ g.append(o('left')).append(o('right')).append(o('center')).append(''))
+ : s();
+ }
+ function s() {
+ g && (g.remove(), (g = f.el = null));
+ }
+ function o(i) {
+ var r = t(''),
+ s = n.layout[i];
+ return (
+ s &&
+ t.each(s.split(' '), function (n) {
+ var i,
+ s = t(),
+ o = !0;
+ t.each(this.split(','), function (n, i) {
+ var r, l, a, u, c, d, h, f, g, m;
+ 'title' == i
+ ? ((s = s.add(t('
'))), (o = !1))
+ : ((r = (e.options.customButtons || {})[i])
+ ? ((a = function (t) {
+ r.click && r.click.call(m[0], t);
+ }),
+ (u = ''),
+ (c = r.text))
+ : (l = e.getViewSpec(i))
+ ? ((a = function () {
+ e.changeView(i);
+ }),
+ v.push(i),
+ (u = l.buttonTextOverride),
+ (c = l.buttonTextDefault))
+ : e[i] &&
+ ((a = function () {
+ e[i]();
+ }),
+ (u = (e.overrides.buttonText || {})[i]),
+ (c = e.options.buttonText[i])),
+ a &&
+ ((d = r ? r.themeIcon : e.options.themeButtonIcons[i]),
+ (h = r ? r.icon : e.options.buttonIcons[i]),
+ (f = u
+ ? tt(u)
+ : d && e.options.theme
+ ? ""
+ : h && !e.options.theme
+ ? ""
+ : tt(c)),
+ (g = ['fc-' + i + '-button', p + '-button', p + '-state-default']),
+ (m = t('')
+ .click(function (t) {
+ m.hasClass(p + '-state-disabled') ||
+ (a(t),
+ (m.hasClass(p + '-state-active') || m.hasClass(p + '-state-disabled')) && m.removeClass(p + '-state-hover'));
+ })
+ .mousedown(function () {
+ m.not('.' + p + '-state-active')
+ .not('.' + p + '-state-disabled')
+ .addClass(p + '-state-down');
+ })
+ .mouseup(function () {
+ m.removeClass(p + '-state-down');
+ })
+ .hover(
+ function () {
+ m.not('.' + p + '-state-active')
+ .not('.' + p + '-state-disabled')
+ .addClass(p + '-state-hover');
+ },
+ function () {
+ m.removeClass(p + '-state-hover').removeClass(p + '-state-down');
+ }
+ )),
+ (s = s.add(m))));
+ }),
+ o &&
+ s
+ .first()
+ .addClass(p + '-corner-left')
+ .end()
+ .last()
+ .addClass(p + '-corner-right')
+ .end(),
+ s.length > 1 ? ((i = t('')), o && i.addClass('fc-button-group'), i.append(s), r.append(i)) : r.append(s);
+ }),
+ r
+ );
+ }
+ function l(t) {
+ g && g.find('h2').text(t);
+ }
+ function a(t) {
+ g && g.find('.fc-' + t + '-button').addClass(p + '-state-active');
+ }
+ function u(t) {
+ g && g.find('.fc-' + t + '-button').removeClass(p + '-state-active');
+ }
+ function c(t) {
+ g &&
+ g
+ .find('.fc-' + t + '-button')
+ .prop('disabled', !0)
+ .addClass(p + '-state-disabled');
+ }
+ function d(t) {
+ g &&
+ g
+ .find('.fc-' + t + '-button')
+ .prop('disabled', !1)
+ .removeClass(p + '-state-disabled');
+ }
+ function h() {
+ return v;
+ }
+ var f = this;
+ (f.setToolbarOptions = i),
+ (f.render = r),
+ (f.removeElement = s),
+ (f.updateTitle = l),
+ (f.activateButton = a),
+ (f.deactivateButton = u),
+ (f.disableButton = c),
+ (f.enableButton = d),
+ (f.getViewsWithButtons = h),
+ (f.el = null);
+ var g,
+ p,
+ v = [];
+ }
+ function _t(n, i) {
+ function r(t) {
+ t._locale = Y;
+ }
+ function s() {
+ q ? a() && (f(), u()) : o();
+ }
+ function o() {
+ n.addClass('fc'),
+ n.on('click.fc', 'a[data-goto]', function (e) {
+ var n = t(this),
+ i = n.data('goto'),
+ r = _.moment(i.date),
+ s = i.type,
+ o = Q.opt('navLink' + rt(s) + 'Click');
+ 'function' == typeof o ? o(r, e) : ('string' == typeof o && (s = o), B(r, s));
+ }),
+ _.bindOption('theme', function (t) {
+ ($ = t ? 'ui' : 'fc'), n.toggleClass('ui-widget', t), n.toggleClass('fc-unthemed', !t);
+ }),
+ _.bindOptions(['isRTL', 'locale'], function (t) {
+ n.toggleClass('fc-ltr', !t), n.toggleClass('fc-rtl', t);
+ }),
+ (q = t("").prependTo(n));
+ var e = y();
+ (W = new Vt(e)),
+ (U = _.header = e[0]),
+ (j = _.footer = e[1]),
+ E(),
+ b(),
+ u(_.options.defaultView),
+ _.options.handleWindowResize && ((K = at(v, _.options.windowResizeDelay)), t(window).resize(K));
+ }
+ function l() {
+ Q && Q.removeElement(),
+ W.proxyCall('removeElement'),
+ q.remove(),
+ n.removeClass('fc fc-ltr fc-rtl fc-unthemed ui-widget'),
+ n.off('.fc'),
+ K && t(window).unbind('resize', K);
+ }
+ function a() {
+ return n.is(':visible');
+ }
+ function u(e, n) {
+ nt++;
+ var i = Q && e && Q.type !== e;
+ i && (F(), c()),
+ !Q &&
+ e &&
+ ((Q = _.view = et[e] || (et[e] = _.instantiateView(e))),
+ Q.setElement(t("").appendTo(q)),
+ W.proxyCall('activateButton', e)),
+ Q &&
+ ((J = Q.massageCurrentDate(J)),
+ (Q.isDateSet && J >= Q.intervalStart && J < Q.intervalEnd) ||
+ (a() && (n && Q.captureInitialScroll(n), Q.setDate(J, n), n && Q.releaseScroll(), D()))),
+ i && N(),
+ nt--;
+ }
+ function c() {
+ W.proxyCall('deactivateButton', Q.type), Q.removeElement(), (Q = _.view = null);
+ }
+ function d() {
+ nt++, F();
+ var t = Q.type,
+ e = Q.queryScroll();
+ c(), f(), u(t, e), N(), nt--;
+ }
+ function h(t) {
+ if (a()) return t && g(), nt++, Q.updateSize(!0), nt--, !0;
+ }
+ function f() {
+ a() && g();
+ }
+ function g() {
+ var t = _.options.contentHeight,
+ e = _.options.height;
+ X =
+ 'number' == typeof t
+ ? t
+ : 'function' == typeof t
+ ? t()
+ : 'number' == typeof e
+ ? e - p()
+ : 'function' == typeof e
+ ? e() - p()
+ : 'parent' === e
+ ? n.parent().height() - p()
+ : Math.round(q.width() / Math.max(_.options.aspectRatio, 0.5));
+ }
+ function p() {
+ return W.items.reduce(function (t, e) {
+ var n = e.el ? e.el.outerHeight(!0) : 0;
+ return t + n;
+ }, 0);
+ }
+ function v(t) {
+ !nt && t.target === window && Q.start && h(!0) && Q.publiclyTrigger('windowResize', tt);
+ }
+ function m() {
+ a() && _.reportEventChange();
+ }
+ function y() {
+ return [new Pt(_, S()), new Pt(_, w())];
+ }
+ function S() {
+ return { extraClasses: 'fc-header-toolbar', layout: _.options.header };
+ }
+ function w() {
+ return { extraClasses: 'fc-footer-toolbar', layout: _.options.footer };
+ }
+ function E() {
+ U.setToolbarOptions(S()), U.render(), U.el && n.prepend(U.el);
+ }
+ function b() {
+ j.setToolbarOptions(w()), j.render(), j.el && n.append(j.el);
+ }
+ function D() {
+ var t = _.getNow();
+ t >= Q.intervalStart && t < Q.intervalEnd ? W.proxyCall('disableButton', 'today') : W.proxyCall('enableButton', 'today');
+ }
+ function T(t, e) {
+ Q.select(_.buildSelectSpan.apply(_, arguments));
+ }
+ function C() {
+ Q && Q.unselect();
+ }
+ function H() {
+ (J = Q.computePrevDate(J)), u();
+ }
+ function R() {
+ (J = Q.computeNextDate(J)), u();
+ }
+ function x() {
+ J.add(-1, 'years'), u();
+ }
+ function I() {
+ J.add(1, 'years'), u();
+ }
+ function k() {
+ (J = _.getNow()), u();
+ }
+ function L(t) {
+ (J = _.moment(t).stripZone()), u();
+ }
+ function M(t) {
+ J.add(e.duration(t)), u();
+ }
+ function B(t, e) {
+ var n;
+ (e = e || 'day'), (n = _.getViewSpec(e) || _.getUnitViewSpec(e)), (J = t.clone()), u(n ? n.type : null);
+ }
+ function z() {
+ return _.applyTimezone(J);
+ }
+ function F() {
+ it++ || q.css({ width: '100%', height: q.height(), overflow: 'hidden' });
+ }
+ function N() {
+ --it || q.css({ width: '', height: '', overflow: '' });
+ }
+ function G() {
+ return _;
+ }
+ function O() {
+ return Q;
+ }
+ function A(t, e) {
+ var n;
+ if ('string' == typeof t) {
+ if (void 0 === e) return _.options[t];
+ (n = {}), (n[t] = e), V(n);
+ } else 'object' == typeof t && V(t);
+ }
+ function V(t) {
+ var e,
+ n = 0;
+ for (e in t) _.dynamicOverrides[e] = t[e];
+ (_.viewSpecCache = {}), _.populateOptionsHash();
+ for (e in t) _.triggerOptionHandlers(e), n++;
+ if (1 === n) {
+ if ('height' === e || 'contentHeight' === e || 'aspectRatio' === e) return void h(!0);
+ if ('defaultDate' === e) return;
+ if ('businessHours' === e) return void (Q && (Q.unrenderBusinessHours(), Q.renderBusinessHours()));
+ if ('timezone' === e) return _.rezoneArrayEventSources(), void _.refetchEvents();
+ }
+ E(), b(), (et = {}), d();
+ }
+ function P(t, e) {
+ var n = Array.prototype.slice.call(arguments, 2);
+ if (((e = e || tt), this.triggerWith(t, e, n), _.options[t])) return _.options[t].apply(e, n);
+ }
+ var _ = this;
+ (_.render = s),
+ (_.destroy = l),
+ (_.rerenderEvents = m),
+ (_.changeView = u),
+ (_.select = T),
+ (_.unselect = C),
+ (_.prev = H),
+ (_.next = R),
+ (_.prevYear = x),
+ (_.nextYear = I),
+ (_.today = k),
+ (_.gotoDate = L),
+ (_.incrementDate = M),
+ (_.zoomTo = B),
+ (_.getDate = z),
+ (_.getCalendar = G),
+ (_.getView = O),
+ (_.option = A),
+ (_.publiclyTrigger = P),
+ (_.dynamicOverrides = {}),
+ (_.viewSpecCache = {}),
+ (_.optionHandlers = {}),
+ (_.overrides = t.extend({}, i)),
+ _.populateOptionsHash();
+ var Y;
+ _.bindOptions(
+ ['locale', 'monthNames', 'monthNamesShort', 'dayNames', 'dayNamesShort', 'firstDay', 'weekNumberCalculation'],
+ function (t, e, n, i, s, o, l) {
+ if (
+ ('iso' === l && (l = 'ISO'),
+ (Y = Z(Wt(t))),
+ e && (Y._months = e),
+ n && (Y._monthsShort = n),
+ i && (Y._weekdays = i),
+ s && (Y._weekdaysShort = s),
+ null == o && 'ISO' === l && (o = 1),
+ null != o)
+ ) {
+ var a = Z(Y._week);
+ (a.dow = o), (Y._week = a);
+ }
+ ('ISO' !== l && 'local' !== l && 'function' != typeof l) || (Y._fullCalendar_weekCalc = l), J && r(J);
+ }
+ ),
+ (_.defaultAllDayEventDuration = e.duration(_.options.defaultAllDayEventDuration)),
+ (_.defaultTimedEventDuration = e.duration(_.options.defaultTimedEventDuration)),
+ (_.moment = function () {
+ var t;
+ return (
+ 'local' === _.options.timezone
+ ? ((t = qt.moment.apply(null, arguments)), t.hasTime() && t.local())
+ : (t = 'UTC' === _.options.timezone ? qt.moment.utc.apply(null, arguments) : qt.moment.parseZone.apply(null, arguments)),
+ r(t),
+ t
+ );
+ }),
+ (_.localizeMoment = r),
+ (_.getIsAmbigTimezone = function () {
+ return 'local' !== _.options.timezone && 'UTC' !== _.options.timezone;
+ }),
+ (_.applyTimezone = function (t) {
+ if (!t.hasTime()) return t.clone();
+ var e,
+ n = _.moment(t.toArray()),
+ i = t.time() - n.time();
+ return i && ((e = n.clone().add(i)), t.time() - e.time() === 0 && (n = e)), n;
+ }),
+ (_.getNow = function () {
+ var t = _.options.now;
+ return 'function' == typeof t && (t = t()), _.moment(t).stripZone();
+ }),
+ (_.getEventEnd = function (t) {
+ return t.end ? t.end.clone() : _.getDefaultEventEnd(t.allDay, t.start);
+ }),
+ (_.getDefaultEventEnd = function (t, e) {
+ var n = e.clone();
+ return (
+ t ? n.stripTime().add(_.defaultAllDayEventDuration) : n.add(_.defaultTimedEventDuration),
+ _.getIsAmbigTimezone() && n.stripZone(),
+ n
+ );
+ }),
+ (_.humanizeDuration = function (t) {
+ return t.locale(_.options.locale).humanize();
+ }),
+ Ut.call(_);
+ var W,
+ U,
+ j,
+ q,
+ $,
+ Q,
+ X,
+ K,
+ J,
+ tt = n[0],
+ et = {},
+ nt = 0;
+ (J = null != _.options.defaultDate ? _.moment(_.options.defaultDate).stripZone() : _.getNow()),
+ (_.getSuggestedViewHeight = function () {
+ return void 0 === X && f(), X;
+ }),
+ (_.isHeightAuto = function () {
+ return 'auto' === _.options.contentHeight || 'auto' === _.options.height;
+ }),
+ (_.setToolbarsTitle = function (t) {
+ W.proxyCall('updateTitle', t);
+ }),
+ (_.freezeContentHeight = F),
+ (_.thawContentHeight = N);
+ var it = 0;
+ _.initialize();
+ }
+ function Yt(e) {
+ t.each(Re, function (t, n) {
+ null == e[t] && (e[t] = n(e));
+ });
+ }
+ function Wt(t) {
+ return e.localeData(t) || e.localeData('en');
+ }
+ function Ut() {
+ function n(t, e) {
+ return !U.options.lazyFetching || s(t, e) ? o(t, e) : bt.resolve($);
+ }
+ function i() {
+ ($ = r(nt)), U.trigger('eventsReset', $);
+ }
+ function r(t) {
+ var e,
+ n,
+ i = [];
+ for (e = 0; e < t.length; e++) (n = t[e]), n.start.clone().stripZone() < Z && U.getEventEnd(n).stripZone() > q && i.push(n);
+ return i;
+ }
+ function s(t, e) {
+ return !q || t < q || e > Z;
+ }
+ function o(t, e) {
+ return (q = t), (Z = e), l();
+ }
+ function l() {
+ return u(tt, 'reset');
+ }
+ function a(t) {
+ return u(E(t));
+ }
+ function u(t, e) {
+ var n, i;
+ for ('reset' === e ? (nt = []) : 'add' !== e && (nt = C(nt, t)), n = 0; n < t.length; n++)
+ (i = t[n]), 'pending' !== i._status && et++, (i._fetchId = (i._fetchId || 0) + 1), (i._status = 'pending');
+ for (n = 0; n < t.length; n++) (i = t[n]), c(i, i._fetchId);
+ return et
+ ? new bt(function (t) {
+ U.one('eventsReceived', t);
+ })
+ : bt.resolve($);
+ }
+ function c(e, n) {
+ f(e, function (i) {
+ var r,
+ s,
+ o,
+ l = t.isArray(e.events);
+ if (n === e._fetchId && 'rejected' !== e._status) {
+ if (((e._status = 'resolved'), i)) for (r = 0; r < i.length; r++) (s = i[r]), (o = l ? s : F(s, e)), o && nt.push.apply(nt, _(o));
+ h();
+ }
+ });
+ }
+ function d(t) {
+ var e = 'pending' === t._status;
+ (t._status = 'rejected'), e && h();
+ }
+ function h() {
+ et--, et || (i(nt), U.trigger('eventsReceived', $));
+ }
+ function f(e, n) {
+ var i,
+ r,
+ s = qt.sourceFetchers;
+ for (i = 0; i < s.length; i++) {
+ if (((r = s[i].call(U, e, q.clone(), Z.clone(), U.options.timezone, n)), r === !0)) return;
+ if ('object' == typeof r) return void f(r, n);
+ }
+ var o = e.events;
+ if (o)
+ t.isFunction(o)
+ ? (U.pushLoading(),
+ o.call(U, q.clone(), Z.clone(), U.options.timezone, function (t) {
+ n(t), U.popLoading();
+ }))
+ : t.isArray(o)
+ ? n(o)
+ : n();
+ else {
+ var l = e.url;
+ if (l) {
+ var a,
+ u = e.success,
+ c = e.error,
+ d = e.complete;
+ a = t.isFunction(e.data) ? e.data() : e.data;
+ var h = t.extend({}, a || {}),
+ g = J(e.startParam, U.options.startParam),
+ p = J(e.endParam, U.options.endParam),
+ v = J(e.timezoneParam, U.options.timezoneParam);
+ g && (h[g] = q.format()),
+ p && (h[p] = Z.format()),
+ U.options.timezone && 'local' != U.options.timezone && (h[v] = U.options.timezone),
+ U.pushLoading(),
+ t.ajax(
+ t.extend({}, xe, e, {
+ data: h,
+ success: function (e) {
+ e = e || [];
+ var i = K(u, this, arguments);
+ t.isArray(i) && (e = i), n(e);
+ },
+ error: function () {
+ K(c, this, arguments), n();
+ },
+ complete: function () {
+ K(d, this, arguments), U.popLoading();
+ },
+ })
+ );
+ } else n();
+ }
+ }
+ function g(t) {
+ var e = p(t);
+ e && (tt.push(e), u([e], 'add'));
+ }
+ function p(e) {
+ var n,
+ i,
+ r = qt.sourceNormalizers;
+ if (
+ (t.isFunction(e) || t.isArray(e)
+ ? (n = { events: e })
+ : 'string' == typeof e
+ ? (n = { url: e })
+ : 'object' == typeof e && (n = t.extend({}, e)),
+ n)
+ ) {
+ for (
+ n.className ? 'string' == typeof n.className && (n.className = n.className.split(/\s+/)) : (n.className = []),
+ t.isArray(n.events) &&
+ ((n.origArray = n.events),
+ (n.events = t.map(n.events, function (t) {
+ return F(t, n);
+ }))),
+ i = 0;
+ i < r.length;
+ i++
+ )
+ r[i].call(U, n);
+ return n;
+ }
+ }
+ function v(t) {
+ y(b(t));
+ }
+ function m(t) {
+ null == t ? y(tt, !0) : y(E(t));
+ }
+ function y(e, n) {
+ var r;
+ for (r = 0; r < e.length; r++) d(e[r]);
+ n
+ ? ((tt = []), (nt = []))
+ : ((tt = t.grep(tt, function (t) {
+ for (r = 0; r < e.length; r++) if (t === e[r]) return !1;
+ return !0;
+ })),
+ (nt = C(nt, e))),
+ i();
+ }
+ function S() {
+ return tt.slice(1);
+ }
+ function w(e) {
+ return t.grep(tt, function (t) {
+ return t.id && t.id === e;
+ })[0];
+ }
+ function E(e) {
+ e ? t.isArray(e) || (e = [e]) : (e = []);
+ var n,
+ i = [];
+ for (n = 0; n < e.length; n++) i.push.apply(i, b(e[n]));
+ return i;
+ }
+ function b(e) {
+ var n, i;
+ for (n = 0; n < tt.length; n++) if (((i = tt[n]), i === e)) return [i];
+ return (
+ (i = w(e)),
+ i
+ ? [i]
+ : t.grep(tt, function (t) {
+ return D(e, t);
+ })
+ );
+ }
+ function D(t, e) {
+ return t && e && T(t) == T(e);
+ }
+ function T(t) {
+ return ('object' == typeof t ? t.origArray || t.googleCalendarId || t.url || t.events : null) || t;
+ }
+ function C(e, n) {
+ return t.grep(e, function (t) {
+ for (var e = 0; e < n.length; e++) if (t.source === n[e]) return !1;
+ return !0;
+ });
+ }
+ function H(t) {
+ R([t]);
+ }
+ function R(t) {
+ var e, n;
+ for (e = 0; e < t.length; e++)
+ (n = t[e]), (n.start = U.moment(n.start)), n.end ? (n.end = U.moment(n.end)) : (n.end = null), Y(n, x(n));
+ i();
+ }
+ function x(e) {
+ var n = {};
+ return (
+ t.each(e, function (t, e) {
+ I(t) && void 0 !== e && X(e) && (n[t] = e);
+ }),
+ n
+ );
+ }
+ function I(t) {
+ return !/^_|^(id|allDay|start|end)$/.test(t);
+ }
+ function k(t, e) {
+ return L([t], e);
+ }
+ function L(t, e) {
+ var n,
+ r,
+ s,
+ o,
+ l,
+ a = [];
+ for (s = 0; s < t.length; s++)
+ if ((r = F(t[s]))) {
+ for (n = _(r), o = 0; o < n.length; o++) (l = n[o]), l.source || (e && (Q.events.push(l), (l.source = Q)), nt.push(l));
+ a = a.concat(n);
+ }
+ return a.length && i(), a;
+ }
+ function M(e) {
+ var n, r;
+ for (
+ null == e
+ ? (e = function () {
+ return !0;
+ })
+ : t.isFunction(e) ||
+ ((n = e + ''),
+ (e = function (t) {
+ return t._id == n;
+ })),
+ nt = t.grep(nt, e, !0),
+ r = 0;
+ r < tt.length;
+ r++
+ )
+ t.isArray(tt[r].events) && (tt[r].events = t.grep(tt[r].events, e, !0));
+ i();
+ }
+ function B(e) {
+ return t.isFunction(e)
+ ? t.grep(nt, e)
+ : null != e
+ ? ((e += ''),
+ t.grep(nt, function (t) {
+ return t._id == e;
+ }))
+ : nt;
+ }
+ function z(t) {
+ (t.start = U.moment(t.start)), t.end && (t.end = U.moment(t.end)), jt(t);
+ }
+ function F(n, i) {
+ var r,
+ s,
+ o,
+ l = {};
+ if (
+ (U.options.eventDataTransform && (n = U.options.eventDataTransform(n)),
+ i && i.eventDataTransform && (n = i.eventDataTransform(n)),
+ t.extend(l, n),
+ i && (l.source = i),
+ (l._id = n._id || (void 0 === n.id ? '_fc' + Ie++ : n.id + '')),
+ n.className
+ ? 'string' == typeof n.className
+ ? (l.className = n.className.split(/\s+/))
+ : (l.className = n.className)
+ : (l.className = []),
+ (r = n.start || n.date),
+ (s = n.end),
+ j(r) && (r = e.duration(r)),
+ j(s) && (s = e.duration(s)),
+ n.dow || e.isDuration(r) || e.isDuration(s))
+ )
+ (l.start = r ? e.duration(r) : null), (l.end = s ? e.duration(s) : null), (l._recurring = !0);
+ else {
+ if (r && ((r = U.moment(r)), !r.isValid())) return !1;
+ s && ((s = U.moment(s)), s.isValid() || (s = null)),
+ (o = n.allDay),
+ void 0 === o && (o = J(i ? i.allDayDefault : void 0, U.options.allDayDefault)),
+ A(r, s, o, l);
+ }
+ return U.normalizeEvent(l), l;
+ }
+ function A(t, e, n, i) {
+ (i.start = t), (i.end = e), (i.allDay = n), V(i), jt(i);
+ }
+ function V(t) {
+ P(t),
+ t.end && !t.end.isAfter(t.start) && (t.end = null),
+ t.end || (U.options.forceEventDuration ? (t.end = U.getDefaultEventEnd(t.allDay, t.start)) : (t.end = null));
+ }
+ function P(t) {
+ null == t.allDay && (t.allDay = !(t.start.hasTime() || (t.end && t.end.hasTime()))),
+ t.allDay
+ ? (t.start.stripTime(), t.end && t.end.stripTime())
+ : (t.start.hasTime() || (t.start = U.applyTimezone(t.start.time(0))),
+ t.end && !t.end.hasTime() && (t.end = U.applyTimezone(t.end.time(0))));
+ }
+ function _(e, n, i) {
+ var r,
+ s,
+ o,
+ l,
+ a,
+ u,
+ c,
+ d,
+ h,
+ f = [];
+ if (((n = n || q), (i = i || Z), e))
+ if (e._recurring) {
+ if ((s = e.dow)) for (r = {}, o = 0; o < s.length; o++) r[s[o]] = !0;
+ for (l = n.clone().stripTime(); l.isBefore(i); )
+ (r && !r[l.day()]) ||
+ ((a = e.start),
+ (u = e.end),
+ (c = l.clone()),
+ (d = null),
+ a && (c = c.time(a)),
+ u && (d = l.clone().time(u)),
+ (h = t.extend({}, e)),
+ A(c, d, !a && !u, h),
+ f.push(h)),
+ l.add(1, 'days');
+ } else f.push(e);
+ return f;
+ }
+ function Y(e, n, i) {
+ function r(t, e) {
+ return i ? O(t, e, i) : n.allDay ? G(t, e) : N(t, e);
+ }
+ var s,
+ o,
+ l,
+ a,
+ u,
+ c,
+ d = {};
+ return (
+ (n = n || {}),
+ n.start || (n.start = e.start.clone()),
+ void 0 === n.end && (n.end = e.end ? e.end.clone() : null),
+ null == n.allDay && (n.allDay = e.allDay),
+ V(n),
+ (s = { start: e._start.clone(), end: e._end ? e._end.clone() : U.getDefaultEventEnd(e._allDay, e._start), allDay: n.allDay }),
+ V(s),
+ (o = null !== e._end && null === n.end),
+ (l = r(n.start, s.start)),
+ n.end ? ((a = r(n.end, s.end)), (u = a.subtract(l))) : (u = null),
+ t.each(n, function (t, e) {
+ I(t) && void 0 !== e && (d[t] = e);
+ }),
+ (c = W(B(e._id), o, n.allDay, l, u, d)),
+ { dateDelta: l, durationDelta: u, undo: c }
+ );
+ }
+ function W(e, n, i, r, s, o) {
+ var l = U.getIsAmbigTimezone(),
+ a = [];
+ return (
+ r && !r.valueOf() && (r = null),
+ s && !s.valueOf() && (s = null),
+ t.each(e, function (e, u) {
+ var c, d;
+ (c = { start: u.start.clone(), end: u.end ? u.end.clone() : null, allDay: u.allDay }),
+ t.each(o, function (t) {
+ c[t] = u[t];
+ }),
+ (d = { start: u._start, end: u._end, allDay: i }),
+ V(d),
+ n ? (d.end = null) : s && !d.end && (d.end = U.getDefaultEventEnd(d.allDay, d.start)),
+ r && (d.start.add(r), d.end && d.end.add(r)),
+ s && d.end.add(s),
+ l && !d.allDay && (r || s) && (d.start.stripZone(), d.end && d.end.stripZone()),
+ t.extend(u, o, d),
+ jt(u),
+ a.push(function () {
+ t.extend(u, c), jt(u);
+ });
+ }),
+ function () {
+ for (var t = 0; t < a.length; t++) a[t]();
+ }
+ );
+ }
+ var U = this;
+ (U.requestEvents = n),
+ (U.reportEventChange = i),
+ (U.isFetchNeeded = s),
+ (U.fetchEvents = o),
+ (U.fetchEventSources = u),
+ (U.refetchEvents = l),
+ (U.refetchEventSources = a),
+ (U.getEventSources = S),
+ (U.getEventSourceById = w),
+ (U.addEventSource = g),
+ (U.removeEventSource = v),
+ (U.removeEventSources = m),
+ (U.updateEvent = H),
+ (U.updateEvents = R),
+ (U.renderEvent = k),
+ (U.renderEvents = L),
+ (U.removeEvents = M),
+ (U.clientEvents = B),
+ (U.mutateEvent = Y),
+ (U.normalizeEventDates = V),
+ (U.normalizeEventTimes = P);
+ var q,
+ Z,
+ $,
+ Q = { events: [] },
+ tt = [Q],
+ et = 0,
+ nt = [];
+ t.each((U.options.events ? [U.options.events] : []).concat(U.options.eventSources || []), function (t, e) {
+ var n = p(e);
+ n && tt.push(n);
+ }),
+ (U.getEventCache = function () {
+ return nt;
+ }),
+ (U.getPrunedEventCache = function () {
+ return $;
+ }),
+ (U.rezoneArrayEventSources = function () {
+ var e, n, i;
+ for (e = 0; e < tt.length; e++) if (((n = tt[e].events), t.isArray(n))) for (i = 0; i < n.length; i++) z(n[i]);
+ }),
+ (U.buildEventFromInput = F),
+ (U.expandEvent = _);
+ }
+ function jt(t) {
+ (t._allDay = t.allDay), (t._start = t.start.clone()), (t._end = t.end ? t.end.clone() : null);
+ }
+ var qt = (t.fullCalendar = { version: '3.1.0', internalApiVersion: 7 }),
+ Zt = (qt.views = {});
+ t.fn.fullCalendar = function (e) {
+ var n = Array.prototype.slice.call(arguments, 1),
+ i = this;
+ return (
+ this.each(function (r, s) {
+ var o,
+ l = t(s),
+ a = l.data('fullCalendar');
+ 'string' == typeof e
+ ? a && t.isFunction(a[e]) && ((o = a[e].apply(a, n)), r || (i = o), 'destroy' === e && l.removeData('fullCalendar'))
+ : a || ((a = new De(l, e)), l.data('fullCalendar', a), a.render());
+ }),
+ i
+ );
+ };
+ var $t = ['header', 'footer', 'buttonText', 'buttonIcons', 'themeButtonIcons'];
+ (qt.intersectRanges = F),
+ (qt.applyAll = K),
+ (qt.debounce = at),
+ (qt.isInt = ot),
+ (qt.htmlEscape = tt),
+ (qt.cssToStr = nt),
+ (qt.proxy = lt),
+ (qt.capitaliseFirstLetter = rt),
+ (qt.getOuterRect = h),
+ (qt.getClientRect = f),
+ (qt.getContentRect = g),
+ (qt.getScrollbarWidths = p);
+ var Qt = null;
+ (qt.preventDefault = T),
+ (qt.intersectRects = R),
+ (qt.parseFieldSpecs = L),
+ (qt.compareByFieldSpecs = M),
+ (qt.compareByFieldSpec = B),
+ (qt.flexibleCompare = z),
+ (qt.computeIntervalUnit = A),
+ (qt.divideRangeByDuration = P),
+ (qt.divideDurationByDuration = _),
+ (qt.multiplyDuration = Y),
+ (qt.durationHasTime = W);
+ var Xt = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'],
+ Kt = ['year', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
+ (qt.log = function () {
+ var t = window.console;
+ if (t && t.log) return t.log.apply(t, arguments);
+ }),
+ (qt.warn = function () {
+ var t = window.console;
+ return t && t.warn ? t.warn.apply(t, arguments) : qt.log.apply(qt, arguments);
+ });
+ var Jt = {}.hasOwnProperty;
+ qt.createObject = Z;
+ var te = /^\s*\d{4}-\d\d$/,
+ ee = /^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,
+ ne = e.fn,
+ ie = t.extend({}, ne),
+ re = e.momentProperties;
+ re.push('_fullCalendar'),
+ re.push('_ambigTime'),
+ re.push('_ambigZone'),
+ (qt.moment = function () {
+ return ut(arguments);
+ }),
+ (qt.moment.utc = function () {
+ var t = ut(arguments, !0);
+ return t.hasTime() && t.utc(), t;
+ }),
+ (qt.moment.parseZone = function () {
+ return ut(arguments, !0, !0);
+ }),
+ (ne.week = ne.weeks =
+ function (t) {
+ var e = this._locale._fullCalendar_weekCalc;
+ return null == t && 'function' == typeof e
+ ? e(this)
+ : 'ISO' === e
+ ? ie.isoWeek.apply(this, arguments)
+ : ie.week.apply(this, arguments);
+ }),
+ (ne.time = function (t) {
+ if (!this._fullCalendar) return ie.time.apply(this, arguments);
+ if (null == t)
+ return e.duration({ hours: this.hours(), minutes: this.minutes(), seconds: this.seconds(), milliseconds: this.milliseconds() });
+ (this._ambigTime = !1), e.isDuration(t) || e.isMoment(t) || (t = e.duration(t));
+ var n = 0;
+ return (
+ e.isDuration(t) && (n = 24 * Math.floor(t.asDays())),
+ this.hours(n + t.hours())
+ .minutes(t.minutes())
+ .seconds(t.seconds())
+ .milliseconds(t.milliseconds())
+ );
+ }),
+ (ne.stripTime = function () {
+ return (
+ this._ambigTime ||
+ (this.utc(!0), this.set({ hours: 0, minutes: 0, seconds: 0, ms: 0 }), (this._ambigTime = !0), (this._ambigZone = !0)),
+ this
+ );
+ }),
+ (ne.hasTime = function () {
+ return !this._ambigTime;
+ }),
+ (ne.stripZone = function () {
+ var t;
+ return this._ambigZone || ((t = this._ambigTime), this.utc(!0), (this._ambigTime = t || !1), (this._ambigZone = !0)), this;
+ }),
+ (ne.hasZone = function () {
+ return !this._ambigZone;
+ }),
+ (ne.local = function (t) {
+ return ie.local.call(this, this._ambigZone || t), (this._ambigTime = !1), (this._ambigZone = !1), this;
+ }),
+ (ne.utc = function (t) {
+ return ie.utc.call(this, t), (this._ambigTime = !1), (this._ambigZone = !1), this;
+ }),
+ (ne.utcOffset = function (t) {
+ return null != t && ((this._ambigTime = !1), (this._ambigZone = !1)), ie.utcOffset.apply(this, arguments);
+ }),
+ (ne.format = function () {
+ return this._fullCalendar && arguments[0]
+ ? dt(this, arguments[0])
+ : this._ambigTime
+ ? ct(this, 'YYYY-MM-DD')
+ : this._ambigZone
+ ? ct(this, 'YYYY-MM-DD[T]HH:mm:ss')
+ : ie.format.apply(this, arguments);
+ }),
+ (ne.toISOString = function () {
+ return this._ambigTime
+ ? ct(this, 'YYYY-MM-DD')
+ : this._ambigZone
+ ? ct(this, 'YYYY-MM-DD[T]HH:mm:ss')
+ : ie.toISOString.apply(this, arguments);
+ });
+ var se = {
+ t: function (t) {
+ return ct(t, 'a').charAt(0);
+ },
+ T: function (t) {
+ return ct(t, 'A').charAt(0);
+ },
+ };
+ qt.formatRange = gt;
+ var oe = {
+ Y: 'year',
+ M: 'month',
+ D: 'day',
+ d: 'day',
+ A: 'second',
+ a: 'second',
+ T: 'second',
+ t: 'second',
+ H: 'second',
+ h: 'second',
+ m: 'second',
+ s: 'second',
+ },
+ le = {},
+ ae = {
+ Y: { value: 1, unit: 'year' },
+ M: { value: 2, unit: 'month' },
+ W: { value: 3, unit: 'week' },
+ w: { value: 3, unit: 'week' },
+ D: { value: 4, unit: 'day' },
+ d: { value: 4, unit: 'day' },
+ };
+ (qt.queryMostGranularFormatUnit = function (t) {
+ var e,
+ n,
+ i,
+ r,
+ s = mt(t);
+ for (e = 0; e < s.length; e++) (n = s[e]), n.token && ((i = ae[n.token.charAt(0)]), i && (!r || i.value > r.value) && (r = i));
+ return r ? r.unit : null;
+ }),
+ (qt.Class = St),
+ (St.extend = function () {
+ var t,
+ e,
+ n = arguments.length;
+ for (t = 0; t < n; t++) (e = arguments[t]), t < n - 1 && Et(this, e);
+ return wt(this, e || {});
+ }),
+ (St.mixin = function (t) {
+ Et(this, t);
+ }),
+ (qt.Promise = bt),
+ (bt.immediate = !0),
+ (bt.resolve = function (e) {
+ if (e && 'function' == typeof e.resolve) return e.promise();
+ if (e && 'function' == typeof e.then) return e;
+ var n = t.Deferred().resolve(e),
+ i = n.promise();
+ if (bt.immediate) {
+ var r = i.then;
+ (i._value = e),
+ (i.then = function (t, n) {
+ return 'function' == typeof t ? bt.resolve(t(e)) : r.call(i, t, n);
+ });
+ }
+ return i;
+ }),
+ (bt.reject = function () {
+ return t.Deferred().reject().promise();
+ }),
+ (bt.all = function (e) {
+ var n,
+ i,
+ r,
+ s = !1;
+ if (bt.immediate)
+ for (s = !0, n = [], i = 0; i < e.length; i++)
+ if (((r = e[i]), r && 'function' == typeof r.state && 'resolved' === r.state() && '_value' in r)) n.push(r._value);
+ else {
+ if (r && 'function' == typeof r.then) {
+ s = !1;
+ break;
+ }
+ n.push(r);
+ }
+ return s
+ ? bt.resolve(n)
+ : t.when.apply(t.when, e).then(function () {
+ return t.when(t.makeArray(arguments));
+ });
+ }),
+ (qt.TaskQueue = Dt);
+ var ue = (qt.EmitterMixin = {
+ on: function (e, n) {
+ return t(this).on(e, this._prepareIntercept(n)), this;
+ },
+ one: function (e, n) {
+ return t(this).one(e, this._prepareIntercept(n)), this;
+ },
+ _prepareIntercept: function (e) {
+ var n = function (t, n) {
+ return e.apply(n.context || this, n.args || []);
+ };
+ return e.guid || (e.guid = t.guid++), (n.guid = e.guid), n;
+ },
+ off: function (e, n) {
+ return t(this).off(e, n), this;
+ },
+ trigger: function (e) {
+ var n = Array.prototype.slice.call(arguments, 1);
+ return t(this).triggerHandler(e, { args: n }), this;
+ },
+ triggerWith: function (e, n, i) {
+ return t(this).triggerHandler(e, { context: n, args: i }), this;
+ },
+ }),
+ ce = (qt.ListenerMixin = (function () {
+ var e = 0,
+ n = {
+ listenerId: null,
+ listenTo: function (e, n, i) {
+ if ('object' == typeof n) for (var r in n) n.hasOwnProperty(r) && this.listenTo(e, r, n[r]);
+ else 'string' == typeof n && e.on(n + '.' + this.getListenerNamespace(), t.proxy(i, this));
+ },
+ stopListeningTo: function (t, e) {
+ t.off((e || '') + '.' + this.getListenerNamespace());
+ },
+ getListenerNamespace: function () {
+ return null == this.listenerId && (this.listenerId = e++), '_listener' + this.listenerId;
+ },
+ };
+ return n;
+ })()),
+ de = {
+ isIgnoringMouse: !1,
+ delayUnignoreMouse: null,
+ initMouseIgnoring: function (t) {
+ this.delayUnignoreMouse = at(lt(this, 'unignoreMouse'), t || 1e3);
+ },
+ tempIgnoreMouse: function () {
+ (this.isIgnoringMouse = !0), this.delayUnignoreMouse();
+ },
+ unignoreMouse: function () {
+ this.isIgnoringMouse = !1;
+ },
+ },
+ he = St.extend(ce, {
+ isHidden: !0,
+ options: null,
+ el: null,
+ margin: 10,
+ constructor: function (t) {
+ this.options = t || {};
+ },
+ show: function () {
+ this.isHidden && (this.el || this.render(), this.el.show(), this.position(), (this.isHidden = !1), this.trigger('show'));
+ },
+ hide: function () {
+ this.isHidden || (this.el.hide(), (this.isHidden = !0), this.trigger('hide'));
+ },
+ render: function () {
+ var e = this,
+ n = this.options;
+ (this.el = t('')
+ .addClass(n.className || '')
+ .css({ top: 0, left: 0 })
+ .append(n.content)
+ .appendTo(n.parentEl)),
+ this.el.on('click', '.fc-close', function () {
+ e.hide();
+ }),
+ n.autoHide && this.listenTo(t(document), 'mousedown', this.documentMousedown);
+ },
+ documentMousedown: function (e) {
+ this.el && !t(e.target).closest(this.el).length && this.hide();
+ },
+ removeElement: function () {
+ this.hide(), this.el && (this.el.remove(), (this.el = null)), this.stopListeningTo(t(document), 'mousedown');
+ },
+ position: function () {
+ var e,
+ n,
+ i,
+ r,
+ s,
+ o = this.options,
+ l = this.el.offsetParent().offset(),
+ a = this.el.outerWidth(),
+ u = this.el.outerHeight(),
+ c = t(window),
+ h = d(this.el);
+ (r = o.top || 0),
+ (s = void 0 !== o.left ? o.left : void 0 !== o.right ? o.right - a : 0),
+ h.is(window) || h.is(document) ? ((h = c), (e = 0), (n = 0)) : ((i = h.offset()), (e = i.top), (n = i.left)),
+ (e += c.scrollTop()),
+ (n += c.scrollLeft()),
+ o.viewportConstrain !== !1 &&
+ ((r = Math.min(r, e + h.outerHeight() - u - this.margin)),
+ (r = Math.max(r, e + this.margin)),
+ (s = Math.min(s, n + h.outerWidth() - a - this.margin)),
+ (s = Math.max(s, n + this.margin))),
+ this.el.css({ top: r - l.top, left: s - l.left });
+ },
+ trigger: function (t) {
+ this.options[t] && this.options[t].apply(this, Array.prototype.slice.call(arguments, 1));
+ },
+ }),
+ fe = (qt.CoordCache = St.extend({
+ els: null,
+ forcedOffsetParentEl: null,
+ origin: null,
+ boundingRect: null,
+ isHorizontal: !1,
+ isVertical: !1,
+ lefts: null,
+ rights: null,
+ tops: null,
+ bottoms: null,
+ constructor: function (e) {
+ (this.els = t(e.els)),
+ (this.isHorizontal = e.isHorizontal),
+ (this.isVertical = e.isVertical),
+ (this.forcedOffsetParentEl = e.offsetParent ? t(e.offsetParent) : null);
+ },
+ build: function () {
+ var t = this.forcedOffsetParentEl;
+ !t && this.els.length > 0 && (t = this.els.eq(0).offsetParent()),
+ (this.origin = t ? t.offset() : null),
+ (this.boundingRect = this.queryBoundingRect()),
+ this.isHorizontal && this.buildElHorizontals(),
+ this.isVertical && this.buildElVerticals();
+ },
+ clear: function () {
+ (this.origin = null),
+ (this.boundingRect = null),
+ (this.lefts = null),
+ (this.rights = null),
+ (this.tops = null),
+ (this.bottoms = null);
+ },
+ ensureBuilt: function () {
+ this.origin || this.build();
+ },
+ buildElHorizontals: function () {
+ var e = [],
+ n = [];
+ this.els.each(function (i, r) {
+ var s = t(r),
+ o = s.offset().left,
+ l = s.outerWidth();
+ e.push(o), n.push(o + l);
+ }),
+ (this.lefts = e),
+ (this.rights = n);
+ },
+ buildElVerticals: function () {
+ var e = [],
+ n = [];
+ this.els.each(function (i, r) {
+ var s = t(r),
+ o = s.offset().top,
+ l = s.outerHeight();
+ e.push(o), n.push(o + l);
+ }),
+ (this.tops = e),
+ (this.bottoms = n);
+ },
+ getHorizontalIndex: function (t) {
+ this.ensureBuilt();
+ var e,
+ n = this.lefts,
+ i = this.rights,
+ r = n.length;
+ for (e = 0; e < r; e++) if (t >= n[e] && t < i[e]) return e;
+ },
+ getVerticalIndex: function (t) {
+ this.ensureBuilt();
+ var e,
+ n = this.tops,
+ i = this.bottoms,
+ r = n.length;
+ for (e = 0; e < r; e++) if (t >= n[e] && t < i[e]) return e;
+ },
+ getLeftOffset: function (t) {
+ return this.ensureBuilt(), this.lefts[t];
+ },
+ getLeftPosition: function (t) {
+ return this.ensureBuilt(), this.lefts[t] - this.origin.left;
+ },
+ getRightOffset: function (t) {
+ return this.ensureBuilt(), this.rights[t];
+ },
+ getRightPosition: function (t) {
+ return this.ensureBuilt(), this.rights[t] - this.origin.left;
+ },
+ getWidth: function (t) {
+ return this.ensureBuilt(), this.rights[t] - this.lefts[t];
+ },
+ getTopOffset: function (t) {
+ return this.ensureBuilt(), this.tops[t];
+ },
+ getTopPosition: function (t) {
+ return this.ensureBuilt(), this.tops[t] - this.origin.top;
+ },
+ getBottomOffset: function (t) {
+ return this.ensureBuilt(), this.bottoms[t];
+ },
+ getBottomPosition: function (t) {
+ return this.ensureBuilt(), this.bottoms[t] - this.origin.top;
+ },
+ getHeight: function (t) {
+ return this.ensureBuilt(), this.bottoms[t] - this.tops[t];
+ },
+ queryBoundingRect: function () {
+ var t;
+ return this.els.length > 0 && ((t = d(this.els.eq(0))), !t.is(document)) ? f(t) : null;
+ },
+ isPointInBounds: function (t, e) {
+ return this.isLeftInBounds(t) && this.isTopInBounds(e);
+ },
+ isLeftInBounds: function (t) {
+ return !this.boundingRect || (t >= this.boundingRect.left && t < this.boundingRect.right);
+ },
+ isTopInBounds: function (t) {
+ return !this.boundingRect || (t >= this.boundingRect.top && t < this.boundingRect.bottom);
+ },
+ })),
+ ge = (qt.DragListener = St.extend(ce, de, {
+ options: null,
+ subjectEl: null,
+ originX: null,
+ originY: null,
+ scrollEl: null,
+ isInteracting: !1,
+ isDistanceSurpassed: !1,
+ isDelayEnded: !1,
+ isDragging: !1,
+ isTouch: !1,
+ delay: null,
+ delayTimeoutId: null,
+ minDistance: null,
+ handleTouchScrollProxy: null,
+ constructor: function (t) {
+ (this.options = t || {}), (this.handleTouchScrollProxy = lt(this, 'handleTouchScroll')), this.initMouseIgnoring(500);
+ },
+ startInteraction: function (e, n) {
+ var i = b(e);
+ if ('mousedown' === e.type) {
+ if (this.isIgnoringMouse) return;
+ if (!S(e)) return;
+ e.preventDefault();
+ }
+ this.isInteracting ||
+ ((n = n || {}),
+ (this.delay = J(n.delay, this.options.delay, 0)),
+ (this.minDistance = J(n.distance, this.options.distance, 0)),
+ (this.subjectEl = this.options.subjectEl),
+ (this.isInteracting = !0),
+ (this.isTouch = i),
+ (this.isDelayEnded = !1),
+ (this.isDistanceSurpassed = !1),
+ (this.originX = w(e)),
+ (this.originY = E(e)),
+ (this.scrollEl = d(t(e.target))),
+ this.bindHandlers(),
+ this.initAutoScroll(),
+ this.handleInteractionStart(e),
+ this.startDelay(e),
+ this.minDistance || this.handleDistanceSurpassed(e));
+ },
+ handleInteractionStart: function (t) {
+ this.trigger('interactionStart', t);
+ },
+ endInteraction: function (t, e) {
+ this.isInteracting &&
+ (this.endDrag(t),
+ this.delayTimeoutId && (clearTimeout(this.delayTimeoutId), (this.delayTimeoutId = null)),
+ this.destroyAutoScroll(),
+ this.unbindHandlers(),
+ (this.isInteracting = !1),
+ this.handleInteractionEnd(t, e),
+ this.isTouch && this.tempIgnoreMouse());
+ },
+ handleInteractionEnd: function (t, e) {
+ this.trigger('interactionEnd', t, e || !1);
+ },
+ bindHandlers: function () {
+ var e = this,
+ n = 1;
+ this.isTouch
+ ? (this.listenTo(t(document), {
+ touchmove: this.handleTouchMove,
+ touchend: this.endInteraction,
+ touchcancel: this.endInteraction,
+ touchstart: function (t) {
+ n ? n-- : e.endInteraction(t, !0);
+ },
+ }),
+ !C(this.handleTouchScrollProxy) && this.scrollEl && this.listenTo(this.scrollEl, 'scroll', this.handleTouchScroll))
+ : this.listenTo(t(document), { mousemove: this.handleMouseMove, mouseup: this.endInteraction }),
+ this.listenTo(t(document), { selectstart: T, contextmenu: T });
+ },
+ unbindHandlers: function () {
+ this.stopListeningTo(t(document)), H(this.handleTouchScrollProxy), this.scrollEl && this.stopListeningTo(this.scrollEl, 'scroll');
+ },
+ startDrag: function (t, e) {
+ this.startInteraction(t, e), this.isDragging || ((this.isDragging = !0), this.handleDragStart(t));
+ },
+ handleDragStart: function (t) {
+ this.trigger('dragStart', t);
+ },
+ handleMove: function (t) {
+ var e,
+ n = w(t) - this.originX,
+ i = E(t) - this.originY,
+ r = this.minDistance;
+ this.isDistanceSurpassed || ((e = n * n + i * i), e >= r * r && this.handleDistanceSurpassed(t)),
+ this.isDragging && this.handleDrag(n, i, t);
+ },
+ handleDrag: function (t, e, n) {
+ this.trigger('drag', t, e, n), this.updateAutoScroll(n);
+ },
+ endDrag: function (t) {
+ this.isDragging && ((this.isDragging = !1), this.handleDragEnd(t));
+ },
+ handleDragEnd: function (t) {
+ this.trigger('dragEnd', t);
+ },
+ startDelay: function (t) {
+ var e = this;
+ this.delay
+ ? (this.delayTimeoutId = setTimeout(function () {
+ e.handleDelayEnd(t);
+ }, this.delay))
+ : this.handleDelayEnd(t);
+ },
+ handleDelayEnd: function (t) {
+ (this.isDelayEnded = !0), this.isDistanceSurpassed && this.startDrag(t);
+ },
+ handleDistanceSurpassed: function (t) {
+ (this.isDistanceSurpassed = !0), this.isDelayEnded && this.startDrag(t);
+ },
+ handleTouchMove: function (t) {
+ this.isDragging && t.preventDefault(), this.handleMove(t);
+ },
+ handleMouseMove: function (t) {
+ this.handleMove(t);
+ },
+ handleTouchScroll: function (t) {
+ this.isDragging || this.endInteraction(t, !0);
+ },
+ trigger: function (t) {
+ this.options[t] && this.options[t].apply(this, Array.prototype.slice.call(arguments, 1)),
+ this['_' + t] && this['_' + t].apply(this, Array.prototype.slice.call(arguments, 1));
+ },
+ }));
+ ge.mixin({
+ isAutoScroll: !1,
+ scrollBounds: null,
+ scrollTopVel: null,
+ scrollLeftVel: null,
+ scrollIntervalId: null,
+ scrollSensitivity: 30,
+ scrollSpeed: 200,
+ scrollIntervalMs: 50,
+ initAutoScroll: function () {
+ var t = this.scrollEl;
+ (this.isAutoScroll = this.options.scroll && t && !t.is(window) && !t.is(document)),
+ this.isAutoScroll && this.listenTo(t, 'scroll', at(this.handleDebouncedScroll, 100));
+ },
+ destroyAutoScroll: function () {
+ this.endAutoScroll(), this.isAutoScroll && this.stopListeningTo(this.scrollEl, 'scroll');
+ },
+ computeScrollBounds: function () {
+ this.isAutoScroll && (this.scrollBounds = h(this.scrollEl));
+ },
+ updateAutoScroll: function (t) {
+ var e,
+ n,
+ i,
+ r,
+ s = this.scrollSensitivity,
+ o = this.scrollBounds,
+ l = 0,
+ a = 0;
+ o &&
+ ((e = (s - (E(t) - o.top)) / s),
+ (n = (s - (o.bottom - E(t))) / s),
+ (i = (s - (w(t) - o.left)) / s),
+ (r = (s - (o.right - w(t))) / s),
+ e >= 0 && e <= 1 ? (l = e * this.scrollSpeed * -1) : n >= 0 && n <= 1 && (l = n * this.scrollSpeed),
+ i >= 0 && i <= 1 ? (a = i * this.scrollSpeed * -1) : r >= 0 && r <= 1 && (a = r * this.scrollSpeed)),
+ this.setScrollVel(l, a);
+ },
+ setScrollVel: function (t, e) {
+ (this.scrollTopVel = t),
+ (this.scrollLeftVel = e),
+ this.constrainScrollVel(),
+ (!this.scrollTopVel && !this.scrollLeftVel) ||
+ this.scrollIntervalId ||
+ (this.scrollIntervalId = setInterval(lt(this, 'scrollIntervalFunc'), this.scrollIntervalMs));
+ },
+ constrainScrollVel: function () {
+ var t = this.scrollEl;
+ this.scrollTopVel < 0
+ ? t.scrollTop() <= 0 && (this.scrollTopVel = 0)
+ : this.scrollTopVel > 0 && t.scrollTop() + t[0].clientHeight >= t[0].scrollHeight && (this.scrollTopVel = 0),
+ this.scrollLeftVel < 0
+ ? t.scrollLeft() <= 0 && (this.scrollLeftVel = 0)
+ : this.scrollLeftVel > 0 && t.scrollLeft() + t[0].clientWidth >= t[0].scrollWidth && (this.scrollLeftVel = 0);
+ },
+ scrollIntervalFunc: function () {
+ var t = this.scrollEl,
+ e = this.scrollIntervalMs / 1e3;
+ this.scrollTopVel && t.scrollTop(t.scrollTop() + this.scrollTopVel * e),
+ this.scrollLeftVel && t.scrollLeft(t.scrollLeft() + this.scrollLeftVel * e),
+ this.constrainScrollVel(),
+ this.scrollTopVel || this.scrollLeftVel || this.endAutoScroll();
+ },
+ endAutoScroll: function () {
+ this.scrollIntervalId && (clearInterval(this.scrollIntervalId), (this.scrollIntervalId = null), this.handleScrollEnd());
+ },
+ handleDebouncedScroll: function () {
+ this.scrollIntervalId || this.handleScrollEnd();
+ },
+ handleScrollEnd: function () {},
+ });
+ var pe = ge.extend({
+ component: null,
+ origHit: null,
+ hit: null,
+ coordAdjust: null,
+ constructor: function (t, e) {
+ ge.call(this, e), (this.component = t);
+ },
+ handleInteractionStart: function (t) {
+ var e,
+ n,
+ i,
+ r = this.subjectEl;
+ this.computeCoords(),
+ t
+ ? ((n = { left: w(t), top: E(t) }),
+ (i = n),
+ r && ((e = h(r)), (i = x(i, e))),
+ (this.origHit = this.queryHit(i.left, i.top)),
+ r && this.options.subjectCenter && (this.origHit && (e = R(this.origHit, e) || e), (i = I(e))),
+ (this.coordAdjust = k(i, n)))
+ : ((this.origHit = null), (this.coordAdjust = null)),
+ ge.prototype.handleInteractionStart.apply(this, arguments);
+ },
+ computeCoords: function () {
+ this.component.prepareHits(), this.computeScrollBounds();
+ },
+ handleDragStart: function (t) {
+ var e;
+ ge.prototype.handleDragStart.apply(this, arguments), (e = this.queryHit(w(t), E(t))), e && this.handleHitOver(e);
+ },
+ handleDrag: function (t, e, n) {
+ var i;
+ ge.prototype.handleDrag.apply(this, arguments),
+ (i = this.queryHit(w(n), E(n))),
+ Tt(i, this.hit) || (this.hit && this.handleHitOut(), i && this.handleHitOver(i));
+ },
+ handleDragEnd: function () {
+ this.handleHitDone(), ge.prototype.handleDragEnd.apply(this, arguments);
+ },
+ handleHitOver: function (t) {
+ var e = Tt(t, this.origHit);
+ (this.hit = t), this.trigger('hitOver', this.hit, e, this.origHit);
+ },
+ handleHitOut: function () {
+ this.hit && (this.trigger('hitOut', this.hit), this.handleHitDone(), (this.hit = null));
+ },
+ handleHitDone: function () {
+ this.hit && this.trigger('hitDone', this.hit);
+ },
+ handleInteractionEnd: function () {
+ ge.prototype.handleInteractionEnd.apply(this, arguments), (this.origHit = null), (this.hit = null), this.component.releaseHits();
+ },
+ handleScrollEnd: function () {
+ ge.prototype.handleScrollEnd.apply(this, arguments), this.computeCoords();
+ },
+ queryHit: function (t, e) {
+ return this.coordAdjust && ((t += this.coordAdjust.left), (e += this.coordAdjust.top)), this.component.queryHit(t, e);
+ },
+ }),
+ ve = St.extend(ce, {
+ options: null,
+ sourceEl: null,
+ el: null,
+ parentEl: null,
+ top0: null,
+ left0: null,
+ y0: null,
+ x0: null,
+ topDelta: null,
+ leftDelta: null,
+ isFollowing: !1,
+ isHidden: !1,
+ isAnimating: !1,
+ constructor: function (e, n) {
+ (this.options = n = n || {}), (this.sourceEl = e), (this.parentEl = n.parentEl ? t(n.parentEl) : e.parent());
+ },
+ start: function (e) {
+ this.isFollowing ||
+ ((this.isFollowing = !0),
+ (this.y0 = E(e)),
+ (this.x0 = w(e)),
+ (this.topDelta = 0),
+ (this.leftDelta = 0),
+ this.isHidden || this.updatePosition(),
+ b(e) ? this.listenTo(t(document), 'touchmove', this.handleMove) : this.listenTo(t(document), 'mousemove', this.handleMove));
+ },
+ stop: function (e, n) {
+ function i() {
+ (r.isAnimating = !1), r.removeElement(), (r.top0 = r.left0 = null), n && n();
+ }
+ var r = this,
+ s = this.options.revertDuration;
+ this.isFollowing &&
+ !this.isAnimating &&
+ ((this.isFollowing = !1),
+ this.stopListeningTo(t(document)),
+ e && s && !this.isHidden
+ ? ((this.isAnimating = !0), this.el.animate({ top: this.top0, left: this.left0 }, { duration: s, complete: i }))
+ : i());
+ },
+ getEl: function () {
+ var t = this.el;
+ return (
+ t ||
+ ((t = this.el =
+ this.sourceEl
+ .clone()
+ .addClass(this.options.additionalClass || '')
+ .css({
+ position: 'absolute',
+ visibility: '',
+ display: this.isHidden ? 'none' : '',
+ margin: 0,
+ right: 'auto',
+ bottom: 'auto',
+ width: this.sourceEl.width(),
+ height: this.sourceEl.height(),
+ opacity: this.options.opacity || '',
+ zIndex: this.options.zIndex,
+ })),
+ t.addClass('fc-unselectable'),
+ t.appendTo(this.parentEl)),
+ t
+ );
+ },
+ removeElement: function () {
+ this.el && (this.el.remove(), (this.el = null));
+ },
+ updatePosition: function () {
+ var t, e;
+ this.getEl(),
+ null === this.top0 &&
+ ((t = this.sourceEl.offset()),
+ (e = this.el.offsetParent().offset()),
+ (this.top0 = t.top - e.top),
+ (this.left0 = t.left - e.left)),
+ this.el.css({ top: this.top0 + this.topDelta, left: this.left0 + this.leftDelta });
+ },
+ handleMove: function (t) {
+ (this.topDelta = E(t) - this.y0), (this.leftDelta = w(t) - this.x0), this.isHidden || this.updatePosition();
+ },
+ hide: function () {
+ this.isHidden || ((this.isHidden = !0), this.el && this.el.hide());
+ },
+ show: function () {
+ this.isHidden && ((this.isHidden = !1), this.updatePosition(), this.getEl().show());
+ },
+ }),
+ me = (qt.Grid = St.extend(ce, de, {
+ hasDayInteractions: !0,
+ view: null,
+ isRTL: null,
+ start: null,
+ end: null,
+ el: null,
+ elsByFill: null,
+ eventTimeFormat: null,
+ displayEventTime: null,
+ displayEventEnd: null,
+ minResizeDuration: null,
+ largeUnit: null,
+ dayDragListener: null,
+ segDragListener: null,
+ segResizeListener: null,
+ externalDragListener: null,
+ constructor: function (t) {
+ (this.view = t),
+ (this.isRTL = t.opt('isRTL')),
+ (this.elsByFill = {}),
+ (this.dayDragListener = this.buildDayDragListener()),
+ this.initMouseIgnoring();
+ },
+ computeEventTimeFormat: function () {
+ return this.view.opt('smallTimeFormat');
+ },
+ computeDisplayEventTime: function () {
+ return !0;
+ },
+ computeDisplayEventEnd: function () {
+ return !0;
+ },
+ setRange: function (t) {
+ (this.start = t.start.clone()), (this.end = t.end.clone()), this.rangeUpdated(), this.processRangeOptions();
+ },
+ rangeUpdated: function () {},
+ processRangeOptions: function () {
+ var t,
+ e,
+ n = this.view;
+ (this.eventTimeFormat = n.opt('eventTimeFormat') || n.opt('timeFormat') || this.computeEventTimeFormat()),
+ (t = n.opt('displayEventTime')),
+ null == t && (t = this.computeDisplayEventTime()),
+ (e = n.opt('displayEventEnd')),
+ null == e && (e = this.computeDisplayEventEnd()),
+ (this.displayEventTime = t),
+ (this.displayEventEnd = e);
+ },
+ spanToSegs: function (t) {},
+ diffDates: function (t, e) {
+ return this.largeUnit ? O(t, e, this.largeUnit) : N(t, e);
+ },
+ prepareHits: function () {},
+ releaseHits: function () {},
+ queryHit: function (t, e) {},
+ getHitSpan: function (t) {},
+ getHitEl: function (t) {},
+ setElement: function (t) {
+ (this.el = t),
+ this.hasDayInteractions &&
+ (D(t), this.bindDayHandler('touchstart', this.dayTouchStart), this.bindDayHandler('mousedown', this.dayMousedown)),
+ this.bindSegHandlers(),
+ this.bindGlobalHandlers();
+ },
+ bindDayHandler: function (e, n) {
+ var i = this;
+ this.el.on(e, function (e) {
+ if (!t(e.target).is(i.segSelector + ',' + i.segSelector + ' *,.fc-more,a[data-goto]')) return n.call(i, e);
+ });
+ },
+ removeElement: function () {
+ this.unbindGlobalHandlers(), this.clearDragListeners(), this.el.remove();
+ },
+ renderSkeleton: function () {},
+ renderDates: function () {},
+ unrenderDates: function () {},
+ bindGlobalHandlers: function () {
+ this.listenTo(t(document), { dragstart: this.externalDragStart, sortstart: this.externalDragStart });
+ },
+ unbindGlobalHandlers: function () {
+ this.stopListeningTo(t(document));
+ },
+ dayMousedown: function (t) {
+ this.isIgnoringMouse || this.dayDragListener.startInteraction(t, {});
+ },
+ dayTouchStart: function (t) {
+ var e = this.view,
+ n = e.opt('selectLongPressDelay');
+ (e.isSelected || e.selectedEvent) && this.tempIgnoreMouse(),
+ null == n && (n = e.opt('longPressDelay')),
+ this.dayDragListener.startInteraction(t, { delay: n });
+ },
+ buildDayDragListener: function () {
+ var t,
+ e,
+ n = this,
+ i = this.view,
+ r = i.opt('selectable'),
+ l = new pe(this, {
+ scroll: i.opt('dragScroll'),
+ interactionStart: function () {
+ (t = l.origHit), (e = null);
+ },
+ dragStart: function () {
+ i.unselect();
+ },
+ hitOver: function (i, o, l) {
+ l &&
+ (o || (t = null),
+ r && ((e = n.computeSelection(n.getHitSpan(l), n.getHitSpan(i))), e ? n.renderSelection(e) : e === !1 && s()));
+ },
+ hitOut: function () {
+ (t = null), (e = null), n.unrenderSelection();
+ },
+ hitDone: function () {
+ o();
+ },
+ interactionEnd: function (r, s) {
+ s || (t && !n.isIgnoringMouse && i.triggerDayClick(n.getHitSpan(t), n.getHitEl(t), r), e && i.reportSelection(e, r));
+ },
+ });
+ return l;
+ },
+ clearDragListeners: function () {
+ this.dayDragListener.endInteraction(),
+ this.segDragListener && this.segDragListener.endInteraction(),
+ this.segResizeListener && this.segResizeListener.endInteraction(),
+ this.externalDragListener && this.externalDragListener.endInteraction();
+ },
+ renderEventLocationHelper: function (t, e) {
+ var n = this.fabricateHelperEvent(t, e);
+ return this.renderHelper(n, e);
+ },
+ fabricateHelperEvent: function (t, e) {
+ var n = e ? Z(e.event) : {};
+ return (
+ (n.start = t.start.clone()),
+ (n.end = t.end ? t.end.clone() : null),
+ (n.allDay = null),
+ this.view.calendar.normalizeEventDates(n),
+ (n.className = (n.className || []).concat('fc-helper')),
+ e || (n.editable = !1),
+ n
+ );
+ },
+ renderHelper: function (t, e) {},
+ unrenderHelper: function () {},
+ renderSelection: function (t) {
+ this.renderHighlight(t);
+ },
+ unrenderSelection: function () {
+ this.unrenderHighlight();
+ },
+ computeSelection: function (t, e) {
+ var n = this.computeSelectionSpan(t, e);
+ return !(n && !this.view.calendar.isSelectionSpanAllowed(n)) && n;
+ },
+ computeSelectionSpan: function (t, e) {
+ var n = [t.start, t.end, e.start, e.end];
+ return n.sort(st), { start: n[0].clone(), end: n[3].clone() };
+ },
+ renderHighlight: function (t) {
+ this.renderFill('highlight', this.spanToSegs(t));
+ },
+ unrenderHighlight: function () {
+ this.unrenderFill('highlight');
+ },
+ highlightSegClasses: function () {
+ return ['fc-highlight'];
+ },
+ renderBusinessHours: function () {},
+ unrenderBusinessHours: function () {},
+ getNowIndicatorUnit: function () {},
+ renderNowIndicator: function (t) {},
+ unrenderNowIndicator: function () {},
+ renderFill: function (t, e) {},
+ unrenderFill: function (t) {
+ var e = this.elsByFill[t];
+ e && (e.remove(), delete this.elsByFill[t]);
+ },
+ renderFillSegEls: function (e, n) {
+ var i,
+ r = this,
+ s = this[e + 'SegEl'],
+ o = '',
+ l = [];
+ if (n.length) {
+ for (i = 0; i < n.length; i++) o += this.fillSegHtml(e, n[i]);
+ t(o).each(function (e, i) {
+ var o = n[e],
+ a = t(i);
+ s && (a = s.call(r, o, a)), a && ((a = t(a)), a.is(r.fillSegTag) && ((o.el = a), l.push(o)));
+ });
+ }
+ return l;
+ },
+ fillSegTag: 'div',
+ fillSegHtml: function (t, e) {
+ var n = this[t + 'SegClasses'],
+ i = this[t + 'SegCss'],
+ r = n ? n.call(this, e) : [],
+ s = nt(i ? i.call(this, e) : {});
+ return '<' + this.fillSegTag + (r.length ? ' class="' + r.join(' ') + '"' : '') + (s ? ' style="' + s + '"' : '') + ' />';
+ },
+ getDayClasses: function (t, e) {
+ var n = this.view,
+ i = n.calendar.getNow(),
+ r = ['fc-' + Xt[t.day()]];
+ return (
+ 1 == n.intervalDuration.as('months') && t.month() != n.intervalStart.month() && r.push('fc-other-month'),
+ t.isSame(i, 'day')
+ ? (r.push('fc-today'), e !== !0 && r.push(n.highlightStateClass))
+ : t < i
+ ? r.push('fc-past')
+ : r.push('fc-future'),
+ r
+ );
+ },
+ }));
+ me.mixin({
+ segSelector: '.fc-event-container > *',
+ mousedOverSeg: null,
+ isDraggingSeg: !1,
+ isResizingSeg: !1,
+ isDraggingExternal: !1,
+ segs: null,
+ renderEvents: function (t) {
+ var e,
+ n = [],
+ i = [];
+ for (e = 0; e < t.length; e++) (Rt(t[e]) ? n : i).push(t[e]);
+ this.segs = [].concat(this.renderBgEvents(n), this.renderFgEvents(i));
+ },
+ renderBgEvents: function (t) {
+ var e = this.eventsToSegs(t);
+ return this.renderBgSegs(e) || e;
+ },
+ renderFgEvents: function (t) {
+ var e = this.eventsToSegs(t);
+ return this.renderFgSegs(e) || e;
+ },
+ unrenderEvents: function () {
+ this.handleSegMouseout(), this.clearDragListeners(), this.unrenderFgSegs(), this.unrenderBgSegs(), (this.segs = null);
+ },
+ getEventSegs: function () {
+ return this.segs || [];
+ },
+ renderFgSegs: function (t) {},
+ unrenderFgSegs: function () {},
+ renderFgSegEls: function (e, n) {
+ var i,
+ r = this.view,
+ s = '',
+ o = [];
+ if (e.length) {
+ for (i = 0; i < e.length; i++) s += this.fgSegHtml(e[i], n);
+ t(s).each(function (n, i) {
+ var s = e[n],
+ l = r.resolveEventEl(s.event, t(i));
+ l && (l.data('fc-seg', s), (s.el = l), o.push(s));
+ });
+ }
+ return o;
+ },
+ fgSegHtml: function (t, e) {},
+ renderBgSegs: function (t) {
+ return this.renderFill('bgEvent', t);
+ },
+ unrenderBgSegs: function () {
+ this.unrenderFill('bgEvent');
+ },
+ bgEventSegEl: function (t, e) {
+ return this.view.resolveEventEl(t.event, e);
+ },
+ bgEventSegClasses: function (t) {
+ var e = t.event,
+ n = e.source || {};
+ return ['fc-bgevent'].concat(e.className, n.className || []);
+ },
+ bgEventSegCss: function (t) {
+ return { 'background-color': this.getSegSkinCss(t)['background-color'] };
+ },
+ businessHoursSegClasses: function (t) {
+ return ['fc-nonbusiness', 'fc-bgevent'];
+ },
+ buildBusinessHourSegs: function (t, e) {
+ return this.eventsToSegs(this.buildBusinessHourEvents(t, e));
+ },
+ buildBusinessHourEvents: function (e, n) {
+ var i,
+ r = this.view.calendar;
+ return (
+ null == n && (n = r.options.businessHours),
+ (i = r.computeBusinessHourEvents(e, n)),
+ !i.length && n && (i = [t.extend({}, ke, { start: this.view.end, end: this.view.end, dow: null })]),
+ i
+ );
+ },
+ bindSegHandlers: function () {
+ this.bindSegHandlersToEl(this.el);
+ },
+ bindSegHandlersToEl: function (t) {
+ this.bindSegHandlerToEl(t, 'touchstart', this.handleSegTouchStart),
+ this.bindSegHandlerToEl(t, 'touchend', this.handleSegTouchEnd),
+ this.bindSegHandlerToEl(t, 'mouseenter', this.handleSegMouseover),
+ this.bindSegHandlerToEl(t, 'mouseleave', this.handleSegMouseout),
+ this.bindSegHandlerToEl(t, 'mousedown', this.handleSegMousedown),
+ this.bindSegHandlerToEl(t, 'click', this.handleSegClick);
+ },
+ bindSegHandlerToEl: function (e, n, i) {
+ var r = this;
+ e.on(n, this.segSelector, function (e) {
+ var n = t(this).data('fc-seg');
+ if (n && !r.isDraggingSeg && !r.isResizingSeg) return i.call(r, n, e);
+ });
+ },
+ handleSegClick: function (t, e) {
+ var n = this.view.publiclyTrigger('eventClick', t.el[0], t.event, e);
+ n === !1 && e.preventDefault();
+ },
+ handleSegMouseover: function (t, e) {
+ this.isIgnoringMouse ||
+ this.mousedOverSeg ||
+ ((this.mousedOverSeg = t),
+ this.view.isEventResizable(t.event) && t.el.addClass('fc-allow-mouse-resize'),
+ this.view.publiclyTrigger('eventMouseover', t.el[0], t.event, e));
+ },
+ handleSegMouseout: function (t, e) {
+ (e = e || {}),
+ this.mousedOverSeg &&
+ ((t = t || this.mousedOverSeg),
+ (this.mousedOverSeg = null),
+ this.view.isEventResizable(t.event) && t.el.removeClass('fc-allow-mouse-resize'),
+ this.view.publiclyTrigger('eventMouseout', t.el[0], t.event, e));
+ },
+ handleSegMousedown: function (t, e) {
+ var n = this.startSegResize(t, e, { distance: 5 });
+ !n && this.view.isEventDraggable(t.event) && this.buildSegDragListener(t).startInteraction(e, { distance: 5 });
+ },
+ handleSegTouchStart: function (t, e) {
+ var n,
+ i,
+ r = this.view,
+ s = t.event,
+ o = r.isEventSelected(s),
+ l = r.isEventDraggable(s),
+ a = r.isEventResizable(s),
+ u = !1;
+ o && a && (u = this.startSegResize(t, e)),
+ u ||
+ (!l && !a) ||
+ ((i = r.opt('eventLongPressDelay')),
+ null == i && (i = r.opt('longPressDelay')),
+ (n = l ? this.buildSegDragListener(t) : this.buildSegSelectListener(t)),
+ n.startInteraction(e, { delay: o ? 0 : i })),
+ this.tempIgnoreMouse();
+ },
+ handleSegTouchEnd: function (t, e) {
+ this.tempIgnoreMouse();
+ },
+ startSegResize: function (e, n, i) {
+ return (
+ !!t(n.target).is('.fc-resizer') && (this.buildSegResizeListener(e, t(n.target).is('.fc-start-resizer')).startInteraction(n, i), !0)
+ );
+ },
+ buildSegDragListener: function (t) {
+ var e,
+ n,
+ i,
+ r = this,
+ l = this.view,
+ a = l.calendar,
+ u = t.el,
+ c = t.event;
+ if (this.segDragListener) return this.segDragListener;
+ var d = (this.segDragListener = new pe(l, {
+ scroll: l.opt('dragScroll'),
+ subjectEl: u,
+ subjectCenter: !0,
+ interactionStart: function (i) {
+ (t.component = r),
+ (e = !1),
+ (n = new ve(t.el, {
+ additionalClass: 'fc-dragging',
+ parentEl: l.el,
+ opacity: d.isTouch ? null : l.opt('dragOpacity'),
+ revertDuration: l.opt('dragRevertDuration'),
+ zIndex: 2,
+ })),
+ n.hide(),
+ n.start(i);
+ },
+ dragStart: function (n) {
+ d.isTouch && !l.isEventSelected(c) && l.selectEvent(c), (e = !0), r.handleSegMouseout(t, n), r.segDragStart(t, n), l.hideEvent(c);
+ },
+ hitOver: function (e, o, u) {
+ var h;
+ t.hit && (u = t.hit),
+ (i = r.computeEventDrop(u.component.getHitSpan(u), e.component.getHitSpan(e), c)),
+ i && !a.isEventSpanAllowed(r.eventToSpan(i), c) && (s(), (i = null)),
+ i && (h = l.renderDrag(i, t)) ? (h.addClass('fc-dragging'), d.isTouch || r.applyDragOpacity(h), n.hide()) : n.show(),
+ o && (i = null);
+ },
+ hitOut: function () {
+ l.unrenderDrag(), n.show(), (i = null);
+ },
+ hitDone: function () {
+ o();
+ },
+ interactionEnd: function (s) {
+ delete t.component,
+ n.stop(!i, function () {
+ e && (l.unrenderDrag(), r.segDragStop(t, s)), i ? l.reportEventDrop(c, i, r.largeUnit, u, s) : l.showEvent(c);
+ }),
+ (r.segDragListener = null);
+ },
+ }));
+ return d;
+ },
+ buildSegSelectListener: function (t) {
+ var e = this,
+ n = this.view,
+ i = t.event;
+ if (this.segDragListener) return this.segDragListener;
+ var r = (this.segDragListener = new ge({
+ dragStart: function (t) {
+ r.isTouch && !n.isEventSelected(i) && n.selectEvent(i);
+ },
+ interactionEnd: function (t) {
+ e.segDragListener = null;
+ },
+ }));
+ return r;
+ },
+ segDragStart: function (t, e) {
+ (this.isDraggingSeg = !0), this.view.publiclyTrigger('eventDragStart', t.el[0], t.event, e, {});
+ },
+ segDragStop: function (t, e) {
+ (this.isDraggingSeg = !1), this.view.publiclyTrigger('eventDragStop', t.el[0], t.event, e, {});
+ },
+ computeEventDrop: function (t, e, n) {
+ var i,
+ r,
+ s = this.view.calendar,
+ o = t.start,
+ l = e.start;
+ return (
+ o.hasTime() === l.hasTime()
+ ? ((i = this.diffDates(l, o)),
+ n.allDay && W(i)
+ ? ((r = { start: n.start.clone(), end: s.getEventEnd(n), allDay: !1 }), s.normalizeEventTimes(r))
+ : (r = Ht(n)),
+ r.start.add(i),
+ r.end && r.end.add(i))
+ : (r = { start: l.clone(), end: null, allDay: !l.hasTime() }),
+ r
+ );
+ },
+ applyDragOpacity: function (t) {
+ var e = this.view.opt('dragOpacity');
+ null != e && t.css('opacity', e);
+ },
+ externalDragStart: function (e, n) {
+ var i,
+ r,
+ s = this.view;
+ s.opt('droppable') &&
+ ((i = t((n ? n.item : null) || e.target)),
+ (r = s.opt('dropAccept')),
+ (t.isFunction(r) ? r.call(i[0], i) : i.is(r)) && (this.isDraggingExternal || this.listenToExternalDrag(i, e, n)));
+ },
+ listenToExternalDrag: function (t, e, n) {
+ var i,
+ r = this,
+ l = this.view.calendar,
+ a = Mt(t),
+ u = (r.externalDragListener = new pe(this, {
+ interactionStart: function () {
+ r.isDraggingExternal = !0;
+ },
+ hitOver: function (t) {
+ (i = r.computeExternalDrop(t.component.getHitSpan(t), a)),
+ i && !l.isExternalSpanAllowed(r.eventToSpan(i), i, a.eventProps) && (s(), (i = null)),
+ i && r.renderDrag(i);
+ },
+ hitOut: function () {
+ i = null;
+ },
+ hitDone: function () {
+ o(), r.unrenderDrag();
+ },
+ interactionEnd: function (e) {
+ i && r.view.reportExternalDrop(a, i, t, e, n), (r.isDraggingExternal = !1), (r.externalDragListener = null);
+ },
+ }));
+ u.startDrag(e);
+ },
+ computeExternalDrop: function (t, e) {
+ var n = this.view.calendar,
+ i = { start: n.applyTimezone(t.start), end: null };
+ return e.startTime && !i.start.hasTime() && i.start.time(e.startTime), e.duration && (i.end = i.start.clone().add(e.duration)), i;
+ },
+ renderDrag: function (t, e) {},
+ unrenderDrag: function () {},
+ buildSegResizeListener: function (t, e) {
+ var n,
+ i,
+ r = this,
+ l = this.view,
+ a = l.calendar,
+ u = t.el,
+ c = t.event,
+ d = a.getEventEnd(c),
+ h = (this.segResizeListener = new pe(this, {
+ scroll: l.opt('dragScroll'),
+ subjectEl: u,
+ interactionStart: function () {
+ n = !1;
+ },
+ dragStart: function (e) {
+ (n = !0), r.handleSegMouseout(t, e), r.segResizeStart(t, e);
+ },
+ hitOver: function (n, o, u) {
+ var h = r.getHitSpan(u),
+ f = r.getHitSpan(n);
+ (i = e ? r.computeEventStartResize(h, f, c) : r.computeEventEndResize(h, f, c)),
+ i &&
+ (a.isEventSpanAllowed(r.eventToSpan(i), c)
+ ? i.start.isSame(c.start.clone().stripZone()) && i.end.isSame(d.clone().stripZone()) && (i = null)
+ : (s(), (i = null))),
+ i && (l.hideEvent(c), r.renderEventResize(i, t));
+ },
+ hitOut: function () {
+ (i = null), l.showEvent(c);
+ },
+ hitDone: function () {
+ r.unrenderEventResize(), o();
+ },
+ interactionEnd: function (e) {
+ n && r.segResizeStop(t, e), i ? l.reportEventResize(c, i, r.largeUnit, u, e) : l.showEvent(c), (r.segResizeListener = null);
+ },
+ }));
+ return h;
+ },
+ segResizeStart: function (t, e) {
+ (this.isResizingSeg = !0), this.view.publiclyTrigger('eventResizeStart', t.el[0], t.event, e, {});
+ },
+ segResizeStop: function (t, e) {
+ (this.isResizingSeg = !1), this.view.publiclyTrigger('eventResizeStop', t.el[0], t.event, e, {});
+ },
+ computeEventStartResize: function (t, e, n) {
+ return this.computeEventResize('start', t, e, n);
+ },
+ computeEventEndResize: function (t, e, n) {
+ return this.computeEventResize('end', t, e, n);
+ },
+ computeEventResize: function (t, e, n, i) {
+ var r,
+ s,
+ o = this.view.calendar,
+ l = this.diffDates(n[t], e[t]);
+ return (
+ (r = { start: i.start.clone(), end: o.getEventEnd(i), allDay: i.allDay }),
+ r.allDay && W(l) && ((r.allDay = !1), o.normalizeEventTimes(r)),
+ r[t].add(l),
+ r.start.isBefore(r.end) ||
+ ((s = this.minResizeDuration || (i.allDay ? o.defaultAllDayEventDuration : o.defaultTimedEventDuration)),
+ 'start' == t ? (r.start = r.end.clone().subtract(s)) : (r.end = r.start.clone().add(s))),
+ r
+ );
+ },
+ renderEventResize: function (t, e) {},
+ unrenderEventResize: function () {},
+ getEventTimeText: function (t, e, n) {
+ return (
+ null == e && (e = this.eventTimeFormat),
+ null == n && (n = this.displayEventEnd),
+ this.displayEventTime && t.start.hasTime() ? (n && t.end ? this.view.formatRange(t, e) : t.start.format(e)) : ''
+ );
+ },
+ getSegClasses: function (t, e, n) {
+ var i = this.view,
+ r = ['fc-event', t.isStart ? 'fc-start' : 'fc-not-start', t.isEnd ? 'fc-end' : 'fc-not-end'].concat(this.getSegCustomClasses(t));
+ return e && r.push('fc-draggable'), n && r.push('fc-resizable'), i.isEventSelected(t.event) && r.push('fc-selected'), r;
+ },
+ getSegCustomClasses: function (t) {
+ var e = t.event;
+ return [].concat(e.className, e.source ? e.source.className : []);
+ },
+ getSegSkinCss: function (t) {
+ return {
+ 'background-color': this.getSegBackgroundColor(t),
+ 'border-color': this.getSegBorderColor(t),
+ color: this.getSegTextColor(t),
+ };
+ },
+ getSegBackgroundColor: function (t) {
+ return t.event.backgroundColor || t.event.color || this.getSegDefaultBackgroundColor(t);
+ },
+ getSegDefaultBackgroundColor: function (t) {
+ var e = t.event.source || {};
+ return e.backgroundColor || e.color || this.view.opt('eventBackgroundColor') || this.view.opt('eventColor');
+ },
+ getSegBorderColor: function (t) {
+ return t.event.borderColor || t.event.color || this.getSegDefaultBorderColor(t);
+ },
+ getSegDefaultBorderColor: function (t) {
+ var e = t.event.source || {};
+ return e.borderColor || e.color || this.view.opt('eventBorderColor') || this.view.opt('eventColor');
+ },
+ getSegTextColor: function (t) {
+ return t.event.textColor || this.getSegDefaultTextColor(t);
+ },
+ getSegDefaultTextColor: function (t) {
+ var e = t.event.source || {};
+ return e.textColor || this.view.opt('eventTextColor');
+ },
+ eventToSegs: function (t) {
+ return this.eventsToSegs([t]);
+ },
+ eventToSpan: function (t) {
+ return this.eventToSpans(t)[0];
+ },
+ eventToSpans: function (t) {
+ var e = this.eventToRange(t);
+ return this.eventRangeToSpans(e, t);
+ },
+ eventsToSegs: function (e, n) {
+ var i = this,
+ r = kt(e),
+ s = [];
+ return (
+ t.each(r, function (t, e) {
+ var r,
+ o = [];
+ for (r = 0; r < e.length; r++) o.push(i.eventToRange(e[r]));
+ if (xt(e[0])) for (o = i.invertRanges(o), r = 0; r < o.length; r++) s.push.apply(s, i.eventRangeToSegs(o[r], e[0], n));
+ else for (r = 0; r < o.length; r++) s.push.apply(s, i.eventRangeToSegs(o[r], e[r], n));
+ }),
+ s
+ );
+ },
+ eventToRange: function (t) {
+ var e = this.view.calendar,
+ n = t.start.clone().stripZone(),
+ i = (t.end ? t.end.clone() : e.getDefaultEventEnd(null != t.allDay ? t.allDay : !t.start.hasTime(), t.start)).stripZone();
+ return e.localizeMoment(n), e.localizeMoment(i), { start: n, end: i };
+ },
+ eventRangeToSegs: function (t, e, n) {
+ var i,
+ r = this.eventRangeToSpans(t, e),
+ s = [];
+ for (i = 0; i < r.length; i++) s.push.apply(s, this.eventSpanToSegs(r[i], e, n));
+ return s;
+ },
+ eventRangeToSpans: function (e, n) {
+ return [t.extend({}, e)];
+ },
+ eventSpanToSegs: function (t, e, n) {
+ var i,
+ r,
+ s = n ? n(t) : this.spanToSegs(t);
+ for (i = 0; i < s.length; i++) (r = s[i]), (r.event = e), (r.eventStartMS = +t.start), (r.eventDurationMS = t.end - t.start);
+ return s;
+ },
+ invertRanges: function (t) {
+ var e,
+ n,
+ i = this.view,
+ r = i.start.clone(),
+ s = i.end.clone(),
+ o = [],
+ l = r;
+ for (t.sort(Lt), e = 0; e < t.length; e++) (n = t[e]), n.start > l && o.push({ start: l, end: n.start }), (l = n.end);
+ return l < s && o.push({ start: l, end: s }), o;
+ },
+ sortEventSegs: function (t) {
+ t.sort(lt(this, 'compareEventSegs'));
+ },
+ compareEventSegs: function (t, e) {
+ return (
+ t.eventStartMS - e.eventStartMS ||
+ e.eventDurationMS - t.eventDurationMS ||
+ e.event.allDay - t.event.allDay ||
+ M(t.event, e.event, this.view.eventOrderSpecs)
+ );
+ },
+ }),
+ (qt.pluckEventDateProps = Ht),
+ (qt.isBgEvent = Rt),
+ (qt.dataAttrPrefix = '');
+ var ye = (qt.DayTableMixin = {
+ breakOnWeeks: !1,
+ dayDates: null,
+ dayIndices: null,
+ daysPerRow: null,
+ rowCnt: null,
+ colCnt: null,
+ colHeadFormat: null,
+ updateDayTable: function () {
+ for (var t, e, n, i = this.view, r = this.start.clone(), s = -1, o = [], l = []; r.isBefore(this.end); )
+ i.isHiddenDay(r) ? o.push(s + 0.5) : (s++, o.push(s), l.push(r.clone())), r.add(1, 'days');
+ if (this.breakOnWeeks) {
+ for (e = l[0].day(), t = 1; t < l.length && l[t].day() != e; t++);
+ n = Math.ceil(l.length / t);
+ } else (n = 1), (t = l.length);
+ (this.dayDates = l), (this.dayIndices = o), (this.daysPerRow = t), (this.rowCnt = n), this.updateDayTableCols();
+ },
+ updateDayTableCols: function () {
+ (this.colCnt = this.computeColCnt()), (this.colHeadFormat = this.view.opt('columnFormat') || this.computeColHeadFormat());
+ },
+ computeColCnt: function () {
+ return this.daysPerRow;
+ },
+ getCellDate: function (t, e) {
+ return this.dayDates[this.getCellDayIndex(t, e)].clone();
+ },
+ getCellRange: function (t, e) {
+ var n = this.getCellDate(t, e),
+ i = n.clone().add(1, 'days');
+ return { start: n, end: i };
+ },
+ getCellDayIndex: function (t, e) {
+ return t * this.daysPerRow + this.getColDayIndex(e);
+ },
+ getColDayIndex: function (t) {
+ return this.isRTL ? this.colCnt - 1 - t : t;
+ },
+ getDateDayIndex: function (t) {
+ var e = this.dayIndices,
+ n = t.diff(this.start, 'days');
+ return n < 0 ? e[0] - 1 : n >= e.length ? e[e.length - 1] + 1 : e[n];
+ },
+ computeColHeadFormat: function () {
+ return this.rowCnt > 1 || this.colCnt > 10 ? 'ddd' : this.colCnt > 1 ? this.view.opt('dayOfMonthFormat') : 'dddd';
+ },
+ sliceRangeByRow: function (t) {
+ var e,
+ n,
+ i,
+ r,
+ s,
+ o = this.daysPerRow,
+ l = this.view.computeDayRange(t),
+ a = this.getDateDayIndex(l.start),
+ u = this.getDateDayIndex(l.end.clone().subtract(1, 'days')),
+ c = [];
+ for (e = 0; e < this.rowCnt; e++)
+ (n = e * o),
+ (i = n + o - 1),
+ (r = Math.max(a, n)),
+ (s = Math.min(u, i)),
+ (r = Math.ceil(r)),
+ (s = Math.floor(s)),
+ r <= s && c.push({ row: e, firstRowDayIndex: r - n, lastRowDayIndex: s - n, isStart: r === a, isEnd: s === u });
+ return c;
+ },
+ sliceRangeByDay: function (t) {
+ var e,
+ n,
+ i,
+ r,
+ s,
+ o,
+ l = this.daysPerRow,
+ a = this.view.computeDayRange(t),
+ u = this.getDateDayIndex(a.start),
+ c = this.getDateDayIndex(a.end.clone().subtract(1, 'days')),
+ d = [];
+ for (e = 0; e < this.rowCnt; e++)
+ for (n = e * l, i = n + l - 1, r = n; r <= i; r++)
+ (s = Math.max(u, r)),
+ (o = Math.min(c, r)),
+ (s = Math.ceil(s)),
+ (o = Math.floor(o)),
+ s <= o && d.push({ row: e, firstRowDayIndex: s - n, lastRowDayIndex: o - n, isStart: s === u, isEnd: o === c });
+ return d;
+ },
+ renderHeadHtml: function () {
+ var t = this.view;
+ return '';
+ },
+ renderHeadIntroHtml: function () {
+ return this.renderIntroHtml();
+ },
+ renderHeadTrHtml: function () {
+ return (
+ '' +
+ (this.isRTL ? '' : this.renderHeadIntroHtml()) +
+ this.renderHeadDateCellsHtml() +
+ (this.isRTL ? this.renderHeadIntroHtml() : '') +
+ '
'
+ );
+ },
+ renderHeadDateCellsHtml: function () {
+ var t,
+ e,
+ n = [];
+ for (t = 0; t < this.colCnt; t++) (e = this.getCellDate(0, t)), n.push(this.renderHeadDateCellHtml(e));
+ return n.join('');
+ },
+ renderHeadDateCellHtml: function (t, e, n) {
+ var i = this.view,
+ r = ['fc-day-header', i.widgetHeaderClass];
+ return (
+ 1 === this.rowCnt ? (r = r.concat(this.getDayClasses(t, !0))) : r.push('fc-' + Xt[t.day()]),
+ ' 1 ? ' colspan="' + e + '"' : '') +
+ (n ? ' ' + n : '') +
+ '>' +
+ i.buildGotoAnchorHtml({ date: t, forceOff: this.rowCnt > 1 || 1 === this.colCnt }, tt(t.format(this.colHeadFormat))) +
+ ' | '
+ );
+ },
+ renderBgTrHtml: function (t) {
+ return (
+ '' +
+ (this.isRTL ? '' : this.renderBgIntroHtml(t)) +
+ this.renderBgCellsHtml(t) +
+ (this.isRTL ? this.renderBgIntroHtml(t) : '') +
+ '
'
+ );
+ },
+ renderBgIntroHtml: function (t) {
+ return this.renderIntroHtml();
+ },
+ renderBgCellsHtml: function (t) {
+ var e,
+ n,
+ i = [];
+ for (e = 0; e < this.colCnt; e++) (n = this.getCellDate(t, e)), i.push(this.renderBgCellHtml(n));
+ return i.join('');
+ },
+ renderBgCellHtml: function (t, e) {
+ var n = this.view,
+ i = this.getDayClasses(t);
+ return (
+ i.unshift('fc-day', n.widgetContentClass),
+ ' | '
+ );
+ },
+ renderIntroHtml: function () {},
+ bookendCells: function (t) {
+ var e = this.renderIntroHtml();
+ e && (this.isRTL ? t.append(e) : t.prepend(e));
+ },
+ }),
+ Se = (qt.DayGrid = me.extend(ye, {
+ numbersVisible: !1,
+ bottomCoordPadding: 0,
+ rowEls: null,
+ cellEls: null,
+ helperEls: null,
+ rowCoordCache: null,
+ colCoordCache: null,
+ renderDates: function (t) {
+ var e,
+ n,
+ i = this.view,
+ r = this.rowCnt,
+ s = this.colCnt,
+ o = '';
+ for (e = 0; e < r; e++) o += this.renderDayRowHtml(e, t);
+ for (
+ this.el.html(o),
+ this.rowEls = this.el.find('.fc-row'),
+ this.cellEls = this.el.find('.fc-day'),
+ this.rowCoordCache = new fe({ els: this.rowEls, isVertical: !0 }),
+ this.colCoordCache = new fe({ els: this.cellEls.slice(0, this.colCnt), isHorizontal: !0 }),
+ e = 0;
+ e < r;
+ e++
+ )
+ for (n = 0; n < s; n++) i.publiclyTrigger('dayRender', null, this.getCellDate(e, n), this.getCellEl(e, n));
+ },
+ unrenderDates: function () {
+ this.removeSegPopover();
+ },
+ renderBusinessHours: function () {
+ var t = this.buildBusinessHourSegs(!0);
+ this.renderFill('businessHours', t, 'bgevent');
+ },
+ unrenderBusinessHours: function () {
+ this.unrenderFill('businessHours');
+ },
+ renderDayRowHtml: function (t, e) {
+ var n = this.view,
+ i = ['fc-row', 'fc-week', n.widgetContentClass];
+ return (
+ e && i.push('fc-rigid'),
+ '' +
+ this.renderBgTrHtml(t) +
+ '
' +
+ (this.numbersVisible ? '' + this.renderNumberTrHtml(t) + '' : '') +
+ '
'
+ );
+ },
+ renderNumberTrHtml: function (t) {
+ return (
+ '' +
+ (this.isRTL ? '' : this.renderNumberIntroHtml(t)) +
+ this.renderNumberCellsHtml(t) +
+ (this.isRTL ? this.renderNumberIntroHtml(t) : '') +
+ '
'
+ );
+ },
+ renderNumberIntroHtml: function (t) {
+ return this.renderIntroHtml();
+ },
+ renderNumberCellsHtml: function (t) {
+ var e,
+ n,
+ i = [];
+ for (e = 0; e < this.colCnt; e++) (n = this.getCellDate(t, e)), i.push(this.renderNumberCellHtml(n));
+ return i.join('');
+ },
+ renderNumberCellHtml: function (t) {
+ var e,
+ n,
+ i = '';
+ return this.view.dayNumbersVisible || this.view.cellWeekNumbersVisible
+ ? ((e = this.getDayClasses(t)),
+ e.unshift('fc-day-top'),
+ this.view.cellWeekNumbersVisible && (n = 'ISO' === t._locale._fullCalendar_weekCalc ? 1 : t._locale.firstDayOfWeek()),
+ (i += ''),
+ this.view.cellWeekNumbersVisible &&
+ t.day() == n &&
+ (i += this.view.buildGotoAnchorHtml({ date: t, type: 'week' }, { class: 'fc-week-number' }, t.format('w'))),
+ this.view.dayNumbersVisible && (i += this.view.buildGotoAnchorHtml(t, { class: 'fc-day-number' }, t.date())),
+ (i += ' | '))
+ : ' | ';
+ },
+ computeEventTimeFormat: function () {
+ return this.view.opt('extraSmallTimeFormat');
+ },
+ computeDisplayEventEnd: function () {
+ return 1 == this.colCnt;
+ },
+ rangeUpdated: function () {
+ this.updateDayTable();
+ },
+ spanToSegs: function (t) {
+ var e,
+ n,
+ i = this.sliceRangeByRow(t);
+ for (e = 0; e < i.length; e++)
+ (n = i[e]),
+ this.isRTL
+ ? ((n.leftCol = this.daysPerRow - 1 - n.lastRowDayIndex), (n.rightCol = this.daysPerRow - 1 - n.firstRowDayIndex))
+ : ((n.leftCol = n.firstRowDayIndex), (n.rightCol = n.lastRowDayIndex));
+ return i;
+ },
+ prepareHits: function () {
+ this.colCoordCache.build(), this.rowCoordCache.build(), (this.rowCoordCache.bottoms[this.rowCnt - 1] += this.bottomCoordPadding);
+ },
+ releaseHits: function () {
+ this.colCoordCache.clear(), this.rowCoordCache.clear();
+ },
+ queryHit: function (t, e) {
+ if (this.colCoordCache.isLeftInBounds(t) && this.rowCoordCache.isTopInBounds(e)) {
+ var n = this.colCoordCache.getHorizontalIndex(t),
+ i = this.rowCoordCache.getVerticalIndex(e);
+ if (null != i && null != n) return this.getCellHit(i, n);
+ }
+ },
+ getHitSpan: function (t) {
+ return this.getCellRange(t.row, t.col);
+ },
+ getHitEl: function (t) {
+ return this.getCellEl(t.row, t.col);
+ },
+ getCellHit: function (t, e) {
+ return {
+ row: t,
+ col: e,
+ component: this,
+ left: this.colCoordCache.getLeftOffset(e),
+ right: this.colCoordCache.getRightOffset(e),
+ top: this.rowCoordCache.getTopOffset(t),
+ bottom: this.rowCoordCache.getBottomOffset(t),
+ };
+ },
+ getCellEl: function (t, e) {
+ return this.cellEls.eq(t * this.colCnt + e);
+ },
+ renderDrag: function (t, e) {
+ if ((this.renderHighlight(this.eventToSpan(t)), e && e.component !== this)) return this.renderEventLocationHelper(t, e);
+ },
+ unrenderDrag: function () {
+ this.unrenderHighlight(), this.unrenderHelper();
+ },
+ renderEventResize: function (t, e) {
+ return this.renderHighlight(this.eventToSpan(t)), this.renderEventLocationHelper(t, e);
+ },
+ unrenderEventResize: function () {
+ this.unrenderHighlight(), this.unrenderHelper();
+ },
+ renderHelper: function (e, n) {
+ var i,
+ r = [],
+ s = this.eventToSegs(e);
+ return (
+ (s = this.renderFgSegEls(s)),
+ (i = this.renderSegRows(s)),
+ this.rowEls.each(function (e, s) {
+ var o,
+ l = t(s),
+ a = t('');
+ (o = n && n.row === e ? n.el.position().top : l.find('.fc-content-skeleton tbody').position().top),
+ a.css('top', o).find('table').append(i[e].tbodyEl),
+ l.append(a),
+ r.push(a[0]);
+ }),
+ (this.helperEls = t(r))
+ );
+ },
+ unrenderHelper: function () {
+ this.helperEls && (this.helperEls.remove(), (this.helperEls = null));
+ },
+ fillSegTag: 'td',
+ renderFill: function (e, n, i) {
+ var r,
+ s,
+ o,
+ l = [];
+ for (n = this.renderFillSegEls(e, n), r = 0; r < n.length; r++)
+ (s = n[r]), (o = this.renderFillRow(e, s, i)), this.rowEls.eq(s.row).append(o), l.push(o[0]);
+ return (this.elsByFill[e] = t(l)), n;
+ },
+ renderFillRow: function (e, n, i) {
+ var r,
+ s,
+ o = this.colCnt,
+ l = n.leftCol,
+ a = n.rightCol + 1;
+ return (
+ (i = i || e.toLowerCase()),
+ (r = t('')),
+ (s = r.find('tr')),
+ l > 0 && s.append(' | '),
+ s.append(n.el.attr('colspan', a - l)),
+ a < o && s.append(' | '),
+ this.bookendCells(s),
+ r
+ );
+ },
+ }));
+ Se.mixin({
+ rowStructs: null,
+ unrenderEvents: function () {
+ this.removeSegPopover(), me.prototype.unrenderEvents.apply(this, arguments);
+ },
+ getEventSegs: function () {
+ return me.prototype.getEventSegs.call(this).concat(this.popoverSegs || []);
+ },
+ renderBgSegs: function (e) {
+ var n = t.grep(e, function (t) {
+ return t.event.allDay;
+ });
+ return me.prototype.renderBgSegs.call(this, n);
+ },
+ renderFgSegs: function (e) {
+ var n;
+ return (
+ (e = this.renderFgSegEls(e)),
+ (n = this.rowStructs = this.renderSegRows(e)),
+ this.rowEls.each(function (e, i) {
+ t(i).find('.fc-content-skeleton > table').append(n[e].tbodyEl);
+ }),
+ e
+ );
+ },
+ unrenderFgSegs: function () {
+ for (var t, e = this.rowStructs || []; (t = e.pop()); ) t.tbodyEl.remove();
+ this.rowStructs = null;
+ },
+ renderSegRows: function (t) {
+ var e,
+ n,
+ i = [];
+ for (e = this.groupSegRows(t), n = 0; n < e.length; n++) i.push(this.renderSegRow(n, e[n]));
+ return i;
+ },
+ fgSegHtml: function (t, e) {
+ var n,
+ i,
+ r = this.view,
+ s = t.event,
+ o = r.isEventDraggable(s),
+ l = !e && s.allDay && t.isStart && r.isEventResizableFromStart(s),
+ a = !e && s.allDay && t.isEnd && r.isEventResizableFromEnd(s),
+ u = this.getSegClasses(t, o, l || a),
+ c = nt(this.getSegSkinCss(t)),
+ d = '';
+ return (
+ u.unshift('fc-day-grid-event', 'fc-h-event'),
+ t.isStart && ((n = this.getEventTimeText(s)), n && (d = '' + tt(n) + '')),
+ (i = '' + (tt(s.title || '') || ' ') + ''),
+ '' +
+ (this.isRTL ? i + ' ' + d : d + ' ' + i) +
+ '
' +
+ (l ? '' : '') +
+ (a ? '' : '') +
+ ''
+ );
+ },
+ renderSegRow: function (e, n) {
+ function i(e) {
+ for (; o < e; )
+ (c = (m[r - 1] || [])[o]),
+ c ? c.attr('rowspan', parseInt(c.attr('rowspan') || 1, 10) + 1) : ((c = t(' | ')), l.append(c)),
+ (v[r][o] = c),
+ (m[r][o] = c),
+ o++;
+ }
+ var r,
+ s,
+ o,
+ l,
+ a,
+ u,
+ c,
+ d = this.colCnt,
+ h = this.buildSegLevels(n),
+ f = Math.max(1, h.length),
+ g = t(''),
+ p = [],
+ v = [],
+ m = [];
+ for (r = 0; r < f; r++) {
+ if (((s = h[r]), (o = 0), (l = t('
')), p.push([]), v.push([]), m.push([]), s))
+ for (a = 0; a < s.length; a++) {
+ for (
+ u = s[a],
+ i(u.leftCol),
+ c = t(' | ').append(u.el),
+ u.leftCol != u.rightCol ? c.attr('colspan', u.rightCol - u.leftCol + 1) : (m[r][o] = c);
+ o <= u.rightCol;
+
+ )
+ (v[r][o] = c), (p[r][o] = u), o++;
+ l.append(c);
+ }
+ i(d), this.bookendCells(l), g.append(l);
+ }
+ return { row: e, tbodyEl: g, cellMatrix: v, segMatrix: p, segLevels: h, segs: n };
+ },
+ buildSegLevels: function (t) {
+ var e,
+ n,
+ i,
+ r = [];
+ for (this.sortEventSegs(t), e = 0; e < t.length; e++) {
+ for (n = t[e], i = 0; i < r.length && Bt(n, r[i]); i++);
+ (n.level = i), (r[i] || (r[i] = [])).push(n);
+ }
+ for (i = 0; i < r.length; i++) r[i].sort(zt);
+ return r;
+ },
+ groupSegRows: function (t) {
+ var e,
+ n = [];
+ for (e = 0; e < this.rowCnt; e++) n.push([]);
+ for (e = 0; e < t.length; e++) n[t[e].row].push(t[e]);
+ return n;
+ },
+ }),
+ Se.mixin({
+ segPopover: null,
+ popoverSegs: null,
+ removeSegPopover: function () {
+ this.segPopover && this.segPopover.hide();
+ },
+ limitRows: function (t) {
+ var e,
+ n,
+ i = this.rowStructs || [];
+ for (e = 0; e < i.length; e++)
+ this.unlimitRow(e), (n = !!t && ('number' == typeof t ? t : this.computeRowLevelLimit(e))), n !== !1 && this.limitRow(e, n);
+ },
+ computeRowLevelLimit: function (e) {
+ function n(e, n) {
+ s = Math.max(s, t(n).outerHeight());
+ }
+ var i,
+ r,
+ s,
+ o = this.rowEls.eq(e),
+ l = o.height(),
+ a = this.rowStructs[e].tbodyEl.children();
+ for (i = 0; i < a.length; i++)
+ if (((r = a.eq(i).removeClass('fc-limited')), (s = 0), r.find('> td > :first-child').each(n), r.position().top + s > l)) return i;
+ return !1;
+ },
+ limitRow: function (e, n) {
+ function i(i) {
+ for (; b < i; )
+ (u = S.getCellSegs(e, b, n)),
+ u.length && ((h = s[n - 1][b]), (y = S.renderMoreLink(e, b, u)), (m = t('').append(y)), h.append(m), E.push(m[0])),
+ b++;
+ }
+ var r,
+ s,
+ o,
+ l,
+ a,
+ u,
+ c,
+ d,
+ h,
+ f,
+ g,
+ p,
+ v,
+ m,
+ y,
+ S = this,
+ w = this.rowStructs[e],
+ E = [],
+ b = 0;
+ if (n && n < w.segLevels.length) {
+ for (
+ r = w.segLevels[n - 1], s = w.cellMatrix, o = w.tbodyEl.children().slice(n).addClass('fc-limited').get(), l = 0;
+ l < r.length;
+ l++
+ ) {
+ for (a = r[l], i(a.leftCol), d = [], c = 0; b <= a.rightCol; ) (u = this.getCellSegs(e, b, n)), d.push(u), (c += u.length), b++;
+ if (c) {
+ for (h = s[n - 1][a.leftCol], f = h.attr('rowspan') || 1, g = [], p = 0; p < d.length; p++)
+ (v = t(' | ').attr('rowspan', f)),
+ (u = d[p]),
+ (y = this.renderMoreLink(e, a.leftCol + p, [a].concat(u))),
+ (m = t('').append(y)),
+ v.append(m),
+ g.push(v[0]),
+ E.push(v[0]);
+ h.addClass('fc-limited').after(t(g)), o.push(h[0]);
+ }
+ }
+ i(this.colCnt), (w.moreEls = t(E)), (w.limitedEls = t(o));
+ }
+ },
+ unlimitRow: function (t) {
+ var e = this.rowStructs[t];
+ e.moreEls && (e.moreEls.remove(), (e.moreEls = null)),
+ e.limitedEls && (e.limitedEls.removeClass('fc-limited'), (e.limitedEls = null));
+ },
+ renderMoreLink: function (e, n, i) {
+ var r = this,
+ s = this.view;
+ return t('')
+ .text(this.getMoreLinkText(i.length))
+ .on('click', function (o) {
+ var l = s.opt('eventLimitClick'),
+ a = r.getCellDate(e, n),
+ u = t(this),
+ c = r.getCellEl(e, n),
+ d = r.getCellSegs(e, n),
+ h = r.resliceDaySegs(d, a),
+ f = r.resliceDaySegs(i, a);
+ 'function' == typeof l &&
+ (l = s.publiclyTrigger('eventLimitClick', null, { date: a, dayEl: c, moreEl: u, segs: h, hiddenSegs: f }, o)),
+ 'popover' === l ? r.showSegPopover(e, n, u, h) : 'string' == typeof l && s.calendar.zoomTo(a, l);
+ });
+ },
+ showSegPopover: function (t, e, n, i) {
+ var r,
+ s,
+ o = this,
+ l = this.view,
+ a = n.parent();
+ (r = 1 == this.rowCnt ? l.el : this.rowEls.eq(t)),
+ (s = {
+ className: 'fc-more-popover',
+ content: this.renderSegPopoverContent(t, e, i),
+ parentEl: this.view.el,
+ top: r.offset().top,
+ autoHide: !0,
+ viewportConstrain: l.opt('popoverViewportConstrain'),
+ hide: function () {
+ if (o.popoverSegs)
+ for (var t, e = 0; e < o.popoverSegs.length; ++e)
+ (t = o.popoverSegs[e]), l.publiclyTrigger('eventDestroy', t.event, t.event, t.el);
+ o.segPopover.removeElement(), (o.segPopover = null), (o.popoverSegs = null);
+ },
+ }),
+ this.isRTL ? (s.right = a.offset().left + a.outerWidth() + 1) : (s.left = a.offset().left - 1),
+ (this.segPopover = new he(s)),
+ this.segPopover.show(),
+ this.bindSegHandlersToEl(this.segPopover.el);
+ },
+ renderSegPopoverContent: function (e, n, i) {
+ var r,
+ s = this.view,
+ o = s.opt('theme'),
+ l = this.getCellDate(e, n).format(s.opt('dayPopoverFormat')),
+ a = t(
+ ''
+ ),
+ u = a.find('.fc-event-container');
+ for (i = this.renderFgSegEls(i, !0), this.popoverSegs = i, r = 0; r < i.length; r++)
+ this.prepareHits(), (i[r].hit = this.getCellHit(e, n)), this.releaseHits(), u.append(i[r].el);
+ return a;
+ },
+ resliceDaySegs: function (e, n) {
+ var i = t.map(e, function (t) {
+ return t.event;
+ }),
+ r = n.clone(),
+ s = r.clone().add(1, 'days'),
+ o = { start: r, end: s };
+ return (
+ (e = this.eventsToSegs(i, function (t) {
+ var e = F(t, o);
+ return e ? [e] : [];
+ })),
+ this.sortEventSegs(e),
+ e
+ );
+ },
+ getMoreLinkText: function (t) {
+ var e = this.view.opt('eventLimitText');
+ return 'function' == typeof e ? e(t) : '+' + t + ' ' + e;
+ },
+ getCellSegs: function (t, e, n) {
+ for (var i, r = this.rowStructs[t].segMatrix, s = n || 0, o = []; s < r.length; ) (i = r[s][e]), i && o.push(i), s++;
+ return o;
+ },
+ });
+ var we = (qt.TimeGrid = me.extend(ye, {
+ slotDuration: null,
+ snapDuration: null,
+ snapsPerSlot: null,
+ minTime: null,
+ maxTime: null,
+ labelFormat: null,
+ labelInterval: null,
+ colEls: null,
+ slatContainerEl: null,
+ slatEls: null,
+ nowIndicatorEls: null,
+ colCoordCache: null,
+ slatCoordCache: null,
+ constructor: function () {
+ me.apply(this, arguments), this.processOptions();
+ },
+ renderDates: function () {
+ this.el.html(this.renderHtml()),
+ (this.colEls = this.el.find('.fc-day')),
+ (this.slatContainerEl = this.el.find('.fc-slats')),
+ (this.slatEls = this.slatContainerEl.find('tr')),
+ (this.colCoordCache = new fe({ els: this.colEls, isHorizontal: !0 })),
+ (this.slatCoordCache = new fe({ els: this.slatEls, isVertical: !0 })),
+ this.renderContentSkeleton();
+ },
+ renderHtml: function () {
+ return (
+ '' +
+ this.renderBgTrHtml(0) +
+ '
' +
+ this.renderSlatRowHtml() +
+ '
'
+ );
+ },
+ renderSlatRowHtml: function () {
+ for (var t, n, i, r = this.view, s = this.isRTL, o = '', l = e.duration(+this.minTime); l < this.maxTime; )
+ (t = this.start.clone().time(l)),
+ (n = ot(_(l, this.labelInterval))),
+ (i =
+ '' +
+ (n ? '' + tt(t.format(this.labelFormat)) + '' : '') +
+ ' | '),
+ (o +=
+ '' +
+ (s ? '' : i) +
+ ' | ' +
+ (s ? i : '') +
+ '
'),
+ l.add(this.slotDuration);
+ return o;
+ },
+ processOptions: function () {
+ var n,
+ i = this.view,
+ r = i.opt('slotDuration'),
+ s = i.opt('snapDuration');
+ (r = e.duration(r)),
+ (s = s ? e.duration(s) : r),
+ (this.slotDuration = r),
+ (this.snapDuration = s),
+ (this.snapsPerSlot = r / s),
+ (this.minResizeDuration = s),
+ (this.minTime = e.duration(i.opt('minTime'))),
+ (this.maxTime = e.duration(i.opt('maxTime'))),
+ (n = i.opt('slotLabelFormat')),
+ t.isArray(n) && (n = n[n.length - 1]),
+ (this.labelFormat = n || i.opt('smallTimeFormat')),
+ (n = i.opt('slotLabelInterval')),
+ (this.labelInterval = n ? e.duration(n) : this.computeLabelInterval(r));
+ },
+ computeLabelInterval: function (t) {
+ var n, i, r;
+ for (n = Oe.length - 1; n >= 0; n--) if (((i = e.duration(Oe[n])), (r = _(i, t)), ot(r) && r > 1)) return i;
+ return e.duration(t);
+ },
+ computeEventTimeFormat: function () {
+ return this.view.opt('noMeridiemTimeFormat');
+ },
+ computeDisplayEventEnd: function () {
+ return !0;
+ },
+ prepareHits: function () {
+ this.colCoordCache.build(), this.slatCoordCache.build();
+ },
+ releaseHits: function () {
+ this.colCoordCache.clear();
+ },
+ queryHit: function (t, e) {
+ var n = this.snapsPerSlot,
+ i = this.colCoordCache,
+ r = this.slatCoordCache;
+ if (i.isLeftInBounds(t) && r.isTopInBounds(e)) {
+ var s = i.getHorizontalIndex(t),
+ o = r.getVerticalIndex(e);
+ if (null != s && null != o) {
+ var l = r.getTopOffset(o),
+ a = r.getHeight(o),
+ u = (e - l) / a,
+ c = Math.floor(u * n),
+ d = o * n + c,
+ h = l + (c / n) * a,
+ f = l + ((c + 1) / n) * a;
+ return { col: s, snap: d, component: this, left: i.getLeftOffset(s), right: i.getRightOffset(s), top: h, bottom: f };
+ }
+ }
+ },
+ getHitSpan: function (t) {
+ var e,
+ n = this.getCellDate(0, t.col),
+ i = this.computeSnapTime(t.snap);
+ return n.time(i), (e = n.clone().add(this.snapDuration)), { start: n, end: e };
+ },
+ getHitEl: function (t) {
+ return this.colEls.eq(t.col);
+ },
+ rangeUpdated: function () {
+ this.updateDayTable();
+ },
+ computeSnapTime: function (t) {
+ return e.duration(this.minTime + this.snapDuration * t);
+ },
+ spanToSegs: function (t) {
+ var e,
+ n = this.sliceRangeByTimes(t);
+ for (e = 0; e < n.length; e++) this.isRTL ? (n[e].col = this.daysPerRow - 1 - n[e].dayIndex) : (n[e].col = n[e].dayIndex);
+ return n;
+ },
+ sliceRangeByTimes: function (t) {
+ var e,
+ n,
+ i,
+ r,
+ s = [];
+ for (n = 0; n < this.daysPerRow; n++)
+ (i = this.dayDates[n].clone()),
+ (r = { start: i.clone().time(this.minTime), end: i.clone().time(this.maxTime) }),
+ (e = F(t, r)),
+ e && ((e.dayIndex = n), s.push(e));
+ return s;
+ },
+ updateSize: function (t) {
+ this.slatCoordCache.build(), t && this.updateSegVerticals([].concat(this.fgSegs || [], this.bgSegs || [], this.businessSegs || []));
+ },
+ getTotalSlatHeight: function () {
+ return this.slatContainerEl.outerHeight();
+ },
+ computeDateTop: function (t, n) {
+ return this.computeTimeTop(e.duration(t - n.clone().stripTime()));
+ },
+ computeTimeTop: function (t) {
+ var e,
+ n,
+ i = this.slatEls.length,
+ r = (t - this.minTime) / this.slotDuration;
+ return (
+ (r = Math.max(0, r)),
+ (r = Math.min(i, r)),
+ (e = Math.floor(r)),
+ (e = Math.min(e, i - 1)),
+ (n = r - e),
+ this.slatCoordCache.getTopPosition(e) + this.slatCoordCache.getHeight(e) * n
+ );
+ },
+ renderDrag: function (t, e) {
+ return e ? this.renderEventLocationHelper(t, e) : void this.renderHighlight(this.eventToSpan(t));
+ },
+ unrenderDrag: function () {
+ this.unrenderHelper(), this.unrenderHighlight();
+ },
+ renderEventResize: function (t, e) {
+ return this.renderEventLocationHelper(t, e);
+ },
+ unrenderEventResize: function () {
+ this.unrenderHelper();
+ },
+ renderHelper: function (t, e) {
+ return this.renderHelperSegs(this.eventToSegs(t), e);
+ },
+ unrenderHelper: function () {
+ this.unrenderHelperSegs();
+ },
+ renderBusinessHours: function () {
+ this.renderBusinessSegs(this.buildBusinessHourSegs());
+ },
+ unrenderBusinessHours: function () {
+ this.unrenderBusinessSegs();
+ },
+ getNowIndicatorUnit: function () {
+ return 'minute';
+ },
+ renderNowIndicator: function (e) {
+ var n,
+ i = this.spanToSegs({ start: e, end: e }),
+ r = this.computeDateTop(e, e),
+ s = [];
+ for (n = 0; n < i.length; n++)
+ s.push(
+ t('').css('top', r).appendTo(this.colContainerEls.eq(i[n].col))[0]
+ );
+ i.length > 0 &&
+ s.push(
+ t('').css('top', r).appendTo(this.el.find('.fc-content-skeleton'))[0]
+ ),
+ (this.nowIndicatorEls = t(s));
+ },
+ unrenderNowIndicator: function () {
+ this.nowIndicatorEls && (this.nowIndicatorEls.remove(), (this.nowIndicatorEls = null));
+ },
+ renderSelection: function (t) {
+ this.view.opt('selectHelper') ? this.renderEventLocationHelper(t) : this.renderHighlight(t);
+ },
+ unrenderSelection: function () {
+ this.unrenderHelper(), this.unrenderHighlight();
+ },
+ renderHighlight: function (t) {
+ this.renderHighlightSegs(this.spanToSegs(t));
+ },
+ unrenderHighlight: function () {
+ this.unrenderHighlightSegs();
+ },
+ }));
+ we.mixin({
+ colContainerEls: null,
+ fgContainerEls: null,
+ bgContainerEls: null,
+ helperContainerEls: null,
+ highlightContainerEls: null,
+ businessContainerEls: null,
+ fgSegs: null,
+ bgSegs: null,
+ helperSegs: null,
+ highlightSegs: null,
+ businessSegs: null,
+ renderContentSkeleton: function () {
+ var e,
+ n,
+ i = '';
+ for (e = 0; e < this.colCnt; e++)
+ i +=
+ ' | ';
+ (n = t('')),
+ (this.colContainerEls = n.find('.fc-content-col')),
+ (this.helperContainerEls = n.find('.fc-helper-container')),
+ (this.fgContainerEls = n.find('.fc-event-container:not(.fc-helper-container)')),
+ (this.bgContainerEls = n.find('.fc-bgevent-container')),
+ (this.highlightContainerEls = n.find('.fc-highlight-container')),
+ (this.businessContainerEls = n.find('.fc-business-container')),
+ this.bookendCells(n.find('tr')),
+ this.el.append(n);
+ },
+ renderFgSegs: function (t) {
+ return (t = this.renderFgSegsIntoContainers(t, this.fgContainerEls)), (this.fgSegs = t), t;
+ },
+ unrenderFgSegs: function () {
+ this.unrenderNamedSegs('fgSegs');
+ },
+ renderHelperSegs: function (e, n) {
+ var i,
+ r,
+ s,
+ o = [];
+ for (e = this.renderFgSegsIntoContainers(e, this.helperContainerEls), i = 0; i < e.length; i++)
+ (r = e[i]),
+ n &&
+ n.col === r.col &&
+ ((s = n.el),
+ r.el.css({
+ left: s.css('left'),
+ right: s.css('right'),
+ 'margin-left': s.css('margin-left'),
+ 'margin-right': s.css('margin-right'),
+ })),
+ o.push(r.el[0]);
+ return (this.helperSegs = e), t(o);
+ },
+ unrenderHelperSegs: function () {
+ this.unrenderNamedSegs('helperSegs');
+ },
+ renderBgSegs: function (t) {
+ return (
+ (t = this.renderFillSegEls('bgEvent', t)),
+ this.updateSegVerticals(t),
+ this.attachSegsByCol(this.groupSegsByCol(t), this.bgContainerEls),
+ (this.bgSegs = t),
+ t
+ );
+ },
+ unrenderBgSegs: function () {
+ this.unrenderNamedSegs('bgSegs');
+ },
+ renderHighlightSegs: function (t) {
+ (t = this.renderFillSegEls('highlight', t)),
+ this.updateSegVerticals(t),
+ this.attachSegsByCol(this.groupSegsByCol(t), this.highlightContainerEls),
+ (this.highlightSegs = t);
+ },
+ unrenderHighlightSegs: function () {
+ this.unrenderNamedSegs('highlightSegs');
+ },
+ renderBusinessSegs: function (t) {
+ (t = this.renderFillSegEls('businessHours', t)),
+ this.updateSegVerticals(t),
+ this.attachSegsByCol(this.groupSegsByCol(t), this.businessContainerEls),
+ (this.businessSegs = t);
+ },
+ unrenderBusinessSegs: function () {
+ this.unrenderNamedSegs('businessSegs');
+ },
+ groupSegsByCol: function (t) {
+ var e,
+ n = [];
+ for (e = 0; e < this.colCnt; e++) n.push([]);
+ for (e = 0; e < t.length; e++) n[t[e].col].push(t[e]);
+ return n;
+ },
+ attachSegsByCol: function (t, e) {
+ var n, i, r;
+ for (n = 0; n < this.colCnt; n++) for (i = t[n], r = 0; r < i.length; r++) e.eq(n).append(i[r].el);
+ },
+ unrenderNamedSegs: function (t) {
+ var e,
+ n = this[t];
+ if (n) {
+ for (e = 0; e < n.length; e++) n[e].el.remove();
+ this[t] = null;
+ }
+ },
+ renderFgSegsIntoContainers: function (t, e) {
+ var n, i;
+ for (t = this.renderFgSegEls(t), n = this.groupSegsByCol(t), i = 0; i < this.colCnt; i++) this.updateFgSegCoords(n[i]);
+ return this.attachSegsByCol(n, e), t;
+ },
+ fgSegHtml: function (t, e) {
+ var n,
+ i,
+ r,
+ s = this.view,
+ o = t.event,
+ l = s.isEventDraggable(o),
+ a = !e && t.isStart && s.isEventResizableFromStart(o),
+ u = !e && t.isEnd && s.isEventResizableFromEnd(o),
+ c = this.getSegClasses(t, l, a || u),
+ d = nt(this.getSegSkinCss(t));
+ return (
+ c.unshift('fc-time-grid-event', 'fc-v-event'),
+ s.isMultiDayEvent(o)
+ ? (t.isStart || t.isEnd) &&
+ ((n = this.getEventTimeText(t)), (i = this.getEventTimeText(t, 'LT')), (r = this.getEventTimeText(t, null, !1)))
+ : ((n = this.getEventTimeText(o)), (i = this.getEventTimeText(o, 'LT')), (r = this.getEventTimeText(o, null, !1))),
+ '' +
+ (n ? '
' + tt(n) + '
' : '') +
+ (o.title ? '
' + tt(o.title) + '
' : '') +
+ '
' +
+ (u ? '' : '') +
+ ''
+ );
+ },
+ updateSegVerticals: function (t) {
+ this.computeSegVerticals(t), this.assignSegVerticals(t);
+ },
+ computeSegVerticals: function (t) {
+ var e, n;
+ for (e = 0; e < t.length; e++)
+ (n = t[e]), (n.top = this.computeDateTop(n.start, n.start)), (n.bottom = this.computeDateTop(n.end, n.start));
+ },
+ assignSegVerticals: function (t) {
+ var e, n;
+ for (e = 0; e < t.length; e++) (n = t[e]), n.el.css(this.generateSegVerticalCss(n));
+ },
+ generateSegVerticalCss: function (t) {
+ return { top: t.top, bottom: -t.bottom };
+ },
+ updateFgSegCoords: function (t) {
+ this.computeSegVerticals(t), this.computeFgSegHorizontals(t), this.assignSegVerticals(t), this.assignFgSegHorizontals(t);
+ },
+ computeFgSegHorizontals: function (t) {
+ var e, n, i;
+ if ((this.sortEventSegs(t), (e = Ft(t)), Nt(e), (n = e[0]))) {
+ for (i = 0; i < n.length; i++) Gt(n[i]);
+ for (i = 0; i < n.length; i++) this.computeFgSegForwardBack(n[i], 0, 0);
+ }
+ },
+ computeFgSegForwardBack: function (t, e, n) {
+ var i,
+ r = t.forwardSegs;
+ if (void 0 === t.forwardCoord)
+ for (
+ r.length
+ ? (this.sortForwardSegs(r), this.computeFgSegForwardBack(r[0], e + 1, n), (t.forwardCoord = r[0].backwardCoord))
+ : (t.forwardCoord = 1),
+ t.backwardCoord = t.forwardCoord - (t.forwardCoord - n) / (e + 1),
+ i = 0;
+ i < r.length;
+ i++
+ )
+ this.computeFgSegForwardBack(r[i], 0, t.forwardCoord);
+ },
+ sortForwardSegs: function (t) {
+ t.sort(lt(this, 'compareForwardSegs'));
+ },
+ compareForwardSegs: function (t, e) {
+ return e.forwardPressure - t.forwardPressure || (t.backwardCoord || 0) - (e.backwardCoord || 0) || this.compareEventSegs(t, e);
+ },
+ assignFgSegHorizontals: function (t) {
+ var e, n;
+ for (e = 0; e < t.length; e++)
+ (n = t[e]), n.el.css(this.generateFgSegHorizontalCss(n)), n.bottom - n.top < 30 && n.el.addClass('fc-short');
+ },
+ generateFgSegHorizontalCss: function (t) {
+ var e,
+ n,
+ i = this.view.opt('slotEventOverlap'),
+ r = t.backwardCoord,
+ s = t.forwardCoord,
+ o = this.generateSegVerticalCss(t);
+ return (
+ i && (s = Math.min(1, r + 2 * (s - r))),
+ this.isRTL ? ((e = 1 - s), (n = r)) : ((e = r), (n = 1 - s)),
+ (o.zIndex = t.level + 1),
+ (o.left = 100 * e + '%'),
+ (o.right = 100 * n + '%'),
+ i && t.forwardPressure && (o[this.isRTL ? 'marginLeft' : 'marginRight'] = 20),
+ o
+ );
+ },
+ });
+ var Ee = (qt.View = St.extend(ue, ce, {
+ type: null,
+ name: null,
+ title: null,
+ calendar: null,
+ options: null,
+ el: null,
+ isDateSet: !1,
+ isDateRendered: !1,
+ dateRenderQueue: null,
+ isEventsBound: !1,
+ isEventsSet: !1,
+ isEventsRendered: !1,
+ eventRenderQueue: null,
+ start: null,
+ end: null,
+ intervalStart: null,
+ intervalEnd: null,
+ intervalDuration: null,
+ intervalUnit: null,
+ isRTL: !1,
+ isSelected: !1,
+ selectedEvent: null,
+ eventOrderSpecs: null,
+ widgetHeaderClass: null,
+ widgetContentClass: null,
+ highlightStateClass: null,
+ nextDayThreshold: null,
+ isHiddenDayHash: null,
+ isNowIndicatorRendered: null,
+ initialNowDate: null,
+ initialNowQueriedMs: null,
+ nowIndicatorTimeoutID: null,
+ nowIndicatorIntervalID: null,
+ constructor: function (t, n, i, r) {
+ (this.calendar = t),
+ (this.type = this.name = n),
+ (this.options = i),
+ (this.intervalDuration = r || e.duration(1, 'day')),
+ (this.nextDayThreshold = e.duration(this.opt('nextDayThreshold'))),
+ this.initThemingProps(),
+ this.initHiddenDays(),
+ (this.isRTL = this.opt('isRTL')),
+ (this.eventOrderSpecs = L(this.opt('eventOrder'))),
+ (this.dateRenderQueue = new Dt()),
+ (this.eventRenderQueue = new Dt(this.opt('eventRenderWait'))),
+ this.initialize();
+ },
+ initialize: function () {},
+ opt: function (t) {
+ return this.options[t];
+ },
+ publiclyTrigger: function (t, e) {
+ var n = this.calendar;
+ return n.publiclyTrigger.apply(n, [t, e || this].concat(Array.prototype.slice.call(arguments, 2), [this]));
+ },
+ rejectOn: function (t, e) {
+ var n = this;
+ return new bt(function (i, r) {
+ function s() {
+ n.off(t, r);
+ }
+ n.one(t, r),
+ e.then(
+ function (t) {
+ s(), i(t);
+ },
+ function () {
+ s(), r();
+ }
+ );
+ });
+ },
+ setRange: function (e) {
+ t.extend(this, e), this.updateTitle();
+ },
+ computeRange: function (t) {
+ var e,
+ n,
+ i = A(this.intervalDuration),
+ r = t.clone().startOf(i),
+ s = r.clone().add(this.intervalDuration);
+ return (
+ /year|month|week|day/.test(i)
+ ? (r.stripTime(), s.stripTime())
+ : (r.hasTime() || (r = this.calendar.time(0)), s.hasTime() || (s = this.calendar.time(0))),
+ (e = r.clone()),
+ (e = this.skipHiddenDays(e)),
+ (n = s.clone()),
+ (n = this.skipHiddenDays(n, -1, !0)),
+ { intervalUnit: i, intervalStart: r, intervalEnd: s, start: e, end: n }
+ );
+ },
+ computePrevDate: function (t) {
+ return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).subtract(this.intervalDuration), -1);
+ },
+ computeNextDate: function (t) {
+ return this.massageCurrentDate(t.clone().startOf(this.intervalUnit).add(this.intervalDuration));
+ },
+ massageCurrentDate: function (t, e) {
+ return this.intervalDuration.as('days') <= 1 && this.isHiddenDay(t) && ((t = this.skipHiddenDays(t, e)), t.startOf('day')), t;
+ },
+ updateTitle: function () {
+ (this.title = this.computeTitle()), this.calendar.setToolbarsTitle(this.title);
+ },
+ computeTitle: function () {
+ return this.formatRange(
+ { start: this.calendar.applyTimezone(this.intervalStart), end: this.calendar.applyTimezone(this.intervalEnd) },
+ this.opt('titleFormat') || this.computeTitleFormat(),
+ this.opt('titleRangeSeparator')
+ );
+ },
+ computeTitleFormat: function () {
+ return 'year' == this.intervalUnit
+ ? 'YYYY'
+ : 'month' == this.intervalUnit
+ ? this.opt('monthYearFormat')
+ : this.intervalDuration.as('days') > 1
+ ? 'll'
+ : 'LL';
+ },
+ formatRange: function (t, e, n) {
+ var i = t.end;
+ return i.hasTime() || (i = i.clone().subtract(1)), gt(t.start, i, e, n, this.opt('isRTL'));
+ },
+ getAllDayHtml: function () {
+ return this.opt('allDayHtml') || tt(this.opt('allDayText'));
+ },
+ buildGotoAnchorHtml: function (e, n, i) {
+ var r, s, o, l;
+ return (
+ t.isPlainObject(e) ? ((r = e.date), (s = e.type), (o = e.forceOff)) : (r = e),
+ (r = qt.moment(r)),
+ (l = { date: r.format('YYYY-MM-DD'), type: s || 'day' }),
+ 'string' == typeof n && ((i = n), (n = null)),
+ (n = n ? ' ' + it(n) : ''),
+ (i = i || ''),
+ !o && this.opt('navLinks')
+ ? '' + i + ''
+ : '' + i + ''
+ );
+ },
+ setElement: function (t) {
+ (this.el = t), this.bindGlobalHandlers(), this.renderSkeleton();
+ },
+ removeElement: function () {
+ this.unsetDate(), this.unrenderSkeleton(), this.unbindGlobalHandlers(), this.el.remove();
+ },
+ renderSkeleton: function () {},
+ unrenderSkeleton: function () {},
+ setDate: function (t) {
+ var e = this.isDateSet;
+ (this.isDateSet = !0), this.handleDate(t, e), this.trigger(e ? 'dateReset' : 'dateSet', t);
+ },
+ unsetDate: function () {
+ this.isDateSet && ((this.isDateSet = !1), this.handleDateUnset(), this.trigger('dateUnset'));
+ },
+ handleDate: function (t, e) {
+ var n = this;
+ this.unbindEvents(),
+ this.requestDateRender(t).then(function () {
+ n.bindEvents();
+ });
+ },
+ handleDateUnset: function () {
+ this.unbindEvents(), this.requestDateUnrender();
+ },
+ requestDateRender: function (t) {
+ var e = this;
+ return this.dateRenderQueue.add(function () {
+ return e.executeDateRender(t);
+ });
+ },
+ requestDateUnrender: function () {
+ var t = this;
+ return this.dateRenderQueue.add(function () {
+ return t.executeDateUnrender();
+ });
+ },
+ executeDateRender: function (t) {
+ var e = this;
+ return (
+ t ? this.captureInitialScroll() : this.captureScroll(),
+ this.freezeHeight(),
+ this.executeDateUnrender().then(function () {
+ t && e.setRange(e.computeRange(t)),
+ e.render && e.render(),
+ e.renderDates(),
+ e.updateSize(),
+ e.renderBusinessHours(),
+ e.startNowIndicator(),
+ e.thawHeight(),
+ e.releaseScroll(),
+ (e.isDateRendered = !0),
+ e.onDateRender(),
+ e.trigger('dateRender');
+ })
+ );
+ },
+ executeDateUnrender: function () {
+ var t = this;
+ return t.isDateRendered
+ ? this.requestEventsUnrender().then(function () {
+ t.unselect(),
+ t.stopNowIndicator(),
+ t.triggerUnrender(),
+ t.unrenderBusinessHours(),
+ t.unrenderDates(),
+ t.destroy && t.destroy(),
+ (t.isDateRendered = !1),
+ t.trigger('dateUnrender');
+ })
+ : bt.resolve();
+ },
+ onDateRender: function () {
+ this.triggerRender();
+ },
+ renderDates: function () {},
+ unrenderDates: function () {},
+ triggerRender: function () {
+ this.publiclyTrigger('viewRender', this, this, this.el);
+ },
+ triggerUnrender: function () {
+ this.publiclyTrigger('viewDestroy', this, this, this.el);
+ },
+ bindGlobalHandlers: function () {
+ this.listenTo(t(document), 'mousedown', this.handleDocumentMousedown),
+ this.listenTo(t(document), 'touchstart', this.processUnselect);
+ },
+ unbindGlobalHandlers: function () {
+ this.stopListeningTo(t(document));
+ },
+ initThemingProps: function () {
+ var t = this.opt('theme') ? 'ui' : 'fc';
+ (this.widgetHeaderClass = t + '-widget-header'),
+ (this.widgetContentClass = t + '-widget-content'),
+ (this.highlightStateClass = t + '-state-highlight');
+ },
+ renderBusinessHours: function () {},
+ unrenderBusinessHours: function () {},
+ startNowIndicator: function () {
+ var t,
+ n,
+ i,
+ r = this;
+ this.opt('nowIndicator') &&
+ ((t = this.getNowIndicatorUnit()),
+ t &&
+ ((n = lt(this, 'updateNowIndicator')),
+ (this.initialNowDate = this.calendar.getNow()),
+ (this.initialNowQueriedMs = +new Date()),
+ this.renderNowIndicator(this.initialNowDate),
+ (this.isNowIndicatorRendered = !0),
+ (i = this.initialNowDate.clone().startOf(t).add(1, t) - this.initialNowDate),
+ (this.nowIndicatorTimeoutID = setTimeout(function () {
+ (r.nowIndicatorTimeoutID = null),
+ n(),
+ (i = +e.duration(1, t)),
+ (i = Math.max(100, i)),
+ (r.nowIndicatorIntervalID = setInterval(n, i));
+ }, i))));
+ },
+ updateNowIndicator: function () {
+ this.isNowIndicatorRendered &&
+ (this.unrenderNowIndicator(), this.renderNowIndicator(this.initialNowDate.clone().add(new Date() - this.initialNowQueriedMs)));
+ },
+ stopNowIndicator: function () {
+ this.isNowIndicatorRendered &&
+ (this.nowIndicatorTimeoutID && (clearTimeout(this.nowIndicatorTimeoutID), (this.nowIndicatorTimeoutID = null)),
+ this.nowIndicatorIntervalID && (clearTimeout(this.nowIndicatorIntervalID), (this.nowIndicatorIntervalID = null)),
+ this.unrenderNowIndicator(),
+ (this.isNowIndicatorRendered = !1));
+ },
+ getNowIndicatorUnit: function () {},
+ renderNowIndicator: function (t) {},
+ unrenderNowIndicator: function () {},
+ updateSize: function (t) {
+ t && this.captureScroll(), this.updateHeight(t), this.updateWidth(t), this.updateNowIndicator(), t && this.releaseScroll();
+ },
+ updateWidth: function (t) {},
+ updateHeight: function (t) {
+ var e = this.calendar;
+ this.setHeight(e.getSuggestedViewHeight(), e.isHeightAuto());
+ },
+ setHeight: function (t, e) {},
+ capturedScroll: null,
+ capturedScrollDepth: 0,
+ captureScroll: function () {
+ return !this.capturedScrollDepth++ && ((this.capturedScroll = this.isDateRendered ? this.queryScroll() : {}), !0);
+ },
+ captureInitialScroll: function (e) {
+ this.captureScroll() &&
+ ((this.capturedScroll.isInitial = !0), e ? t.extend(this.capturedScroll, e) : (this.capturedScroll.isComputed = !0));
+ },
+ releaseScroll: function () {
+ var e = this.capturedScroll,
+ n = this.discardScroll();
+ e.isComputed && (n ? t.extend(e, this.computeInitialScroll()) : (e = null)),
+ e && (e.isInitial ? this.hardSetScroll(e) : this.setScroll(e));
+ },
+ discardScroll: function () {
+ return !--this.capturedScrollDepth && ((this.capturedScroll = null), !0);
+ },
+ computeInitialScroll: function () {
+ return {};
+ },
+ queryScroll: function () {
+ return {};
+ },
+ hardSetScroll: function (t) {
+ var e = this,
+ n = function () {
+ e.setScroll(t);
+ };
+ n(), setTimeout(n, 0);
+ },
+ setScroll: function (t) {},
+ freezeHeight: function () {
+ this.calendar.freezeContentHeight();
+ },
+ thawHeight: function () {
+ this.calendar.thawContentHeight();
+ },
+ bindEvents: function () {
+ var t = this;
+ this.isEventsBound ||
+ ((this.isEventsBound = !0),
+ this.rejectOn('eventsUnbind', this.requestEvents()).then(function (e) {
+ t.listenTo(t.calendar, 'eventsReset', t.setEvents), t.setEvents(e);
+ }));
+ },
+ unbindEvents: function () {
+ this.isEventsBound &&
+ ((this.isEventsBound = !1), this.stopListeningTo(this.calendar, 'eventsReset'), this.unsetEvents(), this.trigger('eventsUnbind'));
+ },
+ setEvents: function (t) {
+ var e = this.isEventSet;
+ (this.isEventsSet = !0), this.handleEvents(t, e), this.trigger(e ? 'eventsReset' : 'eventsSet', t);
+ },
+ unsetEvents: function () {
+ this.isEventsSet && ((this.isEventsSet = !1), this.handleEventsUnset(), this.trigger('eventsUnset'));
+ },
+ whenEventsSet: function () {
+ var t = this;
+ return this.isEventsSet
+ ? bt.resolve(this.getCurrentEvents())
+ : new bt(function (e) {
+ t.one('eventsSet', e);
+ });
+ },
+ handleEvents: function (t, e) {
+ this.requestEventsRender(t);
+ },
+ handleEventsUnset: function () {
+ this.requestEventsUnrender();
+ },
+ requestEventsRender: function (t) {
+ var e = this;
+ return this.eventRenderQueue.add(function () {
+ return e.executeEventsRender(t);
+ });
+ },
+ requestEventsUnrender: function () {
+ var t = this;
+ return this.isEventsRendered
+ ? this.eventRenderQueue.addQuickly(function () {
+ return t.executeEventsUnrender();
+ })
+ : bt.resolve();
+ },
+ requestCurrentEventsRender: function () {
+ return this.isEventsSet ? void this.requestEventsRender(this.getCurrentEvents()) : bt.reject();
+ },
+ executeEventsRender: function (t) {
+ var e = this;
+ return (
+ this.captureScroll(),
+ this.freezeHeight(),
+ this.executeEventsUnrender().then(function () {
+ e.renderEvents(t), e.thawHeight(), e.releaseScroll(), (e.isEventsRendered = !0), e.onEventsRender(), e.trigger('eventsRender');
+ })
+ );
+ },
+ executeEventsUnrender: function () {
+ return (
+ this.isEventsRendered &&
+ (this.onBeforeEventsUnrender(),
+ this.captureScroll(),
+ this.freezeHeight(),
+ this.destroyEvents && this.destroyEvents(),
+ this.unrenderEvents(),
+ this.thawHeight(),
+ this.releaseScroll(),
+ (this.isEventsRendered = !1),
+ this.trigger('eventsUnrender')),
+ bt.resolve()
+ );
+ },
+ onEventsRender: function () {
+ this.renderedEventSegEach(function (t) {
+ this.publiclyTrigger('eventAfterRender', t.event, t.event, t.el);
+ }),
+ this.publiclyTrigger('eventAfterAllRender');
+ },
+ onBeforeEventsUnrender: function () {
+ this.renderedEventSegEach(function (t) {
+ this.publiclyTrigger('eventDestroy', t.event, t.event, t.el);
+ });
+ },
+ renderEvents: function (t) {},
+ unrenderEvents: function () {},
+ requestEvents: function () {
+ return this.calendar.requestEvents(this.start, this.end);
+ },
+ getCurrentEvents: function () {
+ return this.calendar.getPrunedEventCache();
+ },
+ resolveEventEl: function (e, n) {
+ var i = this.publiclyTrigger('eventRender', e, e, n);
+ return i === !1 ? (n = null) : i && i !== !0 && (n = t(i)), n;
+ },
+ showEvent: function (t) {
+ this.renderedEventSegEach(function (t) {
+ t.el.css('visibility', '');
+ }, t);
+ },
+ hideEvent: function (t) {
+ this.renderedEventSegEach(function (t) {
+ t.el.css('visibility', 'hidden');
+ }, t);
+ },
+ renderedEventSegEach: function (t, e) {
+ var n,
+ i = this.getEventSegs();
+ for (n = 0; n < i.length; n++) (e && i[n].event._id !== e._id) || (i[n].el && t.call(this, i[n]));
+ },
+ getEventSegs: function () {
+ return [];
+ },
+ isEventDraggable: function (t) {
+ return this.isEventStartEditable(t);
+ },
+ isEventStartEditable: function (t) {
+ return J(t.startEditable, (t.source || {}).startEditable, this.opt('eventStartEditable'), this.isEventGenerallyEditable(t));
+ },
+ isEventGenerallyEditable: function (t) {
+ return J(t.editable, (t.source || {}).editable, this.opt('editable'));
+ },
+ reportEventDrop: function (t, e, n, i, r) {
+ var s = this.calendar,
+ o = s.mutateEvent(t, e, n),
+ l = function () {
+ o.undo(), s.reportEventChange();
+ };
+ this.triggerEventDrop(t, o.dateDelta, l, i, r), s.reportEventChange();
+ },
+ triggerEventDrop: function (t, e, n, i, r) {
+ this.publiclyTrigger('eventDrop', i[0], t, e, n, r, {});
+ },
+ reportExternalDrop: function (e, n, i, r, s) {
+ var o,
+ l,
+ a = e.eventProps;
+ a && ((o = t.extend({}, a, n)), (l = this.calendar.renderEvent(o, e.stick)[0])), this.triggerExternalDrop(l, n, i, r, s);
+ },
+ triggerExternalDrop: function (t, e, n, i, r) {
+ this.publiclyTrigger('drop', n[0], e.start, i, r), t && this.publiclyTrigger('eventReceive', null, t);
+ },
+ renderDrag: function (t, e) {},
+ unrenderDrag: function () {},
+ isEventResizableFromStart: function (t) {
+ return this.opt('eventResizableFromStart') && this.isEventResizable(t);
+ },
+ isEventResizableFromEnd: function (t) {
+ return this.isEventResizable(t);
+ },
+ isEventResizable: function (t) {
+ var e = t.source || {};
+ return J(t.durationEditable, e.durationEditable, this.opt('eventDurationEditable'), t.editable, e.editable, this.opt('editable'));
+ },
+ reportEventResize: function (t, e, n, i, r) {
+ var s = this.calendar,
+ o = s.mutateEvent(t, e, n),
+ l = function () {
+ o.undo(), s.reportEventChange();
+ };
+ this.triggerEventResize(t, o.durationDelta, l, i, r), s.reportEventChange();
+ },
+ triggerEventResize: function (t, e, n, i, r) {
+ this.publiclyTrigger('eventResize', i[0], t, e, n, r, {});
+ },
+ select: function (t, e) {
+ this.unselect(e), this.renderSelection(t), this.reportSelection(t, e);
+ },
+ renderSelection: function (t) {},
+ reportSelection: function (t, e) {
+ (this.isSelected = !0), this.triggerSelect(t, e);
+ },
+ triggerSelect: function (t, e) {
+ this.publiclyTrigger('select', null, this.calendar.applyTimezone(t.start), this.calendar.applyTimezone(t.end), e);
+ },
+ unselect: function (t) {
+ this.isSelected &&
+ ((this.isSelected = !1),
+ this.destroySelection && this.destroySelection(),
+ this.unrenderSelection(),
+ this.publiclyTrigger('unselect', null, t));
+ },
+ unrenderSelection: function () {},
+ selectEvent: function (t) {
+ (this.selectedEvent && this.selectedEvent === t) ||
+ (this.unselectEvent(),
+ this.renderedEventSegEach(function (t) {
+ t.el.addClass('fc-selected');
+ }, t),
+ (this.selectedEvent = t));
+ },
+ unselectEvent: function () {
+ this.selectedEvent &&
+ (this.renderedEventSegEach(function (t) {
+ t.el.removeClass('fc-selected');
+ }, this.selectedEvent),
+ (this.selectedEvent = null));
+ },
+ isEventSelected: function (t) {
+ return this.selectedEvent && this.selectedEvent._id === t._id;
+ },
+ handleDocumentMousedown: function (t) {
+ S(t) && this.processUnselect(t);
+ },
+ processUnselect: function (t) {
+ this.processRangeUnselect(t), this.processEventUnselect(t);
+ },
+ processRangeUnselect: function (e) {
+ var n;
+ this.isSelected &&
+ this.opt('unselectAuto') &&
+ ((n = this.opt('unselectCancel')), (n && t(e.target).closest(n).length) || this.unselect(e));
+ },
+ processEventUnselect: function (e) {
+ this.selectedEvent && (t(e.target).closest('.fc-selected').length || this.unselectEvent());
+ },
+ triggerDayClick: function (t, e, n) {
+ this.publiclyTrigger('dayClick', e, this.calendar.applyTimezone(t.start), n);
+ },
+ initHiddenDays: function () {
+ var e,
+ n = this.opt('hiddenDays') || [],
+ i = [],
+ r = 0;
+ for (this.opt('weekends') === !1 && n.push(0, 6), e = 0; e < 7; e++) (i[e] = t.inArray(e, n) !== -1) || r++;
+ if (!r) throw 'invalid hiddenDays';
+ this.isHiddenDayHash = i;
+ },
+ isHiddenDay: function (t) {
+ return e.isMoment(t) && (t = t.day()), this.isHiddenDayHash[t];
+ },
+ skipHiddenDays: function (t, e, n) {
+ var i = t.clone();
+ for (e = e || 1; this.isHiddenDayHash[(i.day() + (n ? e : 0) + 7) % 7]; ) i.add(e, 'days');
+ return i;
+ },
+ computeDayRange: function (t) {
+ var e,
+ n = t.start.clone().stripTime(),
+ i = t.end,
+ r = null;
+ return (
+ i && ((r = i.clone().stripTime()), (e = +i.time()), e && e >= this.nextDayThreshold && r.add(1, 'days')),
+ (!i || r <= n) && (r = n.clone().add(1, 'days')),
+ { start: n, end: r }
+ );
+ },
+ isMultiDayEvent: function (t) {
+ var e = this.computeDayRange(t);
+ return e.end.diff(e.start, 'days') > 1;
+ },
+ })),
+ be = (qt.Scroller = St.extend({
+ el: null,
+ scrollEl: null,
+ overflowX: null,
+ overflowY: null,
+ constructor: function (t) {
+ (t = t || {}), (this.overflowX = t.overflowX || t.overflow || 'auto'), (this.overflowY = t.overflowY || t.overflow || 'auto');
+ },
+ render: function () {
+ (this.el = this.renderEl()), this.applyOverflow();
+ },
+ renderEl: function () {
+ return (this.scrollEl = t(''));
+ },
+ clear: function () {
+ this.setHeight('auto'), this.applyOverflow();
+ },
+ destroy: function () {
+ this.el.remove();
+ },
+ applyOverflow: function () {
+ this.scrollEl.css({ 'overflow-x': this.overflowX, 'overflow-y': this.overflowY });
+ },
+ lockOverflow: function (t) {
+ var e = this.overflowX,
+ n = this.overflowY;
+ (t = t || this.getScrollbarWidths()),
+ 'auto' === e && (e = t.top || t.bottom || this.scrollEl[0].scrollWidth - 1 > this.scrollEl[0].clientWidth ? 'scroll' : 'hidden'),
+ 'auto' === n &&
+ (n = t.left || t.right || this.scrollEl[0].scrollHeight - 1 > this.scrollEl[0].clientHeight ? 'scroll' : 'hidden'),
+ this.scrollEl.css({ 'overflow-x': e, 'overflow-y': n });
+ },
+ setHeight: function (t) {
+ this.scrollEl.height(t);
+ },
+ getScrollTop: function () {
+ return this.scrollEl.scrollTop();
+ },
+ setScrollTop: function (t) {
+ this.scrollEl.scrollTop(t);
+ },
+ getClientWidth: function () {
+ return this.scrollEl[0].clientWidth;
+ },
+ getClientHeight: function () {
+ return this.scrollEl[0].clientHeight;
+ },
+ getScrollbarWidths: function () {
+ return p(this.scrollEl);
+ },
+ }));
+ Vt.prototype.proxyCall = function (t) {
+ var e = Array.prototype.slice.call(arguments, 1),
+ n = [];
+ return (
+ this.items.forEach(function (i) {
+ n.push(i[t].apply(i, e));
+ }),
+ n
+ );
+ };
+ var De = (qt.Calendar = St.extend({
+ dirDefaults: null,
+ localeDefaults: null,
+ overrides: null,
+ dynamicOverrides: null,
+ options: null,
+ viewSpecCache: null,
+ view: null,
+ header: null,
+ footer: null,
+ loadingLevel: 0,
+ constructor: _t,
+ initialize: function () {},
+ populateOptionsHash: function () {
+ var t, e, i, r;
+ (t = J(this.dynamicOverrides.locale, this.overrides.locale)),
+ (e = Te[t]),
+ e || ((t = De.defaults.locale), (e = Te[t] || {})),
+ (i = J(this.dynamicOverrides.isRTL, this.overrides.isRTL, e.isRTL, De.defaults.isRTL)),
+ (r = i ? De.rtlDefaults : {}),
+ (this.dirDefaults = r),
+ (this.localeDefaults = e),
+ (this.options = n([De.defaults, r, e, this.overrides, this.dynamicOverrides])),
+ Yt(this.options);
+ },
+ getViewSpec: function (t) {
+ var e = this.viewSpecCache;
+ return e[t] || (e[t] = this.buildViewSpec(t));
+ },
+ getUnitViewSpec: function (e) {
+ var n, i, r;
+ if (t.inArray(e, Kt) != -1)
+ for (
+ n = this.header.getViewsWithButtons(),
+ t.each(qt.views, function (t) {
+ n.push(t);
+ }),
+ i = 0;
+ i < n.length;
+ i++
+ )
+ if (((r = this.getViewSpec(n[i])), r && r.singleUnit == e)) return r;
+ },
+ buildViewSpec: function (t) {
+ for (var i, r, s, o, l = this.overrides.views || {}, a = [], u = [], c = [], d = t; d; )
+ (i = Zt[d]),
+ (r = l[d]),
+ (d = null),
+ 'function' == typeof i && (i = { class: i }),
+ i && (a.unshift(i), u.unshift(i.defaults || {}), (s = s || i.duration), (d = d || i.type)),
+ r && (c.unshift(r), (s = s || r.duration), (d = d || r.type));
+ return (
+ (i = q(a)),
+ (i.type = t),
+ !!i.class &&
+ (s &&
+ ((s = e.duration(s)),
+ s.valueOf() && ((i.duration = s), (o = A(s)), 1 === s.as(o) && ((i.singleUnit = o), c.unshift(l[o] || {})))),
+ (i.defaults = n(u)),
+ (i.overrides = n(c)),
+ this.buildViewSpecOptions(i),
+ this.buildViewSpecButtonText(i, t),
+ i)
+ );
+ },
+ buildViewSpecOptions: function (t) {
+ (t.options = n([De.defaults, t.defaults, this.dirDefaults, this.localeDefaults, this.overrides, t.overrides, this.dynamicOverrides])),
+ Yt(t.options);
+ },
+ buildViewSpecButtonText: function (t, e) {
+ function n(n) {
+ var i = n.buttonText || {};
+ return i[e] || (t.buttonTextKey ? i[t.buttonTextKey] : null) || (t.singleUnit ? i[t.singleUnit] : null);
+ }
+ (t.buttonTextOverride = n(this.dynamicOverrides) || n(this.overrides) || t.overrides.buttonText),
+ (t.buttonTextDefault =
+ n(this.localeDefaults) ||
+ n(this.dirDefaults) ||
+ t.defaults.buttonText ||
+ n(De.defaults) ||
+ (t.duration ? this.humanizeDuration(t.duration) : null) ||
+ e);
+ },
+ instantiateView: function (t) {
+ var e = this.getViewSpec(t);
+ return new e.class(this, t, e.options, e.duration);
+ },
+ isValidViewType: function (t) {
+ return Boolean(this.getViewSpec(t));
+ },
+ pushLoading: function () {
+ this.loadingLevel++ || this.publiclyTrigger('loading', null, !0, this.view);
+ },
+ popLoading: function () {
+ --this.loadingLevel || this.publiclyTrigger('loading', null, !1, this.view);
+ },
+ buildSelectSpan: function (t, e) {
+ var n,
+ i = this.moment(t).stripZone();
+ return (
+ (n = e
+ ? this.moment(e).stripZone()
+ : i.hasTime()
+ ? i.clone().add(this.defaultTimedEventDuration)
+ : i.clone().add(this.defaultAllDayEventDuration)),
+ { start: i, end: n }
+ );
+ },
+ }));
+ De.mixin(ue),
+ De.mixin({
+ optionHandlers: null,
+ bindOption: function (t, e) {
+ this.bindOptions([t], e);
+ },
+ bindOptions: function (t, e) {
+ var n,
+ i = { func: e, names: t };
+ for (n = 0; n < t.length; n++) this.registerOptionHandlerObj(t[n], i);
+ this.triggerOptionHandlerObj(i);
+ },
+ registerOptionHandlerObj: function (t, e) {
+ (this.optionHandlers[t] || (this.optionHandlers[t] = [])).push(e);
+ },
+ triggerOptionHandlers: function (t) {
+ var e,
+ n = this.optionHandlers[t] || [];
+ for (e = 0; e < n.length; e++) this.triggerOptionHandlerObj(n[e]);
+ },
+ triggerOptionHandlerObj: function (t) {
+ var e,
+ n = t.names,
+ i = [];
+ for (e = 0; e < n.length; e++) i.push(this.options[n[e]]);
+ t.func.apply(this, i);
+ },
+ }),
+ (De.defaults = {
+ titleRangeSeparator: ' – ',
+ monthYearFormat: 'MMMM YYYY',
+ defaultTimedEventDuration: '02:00:00',
+ defaultAllDayEventDuration: { days: 1 },
+ forceEventDuration: !1,
+ nextDayThreshold: '09:00:00',
+ defaultView: 'month',
+ aspectRatio: 1.35,
+ header: { left: 'title', center: '', right: 'today prev,next' },
+ weekends: !0,
+ weekNumbers: !1,
+ weekNumberTitle: 'W',
+ weekNumberCalculation: 'local',
+ scrollTime: '06:00:00',
+ lazyFetching: !0,
+ startParam: 'start',
+ endParam: 'end',
+ timezoneParam: 'timezone',
+ timezone: !1,
+ isRTL: !1,
+ buttonText: {
+ prev: 'prev',
+ next: 'next',
+ prevYear: 'prev year',
+ nextYear: 'next year',
+ year: 'year',
+ today: 'today',
+ month: 'month',
+ week: 'week',
+ day: 'day',
+ },
+ buttonIcons: { prev: 'left-single-arrow', next: 'right-single-arrow', prevYear: 'left-double-arrow', nextYear: 'right-double-arrow' },
+ allDayText: 'all-day',
+ theme: !1,
+ themeButtonIcons: { prev: 'circle-triangle-w', next: 'circle-triangle-e', prevYear: 'seek-prev', nextYear: 'seek-next' },
+ dragOpacity: 0.75,
+ dragRevertDuration: 500,
+ dragScroll: !0,
+ unselectAuto: !0,
+ dropAccept: '*',
+ eventOrder: 'title',
+ eventLimit: !1,
+ eventLimitText: 'more',
+ eventLimitClick: 'popover',
+ dayPopoverFormat: 'LL',
+ handleWindowResize: !0,
+ windowResizeDelay: 100,
+ longPressDelay: 1e3,
+ }),
+ (De.englishDefaults = { dayPopoverFormat: 'dddd, MMMM D' }),
+ (De.rtlDefaults = {
+ header: { left: 'next,prev today', center: '', right: 'title' },
+ buttonIcons: { prev: 'right-single-arrow', next: 'left-single-arrow', prevYear: 'right-double-arrow', nextYear: 'left-double-arrow' },
+ themeButtonIcons: { prev: 'circle-triangle-e', next: 'circle-triangle-w', nextYear: 'seek-prev', prevYear: 'seek-next' },
+ });
+ var Te = (qt.locales = {});
+ (qt.datepickerLocale = function (e, n, i) {
+ var r = Te[e] || (Te[e] = {});
+ (r.isRTL = i.isRTL),
+ (r.weekNumberTitle = i.weekHeader),
+ t.each(Ce, function (t, e) {
+ r[t] = e(i);
+ }),
+ t.datepicker &&
+ ((t.datepicker.regional[n] = t.datepicker.regional[e] = i),
+ (t.datepicker.regional.en = t.datepicker.regional['']),
+ t.datepicker.setDefaults(i));
+ }),
+ (qt.locale = function (e, i) {
+ var r, s;
+ (r = Te[e] || (Te[e] = {})),
+ i && (r = Te[e] = n([r, i])),
+ (s = Wt(e)),
+ t.each(He, function (t, e) {
+ null == r[t] && (r[t] = e(s, r));
+ }),
+ (De.defaults.locale = e);
+ });
+ var Ce = {
+ buttonText: function (t) {
+ return { prev: et(t.prevText), next: et(t.nextText), today: et(t.currentText) };
+ },
+ monthYearFormat: function (t) {
+ return t.showMonthAfterYear ? 'YYYY[' + t.yearSuffix + '] MMMM' : 'MMMM YYYY[' + t.yearSuffix + ']';
+ },
+ },
+ He = {
+ dayOfMonthFormat: function (t, e) {
+ var n = t.longDateFormat('l');
+ return (n = n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g, '')), e.isRTL ? (n += ' ddd') : (n = 'ddd ' + n), n;
+ },
+ mediumTimeFormat: function (t) {
+ return t.longDateFormat('LT').replace(/\s*a$/i, 'a');
+ },
+ smallTimeFormat: function (t) {
+ return t
+ .longDateFormat('LT')
+ .replace(':mm', '(:mm)')
+ .replace(/(\Wmm)$/, '($1)')
+ .replace(/\s*a$/i, 'a');
+ },
+ extraSmallTimeFormat: function (t) {
+ return t
+ .longDateFormat('LT')
+ .replace(':mm', '(:mm)')
+ .replace(/(\Wmm)$/, '($1)')
+ .replace(/\s*a$/i, 't');
+ },
+ hourFormat: function (t) {
+ return t
+ .longDateFormat('LT')
+ .replace(':mm', '')
+ .replace(/(\Wmm)$/, '')
+ .replace(/\s*a$/i, 'a');
+ },
+ noMeridiemTimeFormat: function (t) {
+ return t.longDateFormat('LT').replace(/\s*a$/i, '');
+ },
+ },
+ Re = {
+ smallDayDateFormat: function (t) {
+ return t.isRTL ? 'D dd' : 'dd D';
+ },
+ weekFormat: function (t) {
+ return t.isRTL ? 'w[ ' + t.weekNumberTitle + ']' : '[' + t.weekNumberTitle + ' ]w';
+ },
+ smallWeekFormat: function (t) {
+ return t.isRTL ? 'w[' + t.weekNumberTitle + ']' : '[' + t.weekNumberTitle + ']w';
+ },
+ };
+ qt.locale('en', De.englishDefaults), (qt.sourceNormalizers = []), (qt.sourceFetchers = []);
+ var xe = { dataType: 'json', cache: !1 },
+ Ie = 1;
+ (De.prototype.normalizeEvent = function (t) {}),
+ (De.prototype.spanContainsSpan = function (t, e) {
+ var n = t.start.clone().stripZone(),
+ i = this.getEventEnd(t).stripZone();
+ return e.start >= n && e.end <= i;
+ }),
+ (De.prototype.getPeerEvents = function (t, e) {
+ var n,
+ i,
+ r = this.getEventCache(),
+ s = [];
+ for (n = 0; n < r.length; n++) (i = r[n]), (e && e._id === i._id) || s.push(i);
+ return s;
+ }),
+ (De.prototype.isEventSpanAllowed = function (t, e) {
+ var n = e.source || {},
+ i = J(e.constraint, n.constraint, this.options.eventConstraint),
+ r = J(e.overlap, n.overlap, this.options.eventOverlap);
+ return this.isSpanAllowed(t, i, r, e) && (!this.options.eventAllow || this.options.eventAllow(t, e) !== !1);
+ }),
+ (De.prototype.isExternalSpanAllowed = function (e, n, i) {
+ var r, s;
+ return (
+ i && ((r = t.extend({}, i, n)), (s = this.expandEvent(this.buildEventFromInput(r))[0])),
+ s ? this.isEventSpanAllowed(e, s) : this.isSelectionSpanAllowed(e)
+ );
+ }),
+ (De.prototype.isSelectionSpanAllowed = function (t) {
+ return (
+ this.isSpanAllowed(t, this.options.selectConstraint, this.options.selectOverlap) &&
+ (!this.options.selectAllow || this.options.selectAllow(t) !== !1)
+ );
+ }),
+ (De.prototype.isSpanAllowed = function (t, e, n, i) {
+ var r, s, o, l, a, u;
+ if (null != e && (r = this.constraintToEvents(e))) {
+ for (s = !1, l = 0; l < r.length; l++)
+ if (this.spanContainsSpan(r[l], t)) {
+ s = !0;
+ break;
+ }
+ if (!s) return !1;
+ }
+ for (o = this.getPeerEvents(t, i), l = 0; l < o.length; l++)
+ if (((a = o[l]), this.eventIntersectsRange(a, t))) {
+ if (n === !1) return !1;
+ if ('function' == typeof n && !n(a, i)) return !1;
+ if (i) {
+ if (((u = J(a.overlap, (a.source || {}).overlap)), u === !1)) return !1;
+ if ('function' == typeof u && !u(i, a)) return !1;
+ }
+ }
+ return !0;
+ }),
+ (De.prototype.constraintToEvents = function (t) {
+ return 'businessHours' === t
+ ? this.getCurrentBusinessHourEvents()
+ : 'object' == typeof t
+ ? null != t.start
+ ? this.expandEvent(this.buildEventFromInput(t))
+ : null
+ : this.clientEvents(t);
+ }),
+ (De.prototype.eventIntersectsRange = function (t, e) {
+ var n = t.start.clone().stripZone(),
+ i = this.getEventEnd(t).stripZone();
+ return e.start < i && e.end > n;
+ });
+ var ke = { id: '_fcBusinessHours', start: '09:00', end: '17:00', dow: [1, 2, 3, 4, 5], rendering: 'inverse-background' };
+ (De.prototype.getCurrentBusinessHourEvents = function (t) {
+ return this.computeBusinessHourEvents(t, this.options.businessHours);
+ }),
+ (De.prototype.computeBusinessHourEvents = function (e, n) {
+ return n === !0
+ ? this.expandBusinessHourEvents(e, [{}])
+ : t.isPlainObject(n)
+ ? this.expandBusinessHourEvents(e, [n])
+ : t.isArray(n)
+ ? this.expandBusinessHourEvents(e, n, !0)
+ : [];
+ }),
+ (De.prototype.expandBusinessHourEvents = function (e, n, i) {
+ var r,
+ s,
+ o = this.getView(),
+ l = [];
+ for (r = 0; r < n.length; r++)
+ (s = n[r]),
+ (i && !s.dow) ||
+ ((s = t.extend({}, ke, s)),
+ e && ((s.start = null), (s.end = null)),
+ l.push.apply(l, this.expandEvent(this.buildEventFromInput(s), o.start, o.end)));
+ return l;
+ });
+ var Le = (qt.BasicView = Ee.extend({
+ scroller: null,
+ dayGridClass: Se,
+ dayGrid: null,
+ dayNumbersVisible: !1,
+ colWeekNumbersVisible: !1,
+ cellWeekNumbersVisible: !1,
+ weekNumberWidth: null,
+ headContainerEl: null,
+ headRowEl: null,
+ initialize: function () {
+ (this.dayGrid = this.instantiateDayGrid()), (this.scroller = new be({ overflowX: 'hidden', overflowY: 'auto' }));
+ },
+ instantiateDayGrid: function () {
+ var t = this.dayGridClass.extend(Me);
+ return new t(this);
+ },
+ setRange: function (t) {
+ Ee.prototype.setRange.call(this, t),
+ (this.dayGrid.breakOnWeeks = /year|month|week/.test(this.intervalUnit)),
+ this.dayGrid.setRange(t);
+ },
+ computeRange: function (t) {
+ var e = Ee.prototype.computeRange.call(this, t);
+ return (
+ /year|month/.test(e.intervalUnit) &&
+ (e.start.startOf('week'),
+ (e.start = this.skipHiddenDays(e.start)),
+ e.end.weekday() && (e.end.add(1, 'week').startOf('week'), (e.end = this.skipHiddenDays(e.end, -1, !0)))),
+ e
+ );
+ },
+ renderDates: function () {
+ (this.dayNumbersVisible = this.dayGrid.rowCnt > 1),
+ this.opt('weekNumbers') &&
+ (this.opt('weekNumbersWithinDays')
+ ? ((this.cellWeekNumbersVisible = !0), (this.colWeekNumbersVisible = !1))
+ : ((this.cellWeekNumbersVisible = !1), (this.colWeekNumbersVisible = !0))),
+ (this.dayGrid.numbersVisible = this.dayNumbersVisible || this.cellWeekNumbersVisible || this.colWeekNumbersVisible),
+ this.el.addClass('fc-basic-view').html(this.renderSkeletonHtml()),
+ this.renderHead(),
+ this.scroller.render();
+ var e = this.scroller.el.addClass('fc-day-grid-container'),
+ n = t('').appendTo(e);
+ this.el.find('.fc-body > tr > td').append(e), this.dayGrid.setElement(n), this.dayGrid.renderDates(this.hasRigidRows());
+ },
+ renderHead: function () {
+ (this.headContainerEl = this.el.find('.fc-head-container').html(this.dayGrid.renderHeadHtml())),
+ (this.headRowEl = this.headContainerEl.find('.fc-row'));
+ },
+ unrenderDates: function () {
+ this.dayGrid.unrenderDates(), this.dayGrid.removeElement(), this.scroller.destroy();
+ },
+ renderBusinessHours: function () {
+ this.dayGrid.renderBusinessHours();
+ },
+ unrenderBusinessHours: function () {
+ this.dayGrid.unrenderBusinessHours();
+ },
+ renderSkeletonHtml: function () {
+ return (
+ ''
+ );
+ },
+ weekNumberStyleAttr: function () {
+ return null !== this.weekNumberWidth ? 'style="width:' + this.weekNumberWidth + 'px"' : '';
+ },
+ hasRigidRows: function () {
+ var t = this.opt('eventLimit');
+ return t && 'number' != typeof t;
+ },
+ updateWidth: function () {
+ this.colWeekNumbersVisible && (this.weekNumberWidth = u(this.el.find('.fc-week-number')));
+ },
+ setHeight: function (t, e) {
+ var n,
+ s,
+ o = this.opt('eventLimit');
+ this.scroller.clear(),
+ r(this.headRowEl),
+ this.dayGrid.removeSegPopover(),
+ o && 'number' == typeof o && this.dayGrid.limitRows(o),
+ (n = this.computeScrollerHeight(t)),
+ this.setGridHeight(n, e),
+ o && 'number' != typeof o && this.dayGrid.limitRows(o),
+ e ||
+ (this.scroller.setHeight(n),
+ (s = this.scroller.getScrollbarWidths()),
+ (s.left || s.right) && (i(this.headRowEl, s), (n = this.computeScrollerHeight(t)), this.scroller.setHeight(n)),
+ this.scroller.lockOverflow(s));
+ },
+ computeScrollerHeight: function (t) {
+ return t - c(this.el, this.scroller.el);
+ },
+ setGridHeight: function (t, e) {
+ e ? a(this.dayGrid.rowEls) : l(this.dayGrid.rowEls, t, !0);
+ },
+ computeInitialScroll: function () {
+ return { top: 0 };
+ },
+ queryScroll: function () {
+ return { top: this.scroller.getScrollTop() };
+ },
+ setScroll: function (t) {
+ this.scroller.setScrollTop(t.top);
+ },
+ prepareHits: function () {
+ this.dayGrid.prepareHits();
+ },
+ releaseHits: function () {
+ this.dayGrid.releaseHits();
+ },
+ queryHit: function (t, e) {
+ return this.dayGrid.queryHit(t, e);
+ },
+ getHitSpan: function (t) {
+ return this.dayGrid.getHitSpan(t);
+ },
+ getHitEl: function (t) {
+ return this.dayGrid.getHitEl(t);
+ },
+ renderEvents: function (t) {
+ this.dayGrid.renderEvents(t), this.updateHeight();
+ },
+ getEventSegs: function () {
+ return this.dayGrid.getEventSegs();
+ },
+ unrenderEvents: function () {
+ this.dayGrid.unrenderEvents();
+ },
+ renderDrag: function (t, e) {
+ return this.dayGrid.renderDrag(t, e);
+ },
+ unrenderDrag: function () {
+ this.dayGrid.unrenderDrag();
+ },
+ renderSelection: function (t) {
+ this.dayGrid.renderSelection(t);
+ },
+ unrenderSelection: function () {
+ this.dayGrid.unrenderSelection();
+ },
+ })),
+ Me = {
+ renderHeadIntroHtml: function () {
+ var t = this.view;
+ return t.colWeekNumbersVisible
+ ? ''
+ : '';
+ },
+ renderNumberIntroHtml: function (t) {
+ var e = this.view,
+ n = this.getCellDate(t, 0);
+ return e.colWeekNumbersVisible
+ ? '' +
+ e.buildGotoAnchorHtml({ date: n, type: 'week', forceOff: 1 === this.colCnt }, n.format('w')) +
+ ' | '
+ : '';
+ },
+ renderBgIntroHtml: function () {
+ var t = this.view;
+ return t.colWeekNumbersVisible
+ ? ' | '
+ : '';
+ },
+ renderIntroHtml: function () {
+ var t = this.view;
+ return t.colWeekNumbersVisible ? ' | ' : '';
+ },
+ },
+ Be = (qt.MonthView = Le.extend({
+ computeRange: function (t) {
+ var e,
+ n = Le.prototype.computeRange.call(this, t);
+ return this.isFixedWeeks() && ((e = Math.ceil(n.end.diff(n.start, 'weeks', !0))), n.end.add(6 - e, 'weeks')), n;
+ },
+ setGridHeight: function (t, e) {
+ e && (t *= this.rowCnt / 6), l(this.dayGrid.rowEls, t, !e);
+ },
+ isFixedWeeks: function () {
+ return this.opt('fixedWeekCount');
+ },
+ }));
+ (Zt.basic = { class: Le }),
+ (Zt.basicDay = { type: 'basic', duration: { days: 1 } }),
+ (Zt.basicWeek = { type: 'basic', duration: { weeks: 1 } }),
+ (Zt.month = { class: Be, duration: { months: 1 }, defaults: { fixedWeekCount: !0 } });
+ var ze = (qt.AgendaView = Ee.extend({
+ scroller: null,
+ timeGridClass: we,
+ timeGrid: null,
+ dayGridClass: Se,
+ dayGrid: null,
+ axisWidth: null,
+ headContainerEl: null,
+ noScrollRowEls: null,
+ bottomRuleEl: null,
+ initialize: function () {
+ (this.timeGrid = this.instantiateTimeGrid()),
+ this.opt('allDaySlot') && (this.dayGrid = this.instantiateDayGrid()),
+ (this.scroller = new be({ overflowX: 'hidden', overflowY: 'auto' }));
+ },
+ instantiateTimeGrid: function () {
+ var t = this.timeGridClass.extend(Fe);
+ return new t(this);
+ },
+ instantiateDayGrid: function () {
+ var t = this.dayGridClass.extend(Ne);
+ return new t(this);
+ },
+ setRange: function (t) {
+ Ee.prototype.setRange.call(this, t), this.timeGrid.setRange(t), this.dayGrid && this.dayGrid.setRange(t);
+ },
+ renderDates: function () {
+ this.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml()), this.renderHead(), this.scroller.render();
+ var e = this.scroller.el.addClass('fc-time-grid-container'),
+ n = t('').appendTo(e);
+ this.el.find('.fc-body > tr > td').append(e),
+ this.timeGrid.setElement(n),
+ this.timeGrid.renderDates(),
+ (this.bottomRuleEl = t('').appendTo(this.timeGrid.el)),
+ this.dayGrid &&
+ (this.dayGrid.setElement(this.el.find('.fc-day-grid')),
+ this.dayGrid.renderDates(),
+ (this.dayGrid.bottomCoordPadding = this.dayGrid.el.next('hr').outerHeight())),
+ (this.noScrollRowEls = this.el.find('.fc-row:not(.fc-scroller *)'));
+ },
+ renderHead: function () {
+ this.headContainerEl = this.el.find('.fc-head-container').html(this.timeGrid.renderHeadHtml());
+ },
+ unrenderDates: function () {
+ this.timeGrid.unrenderDates(),
+ this.timeGrid.removeElement(),
+ this.dayGrid && (this.dayGrid.unrenderDates(), this.dayGrid.removeElement()),
+ this.scroller.destroy();
+ },
+ renderSkeletonHtml: function () {
+ return (
+ '|
' +
+ (this.dayGrid ? '' : '') +
+ ' |
'
+ );
+ },
+ axisStyleAttr: function () {
+ return null !== this.axisWidth ? 'style="width:' + this.axisWidth + 'px"' : '';
+ },
+ renderBusinessHours: function () {
+ this.timeGrid.renderBusinessHours(), this.dayGrid && this.dayGrid.renderBusinessHours();
+ },
+ unrenderBusinessHours: function () {
+ this.timeGrid.unrenderBusinessHours(), this.dayGrid && this.dayGrid.unrenderBusinessHours();
+ },
+ getNowIndicatorUnit: function () {
+ return this.timeGrid.getNowIndicatorUnit();
+ },
+ renderNowIndicator: function (t) {
+ this.timeGrid.renderNowIndicator(t);
+ },
+ unrenderNowIndicator: function () {
+ this.timeGrid.unrenderNowIndicator();
+ },
+ updateSize: function (t) {
+ this.timeGrid.updateSize(t), Ee.prototype.updateSize.call(this, t);
+ },
+ updateWidth: function () {
+ this.axisWidth = u(this.el.find('.fc-axis'));
+ },
+ setHeight: function (t, e) {
+ var n, s, o;
+ this.bottomRuleEl.hide(),
+ this.scroller.clear(),
+ r(this.noScrollRowEls),
+ this.dayGrid &&
+ (this.dayGrid.removeSegPopover(),
+ (n = this.opt('eventLimit')),
+ n && 'number' != typeof n && (n = Ge),
+ n && this.dayGrid.limitRows(n)),
+ e ||
+ ((s = this.computeScrollerHeight(t)),
+ this.scroller.setHeight(s),
+ (o = this.scroller.getScrollbarWidths()),
+ (o.left || o.right) && (i(this.noScrollRowEls, o), (s = this.computeScrollerHeight(t)), this.scroller.setHeight(s)),
+ this.scroller.lockOverflow(o),
+ this.timeGrid.getTotalSlatHeight() < s && this.bottomRuleEl.show());
+ },
+ computeScrollerHeight: function (t) {
+ return t - c(this.el, this.scroller.el);
+ },
+ computeInitialScroll: function () {
+ var t = e.duration(this.opt('scrollTime')),
+ n = this.timeGrid.computeTimeTop(t);
+ return (n = Math.ceil(n)), n && n++, { top: n };
+ },
+ queryScroll: function () {
+ return { top: this.scroller.getScrollTop() };
+ },
+ setScroll: function (t) {
+ this.scroller.setScrollTop(t.top);
+ },
+ prepareHits: function () {
+ this.timeGrid.prepareHits(), this.dayGrid && this.dayGrid.prepareHits();
+ },
+ releaseHits: function () {
+ this.timeGrid.releaseHits(), this.dayGrid && this.dayGrid.releaseHits();
+ },
+ queryHit: function (t, e) {
+ var n = this.timeGrid.queryHit(t, e);
+ return !n && this.dayGrid && (n = this.dayGrid.queryHit(t, e)), n;
+ },
+ getHitSpan: function (t) {
+ return t.component.getHitSpan(t);
+ },
+ getHitEl: function (t) {
+ return t.component.getHitEl(t);
+ },
+ renderEvents: function (t) {
+ var e,
+ n,
+ i = [],
+ r = [],
+ s = [];
+ for (n = 0; n < t.length; n++) t[n].allDay ? i.push(t[n]) : r.push(t[n]);
+ (e = this.timeGrid.renderEvents(r)), this.dayGrid && (s = this.dayGrid.renderEvents(i)), this.updateHeight();
+ },
+ getEventSegs: function () {
+ return this.timeGrid.getEventSegs().concat(this.dayGrid ? this.dayGrid.getEventSegs() : []);
+ },
+ unrenderEvents: function () {
+ this.timeGrid.unrenderEvents(), this.dayGrid && this.dayGrid.unrenderEvents();
+ },
+ renderDrag: function (t, e) {
+ return t.start.hasTime() ? this.timeGrid.renderDrag(t, e) : this.dayGrid ? this.dayGrid.renderDrag(t, e) : void 0;
+ },
+ unrenderDrag: function () {
+ this.timeGrid.unrenderDrag(), this.dayGrid && this.dayGrid.unrenderDrag();
+ },
+ renderSelection: function (t) {
+ t.start.hasTime() || t.end.hasTime() ? this.timeGrid.renderSelection(t) : this.dayGrid && this.dayGrid.renderSelection(t);
+ },
+ unrenderSelection: function () {
+ this.timeGrid.unrenderSelection(), this.dayGrid && this.dayGrid.unrenderSelection();
+ },
+ })),
+ Fe = {
+ renderHeadIntroHtml: function () {
+ var t,
+ e = this.view;
+ return e.opt('weekNumbers')
+ ? ((t = this.start.format(e.opt('smallWeekFormat'))),
+ '')
+ : '';
+ },
+ renderBgIntroHtml: function () {
+ var t = this.view;
+ return ' | ';
+ },
+ renderIntroHtml: function () {
+ var t = this.view;
+ return ' | ';
+ },
+ },
+ Ne = {
+ renderBgIntroHtml: function () {
+ var t = this.view;
+ return '' + t.getAllDayHtml() + ' | ';
+ },
+ renderIntroHtml: function () {
+ var t = this.view;
+ return ' | ';
+ },
+ },
+ Ge = 5,
+ Oe = [{ hours: 1 }, { minutes: 30 }, { minutes: 15 }, { seconds: 30 }, { seconds: 15 }];
+ (Zt.agenda = {
+ class: ze,
+ defaults: { allDaySlot: !0, slotDuration: '00:30:00', minTime: '00:00:00', maxTime: '24:00:00', slotEventOverlap: !0 },
+ }),
+ (Zt.agendaDay = { type: 'agenda', duration: { days: 1 } }),
+ (Zt.agendaWeek = { type: 'agenda', duration: { weeks: 1 } });
+ var Ae = Ee.extend({
+ grid: null,
+ scroller: null,
+ initialize: function () {
+ (this.grid = new Ve(this)), (this.scroller = new be({ overflowX: 'hidden', overflowY: 'auto' }));
+ },
+ setRange: function (t) {
+ Ee.prototype.setRange.call(this, t), this.grid.setRange(t);
+ },
+ renderSkeleton: function () {
+ this.el.addClass('fc-list-view ' + this.widgetContentClass),
+ this.scroller.render(),
+ this.scroller.el.appendTo(this.el),
+ this.grid.setElement(this.scroller.scrollEl);
+ },
+ unrenderSkeleton: function () {
+ this.scroller.destroy();
+ },
+ setHeight: function (t, e) {
+ this.scroller.setHeight(this.computeScrollerHeight(t));
+ },
+ computeScrollerHeight: function (t) {
+ return t - c(this.el, this.scroller.el);
+ },
+ renderEvents: function (t) {
+ this.grid.renderEvents(t);
+ },
+ unrenderEvents: function () {
+ this.grid.unrenderEvents();
+ },
+ isEventResizable: function (t) {
+ return !1;
+ },
+ isEventDraggable: function (t) {
+ return !1;
+ },
+ }),
+ Ve = me.extend({
+ segSelector: '.fc-list-item',
+ hasDayInteractions: !1,
+ spanToSegs: function (t) {
+ for (var e, n = this.view, i = n.start.clone().time(0), r = 0, s = []; i < n.end; )
+ if (
+ ((e = F(t, { start: i, end: i.clone().add(1, 'day') })),
+ e && ((e.dayIndex = r), s.push(e)),
+ i.add(1, 'day'),
+ r++,
+ e && !e.isEnd && t.end.hasTime() && t.end < i.clone().add(this.view.nextDayThreshold))
+ ) {
+ (e.end = t.end.clone()), (e.isEnd = !0);
+ break;
+ }
+ return s;
+ },
+ computeEventTimeFormat: function () {
+ return this.view.opt('mediumTimeFormat');
+ },
+ handleSegClick: function (e, n) {
+ var i;
+ me.prototype.handleSegClick.apply(this, arguments),
+ t(n.target).closest('a[href]').length || ((i = e.event.url), i && !n.isDefaultPrevented() && (window.location.href = i));
+ },
+ renderFgSegs: function (t) {
+ return (t = this.renderFgSegEls(t)), t.length ? this.renderSegList(t) : this.renderEmptyMessage(), t;
+ },
+ renderEmptyMessage: function () {
+ this.el.html(
+ '' +
+ tt(this.view.opt('noEventsMessage')) +
+ '
'
+ );
+ },
+ renderSegList: function (e) {
+ var n,
+ i,
+ r,
+ s = this.groupSegsByDay(e),
+ o = t(''),
+ l = o.find('tbody');
+ for (n = 0; n < s.length; n++)
+ if ((i = s[n]))
+ for (l.append(this.dayHeaderHtml(this.view.start.clone().add(n, 'days'))), this.sortEventSegs(i), r = 0; r < i.length; r++)
+ l.append(i[r].el);
+ this.el.empty().append(o);
+ },
+ groupSegsByDay: function (t) {
+ var e,
+ n,
+ i = [];
+ for (e = 0; e < t.length; e++) (n = t[e]), (i[n.dayIndex] || (i[n.dayIndex] = [])).push(n);
+ return i;
+ },
+ dayHeaderHtml: function (t) {
+ var e = this.view,
+ n = e.opt('listDayFormat'),
+ i = e.opt('listDayAltFormat');
+ return (
+ '
'
+ );
+ },
+ fgSegHtml: function (t) {
+ var e,
+ n = this.view,
+ i = ['fc-list-item'].concat(this.getSegCustomClasses(t)),
+ r = this.getSegBackgroundColor(t),
+ s = t.event,
+ o = s.url;
+ return (
+ (e = s.allDay
+ ? n.getAllDayHtml()
+ : n.isMultiDayEvent(s)
+ ? t.isStart || t.isEnd
+ ? tt(this.getEventTimeText(t))
+ : n.getAllDayHtml()
+ : tt(this.getEventTimeText(s))),
+ o && i.push('fc-has-url'),
+ '' +
+ (this.displayEventTime ? '' + (e || '') + ' | ' : '') +
+ ' | ' +
+ tt(t.event.title || '') +
+ ' |
'
+ );
+ },
+ });
+ return (
+ (Zt.list = {
+ class: Ae,
+ buttonTextKey: 'list',
+ defaults: { buttonText: 'list', listDayFormat: 'LL', noEventsMessage: 'No events to display' },
+ }),
+ (Zt.listDay = { type: 'list', duration: { days: 1 }, defaults: { listDayFormat: 'dddd' } }),
+ (Zt.listWeek = { type: 'list', duration: { weeks: 1 }, defaults: { listDayFormat: 'dddd', listDayAltFormat: 'LL' } }),
+ (Zt.listMonth = { type: 'list', duration: { month: 1 }, defaults: { listDayAltFormat: 'dddd' } }),
+ (Zt.listYear = { type: 'list', duration: { year: 1 }, defaults: { listDayAltFormat: 'dddd' } }),
+ qt
+ );
+});
diff --git a/src/main/webapp/content/js/jquery-3.1.1.min.js b/src/main/webapp/content/js/jquery-3.1.1.min.js
new file mode 100644
index 0000000..e9df6b9
--- /dev/null
+++ b/src/main/webapp/content/js/jquery-3.1.1.min.js
@@ -0,0 +1,4432 @@
+/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */
+!(function (a, b) {
+ 'use strict';
+ 'object' == typeof module && 'object' == typeof module.exports
+ ? (module.exports = a.document
+ ? b(a, !0)
+ : function (a) {
+ if (!a.document) throw new Error('jQuery requires a window with a document');
+ return b(a);
+ })
+ : b(a);
+})('undefined' != typeof window ? window : this, function (a, b) {
+ 'use strict';
+ var c = [],
+ d = a.document,
+ e = Object.getPrototypeOf,
+ f = c.slice,
+ g = c.concat,
+ h = c.push,
+ i = c.indexOf,
+ j = {},
+ k = j.toString,
+ l = j.hasOwnProperty,
+ m = l.toString,
+ n = m.call(Object),
+ o = {};
+ function p(a, b) {
+ b = b || d;
+ var c = b.createElement('script');
+ (c.text = a), b.head.appendChild(c).parentNode.removeChild(c);
+ }
+ var q = '3.1.1',
+ r = function (a, b) {
+ return new r.fn.init(a, b);
+ },
+ s = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+ t = /^-ms-/,
+ u = /-([a-z])/g,
+ v = function (a, b) {
+ return b.toUpperCase();
+ };
+ (r.fn = r.prototype =
+ {
+ jquery: q,
+ constructor: r,
+ length: 0,
+ toArray: function () {
+ return f.call(this);
+ },
+ get: function (a) {
+ return null == a ? f.call(this) : a < 0 ? this[a + this.length] : this[a];
+ },
+ pushStack: function (a) {
+ var b = r.merge(this.constructor(), a);
+ return (b.prevObject = this), b;
+ },
+ each: function (a) {
+ return r.each(this, a);
+ },
+ map: function (a) {
+ return this.pushStack(
+ r.map(this, function (b, c) {
+ return a.call(b, c, b);
+ })
+ );
+ },
+ slice: function () {
+ return this.pushStack(f.apply(this, arguments));
+ },
+ first: function () {
+ return this.eq(0);
+ },
+ last: function () {
+ return this.eq(-1);
+ },
+ eq: function (a) {
+ var b = this.length,
+ c = +a + (a < 0 ? b : 0);
+ return this.pushStack(c >= 0 && c < b ? [this[c]] : []);
+ },
+ end: function () {
+ return this.prevObject || this.constructor();
+ },
+ push: h,
+ sort: c.sort,
+ splice: c.splice,
+ }),
+ (r.extend = r.fn.extend =
+ function () {
+ var a,
+ b,
+ c,
+ d,
+ e,
+ f,
+ g = arguments[0] || {},
+ h = 1,
+ i = arguments.length,
+ j = !1;
+ for (
+ 'boolean' == typeof g && ((j = g), (g = arguments[h] || {}), h++),
+ 'object' == typeof g || r.isFunction(g) || (g = {}),
+ h === i && ((g = this), h--);
+ h < i;
+ h++
+ )
+ if (null != (a = arguments[h]))
+ for (b in a)
+ (c = g[b]),
+ (d = a[b]),
+ g !== d &&
+ (j && d && (r.isPlainObject(d) || (e = r.isArray(d)))
+ ? (e ? ((e = !1), (f = c && r.isArray(c) ? c : [])) : (f = c && r.isPlainObject(c) ? c : {}),
+ (g[b] = r.extend(j, f, d)))
+ : void 0 !== d && (g[b] = d));
+ return g;
+ }),
+ r.extend({
+ expando: 'jQuery' + (q + Math.random()).replace(/\D/g, ''),
+ isReady: !0,
+ error: function (a) {
+ throw new Error(a);
+ },
+ noop: function () {},
+ isFunction: function (a) {
+ return 'function' === r.type(a);
+ },
+ isArray: Array.isArray,
+ isWindow: function (a) {
+ return null != a && a === a.window;
+ },
+ isNumeric: function (a) {
+ var b = r.type(a);
+ return ('number' === b || 'string' === b) && !isNaN(a - parseFloat(a));
+ },
+ isPlainObject: function (a) {
+ var b, c;
+ return (
+ !(!a || '[object Object]' !== k.call(a)) &&
+ (!(b = e(a)) || ((c = l.call(b, 'constructor') && b.constructor), 'function' == typeof c && m.call(c) === n))
+ );
+ },
+ isEmptyObject: function (a) {
+ var b;
+ for (b in a) return !1;
+ return !0;
+ },
+ type: function (a) {
+ return null == a ? a + '' : 'object' == typeof a || 'function' == typeof a ? j[k.call(a)] || 'object' : typeof a;
+ },
+ globalEval: function (a) {
+ p(a);
+ },
+ camelCase: function (a) {
+ return a.replace(t, 'ms-').replace(u, v);
+ },
+ nodeName: function (a, b) {
+ return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase();
+ },
+ each: function (a, b) {
+ var c,
+ d = 0;
+ if (w(a)) {
+ for (c = a.length; d < c; d++) if (b.call(a[d], d, a[d]) === !1) break;
+ } else for (d in a) if (b.call(a[d], d, a[d]) === !1) break;
+ return a;
+ },
+ trim: function (a) {
+ return null == a ? '' : (a + '').replace(s, '');
+ },
+ makeArray: function (a, b) {
+ var c = b || [];
+ return null != a && (w(Object(a)) ? r.merge(c, 'string' == typeof a ? [a] : a) : h.call(c, a)), c;
+ },
+ inArray: function (a, b, c) {
+ return null == b ? -1 : i.call(b, a, c);
+ },
+ merge: function (a, b) {
+ for (var c = +b.length, d = 0, e = a.length; d < c; d++) a[e++] = b[d];
+ return (a.length = e), a;
+ },
+ grep: function (a, b, c) {
+ for (var d, e = [], f = 0, g = a.length, h = !c; f < g; f++) (d = !b(a[f], f)), d !== h && e.push(a[f]);
+ return e;
+ },
+ map: function (a, b, c) {
+ var d,
+ e,
+ f = 0,
+ h = [];
+ if (w(a)) for (d = a.length; f < d; f++) (e = b(a[f], f, c)), null != e && h.push(e);
+ else for (f in a) (e = b(a[f], f, c)), null != e && h.push(e);
+ return g.apply([], h);
+ },
+ guid: 1,
+ proxy: function (a, b) {
+ var c, d, e;
+ if (('string' == typeof b && ((c = a[b]), (b = a), (a = c)), r.isFunction(a)))
+ return (
+ (d = f.call(arguments, 2)),
+ (e = function () {
+ return a.apply(b || this, d.concat(f.call(arguments)));
+ }),
+ (e.guid = a.guid = a.guid || r.guid++),
+ e
+ );
+ },
+ now: Date.now,
+ support: o,
+ }),
+ 'function' == typeof Symbol && (r.fn[Symbol.iterator] = c[Symbol.iterator]),
+ r.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '), function (a, b) {
+ j['[object ' + b + ']'] = b.toLowerCase();
+ });
+ function w(a) {
+ var b = !!a && 'length' in a && a.length,
+ c = r.type(a);
+ return 'function' !== c && !r.isWindow(a) && ('array' === c || 0 === b || ('number' == typeof b && b > 0 && b - 1 in a));
+ }
+ var x = (function (a) {
+ var b,
+ c,
+ d,
+ e,
+ f,
+ g,
+ h,
+ i,
+ j,
+ k,
+ l,
+ m,
+ n,
+ o,
+ p,
+ q,
+ r,
+ s,
+ t,
+ u = 'sizzle' + 1 * new Date(),
+ v = a.document,
+ w = 0,
+ x = 0,
+ y = ha(),
+ z = ha(),
+ A = ha(),
+ B = function (a, b) {
+ return a === b && (l = !0), 0;
+ },
+ C = {}.hasOwnProperty,
+ D = [],
+ E = D.pop,
+ F = D.push,
+ G = D.push,
+ H = D.slice,
+ I = function (a, b) {
+ for (var c = 0, d = a.length; c < d; c++) if (a[c] === b) return c;
+ return -1;
+ },
+ J = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
+ K = '[\\x20\\t\\r\\n\\f]',
+ L = '(?:\\\\.|[\\w-]|[^\0-\\xa0])+',
+ M =
+ '\\[' +
+ K +
+ '*(' +
+ L +
+ ')(?:' +
+ K +
+ '*([*^$|!~]?=)' +
+ K +
+ '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' +
+ L +
+ '))|)' +
+ K +
+ '*\\]',
+ N = ':(' + L + ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' + M + ')*)|.*)\\)|)',
+ O = new RegExp(K + '+', 'g'),
+ P = new RegExp('^' + K + '+|((?:^|[^\\\\])(?:\\\\.)*)' + K + '+$', 'g'),
+ Q = new RegExp('^' + K + '*,' + K + '*'),
+ R = new RegExp('^' + K + '*([>+~]|' + K + ')' + K + '*'),
+ S = new RegExp('=' + K + '*([^\\]\'"]*?)' + K + '*\\]', 'g'),
+ T = new RegExp(N),
+ U = new RegExp('^' + L + '$'),
+ V = {
+ ID: new RegExp('^#(' + L + ')'),
+ CLASS: new RegExp('^\\.(' + L + ')'),
+ TAG: new RegExp('^(' + L + '|[*])'),
+ ATTR: new RegExp('^' + M),
+ PSEUDO: new RegExp('^' + N),
+ CHILD: new RegExp(
+ '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' +
+ K +
+ '*(even|odd|(([+-]|)(\\d*)n|)' +
+ K +
+ '*(?:([+-]|)' +
+ K +
+ '*(\\d+)|))' +
+ K +
+ '*\\)|)',
+ 'i'
+ ),
+ bool: new RegExp('^(?:' + J + ')$', 'i'),
+ needsContext: new RegExp(
+ '^' + K + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + K + '*((?:-\\d)?\\d*)' + K + '*\\)|)(?=[^-]|$)',
+ 'i'
+ ),
+ },
+ W = /^(?:input|select|textarea|button)$/i,
+ X = /^h\d$/i,
+ Y = /^[^{]+\{\s*\[native \w/,
+ Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+ $ = /[+~]/,
+ _ = new RegExp('\\\\([\\da-f]{1,6}' + K + '?|(' + K + ')|.)', 'ig'),
+ aa = function (a, b, c) {
+ var d = '0x' + b - 65536;
+ return d !== d || c ? b : d < 0 ? String.fromCharCode(d + 65536) : String.fromCharCode((d >> 10) | 55296, (1023 & d) | 56320);
+ },
+ ba = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
+ ca = function (a, b) {
+ return b ? ('\0' === a ? '\ufffd' : a.slice(0, -1) + '\\' + a.charCodeAt(a.length - 1).toString(16) + ' ') : '\\' + a;
+ },
+ da = function () {
+ m();
+ },
+ ea = ta(
+ function (a) {
+ return a.disabled === !0 && ('form' in a || 'label' in a);
+ },
+ { dir: 'parentNode', next: 'legend' }
+ );
+ try {
+ G.apply((D = H.call(v.childNodes)), v.childNodes), D[v.childNodes.length].nodeType;
+ } catch (fa) {
+ G = {
+ apply: D.length
+ ? function (a, b) {
+ F.apply(a, H.call(b));
+ }
+ : function (a, b) {
+ var c = a.length,
+ d = 0;
+ while ((a[c++] = b[d++]));
+ a.length = c - 1;
+ },
+ };
+ }
+ function ga(a, b, d, e) {
+ var f,
+ h,
+ j,
+ k,
+ l,
+ o,
+ r,
+ s = b && b.ownerDocument,
+ w = b ? b.nodeType : 9;
+ if (((d = d || []), 'string' != typeof a || !a || (1 !== w && 9 !== w && 11 !== w))) return d;
+ if (!e && ((b ? b.ownerDocument || b : v) !== n && m(b), (b = b || n), p)) {
+ if (11 !== w && (l = Z.exec(a)))
+ if ((f = l[1])) {
+ if (9 === w) {
+ if (!(j = b.getElementById(f))) return d;
+ if (j.id === f) return d.push(j), d;
+ } else if (s && (j = s.getElementById(f)) && t(b, j) && j.id === f) return d.push(j), d;
+ } else {
+ if (l[2]) return G.apply(d, b.getElementsByTagName(a)), d;
+ if ((f = l[3]) && c.getElementsByClassName && b.getElementsByClassName) return G.apply(d, b.getElementsByClassName(f)), d;
+ }
+ if (c.qsa && !A[a + ' '] && (!q || !q.test(a))) {
+ if (1 !== w) (s = b), (r = a);
+ else if ('object' !== b.nodeName.toLowerCase()) {
+ (k = b.getAttribute('id')) ? (k = k.replace(ba, ca)) : b.setAttribute('id', (k = u)), (o = g(a)), (h = o.length);
+ while (h--) o[h] = '#' + k + ' ' + sa(o[h]);
+ (r = o.join(',')), (s = ($.test(a) && qa(b.parentNode)) || b);
+ }
+ if (r)
+ try {
+ return G.apply(d, s.querySelectorAll(r)), d;
+ } catch (x) {
+ } finally {
+ k === u && b.removeAttribute('id');
+ }
+ }
+ }
+ return i(a.replace(P, '$1'), b, d, e);
+ }
+ function ha() {
+ var a = [];
+ function b(c, e) {
+ return a.push(c + ' ') > d.cacheLength && delete b[a.shift()], (b[c + ' '] = e);
+ }
+ return b;
+ }
+ function ia(a) {
+ return (a[u] = !0), a;
+ }
+ function ja(a) {
+ var b = n.createElement('fieldset');
+ try {
+ return !!a(b);
+ } catch (c) {
+ return !1;
+ } finally {
+ b.parentNode && b.parentNode.removeChild(b), (b = null);
+ }
+ }
+ function ka(a, b) {
+ var c = a.split('|'),
+ e = c.length;
+ while (e--) d.attrHandle[c[e]] = b;
+ }
+ function la(a, b) {
+ var c = b && a,
+ d = c && 1 === a.nodeType && 1 === b.nodeType && a.sourceIndex - b.sourceIndex;
+ if (d) return d;
+ if (c) while ((c = c.nextSibling)) if (c === b) return -1;
+ return a ? 1 : -1;
+ }
+ function ma(a) {
+ return function (b) {
+ var c = b.nodeName.toLowerCase();
+ return 'input' === c && b.type === a;
+ };
+ }
+ function na(a) {
+ return function (b) {
+ var c = b.nodeName.toLowerCase();
+ return ('input' === c || 'button' === c) && b.type === a;
+ };
+ }
+ function oa(a) {
+ return function (b) {
+ return 'form' in b
+ ? b.parentNode && b.disabled === !1
+ ? 'label' in b
+ ? 'label' in b.parentNode
+ ? b.parentNode.disabled === a
+ : b.disabled === a
+ : b.isDisabled === a || (b.isDisabled !== !a && ea(b) === a)
+ : b.disabled === a
+ : 'label' in b && b.disabled === a;
+ };
+ }
+ function pa(a) {
+ return ia(function (b) {
+ return (
+ (b = +b),
+ ia(function (c, d) {
+ var e,
+ f = a([], c.length, b),
+ g = f.length;
+ while (g--) c[(e = f[g])] && (c[e] = !(d[e] = c[e]));
+ })
+ );
+ });
+ }
+ function qa(a) {
+ return a && 'undefined' != typeof a.getElementsByTagName && a;
+ }
+ (c = ga.support = {}),
+ (f = ga.isXML =
+ function (a) {
+ var b = a && (a.ownerDocument || a).documentElement;
+ return !!b && 'HTML' !== b.nodeName;
+ }),
+ (m = ga.setDocument =
+ function (a) {
+ var b,
+ e,
+ g = a ? a.ownerDocument || a : v;
+ return g !== n && 9 === g.nodeType && g.documentElement
+ ? ((n = g),
+ (o = n.documentElement),
+ (p = !f(n)),
+ v !== n &&
+ (e = n.defaultView) &&
+ e.top !== e &&
+ (e.addEventListener ? e.addEventListener('unload', da, !1) : e.attachEvent && e.attachEvent('onunload', da)),
+ (c.attributes = ja(function (a) {
+ return (a.className = 'i'), !a.getAttribute('className');
+ })),
+ (c.getElementsByTagName = ja(function (a) {
+ return a.appendChild(n.createComment('')), !a.getElementsByTagName('*').length;
+ })),
+ (c.getElementsByClassName = Y.test(n.getElementsByClassName)),
+ (c.getById = ja(function (a) {
+ return (o.appendChild(a).id = u), !n.getElementsByName || !n.getElementsByName(u).length;
+ })),
+ c.getById
+ ? ((d.filter.ID = function (a) {
+ var b = a.replace(_, aa);
+ return function (a) {
+ return a.getAttribute('id') === b;
+ };
+ }),
+ (d.find.ID = function (a, b) {
+ if ('undefined' != typeof b.getElementById && p) {
+ var c = b.getElementById(a);
+ return c ? [c] : [];
+ }
+ }))
+ : ((d.filter.ID = function (a) {
+ var b = a.replace(_, aa);
+ return function (a) {
+ var c = 'undefined' != typeof a.getAttributeNode && a.getAttributeNode('id');
+ return c && c.value === b;
+ };
+ }),
+ (d.find.ID = function (a, b) {
+ if ('undefined' != typeof b.getElementById && p) {
+ var c,
+ d,
+ e,
+ f = b.getElementById(a);
+ if (f) {
+ if (((c = f.getAttributeNode('id')), c && c.value === a)) return [f];
+ (e = b.getElementsByName(a)), (d = 0);
+ while ((f = e[d++])) if (((c = f.getAttributeNode('id')), c && c.value === a)) return [f];
+ }
+ return [];
+ }
+ })),
+ (d.find.TAG = c.getElementsByTagName
+ ? function (a, b) {
+ return 'undefined' != typeof b.getElementsByTagName
+ ? b.getElementsByTagName(a)
+ : c.qsa
+ ? b.querySelectorAll(a)
+ : void 0;
+ }
+ : function (a, b) {
+ var c,
+ d = [],
+ e = 0,
+ f = b.getElementsByTagName(a);
+ if ('*' === a) {
+ while ((c = f[e++])) 1 === c.nodeType && d.push(c);
+ return d;
+ }
+ return f;
+ }),
+ (d.find.CLASS =
+ c.getElementsByClassName &&
+ function (a, b) {
+ if ('undefined' != typeof b.getElementsByClassName && p) return b.getElementsByClassName(a);
+ }),
+ (r = []),
+ (q = []),
+ (c.qsa = Y.test(n.querySelectorAll)) &&
+ (ja(function (a) {
+ (o.appendChild(a).innerHTML =
+ ""),
+ a.querySelectorAll("[msallowcapture^='']").length && q.push('[*^$]=' + K + '*(?:\'\'|"")'),
+ a.querySelectorAll('[selected]').length || q.push('\\[' + K + '*(?:value|' + J + ')'),
+ a.querySelectorAll('[id~=' + u + '-]').length || q.push('~='),
+ a.querySelectorAll(':checked').length || q.push(':checked'),
+ a.querySelectorAll('a#' + u + '+*').length || q.push('.#.+[+~]');
+ }),
+ ja(function (a) {
+ a.innerHTML = "";
+ var b = n.createElement('input');
+ b.setAttribute('type', 'hidden'),
+ a.appendChild(b).setAttribute('name', 'D'),
+ a.querySelectorAll('[name=d]').length && q.push('name' + K + '*[*^$|!~]?='),
+ 2 !== a.querySelectorAll(':enabled').length && q.push(':enabled', ':disabled'),
+ (o.appendChild(a).disabled = !0),
+ 2 !== a.querySelectorAll(':disabled').length && q.push(':enabled', ':disabled'),
+ a.querySelectorAll('*,:x'),
+ q.push(',.*:');
+ })),
+ (c.matchesSelector = Y.test(
+ (s = o.matches || o.webkitMatchesSelector || o.mozMatchesSelector || o.oMatchesSelector || o.msMatchesSelector)
+ )) &&
+ ja(function (a) {
+ (c.disconnectedMatch = s.call(a, '*')), s.call(a, "[s!='']:x"), r.push('!=', N);
+ }),
+ (q = q.length && new RegExp(q.join('|'))),
+ (r = r.length && new RegExp(r.join('|'))),
+ (b = Y.test(o.compareDocumentPosition)),
+ (t =
+ b || Y.test(o.contains)
+ ? function (a, b) {
+ var c = 9 === a.nodeType ? a.documentElement : a,
+ d = b && b.parentNode;
+ return (
+ a === d ||
+ !(
+ !d ||
+ 1 !== d.nodeType ||
+ !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d))
+ )
+ );
+ }
+ : function (a, b) {
+ if (b) while ((b = b.parentNode)) if (b === a) return !0;
+ return !1;
+ }),
+ (B = b
+ ? function (a, b) {
+ if (a === b) return (l = !0), 0;
+ var d = !a.compareDocumentPosition - !b.compareDocumentPosition;
+ return d
+ ? d
+ : ((d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1),
+ 1 & d || (!c.sortDetached && b.compareDocumentPosition(a) === d)
+ ? a === n || (a.ownerDocument === v && t(v, a))
+ ? -1
+ : b === n || (b.ownerDocument === v && t(v, b))
+ ? 1
+ : k
+ ? I(k, a) - I(k, b)
+ : 0
+ : 4 & d
+ ? -1
+ : 1);
+ }
+ : function (a, b) {
+ if (a === b) return (l = !0), 0;
+ var c,
+ d = 0,
+ e = a.parentNode,
+ f = b.parentNode,
+ g = [a],
+ h = [b];
+ if (!e || !f) return a === n ? -1 : b === n ? 1 : e ? -1 : f ? 1 : k ? I(k, a) - I(k, b) : 0;
+ if (e === f) return la(a, b);
+ c = a;
+ while ((c = c.parentNode)) g.unshift(c);
+ c = b;
+ while ((c = c.parentNode)) h.unshift(c);
+ while (g[d] === h[d]) d++;
+ return d ? la(g[d], h[d]) : g[d] === v ? -1 : h[d] === v ? 1 : 0;
+ }),
+ n)
+ : n;
+ }),
+ (ga.matches = function (a, b) {
+ return ga(a, null, null, b);
+ }),
+ (ga.matchesSelector = function (a, b) {
+ if (
+ ((a.ownerDocument || a) !== n && m(a),
+ (b = b.replace(S, "='$1']")),
+ c.matchesSelector && p && !A[b + ' '] && (!r || !r.test(b)) && (!q || !q.test(b)))
+ )
+ try {
+ var d = s.call(a, b);
+ if (d || c.disconnectedMatch || (a.document && 11 !== a.document.nodeType)) return d;
+ } catch (e) {}
+ return ga(b, n, null, [a]).length > 0;
+ }),
+ (ga.contains = function (a, b) {
+ return (a.ownerDocument || a) !== n && m(a), t(a, b);
+ }),
+ (ga.attr = function (a, b) {
+ (a.ownerDocument || a) !== n && m(a);
+ var e = d.attrHandle[b.toLowerCase()],
+ f = e && C.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0;
+ return void 0 !== f ? f : c.attributes || !p ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null;
+ }),
+ (ga.escape = function (a) {
+ return (a + '').replace(ba, ca);
+ }),
+ (ga.error = function (a) {
+ throw new Error('Syntax error, unrecognized expression: ' + a);
+ }),
+ (ga.uniqueSort = function (a) {
+ var b,
+ d = [],
+ e = 0,
+ f = 0;
+ if (((l = !c.detectDuplicates), (k = !c.sortStable && a.slice(0)), a.sort(B), l)) {
+ while ((b = a[f++])) b === a[f] && (e = d.push(f));
+ while (e--) a.splice(d[e], 1);
+ }
+ return (k = null), a;
+ }),
+ (e = ga.getText =
+ function (a) {
+ var b,
+ c = '',
+ d = 0,
+ f = a.nodeType;
+ if (f) {
+ if (1 === f || 9 === f || 11 === f) {
+ if ('string' == typeof a.textContent) return a.textContent;
+ for (a = a.firstChild; a; a = a.nextSibling) c += e(a);
+ } else if (3 === f || 4 === f) return a.nodeValue;
+ } else while ((b = a[d++])) c += e(b);
+ return c;
+ }),
+ (d = ga.selectors =
+ {
+ cacheLength: 50,
+ createPseudo: ia,
+ match: V,
+ attrHandle: {},
+ find: {},
+ relative: {
+ '>': { dir: 'parentNode', first: !0 },
+ ' ': { dir: 'parentNode' },
+ '+': { dir: 'previousSibling', first: !0 },
+ '~': { dir: 'previousSibling' },
+ },
+ preFilter: {
+ ATTR: function (a) {
+ return (
+ (a[1] = a[1].replace(_, aa)),
+ (a[3] = (a[3] || a[4] || a[5] || '').replace(_, aa)),
+ '~=' === a[2] && (a[3] = ' ' + a[3] + ' '),
+ a.slice(0, 4)
+ );
+ },
+ CHILD: function (a) {
+ return (
+ (a[1] = a[1].toLowerCase()),
+ 'nth' === a[1].slice(0, 3)
+ ? (a[3] || ga.error(a[0]),
+ (a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ('even' === a[3] || 'odd' === a[3]))),
+ (a[5] = +(a[7] + a[8] || 'odd' === a[3])))
+ : a[3] && ga.error(a[0]),
+ a
+ );
+ },
+ PSEUDO: function (a) {
+ var b,
+ c = !a[6] && a[2];
+ return V.CHILD.test(a[0])
+ ? null
+ : (a[3]
+ ? (a[2] = a[4] || a[5] || '')
+ : c &&
+ T.test(c) &&
+ (b = g(c, !0)) &&
+ (b = c.indexOf(')', c.length - b) - c.length) &&
+ ((a[0] = a[0].slice(0, b)), (a[2] = c.slice(0, b))),
+ a.slice(0, 3));
+ },
+ },
+ filter: {
+ TAG: function (a) {
+ var b = a.replace(_, aa).toLowerCase();
+ return '*' === a
+ ? function () {
+ return !0;
+ }
+ : function (a) {
+ return a.nodeName && a.nodeName.toLowerCase() === b;
+ };
+ },
+ CLASS: function (a) {
+ var b = y[a + ' '];
+ return (
+ b ||
+ ((b = new RegExp('(^|' + K + ')' + a + '(' + K + '|$)')) &&
+ y(a, function (a) {
+ return b.test(
+ ('string' == typeof a.className && a.className) ||
+ ('undefined' != typeof a.getAttribute && a.getAttribute('class')) ||
+ ''
+ );
+ }))
+ );
+ },
+ ATTR: function (a, b, c) {
+ return function (d) {
+ var e = ga.attr(d, a);
+ return null == e
+ ? '!=' === b
+ : !b ||
+ ((e += ''),
+ '=' === b
+ ? e === c
+ : '!=' === b
+ ? e !== c
+ : '^=' === b
+ ? c && 0 === e.indexOf(c)
+ : '*=' === b
+ ? c && e.indexOf(c) > -1
+ : '$=' === b
+ ? c && e.slice(-c.length) === c
+ : '~=' === b
+ ? (' ' + e.replace(O, ' ') + ' ').indexOf(c) > -1
+ : '|=' === b && (e === c || e.slice(0, c.length + 1) === c + '-'));
+ };
+ },
+ CHILD: function (a, b, c, d, e) {
+ var f = 'nth' !== a.slice(0, 3),
+ g = 'last' !== a.slice(-4),
+ h = 'of-type' === b;
+ return 1 === d && 0 === e
+ ? function (a) {
+ return !!a.parentNode;
+ }
+ : function (b, c, i) {
+ var j,
+ k,
+ l,
+ m,
+ n,
+ o,
+ p = f !== g ? 'nextSibling' : 'previousSibling',
+ q = b.parentNode,
+ r = h && b.nodeName.toLowerCase(),
+ s = !i && !h,
+ t = !1;
+ if (q) {
+ if (f) {
+ while (p) {
+ m = b;
+ while ((m = m[p])) if (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) return !1;
+ o = p = 'only' === a && !o && 'nextSibling';
+ }
+ return !0;
+ }
+ if (((o = [g ? q.firstChild : q.lastChild]), g && s)) {
+ (m = q),
+ (l = m[u] || (m[u] = {})),
+ (k = l[m.uniqueID] || (l[m.uniqueID] = {})),
+ (j = k[a] || []),
+ (n = j[0] === w && j[1]),
+ (t = n && j[2]),
+ (m = n && q.childNodes[n]);
+ while ((m = (++n && m && m[p]) || (t = n = 0) || o.pop()))
+ if (1 === m.nodeType && ++t && m === b) {
+ k[a] = [w, n, t];
+ break;
+ }
+ } else if (
+ (s &&
+ ((m = b),
+ (l = m[u] || (m[u] = {})),
+ (k = l[m.uniqueID] || (l[m.uniqueID] = {})),
+ (j = k[a] || []),
+ (n = j[0] === w && j[1]),
+ (t = n)),
+ t === !1)
+ )
+ while ((m = (++n && m && m[p]) || (t = n = 0) || o.pop()))
+ if (
+ (h ? m.nodeName.toLowerCase() === r : 1 === m.nodeType) &&
+ ++t &&
+ (s && ((l = m[u] || (m[u] = {})), (k = l[m.uniqueID] || (l[m.uniqueID] = {})), (k[a] = [w, t])), m === b)
+ )
+ break;
+ return (t -= e), t === d || (t % d === 0 && t / d >= 0);
+ }
+ };
+ },
+ PSEUDO: function (a, b) {
+ var c,
+ e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || ga.error('unsupported pseudo: ' + a);
+ return e[u]
+ ? e(b)
+ : e.length > 1
+ ? ((c = [a, a, '', b]),
+ d.setFilters.hasOwnProperty(a.toLowerCase())
+ ? ia(function (a, c) {
+ var d,
+ f = e(a, b),
+ g = f.length;
+ while (g--) (d = I(a, f[g])), (a[d] = !(c[d] = f[g]));
+ })
+ : function (a) {
+ return e(a, 0, c);
+ })
+ : e;
+ },
+ },
+ pseudos: {
+ not: ia(function (a) {
+ var b = [],
+ c = [],
+ d = h(a.replace(P, '$1'));
+ return d[u]
+ ? ia(function (a, b, c, e) {
+ var f,
+ g = d(a, null, e, []),
+ h = a.length;
+ while (h--) (f = g[h]) && (a[h] = !(b[h] = f));
+ })
+ : function (a, e, f) {
+ return (b[0] = a), d(b, null, f, c), (b[0] = null), !c.pop();
+ };
+ }),
+ has: ia(function (a) {
+ return function (b) {
+ return ga(a, b).length > 0;
+ };
+ }),
+ contains: ia(function (a) {
+ return (
+ (a = a.replace(_, aa)),
+ function (b) {
+ return (b.textContent || b.innerText || e(b)).indexOf(a) > -1;
+ }
+ );
+ }),
+ lang: ia(function (a) {
+ return (
+ U.test(a || '') || ga.error('unsupported lang: ' + a),
+ (a = a.replace(_, aa).toLowerCase()),
+ function (b) {
+ var c;
+ do
+ if ((c = p ? b.lang : b.getAttribute('xml:lang') || b.getAttribute('lang')))
+ return (c = c.toLowerCase()), c === a || 0 === c.indexOf(a + '-');
+ while ((b = b.parentNode) && 1 === b.nodeType);
+ return !1;
+ }
+ );
+ }),
+ target: function (b) {
+ var c = a.location && a.location.hash;
+ return c && c.slice(1) === b.id;
+ },
+ root: function (a) {
+ return a === o;
+ },
+ focus: function (a) {
+ return a === n.activeElement && (!n.hasFocus || n.hasFocus()) && !!(a.type || a.href || ~a.tabIndex);
+ },
+ enabled: oa(!1),
+ disabled: oa(!0),
+ checked: function (a) {
+ var b = a.nodeName.toLowerCase();
+ return ('input' === b && !!a.checked) || ('option' === b && !!a.selected);
+ },
+ selected: function (a) {
+ return a.parentNode && a.parentNode.selectedIndex, a.selected === !0;
+ },
+ empty: function (a) {
+ for (a = a.firstChild; a; a = a.nextSibling) if (a.nodeType < 6) return !1;
+ return !0;
+ },
+ parent: function (a) {
+ return !d.pseudos.empty(a);
+ },
+ header: function (a) {
+ return X.test(a.nodeName);
+ },
+ input: function (a) {
+ return W.test(a.nodeName);
+ },
+ button: function (a) {
+ var b = a.nodeName.toLowerCase();
+ return ('input' === b && 'button' === a.type) || 'button' === b;
+ },
+ text: function (a) {
+ var b;
+ return (
+ 'input' === a.nodeName.toLowerCase() &&
+ 'text' === a.type &&
+ (null == (b = a.getAttribute('type')) || 'text' === b.toLowerCase())
+ );
+ },
+ first: pa(function () {
+ return [0];
+ }),
+ last: pa(function (a, b) {
+ return [b - 1];
+ }),
+ eq: pa(function (a, b, c) {
+ return [c < 0 ? c + b : c];
+ }),
+ even: pa(function (a, b) {
+ for (var c = 0; c < b; c += 2) a.push(c);
+ return a;
+ }),
+ odd: pa(function (a, b) {
+ for (var c = 1; c < b; c += 2) a.push(c);
+ return a;
+ }),
+ lt: pa(function (a, b, c) {
+ for (var d = c < 0 ? c + b : c; --d >= 0; ) a.push(d);
+ return a;
+ }),
+ gt: pa(function (a, b, c) {
+ for (var d = c < 0 ? c + b : c; ++d < b; ) a.push(d);
+ return a;
+ }),
+ },
+ }),
+ (d.pseudos.nth = d.pseudos.eq);
+ for (b in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) d.pseudos[b] = ma(b);
+ for (b in { submit: !0, reset: !0 }) d.pseudos[b] = na(b);
+ function ra() {}
+ (ra.prototype = d.filters = d.pseudos),
+ (d.setFilters = new ra()),
+ (g = ga.tokenize =
+ function (a, b) {
+ var c,
+ e,
+ f,
+ g,
+ h,
+ i,
+ j,
+ k = z[a + ' '];
+ if (k) return b ? 0 : k.slice(0);
+ (h = a), (i = []), (j = d.preFilter);
+ while (h) {
+ (c && !(e = Q.exec(h))) || (e && (h = h.slice(e[0].length) || h), i.push((f = []))),
+ (c = !1),
+ (e = R.exec(h)) && ((c = e.shift()), f.push({ value: c, type: e[0].replace(P, ' ') }), (h = h.slice(c.length)));
+ for (g in d.filter)
+ !(e = V[g].exec(h)) ||
+ (j[g] && !(e = j[g](e))) ||
+ ((c = e.shift()), f.push({ value: c, type: g, matches: e }), (h = h.slice(c.length)));
+ if (!c) break;
+ }
+ return b ? h.length : h ? ga.error(a) : z(a, i).slice(0);
+ });
+ function sa(a) {
+ for (var b = 0, c = a.length, d = ''; b < c; b++) d += a[b].value;
+ return d;
+ }
+ function ta(a, b, c) {
+ var d = b.dir,
+ e = b.next,
+ f = e || d,
+ g = c && 'parentNode' === f,
+ h = x++;
+ return b.first
+ ? function (b, c, e) {
+ while ((b = b[d])) if (1 === b.nodeType || g) return a(b, c, e);
+ return !1;
+ }
+ : function (b, c, i) {
+ var j,
+ k,
+ l,
+ m = [w, h];
+ if (i) {
+ while ((b = b[d])) if ((1 === b.nodeType || g) && a(b, c, i)) return !0;
+ } else
+ while ((b = b[d]))
+ if (1 === b.nodeType || g)
+ if (((l = b[u] || (b[u] = {})), (k = l[b.uniqueID] || (l[b.uniqueID] = {})), e && e === b.nodeName.toLowerCase()))
+ b = b[d] || b;
+ else {
+ if ((j = k[f]) && j[0] === w && j[1] === h) return (m[2] = j[2]);
+ if (((k[f] = m), (m[2] = a(b, c, i)))) return !0;
+ }
+ return !1;
+ };
+ }
+ function ua(a) {
+ return a.length > 1
+ ? function (b, c, d) {
+ var e = a.length;
+ while (e--) if (!a[e](b, c, d)) return !1;
+ return !0;
+ }
+ : a[0];
+ }
+ function va(a, b, c) {
+ for (var d = 0, e = b.length; d < e; d++) ga(a, b[d], c);
+ return c;
+ }
+ function wa(a, b, c, d, e) {
+ for (var f, g = [], h = 0, i = a.length, j = null != b; h < i; h++) (f = a[h]) && ((c && !c(f, d, e)) || (g.push(f), j && b.push(h)));
+ return g;
+ }
+ function xa(a, b, c, d, e, f) {
+ return (
+ d && !d[u] && (d = xa(d)),
+ e && !e[u] && (e = xa(e, f)),
+ ia(function (f, g, h, i) {
+ var j,
+ k,
+ l,
+ m = [],
+ n = [],
+ o = g.length,
+ p = f || va(b || '*', h.nodeType ? [h] : h, []),
+ q = !a || (!f && b) ? p : wa(p, m, a, h, i),
+ r = c ? (e || (f ? a : o || d) ? [] : g) : q;
+ if ((c && c(q, r, h, i), d)) {
+ (j = wa(r, n)), d(j, [], h, i), (k = j.length);
+ while (k--) (l = j[k]) && (r[n[k]] = !(q[n[k]] = l));
+ }
+ if (f) {
+ if (e || a) {
+ if (e) {
+ (j = []), (k = r.length);
+ while (k--) (l = r[k]) && j.push((q[k] = l));
+ e(null, (r = []), j, i);
+ }
+ k = r.length;
+ while (k--) (l = r[k]) && (j = e ? I(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l));
+ }
+ } else (r = wa(r === g ? r.splice(o, r.length) : r)), e ? e(null, g, r, i) : G.apply(g, r);
+ })
+ );
+ }
+ function ya(a) {
+ for (
+ var b,
+ c,
+ e,
+ f = a.length,
+ g = d.relative[a[0].type],
+ h = g || d.relative[' '],
+ i = g ? 1 : 0,
+ k = ta(
+ function (a) {
+ return a === b;
+ },
+ h,
+ !0
+ ),
+ l = ta(
+ function (a) {
+ return I(b, a) > -1;
+ },
+ h,
+ !0
+ ),
+ m = [
+ function (a, c, d) {
+ var e = (!g && (d || c !== j)) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d));
+ return (b = null), e;
+ },
+ ];
+ i < f;
+ i++
+ )
+ if ((c = d.relative[a[i].type])) m = [ta(ua(m), c)];
+ else {
+ if (((c = d.filter[a[i].type].apply(null, a[i].matches)), c[u])) {
+ for (e = ++i; e < f; e++) if (d.relative[a[e].type]) break;
+ return xa(
+ i > 1 && ua(m),
+ i > 1 && sa(a.slice(0, i - 1).concat({ value: ' ' === a[i - 2].type ? '*' : '' })).replace(P, '$1'),
+ c,
+ i < e && ya(a.slice(i, e)),
+ e < f && ya((a = a.slice(e))),
+ e < f && sa(a)
+ );
+ }
+ m.push(c);
+ }
+ return ua(m);
+ }
+ function za(a, b) {
+ var c = b.length > 0,
+ e = a.length > 0,
+ f = function (f, g, h, i, k) {
+ var l,
+ o,
+ q,
+ r = 0,
+ s = '0',
+ t = f && [],
+ u = [],
+ v = j,
+ x = f || (e && d.find.TAG('*', k)),
+ y = (w += null == v ? 1 : Math.random() || 0.1),
+ z = x.length;
+ for (k && (j = g === n || g || k); s !== z && null != (l = x[s]); s++) {
+ if (e && l) {
+ (o = 0), g || l.ownerDocument === n || (m(l), (h = !p));
+ while ((q = a[o++]))
+ if (q(l, g || n, h)) {
+ i.push(l);
+ break;
+ }
+ k && (w = y);
+ }
+ c && ((l = !q && l) && r--, f && t.push(l));
+ }
+ if (((r += s), c && s !== r)) {
+ o = 0;
+ while ((q = b[o++])) q(t, u, g, h);
+ if (f) {
+ if (r > 0) while (s--) t[s] || u[s] || (u[s] = E.call(i));
+ u = wa(u);
+ }
+ G.apply(i, u), k && !f && u.length > 0 && r + b.length > 1 && ga.uniqueSort(i);
+ }
+ return k && ((w = y), (j = v)), t;
+ };
+ return c ? ia(f) : f;
+ }
+ return (
+ (h = ga.compile =
+ function (a, b) {
+ var c,
+ d = [],
+ e = [],
+ f = A[a + ' '];
+ if (!f) {
+ b || (b = g(a)), (c = b.length);
+ while (c--) (f = ya(b[c])), f[u] ? d.push(f) : e.push(f);
+ (f = A(a, za(e, d))), (f.selector = a);
+ }
+ return f;
+ }),
+ (i = ga.select =
+ function (a, b, c, e) {
+ var f,
+ i,
+ j,
+ k,
+ l,
+ m = 'function' == typeof a && a,
+ n = !e && g((a = m.selector || a));
+ if (((c = c || []), 1 === n.length)) {
+ if (((i = n[0] = n[0].slice(0)), i.length > 2 && 'ID' === (j = i[0]).type && 9 === b.nodeType && p && d.relative[i[1].type])) {
+ if (((b = (d.find.ID(j.matches[0].replace(_, aa), b) || [])[0]), !b)) return c;
+ m && (b = b.parentNode), (a = a.slice(i.shift().value.length));
+ }
+ f = V.needsContext.test(a) ? 0 : i.length;
+ while (f--) {
+ if (((j = i[f]), d.relative[(k = j.type)])) break;
+ if ((l = d.find[k]) && (e = l(j.matches[0].replace(_, aa), ($.test(i[0].type) && qa(b.parentNode)) || b))) {
+ if ((i.splice(f, 1), (a = e.length && sa(i)), !a)) return G.apply(c, e), c;
+ break;
+ }
+ }
+ }
+ return (m || h(a, n))(e, b, !p, c, !b || ($.test(a) && qa(b.parentNode)) || b), c;
+ }),
+ (c.sortStable = u.split('').sort(B).join('') === u),
+ (c.detectDuplicates = !!l),
+ m(),
+ (c.sortDetached = ja(function (a) {
+ return 1 & a.compareDocumentPosition(n.createElement('fieldset'));
+ })),
+ ja(function (a) {
+ return (a.innerHTML = ""), '#' === a.firstChild.getAttribute('href');
+ }) ||
+ ka('type|href|height|width', function (a, b, c) {
+ if (!c) return a.getAttribute(b, 'type' === b.toLowerCase() ? 1 : 2);
+ }),
+ (c.attributes &&
+ ja(function (a) {
+ return (a.innerHTML = ''), a.firstChild.setAttribute('value', ''), '' === a.firstChild.getAttribute('value');
+ })) ||
+ ka('value', function (a, b, c) {
+ if (!c && 'input' === a.nodeName.toLowerCase()) return a.defaultValue;
+ }),
+ ja(function (a) {
+ return null == a.getAttribute('disabled');
+ }) ||
+ ka(J, function (a, b, c) {
+ var d;
+ if (!c) return a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null;
+ }),
+ ga
+ );
+ })(a);
+ (r.find = x),
+ (r.expr = x.selectors),
+ (r.expr[':'] = r.expr.pseudos),
+ (r.uniqueSort = r.unique = x.uniqueSort),
+ (r.text = x.getText),
+ (r.isXMLDoc = x.isXML),
+ (r.contains = x.contains),
+ (r.escapeSelector = x.escape);
+ var y = function (a, b, c) {
+ var d = [],
+ e = void 0 !== c;
+ while ((a = a[b]) && 9 !== a.nodeType)
+ if (1 === a.nodeType) {
+ if (e && r(a).is(c)) break;
+ d.push(a);
+ }
+ return d;
+ },
+ z = function (a, b) {
+ for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a);
+ return c;
+ },
+ A = r.expr.match.needsContext,
+ B = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,
+ C = /^.[^:#\[\.,]*$/;
+ function D(a, b, c) {
+ return r.isFunction(b)
+ ? r.grep(a, function (a, d) {
+ return !!b.call(a, d, a) !== c;
+ })
+ : b.nodeType
+ ? r.grep(a, function (a) {
+ return (a === b) !== c;
+ })
+ : 'string' != typeof b
+ ? r.grep(a, function (a) {
+ return i.call(b, a) > -1 !== c;
+ })
+ : C.test(b)
+ ? r.filter(b, a, c)
+ : ((b = r.filter(b, a)),
+ r.grep(a, function (a) {
+ return i.call(b, a) > -1 !== c && 1 === a.nodeType;
+ }));
+ }
+ (r.filter = function (a, b, c) {
+ var d = b[0];
+ return (
+ c && (a = ':not(' + a + ')'),
+ 1 === b.length && 1 === d.nodeType
+ ? r.find.matchesSelector(d, a)
+ ? [d]
+ : []
+ : r.find.matches(
+ a,
+ r.grep(b, function (a) {
+ return 1 === a.nodeType;
+ })
+ )
+ );
+ }),
+ r.fn.extend({
+ find: function (a) {
+ var b,
+ c,
+ d = this.length,
+ e = this;
+ if ('string' != typeof a)
+ return this.pushStack(
+ r(a).filter(function () {
+ for (b = 0; b < d; b++) if (r.contains(e[b], this)) return !0;
+ })
+ );
+ for (c = this.pushStack([]), b = 0; b < d; b++) r.find(a, e[b], c);
+ return d > 1 ? r.uniqueSort(c) : c;
+ },
+ filter: function (a) {
+ return this.pushStack(D(this, a || [], !1));
+ },
+ not: function (a) {
+ return this.pushStack(D(this, a || [], !0));
+ },
+ is: function (a) {
+ return !!D(this, 'string' == typeof a && A.test(a) ? r(a) : a || [], !1).length;
+ },
+ });
+ var E,
+ F = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
+ G = (r.fn.init = function (a, b, c) {
+ var e, f;
+ if (!a) return this;
+ if (((c = c || E), 'string' == typeof a)) {
+ if (((e = '<' === a[0] && '>' === a[a.length - 1] && a.length >= 3 ? [null, a, null] : F.exec(a)), !e || (!e[1] && b)))
+ return !b || b.jquery ? (b || c).find(a) : this.constructor(b).find(a);
+ if (e[1]) {
+ if (
+ ((b = b instanceof r ? b[0] : b),
+ r.merge(this, r.parseHTML(e[1], b && b.nodeType ? b.ownerDocument || b : d, !0)),
+ B.test(e[1]) && r.isPlainObject(b))
+ )
+ for (e in b) r.isFunction(this[e]) ? this[e](b[e]) : this.attr(e, b[e]);
+ return this;
+ }
+ return (f = d.getElementById(e[2])), f && ((this[0] = f), (this.length = 1)), this;
+ }
+ return a.nodeType
+ ? ((this[0] = a), (this.length = 1), this)
+ : r.isFunction(a)
+ ? void 0 !== c.ready
+ ? c.ready(a)
+ : a(r)
+ : r.makeArray(a, this);
+ });
+ (G.prototype = r.fn), (E = r(d));
+ var H = /^(?:parents|prev(?:Until|All))/,
+ I = { children: !0, contents: !0, next: !0, prev: !0 };
+ r.fn.extend({
+ has: function (a) {
+ var b = r(a, this),
+ c = b.length;
+ return this.filter(function () {
+ for (var a = 0; a < c; a++) if (r.contains(this, b[a])) return !0;
+ });
+ },
+ closest: function (a, b) {
+ var c,
+ d = 0,
+ e = this.length,
+ f = [],
+ g = 'string' != typeof a && r(a);
+ if (!A.test(a))
+ for (; d < e; d++)
+ for (c = this[d]; c && c !== b; c = c.parentNode)
+ if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && r.find.matchesSelector(c, a))) {
+ f.push(c);
+ break;
+ }
+ return this.pushStack(f.length > 1 ? r.uniqueSort(f) : f);
+ },
+ index: function (a) {
+ return a
+ ? 'string' == typeof a
+ ? i.call(r(a), this[0])
+ : i.call(this, a.jquery ? a[0] : a)
+ : this[0] && this[0].parentNode
+ ? this.first().prevAll().length
+ : -1;
+ },
+ add: function (a, b) {
+ return this.pushStack(r.uniqueSort(r.merge(this.get(), r(a, b))));
+ },
+ addBack: function (a) {
+ return this.add(null == a ? this.prevObject : this.prevObject.filter(a));
+ },
+ });
+ function J(a, b) {
+ while ((a = a[b]) && 1 !== a.nodeType);
+ return a;
+ }
+ r.each(
+ {
+ parent: function (a) {
+ var b = a.parentNode;
+ return b && 11 !== b.nodeType ? b : null;
+ },
+ parents: function (a) {
+ return y(a, 'parentNode');
+ },
+ parentsUntil: function (a, b, c) {
+ return y(a, 'parentNode', c);
+ },
+ next: function (a) {
+ return J(a, 'nextSibling');
+ },
+ prev: function (a) {
+ return J(a, 'previousSibling');
+ },
+ nextAll: function (a) {
+ return y(a, 'nextSibling');
+ },
+ prevAll: function (a) {
+ return y(a, 'previousSibling');
+ },
+ nextUntil: function (a, b, c) {
+ return y(a, 'nextSibling', c);
+ },
+ prevUntil: function (a, b, c) {
+ return y(a, 'previousSibling', c);
+ },
+ siblings: function (a) {
+ return z((a.parentNode || {}).firstChild, a);
+ },
+ children: function (a) {
+ return z(a.firstChild);
+ },
+ contents: function (a) {
+ return a.contentDocument || r.merge([], a.childNodes);
+ },
+ },
+ function (a, b) {
+ r.fn[a] = function (c, d) {
+ var e = r.map(this, b, c);
+ return (
+ 'Until' !== a.slice(-5) && (d = c),
+ d && 'string' == typeof d && (e = r.filter(d, e)),
+ this.length > 1 && (I[a] || r.uniqueSort(e), H.test(a) && e.reverse()),
+ this.pushStack(e)
+ );
+ };
+ }
+ );
+ var K = /[^\x20\t\r\n\f]+/g;
+ function L(a) {
+ var b = {};
+ return (
+ r.each(a.match(K) || [], function (a, c) {
+ b[c] = !0;
+ }),
+ b
+ );
+ }
+ r.Callbacks = function (a) {
+ a = 'string' == typeof a ? L(a) : r.extend({}, a);
+ var b,
+ c,
+ d,
+ e,
+ f = [],
+ g = [],
+ h = -1,
+ i = function () {
+ for (e = a.once, d = b = !0; g.length; h = -1) {
+ c = g.shift();
+ while (++h < f.length) f[h].apply(c[0], c[1]) === !1 && a.stopOnFalse && ((h = f.length), (c = !1));
+ }
+ a.memory || (c = !1), (b = !1), e && (f = c ? [] : '');
+ },
+ j = {
+ add: function () {
+ return (
+ f &&
+ (c && !b && ((h = f.length - 1), g.push(c)),
+ (function d(b) {
+ r.each(b, function (b, c) {
+ r.isFunction(c) ? (a.unique && j.has(c)) || f.push(c) : c && c.length && 'string' !== r.type(c) && d(c);
+ });
+ })(arguments),
+ c && !b && i()),
+ this
+ );
+ },
+ remove: function () {
+ return (
+ r.each(arguments, function (a, b) {
+ var c;
+ while ((c = r.inArray(b, f, c)) > -1) f.splice(c, 1), c <= h && h--;
+ }),
+ this
+ );
+ },
+ has: function (a) {
+ return a ? r.inArray(a, f) > -1 : f.length > 0;
+ },
+ empty: function () {
+ return f && (f = []), this;
+ },
+ disable: function () {
+ return (e = g = []), (f = c = ''), this;
+ },
+ disabled: function () {
+ return !f;
+ },
+ lock: function () {
+ return (e = g = []), c || b || (f = c = ''), this;
+ },
+ locked: function () {
+ return !!e;
+ },
+ fireWith: function (a, c) {
+ return e || ((c = c || []), (c = [a, c.slice ? c.slice() : c]), g.push(c), b || i()), this;
+ },
+ fire: function () {
+ return j.fireWith(this, arguments), this;
+ },
+ fired: function () {
+ return !!d;
+ },
+ };
+ return j;
+ };
+ function M(a) {
+ return a;
+ }
+ function N(a) {
+ throw a;
+ }
+ function O(a, b, c) {
+ var d;
+ try {
+ a && r.isFunction((d = a.promise))
+ ? d.call(a).done(b).fail(c)
+ : a && r.isFunction((d = a.then))
+ ? d.call(a, b, c)
+ : b.call(void 0, a);
+ } catch (a) {
+ c.call(void 0, a);
+ }
+ }
+ r.extend({
+ Deferred: function (b) {
+ var c = [
+ ['notify', 'progress', r.Callbacks('memory'), r.Callbacks('memory'), 2],
+ ['resolve', 'done', r.Callbacks('once memory'), r.Callbacks('once memory'), 0, 'resolved'],
+ ['reject', 'fail', r.Callbacks('once memory'), r.Callbacks('once memory'), 1, 'rejected'],
+ ],
+ d = 'pending',
+ e = {
+ state: function () {
+ return d;
+ },
+ always: function () {
+ return f.done(arguments).fail(arguments), this;
+ },
+ catch: function (a) {
+ return e.then(null, a);
+ },
+ pipe: function () {
+ var a = arguments;
+ return r
+ .Deferred(function (b) {
+ r.each(c, function (c, d) {
+ var e = r.isFunction(a[d[4]]) && a[d[4]];
+ f[d[1]](function () {
+ var a = e && e.apply(this, arguments);
+ a && r.isFunction(a.promise)
+ ? a.promise().progress(b.notify).done(b.resolve).fail(b.reject)
+ : b[d[0] + 'With'](this, e ? [a] : arguments);
+ });
+ }),
+ (a = null);
+ })
+ .promise();
+ },
+ then: function (b, d, e) {
+ var f = 0;
+ function g(b, c, d, e) {
+ return function () {
+ var h = this,
+ i = arguments,
+ j = function () {
+ var a, j;
+ if (!(b < f)) {
+ if (((a = d.apply(h, i)), a === c.promise())) throw new TypeError('Thenable self-resolution');
+ (j = a && ('object' == typeof a || 'function' == typeof a) && a.then),
+ r.isFunction(j)
+ ? e
+ ? j.call(a, g(f, c, M, e), g(f, c, N, e))
+ : (f++, j.call(a, g(f, c, M, e), g(f, c, N, e), g(f, c, M, c.notifyWith)))
+ : (d !== M && ((h = void 0), (i = [a])), (e || c.resolveWith)(h, i));
+ }
+ },
+ k = e
+ ? j
+ : function () {
+ try {
+ j();
+ } catch (a) {
+ r.Deferred.exceptionHook && r.Deferred.exceptionHook(a, k.stackTrace),
+ b + 1 >= f && (d !== N && ((h = void 0), (i = [a])), c.rejectWith(h, i));
+ }
+ };
+ b ? k() : (r.Deferred.getStackHook && (k.stackTrace = r.Deferred.getStackHook()), a.setTimeout(k));
+ };
+ }
+ return r
+ .Deferred(function (a) {
+ c[0][3].add(g(0, a, r.isFunction(e) ? e : M, a.notifyWith)),
+ c[1][3].add(g(0, a, r.isFunction(b) ? b : M)),
+ c[2][3].add(g(0, a, r.isFunction(d) ? d : N));
+ })
+ .promise();
+ },
+ promise: function (a) {
+ return null != a ? r.extend(a, e) : e;
+ },
+ },
+ f = {};
+ return (
+ r.each(c, function (a, b) {
+ var g = b[2],
+ h = b[5];
+ (e[b[1]] = g.add),
+ h &&
+ g.add(
+ function () {
+ d = h;
+ },
+ c[3 - a][2].disable,
+ c[0][2].lock
+ ),
+ g.add(b[3].fire),
+ (f[b[0]] = function () {
+ return f[b[0] + 'With'](this === f ? void 0 : this, arguments), this;
+ }),
+ (f[b[0] + 'With'] = g.fireWith);
+ }),
+ e.promise(f),
+ b && b.call(f, f),
+ f
+ );
+ },
+ when: function (a) {
+ var b = arguments.length,
+ c = b,
+ d = Array(c),
+ e = f.call(arguments),
+ g = r.Deferred(),
+ h = function (a) {
+ return function (c) {
+ (d[a] = this), (e[a] = arguments.length > 1 ? f.call(arguments) : c), --b || g.resolveWith(d, e);
+ };
+ };
+ if (b <= 1 && (O(a, g.done(h(c)).resolve, g.reject), 'pending' === g.state() || r.isFunction(e[c] && e[c].then))) return g.then();
+ while (c--) O(e[c], h(c), g.reject);
+ return g.promise();
+ },
+ });
+ var P = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
+ (r.Deferred.exceptionHook = function (b, c) {
+ a.console && a.console.warn && b && P.test(b.name) && a.console.warn('jQuery.Deferred exception: ' + b.message, b.stack, c);
+ }),
+ (r.readyException = function (b) {
+ a.setTimeout(function () {
+ throw b;
+ });
+ });
+ var Q = r.Deferred();
+ (r.fn.ready = function (a) {
+ return (
+ Q.then(a)['catch'](function (a) {
+ r.readyException(a);
+ }),
+ this
+ );
+ }),
+ r.extend({
+ isReady: !1,
+ readyWait: 1,
+ holdReady: function (a) {
+ a ? r.readyWait++ : r.ready(!0);
+ },
+ ready: function (a) {
+ (a === !0 ? --r.readyWait : r.isReady) || ((r.isReady = !0), (a !== !0 && --r.readyWait > 0) || Q.resolveWith(d, [r]));
+ },
+ }),
+ (r.ready.then = Q.then);
+ function R() {
+ d.removeEventListener('DOMContentLoaded', R), a.removeEventListener('load', R), r.ready();
+ }
+ 'complete' === d.readyState || ('loading' !== d.readyState && !d.documentElement.doScroll)
+ ? a.setTimeout(r.ready)
+ : (d.addEventListener('DOMContentLoaded', R), a.addEventListener('load', R));
+ var S = function (a, b, c, d, e, f, g) {
+ var h = 0,
+ i = a.length,
+ j = null == c;
+ if ('object' === r.type(c)) {
+ e = !0;
+ for (h in c) S(a, b, h, c[h], !0, f, g);
+ } else if (
+ void 0 !== d &&
+ ((e = !0),
+ r.isFunction(d) || (g = !0),
+ j &&
+ (g
+ ? (b.call(a, d), (b = null))
+ : ((j = b),
+ (b = function (a, b, c) {
+ return j.call(r(a), c);
+ }))),
+ b)
+ )
+ for (; h < i; h++) b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
+ return e ? a : j ? b.call(a) : i ? b(a[0], c) : f;
+ },
+ T = function (a) {
+ return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType;
+ };
+ function U() {
+ this.expando = r.expando + U.uid++;
+ }
+ (U.uid = 1),
+ (U.prototype = {
+ cache: function (a) {
+ var b = a[this.expando];
+ return (
+ b ||
+ ((b = {}),
+ T(a) && (a.nodeType ? (a[this.expando] = b) : Object.defineProperty(a, this.expando, { value: b, configurable: !0 }))),
+ b
+ );
+ },
+ set: function (a, b, c) {
+ var d,
+ e = this.cache(a);
+ if ('string' == typeof b) e[r.camelCase(b)] = c;
+ else for (d in b) e[r.camelCase(d)] = b[d];
+ return e;
+ },
+ get: function (a, b) {
+ return void 0 === b ? this.cache(a) : a[this.expando] && a[this.expando][r.camelCase(b)];
+ },
+ access: function (a, b, c) {
+ return void 0 === b || (b && 'string' == typeof b && void 0 === c) ? this.get(a, b) : (this.set(a, b, c), void 0 !== c ? c : b);
+ },
+ remove: function (a, b) {
+ var c,
+ d = a[this.expando];
+ if (void 0 !== d) {
+ if (void 0 !== b) {
+ r.isArray(b) ? (b = b.map(r.camelCase)) : ((b = r.camelCase(b)), (b = b in d ? [b] : b.match(K) || [])), (c = b.length);
+ while (c--) delete d[b[c]];
+ }
+ (void 0 === b || r.isEmptyObject(d)) && (a.nodeType ? (a[this.expando] = void 0) : delete a[this.expando]);
+ }
+ },
+ hasData: function (a) {
+ var b = a[this.expando];
+ return void 0 !== b && !r.isEmptyObject(b);
+ },
+ });
+ var V = new U(),
+ W = new U(),
+ X = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ Y = /[A-Z]/g;
+ function Z(a) {
+ return 'true' === a || ('false' !== a && ('null' === a ? null : a === +a + '' ? +a : X.test(a) ? JSON.parse(a) : a));
+ }
+ function $(a, b, c) {
+ var d;
+ if (void 0 === c && 1 === a.nodeType)
+ if (((d = 'data-' + b.replace(Y, '-$&').toLowerCase()), (c = a.getAttribute(d)), 'string' == typeof c)) {
+ try {
+ c = Z(c);
+ } catch (e) {}
+ W.set(a, b, c);
+ } else c = void 0;
+ return c;
+ }
+ r.extend({
+ hasData: function (a) {
+ return W.hasData(a) || V.hasData(a);
+ },
+ data: function (a, b, c) {
+ return W.access(a, b, c);
+ },
+ removeData: function (a, b) {
+ W.remove(a, b);
+ },
+ _data: function (a, b, c) {
+ return V.access(a, b, c);
+ },
+ _removeData: function (a, b) {
+ V.remove(a, b);
+ },
+ }),
+ r.fn.extend({
+ data: function (a, b) {
+ var c,
+ d,
+ e,
+ f = this[0],
+ g = f && f.attributes;
+ if (void 0 === a) {
+ if (this.length && ((e = W.get(f)), 1 === f.nodeType && !V.get(f, 'hasDataAttrs'))) {
+ c = g.length;
+ while (c--) g[c] && ((d = g[c].name), 0 === d.indexOf('data-') && ((d = r.camelCase(d.slice(5))), $(f, d, e[d])));
+ V.set(f, 'hasDataAttrs', !0);
+ }
+ return e;
+ }
+ return 'object' == typeof a
+ ? this.each(function () {
+ W.set(this, a);
+ })
+ : S(
+ this,
+ function (b) {
+ var c;
+ if (f && void 0 === b) {
+ if (((c = W.get(f, a)), void 0 !== c)) return c;
+ if (((c = $(f, a)), void 0 !== c)) return c;
+ } else
+ this.each(function () {
+ W.set(this, a, b);
+ });
+ },
+ null,
+ b,
+ arguments.length > 1,
+ null,
+ !0
+ );
+ },
+ removeData: function (a) {
+ return this.each(function () {
+ W.remove(this, a);
+ });
+ },
+ }),
+ r.extend({
+ queue: function (a, b, c) {
+ var d;
+ if (a)
+ return (
+ (b = (b || 'fx') + 'queue'),
+ (d = V.get(a, b)),
+ c && (!d || r.isArray(c) ? (d = V.access(a, b, r.makeArray(c))) : d.push(c)),
+ d || []
+ );
+ },
+ dequeue: function (a, b) {
+ b = b || 'fx';
+ var c = r.queue(a, b),
+ d = c.length,
+ e = c.shift(),
+ f = r._queueHooks(a, b),
+ g = function () {
+ r.dequeue(a, b);
+ };
+ 'inprogress' === e && ((e = c.shift()), d--),
+ e && ('fx' === b && c.unshift('inprogress'), delete f.stop, e.call(a, g, f)),
+ !d && f && f.empty.fire();
+ },
+ _queueHooks: function (a, b) {
+ var c = b + 'queueHooks';
+ return (
+ V.get(a, c) ||
+ V.access(a, c, {
+ empty: r.Callbacks('once memory').add(function () {
+ V.remove(a, [b + 'queue', c]);
+ }),
+ })
+ );
+ },
+ }),
+ r.fn.extend({
+ queue: function (a, b) {
+ var c = 2;
+ return (
+ 'string' != typeof a && ((b = a), (a = 'fx'), c--),
+ arguments.length < c
+ ? r.queue(this[0], a)
+ : void 0 === b
+ ? this
+ : this.each(function () {
+ var c = r.queue(this, a, b);
+ r._queueHooks(this, a), 'fx' === a && 'inprogress' !== c[0] && r.dequeue(this, a);
+ })
+ );
+ },
+ dequeue: function (a) {
+ return this.each(function () {
+ r.dequeue(this, a);
+ });
+ },
+ clearQueue: function (a) {
+ return this.queue(a || 'fx', []);
+ },
+ promise: function (a, b) {
+ var c,
+ d = 1,
+ e = r.Deferred(),
+ f = this,
+ g = this.length,
+ h = function () {
+ --d || e.resolveWith(f, [f]);
+ };
+ 'string' != typeof a && ((b = a), (a = void 0)), (a = a || 'fx');
+ while (g--) (c = V.get(f[g], a + 'queueHooks')), c && c.empty && (d++, c.empty.add(h));
+ return h(), e.promise(b);
+ },
+ });
+ var _ = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+ aa = new RegExp('^(?:([+-])=|)(' + _ + ')([a-z%]*)$', 'i'),
+ ba = ['Top', 'Right', 'Bottom', 'Left'],
+ ca = function (a, b) {
+ return (
+ (a = b || a),
+ 'none' === a.style.display || ('' === a.style.display && r.contains(a.ownerDocument, a) && 'none' === r.css(a, 'display'))
+ );
+ },
+ da = function (a, b, c, d) {
+ var e,
+ f,
+ g = {};
+ for (f in b) (g[f] = a.style[f]), (a.style[f] = b[f]);
+ e = c.apply(a, d || []);
+ for (f in b) a.style[f] = g[f];
+ return e;
+ };
+ function ea(a, b, c, d) {
+ var e,
+ f = 1,
+ g = 20,
+ h = d
+ ? function () {
+ return d.cur();
+ }
+ : function () {
+ return r.css(a, b, '');
+ },
+ i = h(),
+ j = (c && c[3]) || (r.cssNumber[b] ? '' : 'px'),
+ k = (r.cssNumber[b] || ('px' !== j && +i)) && aa.exec(r.css(a, b));
+ if (k && k[3] !== j) {
+ (j = j || k[3]), (c = c || []), (k = +i || 1);
+ do (f = f || '.5'), (k /= f), r.style(a, b, k + j);
+ while (f !== (f = h() / i) && 1 !== f && --g);
+ }
+ return c && ((k = +k || +i || 0), (e = c[1] ? k + (c[1] + 1) * c[2] : +c[2]), d && ((d.unit = j), (d.start = k), (d.end = e))), e;
+ }
+ var fa = {};
+ function ga(a) {
+ var b,
+ c = a.ownerDocument,
+ d = a.nodeName,
+ e = fa[d];
+ return e
+ ? e
+ : ((b = c.body.appendChild(c.createElement(d))),
+ (e = r.css(b, 'display')),
+ b.parentNode.removeChild(b),
+ 'none' === e && (e = 'block'),
+ (fa[d] = e),
+ e);
+ }
+ function ha(a, b) {
+ for (var c, d, e = [], f = 0, g = a.length; f < g; f++)
+ (d = a[f]),
+ d.style &&
+ ((c = d.style.display),
+ b
+ ? ('none' === c && ((e[f] = V.get(d, 'display') || null), e[f] || (d.style.display = '')),
+ '' === d.style.display && ca(d) && (e[f] = ga(d)))
+ : 'none' !== c && ((e[f] = 'none'), V.set(d, 'display', c)));
+ for (f = 0; f < g; f++) null != e[f] && (a[f].style.display = e[f]);
+ return a;
+ }
+ r.fn.extend({
+ show: function () {
+ return ha(this, !0);
+ },
+ hide: function () {
+ return ha(this);
+ },
+ toggle: function (a) {
+ return 'boolean' == typeof a
+ ? a
+ ? this.show()
+ : this.hide()
+ : this.each(function () {
+ ca(this) ? r(this).show() : r(this).hide();
+ });
+ },
+ });
+ var ia = /^(?:checkbox|radio)$/i,
+ ja = /<([a-z][^\/\0>\x20\t\r\n\f]+)/i,
+ ka = /^$|\/(?:java|ecma)script/i,
+ la = {
+ option: [1, "'],
+ thead: [1, ''],
+ col: [2, ''],
+ tr: [2, ''],
+ td: [3, ''],
+ _default: [0, '', ''],
+ };
+ (la.optgroup = la.option), (la.tbody = la.tfoot = la.colgroup = la.caption = la.thead), (la.th = la.td);
+ function ma(a, b) {
+ var c;
+ return (
+ (c =
+ 'undefined' != typeof a.getElementsByTagName
+ ? a.getElementsByTagName(b || '*')
+ : 'undefined' != typeof a.querySelectorAll
+ ? a.querySelectorAll(b || '*')
+ : []),
+ void 0 === b || (b && r.nodeName(a, b)) ? r.merge([a], c) : c
+ );
+ }
+ function na(a, b) {
+ for (var c = 0, d = a.length; c < d; c++) V.set(a[c], 'globalEval', !b || V.get(b[c], 'globalEval'));
+ }
+ var oa = /<|?\w+;/;
+ function pa(a, b, c, d, e) {
+ for (var f, g, h, i, j, k, l = b.createDocumentFragment(), m = [], n = 0, o = a.length; n < o; n++)
+ if (((f = a[n]), f || 0 === f))
+ if ('object' === r.type(f)) r.merge(m, f.nodeType ? [f] : f);
+ else if (oa.test(f)) {
+ (g = g || l.appendChild(b.createElement('div'))),
+ (h = (ja.exec(f) || ['', ''])[1].toLowerCase()),
+ (i = la[h] || la._default),
+ (g.innerHTML = i[1] + r.htmlPrefilter(f) + i[2]),
+ (k = i[0]);
+ while (k--) g = g.lastChild;
+ r.merge(m, g.childNodes), (g = l.firstChild), (g.textContent = '');
+ } else m.push(b.createTextNode(f));
+ (l.textContent = ''), (n = 0);
+ while ((f = m[n++]))
+ if (d && r.inArray(f, d) > -1) e && e.push(f);
+ else if (((j = r.contains(f.ownerDocument, f)), (g = ma(l.appendChild(f), 'script')), j && na(g), c)) {
+ k = 0;
+ while ((f = g[k++])) ka.test(f.type || '') && c.push(f);
+ }
+ return l;
+ }
+ !(function () {
+ var a = d.createDocumentFragment(),
+ b = a.appendChild(d.createElement('div')),
+ c = d.createElement('input');
+ c.setAttribute('type', 'radio'),
+ c.setAttribute('checked', 'checked'),
+ c.setAttribute('name', 't'),
+ b.appendChild(c),
+ (o.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked),
+ (b.innerHTML = ''),
+ (o.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue);
+ })();
+ var qa = d.documentElement,
+ ra = /^key/,
+ sa = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+ ta = /^([^.]*)(?:\.(.+)|)/;
+ function ua() {
+ return !0;
+ }
+ function va() {
+ return !1;
+ }
+ function wa() {
+ try {
+ return d.activeElement;
+ } catch (a) {}
+ }
+ function xa(a, b, c, d, e, f) {
+ var g, h;
+ if ('object' == typeof b) {
+ 'string' != typeof c && ((d = d || c), (c = void 0));
+ for (h in b) xa(a, h, c, d, b[h], f);
+ return a;
+ }
+ if (
+ (null == d && null == e
+ ? ((e = c), (d = c = void 0))
+ : null == e && ('string' == typeof c ? ((e = d), (d = void 0)) : ((e = d), (d = c), (c = void 0))),
+ e === !1)
+ )
+ e = va;
+ else if (!e) return a;
+ return (
+ 1 === f &&
+ ((g = e),
+ (e = function (a) {
+ return r().off(a), g.apply(this, arguments);
+ }),
+ (e.guid = g.guid || (g.guid = r.guid++))),
+ a.each(function () {
+ r.event.add(this, b, e, d, c);
+ })
+ );
+ }
+ (r.event = {
+ global: {},
+ add: function (a, b, c, d, e) {
+ var f,
+ g,
+ h,
+ i,
+ j,
+ k,
+ l,
+ m,
+ n,
+ o,
+ p,
+ q = V.get(a);
+ if (q) {
+ c.handler && ((f = c), (c = f.handler), (e = f.selector)),
+ e && r.find.matchesSelector(qa, e),
+ c.guid || (c.guid = r.guid++),
+ (i = q.events) || (i = q.events = {}),
+ (g = q.handle) ||
+ (g = q.handle =
+ function (b) {
+ return 'undefined' != typeof r && r.event.triggered !== b.type ? r.event.dispatch.apply(a, arguments) : void 0;
+ }),
+ (b = (b || '').match(K) || ['']),
+ (j = b.length);
+ while (j--)
+ (h = ta.exec(b[j]) || []),
+ (n = p = h[1]),
+ (o = (h[2] || '').split('.').sort()),
+ n &&
+ ((l = r.event.special[n] || {}),
+ (n = (e ? l.delegateType : l.bindType) || n),
+ (l = r.event.special[n] || {}),
+ (k = r.extend(
+ {
+ type: n,
+ origType: p,
+ data: d,
+ handler: c,
+ guid: c.guid,
+ selector: e,
+ needsContext: e && r.expr.match.needsContext.test(e),
+ namespace: o.join('.'),
+ },
+ f
+ )),
+ (m = i[n]) ||
+ ((m = i[n] = []),
+ (m.delegateCount = 0),
+ (l.setup && l.setup.call(a, d, o, g) !== !1) || (a.addEventListener && a.addEventListener(n, g))),
+ l.add && (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)),
+ e ? m.splice(m.delegateCount++, 0, k) : m.push(k),
+ (r.event.global[n] = !0));
+ }
+ },
+ remove: function (a, b, c, d, e) {
+ var f,
+ g,
+ h,
+ i,
+ j,
+ k,
+ l,
+ m,
+ n,
+ o,
+ p,
+ q = V.hasData(a) && V.get(a);
+ if (q && (i = q.events)) {
+ (b = (b || '').match(K) || ['']), (j = b.length);
+ while (j--)
+ if (((h = ta.exec(b[j]) || []), (n = p = h[1]), (o = (h[2] || '').split('.').sort()), n)) {
+ (l = r.event.special[n] || {}),
+ (n = (d ? l.delegateType : l.bindType) || n),
+ (m = i[n] || []),
+ (h = h[2] && new RegExp('(^|\\.)' + o.join('\\.(?:.*\\.|)') + '(\\.|$)')),
+ (g = f = m.length);
+ while (f--)
+ (k = m[f]),
+ (!e && p !== k.origType) ||
+ (c && c.guid !== k.guid) ||
+ (h && !h.test(k.namespace)) ||
+ (d && d !== k.selector && ('**' !== d || !k.selector)) ||
+ (m.splice(f, 1), k.selector && m.delegateCount--, l.remove && l.remove.call(a, k));
+ g && !m.length && ((l.teardown && l.teardown.call(a, o, q.handle) !== !1) || r.removeEvent(a, n, q.handle), delete i[n]);
+ } else for (n in i) r.event.remove(a, n + b[j], c, d, !0);
+ r.isEmptyObject(i) && V.remove(a, 'handle events');
+ }
+ },
+ dispatch: function (a) {
+ var b = r.event.fix(a),
+ c,
+ d,
+ e,
+ f,
+ g,
+ h,
+ i = new Array(arguments.length),
+ j = (V.get(this, 'events') || {})[b.type] || [],
+ k = r.event.special[b.type] || {};
+ for (i[0] = b, c = 1; c < arguments.length; c++) i[c] = arguments[c];
+ if (((b.delegateTarget = this), !k.preDispatch || k.preDispatch.call(this, b) !== !1)) {
+ (h = r.event.handlers.call(this, b, j)), (c = 0);
+ while ((f = h[c++]) && !b.isPropagationStopped()) {
+ (b.currentTarget = f.elem), (d = 0);
+ while ((g = f.handlers[d++]) && !b.isImmediatePropagationStopped())
+ (b.rnamespace && !b.rnamespace.test(g.namespace)) ||
+ ((b.handleObj = g),
+ (b.data = g.data),
+ (e = ((r.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i)),
+ void 0 !== e && (b.result = e) === !1 && (b.preventDefault(), b.stopPropagation()));
+ }
+ return k.postDispatch && k.postDispatch.call(this, b), b.result;
+ }
+ },
+ handlers: function (a, b) {
+ var c,
+ d,
+ e,
+ f,
+ g,
+ h = [],
+ i = b.delegateCount,
+ j = a.target;
+ if (i && j.nodeType && !('click' === a.type && a.button >= 1))
+ for (; j !== this; j = j.parentNode || this)
+ if (1 === j.nodeType && ('click' !== a.type || j.disabled !== !0)) {
+ for (f = [], g = {}, c = 0; c < i; c++)
+ (d = b[c]),
+ (e = d.selector + ' '),
+ void 0 === g[e] && (g[e] = d.needsContext ? r(e, this).index(j) > -1 : r.find(e, this, null, [j]).length),
+ g[e] && f.push(d);
+ f.length && h.push({ elem: j, handlers: f });
+ }
+ return (j = this), i < b.length && h.push({ elem: j, handlers: b.slice(i) }), h;
+ },
+ addProp: function (a, b) {
+ Object.defineProperty(r.Event.prototype, a, {
+ enumerable: !0,
+ configurable: !0,
+ get: r.isFunction(b)
+ ? function () {
+ if (this.originalEvent) return b(this.originalEvent);
+ }
+ : function () {
+ if (this.originalEvent) return this.originalEvent[a];
+ },
+ set: function (b) {
+ Object.defineProperty(this, a, { enumerable: !0, configurable: !0, writable: !0, value: b });
+ },
+ });
+ },
+ fix: function (a) {
+ return a[r.expando] ? a : new r.Event(a);
+ },
+ special: {
+ load: { noBubble: !0 },
+ focus: {
+ trigger: function () {
+ if (this !== wa() && this.focus) return this.focus(), !1;
+ },
+ delegateType: 'focusin',
+ },
+ blur: {
+ trigger: function () {
+ if (this === wa() && this.blur) return this.blur(), !1;
+ },
+ delegateType: 'focusout',
+ },
+ click: {
+ trigger: function () {
+ if ('checkbox' === this.type && this.click && r.nodeName(this, 'input')) return this.click(), !1;
+ },
+ _default: function (a) {
+ return r.nodeName(a.target, 'a');
+ },
+ },
+ beforeunload: {
+ postDispatch: function (a) {
+ void 0 !== a.result && a.originalEvent && (a.originalEvent.returnValue = a.result);
+ },
+ },
+ },
+ }),
+ (r.removeEvent = function (a, b, c) {
+ a.removeEventListener && a.removeEventListener(b, c);
+ }),
+ (r.Event = function (a, b) {
+ return this instanceof r.Event
+ ? (a && a.type
+ ? ((this.originalEvent = a),
+ (this.type = a.type),
+ (this.isDefaultPrevented = a.defaultPrevented || (void 0 === a.defaultPrevented && a.returnValue === !1) ? ua : va),
+ (this.target = a.target && 3 === a.target.nodeType ? a.target.parentNode : a.target),
+ (this.currentTarget = a.currentTarget),
+ (this.relatedTarget = a.relatedTarget))
+ : (this.type = a),
+ b && r.extend(this, b),
+ (this.timeStamp = (a && a.timeStamp) || r.now()),
+ void (this[r.expando] = !0))
+ : new r.Event(a, b);
+ }),
+ (r.Event.prototype = {
+ constructor: r.Event,
+ isDefaultPrevented: va,
+ isPropagationStopped: va,
+ isImmediatePropagationStopped: va,
+ isSimulated: !1,
+ preventDefault: function () {
+ var a = this.originalEvent;
+ (this.isDefaultPrevented = ua), a && !this.isSimulated && a.preventDefault();
+ },
+ stopPropagation: function () {
+ var a = this.originalEvent;
+ (this.isPropagationStopped = ua), a && !this.isSimulated && a.stopPropagation();
+ },
+ stopImmediatePropagation: function () {
+ var a = this.originalEvent;
+ (this.isImmediatePropagationStopped = ua), a && !this.isSimulated && a.stopImmediatePropagation(), this.stopPropagation();
+ },
+ }),
+ r.each(
+ {
+ altKey: !0,
+ bubbles: !0,
+ cancelable: !0,
+ changedTouches: !0,
+ ctrlKey: !0,
+ detail: !0,
+ eventPhase: !0,
+ metaKey: !0,
+ pageX: !0,
+ pageY: !0,
+ shiftKey: !0,
+ view: !0,
+ char: !0,
+ charCode: !0,
+ key: !0,
+ keyCode: !0,
+ button: !0,
+ buttons: !0,
+ clientX: !0,
+ clientY: !0,
+ offsetX: !0,
+ offsetY: !0,
+ pointerId: !0,
+ pointerType: !0,
+ screenX: !0,
+ screenY: !0,
+ targetTouches: !0,
+ toElement: !0,
+ touches: !0,
+ which: function (a) {
+ var b = a.button;
+ return null == a.which && ra.test(a.type)
+ ? null != a.charCode
+ ? a.charCode
+ : a.keyCode
+ : !a.which && void 0 !== b && sa.test(a.type)
+ ? 1 & b
+ ? 1
+ : 2 & b
+ ? 3
+ : 4 & b
+ ? 2
+ : 0
+ : a.which;
+ },
+ },
+ r.event.addProp
+ ),
+ r.each({ mouseenter: 'mouseover', mouseleave: 'mouseout', pointerenter: 'pointerover', pointerleave: 'pointerout' }, function (a, b) {
+ r.event.special[a] = {
+ delegateType: b,
+ bindType: b,
+ handle: function (a) {
+ var c,
+ d = this,
+ e = a.relatedTarget,
+ f = a.handleObj;
+ return (e && (e === d || r.contains(d, e))) || ((a.type = f.origType), (c = f.handler.apply(this, arguments)), (a.type = b)), c;
+ },
+ };
+ }),
+ r.fn.extend({
+ on: function (a, b, c, d) {
+ return xa(this, a, b, c, d);
+ },
+ one: function (a, b, c, d) {
+ return xa(this, a, b, c, d, 1);
+ },
+ off: function (a, b, c) {
+ var d, e;
+ if (a && a.preventDefault && a.handleObj)
+ return (
+ (d = a.handleObj),
+ r(a.delegateTarget).off(d.namespace ? d.origType + '.' + d.namespace : d.origType, d.selector, d.handler),
+ this
+ );
+ if ('object' == typeof a) {
+ for (e in a) this.off(e, b, a[e]);
+ return this;
+ }
+ return (
+ (b !== !1 && 'function' != typeof b) || ((c = b), (b = void 0)),
+ c === !1 && (c = va),
+ this.each(function () {
+ r.event.remove(this, a, c, b);
+ })
+ );
+ },
+ });
+ var ya = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
+ za = /